In reply to latest articles in Thoughtbot blog

Posted by Dmytro Shteflyuk on under Links (24,068 views)

Last few weeks Thoughtbot publish lots of really stupid (gsub syntax manual; are you serious?) articles (WTF is Best practice: index every boolean column) in their blog. And yesterdays article about tailing your Rails log is the absolute leader, it’s freaking awesome. Hey guys, I’m waiting for other articles in this series: “@ in attribute names, what does it mean?”, “if-then-else statement usage best practices for Ruby on Rails senior developers”, “how to install a gem”.

Hey robots, we have a reply to your outstanding articles: A wonderful way to list your project files. Please read it carefully, you definitely will find something useful for you! Thanks to @labria for his great exploration.

Simplifying your Ruby on Rails code: Presenter pattern, cells plugin

Posted by Dmytro Shteflyuk on under Ruby & Rails (186,886 views)

Today we will talk about code organization in Ruby on Rails projects. As everybody knows, Ruby on Rails is a conventional framework, which means you should follow framework architects’ decisions (put your controllers inside app/controllers, move all your logic into models, etc.) But there are many open questions around those conventions. In this write-up I will try to summarize my personal experience and show how I usually solve these problems.

Read the rest of entry »

Scribd open source projects

Posted by Dmytro Shteflyuk on under Development, Ruby & Rails (19,164 views)

It’s time to summarize what we have done for the Open Source community. Scribd is pretty open company, we release a lot of code into the public after a time (sometimes it is short, sometimes it is not). Here I want to mention all the code we have opensourced. Please take into account that time is moving on, so we are publishing more and more code. I will update this post periodically, so stay tuned. Follow me on Twitter to get instant updates.

Read the rest of entry »

Creating a simple but powerful profiler for Ruby on Rails

Posted by Dmytro Shteflyuk on under Ruby & Rails (16,739 views)

You are developing a large Web application. Controllers are full of complex data retrieving logic, views contain tons of blocks, partials, loops. One day you will receive an email with user complaints about some of your pages slowness. There are many profiling tools, some of them are easy (ruby-prof), others are large and complex (newrelic), but regardless of this it’s really hard to find the particular place where you have a real bottleneck. So we created really simple, but über-useful tool for ruby code profiling.

Read the rest of entry »

10 recommendations on using HTML5 today (aka Homo-Adminus Blog 2.0 HTML5ified)

Posted by Dmytro Shteflyuk on under Development, Links (25,445 views)

Homo-Adminus Blog

There was a lot of articles about HTML5 last days, so when Alexey Kovyrin asked me to help him with his new blog design I saw no other choice but using HTML5. There are a lot of new features added since HTML4, and some of them could be used today, like new elements <header>, <footer>, <nav>, <article>, <section>, etc. I think this is a nice addition to the HTML, because these elements add more sense to an unstructured markup. There is a buzzword “semantic” exists to describe this, but I don’t like buzzwords, so I would call it “sense”. So what features we could get from HTML5, that are supported by all modern browsers?

Read the rest of entry »