Posts

Showing posts from November, 2008

40 Tips for better Programming

How to code better? I collected some tips about self-improvement for programmers. Tips are ordered in no particular order and divided into seven categories. It was hard, but I excluded some cool tips for sake of simplicity. I didn't mention tricks for programming concurrent software, scalable software, and many more. Optimization tricks were unfairly omitted too. General tips These tips are a philosophical counterpart to the rest of this article. Use priority queue to implement user's requirements. - It is better to implement high priority features or the hardest features first. It minimizes risks of being stuck in the middle of the project. Fix bugs before writing new code . This is a special case of the first tip. Read more... Improve yourself . Read books and blogs. There is always something new and useful to read out there. Have quiet working conditions . It is scientifically proved that you can improve your productivity just by removing distractions. Quite workplace is ju...

Review of Effective Java 2nd Edition

I have read Effective Java 2nd Edition recently. It contains 78 "items" where Joshua Bloch depicts usage of Java language the right way. All in all, I liked this book very much. Especially the chapters 2, 4 and 8 were most valuable to me. Except some introductory "items", whole book is a set of interesting articles similar to a blog. Next I'll write down a summary of the most items of this book. I use bold font when I found an item important and italic font when I found it surprising . Chapter 2 - Creating and Destroying Objects The interesting stuff starts here. Item 1 introduces you to the static factory methods and their advantages and disadvantages over constructors (boring). Item 2 is much more useful - it introduces the "Builder pattern" as the best method to initialize objects. More widespread term is IMO the " Fluent Interfaces ". Item 3 shows us how to implement a singleton the right way - through a single-element enum (remember th...