Archive for the ‘Computer’ Category

So long for Dr. Dobbs

Friday, April 3rd, 2009
Over 10 years ago, Dr. Dobbs Journal was my favorite computer-related magazine. The copies would cost at least twice as much as other magazines in the store because there was only small demand, they were flown into our country and were paid in (back then) expensive US dollars. I considered a copy worth its money however, because it contained well-written, in-depth articles of a broad range of issues of the software engineering field. I could spend hours reading it. If I didn’t buy them myself, I always had a nice gift idea at hand…

For at least five years now, I have seen it’s quality declining. The content just didn’t seem so appealing anymore and the magazine became also physically thinner. I still had a subscription; partly because of old-times-sake, and partly because as a working guy and the current €/$ rate it felt well-affordable.

In the beginning of this year I received a notice of a change; Dr. Dobbs Journal would merge with Information week, and in order to keep receiving issues under my subscription, I had to fill out some web page. At first I wasn’t aware of what was happening, but having received two issues of Information Week with a small part reserved for Dr. Dobbs, I’m completely convinced I will not continue my subscription. It’s sad, but I don’t feel part of the target audience anymore :(

Google told me I’m not the only one:

Spammers

Thursday, March 26th, 2009

In the beginning of the internet (now I sound like an old guy), its users behaved in ways prescribed by netiquette; a term that Wikipedia defines as a set of social conventions that facilitate interaction over networks. You would for instance be flamed for sending unsolicited mail to a bunch people, and if you did it again, your sysadmin would hear about it and block your account for a while…

Since internet became common and commercial, netiquette faded into oblivion and gave way to the dark side ;-) . Ah well, common sense get’s you a long way and the internet became a lot more fun too, so you don’t hear me complaining (or at least not that much though).

One thing that annoys me though is the continuing spam in my mailbox; an unthinkable thing if the guys sending this stuff had ever glanced over the netiquette guidelines. Today we have to block and filter instead of relying on the naive behavioral constraints posed by netiquette. It’s a rat race where spammers come up with new ways of slipping through spam filters every day. Spam filters ‘read’ the text? The spammers put theirs ads in pdf attachments! These mails get blocked too? Let’s hide our message in images… And so the story continues.

One method I hadn’t seen before is HTML table-based characters, where a table cell represents a pixel in the message. I have to give them credit; it’s an original avoidance strategy. The spamfilter just sees HTML codes like:

<table border="1" cellpadding="2" cellspacing="2" width="100%">
  <tbody>
    <tr>
      <td bgcolor="navy" valign="top"><br>
      </td>
      <td valign="top"><br>
      </td>
      <td valign="top"><br>
      </td>

But the browser renders:

Anyway, if you ever feel like finding out how ‘the elders of the internet’ intended us all to behave, read the officially defined Netiquette Guidelines. Be warned though; the latest update was in 1995, which is light years in internet time :D

XML

Saturday, March 21st, 2009
I once heard someone claim that XML has the efficiency of a plain text file combined with the readability of a binary. Every time I have to type XML by hand, I tend to agree! XSLT for instance seems nice… until you actually have to program and maintain logic/functionality encoded in it for a while: it is verbose, it forces you to express constructs in hierarchical XML structures and it becomes a bit frustrating….

XML is great for tools and communication between programs, but it’s verboseness and forced hierarchical structure makes most XML documents not as readable as promised. The problem I observe is caused by the accidental complexity (the difference between intention and result) inherent to the language. You have to close each tag (type it twice), parameters are passed by attributes or subnodes (a lot of text) and there’s only hierarchical structures instead of more shortly expressed ways. There’s a lot ‘ceremony’ to express simple intent.

Therefore, I’d advice people to use XML for it’s strong points, but not overestimate it’s power for purposes it’s just not intended for. For many purposes I’d rather create an (e.g. oaw-based) Domain Specific language that let’s me express more things more easily and gives me context support in my favorite editor while doing so.

JAOO

Thursday, October 2nd, 2008

IMG_9115.JPG

With a colleague of mine, I went to the JAOO conference in Arhus. Quite an interesting conference; kind of small, not specifically technology focused, very interesting speakers and a lot of discussions about the major issues in the IT field: Architecture // Cloud // Agile // Component Models // DSL.

We rented an ancient small house in the most picturesque street of town. So much better than a hotel without atmosphere…

IMG_9092.JPGIMG_9086.JPGIMG_9100.JPG

The session I liked most I can summarize as: everything you know is dead and crap — but here comes DCI. It was James O. Coplien that held a talk called Not your Grandfather’s Architecture: Taking Architecture into the Agile World – take 2. The talk was highly unstructured, but so entertaining. It’s not so much that I agree with the content or think it was the best contribution for new ideas as well that I liked what his talk did with the (over over crowded) crowd!

The presenter declared a lot of concepts to be crap and/or dead; such as runtime-polymorphism, class diagrams, Java, and aspect orientation. E.g., class diagrams was declared waste of time, because the end user doesn’t care about classes — however, object diagrams were somehow very good (like users care about objects). Much of the criticism was highly appropriate, but unclearly motivated. Next, James described a paradigm which was presented as brand new and the way to “save” object orientation: DCI, short for Data, Context, Interaction. The paradigm was illustrated through C++ code examples, and seemed to rely on a special way of combining C++ class templates with multiple inheritance — mixins, effectively. The goal of the new paradigm is allegedly to increase code readability. However confusingly the concepts were illustrated, I left with a feeling DCI may actually be something we will see more of.

SCEA

Sunday, September 14th, 2008
Phew, I finally made it! I’m a Sun Certified Enterprise Architect. It took me over a year to get from passing the theoretical exam (part 1) to setting myself to fulfilling the assignment (part 2). I think part 2 is where many people let go; it takes a bit of dedication to really documenting your architecture well. Part 3 of the exam then just consists of filling out a questionnaire on-site (so they can verify it’s you) where you prove you’ve made the assignment yourself.

In retrospective I wouldn’t recommend trying this exam if you’ve only worked with Java shortly, because it tests a lot of in-depth J2EE knowledge. I think of all Sun Java Certifications, the Web Component Developer Exam is the most relevant for Java Web developers, and I would be really happy if the people working on the Java projects I have to deal with at least have the knowledge tested by this exam. This would save me many refactoring headaches of people ‘re-inventing’ Servlet filters and listeners, and makes sure you’ve at least heard once about ‘Model-View-Controller’…

The Java Ranch is *the* place to go for information about all the Java exams. And I used the following books for study purposes;

JavaOne kicked off

Tuesday, May 6th, 2008

With some music :D

Biking around SF

Tuesday, May 6th, 2008
Shopping in San Francisco is great with this low dollar ($1.60 to the euro), but I like biking even better.

Down at the ferry I met this funny dude, with his own website. He and his dog entertained us well while waiting for the ferry.

P3P Headers

Thursday, July 26th, 2007

A load-balanced web application I’ve been working on suffered a -quite annoying- problem of people being logged out within only minutes of inactivity. It was related to lost sessions. After some tests for common session time-out problems I discovered quite an interesting feature of Internet Explorer 6 (and higher) worth to be aware of.

We tested the application ourselves with the mentioned browsers and never had problems, but as various clients offered access to our application through a frame on their site we were confronted with an untested and problematic set-up in which IE6 (and higher) refuses cookies.

To sketch the situation; http://clientx.com/ contains a frame linking to http://oursite.com/app/clientx . Because the host name in the frame (oursite.com) is different from the toplevel host (clientx.com), Internet Explor the frame as 3rd party content. From IE6 and upwards, the default privacy settings lets the browser silently ignore cookies from 3rd party content. This is done by intent, see the Microsoft KB issue.

A simple solution is to add a P3P-response header defining a Compact Policy (which you may or may not respect), for example:

P3P: CP="CAO PSA OUR"

As a developer you’re not likely to run into the problem during development because you:

  1. use firefox
  2. have changed the default IE privacy settings to something more workable
  3. access the site directly instead of through a frame

Battery life

Friday, June 15th, 2007

Since I got a new laptop about a year ago, the battery has changed from a mobile work enabler (up to for 4 hours) to a non-functional laptop weight-doubler. Even the computer noticed!
Battery

Battery failure happens with a lot of modern devices (like the i-pod, currently replaceable though) but if you’re lucky, your gadget is outdated before its battery is.

Over the years, I’d learned that the best way to treat your rechargeable batteries is to completely uncharge them every now and then, before recharching. This would avoid the so-called memory effect in which a battery is able to hold less charge over time. However, the newer lithium-ion batteries seem to different from the more traditional Nickel-Cadmium batteries.

At first, complete discharging of a Lithium-ion battery should be avoided. Complete depletion leads to a non-functional battery. Therefore, devices protect your battery by switching of early (e.g. by software).

Battery on fire

Second, hot batteries lose capacity. A battery stored inside a poorly ventilated laptop may be subject to a prolonged exposure to much higher temperatures than 25 °C, which will significantly shorten its life.

  • “Storage Temperature of 40 °C à 35% Permanent Capacity Loss after 1 year”
  • “Storage Temperature of 60 °C à 40% Permanent Capacity Loss after 3 months”

.

So, to get the best out of your laptop batteries, they should be charged early and often, and when using a notebook computer running from fixed line power over extended periods, the battery can be removed and stored in a cool place so that it is not affected by the heat produced by the computer. If you don’t care about battery life then the explosion hazards might be a good incentive to abide these rules…

Integer.getInteger(), Boolean.getBoolean() etc.

Monday, February 5th, 2007

java.lang.System.getProperty() is a Java method to access a system property. The properties you can lookup are partly predefined, and others are set by tools or trough command-line parameters (-Dmyproperty=true). Because System is a class which deals with lots of system related things, Object-Orientation-wise it makes sense to put this responsibility (method) in this class.

But who was sleeping at the Java design team when someone sneaked in Integer.getInteger(String), Boolean.getBoolean(String) and alike? Completely counter-intuitive these method return a System property in Integer/Boolean form. I would have felt comfortable with something like System.getProperties().getBoolean(String), or System.getBooleanProperty(String), and I even could have lived with the legacy of a System.getBoolean(String) method, but not this. I’ve tripped in this myself (again) a short while ago, thinking that it was a method which would parse the String for me. I’ve seen other people make the same mistakes. From experience Java programmers know to use Integer.valueOf(String), but not because the method name makes so much more sense…

Isn’t this a great deprecation candidate for Java 5, 6 7?