Topic: Where to begin?

I've had a deep seated desire to become a computer programmer for most of my life. I just never did anything with it. Well I'm tired of sitting around wishing. I want to do something.

So I'm coming at this as a super noob. I've coded C++ in college when I got my EE degree but that was years ago. I love the idea of web app development and from all the research I've done it seems like RoR is a great place to go to do some cool things.

So where does a guy begin? I'm sure there's been another thread discussing this but I couldn't find one.

Books? Sites? Communities? I have an idea for a project but I just have no idea where to begin.

Re: Where to begin?

First of all get a book (pdf format is essential, hard copy a nice to have) called AWDWR (Agile Web Development for Rails) from here … with-rails
the 4th edition is in BETA format and covers Rails 3. The fact that it's a BETA edition means that they are in the process (Pretty much complete) of bringing it up to date with Rails 3 and you get new editions of the pdf when they release an update.

Once you have had a play with the Depot app (It's an awesome tutorial and ideal for beginners and advanced programmers alike) then have a look at the Rails Casts by Ryan Bates.
A suoerb source of info for snippets of info on how to do stuff with Rails.

Obviously come back here if you need any further help

Oh.. And don't forget the api docs.
In fact you can find links to most of these resources on the official website here

You have definitely chosen the best web development tool with Rails and when you get seriously into it you can do some real programming with Ruby smile

Hope that helps

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: Where to begin?

Thanks James. I appreciate it. Any other books you would recommend once I move on from AWDWR?

Re: Where to begin?

STICK WITH AWDWR but if you really want to know more then read on....

Well Programming Ruby 1.9 (AKA the pickaxe book also from the pragmatic bookstore) is the next one to get. This with AWDWR are the definitive books for anything to with Ruby and RoR and will quickly become your bibles. You don't need the programming Ruby book just yet but I'd recommend getting it ASAP. It's more of a programming guide for Ruby than a tutorial and is not a book for beginners but as soon as you start asking how to deal with array's, hash's File I/O, RegEXP (The list goes on and on...) then that's the time to start looking at the Pickaxe book.

PLEASE PLEASE PLEASE Read the WHOLE AWDWR book and not just the Depot app bit. A mistake a lot of people make is to code the depot app as they read and then never look any further when in fact the Depot app tutorial is only half the book and only half the story. You'll benefit hugely from the rest of the book.

Any other books will largely depend on what you really want/need to know about programming in general, database design, UML (Unified Model Language for OO software design), ERM (Entity Relationship Modelling), the list goes on and is HUGE but by the time you realise you want to know more you will know what it is you need to know about and then you can ask for recommendations on what book to get for specific subjects.

Having said that, Martin Fowler has published a lot of programming concept books and is generally well regarded.

But seriously, you have an awefull lot to get your head round and you are going to be on such a massive learning curve that AWDWR will keep you going for the next few months and proabably longer if you decide to re-code the depot app a few times just to get familiar with everything (Well worth doing this. I have 20 yeears programming experience in a large number of languages (Ruby and RoR are my favourite) and it took me 3 iterations of the depot app to get confortable with the environment).

If it helps as a starting point I'll outline my setup,
I have netbeans as my IDE.
I have used this under Windows XP successfully for a year after switching from Aptana Studio (AS)
AS was great when I first started until I found netbeans which is waay better IMO
I ditched windows XP last year when my HDD gave up on me. I decided it was time to upgrade but Vista and windows 7 had a price tag I didn't want to pay so I now run Ubuntu Linux very happily and miss nothing about windows at all.
Both Netbeans and AS run very happily on Linux, OSX Snow Leopard and Windows.

There are other IDE's but these are the main ones.
If you don't like the idea of an IDE (Integrated Development Environment) and prefer to work using a text editor and you are lucky enough to own a Mac then Text Mate is the editor of choice, there are clones for other OS's but I seriously recommend you get your head round Netbeans first.

I use Firefox and Google Chrome as my browser and test in each.
Get firefox and install the SQLite plugn and the Firebug plugin and make use of the right click inspect element option in both browsers (Firebug is needed for firefox but google Chrome has this already installed.)
The above is an invaluable tool for working out styling etc... as it gives you live editing effects.

I use Capistrano for site deployments (Also covered in AWDWR) I use git as the ultimate version control system and host on both github and sourcerepo (google them) and I can highly recommend RailsPlayground (Again google them) as a host when you are finally ready to move your app into the real world.

I use both SQLite3 and MySQL, you don't need MySQL on your machine as SQLite is more than adequate for development purposes but it will help you immensely when it comes to hosting if you get familiar with MySQL sooner rather than later as it will undoubtedly be the DBMS that you will use in production.

rails gems...
I won't cover the ones I need/use except to mention that I use JQuery in preference to the built in Rails AJAX stuff for AJAXifying my websites.

Other references.
AWDWR Deals with Rails, pickaxe deals with Ruby but neither deal with HTML and CSS.
You will find the W3Schools site invaluable for this as you have to learn about styling your HTML (colours, layout, font's and a million other things).
It's a totally ridiculously huge site and don't expect to be able to find what you are looking for just by navigating around so here are some specific links to point you in the right direction
The above are ESSENTIAL reading if you really want to understand what a website is and how to write one

You don't need to know too much about this for AWDWR as the very basics are covered, but you really will need to know a lot more as soon as you start your own real world fun.

That's a lot of info and I hope it hasn't given you a headache.

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: Where to begin?

That's awesome. Thank you so much. I was just going to ask you what tools I was going to need to get started with the AWDWR book. I have a nice powerful Windows 7 system that I'll stick with for now. I have Ubuntu running on an older laptop which is my portable machine. I've done some HTML and CSS coding, but very minimal. Just enough to display some static images and text with links for our company's website. So I have a very brief understanding of that. Glad to hear somebody with 20 years experience told me that Ruby on Rails is the way to go.

Funny, I got inspired to do this because I read 37 Signal's book "Rework" as well as listening to various tech podcasts as I've always been a tech junkie. I got sick of hearing how much everybody loved their jobs and want that same feeling. Might as well build a foundation now, you know?

Re: Where to begin?

Almost forgot. When I decided to learn more about how to use an iPhone or Windows 7, etc. I subscribed to podcasts and blogs. Any recommendations for podcasts and/or blogs related to Ruby and RoR?

Re: Where to begin?

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: Where to begin?

I've never thought of AWDWR as a good starter book.     There are no Rails 3 versions of these books, but I always thought that SitePoint's Simply Rails (based on Rails 2.0.2) and O'Reily's Head First Rails (based on Rails 2.1 I believe) were the best two books for someone totally new.

IMHO the best thing by far you could do is ignore everything else and focus and going through these to classes (will cost you $25 for a month of

Ruby Essential Training 

Ruby on Rails 3 Essential Training

Having dual monitors helps a lot (one for the video and one for your editor/browser).

Re: Where to begin?

Phil, your info is very out of date and there is one big flaw.
Those resources do not cover Rails 3 and it's hard enough learning everything once never mind learning totally out of date stuff. Sorry but that's really bad advice.

There are no Rails 3 versions of these books,

Yes there are, as I state in my first response

AWDWR (Agile Web Development for Rails) from here … with-rails
the 4th edition is in BETA format and covers Rails 3

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: Where to begin?

Appreciate the help. I do use dual monitors. Have my Netbeans running in one and my Agile Web Development for Rails open in the other. So far so good. I only have a spare hour here or there so it's going slow but it's going well. I'm getting it, which is always exciting. This language is SO much easier than C++. That was awful! But then again when you're writing drivers for hardware devices that interface with a PC, C++ is about your only choice (at least it was 6 years ago).

I was debating blogging my experience of learning RoR. I'm sure this has been done a thousand times before. Maybe my time would be better served to just focus on learning...

Re: Where to begin?

James (check), I was just meaning to point out that in my opinon AWDWR is not a good book to start with.   I know Simply Rails and Headfirst Rails are no longer valid, but when they were, they were so much better starter books than AWDWR.    I seriously believe AWDWR is the 2nd book you should read, not the first.

I'll stick by the point that IMHO the Ruby and Rails 3 video courses are the best way to start out right now...     

Blogging is worth it.   You may help someone along the way and there's no better way to sink in what you're learning than explaining it to someone else.   I don't know if it just forces you to think about what you're learning or if it's just forcing you to put what you're learning into your own words, but teaching someone else (though blogs or whatever), is maybe the best way I've ever learned anything really well.   Also, Rails 3 is still really new.   The more blogs about it, the better

Last edited by Phil (2010-12-13 16:05:14)

Re: Where to begin?

Thanks Phil! You're right on about teaching others helps you to teach yourself. I never learned so much in my life about the machines I work on every single day until I had to start training people on how to use them.

I've been reading the book James recommended and yeah, it's crazy overwhelming. But that's how learning C++ felt but I got the hang of it. I'll check out those video sites to see if they can supplement my learning process from AWDWR.

While I was writing this message I setup a blog on tubmlr.

We'll see how this goes! Thanks everybody.

Re: Where to begin?

I'm feeling so overwhelmed now. I've gotten to the part where the AWDWR book is recommending that I use git as a tool for Version Control. Huh? What on earth is git? I looked it up but I still don't know how to use the darn thing.

Re: Where to begin?

Git is a version control tool.
In theory
Good version control software essentially allows you to very easily make changes to your code, copy those changes and get back to any changes you have copied previously copied. Version control systems are also invaluable in team development environments where potentially multiple developers can be working on the same file for different reasons at the same time to implemet different functionality.
In fact
Version control systems vary in their effectiveness and usability. Git is just about the best you can get closely followed by subversion.
There are rails gems for the more common VC Libraries including both of the above.

Why is Version control important?
Although many new developers do this, you'd be absolutely off your head to deploy a live app directly from you current source code.
repository (folder)
Scenario without version control
I copy my source code from my dev box to my production server and my latest ode is now live
I spend a couple of days working on some new functinality that is absolutely not ready for release as it is totally incomplete that I plan to release next week.
I get a report that there is a serious security flaw in my live application. Something that my tests missed, and customers are able to see each others accounts.
I find the problem and it's 3 or 4 hours of work to fix and I need to release it NOW!
What do I do?
I have to either grab a copy of the live code and apply the fix then make the same changes to the code I'm working on that has the new functionality in it so that the change doesn't get lost when I release the new functions thereby making the same changes twice and risk making mistakes
I have to somehow disable the new functionality and apply the fix to my current code so I can release that.
Both options are less than ideal and in comes version control

Version control systems have branches. Think of a branch as a folder called by the name of your branch that contains a complete copy of your code at the point when you last did a commit. (The reality is somewhat different and varies between VC Sytems but at this stage the reality is largely irrelevant)

For scenario 1
You commit your changes to the master repository on your local PC,  push the master branch out to a remote repository and capistrano will deploy from there
6 command line calls and you are done

git add .
git commit -am "My first release"
git push
cap deploy:setup(Only for the first ever deployment to your host)
cap deploy
cap deploy:migrate

Job done!
create a new branch and start your new function
git checkout "my_new_function"
spend your 3 days working on your new function, commiting it to your new branch then you get the bug report
Just switch back to the master branch (commiting any unsaved changes to your new function branch first)
fix the bug, test and commit to the master branch, push your changes out and deploy.

Now you switch back to your new function branch and carry on with the new function that you are writing.
But you have code in the master branch that is needed and is no longer available to the new function so what do you do?
When your new function is ready you just merge your "my_new_function" branch back into your master branch, check for any conflicts that may have occured and your done.

It all sounds really complex and scary, in fact if putting an app into a live production environment does not scare you then the app either isn't very usable or you are made of stone! You SHOULD be scared! Well a little bit anyway smile

Git and capistrano makes all this really really really really easy to cope with so rather than being scared you can continue on in the certain confortable knowledge that so long as you apply a little care and thought to what you are doing you can cope with anything!

At the end of the day it's all about choosing the right tools for the job and recognising that when things go wrong it's not the tools fault!

Just follow AWDWR and it'll explain what you need to do to get started with and how to set it all up
Hope that makes sense.

p.s. And don't think it won't happen to you. It will!

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: Where to begin?

Thanks James. Great breakdown. But I still don't know how to use it. And sadly AWDWR does not explain how to use it either. They more or less assume you've already used it and are familiar with it. They just tell you "Hey now's a good time to use git"

Any resources you can point me to on how exactly to get this installed (is it something you install) use it, and then access the different versions of your software that it creates?

Re: Where to begin?

Ok, getting git set up in the first place is simple enough, in fact I think that it may be installed as part of the Rails 3 setup but I'm not sure as I already had everything set up manually when using rails 2 before upgrading.
To find out if you need to intall git just issue a git command from your command line. Just open up a command prompt and type in the word git.
If all is good you will get an output displaying a list of all the git commands available to use.
If not then you can install git.
As you are using windows then you need the mysis git version which can be found here
complete with full instructions on how to install.

Once you have git installed (It's free and open source written by Linus Torvaulds and only takes a couple of minuites to do) you can then just use it.
Things get a little more complex when it comes to pushing out to a remote server ready to work with capistrano especially as you are on Windows I'll come back to that
Anyway, how to use it

Theres a section in AWDWR called "Prepping Your Deployment Server" (round about page 247 on the latest release of the pdf) tells you all you need to know except that you need a remote repository.

you can use github for this if you want a free and public repository or you can set your own up. I use sourcerepo as I get a free sourcerepo account with my Rails host.

The thing to remember is that although all this is new to you and you have a huge learning curve to understand what you are doing the actual implementation is really really simple and it's very easy to look for complexities that just do not exist. The reason for this is that the subject is highly complex and much deeper than I could possibly explain in a post here but the tools are soooo good that the complexity becomes almost invisible. I say almost because there will be a time when you need to delve a little deeper but for every day stuff the tools really are so simple to use, it's a crime not to use them and IMHO should be mandatory and indeed, capistrano takes exactly that attitude and won't deploy an app for you unless you have version control set up.

I guess that should be enough info for you to get started with and at the very least should give you enough of a starter to enable you to ask specific questions if you have any more difficulty.
I won't be around much over Christmas so you might be better off posting any questions you have in a new thread so someone else can pick up on them but by all means post in here if you want and I'll get back to you as soon as I can.

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: Where to begin?

How can a site be promoted?I need some help!

seo service
upper seo