Thursday, March 04, 2010

I couldn't stop laughing...

Labels:

Tuesday, February 02, 2010

Java Initialization blocks...why should we ever use them?

Coming from a C# world I'm trying to get a grasp on the Java language, mostly for comparison purposes and to see if really the grass is greener on the other side of the fence.

What I like so far of the Java 1.6 that I see C# might benefit from:
1. The main one is cross platform portability. I wish Mono would have more support.
2. Enums are more complex, but I'm wondering if we ever really use that complexity...
3. Static imports, but do they really add to maintainability or make it worse?

What I find confusing in Java vs C#:

1. Checked exceptions: In Java, the exceptions that a method throws must be declared and are part of a method's public interface. They were left out from C# on purpose. Here's an interview made by Bruce Eckel (Thinking in C++) to Anders Hejlsberg (lead C# architect and Turbo Pascal creator, I should point out I wrote my first program in Turbo Pascal :-p)...
2. Initialization blocks, not the static ones that are similar to c# static constructors but instance initialization blocks...why would you ever use them? I'm still puzzled...

Monday, January 04, 2010

Cuban flag with an HDR touch


We drove to St Agustin while visiting Florida these holidays and to my surprise they had a museum with Martí and the Cuban flag :)... mi bandera.

Labels:

Thursday, December 03, 2009

HTTP 1.1 caching directives for dummies and caching problems for old versions of Internet Explorer.

The reason why I published this link is because a coworker had a problem with viewing a PDF on IE6 when the cache was set to no-store over https.

The problem does not happen with Internet Explorer 7 or above or with FireFox, but the old IEs fail to retrieve the files when the cache directive is no-store or no-cache.

More of this on:

Internet Explorer file downloads over SSL do not work with the cache control headers

Unable to Open or Run Files if "Cache-Control: No Store" Header Set

and

Prevent caching when you download active documents over SSL


And another good reading on Caches on the web:

Caching Tutorial for Web Authors and Webmasters

Labels: , ,