brains = [ brain1, brain2, brain3 ]
November 18, 2010 12:46 PM   Subscribe

 
This is fantastic. I've been meaning to dive into rails for a while now, this gives me a great excuse to actually do it.
posted by bhamrick at 12:50 PM on November 18, 2010


Ditto. I'm recently unemployed — time to finally pick up some web coding skills. Thanks, Artw!
posted by defenestration at 12:52 PM on November 18, 2010


You'll have to pry PHP from my cold, dead, hands.
posted by Old'n'Busted at 12:59 PM on November 18, 2010 [2 favorites]


Wait, is this something about Rage?
posted by SmileyChewtrain at 1:07 PM on November 18, 2010


You'll have to pry PHP from my cold, dead, hands.

I'm a PHP developer as well, and I understand that there are great reasons to do both. One of the main reasons I've been curious to learn rails is because some people say learning rails made them better PHP developers.
posted by bhamrick at 1:09 PM on November 18, 2010 [1 favorite]


Ruby on Rails?
Zombies?

What -- no bacon?
posted by PlusDistance at 1:14 PM on November 18, 2010 [8 favorites]


You'll have to pry PHP from my cold, dead, hands.

Not a chance -- in cold, dead hands is right where PHP belongs.
posted by Zed at 1:16 PM on November 18, 2010 [13 favorites]


How amicable is this to people with no coding experience? I keep meaning to pick baby's first programming language to get my feet wet, but also keep getting scared off by not having a very good head for programming logic.
posted by codacorolla at 1:21 PM on November 18, 2010 [1 favorite]


Ruby's a great language and a perfectly good choice for a first language.

Rails is a great honking huge web framework with tons of stuff happening automagically in the background. I'm inclined to say that a Rails project wouldn't be a good choice for an early programming project, and that if you want to understand web programming, you'd do better to start elsewhere to get an understanding of the things Rails does for you automagically.
posted by Zed at 1:28 PM on November 18, 2010


codacorolla, it'd be a mistake to jump right into Rails without learning Ruby -- the language that Rails is written in -- first. Go to tryruby.org first and give that a spin.
posted by the dief at 1:28 PM on November 18, 2010


codacorolla: "I keep meaning to pick baby's first programming language to get my feet wet, but also keep getting scared off by not having a very good head for programming logic."

Take the initial zombie advice and go to tryruby.org/. At that big window asking for the magic ruby code type "help" and follow the advice they give you. It's really quite easy and before you know it you'll actually know some ruby.

On preview ... damn too slow
posted by forforf at 1:34 PM on November 18, 2010


For people with an even more alternative learning style, there is also Why's Poignant Guide to Ruby.

brains.unshift(brain4)
posted by substars at 2:03 PM on November 18, 2010 [2 favorites]


tryruby.org seems pretty buggy. Anyone else having problems with it?
posted by brundlefly at 2:06 PM on November 18, 2010 [1 favorite]


enough with the goddamn zombies
posted by Ratio at 2:08 PM on November 18, 2010 [3 favorites]


nevar
posted by brundlefly at 2:09 PM on November 18, 2010


Yeah, I just closed a tab with tryruby.org in it - after only a few lines in it's throwing up error messages all the time, even though I'm following the instructions exactly and to the character. A shame.
posted by motty at 2:24 PM on November 18, 2010 [1 favorite]


I learned how to program with rails. It's a perfectly good place to start.
posted by empath at 2:27 PM on November 18, 2010


Yeah, I just gave up on it.
posted by brundlefly at 2:27 PM on November 18, 2010


My name's not "Jimmy"...
posted by mmrtnt at 2:46 PM on November 18, 2010


infected = gets.chomp
posted by benzenedream at 2:59 PM on November 18, 2010


fork {loop {}}
posted by Zed at 3:15 PM on November 18, 2010


What -- no bacon?

That's in the Poignant Guide, but it tends to be chunky.
posted by weston at 3:20 PM on November 18, 2010


I'm sure _why was a nice guy and all, but christ, I am tried of the "jokes" he has saddled the Ruby community with.
posted by GuyZero at 4:36 PM on November 18, 2010 [1 favorite]


Maybe he was too and that's the reason he quit.
posted by weston at 5:01 PM on November 18, 2010 [1 favorite]


Won't anyone stick up for Zombie Python's Dying Circus?
posted by JHarris at 6:21 PM on November 18, 2010 [1 favorite]


motty nails it.

IE?
posted by sfts2 at 7:36 PM on November 18, 2010


after only a few lines in it's throwing up error messages all the time, even though I'm following the instructions exactly and to the character.

Yeah, I program Ruby on Rails for a living. It doesn't get any better, trust me :)
posted by word_virus at 7:40 PM on November 18, 2010 [3 favorites]


You'll have to pry code PHP from mywith cold, dead, hands.

PHP for Zombies!
posted by davejay at 8:31 PM on November 18, 2010


after only a few lines in it's throwing up error messages all the time, even though I'm following the instructions exactly and to the character.

Yeah, I program Ruby on Rails for a living. It doesn't get any better, trust me :)
posted by word_virus


This got a chuckle out of me. Been programming web apps since high school, but took a loooong break. Trying to get back into it and sometimes Rails is just baffling, especially when you're used to being involved in every single line that goes into your program...
posted by johnnybeggs at 8:33 PM on November 18, 2010


Ruby's a great language and a perfectly good choice for a first language.

Rails is a great honking huge web framework with tons of stuff happening automagically in the background. I'm inclined to say that a Rails project wouldn't be a good choice for an early programming project, and that if you want to understand web programming, you'd do better to start elsewhere to get an understanding of the things Rails does for you automagically.
Yeah, maybe I'm just behind the times and web frameworks are pretty great. But I feel like if you want to learn to program web apps you should really learn the fundamentals first.
posted by delmoi at 11:32 PM on November 18, 2010


I learned Rails a month ago to attend a workshop on a RoR-based project after being immersed in the Drupal world with its own particular weirdness. Rails reminded me of what web development was like when I was building sites in ColdFusion - lots of boilerplate taken care of for you, but you are thrown back to the world of processing a request on each page, building the page to respond to the request, etc. etc. and having to build the whole site logic yourself. It was refreshing but I've been spoiled by how much Drupal does for you - not to mention the community.

That said, I'd recommend Rails as a good way to learn the important fundamentals of web development.
posted by Space Coyote at 11:56 PM on November 18, 2010


Needs more Jane Austen.
posted by problemspace at 12:30 AM on November 19, 2010 [1 favorite]


But I feel like if you want to learn to program web apps you should really learn the fundamentals first.

People have been saying this kind of thing for years. The problem is there's a kernel of truth to it, but only in certain cases, not as a hard-and-fast rule. When I started building web apps, people tsk-tsk'd when you didn't understand the entire TCP/IP stack. Nerds sometimes need to be reminded the point of programming is not to become one with the machine in a perfect synthesis of human biology and electronic brains, but to get some shit done and then go drink beer.

I am a good programmer because I want to maximize the amount of time I drink beer, not because I am a silicon whisperer.
posted by yerfatma at 5:50 AM on November 19, 2010 [4 favorites]


yerfatma I am on the same page as you are, the reason I think Rails is a good learning environment is because you can get a lot done with it, but you still control the flow of events in a finer way than with a CMS and it gives you more control and I think learn a lot without having to deal with parsing request strings, etc.
posted by Space Coyote at 7:18 AM on November 19, 2010


People have been saying this kind of thing for years. The problem is there's a kernel of truth to it, but only in certain cases, not as a hard-and-fast rule. When I started building web apps, people tsk-tsk'd when you didn't understand the entire TCP/IP stack. Nerds sometimes need to be reminded the point of programming is not to become one with the machine in a perfect synthesis of human biology and electronic brains, but to get some shit done and then go drink beer.

Seconding that. I've been working on picking up Rails for the past few weeks so that I can build shit with it. I don't care if I don't know how the entire thing functions 2 or 3 layers down, all I care about is that it works.
posted by thsmchnekllsfascists at 8:38 AM on November 19, 2010


The one problem I have had with rails is getting has and belongs to many (or has many through) relationships to work the way I want them to. It always feels like an ugly hack no matter how I do it, and its hard to do anything fun that doesn't at least have a few of those kinds of relationships (as in tags, for example)
posted by empath at 8:41 AM on November 19, 2010


Btw, can I drop a random Rails question here?

I have a list of items on a show page, and I want to put them in a 3 column table, and it's easy enough for me to wrap them in the appropriate tags using the cycle command if i want to go left to right, but I want them to fill a column going down, then fill the second column, then fill the third column.

Can anyone think of a way to do that?
posted by empath at 8:46 AM on November 19, 2010


People have been saying this kind of thing for years. The problem is there's a kernel of truth to it, but only in certain cases, not as a hard-and-fast rule. When I started building web apps, people tsk-tsk'd when you didn't understand the entire TCP/IP stack. Nerds sometimes need to be reminded the point of programming is not to become one with the machine in a perfect synthesis of human biology and electronic brains, but to get some shit done and then go drink beer.

You need to at least have a basic understanding of how your underlying DBMS works to be a decent programmer at all. You don't need to know how gratuitous ARPs work or what the ideal table cache size is, but you need to at least know the basics of how a database works. Unless you plan on getting less than 10 records a day.

At my company, we get 10+ million records a day. Which means everything matters. (You wouldn't believe how much the write-cache on the RAID matters. Or the InnoDB buffer pool size.) But even for a small to moderate site, if you don't know the basics like how to properly index your tables for your program's queries, you're going to get bogged down even with just hundreds of entries a day. Active Record is nice, but it's not magic.
posted by kmz at 9:17 AM on November 19, 2010 [2 favorites]


You need to at least have a basic understanding of how your underlying DBMS works to be a decent programmer at all.

My knee-jerk reaction is to agree with you, but I don't know if that's true. As a programmer I (almost) always start with the data design and working with an ORM (I've been working in Django a lot) gives me the hives sometimes (self-link), but I can imagine a few years from now, with improvements in (your favorite) ORM's logic and faster processors/ more memory, that ORM becomes just another layer that people don't have to think about.

Don't get me wrong: looking at the workings of even a nicely-designed ORM is like looking at how sausage is made and I probably drop back to raw SQL twice as much as I need to, but I think you could build useful things without being able to write your own queries. I wouldn't advise it, but I don't think you have to know how to join two tables to build a web app.
posted by yerfatma at 10:05 AM on November 19, 2010


empath:

Take a look at ActiveSupport's in_groups_of, so something like this.
posted by Jeff_Larson at 7:54 AM on November 20, 2010


The problem is there's a kernel of truth to it, but only in certain cases, not as a hard-and-fast rule. When I started building web apps, people tsk-tsk'd when you didn't understand the entire TCP/IP stack.
The problem here is that TCP is, for the most part perfect. It will never fail on you, unless you have bad hardware somewhere. From the perspective of the web developer, you just don't need to worry about it. It will always be there for you.

HTTP itself is ridiculously simple, given the time investment needed, it's really worthwhile to know the difference between request headers, URL parameters and the POST content.

The problem is that once you get into database connections and web server configurations and stuff like that it can go wrong. Once things become rock solid and infallible, you can ignore them. But as long as things can go wrong it's important to understand what it's supposed to be doing.
My knee-jerk reaction is to agree with you, but I don't know if that's true. As a programmer I (almost) always start with the data design and working with an ORM
I kind of just think ORM is a bad idea. I've tried to use it and ran into weird issues once the DBs got huge. A much better idea is using NoSQL style databases if you don't need to do actual queries. If you can control exactly how indexes are used, instead of being at the mercy of the DB I think it's much easier to control. I've never done anything in ruby, though.
posted by delmoi at 10:22 AM on November 21, 2010


I kind of just think ORM is a bad idea.

Maybe a really bad idea: Obect-Relational Mapping is the Vietnam of Computer Science.

(Jeff Atwood agrees and throws in objects are overrated to boot.)
posted by weston at 11:15 AM on November 21, 2010 [1 favorite]


Objects are overrated, but that says more about their rating than about objects.
posted by Zed at 12:17 PM on November 21, 2010


The problem here is that TCP is, for the most part perfect. It will never fail on you, unless you have bad hardware somewhere. From the perspective of the web developer, you just don't need to worry about it. It will always be there for you.

Heh. Except when you have an mtu mismatch. Or there's a routing problem at your ISP, or your firewall access list is borked up, etc, etc. If you're going to be in web development, you probably don't need to be a cisco engineer, but you do need to know how the underlying protocols work. Because when your client calls in and tells you your webserver is down. Or you need to call your ISP to ask why your webserver isn't working, you're going to need to know what you're talking about.
posted by empath at 5:37 PM on November 21, 2010


« Older Beyond the Black Rainbow   |   Will who blend? Newer »


This thread has been archived and is closed to new comments