You are currently browsing the category archive for the ‘Tutorial’ category.
original image from MNPKO
I am currently learning Ruby on Rails (since two weeks or so). I used to work in php since some years, and now I’m relearning everything from scratch. One of the big helps after you learned the basics is certainly railscast, a set of screen casts (I started on episode one last Wednesday:D). I’ve seen that they have a contest running ‘till.. tomorrow! The contest is to give 5 tips about ruby on rails. Since I just started, I’ll give 5 advices to start with ruby on rails if you already know a bit about programming, and start good:
1)Set up a good development environment
2)Choose a project and start
3)Improve performance each time it’s possible
4)Don’t think how to make it work, think how to break it.
5)Don’t reinvent the wheel.
1)Install ruby, install rails, choose a editor(and here i recommend: Textmate(MacOsX)/Gedit(Linux)/E-TextEditor(Windows) for efficient productivity(If you don’t belive me, watch some screencast where somebody develops in Textmate, and be impressed), Eclipse for a full bloated IDE).
2)Don’t spend months reading books, tutorials, etc. Start right away, write code, even if it’s just another blog engine, make mistakes, learn from them and in parallel read the books, watch the screencasts, etc..
3)Use Fastcgi,LightTPD, memcache(maybe with cache_fu), try to go to the db only when necessary, and remember:a join is better then two selects, AND nothing is worse then operations on large amount of data.
4)Think secure from the beginning: if possible, use ssl(ALSO FOR THE LOGIN), store ip addresses in the cookies(and check it each time), create new sessions when people log in, install the Csrf_killer plugin (and use it), escape user input and use WhiteListHelper. And DO NOT USE mass assignment.
5)Before you write any code, look up if someone already made something like it. Even if you don’t find exactly what you want, try to adapt something already present. With some pre-made plugins/generators, you have already some iterations of testing, of securing, etc. behind you.
Ok, I just started, the tips are just what I recommend you: I know they’re nearly not worth the class of the railscasts, but maybe they match the quality of this Blog.
Italian and German version will follow tomorrow, so stay tuned
Commenti recenti