Archive for October, 2008
Did you know? 1 - x 3 = 1 3 1 - = 0.333... 3 0.333... x 3 = 0.999... ...then... 0.999... = 1 Are you searching for the trick? Believe it or not, this demonstration is true. Maybe the old intel pentiums [...]
Just put in my queue: Getting Real Today I had an overview of Clean Code, by Uncle Bob. From what I saw today, I perfectly agree on everything, but going in details it will be for sure an enjoyable learn experience. The book is well groomed, with plenty of code samples and amusing comic strips. [...]
Shall configuration be bound to the underlying of your application?
0 Comments Published October 26th, 2008 in Horror CodeWelcome to anti-refactoring lesson number 4. Previously I posted about trivial programming errors, stuff for amateur programmers as in last case. Here we go for a more conceptual mistake. Answer this question: from 1 to 10, how do you think it's smart to bind the name of a configuration property to the internals of your [...]
Welcome to anti-refactoring lesson number 3. The "Repetita Juvant Principle" is the counterpart of the DRY principle: 1 @Override 2 public SomeObject getSomeObject() { 3 return super.getSomeObject(); 4 } 5 6 @Override 7 public void setSomeObject(SomeObject arg0) { 8 super.setSomeObject( arg0 ); 9 } Then, you may think... this code has been written for some [...]
Welcome to anti-refactoring lesson 2. There are painters that paint with pencils or brushes and painter that paints with a bucket. A bucket is very effective if you just want a canvas filled. An example: 1 private String prefix; 2 public String getPrefix(){ 3 return getClass().getPackage().getName(); 4 } 5 public void setPrefix(String prefix) { 6 [...]
It is quite fun when you see an extremely verbose code that can be replaced by two or three lines, just removing useless stuff, or using the correct API. But it is much less fun, when an expert makes a huge refactoring on your codebase covering it of useless crap. It happened to me today [...]
"skilled developers may be able to develop the same functionality with far less code" --Wikipedia "Source Lines Of Code" A very simple way to count Physical LOC (Lines Of Code) using Unix tools: $ cd ${your project dir} $ find -name "*.java" | xargs wc --lines A general rule (not always true): the lower LOC [...]
Locking is a technique used for concurrent manipulation of shared data. Locking is not only related to databases: for instance you use locking in Java to synchronize multithreaded access to shared objects residing in memory. Here I am not going to talk specifically about Java locking or database locking, but only how conceptually locking works [...]
The secret features of the vi
0 Comments Published October 16th, 2008 in Life, universe and everythingColleague: I just got an email ... Title: "The blue wonder - and you can also f**k the girl next to the door" ... Content: some comments about the offer in subject .... ... The best thing about Vi is the safety of flying with autopilot, relaxing and without the necessity of worrying of that [...]
How to save 70 euro booking your flight with Lufthansa
0 Comments Published October 14th, 2008 in Life, universe and everything, LifehacksToday I booked a flight to Italy for this weekend with Lufthansa. At the beginning I checked without logging in, and I got a nice price (€251.00). Then I logged in with my miles & more account and I got an higher price (€327.00). I made some checks, and what I've understood is that the [...]
Search
About
You are currently browsing the NewInstance weblog archives for October, 2008.
Longer entries are truncated. Click the headline of an entry to read it in its entirety.Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Sep | Nov » | |||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||
Archives
Categories
Tag Cloud
Android API Bash Bios CSS Development Eclipse Encription Error Handling Font Git Google GWT Hardware How-To HTML Installation iPod Java JavaScript Karmic Linux Lucks MacBook Open Source Opinion OSX Pitfalls Pkg Practices Python Resume Security Software Suspend TDD Testing Tools Top Down Tricks Ubuntu Uninstall Wakup On Lan Web Workaround
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.




