Ask HN: Should I Learn Ruby?
About me: Recent Eng/Biz grad, want to eventually start my own company. I am much more of a business person than an engineer, yet having graduated from a top ten engineering school, I realize the value of understanding tech no matter what part of a startup you work on.
Because I am interested in the web tech space, I think it would be a valuable experience for me to take 6 week online crash course in Ruby in order for me to 1) be conversant in a very popular language in this space and 2) have the ability to do very rough mockups of product ideas, or at least understand what goes into building them, and 3) become more generally aware of peripheral issues in web tech and what goes into the development process.
I have taken C++ classes in the past (no HTML or CSS experience though), so programming itself is not new to me and I have no illusions about becoming some mad awesome programmer in a couple of weeks. I’m simply looking for a new perspective in seeking out and solving entrepreneurial problems.
I’d love to get some perspective from actual programmers and startup people on wisdom or tomfoolery of this idea. I am leaning towards going for it at this point, but might be dissuaded if the reasons are strong, or if better uses of my free time are proposed.
For the record, the class is cheap (<$100) and is geared to beginners.
I’m all ears.
111 comments
[ 2.9 ms ] story [ 172 ms ] threadBesides, you might end up making new friends and contacts.
But at another level there are other compelling arguments... Like you said, understanding technology and the way web sites and web apps are put together is useful.
But here's another thought: if you keep learning after the course ends and can put some Ruby on Rails code together you'll always be able to find work as a junior developer (or better, if you are good) somewhere - the industry is desperate for more bodies.
Now I'm sure my fellow co-founders and startup entrepreneurs will comment that we really need highly talented engineers, but realistically we just need more people across the board right now who can code well and so that means a much lesser chance of being out of work for those who have these skills.
From the individual's perspective I think that is valuable in this economy, esp if the area you really want to work in is suffering job wise.
Thanks for the perspective!
http://mislav.uniqpath.com/poignant-guide/
The Ruby ecosystem is very rich. You don't need a $100 course to learn the language, though it might help to provide motivation.
[1] http://docs.djangoproject.com/en/1.2/intro/tutorial01/ Best tutorial and documentation I've read in a while. If you get stuck somewhere google it.
Must have:
- HTML
- CSS
- Ruby
- Ruby on Rails
Really nice to have:
- JavaScript / jQuery (or similar)
- SQL / Database design
Nice to have:
- Git (Revision control system)
- RSpec or similar (Ruby testing)
You don't need to learn everything tomorrow, but I laid out sort of a roadmap of things you may want to focus on.
PS: Can you provide us with a link to the course?
Here's the course description I was looking at. I haven't really looked anywhere else but I'm sure there are more out there.
http://www.ed2go.com/monroe/online_course/rby/detail/Introdu...
I mean it's nice that rails can generate an "hello world" app without writing a line of code, I think you'll learn more about programming and writing a web app if you can better see what's going on:
Sinatra:
get '/hi' do "Hello World!" end
Rails:
rails generate controller hello
For that matter, don't let all this web and database stuff scare you off. Ruby is useful and powerful as a stand alone scripting language. You'll learn a lot just writing scripts that can run on the command line (and that will lay the foundation for the web stuff if you'd like to dig deeper). The web stuff isn't really any harder, but it's another layer of things to learn.
Sinatra assumes you will roll all of this on your own. A novice won't know to do this, or how to do it, so I think it's better to have it done for you at first.
Ruby = Django
Rspec = ????
Is that it?
Ruby on Rails -> Django
Git -> Mercurial (Hg)
RSpec -> Django's built-in testing
But now I want to go read through the Mercurial source as I've been curious about VCS internals, but my C-fu is very weak, and attempting to read through the Git source is quite a chore for me.
With an English background you might try something like:
Putting together a collection of books by an author (or as many as you want) from Project Gutenberg. Come up with a rails site that lets you explore or search these in an interesting way.
There's lots of things to try, but trying to do something versus trying to learn something for its own sake, will give you a chance to focus and learn as opposed to just learning all there is about a language. With Ruby, there is way too much to learn, but you can get started quickly.
If you go the Python route, I've got a free book I'm working for beginners that might be too beginner for you:
http://learnpythonthehardway.org/
But I reference two other books on that page which actually could be a good start for you. After that, check out the Django book:
http://www.djangobook.com/en/2.0/
Which will teach you Django, a very popular web framework (more popular than Rails actually).
I'd also say, take everything I say with a grain of salt. I'm humorously famous for hating Rails.
> (more popular than Rails actually)
[citation needed]. The largest websites/web applications in the world are built in Rails much more frequently than in Django. And there is much more demand for Rails developers in the marketplace. I fail to see evidence that Django is actually used more than Rails is in the real world.
While we're calling each other out for citations, that's an awfully big statement to make without citations as well.
Let's just put it this way: Both frameworks power large sites, you pretty much can't go wrong with either.
I made the statement because I'm ready to back it up. Among the most popular 1000 sites on the web, you will find at least a dozen Rails sites [1]. There are extremely common names like Twitter, Hulu, Scribd, Justin.TV, White/Yellow Pages, Urban Dictionary, etc. How many Django sites do you see in the top 1000? Curse.com was one of the largest Django sites out there (a case study in the 1st edition of the Django Book). They switched to ASP.NET upon being acquired.
[1] http://rails100.pbworks.com/Alexa+Rankings
> Let's just put it this way: Both frameworks power large sites, you pretty much can't go wrong with either.
Without a doubt. And I've made this exact point many times before. I was just arguing against the unsubstantiated claim made by the op of this thread.
I'm sure it's just an off-the-cuff remark. I've made plenty in my day.
The guy weighs in on the opposite side of something that is common knowledge, then says you should check what I'm saying because I could be fibbing, oh and I'm famous for having a bias against the side I've just disfavoured — and you reach that conclusion?
If I were a cynic I'd say both you and he were trolling, but I rather think he was just taking the mickey and it's turned into a rather droll black comedy.
I think Zed is a good guy. He is certainly civil in person and tends to have well thought out arguments. I was surprised by the claim without any data to back it up. I missed the whole implicit common knowledge part. I thought people were trying to defend his statement.
> it's turned into a rather droll black comedy.
I'll defer to you on this one. I wasn't intending on being a troll, so sorry if it turned out that way.
I'm just annoyed that I was getting downvoted over what I thought were valid questions.
> and you reach that conclusion?
The only conclusion I have reached so far is that you are a dick.
I was sort of thinking about it, and I realized you were screwing with me. It's sortof humorous and dickish (sorry douchey is more appropriate) at the same time.
I don't hate you, but it's not how I would conduct myself, especially if somebody is obviously ignorant over a certain context of discussion.
> second rather uncouth one
I thought it was appropriate. I could have been more high-brow about it, but why bother? You would have downvoted me anyway and would not have been any more sympathetic. It certainly made me feel better.
Also using lmgtfy, classy! (I had another comment but decided I didn't want to get downvoted twice by you, so I merged it).
So that's what concerned you. The points don't matter. Seriously, they don't mean anything and certainly shouldn't change the way you interact with people. Particularly as you don't know who is doling out the points.
http://news.ycombinator.com/item?id=1505323
That's your response? How very caviler of you.
It does matter because it's communication, albeit binary and pretty bad, about how well your comment is being received. It matters emotionally, just like a scowl matters, or a joke at your expense matters.
It's also a form of censorship and throwing rotten food on the poster.
> Particularly as you don't know who is doling out the points
Well, that is part of the problem, isn't it? Humans are not completely logical, Dr. Spock. Including me and you... We gotta make assumptions sometimes in absence of information. Well cool, I found out something new, you got your jab in there. Win-win.
Point taken about how the voting algorithm works.
I get the message you were trying to get across and I agree with it.
Mainly, I perceived you as being rude and disdainful (lmgtfy, "That is your conclusion?"). I can't speak for everybody, but my immediate reaction is to feel stupid, and then get defensive. It's hard to take a step back and realize how minor it is when in the moment.
I know that was not your intention. I really do appreciate you sticking this out.
No, it's not. http://news.ycombinator.com/item?id=1459119
Also, regarding Python web frameworks, I would highly recommend looking at Web2Py over Django for your needs (something that gets you up and running with a minimum of fuss) Web2Py is supposed to be more Rails-like than Django which might be a good thing in your case. (Also, check out Cube2Py for something to look forward to: http://vimeo.com/13154869)
Disclaimer: I am of a similar background (Engineer/MBA/Entrepreneur looking for a platform to rapidly prototype ideas) For folks like us, scaling can wait until you validate the idea and confirm that a real market exists, then you can raise capital and add real developers to help you scale.
If nothing else you'll appreciate why the engineering team usually considers the sales team its enemy.
It's a fact that there is credibility in having some knowledge of both the technical and business side of any operation, and it's definitely a part of my consideration in doing this.
Edit: Also, look at my earlier comment http://news.ycombinator.com/item?id=1499755
Ruby is the perfect scripting language, and you'll be surprised at the sheer utility of having something the ability to use something like this. Forget the web side of things; just he ability to whip up a quick throwaway script (to automate office tasks, calculate forecasts, do complex eng calculations etc) gives you a massive advantage over others in your field.
http://www.scipy.org/
To supplement your Ruby knowledge and class, I'd say take a look at Ruby code snippets from Rosetta Code[1] to get a 'feel' for what Ruby looks like in a variety of applications.
[1] http://rosettacode.org/wiki/Ruby
Just out of curiosity, what kind of class is it? Is it in-person (with classmates and lecturer) or is it a web class (like University of Reddit)? What does the curriculum look like? Is there a website we can check out?
http://www.ed2go.com/monroe/online_course/rby/detail/Introdu...
The curriculum looks awesome: a lot of skills are introduced. However, the curriculum looks very Rails centric rather than Ruby (the language) centric. If you're going into website creation (and it looks like you are), go for it!
Anyways, good luck!
http://www.ed2go.com/monroe/online_course/rby/detail/Introdu...
The answer is always yes.
- Rails deployment and hosting are super simple with Heroku (http://heroku.com), which, again, I think is more user-friendly than the Python equivalent (Google App Engine)
- There are some excellent free resources out there (check out http://railscasts.com, http://guides.rubyonrails.org/, and http://railslab.newrelic.com/scaling-rails)
- There is a very vibrant community of plug-ins (gems)
Honestly, I think that getting a book (try this one: http://pragprog.com/titles/rails4/agile-web-development-with..., 4th edition), and then simply practicing will get you up and running faster than a course.
Also, now is a good time to get into Rails, as version 3.0 has just came out.
An alternative is http://railstutorial.org/book, which has the advantage of being free.
http://railstutorial.org/ taught me rails. (along w/ stackoverflow.com)
To add to that list: http://railstutorial.org/book
That said, I threw my hands up after running into multiple libraries duck punching (monkey patching) ActiveSupport into a mangled, conflicting mess one too many times. The open classes thing really is harmful, no matter what anyone tells you. It's a feature that, when used with care, can be very powerful...but the problem is in my experience it's not used with care very often in the Rails world.
I've heard Scala solves the issue with open classes by keeping things in context with the code that surrounds it, but I personally haven't verified it. Besides, that's not what you asked.
Here's a metaphor that I really feel holds true: Rubyists are magicians...Pythonistas are masons. If you have to rely on your own code only, then by all means delve as deep into magic as possible. However, if you have to rely on other's work, the mason's approach is much more intuitive, reliable, and safe.
Sinatra is more of a "micro-framework" and puts you closer to the http method.
Basically, the api mimics http more closely, you literally use get, put, post, and delete methods to define your routes and actions.
In Sinatra, you define your routes in the same place where you program your Resource's functionality, so less mapping is required. In Rails, you have a separate controller and route files.
The model layers between Sinatra and Rails are very similar. For example, you can use ActiveRecord in Sinatra.
Not having to write migrations (as you would with ActiveRecord + Mysql) is huge.
Also, your models can be more flexible. You can add keys to your document as needed. With Mysql, you need to have a migration to add the column.
Second, I'm tired of all the NoSQL hype. I've worked on a project with MongoDB and MongoMapper, and the combination caused more problems than it solved. If you want cutting edge and all that comes with that, go with Mongo. Otherwise, if you'd prefer to focus on problems in the domain you're trying to solve and not the technology you're trying to solve it with, go with something relational and tried and true (PostgreSQL, if I were deciding).
When all you have is a hammer...
As for migrations, I don't think he's gonna be dealing with anything too complicated schema-wise. Django South will write your migrations for you. Maybe Rails has something like that? But honestly, I'd recommend using SQLite and just starting a new file whenever he really felt the need to alter the schema.
Of course it depends on the problem, but working with hashes and arrays is simpler than the relational model, no?
I do concede the vast swaths of docs for AR, however AR is pretty complicated and issues arise that aren't well documented.
With Sinatra, I'm finding it to be less work.
I would probably stick with relational tech if starting off with Rails, but keep your eye open toward alternative store, such as document databases and key/value stores.
I don't quite agree with this. Of course I agree that you should use monkey patching with care, but it's the implications I disagree with.
First, you can monkey patch in python too. Python doesn't make this safer, but it is used more in the ruby world. I think the implication that I take issue with is that it's rails fault that some other library you used monkey patched rails. It's the libraries fault, and people should look into libraries before they use them. Just as you should use monkey patching with care, you should use other peoples libraries with care. Peek at the code before using it.
Rails 3 makes it easier to change things without monkey patching so it should occur less frequently going forward.
Still, I enjoy ruby very much, and I haven't seen my last project in it or Rails. I just need reliability and consistency now, and Python seems to offer more of it. I may as you say hit this same problem in Django, but I haven't yet.
It's a trade off. Take away monkey patching and you get other problems. Just look at java projects. Once you make an interface and someone else uses it you can't change it anymore without breaking everyones code. Check out the eclipse code base for examples.
For example, I've never programmed in Clojure but I can read quite a bit of it because I understand functional programming. It wouldn't take me very long to get the hang of it if I chose to learn it.
You didn't list "fun" in your reasons above, so my answer is "no, you shouldn't learn ruby."
Im from a Java shop and recently started to learn rails, had a good experience with grails. The good thing about web frameworks is that you can reapply what you learn to other frameworks (ie, if you choose Django you can later apply some of the knowledge to Rails or whatever). My only nitpick with the whole ruby/rails stuff is that most of the stuff is mostly semi-broken in windows. Some gems need patching, others need native code (sometimes this code has to be compiled), others just don't work with gem X. I don't know how it is in the Python/Django universe, but comparing Rails to Grails (or any other Java/maven based project) I'm amazed at the low "respect" gem/plugin developers have for windows users. Java is really write once run anywhere, Rails just seems write once run in linux.
If you choose Rails, I would strongly suggest you to install a linux.