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 [...]
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. A pleasure [...]
Shall configuration be bound to the underlying of your application?
0 Comments Published by Luigi 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 application?
In [...]
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 [...]
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 [...]
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 is, the better the software [...]
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 on [...]
The secret features of the vi
0 Comments Published by Luigi 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 [...]
How to save 70 euro booking your flight with Lufthansa
0 Comments Published by Luigi October 14th, 2008 in Life, universe and everythingToday 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
- January 2010 (2)
- December 2009 (1)
- November 2009 (3)
- September 2009 (2)
- August 2009 (4)
- July 2009 (1)
- June 2009 (2)
- May 2009 (4)
- April 2009 (2)
- March 2009 (7)
- February 2009 (5)
- January 2009 (2)
- December 2008 (1)
- November 2008 (8)
- October 2008 (12)
- September 2008 (3)
- August 2008 (2)
- July 2008 (6)
- June 2008 (16)
- May 2008 (2)
- April 2008 (3)
- March 2008 (6)
- October 2007 (1)
- September 2007 (1)
- August 2007 (5)
- July 2007 (6)
- June 2007 (6)
- May 2007 (1)
- March 2007 (1)
- February 2007 (2)
- January 2007 (1)
- December 2006 (2)
- November 2006 (4)
- October 2006 (7)
- September 2006 (1)
- August 2006 (2)
- July 2006 (6)
- June 2006 (3)
- February 2006 (1)
- January 2006 (1)
- December 2005 (5)
- November 2005 (2)
- October 2005 (2)
- September 2005 (7)
- August 2005 (2)
- July 2005 (8)
- June 2005 (12)
Categories
- Books (7)
- Eclipse (10)
- Errors (2)
- Firefox (7)
- Hardware (14)
- Horror Code (8)
- Internet (17)
- Java (85)
- JavaScript (8)
- Life, universe and everything (29)
- Linux (44)
- Mac (18)
- Software (25)
- Speeches and Conferences (8)
- Web (19)
- Windows (16)
Latest
- Syntactic sugar and Java arrays.
- 3G USB Stick on Ubuntu
- Ipod touch with Linux
- Karmic and Luks: USB drive encryption made (almost) easy
- Suspend/Resume in Karmic /2
- Suspend/Resume problem in Ubuntu Karmic 9.10 running on MacBook Pro 5.1
- MacBook International Keyboard and Linux
- Mighty Mouse: reverse horizontal scrolling workaround on Ubuntu Linux 9.04
- Skype 2.1.0.47 beta released, and amd64 packages available!
- Linux RAM Disks

