Category: Better Coder
-
Keep Your Methods Cohesive: Short and Concrete
Creating methods is probably the single most often performed activity during programming. Thus, it is crucial that it is performed well. When creating a method, I think the most important thing is that it should perform one task and do it well: it should have high cohesion. High cohesion is the fundamental principle in object…
-
Write Self-Documented Code
I don’t know if anybody actually reads the comments that we sometimes write as Javadoc. Do you? I don’t, most of the time. That’s why I think it’s important to write code that speaks for itself and that does not need a comment. I’d go this far: if you need a comment, your code should…
-
Thoughts on Object Oriented Programming
Object Oriented programming is hard. It’s easy to program in a language like Java, but hard to get it right. Why? Because Object-Oriented programming is more than just writing classes and methods. OO programming is way more than that. I think the hardest thing in OO programming is the ability to create objects with cohesive…
-
Code Style Is Important
Lessons from the Google Web Toolkit… I’ve been looking at the sample projects from the Google Web Toolkit. Mostly looking at code and playing around with the apps. Based on this, I think I can learn couple things from the toolkit and the source they provide. First of all, if you have not looked at…
-
Never Duplicate
How many times have you been thinking “let me just copy this here. It’s not going to change. And if it changes, I’m going to modify it in both places.” I think that’s a critical sin. You might remember, but the next maintainer might not. I have commited it many times, no doubt about it.…
-
Encapsulation vs Abstraction
I must admit. I am still having hard time seeing a real difference. I am still having hard time defining them both.One thing I am sure: both are fundamental principles of object oriented programming. I am going to try to learn them here and explain the differences. Just so I know for future. “Abstraction and…
-
Duplication Principle
What’s the single most important thing when writing code? And practical? To me, it’s the DRY, OAOO principle. Don’t know what those acronyms mean? 🙂 Don’t Repeat Yourself, and Once And Only Once principle. Not repeating the same code in different places is the single most important thing you can do to make your project…
-
Special Exceptions
I’m working on a legacy project and I’m frustrated. It’s a mess. It seems that it was built to never be modified. It is just a pain to make even a small change to it. I hate when I’m working on an Object-Oriented project and it contains special exceptions. C’mon, use polymorphism, use template methods,…
-
Better Object Oriented …
I have around 6 years of development experience. I have worked for several companies now. I can tell you one thing: a lot of developers don’t know how to write object oriented code. They write Java and they assume they write objects. But those are not objects; they’re more like data structures. Objects are not…
-
Ten Commandments of Egoless Programming
I believe that good programmers are egoless and humble. There is no room in software development for attitude. Of course, you can be that way, and a lot of people are, but what they fail to recognize is that the path takes them downwards. That path will not make you better, that’s for sure. So…
Recent Posts
- Hello world!
- The Software Craftsman
- Write Debuggable Code!
- Effective Programming: More Than Writing Code
- Fundamentals of programming
Tags
2010 2011 abstraction advanced Books code concepts Craftsmanship design patterns encapsulation goals gof grasp immutability innerclass Java javascript jpa learning patterns practicing quality Quotes reading recommended reference solid tdd testing unclebob
Comments
Good blog! I really love how it is simple on my eyes and the data are well written. I'm wondering…
Hi, this is a comment. To get started with moderating, editing, and deleting comments, please visit the Comments screen in…