Bogdan Gusiev's blog

How to make good software for people


Encapsulation in Ruby: 'private' doesn't give expected level of privacy
05 Apr 2010

The classic OOP pattern usually called encapsulation implemented in ruby with private and protected keywords methods. The distinction between API and implementation works great with both. The problem is that private doesn't hide method for inherited classes.

criticism ruby encapsulation privacy method api


A dream to develop application that I will use
29 Mar 2010

Developing sites for communities you never join, enterprise applications for company you never work in, services you never find useful... a serious problem of IT industry. All misunderstanding between customers and developers come from that reason.

It would be so great if we could always feel ourselves as a user of our applications and make something useful, but not spend time on improving features that won't be familiar. Being a user of the developed application makes it really possible to develop ergonomic and pretty design.

Unfortunately most of the companies are ignoring that simple rule and unfortunately in some cases it is hard to follow. But anyway that is the only one way to build the best product. -->

application quality design usability


Advanced SQL and scopes stack with ActiveRecord
24 Jan 2010

If you ever work with rails application that is a little bit more complex than a simple CRUD you would know that some of the ActiveRecord magic doesn’t work for complex SQL queries. I am primary talking about scopes stack feature.

sql query ruby rails activerecord scope


Vim as IDE - new development era for me
01 Dec 2009

I was using Vim to do the minor editing in config files for ages. Vim is advanced on basic navigation and editing operations. However I was always prefer IDE for programming because of it's specific to language navigation('go to definition' feature is awesome!), integrated debugger. But while gaining the experience I noticed that all advanced features began to be less important then basic ones. And you should try Vim if you feel the same.

vim performance


Objects behaviour inheritance with RSpec
27 Oct 2009

About half of a year ago I was writing about object interface and Liskov Substitution Princeple. In short: Any class instance that extends the base class should pass all unit tests behaviour tests written for base class instance. It was a surprise for me that this concept has already been implemented in RSpec.

test ruby rspec behaviour inheritance


Computer science ain't as good as it should be
30 Jul 2009

When I start studying computer science in the University class I truly believe that it is all I need to get started writing good programs. Algorithms > Functional programming > OOP > Databases > MVC is a step-by-step path of all people that learn programming of the web application. But...

programming database criticism science oop


When BDD user stories is productive
29 Jun 2009

When you are skilled Unit tests writer it is not very easy to estimate the potential of BDD. Moreover in most cases BDD is used as a human-readable wrapper for unit tests. Do you really think that programmers need such abstract layer? Of course not... Users needs them.

criticism bdd tdd test behavior application user story


Pragmatic review of Google Wave technology
08 Jun 2009

Have a good time watching the Google Wave presentation video. Looks like an excellent open technology that will make our life easier. I like the overall idea. It is really awesome. But I personally admit some things that seems useless to me...

criticism technology review wave


Double select from a single table in complex SQL query.
02 Jun 2009

When I start learning SQL I have to write a lot of nested queries when working on complex select statements from a single table. Now, I feel more comfortable with it and show how to avoid nesting. There are cases when you have to compare one row of the table with all others to get the result:
  • Select next element to current by the value of some field
  • Select records that are unique by some complex expression
  • Select all records that have the same parameter as given record.
You can get rid of nesting in all above cases. Let's review the example.

sql nesting query select


How to choose a sexy title for your article
13 May 2009

Most of the people will not spend a minute reading your article if they wouldn't get interested from the very beginning. What resides at the beginning of any article? It is the title of course. That is why choose a good title is very important for every content posted in the net.

howto idea title article reader author