betterexplained.com — Ruby on Rails is an elegant, compact and fun way to build web applications. Unfortunately, many gotchas await the new programmer. Now that I have a few rails projects under my belt, here?s my shot at sparing you the suffering I experienced when first getting started.
Jun 18, 2007 View in Crawl 4
Closed AccountJun 18, 2007
Warning, article contains humor:"When you create your first rails app, the directories are laid out for you. The structure is well-organized: Models are in app/models, controllers in app/controllers, and views in app/my_local_views (just kidding)"
daftmanJun 19, 2007
No actually he has a point. Ruby is a nice language. However, its core maintainers are a small group of esoteric Japanese who only document when they feel like it. Until Ruby can implement proper multi-threading like other language such as perl or python, it's not going to go far in terms of performance.In your software development career its best to know at least 2 languages: 1 scripting and 1 enterprise. For the scripting, choose between python, perl, ruby and for enterprise there are java, c/c++ or c#. Personally I would choose python as it is under much more active development and more companies are supporting python. Ruby on the other hand has much more to go.For enterprise I would choose Java and touch on c/c++ for real time financial systems.
jaydonnellJun 21, 2007
i have no idea what kind of sites you are working on. If the db isn't accessed what is the code doing for the page? Let's use digg as an example. I'll wager that numerous db queries are made for 90% of the pages viewed. This page we are reading right now has the db as it's bottleneck.Can you give me an example of a site where the code would be a bottleneck and that doesn't hit the db often? I think you are arguing just to argue. But feel free to use whatever you want. Btw, it's trivially easy to scale a site that doesn't have the db as a bottleneck. Speed and scalability are two different things.
chandonJun 25, 2007
> Ruby doesn't support multi-threading... Why would you want multi-threading in a Unix webapp? If you want to get really technical about 3% benchmark differences there's an argument for multi-threading, but Unix webapps have been using fork() instead of threads for years, and it's worked fine. Threads are really essential only on Windows or a JVM where heavyweight processes are handled poorly or don't exist.
jaydonnellJun 26, 2007
I'll check back!You mentioned alexa saying that digg is slow so I did some digging (no pun intended). My company watched alexa like a hawk, but we've grown very skeptical of their stats. One thing you may not have realized is that their Avg load time appears to include the loading of all scripts (including ads). Safari's new webkit will show you the time it takes to load a page and break it down for all files/scripts loaded. Loading the page itself (this page) takes 800ms (fast) but loading all the scripts for ads pushes the total load time to about 4s per page. This is also true of one of the sites I work on. A page without ads will appear to be much faster according to alexa, but that may not be the case.
invalidsyntax73Jun 29, 2007
Very Clever and Helpful humor is good for the programmer
nickhannumSep 14, 2010
He's writing from a Rails on Windows background, but it's still really good starter info.