Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Mathematicus
Mar 10, 2004
Gozintas a specialty
Has anyone used RailsAdmin? Any words of wisdom or warning about it?

Edit: I should note that we're looking to use it as a more dynamic and customized scaffold system - something like the built-in scaffold generation, but more extensive, and easy to modify centrally on an ongoing basis. The reviews of it that I'm finding seem to have an "I can take it or leave it" conclusion.

Mathematicus fucked around with this message at 18:59 on Nov 10, 2016

Adbot
ADBOT LOVES YOU

xtal
Jan 9, 2011

by Fluffdaddy
I've used that, ActiveAdmin and Administrate. Check out Administrate.

Gmaz
Apr 3, 2011

New DLC for Aoe2 is out: Dynasties of India

Mathematicus posted:

Edit: I should note that we're looking to use it as a more dynamic and customized scaffold system - something like the built-in scaffold generation, but more extensive, and easy to modify centrally on an ongoing basis. The reviews of it that I'm finding seem to have an "I can take it or leave it" conclusion.
Yeah I think for your purpose Administrate would be the best option.

Mathematicus
Mar 10, 2004
Gozintas a specialty
Thanks for the tip.

After looking at RailsAdmin for a while, it looks like it's really just intended to give admin users a quick set of CRUD screens for the app's models that look better than the default scaffold screens. Is that also true of Adminstrate, or does it give you an interface to tackle end-user screens and/or workflow-based screens?

necrotic
Aug 2, 2005
I owe my brother big time for this!
I think Administrate literally generates controllers/views for you and then you can do whatever the hell you want to them.

RailsAdmin is like a framework level thing thats less flexible? I haven't used it in forever though.

xenilk
Apr 17, 2004

ERRYDAY I BE SPLIT-TONING! Honestly, its the only skill I got other than shooting the back of women and calling it "Editorial".

Mathematicus posted:

Thanks for the tip.

After looking at RailsAdmin for a while, it looks like it's really just intended to give admin users a quick set of CRUD screens for the app's models that look better than the default scaffold screens. Is that also true of Adminstrate, or does it give you an interface to tackle end-user screens and/or workflow-based screens?

That pretty much sums up Rails Admin. The great thing about it is that if your models/associations are properly made it will make a helpful admin panel without much added work.

The major downside about it is that it's very restrictive and it makes it very painful to add things to it that are outside of the scope of regular CRUD screens.

I will have to give administrate a shot, see if it works better.

xenilk
Apr 17, 2004

ERRYDAY I BE SPLIT-TONING! Honestly, its the only skill I got other than shooting the back of women and calling it "Editorial".
Are any of you using Chef to deploy your VPS? I've been recently been starting to play with it to deploy my VPS in a more elegant/constant manner. If some of you have a repo with your cookbook I'd be curious to look at it and learn from what you guys use.

prom candy
Dec 16, 2005

Only I may dance
Definitely use administrate. The DSL driven CMS tools are great until you want to customize a form, then you're in for some trouble.

There are also hosted CMS solutions like Contentful, the free tier might cover what you need.

Waroduce
Aug 5, 2008
I would like to preface this by saying I have literally never coded anything in my life.

I would also like to note that the scripts I run require and are written with watir-webdriver and highline

During our implementation process we have to do form and document review where we assign signatures which are basically user authorizations to complete and sign forms. This kind of sucks and takes like 2 or 3 hours to get through an entire loving portfolio or chart and all of the god drat signatures. I would like to automate this process and have been googling Ruby on Rails, and Web/Process Automation in order to try and accomplish this. This is entirely web based in a chrome browser through a website that the client and implementation teams interface with. We use ruby scripts to move clients from other software so I know this is possible.

This has led me to two conclusions.

1. I am a loving dumbass
2. I am completely lost.

Conceptually I would like to accomplish this process by handing the client an excel spreadsheet to fill out, and than somehow extract this data and automating the input process. We pop standard baselines with names so they are fairly standardized dependent upon the industry our client is in.

I would like to extract data in the format below:



into our web-based enterprise records system. The client and our staff control this by checking boxes on and off on a web page. The document names are fairly standard however the Signature titles such as Admin, IT, etc change based upon the client. For instance instead of Manager, there may be a user profile that utilized a "Compliance Officer" title. I would update the spreadsheet to reflect the clients custom user titles.


As a curve ball....there are review signatures. I am not sure how complicated this makes what I want to do....

On the webpage we handle signatures and permissions using check boxes. The boxes are checked to denote the user title has the authorization to work on the form or review it.

Through googling and my own research I have realized that I need a big rear end array....that I put smaller arrays that are the forms and their permissions something like...

@document_data = [["Document Title A"="Client OM IT ADM Mngr ACNT", "ADM"], [["Document Title B"="INTAKE ADM ACNT"]]

for the first two.....i think?

I believe that I simply skip whatever is not used, but I want to denote use or non use by using Y or N in the excel spreadsheet....I'm not sure how that translates.

Thank you for listening to this word salad does anyone have any idea where to start with this? or how to extract data in such a format from excel/csv? I can worry about data entry after I accomplish that....

edit: Alternatively, is this some real serious poo poo I should not attempt?

Waroduce fucked around with this message at 05:43 on Nov 29, 2016

EVGA Longoria
Dec 25, 2005

Let's go exploring!

So, that's not a horrible, untenable thing to build. It's probably a good starter project (reminds me of some of my first professional things).

That said, there's a lot you'll have to learn.

1. Ruby doesn't run in the browser. With Ruby, your code is written and runs on a server, which will require administration, and there's some security concerns.
2. The data structure you're looking for isn't Arrays, it's Hashes. Any time you have a Key/Value pair (like Document Name to Document Title A), that's a hash in ruby. You might use an array for the whole collection of them. It would look more something like:
Ruby code:
[
  {
    document_name: 'Document Title A',
    signatures: {
      om: true,
      intake: false,
      it: true,
      adm: false,
      mngr: true,
      acnt: true,
      sale: false
    },
    review_signatures: {
      om: true,
      intake: false,
      it: true,
      adm: false,
      mngr: true,
      acnt: true,
      sale: false
    }
  },
  {
    document_name: 'Document Title 2',
    signatures: {
      om: true,
      intake: false,
      it: true,
      adm: false,
      mngr: true,
      acnt: true,
      sale: false
    },
    review_signatures: {
      om: true,
      intake: false,
      it: true,
      adm: false,
      mngr: true,
      acnt: true,
      sale: false
    }
  }
]
3. Doing it with CSV/Excel like that is going to massively complicate things. Why not just do it in a web interface? It seems like a decently simple CRUD(Create, Read, Update, Delete) application. If you do need to do it in CSV/Excel, there are Gems (Ruby's term for libraries) you can install that will handle converting data structures to file and back.

Don't let it get you down, and ask questions. It's all totally possible.

Waroduce
Aug 5, 2008
OK so I've been working on this and I asked one of our Dev guys for help. He could probably do this in a day, but he sent me some links and I've been writing gibberish for like a week. He said a CRUD is a n go, and a CSV is going to be the best compromise between ease of coding and ease of use for clients.

I'm working off this:



Anyway...so I got this going:

code:
require 'csv'
 
arry = CSV.read('sigs.csv',headers:true).to_a
 

hashes = [ ]
arry.each_with_index do |row, index|
next if index == 0
hashes << Hash[arry[0].zip(row)]
end
 
Pretty proud of that right there...took me like.....literally a week to do that.

anyway i'm not really sure were to go from here.....

so that outputs hashes:

code:
 
=> [{"Name"=>"Title",
  "CD Staff"=>"n",
  "PT Staff"=>"y",
  "CD Review"=>"y",
  "PT Review"=>"n”}]
 
 
hashes.each do |hash|

annnnd I'm not really sure where to go from here....and I don't really get hashes but i know I need something like

if part that y or n == “y”

users << part that is cd/pt/etc (can use gsub(“ Staff”, “”) to get just CD)
end
end

if it has staff it goes under staff, review goes to review. I'm not sure how to like sort that out or code it in, but I can use gsub to remove the "STAFF" portion of the header and than that abbreviation is what appears on our webpage handling user permissions with a checkbox i check on or off to give permission or not.

so..i dunno what to do. I feel like one of those monkeys making GBS threads on a typewriter who pooped out 2 sentences to Shakespeare

prom candy
Dec 16, 2005

Only I may dance
I lost the plot a bit on what you're trying to do. Right now you have an array of hashes like

code:
[
  { "name" => "Title", "CD Staff" => "y", "PT Staff" => "y", "CD Review" => "n", "PT Review" => "n" },
  { "name" => "Title", "CD Staff" => "n", "PT Staff" => "y", "CD Review" => "n", "PT Review" => "y" },
  { "name" => "Title", "CD Staff" => "n", "PT Staff" => "y", "CD Review" => "y", "PT Review" => "y" },
  # ... etc
]
What are you trying to turn this into?

One thing that's really helpful (especially for newer programmers) is flowcharting your program, or just writing out the program in plain language. That might help you figure out what your next step is.

Waroduce
Aug 5, 2008
My whole little summary is a few posts up, but I need to click checkboxes with Y and skip the No ones.

I have staff signatures and review signatures that dictate who can sign and who has access to documents. We dictate this by clicking checkboxes under the abbreviation of someones title like IT, PT, ADMIN, CD etc.

one of my issues is figuring how to sort out Staff and Review signatures though since there are two identical sets of checkboxes with a text box above it saying Staff or Review on our webpage dictating access.


Ask me if you need a more concise explanation if my previous and this post didnt really help

fantastic in plastic
Jun 15, 2007

The Socialist Workers Party's newspaper proved to be a tough sell to downtown businessmen.

Waroduce posted:

annnnd I'm not really sure where to go from here....and I don't really get hashes but i know I need something like

if part that y or n == “y”

users << part that is cd/pt/etc (can use gsub(“ Staff”, “”) to get just CD)
end
end

if it has staff it goes under staff, review goes to review. I'm not sure how to like sort that out or code it in, but I can use gsub to remove the "STAFF" portion of the header and than that abbreviation is what appears on our webpage handling user permissions with a checkbox i check on or off to give permission or not.

so..i dunno what to do. I feel like one of those monkeys making GBS threads on a typewriter who pooped out 2 sentences to Shakespeare

As he lay dying, the last living descendant of the last Aztec high priest whispered:

code:
my_hash = hashes[0]

my_hash.each do |key, value|
  puts key
  puts value
end
If I'm understanding your explanation correctly, I think you've got the right big-picture idea on ways to proceed. The next step is to figure out how to get all of the hashes with a value of "y", then you'll have to figure out some way to parse the keys for their abbreviation and "staffiness"/"reviewiness".

Then you'll have to figure out how to do whatever the end goal for the program is, which I guess is go to a webpage and click particular checkboxes to autofill a form?

Waroduce
Aug 5, 2008

fantastic in plastic posted:

As he lay dying, the last living descendant of the last Aztec high priest whispered:

code:
my_hash = hashes[0]

my_hash.each do |key, value|
  puts key
  puts value
end
If I'm understanding your explanation correctly, I think you've got the right big-picture idea on ways to proceed. The next step is to figure out how to get all of the hashes with a value of "y", then you'll have to figure out some way to parse the keys for their abbreviation and "staffiness"/"reviewiness".

Then you'll have to figure out how to do whatever the end goal for the program is, which I guess is go to a webpage and click particular checkboxes to autofill a form?

Can you explain your code to me in plain English and how it fits into what i've got?

The end goal is yes i need them to click checkboxes for Y.

quote:


During our implementation process we have to do form and document review where we assign signatures which are basically user authorizations to complete and sign forms. This kind of sucks and takes like 2 or 3 hours to get through an entire loving portfolio or chart and all of the god drat signatures. I would like to automate this process and have been googling Ruby on Rails, and Web/Process Automation in order to try and accomplish this. This is entirely web based in a chrome browser through a website that the client and implementation teams interface with. We use ruby scripts to move clients from other software so I know this is possible.

This has led me to two conclusions.

1. I am a loving dumbass
2. I am completely lost.

Conceptually I would like to accomplish this process by handing the client an excel spreadsheet to fill out, and than somehow extract this data and automating the input process. We pop standard baselines with names so they are fairly standardized dependent upon the industry our client is in.

fantastic in plastic
Jun 15, 2007

The Socialist Workers Party's newspaper proved to be a tough sell to downtown businessmen.

Waroduce posted:

Can you explain your code to me in plain English and how it fits into what i've got?

Sure. A hash like

code:
{ "name" => "Title", "CD Staff" => "y", "PT Staff" => "y", "CD Review" => "n", "PT Review" => "n" }
has a bunch of elements, each composed of a "key" and a "value". The key is the bit before the => and the value is the bit after it.

My snippet should let you loop through all of the elements in a hash and print the key and value for each. My intention in posting it was to try to demonstrate that you'd need to read each element and that you can work with the keys and values individually. I apologize if the way I went about it was too opaque; I thought you were a junior dev rather than someone trying to write something for the first time. :)

If you play around with the snippet, you should be able to construct an if-statement which will shovel all of the "y" values into another array of hashes rather than calling puts (which just displays them to the screen).

Then you could do something like loop over that new array, split your keys into, eg, ["PT", "Staff"] and then have some if-statements that do something with that to record which checkboxes need to be checked.

Then you'd have a scraper or something navigate to your website and check things appropriately.

Waroduce
Aug 5, 2008

fantastic in plastic posted:

Sure. A hash like

code:
{ "name" => "Title", "CD Staff" => "y", "PT Staff" => "y", "CD Review" => "n", "PT Review" => "n" }
has a bunch of elements, each composed of a "key" and a "value". The key is the bit before the => and the value is the bit after it.

My snippet should let you loop through all of the elements in a hash and print the key and value for each. My intention in posting it was to try to demonstrate that you'd need to read each element and that you can work with the keys and values individually. I apologize if the way I went about it was too opaque; I thought you were a junior dev rather than someone trying to write something for the first time. :)

If you play around with the snippet, you should be able to construct an if-statement which will shovel all of the "y" values into another array of hashes rather than calling puts (which just displays them to the screen).

Then you could do something like loop over that new array, split your keys into, eg, ["PT", "Staff"] and then have some if-statements that do something with that to record which checkboxes need to be checked.

Then you'd have a scraper or something navigate to your website and check things appropriately.

OK so I would plug your code right below

hashes << Hash[arry[0].zip(row)]

And my output would be all that poo poo there.....?

What are some resources I can use or read regarding if than staements? Basically idk how to code what I need to get to and I've not a background I've just been piecing together what I need as I move along.

EVGA Longoria
Dec 25, 2005

Let's go exploring!

Waroduce posted:

OK so I would plug your code right below

hashes << Hash[arry[0].zip(row)]

And my output would be all that poo poo there.....?

What are some resources I can use or read regarding if than staements? Basically idk how to code what I need to get to and I've not a background I've just been piecing together what I need as I move along.

If/Then/Else is the basic Flow Control statement. Flow Control should get you a lot of useful information, but basically, when you are describing the functionality of your program, whenever there's a condition (if there's a y in the field, for example), that's an if/then/else. They're used for conditional logic. For example:

Ruby code:
x = 7

if x > 10
  puts "Over 10"
elsif x < 5
  puts "Less than 5"
else
  puts "Between 5 and 10"
end
In this case, the program will only run 1 of these 3 Branches of code. First it will check if x is greater than 10, which it's not. So it skips that line, and goes to the elsif (short for else if, which is just another condition that might apply). It checks if x is less than 5, which it's not, so it goes to the next one. This is an else (basically, a catchall -- if nothing else applies, use this).

In your case, your check is going to be comparing to a string 'y'. Using something like what got posted before...

Ruby code:
my_hash = hashes[0]

my_hash.each do |key, value|
  if value == 'y'
    puts "#{ key } is a Y and will need to be checked"
  else
    puts "#{ key } is a N and will not need to be checked"
  end
end
And where the puts statements go, you'd put the logic to check them. This checking part is probably going to be pretty complicated, I'd imagine you'd be using poltergeist/capybara to actually visit the pages/check things.

prom candy
Dec 16, 2005

Only I may dance
I just want to chime in and say that it's awesome that you're getting a start with coding and that you have I think the right-size problem for a new developer, but you would probably benefit greatly at this point from taking a day or two to step back and do some beginner Ruby stuff in order to learn key concepts. That way when you run into a problem you can go "oh okay this reminds me of that other example, where they used a <loop/array/conditional/whatever> to solve the problem."

I like why's poignant guide to ruby (http://poignant.guide/book/chapter-1.html) but there's also CodeAcademy (https://www.codecademy.com/learn/ruby) if you want something less artsy.

xtal
Jan 9, 2011

by Fluffdaddy
Ruby is cool for ad-hoc tasks but if you're investing enough in this to learn a language don't make it Ruby. You might as well start with PHP.

xtal fucked around with this message at 22:35 on Dec 6, 2016

kayakyakr
Feb 16, 2004

Kayak is true

xtal posted:

Ruby is cool for ad-hoc tasks but if you're investing enough in this to learn a language don't make it Ruby. You might as well start with PHP.

Aside from PHP being straight to the browser, I wholeheartedly disagree with this.

Ruby or Python are excellent first languages. PHP is a horrible first language.

prom candy
Dec 16, 2005

Only I may dance

xtal posted:

Ruby is cool for ad-hoc tasks but if you're investing enough in this to learn a language don't make it Ruby. You might as well start with PHP.

What language would you learn first?

KoRMaK
Jul 31, 2012



C++

then ruby or python. Definitely not php - it's ecosystem doesn't re-enforce good patterns.

I came from PHP to ruby and it was such a nice change.

KoRMaK fucked around with this message at 01:02 on Dec 7, 2016

xtal
Jan 9, 2011

by Fluffdaddy

prom candy posted:

What language would you learn first?

A well-rounded programmer should IMHO know something like C, something like Lisp and something like Haskell. So there are lots of good options and lots of ways to get there. None of the options are untyped dynamic scripting languages. Starting with one of those serves to hamstring your understanding of computer science when it comes time to learn something with the performance, concurrency or type-safety that Ruby is unable to provide.

Waroduce
Aug 5, 2008
I have soccer tonight so will look at this later or tomorrow, but I'm not using ruby by choice, it's what we use to run all of our scripts in my department so yeah

Also, I used to be in sales (forgive me) for enterprise content management systems and I rubbed elbows with a lot of CIO/CTO decision maker types who always told me ruby on rails is like the next big thing and there's gunna be a bunch of jobs and they'll pay really well and have some longevity cause it's a rare language both in professional settings at like conventions and poo poo and in more personal settings like cigar bars. I heard this from several fortune 100 companies.

This was like ~1.5-2 years ago so you guys would probably be in a position to tell me if that's actually true

xtal
Jan 9, 2011

by Fluffdaddy

Waroduce posted:

I have soccer tonight so will look at this later or tomorrow, but I'm not using ruby by choice, it's what we use to run all of our scripts in my department so yeah

Also, I used to be in sales (forgive me) for enterprise content management systems and I rubbed elbows with a lot of CIO/CTO decision maker types who always told me ruby on rails is like the next big thing and there's gunna be a bunch of jobs and they'll pay really well and have some longevity cause it's a rare language both in professional settings at like conventions and poo poo and in more personal settings like cigar bars. I heard this from several fortune 100 companies.

This was like ~1.5-2 years ago so you guys would probably be in a position to tell me if that's actually true

2 years ago the hype wagon was deep in Node.js, so your department is behind the times! Now it's all moved to Go.

Peristalsis
Apr 5, 2004
Move along.

xtal posted:

2 years ago the hype wagon was deep in Node.js, so your department is behind the times! Now it's all moved to Go.

It's my (mostly uninformed) impression that, while there will probably be Ruby/Rails jobs for quite a while, RoR has more or less plateaued, and will probably start its long, slow decline in the next few years.

fantastic in plastic
Jun 15, 2007

The Socialist Workers Party's newspaper proved to be a tough sell to downtown businessmen.

Waroduce posted:

I have soccer tonight so will look at this later or tomorrow, but I'm not using ruby by choice, it's what we use to run all of our scripts in my department so yeah

Also, I used to be in sales (forgive me) for enterprise content management systems and I rubbed elbows with a lot of CIO/CTO decision maker types who always told me ruby on rails is like the next big thing and there's gunna be a bunch of jobs and they'll pay really well and have some longevity cause it's a rare language both in professional settings at like conventions and poo poo and in more personal settings like cigar bars. I heard this from several fortune 100 companies.

This was like ~1.5-2 years ago so you guys would probably be in a position to tell me if that's actually true

Ruby on Rails was big 4 years ago. It lets you do a really specific thing (basic CRUD web app/api) really easily if you're willing to adopt the Rails Way To Do Things. A fair amount of consultantware/internal tools/random web APIs are built in it, but of all of the modern web stacks it's among the worst for performance.

It's an unusual framework to know because it isn't, to my knowledge, taught in CS programs. It became popular with Silicon Valley startups and consulting firms. Most of the hardcore Ruby people I know are either self-taught or picked it up by chance on some consulting contract.

KoRMaK
Jul 31, 2012



I've been working on a nodejs project and it's just not as good because the community support isn't there. For example, there's no Devise. There is passport, but it doesn't have a handful of the stuff that Devise offers.


Bummed to hear that it's such a fad out in the wild because I thought the community and The Rails Way were really good for the language/ecosystem/community. It re-enforces good patterns and opensourced common solutions instead of having to roll your own.

xtal
Jan 9, 2011

by Fluffdaddy

KoRMaK posted:

I've been working on a nodejs project and it's just not as good because the community support isn't there. For example, there's no Devise. There is passport, but it doesn't have a handful of the stuff that Devise offers.


Bummed to hear that it's such a fad out in the wild because I thought the community and The Rails Way were really good for the language/ecosystem/community. It re-enforces good patterns and opensourced common solutions instead of having to roll your own.

The problem isn't the Rails Way, it's the Ruby Way. You can surely find MVC REST frameworks for any popular language and some of them are directly based on Rails. Although you should be warned that you'll end up wondering why someone would want to do that.

KoRMaK
Jul 31, 2012



Yea, well I think they both exist: The Rails Way is layered on top of the Ruby Way. I like both of them very much. Why are they bad?

prom candy
Dec 16, 2005

Only I may dance

xtal posted:

A well-rounded programmer should IMHO know something like C, something like Lisp and something like Haskell. So there are lots of good options and lots of ways to get there. None of the options are untyped dynamic scripting languages. Starting with one of those serves to hamstring your understanding of computer science when it comes time to learn something with the performance, concurrency or type-safety that Ruby is unable to provide.

I don't think this is great advice for someone who just wants to learn enough code to automate parts of their job. If you want to do serious programming as a career then yeah sure but this is way overkill for most.

Waroduce
Aug 5, 2008
It would be really cool to get into programming but I'm 27 and maybe too old? Plus...idk what a Junior Dev usually makes but its probably less than me...I don't wanna restart a career path but I'd be super open to learning how to do stuff to help out and pad my bonus

hence this poo poo right here

Sivart13
May 18, 2003
I have neglected to come up with a clever title

KoRMaK posted:

Yea, well I think they both exist: The Rails Way is layered on top of the Ruby Way. I like both of them very much. Why are they bad?
I would take any of these 'Rails is over' sort of opinions with some salt.

Rails is still very popular and used to make a lot of popular websites. Just because some people are writing their backends in Go doesn't mean everyone is.

It's hard to get a picture of how popular anything is in the Grand Scheme of Things, I think we all have our little windows into the world. But my experience tells me even if something is no longer the Most Popular Thing, it may still have a very long tail.

xtal posted:

Ruby is cool for ad-hoc tasks but if you're investing enough in this to learn a language don't make it Ruby. You might as well start with PHP.
Ruby is a great beginner language. C and the like are fine if you're a comp sci person but it's 2016 over here, I'm not gonna malloc an array or whatever unless I have to.

Waroduce posted:

It would be really cool to get into programming but I'm 27 and maybe too old?
  • Maybe in a decade you might be too old to get into programming
  • Talented Junior devs in SF can start at $100k+ out of a bootcamp but this place is a crazy bubble and they really aren't worth that much to the business at the time
  • Programming is cool and it's cool to use it to solve problems. It's especially good to use them to solve mundane business annoyances like the thing you're talking about, though so far I haven't managed to make heads or tails of what you're trying to do from your description.

hailthefish
Oct 24, 2010

Yeah, there's nothing wrong with learning Ruby or Ruby on Rails, and it's pretty easy to self-teach. It's not going to make you an employed-for-life millionaire automagically, but it's not like it's a total waste of your time either. I think the standard Cavern of COBOL advice for newbies is "go learn python" but starting with Ruby, especially since it's already in use where you work, is fine. Also, learning programming by automating actual problems you have is a lot more fun and engaging than workbook exercises in my experience.

Also, don't feel like you had to have been writing assembly in the womb in order to 'learn how to be a programmer'.

Gmaz
Apr 3, 2011

New DLC for Aoe2 is out: Dynasties of India

xtal posted:

A well-rounded programmer should IMHO know something like C, something like Lisp and something like Haskell. So there are lots of good options and lots of ways to get there. None of the options are untyped dynamic scripting languages. Starting with one of those serves to hamstring your understanding of computer science when it comes time to learn something with the performance, concurrency or type-safety that Ruby is unable to provide.
But also learning C is a bad idea if a person will just give up. IMO it's better to start with these untyped dynamic languages (e.g. Python, Ruby) because you'll actually be able to build something quickly and having that feedback loop means A LOT to a newbie. Then after you actually built some stuff it's good to start learning C, when you'll realize how some of the things actually work under the hood.

xtal
Jan 9, 2011

by Fluffdaddy

Gmaz posted:

But also learning C is a bad idea if a person will just give up. IMO it's better to start with these untyped dynamic languages (e.g. Python, Ruby) because you'll actually be able to build something quickly and having that feedback loop means A LOT to a newbie. Then after you actually built some stuff it's good to start learning C, when you'll realize how some of the things actually work under the hood.

C is only one of the languages I mentioned. If untyped dynamic scripting languages are all you're capable of learning you would be more effective in other fields. For those people giving up is the desired goal (my ~10 years of working on commercial Rails apps with idiots has made me tremendously bitter.) Almost all Ruby code I've seen is bad, even that written by professionals, because Ruby makes it easy to do that.

At the same time it's not very nice to poo poo all over Rails in the Rails thread so feel free to ignore this. Clearly Rails has a time and place, imho that is not beginners.

xtal fucked around with this message at 22:12 on Dec 7, 2016

Gmaz
Apr 3, 2011

New DLC for Aoe2 is out: Dynasties of India

quote:

If untyped dynamic scripting languages are all you're capable capable of learning you would be more effective in other fields.

I never wrote that. Just that for a lot of people they might be easier to start with than something lower level like C, that doesn't mean they won't EVER be able to learn C, Haskell or what have you. But they might give up if they start with C, or even start to hate programming if they start with it. I am speaking from my experience and communication with others, that's why I never mention Haskell/LISP cause they're rarely used to teach beginners.

The statement that starting with dynamic languages will somehow make you unable to learn other concepts not present in those languages, is to me ridiculously absolute and I strongly disagree with it.

kayakyakr
Feb 16, 2004

Kayak is true

xtal posted:

C is only one of the languages I mentioned. If untyped dynamic scripting languages are all you're capable capable of learning you would be more effective in other fields. For those people giving up is the desired goal (my ~10 years of working on commercial Rails apps with idiots has made me tremendously bitter.) Almost all Ruby code I've seen is bad, even that written by professionals, because Ruby makes it easy to do that.

At the same time it's not very nice to poo poo all over Rails in the Rails thread so feel free to ignore this. Clearly Rails has a time and place, imho that is not beginners.

You are way too bitter and I totally disagree with your mindset. Ruby & Python are great starting languages because they send you direct to the key concepts of programming rather than the key concepts of programming languages. Just because someone started with C or Haskell or something of that ilk doesn't mean they'll be any better a programmer.

It seems to me that either the companies that you have worked for in your 10 years of rails apps have been doing terrible jobs of either hiring or code review/on-job training.

The fact of the matter is that there are bad programmers in every language, but usually what those people need is just to be caught and trained, not derided.

Adbot
ADBOT LOVES YOU

xtal
Jan 9, 2011

by Fluffdaddy
Sorry for the :can: everyone!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply