Archivi per Ottobre 2008



0.999… == 1

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 [...]

Online Free Book: Getting Real

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 [...]

Welcome 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 [...]

The Repetita Juvant Principle

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 [...]

Always on getter and setters

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 [...]

Programmers like writing dumb code

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 [...]

LOC (Lines Of Code)

"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 [...]

Concurrent locking for dummies

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 [...]

Colleague: 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 [...]

Today 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 [...]




Info

Stai navigando negli archivi del sito NewInstance per il mese di Ottobre 2008.

Gli articoli lunghi sono troncati. Clicca sul titolo dell'articolo per leggerlo interamente.

Calendario

Ottobre 2008
L M M G V S D
« Set   Nov »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categorie