Apr 14

Um.  Wow.  It has been a REALLY long time since I’ve posted on my blog.  I’ve been frighteningly busy in my life.  I’ve been working out for the past 4 weeks, and have taken up Racquetball.  Friggen awesome game!  I love it, and though I still, well, you know, suck, it’s an absolute blast, and plan on taking the time to get good at it.  I’ve also been doing the full-on workout think with weights, including creatine and protein supplementation.  So far, so good.  My arms aren’t exactly what you’d call “guns”, but they’re actually showing, which is saying something.

We also got the NetFlix Wii DVD last night, and let me tell you, it works great.  It’s a tiny bit grainy, but I knew that going in; it’s a Wii, not an XBox 360 or a Playstation 3.  It buffers flawlessly, and is very easy to control and use.  My wife and I started re-watching the Highlander TV series, and SeqQuest.

I’ve also downloaded and installed VS.NET 2010, since it went RTM on the 12th.  At some point in the hopefully near future, I’ll be updating my blog to use .NET 4 and MVC 2.  Probably even some Silverlight so I can learn to use it as well.  Exciting times.

Tags:
Jan 03

I’ve learned an important lesson; ALWAYS back up your posts, pages, and any other dynamic data before trying to do any updates to your site.  I was testing some ASP.NET Web Service stuff with my site, and lost a bunch of posts, which is why it looks like I haven’t posted since March of last year.  Sigh.  Oh well.  As I said, lesson learned.

Also, due to furiously large amounts of spam, I’ve had to turn comment moderation on, so if you post legitimately to my blog, give it a day or two to show up.  I hated having to do it, but until I find a way to prevent these f’ers from spamming my site, it’s necessary.  Also, please post with an actual name, not the name of a company or such, or I’ll assume the comment is spam, and delete it.

When are they going to make spamming a capitol crime?  ;)

Tags:
Mar 17

Several weeks back, I brought my 80 Gig iPod Classic to the local Mac store to have it repaired.  The Click Wheel had become faulty, and as a result, it was almost impossible to pause a song, or shut the thing off.

Almost three weeks later, I still hadn’t heard anything from them, so I contacted them to get a status update, only to find that they hadn’t even shipped it back for repair yet!  Needless to say, I was livid.  They immediately shipped the unit, and let me know they’d keep me updated.  That was a week and a half ago.

Having already spent several weeks without my tunes, I called back personally every other day to get a status on it.  Finally today, I received a call from the Mac store, telling me that they still hadn’t heard anything from Apple.  They guy I talked to said he’d talked it over with his boss, and they didn’t want me to wait any longer.  I’m now sitting at home with a brand new, 120 Gig Classic as compensation for my time.  Not a bad deal.  I’ll certainly shop there again, at least when it comes to iPods or accessories.  I still intend to buy a Dell laptop, especially with Windows 7 sounding so damn promising, but as for my music needs, I’ll leave those with Apple and the iPod.

Tags:
Mar 12

I love the intelligence of the drivers here in the beautiful Northwest state of Oregon.  Especially when it comes to that magical little stick that every car, truck, van, or otherwise has on the left side of the steering wheel column.

Ladies and gentleman, let me introduce you to it’s greatness.  It is called… a “Blinker”.  Why?  Well, this handy-dandy thingamajig lets the other drivers on the road know that you’re going to, how do you say, turn.  Really amazing!  And the best part is that it takes less energy to turn it on than it does to lift your morning latte to your mouth, or your cell phone to your ear.  How cool is that?!?!

And you know what else?  It’s not only cool, but it’s the law!  You heard it hear, folks.  The law!  You MUST use it.  Not a choice.  If you’re caught not using your blinker, and you turn, you get a ticket!  Simply amazing!  But wait, there’s more!  The drivers behind you will appreciate that you’ve given them advance warning about your intentions.  Damn!  It is indeed a fantastic world having such inventions.

So what do you think?  Let’s all start using this wonderful invention, and making driving safer, and less prone to expensive, inconvenient tickets!  Oh, and if the guy behind you honks at you for suddenly turning with no blinker or other warning, you do not get to be surprised, angry, or flipping the bird at him.  You’ve earned that honk.  Good job.

Tags:
Feb 28

Damn, but it’s been a long week.  Granted, I’m 33 years old, but it’s Saturday night, 10:16 at the exact moment I started typing this, and I’m SO ready for bed.  It’s possible that the Peppermint Patty I’m drinking has something to do with it, but who knows?  By the way, for the uninitiated, a Peppermint Patty is an adult beverage, consisting of hot cocoa, peppermint schnapps, whipped cream, and Cream de Minthe.  Very good! 

I’ve been working my tail end off at work on an old ASP classic application, that shall remain nameless to protect the innocent (specifically, me), and am SO ready to have 5 minutes in a ring with their lead developer.  I’ll even let the guy wear a Hogu (Taekwondo chest protector).  Never would I have thought, except maybe when I was first beginning my journey as a developer, that it’d take 3 damn days to get a drop down working on a web page!  No kidding!  Not because I’m lacking in skills.  As humbly as I can say it, I’m not lacking for knowledge when it comes to being a developer.  No, it’s the fact that you have to sort through many layers of ASP, XML, VBI, and XSL files to find what you’re looking for.  And when you DO find it, they’ve got so much custom junk in the way that’s it’s ridiculous.

Case and point.  Part of the application is a form that has its controls generated dynamically based on settings in a database.  The user can specify what data type the field should contain, whether it’s a dropdown, a text box, or whatever, and so forth.  Now, they offer the developer very little in the way of customization on the screen, so if a custom need arises that the designer doesn’t support (more often than not, sadly), we have to resort to javascript.  Not too big an issue, normally, except that it’s not as simple as it should be.

The form uses dropdowns, just like any other form might.  So what happens when I try to use my friend jQuery to find the dropdown?  I get back zilch!  Nada.  Nothing.  I used the right ID, so why aren’t I getting anything.  Oh, hey, I bet it’s because all I can see in the DOM at runtime for the dropdown is a DIV element with an IMG element in it.  That’s it.  No SELECT element to be found. Yet one is being drawn!  AAAAAAAARGH!!!  I’m still waiting for a decent response from the parent company about how to deal with it.  So far, their response, literally, was “we don’t know how to do what you need”…    I say again.  Please, just 5 minutes in a ring.  That’s all I want…

I’ve also been busy hammering away at a jQuery Brownbag that I’m leading on Friday.  Our company recently added it to the list of things they support, and as the company expert on it so far, the task has fallen on me to make sure everyone comes up to speed on it.  I’m looking forward to doing this, as I love this library, and really wonder how I ever got on without it.  Oh yeah, I remember.  I wrote lot’s and lot’s of code that eventually found their way in to libraries.

So, as I said, I’m exhausted, and can’t wait for beautiful, beautiful sleep to take me… 

Tags:
Feb 19

BlogEngine.NET just keeps getting cooler and cooler the more I use it.  I added an extension today to the site that allows me to administrate what disclaimer text, if any, to apply to different parts of the site.  If you’d like to use it, you can download it below.  Just open the zip file, and drop the Disclaimer.cs file in to your App_Code\Extensions directory.

By default, there are no disclaimers specified.  If you log in to your blog, and go to the Extensions administrator, you’ll see the following:

SettingsShot

Here, you can specify which ever disclaimers you wish to apply.  For instance, the Feed Disclaimer will be added to all posts that are served via RSS.  Click Save, and you’re in business.  Any future servings from your blog that have a disclaimer specified will get one appended to the end.

Download: Disclaimer.zip

Feb 15

Turns out that it’s really easy to create add-ins for BlogEngine.NET!  I’ve created a new widget for the site that loads the latest image from ICanHasCheezburger.com, and if you click on the image, it loads the actual page for that entry in to a new window.  You can check it out by locating the bottom widget on the right side of the site. More...

Jan 30

I knew we had spent a ton of tax payer money on bail-outs, but it hadn’t really clicked just how much was wasted on greedy, self-righteous corporate slobs until I saw this video.  I don’t know enough about her certainly to make a judgment about her on the whole, but in this context, I must say that Senator Claire McCaskill rocked the house.  OK, fine, the Senate.     Take a watch.

Tags:
Jan 29

You know, the more I use it, the more I’m absolutely loving jQuery, and am wondering what took me so long to adopt it.  Let me show you what I mean.  Here’s some sample code that is done without jQuery; in other words, normal javascript:

var panel = document.getElementById(panelid);
for (var i = 0; i < panel.childNodes.length; i++){
	var ctrl = panel.childNodes[i];
	if (ctrl.className.indexOf('cancel') >= 0){
		if (window.attachEvent)
			ctrl.attachEvent('onclick', cancel_click);
		else if (window.addEventListener)
			ctrl.addEventListener('click', cancel_click, false);
	}
}

Pretty normal looking code.  Now, I can do the same thing with a single line of code in jQuery:

$('#' + panelID).find('.cancel').click(cancel_click);

Now, that’s cool!  What’s going on here?  I’ll break it down for you.

  • First, I need to locate the control that represents my parent panel.  jQuery uses CSS type accessors.  In CSS, if you want to style an element based on it's ID, you use #, followed by the id of the element.  The $ function locates the element or set of elements with the given id.
  • Next, the find method searches all descendent controls of the panel, and returns all controls who have a class of ‘cancel’.  Remember, we’re using CSS selectors here, thus the dot.
  • Finally, I attach a click handler to the element (a button in the code I derived this sample from).

If you haven’t browsed in to jQuery yet, do yourself a favor and check it out!  It makes doing mundane stuff in javascript mostly a thing of the past.

Jan 22

A while back, I emailed Microsoft’s Visual Studio support team, and suggested a possible addition for some future version of C# (or .NET in general), doing what I call Cascading Null Checking.  Basically, the idea is that instead of writing this:

int zipcode = 0;
if (person != null && person.Address != null && person.Address.ZipCode != null)
	zipcode = person.Address.ZipCode;

You’d be able to write this:

int? zipcode = person?Address?ZipCode;

I don’t know exactly impressed I was with their answer, but I’m glad that they emailed back.  Apparently, it’s something that they’ve wanted to do for a while, but are trying to figure out how to properly deal with the meaning of each piece of the statement.  You can read their response in full here.