‘ Programming rules ’ category archive

Programming Rule: Don`t forget the Database Indexes!

June 05, 08 by the programmer

This rule applies only for applications that uses databases.

If you are making an application, WEB, Desktop or any other kind of application that uses any database that supports indexes, do not forget to create indexes on the most important fields from you tables.

Those fields are usually the fields that are most used in your SELECT statements, the fields that you join your queries by, usually the foreign keys in your tables.

By adding indexes you are increasing the speed of your application, or in other words you are decreasing the execution time of your SELECT statements in your SQL queries and with that you are improving the overall performance of your application.

You will feel the increased speed especially if your database has tables with a lot of data inside.

Programming Rule: Don’t fix it if it works!

June 04, 08 by the programmer

A colleague of mine told me that, but I did not take it seriously the first time, after I felt it on my skin :) .

You know when sometimes you see something in the code and suddenly you think of another solution for the same problem and you think that this will improve the all system, well you know what it wont.

You will probably brake something else while you implement the new solution, it happened to me many times.

So if you notice something that works perfectly don’t try to fix it because it works and you don’t want another problem don’t you.

P.S. This does not apply if there is really something wrong with the code