November 26, 2011
November 13, 2011
Object Calisthenics
Yet again I come here to share something learned from very smart people. Initially when I saw these rules my head exploded. Even though they are reasonable rules, they break the traditional non-object-oriented I've been doing for a while.
Sources
- One level of indentation per method
- No else keyword
- Wrap all primitives and strings
- Use only one dot per line
- Don’t abbreviate names but keep them short
- Keep all entities small
- No more than two instance variables per class
- Use first-class collections
- Don’t use any getters/setters or properties
Sources
November 4, 2011
Software Architecture, lessons learned
There are very good developers, that can create great products out of nowhere without thinking too much. Well, I'm not one of those, it takes me a while to get the right idea, and several times I had to throw everything I've bee working on and start from scratch.
But even in situations like these, there are some things you learn from time to time.
But even in situations like these, there are some things you learn from time to time.
Minimalism
This is something I learned from Robert Martin's Clean Code (but I think it just takes common sense). When your components are not meaningful and don't relate to each other in an almost 'natural' way, you need to refactor it. Your system might work beautifully, but your internal structure is a mess and it will create problems to future maintainers.Keep it simple
Complex design leads to complex code, complex code leads to complex tests, and the mess has now started. The design has to be as simplest as possible, and your code has to be consequent to this. And by code I mean production code and the test units related, because that it's maintainable code too!. Check KISS Principle on Wikipedia.Life time
System components and inner objects must follow the natural law, die. While shorter your objects live the better, are easier to handle, to test, and to refactor. Including memory usage improvements, as your objects are created and dropped as soon as they are used. This is something I find very useful, and I discovered by playing around with Google's Guice project.Patterns
Check the patterns once a while, review your architecture, don't reinvent the wheel. There are several good references for it, but I tend to enjoy Martin Fowler's patterns (and the articles describing them). Have a look at the LMAX architecture.November 2, 2011
Ubuntu usage report: 2 months after
So far I've been using Ubuntu as my laptop's system for two months, did a lot of things with it, including serious applications development.
For doing it so, I performed several package installations and system configurations, including very low-level scripting and server-oriented configurations.
Considering everything I did, this are some things I find very useful in Ubuntu:
For doing it so, I performed several package installations and system configurations, including very low-level scripting and server-oriented configurations.
Considering everything I did, this are some things I find very useful in Ubuntu:
- Package management system, this is perhaps its most obvious feature, it's really simple to install any package present in a repository.
- User experience, this is also something very well worked. The system is built to make user's life as simple as possible,
- Boot speed, it makes the difference.
- Security updates, very robust updates that don't break anything.
- Software center, a huge amount of software applications available for simple click-installations.
- Huge community, it's perhaps the biggest Linux community I've ever seen.
- Dependency hell, do you mean I have to install the entire open-jdk stack if I want to install Maven? even if I already have sun-jdk installed?
- User constraints, if you touch some system configurations that Ubuntu is keeping track of, you are going to have problems.
- Configuration complexity, Slackware is a heaven compared to this.
- Imposition, once you update the distribution, you will get your beloved desktop replaced by an awful Unity desktop.
- Unofficial packages, I had very rough moments try to install something Ubuntu doesn't support, I ended up compiling all the custom software I required.
Subscribe to:
Posts (Atom)