Ask HN: How can I become a better programmer?
I've been learning Ruby and Rails for about 6 months now. To be honest, I still feel really behind when I see these complex functions on stack overflow. I am willing and able to put as much time and effort into it as I need, so I'm hoping someone would have some advice or words of encouragement. Some people seem to "get it" so much faster.
17 comments
[ 3.0 ms ] story [ 46.3 ms ] threadGo through the last 2 years of Railscasts videos. (purchase a subscription to get all of them; not sure it's taking new signups right now though)
Sign up for RubyTapas. Five minute videos, 3 times a week, but most of them are ninja tips.
CodeSchool - some of the advanced Ruby courses are challenging, and get into some of the minutiae that you don't see in basic Rails apps.
Build stuff! Not fake apps, but apps that do things. Maybe an app to scrape HN and hit you up on SMS when your favorite authors post. An app to schedule volunteer hours for your church or other favorite organization. Etc. The act of building real apps will force you to learn some of the finer points of the language.
Make those apps open source, then connect them up to Code Climate. (free for OSS) Going through the process of increasing your code's GPA will help you improve.
Read Practical Object Oriented Design in Ruby by Sandi Metz.
But I think programming is fair. It's fair in a sense that if you work hard, there will be a notable return of becoming a better programmer. Read more code and write more code. You will get better.
But the way I have always learned most is working alongside people who were smarter than I am, with more experience, and enough patience to explain stuff that wasn't obvious. If that's not easy in the real world, try contributing to an open source project.
Toy apps teach you how to use libraries and google error messages. Building something will force you to spend time thinking about how not to code yourself into a corner, how to structure your app and how to be efficient. It will also give you an outlet to put all the things you lean in books/railscast etc into practice.
- tooling: learn heroku, github/git, unit and functional /integration tests, capistrano, Firebug/chrome dev tools, selenium/watir etc (etc could include continuous integration/deploy libs,
http://pragprog.com/book/pg_git/pragmatic-guide-to-git
http://guides.rubyonrails.org/testing.html
- learn a couple editors. e.g for scala/java/clojure, I think people should learn one of emacs/vim and IntelliJ.
- the db/serialization/search trilogy: learn JSON, XML (just to read XML, pretty important in javaland), a relational database, a nonSQL, and a fulltext indexing lib e.g. sphinx or elastic. Look at protobufs, avro also
- learn linux setup/tuning pretty thoroughly (inital setup with ssh, iptables, postgres, etc), basic monitoring tools, and the stuff that heroku or digital ocean or linode provide.
And read everything written by Uncle Bob starting with his books "Clean Code and "Clean Coder". He has a lot of blog articles out there as well as various conference videos. And he is also a Ruby developer in addition to C++ and Java.
Learn and apply the SOLID principles http://blog.rubybestpractices.com/posts/gregory/055-issue-23... and maybe read some more of those Ruby Best Practices articles.
Don't let the speed freaks drive you. Many of them are writing bad code fast. It is better to write clean maintainable code at a slower rate than it is to rush into things and create a complex unmaintainable mess. It is possible that some of the complex code that you have difficulty with is actually bad code and not something to emulate in your practice.
P.S. focus on learning Ruby not on Rails. Ruby is the basis for Rails but Rails is not the only Ruby game in town. Someday Rails will fade away but Ruby will still be going strong with new frameworks like Sinatra or Celluloid or Cramp.
You can learn a lot from these people just by showing up and expressing a desire to learn.