Mittwoch, 29. Februar 2012

Clean Code #2: Keep it simple, stupid

The last issue I brought up was DRY, and this time it's gonna be about KISS. In this series I talk about my journey to become a better developer. I point out lessons I learned from good and from bad software.

Keeping it simple

So, KISS is for "Keep it simple, stupid" and it makes itself pretty clear. Just stay simple. Don't get fancy when you don't have to. This idea comes from an agile perspective, where a big design in the beginning is replaced by incremental design while the development takes place.

Samstag, 25. Februar 2012

Symfony2 & MongoDb & Indices

I'm right now creating a application using symfony2 and MongoDb. I'm new to MongoDb and have a long history with relational databases, so I struggle with some details on how non-relational databases work.

One particular problem was that no matter how I defined indices in my documents, they wouldn't show up in my database and would not work at all. I didn't got any exception, so I was a little lost.

After an hour of research I found I have to create the database with the following command in order to get the indices work:
php app/console doctrine:mongodb:schema:create

The "problem" is that as Mongodb creates databases and collections on the fly you don't need to create them. On the other hand if you don't create them manually, the indices are not created with the collection.

I hope this information helps someone also struggling with it.

Montag, 20. Februar 2012

Clean Code #1: Don't repeat yourself

I started this series with my first post and some statements but without real techniques. This series is about applying clean code in the real world. I will use the clean code developer rules simply because i think they gather it up pretty well. The page is in german, but I'll explain the topics I'm talking about.

Freitag, 17. Februar 2012

The path to clean code

Good software is not software that works. Well, it should work of course, but there is much more to good software than simply that it behaves like expected. Those who read "Clean Code", who worked on an agile project or who studied XP know this already. And I want to add my points of view to this discussion.