Cool retro terminal

October 3, 2014

I dig command line terminals, I dig retro computing, I dig cool stuff. And I absolutely love this mind-blowing combination: cool-retro-term.

Amber flavor

Green flavor


Input font system

August 21, 2014

Apart from writing code for fun and profit, I have a thing about fonts. It's only natural then that programming fonts have a special place in my heart. Monospaced fonts are the defacto standard, but lately a radical idea came to my attention: using proportionally spaced fonts for code and leaving the actual typesetting to the editor.

While I am still not convinced, I have to admit that the proponents of the idea, came up with a beautiful family of programming fonts called 'Input'.

Input font gallery

What can I say, it's my new favorite :)


August 7, 2014

So old-school, yet so modern. I especially like the music!

Were are we today?

August 5, 2014

Is it 1880 or 1914?

A lot about where we are today has similar characteristics. We have all of the ingredients for an information society in place: a global network that connects everyone, rapidly improving machine learning and automation, additive manufacturing and robotics (to name just a few key ingredients). We also have globalized many aspects of the economy with global corporations and supply chains.

Yet again the political leadership throughout the world is still largely thinking in industrial terms, including emphasizing the nation state as the geographic organizing principle (and playing up ethnic and religious differences). Once again we also have large groups of people who feel pushed around or left behind by the emerging information economy.

I am consistently surprised that people around me don't realize what is really happening in the world today. We live in dangerous times. You better expect (and prepare for) some disruptive changes within this decade. And I am not talking about Valey-style, hipster disruption here...

Right-size precision

August 4, 2014

The need to right-size precision to save energy, bandwidth, storage, and electrical power

The representation of real numbers within computers leaves a lot to be desired. Every programmer is bitten at some point by floating point precision issues. Open a JavaScript console and type 0.1 + 0.2 for the canonical example. This fascinating paper frames the problem in whole new perspective and proposes a couple of innovative solutions. As the author says...

Let’s make computer math much smarter than what it was in 1914!

No Juju for you!

August 3, 2014

Ubuntu's Not Invented Here syndrome

A well-articulated analysis, the following quote particularly resonated with me:

I don't think that Canonical is bad at what it does. It's just that they're rarely the best and being mediocre (or even second best) isn't good enough when the tournament effect is at work. The winner takes home the pot (e.g., becomes the new standard) and Canonical isn't winning.

Switching to Unity and competing on so many fronts was a mistake, Canonical is spread too thin. Still, the latest LTS release is pretty solid and pleasingly refined. I plan to stick with Ubuntu some more, these days my mantra is to be conservative with platform changes. If things don't work-out, there is always a safe fallback.

The evolution of browsers

September 18, 2011

A new month, a new version of Chrome is released. Don't get me wrong, Web Audio is interesting (one more nail in the coffin for Flash) and Native Client may be a solution to the primary roadblock in the evolution of the Web towards an application platform (namely JavaScript).

Still, I would prefer browser vendors to go after some low-hanging fruit first. I mean, emerging HTML5 technologies are cool and all, but how about concentrating on the actual HTML part first? How about implementing common forms controls (date/time pickers, rich text editors, improved validation and more)? How about fully implementing CSS Paged Media? How about implementing MathML? How about replacing .pdf with .html first and then focus on killing Flash?

And while we are at it, how about improving bookmark management in Chrome? The current interface leaves a lot to be desired (i.g. multiple categorization of bookmarks using tags and/or hierarchical folders, similar to the categorization available in Google Docs).

In short, I would like to see more pragmatic features sooner rather than later.

Nasty Java catch

March 17, 2011

Some time ago, I wrote about a nasty JavaScript catch. Well, it seems that no language is immune from nasty surprises, so here comes one for Java:

BigDecimal value = new BigDecimal("0.31");
BigDecimal oldValue = new BigDecimal("0.34");
BigDecimal ratio = value.divide(oldValue);


java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.

Funky, huh? Let me offer a quick fix:

BigDecimal ratio = value.divide(oldValue, BigDecimal.ROUND_HALF_EVEN);

For some intuition (in Khan's parlance), have a look here.

Ultra geeky holiday e-Card

February 4, 2011

This came to my attention and I had to share it:

Center a div horizontally and vertically using CSS

October 18, 2010

A few days ago, I needed to center a mini site horizontally and vertically (don't you just love client requests?). It 's easy to tackle the horizontal axis using CSS:

.hcenter {
  margin: auto;
  width: 320px;
  height: 240px;
<div class="hcenter">Horizontally centered text</div>

On the contrary, I thought that CSS can't handle vertical centering (at least in a cross-browser compatible way) and a quick Google session ended fruitless as well. Instead, I wrote a small script to programmatically center the div inside the window. It took a couple of revisions to support resizing, eliminate flickering, ensure cross-browser compatibility, etc. but eventually I got it right.

Today though, I re-discovered an old trick:

.center {
  position: absolute;
  width: 320px;
  height: 240px;
  top: 50%;
  left: 50%;
  margin-top: -120px;
  margin-left: -160px;
<div class="center">Horizontal and vertical centered text is possible.</div>


Update, 24 Oct 2010: Oh, there is a better way:

line-height: ${height}px; 

where ${height} is equal to the height of the container.

Update, 31 Aug 2014: HTML5 rocks! You can do this easily now, using CSS flexbox layout.

Read older posts in the archive, or subscribe to the feed.