June 27, 2006

Yay perl

Filed under: Programming, Technology — dave @ 9:57 pm

#!/usr/bin/env perl
while (<>) {
  if ( /([^,]*),(Incoming|”[^"]*”),([^,]*),([-0-9]*),[^.]*,([0-9]+),[^,]*,[^,]*,[^,]*/ ) {
                $phone = $4;
                $date  = "$1 $3";
                $minutes = $5;
                if ($2 =~ /ncoming/i){
                        $inc = 1;
                } else {
                        $inc = 0;
                }
                $phone =~ s/[^0-9]//g;
                $date =~ m!([0-9]+)/([0-9]+)/([0-9]+) ([0-9]+):([0-9]+) (AM|PM)!;
                $mo = sprintf(”%02d”,$1);
                $dy = sprintf(”%02d”,$2);
                $yr = $3;
                $hr = $4;
                $mn = $5;
                $hf = $6;
                if ($hf == “PM” && $hr < 12) {
                        $hr += 12;
                } elsif ($hf == "AM" && $hr == 12) {
                        $hr = 0;
                }
                $hr = sprintf("%02d",$hr);
                print "INSERT INTO calls (person_number, time, duration, incoming) VALUES ($phone, TIMESTAMP '$yr-$mo-$dy $hr:$mn:00', $minutes, $inc);
"
  }
}

Thank you Mr. Krishnan

Filed under: Life Update — dave @ 2:06 am

This post would be more appropriately titled “Thank you Mr. Reardon” but it’s funnier with Aarthy’s last name. HEB is the best grocery store i’ve ever seen. It blends cheap, quality and good shopping experience in one great package that deserves it’s slogan “Here Everything’s Better”. Seattle is comparatively a wasteland of poor selection, outrageous pricing and questionable service. One fantastic HEB feature is it’s lack of a club card, aka shopper tracking device. The prices at Safeway without the use of the club card border on the criminal, but the use of the card brings it down to a level that I percieve as better than starvation or another day of Wendy’s. So, i’ve memorized Jim’s number so that I get the discount. This has the side effect that when I pay they always say “Thank you, Mr. Reardon” at the end of the transaction. Or in the case of one particularly bad case of data entry Aarthy took over resulting in the title.

Life has picked up. I’m coding and it makes me happy. This will probably result in less side projects (trying to configure zedd as a router, coding my phone call database, writing address parsers in visual basic) but overall higher quality of life. I just have to avoid being distracted by the Game. The Game is a series of puzzles whose answers lead to other puzzles with the end result of me not producting anything for Microsoft as well as inducing acute obsessive compulsive disorder and long sessions staring at Time Magazine looking for patterns at the behest of Ed Harris. I’d take a picture of my Nash style corkboard, covered in disparate clues and perhaps a few not-clues, but its apparently against company policy to take pictures inside company buildings. Lame.

Tarang, Ben and I went down to Capitol Hill on saturday with a few other people and had some sushi and eventually hit a bar in Capitol Hill. As we were driving around Capitol Hill trying to find a parking spot we noticed something was a little off. We then realized that what was off was the girl:guy ratio and that the Gay pride parade had been that day. We ended up just chilling in a bar and having like one drink since Tarang needed to wake up early for a World Cup match the next day. Next door to the bar we were at was a S&M bar.

Lost is completely insane. I need more. Season 3 cannot possibly start soon enough. I’m officially watching 2 shows now: Scrubs and Lost. I’ve also become a social 24 watcher. With a roommate who wants to be able to watch sports (even if that sport is soccer) and a value proposition for the XBOX 360 that looks more and more enticing i may just cave and purchase a TV. :-(

I want to start a company. There’s nearly a dozen people who have mentioned a desire to start a business with me, several who have heavilly discussed the possibilty and a couple who actually have though the end result of the final group is somewhere between highly puzzling and near-complete failure. My near constant exposure to Microsoft’s CRM platform has given me a bit of tunnel vision, but in that i can definitely see a platform that could be highly leveraged in a number of different areas especially given .

Most businesses/organizations have processes that could be greatly improved by the correct application of software, but finding those opportunities seems to require a not insignificant amount of domain specific knowledge. And gaining that knowledge practically necessitate spending time doing something that is noticably not software development. Am I prepared to write a great software package that mines invoice data at a food distributor and predictively orders from manufacturers decreasing inventory costs if it means spending a couple years working at a food distribution company? It’s easy to write software when somebody gives you requirements (assuming the person knows what they want and isn’t insane in how long they expect it to take) but then you’re a contractor at best or an employee at worst.

 This post ended prematurely by my roommate leaving our apartment unlocked for the last 9 hours.