I really want to be a programmer….no REALLY!!!!

Years ago, at least as far back as kindergarten, I knew I wanted to grow up and be a programmer. Life took small detours along the way and I never followed through with my dream of writing code full time. Today I am an ERP administrator, which means my main function is to understand the system that nobody else can. Every now and then it does allow me to flex my mad SQL skillz to get some quick answers. But most of the heavy coding is done by a different team of developers who are usually responding to my requests that essentially say “I need a report that looks like this…”.

Last weekend though I had to come up with a short term solution to a problem. The problem is that a “highly critical” report was needed daily and the developer team wasn’t going to be able to get it out for at least another two to three weeks.

Now, I won’t get in to the debate over the merits of this particular report, or the determination that it needs to be deemed highly critical.  But the condescending tone of the previous sentence will give you the gist of my personal take on the situation.

Anyway, my solution to the short term problem is to copy a report in to Excel and have a VBA macro run around and create a stand in report.

Now I will be the first one to admit I am no Excel wizard.  I mainly use it to do simple math, and to hold large sets of data that I’m waiting to import in to a SQL database.  Beyond that I tend to avoid Excel like the plague.1

Anyway, so here’s the basic problem, look in to the future2 and try to figure out what day we are going to run out of material based on what our usage is going to be.

Now some of you may be thinking to yourself “Wait a second, I just read that Wikipedia about ERP and isn’t there something called MRP3 that is supposed to do exactly that?” At this point I will point you to four paragraphs back, and lets just keep going.

So, we’ve got this mega report dumped in to Excel, need to parse through hundreds if not thousands of lines, do some math, and then spit out a completely different report that basically says exactly the same thing as the first report.4

So lets take a look at the VBA code I used to put all the right formulas in to the Excel sheet.

' Past Due Value
ActiveCell.Offset(0, 3).Select
ActiveCell.Formula = "=If(" & ActiveCell.Offset(-1, 0).Address & ">;0,0,ABS(" & ActiveCell.Offset(-1, 0).Address & "))"
 
' Move over one cell and put one huge mega formula in place
For i = 1 To 6
  ActiveCell.Offset(0, 1).Select
  ActiveCell.Formula = "=If(" & ActiveCell.Offset(-3, 0).Address & ">0,If(" & ActiveCell.Offset(-1, -1).Address & ">0, IF(" & ActiveCell.Offset(-1, -1).Address & "-" & ActiveCell.Offset(-3, 0).Address & ">0,0,ABS(" & ActiveCell.Offset(-1, -1).Address & "-" & ActiveCell.Offset(-3, 0).Address & "+" & ActiveCell.Offset(0, -1).Address & "))," & ActiveCell.Offset(-3, 0).Address & "),0)"
Next i

Take a look at the gigantic huge formula I’m dropping in there. Even though I wrote it, I am still completely surprised that it actually worked. Also, I’m doing the math for 7 columns, but I’ve got one set of logic for the first column and a different set for the other six. At least I was smart enough to use a for loop and keep myself from writing the same chunk of code six times in a row.

Well about two days later people realized that a couple of the rows that are part of the data set shouldn’t be included in the formulas. What complicated matters is that because I was starting from a report that was already doing some of the math, I needed to back out two of the lines from the main results, and then do my math. This all had to be done recursively as well. For an entire afternoon I tried to figure out how to make a stand alone Excel formula do the math. I wasn’t having much luck.

Then it dawned on me, I was using VBA to run the macro, why the FUCK am I using Excel to do the math?

So, this morning I re-wrote that section. Now take a look at my new code

Dim inventory As Integer
Dim demand As Integer
 
'Set current inventory and demand values
inventory = ActiveCell.Offset(-5, 2).Value
 
For i = 1 To 7
  ActiveCell.Offset(0, 1).Select
  demand = ActiveCell.Offset(-3)
  If (inventory >= demand) Then
    ActiveCell.Value = 0
    inventory = inventory - demand
  ElseIf (inventory < demand) Then
    ActiveCell.Value = Abs(demand - inventory)
    inventory = 0
  End If
  Call RemoveFormatsAndRestoreFont
Next i

Looks a hell of a lot better. Plus you can actually tell what is going on. Obviously my coding chops have a lot to be desired.

But I was pleased with the sense of accomplishment I had solving this particular problem.5

  1. One of my pet peeves are co-workers who think Excel is a word processor.  I mean COME ON people.
  2. This is some real crystal ball shit here.
  3. Yep
  4. Because the first report doesn’t look like what someone else is used to seeing we need the second report.
  5. Even though the requirement seemed stupid.

An Open Letter

To John Kleinschmidt of Oxford Michigan,

Please stop.  Go away, and leave me alone.  This has gone on too long.

Please take this as my formal request to please go away, stop reading my blog and stop reading my Twitter feed.  Please stop reading my wife’s blog and please stop reading her Twitter feed as well.

I canceled my Twitter account and shut down my old blog in the hopes that you would not find me.  Instead you came looking for me.  Why?  Is there some sane reason why you must keep yourself up to-date on me?

Yes we were once co-workers.  But that ended five years ago, when we let you go.  Afterwards you attempted to get sympathy from me by saying you had to resort to charity to get your children Christmas gifts.  Granted it was two or three days before Christmas, but why did you ever wait that long to start your Christmas shopping?  In 2006 when I moved to the Detroit area after separating from my first wife I did not want your help, sympathy, or support.  I was trying to start my life over then and establishing friendships with former co-workers is not what I wanted.

I’ve thought that through the years I have made it very clear, I simply want you to go away and leave me alone.  But you won’t for some reason.  You are on some unending quest to find out why it is that I don’t want to be friends with you.  Simply put, because.  I do not need to give you any more reason that that.

With the site www.imawhinyblogger.com you have proven without a doubt that you will go to any length to follow me around the globe.

A couple of things about this web site.

  1. All bloggers are whiny.  And I will give you credit for thinking of a clever URL.
  2. By registering it yesterday strictly for the reason of syndicating this site’s feed, you have firmly established yourself as an online stalker whose actions are now bordering on harassment.

You once knew me, but you don’t know me now.  You are not someone that I would like to associate with, and your actions have done little to make me want to change my mind.  Please tell your wife to stop trying to dig for more information.  I want to be left alone by the Kleinschmidt family.  I do not spend any of my time trying to find things out about you.  It irritates me that you must do it to me.

John, move on with your life.  I have left Michigan.  I am not going to be your friend.

Go away.

Multi directiomal

To say that I have a lot of items on my plate is doing a disservice to the Vegas buffet that my life currently is. At work we are now just days away from being late on our launch schedule. At home my wife is struggeling to find employment during the recession. Back in Michigan sits our house, empty, waing for one lucky person to decide to rent it. Oh, and the couch we had practically forgotten we ordered showed up today.

My particular portion of the facility launch is quickly hitting an end point. Our responsibility is the automation integration between the production line and our ERP system. Our piece has to be done and in the bag long before “steady state” is ever reached. A mini milestone was reached today when one of the key segments was able to complete without needing much handholding. Now all we need to do is repeat this feat of geekish engineering for another two miles of conveyor and we are set.

The house in Michigan needs to find a renter. I am so far displeased with the property manager that is “looking after” the place. Mainly because I received a call from the city to tell me the grass needed to be mowed.

My wife, well she needs a job. I don’t need to go in to the repetitive details of the struggels of finding a job in this economy.

And the couch? Yeah, we ordered it before Valentiens day. It showed up today.

Why I committed web 2.0 suicide

I used to have a completely different online persona.  That is till about two weeks ago.  Two weeks ago I was forced to commit web 2.0 suicide.  I had reached a level of complete and utter frustration with an online stalker that the only possible way I could force him to stop, was to myself stop using all my former accounts and close them.

I know who my stalker is.  He is a former co-worker.  We let him go over four years ago yet he continued to try and stay in touch with us.  Through the use of Statcounter and other analytic tools it was pretty easy to tell that he was pulling up my blog every time I posted.  I even did experiments by posting articles and watching him consistently pulling them up in under five minuets.

When I opened my Facebook and MySpace accounts he tried to friend me.  I denied and blocked him.

When I first opened my Twitter account he started following me less than two days later.  I immediately blocked him.

Things started to get really strange when I started seeing his IP address link from the RSS feed of my Twitter feed pulling up the links to my blog posts.  It was at this point I knew he was going to great lengths to keep up on my every move.

Then I met my wife1.  One day she started asking me about strange activities on her blog’s logs.  I asked her for the IP address.  I really shouldn’t have been that surprised when the IP address turned out to be his.  Soon she was seeing the same pattern of posting and a guaranteed hit in under five minutes.  He tried following her Twitter account, and was denied.

For a while we found it sad and down right humorous.  We even dedicated a site to it.

Then about two weeks ago I got a Facebook message from his “wife” that was oddly timed within moments of a comment I happened to make on a mutual acquaintance’s Facebook page.  She wanted to get the rundown on why I didn’t want to talk with him any more, and that I “didn’t have to worry” because she was “keeping this message a secret” and that “he would be really angry if he were to find out about the message.”  I showed it to my wife and mentioned something along the lines of “this is getting kind of sick.”

The next day I had the strangest urge to write a blog post.  I hadn’t written to my blog in nearly five months.  Partially because I’ve been overworked and tired, and partially because now that I had moved to Austin I really didn’t want him knowing all the ins and outs of my life down here.  But I decided to write a post anyway.  Two minutes.  Two minutes was all it took for him to pull up the post off my Twitter’s RSS feed.  I was furious.

I have moved on to a new part of my life and he is obsessed with mine.  So, I decided to kill of the part of me that he is obsessed with.  I closed my Twitter account.  I tried to delete my Facebook account2  And my old blog is dead.

Extreme?  Maybe, but he can’t stalk what isn’t posted.  And if he finds this blog, I’ll close it down as well.

  1. Well she wasn’t my wife at the time I met her.
  2. Only to find that if LastPass is set to auto login that will reactivate it.

Gang aft agley

This morning started out with some of the most noble intentions I’ve had in weeks.  I’ve needed to upload some large data sets in to our database for about a month now.  Each data set requires about an hour of uninterrupted time to prep and load.  As a consequence, this is something I cannot do while I’m actually at work.  While my body is physically located within the walls of my employer, there is not a span of time longer than ten minutes where my attention is requested by someone.  This constant stream of interruptions are bookended by meetings where I must account for why I am late on delivering the data set uploads.  This never ending cycle has continued non stop for the better part of a month.

So, today’s plan was to sit in front of the television and work on data. Faced with hours of work in front of me I was pleased to see that Netflix had fixed the audio on the instant streaming of Ken Burns’ The Civil War.  With 600+ minutes of background educational PBS goodness to keep the background processes of my mind occupied, today was lining up to be a productive day.  An hour and a half in I encountered an application error that stopped me dead in my tracks since I won’t be able to have a developer look in to it till tomorrow.  The bonds of slavery had not even been broken and I was faced with more delay.

Later it also dawned on me that these data sets need to be modified prior to being loaded in to the system.  So loading them today won’t be practical anyway.  Maybe once the battle of Gettysburg is over I’ll call my mother and say hi.

River

How did I get here?1  How did I find myself looking at 7:30am on a Saturday morning as a wonderful thing?2  I’m not entirely sure. Currently my life is filled with a dizzying array of seventy hour work weeks bookended by two days that I try to re-introduce myself to my wife whom I leave to fend off the onset of mental disorders associated with the hobby of conversing with our cats.

Like many males in my demographic3 my hobbies include mass consumptions of malted yeast infused beverages4 and the playing of video games.  I am, by nature, not an outdoors type of person seeing as I need a constant stream of decongestants planted in my blood in order counteract the pollen count.  My sloth like life style has left many to wonder about my mental stability at times.5  Truthfully, I am a workaholic.  I cannot find the inner strength to turn and walk away from my work when I know that there is little reason to push my body to the point of both physical and mental exhaustion.  But I do it anyway.6

While I write this very post78my wife is fending off the zombie hoards from her vegetable garden.  I have already picked up on at least one hint that she would like to leave the house at some point today and even lured me with the possibility of beer tasting down town9  And so with that, I think that I will send this post off to the ether10 and leave the work that must be done before Monday till tomorrow.11

  1. Here being Texas.
  2. Could it be because it is a full two and a half hours later than I normally wake?
  3. I’ve always hated stereotyping.
  4. Beer for the uninitiated.
  5. Although the life style may in fact have little to do with that stability or lack there of.
  6. Call it a character flaw.
  7. A procrastination utility used to not do work I need have done before Monday.
  8. Procrastination is the spontaneous reorganization of my priorities
  9. Just anything to get out of the house in reality.
  10. net
  11. Although there won’t be a redhead prancing around with a dog.