Month: December 2013

Hey it's the last day of two thousand and thirteen. Tomorrow it will be two thousand and fourteen. When I was a kid, the future seemed to be eons away. Once just for fun I calculated how old I would be on new year's day in the year two thousand. I'd be an ancient forty-two years old, can you believe that?! We would all communicate using these Dick Tracey walkie-talkie watches. Traveling would be a snap in flying machines just like on The Jetsons, and everyone would have their own personal robot assistant to do menial chores, like cleaning up the house and doing the shopping for you. Only slightly disappointed in progress, past that magical two thousand mark, thirteen years on and more than half a lifetime further, life goes on as usual.

After nearly six years, I've finally decided to renew my life by purchasing a new laptop. Portable 14-inch, 8GB, 256GB SSD SATA3, i7-CPU. After I ordered it, I happened to come across a number of negative reviews, mostly complaining about the screen (anti-glare) and so-called lousy resolution (1600x900), terrible touchpad (5-finger), etc. The problem nowadays is that everything is being compared to the state-of-the-art ultrabooks which are way too expensive for me. Many people say that it doesn't look sexy and it still has an old-fashioned vga connector (shame on them). The smaller screens may have higher resolution and better contrast for browsing the web. I need a slightly larger screen so that I can read comfortably if for instance I want to sit downstairs. When in my study room I can hook it up anyway to my fancy 23-inch high-resolution screen so such a shortcoming doesn't matter. Besides, I prefer a solid and dependable machine that will last. For me it's more than sexy enough.

Lenovo ThinkPad T431s

I had not touched a golf club for more than three weeks. My last round of golf was such a disaster that I decided that I needed a long rest from the frustrations of golf in order to recover. My life nearly ended on the fifth hole where an easy chip-and-run punch to the green for a possible birdie, transformed itself in a wink of the eye into a needless shank into the water. What followed (sand-trap, sand-trap, over-the-green, over-the-green, chip-and-putt) was a quadruple bogie nine. To make things even worse, a double-bogie six on the next easy par four sealed my fate, and I decided to quit golf, sell my clubs and give the money to some charity.

So it was with some trepidation that I went to the club yesterday afternoon and started my rehabilitation on the driving range. I feared for the worse, and after a short warm up I grabbed my wedge and went for it. Okay recovery, take care of me please. Surprisingly the club made pretty good contact with the ball and I was hitting close to the hundred meter marker. Then I slowly and surely went up the range of irons onto the woods and then at last my good old driver. Not bad, not bad at all.

After three buckets of balls, only two half-shanks and most other shots between the good to excellent range, I felt pretty good. There is still hope. It is all mental anyway, whether I practice or not. Practicing is always good but without a healthy demeanor and solid frame of mind, you can only attain a so-so level of golf.

Rails enhances the flexibility of Ruby nicely. It allows built-in classes to seamlessly include extra fancy methods which sound like human language.The elegance and power of Rails is leveraged atop the malleability of the underlying Ruby language. Here's some proof:

kiffin@F5SL:...orial-hartl/sample_app $ rails console
Loading development environment (Rails 4.0.2)
>> 1.year.from_now
=> Sun, 21 Dec 2014 14:20:37 UTC +00:00
>> 10.weeks.ago
=> Sat, 12 Oct 2013 14:20:47 UTC +00:00
>> 1.kilobyte
=> 1024
>> 5.megabytes
=> 5242880

See Learn Web Development with Rails by Michael Hartl for a great introduction to Rails.

At long last the shortest day (longest night) of the year has come and gone. Exactly six months ago I was so thrilled withe the longest day of the year. Seems like only yesterday. The planet is now situated on exactly the other side of the sun. The cycle continues no matter what, planetary orbits constrained by the laws of nature and mathematical formulas defined by physics. From now on it's downhill all the way. Something to look forward to again, the other side of the sun.

Ordered my Nwazet Pi Camera Box from the ModMyPi shopping site which arrived a couple of days ago.

The assembly was a bit complicated but thanks to the online instructions I was able to snap all of the pieces together. It comes with a fancy fish-eye lens. Couldn't get the wifi to work yet though. Here's what it looks like so far.


I also managed to take my first snapshot. Slightly blurry and distorted but a historical photograph nonetheless.


A couple days later. Figured out how to get the wifi working by installing the wicd-curses utility.

$ sudo apt-get install wicd-curses
$ sudo wicd-curses

Just follow the instructions, choose the correct SSID and then connect to it.

Here's a simple recipe for creating your own progress bar using some javascript and css. This is what I implemented on my Rand() page.

<script type="text/javascript">
  $(document).ready(function() {
    function progress(n) {
      (function loop() {
        $('#progress-bar').html(n ? n*10 : "");
        $('#progress-bar').css("width", n*10 + '%');
        if (n--) {
          setTimeout(loop, 100);
        } else {
          // do something

In order to make it work, place a div somewhere on your page where you want the progress bar to appear.

<div id="progress-bar"></div>

I added some styling to make the progress bar look a bit more professional.

#progress-bar {
  background-color: #2A83A2;
  background-image: linear-gradient(#2A83A2, #165E83);
  border-color: #165E83;
  height: 20px;

Here's a demo you can try out for yourself.

Progress bar (100)
Do something!

Times are changing and it's up to us to adapt quickly before it is too late. Decades of experience with traditional plan-driven software development has proven it beyond a doubt. We cannot ignore the hard facts that (after-care) software maintenance costs are at least twice as much as the initial development costs. That is, depending on the quality of the software. Lousy software could cause a tenfold increase in bug-fixing et cetera after the fact, maybe more. Very dissatisfied customers will turn away in a blink of the eye when the competitor introduces the next best replacement.

Much too often have hastily created products been pushed into the market prematurely. Because of fear of the competition, more often than not an exaggeration if not a complete illusion. This viscous circle has led to situations where maintenance costs have skyrocketed and even the supposedly leading technology companies have gone under.

Take a moment and think about it logically. Why continue like this? Why not use agile as a maintenance-compatible software development process? It would secure the complete product life-cycle from start to finish. Maintenance and development would become one, the continuous delivery pipeline would carry us forward, and we would be part of the current. It would avoid two separate teams of two conflicting and disparate mechanisms by combining them into a single cohesive unit working in tandem in the software development factory. Galloping in cadence, achieving higher efficiency, and best of all reducing unnecessary costs. Life would certainly be better.

Unfortunately, the obvious advantages can only be proven empirically rather than theoretically. We choose the wrong split in the road despite the warning signs that are so clearly in front of us. The human mind requires a more (so-called) structured plan which predicts the future better. A magical looking glass that will tell us that indeed we are the fairest of the land in the wonderful world of software development. Even if in the end it gives us a false sense of security, at least it makes us feel better. Even if it means joining the herd of lemmings for the sake of following, just in case. Until we reach the end wherever that might be.


The quote below is taken from the MOOC I am following on BerkeleyX which is called CS.169.2x Software as a Service, part 2 (Refactoring and Legacy):

"... or we could do it the more principled way which is cover and modify, which means, let good test coverage be your security blanket. If you've got a good test suit, then when you make changes that breaks something, your test switch had tip you off to that fact, because you'll have regression test and plays. You'll know if you broke something." -- Armando Fox

Of the many software companies who were interviewed, more than eighty percent state that the most important skill lacking in modern day software engineers is the ability to deal successfully with legacy code.

The idea that we must at all times remain flexible and embrace change is a central theme at the core of our being. This useful concept can not only be applied theoretically as a nice idea, but more importantly to ones everyday life as well. Life is pretty dynamic, chaotic and short. So it is very strange that at first glance the human inclination is to search for structure and predictability, and then it is too late. The pursuit of a plan-driven existence provides us all with a false sense of comfort. In order to take advantage of the full possibilities of life, we need to accept that change will occur. When it does, we will embrace it with open arms and dive head first into that ocean of variegated currents. Change does not have to be painful. We should not be discouraged if surviving change means following a seemingly uncomfortable transition. The currents go this way and that way and every which way. You only pain yourself by resisting the inevitable outcome that change brings. By swimming against the current too much you will tire and drown. Be ready and accept all changes when they arrive. Sometime out of nowhere and sometimes as planned long ahead. Anticipate and prepare yourself mentally and physically so that you can make the best out of life.

If you're like me then you've probably spent many a frustrating time trying to get those darn list-style-image: url(/images/bullet.gif) bullets aligned properly with the text. They are either too high or too far to the left and the inside list-style only messes things up even more.

The trick is to disable the css list-style attribute and use background images instead. I tag the ul-element with an id #list-images-background and put the following in my css file:

ul#list-images-background li {
    list-style: none; 
    background-repeat: no-repeat;
    background-position: 0 2px;
    padding-left: 24px;

An example is the list of my social media links on the right of my blog index page. Each list bullet image can be defined separately by using the background-image:url(/images/facebook.png) style. The markup code looks something like this:

<ul id="list-background-images">
    <li style="background-image:url(/images/facebook.png)"><a href="" target="_top">Facebook</a></li>
    <li style="background-image:url(/images/twitter.png)"><a href="" target="_top">Twitter</a></li>
    <li style="background-image:url(/images/googleplus.png)"><a href="" target="_top">Google+</a></li>
    <li style="background-image:url(/images/linkedin.png)"><a href="" target="_top">LinkedIn</a></li>
    <li style="background-image:url(/images/github.png)"><a href="" target="_top">GitHub</a></li>

The exact position of the image bullet can now be tweaked easily by adjusting the values of padding-left and background-position. After some minimal fine-tuning, here's what the list finally looks like:


The final result looks pretty professional, at least for someone like me. I invite all you so-called expert web designers out there to come up with something better.

Random entries

Here are some random entries that you might be interested in:

Recent Assets

  • lenovo-thinkpad-t431s.jpg
  • first-raspberrypi-image.png
  • raspi-camera.png
  • lemmings-at-the-cliff.png
  • social-network-icons.png

Recent Comments

  • Long time no see: I remember them, as well. I remember Donald was my ...
    - Charles
  • Bridge to the moon: Yes it was a drawing and my older brother told me ...
    - jpmcfarlane
  • Bridge to the moon: Wow, that's quite a coincidence that we both sent ...
    - Kiffin
  • Bridge to the moon: Hello I was in my teens when Gemini 4 went up that ...
    - jpmcfarlane
  • Back to work: Congratulations Kiffin, I hope it is something you ...
    - KathleenC

Golf Handicap


This personal weblog was started way back on July 21, 2001 which means that it is 7-21-2001 old.

So far this blog contains no less than 2498 entries and as many as 1877 comments.

Important events

Graduated from Stanford 6-5-1979 ago.

Kiffin Rockwell was shot down and killed 9-23-1916 ago.

Believe it or not but I am 10-11-1957 young.

First met Thea in Balestrand, Norway 6-14-1980 ago.

Began well-balanced and healthy life style 1-8-2013 ago.

My father passed away 10-20-2000 ago.

My mother passed away 3-27-2018 ago.

Started Gishtech 04-25-2016 ago.