Earlier quoted context omitted.
Over and over and over, I've made this same recommendation when someone is new to the art and is banging on the Rails train: Do PHP first. You have nothing to lose learning PHP. I love Rails, but I use PHP in a pinch. Hell, even DHH said he fired up PHP recently and liked how quickly he could wire up small bits. Rails is too magical and mystical. If you don't understand the lifecycle of web requests, you are going to…
Why not do "Ruby sans Rails" instead? You can keep the Ruby experience, but get all of the lower-level request/response experience you like. Ruby is a good language for CGI programming.
Ask HN: Web Fundamentals for a Newb
21–30 of 30 posts
Re: Ask HN: Web Fundamentals for a Newb
#22In general, you always have to take into account the Law of Leaky Abstractions ( http://www.joelonsoftware.com/articles/LeakyAbstractions.htm... ). No matter how convenient a new abstraction might make things, it will some day "leak". If you don't know anything about the layer underneath, at that point, you're pretty shafted. Some abstractions are more leaky than others. ActiveRecord is a very leaky abstraction. Make…
Essentially, any web framework or web programming is a way to give a GUI front end to your database. Learn the database layer, learn how to write sql, learn how to break down your problem into a database model, and be able to think about it in terms of rows and columns in a database.
All the database stuff that you learn is going to scale pretty linearly with any type of web application that you're doing. That is, the more database stuff that you learn the more you're going to know about web programming.
Re: Ask HN: Web Fundamentals for a Newb
#23In general, you always have to take into account the Law of Leaky Abstractions ( http://www.joelonsoftware.com/articles/LeakyAbstractions.htm... ). No matter how convenient a new abstraction might make things, it will some day "leak". If you don't know anything about the layer underneath, at that point, you're pretty shafted. Some abstractions are more leaky than others. ActiveRecord is a very leaky abstraction. Make…
Good points, but you made that sound kind of complicated. Here's an example of a Leaky Abstraction. My programming language is called Ben (hey that's my name!) -- # build_webpage() Tada. Fire up your browser, point it to localhost and bam! you have your own personal webpage with a photo section and a forum. See how easy it was. Then you think to yourself, wait -- I want a classified ads section, too! Ah, this is when…
Re: Ask HN: Web Fundamentals for a Newb
#24Earlier quoted context omitted.
Good points, but you made that sound kind of complicated. Here's an example of a Leaky Abstraction. My programming language is called Ben (hey that's my name!) -- # build_webpage() Tada. Fire up your browser, point it to localhost and bam! you have your own personal webpage with a photo section and a forum. See how easy it was. Then you think to yourself, wait -- I want a classified ads section, too! Ah, this is when…
What point are you trying to make here? That using frameworks is bad because they won't magically solve all your problems? That no magic fix exists? That everybody should use PHP? That C is a bad language for writing a web programming DSL?
>>The amateur software engineer is always in search of magic, some sensa-tional method or tool whose application promises to render software development trivial. It is the mark of the professional software engineer to know that no such panacea exists. Amateurs often want to follow cook-book steps; professionals know that such approaches to development usually lead to inept design products, born of a progression of lies, and behind which developers can shield themselves from accepting responsi-bility for earlier misguided decisions. The amateur software engineer either ignores documentation altogether or follows a process that is docu-mentation-driven, worrying more about how these paper products look to the customer than about the substance they contain. The professional acknowledges the importance of creating certain documents but never does so at the expense of making sensible architectural innovations. The process of object-oriented analysis and design cannot be described in a cookbook, yet it is sufficiently well defined as to offer a predictable and repeatable process for the mature software development organization.
Frameworks are just fine, tools are just fine, any language is just fine. It is all about the skill of the person using it. I have seen good PHP code. I have seen bad Python code. It is about the developer, their understanding and how much they can handle of the system. If a framework lessens what they need to know to something they can manage at their level then it will work.
The job of a good engineer, is to take something complex and make it simple. So there are and will always be great tools to help people get better and the best will dig deeper and after 8-10 years it seems like most of the marketing and b.s. and jungle of software starts to come clear.
Re: Ask HN: Web Fundamentals for a Newb
#25Anyway, the rule of thumb is... if critical code can't be executed without starting a web server, your app is designed wrong. (I've seen developers that write all their tests in Selenium. This is a huge waste of time; make sure you can test the backend code without making web requests. Only use Selenium to test JavaScript! Even then, Test::More from the JSAN is quicker.)
I've given lots of talks about this, if you want more details. Here is a web-specific one:
http://www.jrock.us/fp2008/catalyst/start.html
(left click to advance the slideshow)
Here is a non-web-specific one: http://www.jrock.us/ppw2007/testmore/testmore.txt
If you want to see it as a slideshow, try this:
http://www.jrock.us/ppw2007/testmore/takahashi.xul?data=test...
but on my machine, recent versions of firefox seem to not execute takahashi.xul correctly. So just read the text file ;)
Anyway, have fun.
Re: Ask HN: Web Fundamentals for a Newb
#26Earlier quoted context omitted.
Over and over and over, I've made this same recommendation when someone is new to the art and is banging on the Rails train: Do PHP first. You have nothing to lose learning PHP. I love Rails, but I use PHP in a pinch. Hell, even DHH said he fired up PHP recently and liked how quickly he could wire up small bits. Rails is too magical and mystical. If you don't understand the lifecycle of web requests, you are going to…
I am reluctant to do PHP because of time contraints. I am working on this stuff after work, and at some point I would like to actually be able to build something. Anything. When someone says do PHP, my visceral reaction is no. However, if the experts here think that PHP would be a worthwhile detour even though I plan to go with Rails, then I'll go with that. I guess I'd just like some assurance that I can pick up the…
Re: Ask HN: Web Fundamentals for a Newb
#27Earlier quoted context omitted.
Over and over and over, I've made this same recommendation when someone is new to the art and is banging on the Rails train: Do PHP first. You have nothing to lose learning PHP. I love Rails, but I use PHP in a pinch. Hell, even DHH said he fired up PHP recently and liked how quickly he could wire up small bits. Rails is too magical and mystical. If you don't understand the lifecycle of web requests, you are going to…
I am reluctant to do PHP because of time contraints. I am working on this stuff after work, and at some point I would like to actually be able to build something. Anything. When someone says do PHP, my visceral reaction is no. However, if the experts here think that PHP would be a worthwhile detour even though I plan to go with Rails, then I'll go with that. I guess I'd just like some assurance that I can pick up the…
If you're familiar with a C-based programming language, then PHP will be very fast to pick up. And, if you want to "actually be able to build something," with PHP you'll absolutely at least feel like you can haha.
Re: Ask HN: Web Fundamentals for a Newb
#28There's your problem number one - trying to use and excel at Rails without understanding Ruby means that even if you become a moderately proficient Rails user, you won't know what you're doing, and will be unable to process past something you have a cookbook answer for. You can drive a car without understanding how an engine works (and assume that when you press the pedal down, "magic happens" and you accelerate), but to become a great driver you have to understand what makes the car go, and how to react to and optimize your behaviors for that.
Ruby is a language that does more than Rails. Rails is a framework that's written in Ruby.
Learn the language first; then you'll know what's actually happening with Rails and what those commands mean. Net result is that you'll be a better Rails user, and you'll be able to use Ruby for many other things and in novel ways.
Separately, learn about database normalization and design. For this, start with the mantra "down, not across" - your tables should be much longer than they are wide, even if this means multiple tables.
Re: Ask HN: Web Fundamentals for a Newb
#29>> I am attempting to teach myself Rails and have also made a concerted effort to understand Ruby. There's your problem number one - trying to use and excel at Rails without understanding Ruby means that even if you become a moderately proficient Rails user, you won't know what you're doing, and will be unable to process past something you have a cookbook answer for. You can drive a car without understanding how an e…
Also recommended: the ruby/metaprogramming chapters in Ediger's "Advanced Rails" (oreilly) and Rappin's "Professional Rails" (Wrox). All excellent resources
Also, for javascript/ ajax: Flanagan's JS reference, and Crockford's "JS, the Good parts"
Re: Ask HN: Web Fundamentals for a Newb
#30I'm in somewhat the same boat as you, except using python and django. I've found this book to be pretty helpful in terms of a general understanding of web programming: http://philip.greenspun.com/seia/