Monday, October 26 2020, 01:50 pm

Upgrading my viewing experience for 4K

The world has been slowly transitioning to "4K" video for the past 5 years. The leap from 1080p "Full HD" (FHD) to 2160p "Ultra HD" (UHD) is riddled with a few alternative sizes, codecs, and optional features. After playing the waiting game long enough I felt it was finally time to upgrade my HTPC that powers my main media consumption to support the new media formats.

Origin Story

Almost eight years ago today on November, 2012, I purchased my original home theater PC (HTPC). The target was something that would play 1080p FHD video and audio through an HDMI connection. I'll also list the original purchase prices from that time.

  • Motherboard: ASUS P8Z77-I DELUXE (Mini-ITX) - $179.99
  • CPU: Intel Core i3-3225 (3.3Ghz Ivy Bridge, 2-core, 4-thread) - $129.99
  • RAM: 2x4GB G.Skill DDR3-1600 CL9 1.25v - $42.99
  • Total: $352.97 ($0 sales tax)

At the same time I also had to buy the mini-ITX case, SSD, and slot-load blu-ray drive, but those are still in use today. This system was capable of playing the most common video codec of the time, H.264, but that codec is being slowly phased out for the future alternatives of H.265, VP9, and AV1. The i3 CPU can only offload H.264 processing so some, high quality "4K" media using H.265 or VP9 would stutter on playback.

The Upgrade

  • Motherboard: Gigabyte B450 I AORUS PRO WIFI - $119.99
  • CPU: AMD Ryzen 5 3400G - $134.99
  • RAM: 2x8GB Crucial DDR4-3600 CL16 1.35v - $74.99
  • Total: $357.19 ($27.22 sales tax)

So for roughly the same price (or cheaper sans sales tax and inflation) I was able to get a "4K"-ready replacement system. The motherboard and CPU are HDMI 2.0b compatible so I should be able to play any current "4K" media. The CPU can offload processing of H.264, H.265, and VP9. All 4K media I have thrown at it has played smoothly as expected. The AV1 codec will be supported in 2021-2022 CPUs, but if it is anything like the adoption rate of H.265 it will be a few years before it is in widespread use.


An ulterior motive for the upgrade was to also be able to play a few games. The i3 could play very basic games, or I could use Steam remote play, but I wanted something more robust. The 3400G provides that. All benchmarks used the same SSD so software was identical. Fedora 32 was the base OS and was fully updated as of October 23, 2020. Base software: Kernel 5.8.15, Mesa 20.1.10.

Unigine Heaven
  • Resolution: 1920x1080
  • Quality: High
  • FSAA: Disabled
  • Tesselation: Disabled

htpc-unigine-benchmark-2020.png, Oct 2020


Test File: 1980x1080, 60FPS, 14Mbit H.264 Video, 13 minutes long vaapi-benchmark-2020.png, Oct 2020

Power Utilization
  • Core i3 System - Idle: 32 watts
  • Ryzen 5 System (Overlocked) - Idle: 21 watts
  • Core i3 System - FHD Movie: 38 watts
  • Ryzen 5 System (Overlocked) - FHD Movie: 30 watts
  • Ryzen 5 System (Overlocked) - UHD Movie: 39 watts

Sunday, February 9 2020, 07:46 pm

Race Car 2.0 Build Log - 2006 BMW M3

Race Car 1.0 was in my possession for almost 10 years until a road accident totalled it. Version 2.0 is built upon previous knowledge and newer products now available. The following lists and photos detail building the new car from stock back to a track ready vehicle.

New parts list

  1. Autopower Race Rollbar
  2. MCS 2-way adjustable coilovers w/ true rear coilovers
  3. Front: 600lbs / Rear: 350lbs Hypercoil 2.25" springs
  4. DIFtech Camber Plates
  5. Turner Motorsport Monoball FCABs
  6. Bimmerworld v3 Brake Lines w/ heat shielding
  7. Castrol SRF Brake Fluid
  8. Redish Subframe Reinforcement
  9. CMP RTABs
  10. CMP Raising Subframe Bushings
  11. Bimmerworld Premium Studs 82mm
  12. Brake Ducting (3" Orange, 450 degree rated)
  13. eBay Chinese Fog Light / Brake Duct bumper mounts
  14. Custom CNC generated rear shock tower reinforcement

Used parts list

  1. Status race seats
  2. PCI race seat slider mounts
  3. 6 point Schroth Profi II harnesses
  4. OEM Euro headers (ceramic coated)
  5. Brake duct plates
  6. Braided stainless high pressure power steering line
  7. Ground Control Race Front Sway Bar
  8. Turner Motorsport Rear Control Arms
  9. 18x10 CCW Corsair wheels w/ Pirelli DH slicks

Work list

  1. Gutted fiberglass from stock muffler and welded plates over perforated pipe sections
  2. Power steering flush
  3. Brake fluid flush
  4. Differential fluid flush
  5. Flash custom tune built with hex editor and XDF files/Tuner Pro

Post-Installation Gallery

Friday, January 12 2018, 10:23 am

Calm the hysteria, security patch performance is OK

Unfortunately some bad benchmark data has caused a stir among the greater Internet community. I have chosen to perform my own independent benchmark tests to see if the security patches for Meltdown and Spectre introduce any harm to my everyday life. TL;DR: They don't in the slightest.

Continue reading...

Wednesday, February 18 2015, 06:15 pm

Linux is [Unfortunately] About Choice

Ask anyone to name things they find wrong with the Linux ecosystem. I expect you'll get responses along the line of:

  • GNOME sucks
  • KDE sucks
  • GCC sucks
  • Firefox sucks
  • GPLv2 sucks
  • RPM sucks
  • Gaming sucks

What's the solution most commonly found? "Fork it, bro!"

Forking software is a legitimate reason under specific circumstances:

  • Licensing
  • M.I.A. upstream

Successful, legitimate forks:

  • LibreOffice
  • MariaDB

Forking is not a clear right to do anything you want such as creating a new distribution with a new, cool name and flashy art logos. Bad forking reasons:

  • I want to make a name for myself
  • I want a different desktop environment
  • I want a different desktop wallpaper

"Why not? I certainly am going to fork it!"

Yes, there is enough software produced for one person to be able to quickly and easily create an ISO file for users to download and call a new distribution. Before you say, yes, ask yourself these questions:

  • Do I have at least 5 people to provided a full-time job's worth of time to it?
  • Do I / they have enough time to apply security patches and / or update to the latest upstream version for a majority of the software?
  • Do you serve a product that provides a clear purpose other than a new desktop or flashy art?

All it takes is one "no" answer to put an end to your forking dreams. Just Don't Do It.

Monday, February 16 2015, 05:00 pm

Passion in Business

Suppose we live in a perfect world where everyone is content and their every need is satisfied. It doesn't exist. Our planet runs on consumerism. "Business as usual." What's keeping us going? That threat of no job? No money to buy cigerettes and beer?

Workers clock in for their 8 to 5 shift at the same time and clock out like no tomorrow will be different. They follow meetings and schedules and policies as if they have been set in stone since the dawn of time. Without question and without opinion.

Countless pieces of rhetoric have touched on this subject so it may seem redundant or frivolous, but I digress because if it was no longer an important issue we would no longer be talking about it. (See: Fight Club, The Matrix, THX 1158)

I propose a new purpose in the workplace. When you're given a task try to think about all of the possibilities that could be drawn from it. Positive and negative conclusions can drive the project into a direction that makes sense. More nay-sayers and less yes-men.

Find a more efficient way to use your time? Speak up!

Saturday, June 28 2014, 07:47 pm

Ugly Cars Olympics

The following vehicles are so ugly that I cannot post photos of them as they would otherwise tarnish this fine establishment. Just image search if you have been living under a rock.

Bronze: 2000-2010 VW Beetle

What started off as an economical and functional car (see 60s Beetle) ended up being a marketing tool to drive sales. This must be the most plain vehicle ever designed. Its symetrical body leaves nothing to the imagination. If you're caught driving one your masculinity will be in question.

Silver: Chrysler PT Cruiser

An original design that was never warranted. Undoubtably the people in Detroit that put this monstrosity together all patted themselves on their back as it sold more than it ever should have. Is it a "beach-going" car? Is it a "fun-economical" car? Neither. It looks best in a car crusher.

Gold: Pontiac Aztek

Without contest, the Aztek takes gold. It's received countless commedations across numerious publications for being butt ugly. Amazingly there are individuals who have paid with their hard-earned money for one of these. I would love the opportunity to interview an owner and find the source of their desire for the ugliest car on the planet. It would be a sincere and cordial interview of course.

Friday, April 18 2014, 07:00 pm

Dressing to Unimpress

Contrary to popular belief the purpose of church is to further educate your spirit and renew your faith in God. When people worshipped in temples that had bare earth for a floor and stone for benches they did not bear silk dresses or kahki slacks. Gathering for worship should be a casual encounter and not a date with Christ. I call upon Christians to keep their fancy attire locked in the closet and attend each Sunday with their everyday clothing (if it is a suit, so be it!).

My reasoning for my feelings? A touch of a sense of biggotry with a dash of vanity. We're taught to be humble and love one another. There are those that do not have the benefit of a Sunday outfit and we should not exclude anyone by an unspoken expectation of one. A change of dress code would do us all a little good as church has become too much of a social function instead of a spritual one.

Friday, August 24 2012, 09:10 pm

Third Times the Charm

I am putting in the call now. The Texas Rangers must win the World Series this year. The team has finally clicked and is firing on all cylinders. For most of the season they have flirted with the best record in the AL or MLB. They post high or first in the power rankings. No one else in the AL seems to be much of a threat unless Tamba Bay the Athletics keeps up their offense. I don't know what to make of the Reds or Nats in the NL until we face them in the WS, but I don't believe they are as good as us.

Why the urgency? I have a feeling after this year that the players entering free agency will part ways. Yes, the dugout is friendly and everyone are good friends but my instinct tells me Hamilton will depart for a larger contract. Other names may leave as well. This year is the year this team needs to win it all.

Thursday, December 22 2011, 07:09 am

Crossing the Streams to the Playstation 3 (part 2)

Lets say you have downloaded some TV shows. I won't ask where you got them, but I will show you how to play them on the PS3 through Mediatomb. This will require the patches mentioned in the part 1 post as video playing is pretty stupid without them.

First off, Mediatomb needs to know what to do with .mkv files on your computer. The PS3 has no idea how to play Matroska containers unfortunately. It would be a simple and free (as in speech) for Sony to implement, but that's too hard for them to do without money or IP rights in their favor. The following settings will tell Mediatomb to stream MKV files as MPEG files and use ffmpeg to transcode.


<extension-mimetype ignore-unknown="no">
    <map from="mkv" to="video/x-matroska"/>
    ... other maps already exist, don't delete them ...
... skip down to the <profiles> tag and add this block...
<profile name="video-matroska" enabled="yes" type="external">
    <agent command="ffmpeg-tr" arguments="%in %out %range" />
    <buffer size="10485760" chunk-size="524288" fill-size="0"/>

The following are a few "ffmpeg-tr" script file examples. Ffmpeg has a few options as I have come to find out that the PS3 is a bit picky at video encodings. If you do not have a flawlessly encoded file the PS3 will most likely not play the file.

The first example will require a fast machine (at least 4 cores) as it reencodes the video into a fresh H.264 stream and leaves the audio intact. Use this if the video file you have is skipping or not even playing on the PS3.



START_SECONDS=`echo "$3" | awk '{split($0,a,"-"); print a[1]}'`
MILLISECONDS=`echo "$START_SECONDS" | awk '{split($0,a,"."); print a[2]}'`
START_TIME=`echo $START_SECONDS | awk '{print strftime("%H:%M:%S", $0,1)}'`
END_SECONDS=`echo "$3" | awk '{split($0,a,"-"); print a[2]}'`
if [ -z $END_SECONDS ]
MILLISECONDS=`echo "$END_SECONDS" | awk '{split($0,a,"."); print a[2]}'`
END_TIME=`echo $END_SECONDS | awk '{print strftime("%H:%M:%S", $0,1)}'`

exec /usr/bin/ffmpeg -threads 4 -r 24000/1001 -i "$1" -vcodec libx264 -b 8000k -preset faster -level 41 -r 24000/1001 -vsync 1 -acodec copy -async 1 -f mpegts - > "$2"

If your video file is in good shape, then you can get away without encoding anything. Most .mkv files are already in video formats the PS3 will play (h.264 video, AC3/Dolby audio) so you can get away with a direct copy of the data. This requires very little computing power so any computer can do this.



START_SECONDS=`echo "$3" | awk '{split($0,a,"-"); print a[1]}'`
MILLISECONDS=`echo "$START_SECONDS" | awk '{split($0,a,"."); print a[2]}'`
START_TIME=`echo $START_SECONDS | awk '{print strftime("%H:%M:%S", $0,1)}'`
END_SECONDS=`echo "$3" | awk '{split($0,a,"-"); print a[2]}'`
if [ -z $END_SECONDS ]
MILLISECONDS=`echo "$END_SECONDS" | awk '{split($0,a,"."); print a[2]}'`
END_TIME=`echo $END_SECONDS | awk '{print strftime("%H:%M:%S", $0,1)}'`

exec /usr/bin/ffmpeg -threads 4 -i "$1" -vcodec copy -vbsf h264_mp4toannexb -acodec copy -copyts -copytb -f mpegts - > "$2"

You can also mix and match between re-encoding audio only or both video and audio.

Tuesday, October 18 2011, 09:57 pm

Crossing the Streams to the Playstation 3 (part 1)

I wish I didn't have to write this article, but when there's a dozen audio formats, a dozen video formats, and a dozen media containers there's only one result: headaches. If you own a Playstation 3, a Linux computer, and have Mediatomb installed, you can take advantage of the UPnP feature on the PS3 to play your audio or video over the network. This part 1 of 2 posting will start with audio.


The Playstation 3 is a funny thing when it comes to audio. If you only have Optical (TosLink) or Coax audio output you're stuck with 48kHz sample rate. If you have HDMI you can go higher. The example below will get you FLAC transcoding into 48kHz PCM that the Playstation 3 will play.


<profile name="audio-flac" enabled="yes" type="external">
   <agent command="ffmpeg-flac" arguments="%in %out" />
   <buffer size="4194304" chunk-size="262144" fill-size="0"/>



exec /usr/bin/ffmpeg -threads 2 -i "$1" -ar 48000 -acodec pcm_s16be -f alaw - > "$2"

Why 48kHz? I have some 96kHz media so I'd rather it go to the PS3 at the best possible rate. The PS3 will resample to 48kHz if you choose to go with 44.1kHz anyway so you might as well go with 48kHz. You can up this to 96kHz on an HDMI connection, but I don't have one to test with.

Extra Credit

Mediatomb development does not seem very active, but some folks have made patches to add features that make streaming more enjoyable. One annoying part of streaming on the PS3 is the default grey music icon for your tracks. This can be replaced by the album art with patch number one. You can't seek in tracks either, but that is also negated with patch number two.

Coming up: Transcoding matroska containers into the best possible format.

Wednesday, October 5 2011, 01:46 am

Go Go Texas Rangers

texas-rangers.jpg This is the year I can feel it. The year the Texas Rangers win the World Series. Each player is continuing to play well in the playoffs. They might not be a constant force in every game, but every player has stepped up. TV commentators have been forced to mention how well the Ranger's batting order plays and how there is no real "number 9" slot.

In a perfect world they will sweep the National League team, which will work out perfectly for my Game 4 tickets. The NL teams look like they will be good competition though so I will just hope for a good Game 4 to go to.

Go Rangers!

Friday, September 9 2011, 05:20 pm

Put This In Your Pipe and Market It

Places of higher education teach ways in exploiting the ignorance of the common man. Who'd a thunk it? Read on, if you dare, to find out the results of the Humble Geek marketing contest.

Honorable Mention

Inserting advertising into TV reruns is a new fashion statement.

Second Place

Restricted to late night or weekend time slots, informercials provide marketing in 30 minute episodes. Cheap slogans are what make or break these gems. Who can forget "set it and forget it!"?

First Place

The pinnacle of marketing gimmicks must be the 30-second "As Seen on TV" advertisement. In under a minute you are bombarded with how your life is too hard and how you should spend $19.95 plus some shipping and handling for, not one, but two easy cut knives and a bonus cooking pamphlet. The First World has too many problems and we must be saved.

Monday, August 29 2011, 01:13 pm

We Take Our Existance in Vain

You know what really grinds my gears? When you pull out of a drive-thru window at a restaurant and you get behind some old guy going 5 below the speed limit. --Old Chinese Proverb

  • Gladiators (Animal fighting)

Killing humans (and animals) in the name of sport.

  • Saloons (Clubs)

Killing brain cells in the name of finding a mate.

  • Reality TV

Killing common sense in the name of money.

  • Social Networking

Killing privacy in the name of information.

  • Government Privilege

Killing freedom in the name of power.

What do the bullet points have in common? A chronic disease found inside all living creatures that keeps us from being perfect: vanity. Heck, we even have a magazine that exclusively tailors to it!

Stop me if I'm being too obvious, but if we don't change now we are destined to have the film Idiocracy become a documentary.

Monday, August 8 2011, 10:35 am

Yearning to Learn Computer Programming?

Controlling the flow of electricity inside your computer is a phrase that sounds better than the noun I will blab about today: programming. Sure, you could read a "How-to Program in 30 Minutes!" book or Google search another blog for a lesson or two, but if you want to understand why instead of how programs function then please pay attention.

What programming language should I learn first?

Say what again. I dare you. Wrong question to ask. Understanding concepts and having common sense are far more important than the language. Those two qualities will carry over across multiple languages unless the language itself is poor. Specifically you must understand that your code must be generic and modular. These are not new concepts, but they are easily overlooked or not mentioned any more. Modern texts teach specific language techniques that get you running a basic program quickly, but when you attempt your own program you end up with something that will not compile.

Programming: think, design, analyze

Please be prepared to spend hours on a simple problem. If the first solution you think of involves a globally accessible variable and calling it directly across three functions there is probably another solution that puts the variable in a restricted name space. Never take the easy way out until you are certain it is the only way out. If in doubt speak out! Ask questions among other programmers and see if your idea is worth the bytes used to store it.

Redesign is fine

It is rare for me to accept the code I write the first time as good code. With this in mind, you should be prepared to see the code you write in the future. Don't become too attached to it as you may find out it has serious bugs that may require you to completely rewrite the code. Plan ahead by not only leaving good comments, but clearly defining test blocks. I have seen older code blocks with tests that are not obvious until I study three other source files. It should never take longer than a few minutes to catch up on code you have not seen in a while.

Show me the money

Ready to start programming? Start with globally used, free tools. The C and Python languages have large open source communities with tools that work on Windows, Linux, and OS X. Don't forget to save any code you write into a version control system. Git is a good start. Using git alone is a good test to see if you can make it as a programmer or not.

Sunday, June 12 2011, 10:43 pm

The Time is Now

mavs-2011 A team that played team basketball has taken the 2011 NBA Championship. Congratulations are in order for the Dallas Mavericks as they put together a team of players that have tales of Finals lost but finally won their vindication tonight.

There is No "I" in Team

dirk-on-lebron The 2011 NBA season was littered with media attention that was concentrated on two or three players and not a NBA team. I have no doubt that the off-season will be littered with what two or three players need to do instead of what a team needs to do to return to the NBA finals in 2012.

What Will the Future Bring

Will Kidd retire? Will there be any changes on the Dallas line up? I don't think anyone has a return trip for the Mavericks in their mind right now, but I believe it is possible. The team that had everyone in the media against them did what no one thought they could do. Go Mavs! See you in a few months!

Saturday, January 15 2011, 08:00 am

Red Hat Irony

A company devoted to promoting open source initiatives uses one of the largest closed source database engines on the planet. Red Hat uses Oracle, in particular, with their Satellite software (a.k.a. Spacewalk). The bright light at the end of the tunnel is that they are switching to using PostgreSQL, however it is not a high priority so it may take another year or two before the transition is complete.

Sunday, January 9 2011, 08:00 am

GT5: A Love/Hate Relationship

Six years in the making, then delayed by worries about piracy (which is already broken), Gran Turismo 5 hopes to push up the bar in car simulation games. How does it fair? Follow me as I review a few aspects of the game that left an impression on me.


The game has been polished with the most expensive car wax Sony could buy. The Premium cars, tracks, and photo mode are definitely great pieces of eye candy. However, the Standard cars are a big eye sore when you have one next to a Premium. It's unfortunate that Standard cars were not at least given a larger resolution skin for their bodies.

All of the traditional Gran Turismo tracks are present along with a few new ones. The license tests unlock the full Nürburgring track. The snow and dirt tracks bring a new, challenging races. Then there's the Top Gear track, from one of my favorite shows. It's more difficult than it looks on television.

Now to get down and dirty. The computer racers do not have a clue that you exist in the race. I will be repeatedly rammed from behind or side swiped by turning cars. More than once I have had to restart a race due to an AI driver knocking me off track. This problem is often called "sitting on rails" and it is easily seen in this simul^W... game.

Mechanically the cars are all treated in a generic, arcade-like manner instead of like a simulator. Transmissions shift as fast as F1 cars. Even the 1960 models - unmodified. I have yet to see the merit in the transmission tuning upgrades. I actually own a 2005 BMW M3 and can tell you it is already modified, at stock, as good as it can get. Putting on new exhaust or intake systems hardly give more than 20 HP (and I'm talking about $5,000 in mods). In Gran Turismo 5, the tuning shop tells me the 2004 BMW M3 will get 30 HP just from a new air filter and new exhaust. The one positive thing I have seen is that the cars that have paddle shifters finally have paddle shifters in the interior view. They were missing from the Prologue version.

Created by a company based in Japan, there is an astonishing amount of NASCAR material. From special events to a large amount of cars, it seems the creators love NASCAR. The only real motorsport, Formula 1, has a lesser following with only four cars and no special events.

The menu system is a bit akward at times. For example: pausing the game, going into settings, then backing out, immediately resumes the game instead of backing out one level. Loading times seem to be at fixed times - I have a Intel G2 80gb SSD and loading times take about 15 seconds with very little activity on the HDD light. This can be annoying when there are 5 menus to go through to get to a race, too. If you don't play connected to Sony's Playstation Network, expect to be greated with a half dozen "Would you like to go online?" prompts, too.

There are patches being released to tweak parts of the game so there is hope the game will become a truer simulator over time.

Thursday, October 28 2010, 12:01 am

Cross-Platform Graphical Library Maddness

An application that provides the user a window with buttons and input boxes is a given in today's graphically driven computer universe. Operating systems of all shapes and sizes provide a programmer the tools and libraries to accomplish their goal of providing such an application. Most of them are pretty boring or are too specialized to be worth taking time to study. The libraries that people should familiarize themselves with are those that can be utilized across operating systems, which include being able to run across multiple types of hardware devices. Two libraries come to mind - GTK+ [has a very interesting history] and Qt (pronounced "cute").


Today, both libraries offer very simple methods of creating a GUI. So, depending on what language your project requires, either one would be able to provide you with a robust and full featured set of options. The current drive to use Qt is entirely commercial driven - by Nokia - who owns Qt. It's the same drive that Sun made with Java. There's no logical reason to use Java. People have just be taught that it [Java] is the best and there is no other language that can do the same job (read: subjective).

I believe the "Qt hate" or "GTK+ hate" stems from the past when Qt didn't offer as many cross-platform routines as Glib (from GTK+) did or vice versa. It has been my observation that people have not spent any time with both libraries and make rash statements about the other library out of ignorance. Most Qt developers view GTK+ as a legacy library that should be abandoned. Don't tell them that there is still active GTK+ development (GTK+ 3.0 is coming soon) driven by a large community, which includes Red Hat.

Need a simple OpenGL widget in your window? There's GtkGLExt, or Clutter for GTK. Starting with Qt 4.0 a similar API for OpenGL handling was implemented.

Need video/audio capability? GTK+ apps can use GStreamer. Qt has phonon.

Need XML or HTML handling? GTK apps can use libxml or GtkWebKit while Qt apps would need to use the Qt APIs.

Nokia is also attempting to drive Qt as a "write once, run anywhere" library. This is great in that it some-what promotes FOSS, but if you wish to use GTK+ you can write once and run anywhere, too. I have done so with a GTK+ app for my $DAYJOB that can compile under Fedora and Windows and does advanced things like TLS encrypted XML packets over a TCP connection and scanning documents (using SANE). Neither library has an advantage.

More recently, Nokia has tried to push the mantra that you can write a Qt app quickly and simply. GTK+ developers can also use Vala to write a GTK+ app quickly and simply. The amount of code to write to accomplish the same goal in each library also ends up being about the same.

I can come up with any more number of examples, but those are ones I have seen used in arguments lately. The person arguing for using Qt has no idea about the matching GTK+ API and vice versa. I think it's great that both Qt and GTK+ offer such a wide range of features that are easy-to-use. You can choose a language (C, C++, Vala, Python, PHP) and write a program that could be used by thousands or millions of people across many different types of devices. Now get out there and start programming.

Thursday, August 5 2010, 05:43 pm

Thirty Ways a Software Grows

The following recount is rather generic in nature so I do not have to worry about stepping on any toes, but it is all true.


Everyone has a workplace story to tell and I've finally gotten around to writing about my own. I have had a rare opportunity to write and maintain software for a company that has plenty of history. The company I, still, work for has been around almost as long as Microsoft to give you a point of reference.

In The Beginning In traditional fashion of the time, which still holds true today, the company started by buying the rights to a software that someone else wrote. The country of origin: Canada. I do not know much about the company or who were the original authors besides a few names I've seen in copyrights, so unfortunately I do not have any juicy stories to tell about them. They wrote to Minix, which surprisingly still exists today. The data was stored in ISAM databases (Google it), which unfortunately still exists today. The program displayed via a terminal-based text screen with support for input fields and displaying different types of screen layouts, which, also unfortunately, still exists today. The only saving grace was that it was written in the C language.

Abraham Lincoln The company originated in a log cabin, now turned historical landmark. I heard the winters were cold, and the summers were hot. The size of the cabin is about the size of a traditional living room with two whole stories. There was also the shift from Minix to UNIX and DOS operating systems to keep up with growing demand.

Enterprise Split Eventually the software became outdated, in a sense, for the customer base the company wished to sell to. Enterprises wanted a more robust and fully featured software. The solution? Rewrite! The company moved to a different city, but left behind the original software - to live in its own filth.

Dungeon Upkeep Keeping the software maintained to a point people could still use it was the job of a fellow I only met once when I was being interviewed (for an unrelated position!) so I can't tell you any juicy stories about them either. However, I can tell you the software essence remained the same. They continued to use the original UNIX compiler and coding techniques. These techniques include typedefs to normal C keywords and functions. Numerous programs that simply copy & paste code from other programs. Global pointers ruled the entire source code base from top to bottom. Return values were rarely checked. Instead of calling the standard rename or delete functions, system calls were made to the operating system's shell tools. The source control system involved cloning the main source directory per release - some of which I did not find when I took over. Take this scenario for instance: One customer was given a compiled program on Monday but changes would be made to the same program and given to a different customer on Tuesday. Every customer had a unique compiled version of the software. Let that settle in your mind for a moment.

Change of Hands A friend of mine, who has moved on to greener pastures, took over a few years ago. He began a very important and rigorous job of evolving the software into a state that a guy off the street could come in and program to. The code went from 1980s leftovers to 1990s l33tsauce. It was now source controlled in CVS and macros were removed. Some of the copied code were moved into libraries that were compiled against. A small set back to the improvements happened when another programmer was hired and began transforming perfectly good code into obfuscated and over coded code. String pointers were turned into "static const char *const variable;" nightmares. Functions were rewritten to be twice as long and contained bugs that I had to find and fix for about a year.

Modern Tools After I took over we released a major version. This version was the first version where all of the software was released in one update. It was all source controlled, and I implemented a sane update system that insured customers would all be on the same software level. Lately we've moved the code into git and I have been loving every minute of it. The software is slowly emerging from its colorful past.

Over the Rainbow GUI, SQL, Cross-platform. These three words are the embodiment of the future of the company. If I get a chance to finish the project, it should provide the company and its customers with a fresh breath of life.

Wednesday, March 31 2010, 09:54 pm

SSDs Speed Up Anything and Everything

Computer storage technology was running out of innovation a couple of years ago until the next step, in many steps to come, arrived: the Solid State Drive. Quick summary: Traditional hard drives are spinning discs of a magnetic substance that hold all your precious junk. An SSD is a collection of flash memory modules similar to those found in SD cards for your handheld camera. The end result is RAM-like performance without the con of losing everything when you turn off the power. It's hard to grasp this concept until you've seen the difference first hand.

First up I decided to install Fedora 12 x86_64 and perform a package update. This involves hundreds of packages ranging in all shapes and sizes. On a traditional hard drive I would be dreading the thought of performing this operation as it would most likely take about 15 minutes of my precious time. My mind can now rest at ease with the speed of an SSD:


The target device my SSD was going into was the Sony Playstation 3 as I noticed the multitasking introduced in previous updates caused excessive hard drive usage, most likely by usage of lots of swap space. It's slightly visible in the video below that the performance delta between boot times is different:


In other important news, my Grand Theft Auto 4 boot times were reduced by 20 seconds to 1 minute 37 seconds. A new GTA4 patch reduced that by another 4 seconds. I can also tell that there is some intentional latency programmed into the multi-tasking option. Was the $200 upgrade worth it? Yes ma'am!

Problem: Taking out the trash takes a long time to do.
Solution: Install an SSD!

- page 1 of 9