Hacker News new | past | comments | ask | show | jobs | submit login
Start Web development?
4 points by LM2234 on July 15, 2010 | hide | past | favorite | 6 comments
Hi, so I am a high school student. I have background mostly in electronics. Most of my programming so far has been at the embedded system level with C, assembly, or any AVR, PIC microcontroller.

Now I want to learn real web development to design websites with dynamic content. I know html, so that is not enough. I am thinking of starting with ruby on rails. To my understanding ruby can handle databases and scripting (correct me if I am wrong). I chose ruby over javascript,php,or MySQL, because I could get a website going much faster with less time invested in learning so many languages.

so would this be a good choice? or should I try something else?

-Thanks in advance for your responses




Ruby is a good choice, but be aware that Ruby is the language and Rails is a web framework for Ruby (and by no means the only one, but probably the most popular and perhaps beginner-friendly).

An alternative would be Python, which is a more or less similar language to Ruby (in the grand scheme of things), and which has its own web frameworks, such as Django, which is also very beginner-friendly.

I've tried both, and found Django much easier to get into than Rails (Django's documentation is famously excellent), but other people have the exact opposite experience.

Certainly in either case you should spend some time learning the language - ruby or python - before even starting with the web framework. Otherwise you'll find things very difficult. Just get to the level where you can create some simple programs to do what you want to do. Project Euler is a good collection of puzzles you can work through (you don't have to do all of them) to become literate.

Start with a language tutorial. For Python this would be Dive Into Python or the official Python tutorial. For Ruby there are tutorials such as Try Ruby.


Ruby on Rails is indeed a good choice. So is Django, although I prefer Rails myself. You'll eventually have to figure out some SQL, so let Rails help you, but don't be afraid to dive in and figure out what's happening underneath. Oh, and Postgres is a nicer DB system.

Javascript is something else you'll eventually want to learn, but Rails is once again, a reasonable starting point.


> Javascript is something else you'll eventually want to learn, but Rails is once again, a reasonable starting point.

How about JavaScript for both the client and the server?


I think that node.js is still likely a bit immature for that. Rails, at this point in time, is just going to give you a much larger array of possibilities.


I would be more than happy to sling e-mails back and forth with you on this, as I was in your same place a few years back. If you're interested in connecting, take a look at my Hacker News profile and go to the "stalky links" page, and you can get my e-mail.

Anyway, I'd strongly recommend that you do three things.

1) Check out Meetup.com or various Ruby forums to find out if there's a Ruby / Rails Group in your geographic area. Go to the meetings, meet the people there, and begin to build a local network of support. 2) Try to find out if there are any web dev shops in your area. Even with your limited experience, you might still be able to score a gofer position that just lets you be in the office. As you're there, you could begin sitting in on coding (observing a pair programming session, or even riding shotgun in the session), and eventually taking on small projects with a code review from someone who knows what they're doing. 3) Start a blog, where you document the issues you run into, the solutions you develop, the resources you find useful, and the discoveries you make.

To the specifics you asked about, yes, Ruby does handle databases. It allows you to connect with various types of databases and make various calls to put stuff into the database and get stuff out of the database. I'm not entirely sure what you mean by "scripting", but if you mean simply writing small bits of code (methods) that can be called from other methods and that can take input, process it, and give you output, then, yes, Ruby does that.

As nudge mentioned (and as you probably know?), Ruby is the programming language, Rails is a library of pre-written Ruby code that shortens development time. With your background, you might prefer learning Ruby first, but a lot of web programmers (like me) were attracted to Ruby because Rails let them get going quickly with projects. A lot of the database connections and other fiddly bits are taken care of for you. I'd encourage you to focus on learning Rails first, in the same way that I'll encourage you in a minute to become familiar with jQuery, rather than learning javascript. More on that in a sec.

Rails does have some danger zones, though. First, you have to learn some Rails-specific code (the names of helper methods and so on), which might not work outside of Rails, and which might confuse you if you try other Ruby frameworks (Sinatra is another framework). Second, because Rails abstracts a lot of the code, you won't necessarily know what's going on behind the scenes. If your goal is to become a master programmer, that could be bad. If your goal is to make stuff, it's not a bad thing at all, as you'll have time to learn what's in the black box down the road. Third, Rails evolves quickly, and if you're getting started now, you'll find a lot of old Rails tutorials that simply won't make sense, and that won't work with new-ish versions of Rails code. Be wary of any Rails tutorial older than about 6 months. Ruby-heavy tutorials are safer, as Ruby doesn't change a lot. But if the tutorial doesn't specifically mention Rails 2.3.x or Rails 3.0, it might be a bit of a gamble. This is exponentially true for books about learning Rails. Unless the book says "Rails 3.0" on the cover (and I doubt any of them do, as Rails 3.0 isn't even out in its final form yet), don't buy them. Borrow them from the library or a friend. Oh ... one book would be http://railstutorial.org/, although I haven't actually read it.

You also mentioned that you won't need to learn javascript. Your best bet here is to become familiar with jQuery. jQuery is like Rails, in that it's a bunch of pre-written code that lets you do stuff quickly. Want to set up tabs that hide/display info? Want to play with dynamic updates to your site without reloading the entire page? Want a pop-over box to fade into place when the user clicks on a link? jQuery's your huckleberry.

A few really good resources (and I'm sure others can add to this): - Ryan Bates's Railscasts series of tutorials - StackOverflow (holy cats is this site useful) - http://guides.rubyonrails.org - http://github.com (if you're using Rails, you'll need to know about Github soon enough, whether you post projects there or simply read others' code)

There are a few e-books online that teach Rails and Ruby. For Rails, check out http://railstutorial.org/. For Ruby, go to http://pine.fm/LearnToProgram/.

In terms of hosting your projects online, you'll probably be fine with a basic account at DreamHost (who I love). I also host at MediaTemple (who I can't recommend) and SliceHost (who I can). I've also heard a lot about Linode. But with SliceHost and Linode, you'll also be getting into server management and super-basic sysadmin stuff. Since your goal is to learn web programming, I wouldn't worry about that stuff just yet. I'd steer you towards DreamHost. I don't get a kickback for that, although I do have some kind of referral code thingy that I can give you if you'd like to use it. :)

As I mentioned above, if you want to e-mail me for help getting started, or for other random advice, just go to my "stalky links" page from my profile and you'll find my e-mail. I'd be happy to chat more.


Thanks so much for the comment is ultra useful, so I am starting rails. I hopefully can put something together by the end of summer




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: