Shock (or, maybe there is some good in this world)

Waiting for the bus. Cold. Oh so cold. Oh, no! Here comes crazy lady! Run! Hide! Oh, wait. She apologized for "talking my head off the other day", and tried to blame it on coffee. While I will admit that I've seen too much coffee make people do bad things, I still think she's a Chatty Cathy. At least I was able to sit somewhere far away from her on the bus, and read my mobile NYT in peace.

Duck!

It was such a nice day out today that I went for a little ride after climbing. On the Hawthorne trail on the last leg back to my place, guess who I saw walking the other way? That's right, the crazy lady from the other morning. Luckily I was almost fully camoflaged; my contacts were in, and I also averted my gaze as I rode by. She was walking on the trail with some other woman pushing a carriage, so I was able to slip by unnoticed. Made a couple of quick changes to the site as well. Did some more categorization last night, as well as changing some templates around so that the URI's are more friendly. Now if I change programming languages or something, I won't have to do anything to reference category or month archives. Not that I think that my site is so fantastic that anyone will care or link to anything that I've written, but it's still good style.

Changing Templates

As I'm bringing in all my Blogger content, it's taking awhile to move all my entries into categories. I still wanted to have the nice link to the category archives at the bottom of posts that have it, and amazingly there's no conditional tag as part of MT. So, had to find one... very nifty little plugin at Brad Choate's site, IFEmpty, which lets you check for the existence (or non-existence) of any MT variable, and execute other code based on that. I'm really starting to like this whole huge MT community thing.

New Weblog (or, change is A Good Thing™)

OK, so after one too many Blogger posts getting eaten, I've decided to give MT a whirl. So far I already love it; much more flexible archiving, categorization, built-in comments, EASY importing of my Blogger content, etc. I have a bunch of maintenence to do... need to pick up the DB-driven elements from my other blog and get them in here, but that won't be a problem. I'll need to also go back and fix all the links that referenced Blogger archive pages, as well as starting to do some categorization. Also, I'll probably be putting the style back to roughly what it was before, but this style here is a nice temporary filler.

Work

"So, how's work been these days?" you ask... Abbi sums it up quite nicely, thank you.

update: I saw this missive on Andre Torrez's site, and it gave me pause. Not because I think that I'm exactly in his situation, but because I wonder what it all exactly means to me. Perhaps he's right about the apparent lack of old programmers. I certainly don't ever want to become "the stapler guy", but I also don't think I ever want to do management, either. As much as I like to tell people I work with how shortsighted, schizophrenic, or otherwise idiotic they are, I usually like to do it to people who are in a different discipline than programming, and I know it would be hard to be telling a younger version of myself what to do and when to have it done by.

I kind of like where I'm at right now; I work with other programmers who want to learn about new things, and I can "mentor" or "coach" or whatever the fuck (both of those are too strong of terms, I just find something that's cool/fun/makes business sense and we all basically learn it together)... but I sometimes wonder how much longer I can keep doing it. Programming seems to be a young person's game, but I think I'm interested enough in new technologies to keep myself marketable. Besides, I have both my parents to look up to for examples; my dad still does basically what i do, writes code, talks to customers, and still looks forward to going to work in the morning. My mom even got back in game after sending all us kids off to college; becoming a Java developer until she got laid off (along with everyone else) from Lucent.

So, I suppose all is not dark. I might not always be "the smart programmer" at work, but I can always hope to be "the weird one", or at the very least, "the old one." I don't think there's anything wrong with that, actually.

T.M.I. (or, the captain has turned on the "no sharing" sign)

I rode in this morning, which was a good thing, because yesterday I had the (pause for emphasis) Bus Ride From HELL™!!! Lemme ask you a rhetorical question... is there some other language out there where "Yeah, I take this bus most mornings." translates to "Please, woman that I don't know, tell me about your entire twisted life, and make sure to ignore my obvious discomfort with your level of openness."??? Because I could have sworn that's what I somehow said without realizing it. Let me just give you the brief list of unbidden things I found out about this woman during the course of waiting for the bus and on the ride down (also, in case you were curious, getting on the bus and standing at least 5 feet away from someone is obviously not a deterrent to someone continuing an unwanted conversation with you, they just start yelling.):

* She just started working for PNC Advisors last Thursday, working at 2 PNC Plaza, and she loves it there. * She's just going back to work after taking time off to raise her 3-year old son by herself (emphasis was hers). * She wants to buy a house, but she's been living with her mom while she's been raising her son by herself. * She dated her son's father for 8 1/2 years (don't forget the 1/2, very important), and then he apparently bailed when the kid came along. * Her boyfriend is a fireman for Uniontown, but lives somewhere else because "they don't have a residence clause". She told me where and I just forget. * The master plan is for her to buy a house, and then her boyfriend is going to buy his own house, and then "when we get married" (the poor guy), she'll sell her house and they'll move in together. * She didn't know what sex her child was until he was born; apparently most clothes for kids that age can be bought in neutral colors. * She'll do the same for any more children that she'll have with Fireman Boyfriend, but she's terrified of raising kids in "this moral sewer." * She hates cats, because Boyfriend of 8 1/2 years let his 2 cats run rampant, and she "spent hours on her hands and knees scrubbing up their filth."

There was probably more, but I'm tired of thinking about it. Bottom line, if I see her again and she starts rattling on, I'm going to offer her a nice tall glass of Shut-The-Fuck-Up.

C# shortcuts

<geek>Let me first say that I really, really like working with .nizzle. The problem is that so many of the web apps that i work on are really similar, so a lot of the work gets boring; seems like I'm always doing the same steps for an admin site: 1. Create database table for new article/category/user/whatever. 2. Create all associated stored procedures to add/update/delete/otherwise modify new db table. 3. Create a strongly typed C# object to hold all the methods and properties of said object. 4. Create front-end .aspx pages to allow admin user to make use of steps 1-3. 5. Lather/rinse/repeat.

The other day I found a neat little chunk of code from M$FT to help me out with step 3, the Data Access Application Block, which is really just a bunch of handy shortcuts for some of the more repetitive coding that I do.

"Well, geez", you're saying, "don't just tell me about it, show my why it's better!" Hey sure.

For a really simple grab of all records and stuffing them in a database, we go from this:

public DataSet GetAllArticles()
        {
            // Create Instance of Connection and Command Object
            SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["connectionString"]);
            SqlCommand myCommand = new SqlCommand("GetAllNewsArticles", myConnection);

            // Mark the Command as a SPROC
            myCommand.CommandType = CommandType.StoredProcedure;

            // Adapter and DataSet
            SqlDataAdapter oAdapter= new SqlDataAdapter();
            oAdapter.SelectCommand=myCommand;
            DataSet oDataSet = new DataSet();

            try
            {
                myConnection.Open();
                oAdapter.Fill(oDataSet,"Articles");
                return oDataSet;  
            }

            catch(Exception oException)
            {
                throw oException;
            }
            finally
            {
                // Close the Connection
                if (myConnection.State == ConnectionState.Open)
                    myConnection.Close();
            }
        } // end GetAllArticles()

to this:

public DataSet GetTopLevelProductCategories()
        {
            // Create Instance of Connection and Command Object
            SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["connectionString"]);
            DataSet oDataSet;
            oDataSet = SqlHelper.ExecuteDataset(myConnection,CommandType.StoredProcedure, "GetTopLevelProductCategories");
            return oDataSet;  
            if (myConnection.State == ConnectionState.Open) myConnection.Close();
        } // end GetTopLevelProductCategories()

Notice the "ExecuteDataset" function, which is an overloaded function which lets you pass parameters, transaction info, or not.

I like it even better when you're passing parameters to an insert or update stored procedure. Old style:

public bool UpdateCategory(Category myCategory)
        {
            SqlConnection myConnection = null;
            SqlCommand    myCommand    = null;
            bool          bUpdated     = true;

            myConnection = new SqlConnection(ConfigurationSettings.AppSettings["connectionString"]);
            myCommand = new SqlCommand("UpdateCategory", myConnection);

            myCommand.CommandType = CommandType.StoredProcedure;

            // Add Parameters to SPROC
            SqlParameter parameterCategoryId = new SqlParameter("@CategoryID", SqlDbType.Int, 4);
            parameterCategoryId.Value = myCategory.GetCategoryId();
            myCommand.Parameters.Add(parameterCategoryId);

            SqlParameter parameterName = new SqlParameter("@Name", SqlDbType.VarChar, 255);
            parameterName.Value = myCategory.GetName();
            myCommand.Parameters.Add(parameterName);

            SqlParameter parameterImageUrl = new SqlParameter("@ImageUrl", SqlDbType.VarChar, 255);
            parameterImageUrl.Value = myCategory.GetImageUrl();
            myCommand.Parameters.Add(parameterImageUrl);

            try
            {
                myConnection.Open();
                myCommand.ExecuteNonQuery();
            }
            catch (Exception e)
            {
                throw e;
                bUpdated = false;
            }
            finally
            {
                if (myConnection.State == ConnectionState.Open)
                    myConnection.Close();
            }

            return bUpdated;

        } // end UpdateCategory()

New hotness:

public void UpdateProductCategory(ProductCategory myCategory)
        {
            SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["connectionString"]);

            SqlParameter[] arParams = new SqlParameter[4];
            arParams[0] = new SqlParameter("@CategoryID", myCategory.GetCategoryId());
            arParams[1] = new SqlParameter("@CategoryName", myCategory.GetCategoryName());
            arParams[2] = new SqlParameter("@DetailedDescription", myCategory.GetDetailedDescription());
            arParams[3] = new SqlParameter("@DefaultProduct",myCategory.GetCodeNumber());
            SqlHelper.ExecuteNonQuery(myConnection, CommandType.StoredProcedure, "UpdateProductCategory", arParams);
            if (myConnection.State == ConnectionState.Open) myConnection.Close();
        } // end UpdateProductCategory()

No more setting datatypes, and taking 3 lines to add one stored procedure parameter. Less is more. </geek>

Cold much?

I removed the panties from my mouth, and rode in this morning. All that cold weather gear I bought seemed to do the job, but by the time I got in my hands were numb from not having windproof gloves on, a problem that is two shipping days away from being fixed. All in all, it wasn't a bad ride. I did turn down one side street that was pure ice and wound up flat on my ass, but I was going slow at the time and I don't think anyone even saw me. In any case, I feel very good that I'm getting some exercise today, so of course I'm going to balance that out by getting some lovely greasy lunch.

Autoshow

Went to the Pittsburgh Autoshow last night, and I have to say that it was a bit dissapointing. Apparently, Pittsburgh is fairly small potatoes in the automotive world, so we got fairly shafted on getting "cool" cars at the show. There were at least a few things that were picture-worthy, however..

BMW M3Mmmmmm... hot M3 action. This one was equipped with the TipTronic paddle shifter... very F1.

Porsche CayenneIt's kinda hard to tell from this photo, but the Porsche Cayenne had absolutely massive exhaust pipes... duals on each side, 4 total.
Cooper Mini controlsSat in this cute little Cooper Mini... I noticed that it had toggle switches. I love toggle switches on anything!

There was an Aston Martin V12 Vanquish there. A gorgeous hand-built car; perfect if you've got a spare quarter million lying around.

Aston Martin V12 Vanquish Aston Martin V12 Vanquish

One of the cooler cars there was the Mitsubishi Lancer Evolution. Even though they're not competing in the WRC rallys this year, they're still bringing the street-legal version of their WRC car to the states. 271 hp and 273 ft/lb torque; that's kinda sweet. Now, if only they would do something about that garish styling... the back wing is a bit big:

Lancer EVO.  Big wing and clear euro taillights. Lancer EVO.  Big Grill. EVO from the front.

There were a few other cool concept cars there, the Chevy SSR "street truck", and a really swanky Thunderbird Forty-Nine that looks like it came right out of ZZ-Top's garage:

Chevy SSR Thunderbird Forty-Nine Another view of the Thunderbird Forty-Nine

There were some dissapointing no-shows, too. The VW area didn't have the R32 or the 20th anniversary GTI, and Subaru didn't have the WRX STi there, either. Oh well, maybe next year.

Errata

Some quick hits from the last few days. --We had "Office Fear Factor" yesterday. There was a 2-pound box of Sour Patch Kids that my friend Charissa gave me for a belated xmas present here in the office. They had been pretty much decimated over the last week, so there was just the few stragglers left in the bottom of all that sour sugar. I bet Teddy $2 that he couldn't eat all that sugar, and he accepted. Gotta give him credit, he upended the bag and fit all that sugar (and it was probably a good tablespoon's worth or so) into his mouth, and then proceeded to turn 6 different shades of red. I think he sucked his cheeks in so far they crossed past each other in his mouth. After his eyes were done watering and he was able to breathe again, I started looking around for other things in my cube that I could pay him to eat that would hurt. About the only interesting thing I had left was a packet of milk chocolate mix.

--The SLF and I went to dinner last night, at La Cucina Flegrea. Fantastic food. Apparently both of the owners (a married couple) are completely insane, but it was still really tasty food, and not amazingly unreasonable for good Italian cuisine.

--I finally broke down and opened a Netflix account over the weekend. Brian informed me that there's no account open/close fee, so I figure while the weather is still crappy I'll keep the account, and if I find I'm not using it enough times a month to justify the cost, I'll cancel and then re-open my account next winter. My first discs should be arriving today or tomorrow... all from X-Files season 4. I'm also really excited about all the non-mainstream movies that I've wanted to see that I can just watch once and then send back.

--The Pittsburgh Auto Show is happening this week, and I'll be going tonight. I've got my camera with me, so expect some good pictures tomorrow. I got a little preview on the walk to the bus last night; some crazy guy driving around the slushy downtown streets in a screaming yellow zonker Ferrari F40. Sweet.

--From The Onion, "Girlfriend Stops Reading David Foster Wallace Breakup Letter At Page 20" has to be one of the funniest fucking things I've ever seen in my life. The PDF is just priceless, with the ASCII art drawing of the chemical composition of Ecstasy.

Opening my musical kimono.

I added a new feature to the site; a real-time look at what I'm listening to. There are actually two interesting things going on: First is that I now have an Audioscrobbler account set up, which means that anyone can go take a peek at my listening statistics. This is very cool, because the more I listen to stuff, I'll get recommendations about which other users listen to similar stuff, and then I can find other music to listen to that way.

The other neat thing is the info gathering that I'm doing myself. I'm using Do Something to post artist and song title to a .nizzle page on my site, which is stuffing it into a local database. I then put some ASP-Classic (ick!) code into my Blogger template, which does a query on the db to pull back the last 5 songs I've listened to. I'll work on an archive feature over the weekend, so you can pull back what I've listened to on any particular day. The idea for this part of the new hotness was shamelessly stolen from Andre Torrez.

Guilt-free

So, a leisurely hike to the bus stop and a stroll through downtown later, and I'm at work. Pat is the only other person in our department in today; apparently our manager was the only one who actually bothered to call his/her team and tell them they didn't have to come in to work! (Oh, wait.. there was the email from my boss at 7 AM that would have done nobody any good unless they happened to check their work email between 7 and when they would leave for work) I went out for a little spin in the snow a few times yesterday, and it wasn't so bad. Apparently there's some sort of salt shortage, because PENNDOT ain't doing jack shit out there. It was fun spinning around, practicing handbrake turns, and in general just trying to stay out of other people's way. My car is pretty good in the snow, but I still can't wait until I get my next car.

It was a very nice weekend. The SLF has had to work every night since Friday, including tonight, so we're going to do our VD dinner tomorrow night. Not quite sure where yet, but there are some good options out there. Paul once again came over Saturday to help me finish putting the bike together. I took a few pictures, but left my Flash card at home. I'll post those tomorrow. If the weather cooperates at all I might even get to ride late this week, but we'll see how much snow melts by then.

Yesterday I cleaned up my place some, and then sat and watched an "Academy consideration" DVD copy of LOTR:TTT. Makes me think I should find a DVD burner soon to store these little treasures when I come across them.

Tonight having some people over for WRC Rally Sweden party. Always a good time with that group.

Snow day (or, on being a guilt-ridden mess)

Finally! A decent amount of snow! Now, don't get me wrong. I hate winter. I can't wait for winter to be over. But, some days you get lucky, and enough snow falls that you don't have to go to work. Got a call from my mgr. this morning, and she said that while my boss didn't explicitly tell everyone to stay home, he also didn't say that we had to come in, either. So, now I'm in a bit of a dilemma; on one hand, I would really really like to enjoy a 3-day weekend, and work isn't so jam-packed that I would feel like I was getting behind. On the other, I've been IM-ing with some of my co-workers who actually did make it in, and it sounds like there's a decent amount of people actually in the office. I already slept in late, so maybe after a quick round of THPS4 I'll drag my carcass into the office. All the benefits of a snow day, but none of the guilt of not actually going in. Then I can post about my weekend, too.