2009Q2 in a Word: Busy

August 16th, 2009

In a word, one could say that I have been “busy.” I was unable to find time for my blog during a whole quarter of the year.

In one of those weeks, I flew from LAX to Dulles, Geneva, Paris, and Frankfurt. During another week in San Mateo, I was at the wedding of a friend, who I have known for almost 2 decades. Of course, before the wedding, we were at Las Vegas for a good part of another week.

Work has filled up the remainder of the second quarter and continues to do so during the current quarter. Milestones definitely make the weeks go by faster. Meeting project milestones on schedule has been highly motivating and a bit exciting, making almost half a year seem like a short duration.

Configuring the timezone on Red Hat Linux

March 13th, 2009

I recently set up a server remotely and with much success, however I overlooked the configuration of the operating system’s timezone settings. This is typically set up during the installation of the operating system, but since the dedicated server provider performs the installation for customers, it is a step that can be easily overlooked when setting up a server that is provided by another party.

A quick search for “redhat timezone” returns Tips & Tricks: Changing timezone. In summary, the ZONE field of the /etc/sysconfig/clock file is updated to point to a file that is located in the /usr/share/zoneinfo directory tree. A symbolic link to the file located in /usr/share/zoneinfo directory tree should also be set at /etc/localtime.

The Tips & Tricks article at redhat.com recommends a reboot after setting these files up.

After the reboot, running ntpdate and configuring the ntp service is advisable. Checking that the timezone configuration is patched with ‘zdump -v /etc/localtime’ is also advisable.

Strategy-like Pattern in PHP

February 19th, 2009

Today, I had some time to write a little program while I was watching people work on the infrastructure at the office. I wrote up a couple of functions that calculated the n-th Fibonacci number, and wanted to display the sequence of the first 100 numbers as they were calculated by these functions. At first, I had something like the following:

<?php

  for( $i = 1; $i < = 100; ++$i )
  {
     printf( "%d ", fibonacci_tabularized( $i ) );
  }

  for( $i = 1; $i < = 100; ++$i )
  {
     printf( "%d, ", fibonacci_iterative( $i ) );
  }

  for( $i = 1; $i < = 100; ++$i )
  {
     printf( "%d, ", fibonacci_recursive( $i ) );
  }

?>

I quickly realized how horrible it was. That sure is a lot of duplicate code! So, I ended up rewriting it so that it looks like this:

<?php

  function print_fibonacci_sequence( $strategy, $n )
  {
    for( $i = 1; $i < = $n; ++$i )
    {
      printf( "%d, ", $strategy($n) );
    }
    printf( "\r\n" );
  }

  $strategies = array(
    "fibonacci_tabularized",
    "fibonacci_iterative",
    "fibonacci_recursive"
  );

  foreach( $strategies as $strategy )
  {
    print_fibonacci_sequence( $strategy, 100 );
  }

?>

Viewing More Work with Multiple Displays

January 16th, 2009

A news story at The New York Times, Boss, I Need a Bigger Screen. For Work Efficiency, of Course., professes the benefits of using multiple displays or a bigger screen while computing. The article’s writer, Farhad Manjoo, points to research at the University of Utah that observed a 44% increase in productivity when multiple bigger displays were used.

I can personally attest to the usability of multiple large displays. Rather than spend time manipulating application windows to fit a screen. I can quickly open two application windows that can be viewed simultaneously. It’s as easy as drag, drag, double-click, double-click. I can have software documentation open in one screen while software implementation is performed on another screen without derailing my train of thought or suffering from a mental context switch that is induced by window shuffling.

Disconnected

December 19th, 2008

A recent news article reports that a communications cable has been cut, affecting Europe, Asia, and the Middle East. This has happened before, but it did not seem likely to me that it would be something that would reoccur. The article on BBC quotes Interoute’s Jonathan Wright, “For this to happen twice in one year, on the same cable, is a serious cause for concern.”

As network disruptions become common, the disconnection of transoceanic lines should be a concern to IT administrators that manage company networks that are distributed worldwide. Distributed networks should be implemented in such a way and as much as financially feasible to allow for continued operation of the distributed sites when connections are severed. Outages occur and may last several days, if not weeks. Without a resilient company network in place, a lot of resources may be underutilized resulting in an increase in operating costs. A resilient company network shall minimize the loss of utility from company resources in the event of a network outage.