Michigan Hackathon : January 17th-19th

We've got another Hackathon going down in January. My coworkers and I will be there playing around, helping out, and raising hell. We're bringing a Raspberry Pi, a few Arduinos, and quite possibly a dirigible to this event. If you want more information, or to register or show up, visit mhacks.org

The site does a poor job of advertising that it is for ALL people, not just college and high school students. If you're a geek, nerd, or just like electronics and want to show up, and spend 36 hours hacking away at some various and interesting electronics projects. I suggest you get on that site and register to attend (or if you're old like me, send them an email).

Check out some pictures from the one in September. 

High Altitude Ballon Project

For the last few months, I've been engaging the Livonia Amateur Radio Club to launch a high altitude balloon project. This weather balloon will be equipped with an electronics payload that provide the following:

  • Tracking via GPS. In the Amateur Radio world, this is known as APRS.
  • Provide telemetry via a beacon (This is a transmission, that if you can hear it, you let us know via a form on our website). This lets us measure the range of the transmission. APRS does this automatically, but it's also fun for those who don't have APRS equipment.
  • Take pictures of a near-space environment. This is what we call "The money shot". Everyone loves these.
  • Transmits live video from the payload throughout it's entire journey. This will be have an overlay with the current GPS coordinates as well, to aid with tracking.
  • Records sensor data including internal and external temperatures and the effects of temperatures and loads on batteries.

If you'd like more information about how this all works, or the status of this project, visit http://larcballon.blogspot.com or http://k8uns.org/

JQuery loading of Google Charts

I frequently work with Google Charts, and got tired of hand coding each of the charts individually, so I wrote a JQuery script (which I may convert into a plugin) that detects the data dumped directly into the data element of a div assigned to the chart. I've posted the code to JSFiddle. Feel free to use and extend this as needed. This is convenient, as you don't need to build a bunch of Javascript data to implement the chart. Additionally, you could convert this to pull data from a JSON source (since the data is in JSON format).

Lazy Loading PHP Subclasses as Attributes

Today I began writing a set of classes to consume a SOAP service. The classes are growing in strength, and with performance, and scalability in mind, I decided to auto-load the classes. The object structures are as follows:

  • MainClass
  • MainClassNameSpace
    • ChildClass
    • ChildClassNamespace
      • GrandChildClass
    • ChildClass2
    • ChildClass2Namespace
      • GrandChild2Class

The MainClass contains calls to some of the SoapClient classes I've written, but the objects are the part I want to lazy load. Here's an example: 

$cls = new MainClass($someParameters)

$collection_of_grand_child_classes = $cls->ChildClass->getGrandChildren();
$collection_of_grand_child2_classes = $cls->ChildClass2->getGrandChildren()

Let's say I'm calling $cls->ChildClass2, but I don't want to use up the memory space to load Childclass.

To implement this, I've used the __autoload() magic function of php. 

function autoload($full_namespace) {

$full_namespace = str_replace('\\', '/', $full_namespace);

try {

$file = dirname($_SERVER['SCRIPT_FILENAME']) . '/inc/' . $full_namespace . '.php';
if(file_exists($file)) {

require $file;

} else { 

throw new Exception('Could not autoload class: ' . $full_namespace);

} catch (Exception $ex) {
return $ex->getMessage();

function __construct() { 

This dynamically finds the class, and then loads their include files when they are called, and thus defines the class. They are, unfortunately, still not instantiated, unless I call their constructor. To get around this, I define an array of child objects : 

private $_objects = array(); 

I then you use the magic function __get() to create the object: 

public function __get($var) { 
if(!isset($this->_objects[$var])) { 
$class = get_class() . '\\' . $var;
$this->_objects[$var] = new $class($this);

return $this->_objects[$var];

I'm not a designer, and neither are you.

Let me start off by making something perfectly clear. I am not a graphics designer. I'm more of a backend developer. My typical day consists of setting up or fixing LAMP servers, architecting a database structure, writing PHP or .NET code, maybe a little image/css work.

Every now and then I get thrown a quick task of posting something to a website (in this instance, a Wordpress site). This little non-profit in Detroit is throwing a Gala & Auction event. A marketing firm was brought in to create the materials, and then they were sent to me to post on the website.

Yep. That's it. Again, I am not a graphics designer, but when I see something like that, I cringe a little bit.

After a quick word with a team member, I take it as a personal obligation to make sure that never sees the light of day. After an hour or two, these are the results. 

I personally am never satisfied with my own design work. I always feel like there's something missing, or left to do. This is the reason that I don't do graphics work. I could have spent another 10 hours tweaking each of these images, and by the time I was done, I would've completely hated them, and deleted. 

Any graphics designers out there, feel free to give me feedback. I'm always looking to learn a thing or two!

My Relationship with Dave Ramsey

Dave Ramsey.

For those of you who haven't heard of him, Dave is a life advisor. He focuses on Financial Issues, but his advice will change your life. He's got a talk radio show in just about every major city in this great nation of ours. His book is on the New York Times Best Seller list. He's helped over a million people solve their financial problems. And if you have debt, you need Dave Ramsey.

Dave tells it as it is, which is why I love him. If you borrowed money, you paid a "stupid tax". He doesn't tell people that what they've done is "ok". He slaps you senseless and sets you on the straight and narrow to financial freedom.

I started on Dave Ramsey's financial plan about 2½ years ago. I had $10,000 in credit card debt. I had financed a motorcycle for $12,000 (and wrecked it, without enough insurance, leaving me owing $4500). I had two car (f)lease payments for $660 / month, a $25,000 home equity loan, a home improvement loan for $3500, and enough stress to push an endangered species to extinction. Dave Ramsey would say I was a selfish, immature brat, who thought he could borrow his way through life. Amazon.com was my daily shopping spree.

Fast forward to today. My credit cards are paid off, the motorcycle was paid off and sold, both leases are gone, Home improvement loan...gone. We're down to two debts. The home equity loan, and my wife's car.

Wait, did I just say wife's car? Yes, I financed a car while working the baby steps. That was stupid, and I regret it. I didn't follow his plan perfectly, which is why I'm not already out of debt. I added $12k to that big pile of stupid. Let me sum this up for you. I paid off nearly $30,000 in 2½, without changing my salary. And that was without the serious budgeting that Dave recommends.

Creating a budget is the heart of Dave Ramsey's baby step program, and my wife and I couldn't do it without breaking into a fight. Until last week.

We've got our first budget for September locked down. We're in agreement, we're not fighting, we're working together. This last $23,000 of debt (not including the primary mortgage) should be paid off within 6 months.

We don't eat out anymore, we don't go to the movies, I even cancelled my hunting trip this year (which I live for). I'm selling my toys, and we are going "Gazelle Intense" until this problem is taken care of. Anybody need anything I own? It's for sale.

What are our goals?

Those of you that know me, know that I don't like my house. We bought this house when we were broke, and we bought a cheap, fixer-upper. There's no basement, no garage, and nearly no land. 

I'm 30 years old as of this writing. By the time I'm 50, we want to be in a house we love, and have it paid off. That's 20 19 (yikes, I turn 31 in 2 months) years from now. I've got 4 years to get this house above water and take out a 15 year (not 30) fixed interest loan on that house (while putting 20% down). I couldn't do that without Dave Ramsey, and for that reason, he's my hero.

If you are in debt (even if you don't know you're in debt), you should get a little bit crazy, and check out his show. Even if you can't afford his book, you can listen to his show for free. After you've been listening for a while, you'll understand the process. I'm to the point where I can listen to the callers, and answer their questions before Dave does. 

If you can afford the book, go get a copy of the Total Money Makeover. It will change your life. 

Thanks Dave!

Best Practices: Data Connectivity and PHP Deployment

The environment I work in is a complex mess of COTS tools and custom developed code. We're preparing to bring up a new server farm, and clean up this inherited mess and as the lead developer I'm tasked with making some critical development decisions with regard to this environment. 

One of these decisions is surrounding data connectivity. Currently, every application has it's own data configuration file, or the server names are hardcoded in the files. I completely hate this, as when we prepared to bring up a new mysql server, it was a nightmare task of searching and find/replace in files. 

I was contemplating adding a PHP variable in the Apache Config, but that wouldn't help with COTS tools, unless I modify their configuration:

SetEnv mysql.server "localhost"

We currently make use of SetEnv to configure things like CakePHP paths 

SetEnv cake_includes_path "/path/to/lib/"

SetEnv cake_apps_path "/path/to/apps/"

The change I'm attempting to make is standardizing the server configuration. I'm planning to add a host entry into the web servers called mysql.server. This will allow all the COTS tools to easily be configured to use the server, as well as any coding applications. 


Does anyone have any other best practices with load balanced Apache servers in terms of database connectivity?

Why I ask, "What company?".


The phone rings. It's my friendly neighborhood technical recruiter calling. He begins with the usual - "Are you satisfied in your current position? Would you be looking to make a change? I have a fantastic opportunity for you."

He continues. "They are looking for a .NET developer with 5 years of experience in the Southfield area. Great pay, great benefits."I've heard it many times. As a developer with experience in web, mobile, desktop, and system administration, I'm in high demand. 

"What's the company?" I ask.

"I can't tell you that." He replies.

"I'm sorry, I'm not interested. If you change you'remind, please feel free to call me back."

Why do I need to know what company he is hiring for?

Because I've worked for many of them. As a consultant, I've worked on six month projects for many of the area's IT firms. I ask about the company because I am in a comfortable position, and there are only a few select places I would give up this position to leave for.

If you don't want to tell me, that's fine. I understand confidentiality, and you're working for a commission, but understand, when I find that job on Monster.com, or Dice.com, 9 out of 10 times, Searching for a couple keywords in the listing on Google will land me on the employer's own website anyways.  

Most of the time, I've already received four other calls for the same position, and they freely gave up the position, so you're just singling yourself out as hard to work with.

In this economy, there are many people who are looking for work. They may or may not care who the employer is. Those of us who are in comfortable positions and aren't actively looking typically do care.

The moral of the story is, don't be suprised when we ask for these details. If you're looking to earn your comission from my change of employment, be prepared to answer that question.