Monday, January 31, 2005

I've been pretty lucky so far on the comment spam here until yesterday when the floodgates opened.  To combat it, I've enabled the Captcha feature that requires you to type a confirmation number to be able to post a comment.  It is fairly self-explanatory and should work fine.  Let me know if there are any problems with leaving comments.

P.S. This will most likely prevent using third-party tools to leave comments (like RSSBandit, etc).

[UPDATE] Jen and Dave are having a similar war on comment spam with WordPress.  Her blog software of choice.

posted on Monday, January 31, 2005 7:24:31 AM (Pacific Standard Time, UTC-08:00)  #    Comments [5]
 Sunday, January 30, 2005
As promised, I've added a nice picture of B-Dub to his birthday entry.  Hosted on Flickr.
posted on Sunday, January 30, 2005 2:23:08 PM (Pacific Standard Time, UTC-08:00)  #    Comments [2]
 Friday, January 28, 2005

Under duress, Brad Abrams recently posted a set of internal coding guidelines to his blog, meant mainly to be a "tie-breaker" in the holy war type arguments that result from seasoned developers who love their own coding styles. I'm a big fan of the work Brad and his team have done on the CLR and their focus on consistency in the API. And, even though there are one or two I don't care for, I'm a huge supporter/follower of the design guidelines.  That's why I was surprised at how many of the internal guidelines I disagreed with.  Roughly 50% of them made me recoil in horror.  Of course, now I understand why I don't like the Visual Studio defaults.  I won't get into which ones I like/dislike because that's not a productive area of discussion.

Now that I've had a couple of days to let them sink in, I realize why Brad was reluctant to share them.  I think they may cause more controversy than solve.  The big questions is how useful will these be in helping my team be more productive?  At this point, I don't think much.  I think we'll stick to the public API guidelines and use the somewhat informal guidelines our team has created for the internal stuff.

 

posted on Friday, January 28, 2005 1:37:33 PM (Pacific Standard Time, UTC-08:00)  #    Comments [3]
B-Dub

I never got a chance to wish a happy birthday to B-Dub.  His birthday is pretty close to mine and we usually hook up with he and Jan at some point for some dinner.  Somehow, we've neglected to do that yet, despite the fact that we live in the same city.  Maybe he should get an XBox and Halo 2, then those pesky few miles would become irrelevant.

Happy belated birthday, D-Dub.

Keep an eye on this space for a photo.  I've got the perfect one, but I don't have access to it at the moment.


posted on Friday, January 28, 2005 9:04:40 AM (Pacific Standard Time, UTC-08:00)  #    Comments [2]

I've had my performance hat on at work for the last couple of weeks, optimizing memory and CPU performance ahead of the deployment of a new system.  I've been pretty pleased with the improvements we've made.  We've got alot of in-process caching that increases speed incredibly, but has a hefty footprint.  We were able to get that down quite a bit with some pretty clever ideas.

One of the major pushes was to reduce references, especially boxed references.  That has proven a very effective strategy to reduce memory.  I wish I could just throw generics at the boxing problem, but we'll have to wait a while longer for that.  Another strategy was to take a close look at the data structures that hold the cached data.  I rolled my own AVL tree implementation for a date-based index of the cached data, and I was able to improve both the CPU performance and it's footprint substantially.

We also implemented what I've called a local string intern pool.  We've got alot of redundant string data, and we've used String.Intern in the past fairly successfully, but some analysis of our data revealed some local redundancy that we could use to reduce a 4-byte reference to a single byte that acts as an index into the local string pool.  This will also help keep our memory from bloating on the move to 64-bits when all the references in the system double in size.  (although at that point, we should have loads more memory to work with)  This as the added benefit of eliminating the need for string comparisons in running searches against the cache.

All in all, we were able to reduce the footprint of the cache by about 40%.  I thought someone googling for ways to reduce memory footprint and increase performance might benefit some from this information.  Oh, and so Google puts this in the right context, this is related to: ASP.NET, CLR, C#, DotNet.

posted on Friday, January 28, 2005 8:57:45 AM (Pacific Standard Time, UTC-08:00)  #    Comments [2]
 Tuesday, January 25, 2005

Well, the cat's out of the bag.  It's my birthday. (Not that I was trying to hide it).  I'm 29 today (0x1D for my fellow nerds).  It's been a pretty interesting year.  Thanks to everyone who's sent me birthday wishes in one form or another.

[UPDATE 5:28pm] I missed Peter's announcement because he upgraded to dasBlog 1.7 and it broke an outdated RSS feed link.  He claims to have been the first, but my dad announced it last Friday, although he also announced his anniversary almost 6 months early as well, so I'm not sure that should count.

posted on Tuesday, January 25, 2005 2:17:59 PM (Pacific Standard Time, UTC-08:00)  #    Comments [3]
 Tuesday, January 18, 2005

Well, I just completed the upgrade to dasBlog 1.7.  (dasBlog is the software that runs my blog) I've been pretty excited about it because it will address several woes I've been having, not the least of those being referral spam.  Omar, Scott, and a host of others deserve a big pat on the back for their contributions.  Thanks, guys. Check out Scott's announcement for more links and details on new features if you're interested...you're probably not.

The upgrade was complex since it attempts to do alot of fixing and cleaning of old data, but everything went fairly smoothly once I figured out I had accidently wiped out my custom theme in the move.  One nice side-effect is that my really old entries from when I was running BlogX are editable again.  Some hadn't even been viewable.  I immediately took the opportunity to clean up my categories which had gotten way out of hand.  I still have too many, but it's actually manageable now.  I'm looking forward to playing with the new features and seeing the performance improvements.  I'll probably be doing alot of upgrading of other blogs I manage tomorrow after I've had a chance to work any and all kinks out of the system.

posted on Tuesday, January 18, 2005 6:28:30 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]
 Monday, January 17, 2005
davC
davC,
originally uploaded by emoemolay.
I went to my Flickr account and saw this picture of David Crowder in the public photostream. I'm not sure what the event was, but I thought it was really unusual to just randomly come across a picture of him taken by someone else. As usual, he's looking hilarious.
(posted from Flickr)
posted on Monday, January 17, 2005 2:23:11 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]

I recently announced my dad's foray into the world of blogging.  Well, after some issues with MSN spaces, we've decided to abandon it in favor of a more controlled solution.

So, here's his new location, complete with fancy domain name, BellCountyBlogger.com.  I'm hosting his blog now using the same software I use.  We're still working the kinks out as of today, but he's already putting content up.

posted on Monday, January 17, 2005 8:19:39 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]
 Thursday, January 13, 2005

I recently recommended MSN Spaces to my dad to start up a blog.  He got really excited about it and began posting his thoughts and photographs.  Today, we discovered that for people to leave comments, they must have a .NET passport.  Personally, I have nothing against passport.  I think it's great, but not everyone does.  There are lots of people scared to create a passport because they think there is some kind of privacy issue involved. I can see this as a defense against comment spam on the blogs, but to my dad, it's a barrier for his friends and family to join in the conversation.  We're looking into all the options, but I may recommend he look elsewhere for his blog hosting needs.

posted on Thursday, January 13, 2005 8:47:48 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Wednesday, January 12, 2005

A colleague at work turned me on the Flickr the other day.  I had looked at it before, but didn't really get it.  Since my dad set up his MSN space, I've been jealous of the nice photo sharing integration, and I've been disappointed in my gallery software, nGallery.  Development seems to have stalled far short of the features I would like to have.  It does alot of cool stuff well, but it's organizational and social features leave much to be desired. (difficult to read comments, poor RSS support, etc.)

I went ahead and created a flickr account and uploaded a few of my best photos.  The organizational features are really cool, and it's got alot of social features, especially for other flickr users.  For those of you browsing on my actual site rather than RSS, you can see I'm playing with some integration with my site.  Speaking of RSS, flickr has deep RSS/Atom feed support.  For instance it's really easy to use the organization features of flickr to create an RSS feed of hamster pictures.  Here's my photostream RSS, although the Atom feed seems more streamlined and includes my buddy icon.

I think I'll keep my gallery around for some things.  I really like nGallery's features that let you order prints directly from the gallery.  But I'll probably let flickr be my artistic outlet.

posted on Wednesday, January 12, 2005 5:36:13 PM (Pacific Standard Time, UTC-08:00)  #    Comments [2]
 Tuesday, January 11, 2005

I recently mentioned in passing that while I was growing up I slept on my roof on occasion.  This was usually to have a good view of some some meteor shower, or catch a lunar eclipse.  Since I mentioned it, I've had several inquiries as to how I kept from falling off in the middle of the night.  So I decided to do a little write-up on how to sleep on the roof without killing yourself.

First, it's important to find the optimum sleeping bag.  You don't want one with that slick material on the outside, or it will slide down the roof.  The cloth kind will create a velcro effect with standard asphalt shingles and keep you on the roof.  It's also important to align yourself so your feet are aimed down the slope so you don't roll.  You may also want a sleeping bag with cloth on the inside as well so you don't slowly slide toward the bottom of the bag.  That way you won't have to wake up periodically and push yourself up back up to the top.

That's pretty much all there is to it.  Of course, different roofs will have different pitches and shingle types and some may be completely unsuitable for sleeping, so you'll have to use your judgement.

posted on Tuesday, January 11, 2005 7:37:05 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Saturday, January 08, 2005

After months of prodding, I finally got my dad to start a blog.  I think MSN spaces will suit him well since he likes to take pictures and spaces has some nice photo integration.  I think it will end up being an interesting collection of family information, pictures of anything and everything, and hilarity.

Check out his inaugural post.  Hopefully, he'll like the format and continue.

[UDPATE] I've killed the old links above since he's got a new blog and his MSN Space is defunct.  Go to BellCountyBlogger.com instead.

posted on Saturday, January 08, 2005 10:06:30 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]
 Friday, January 07, 2005

I am nerdier than 83% of all people. Are you nerdier? Click here to find out! Over the lunch break, I took a test recommended by a friend to figure out how nerdy I am.  I don't think it's much of a shock to those who know me.

Update: I've since taken it again without trying to get an inconsistent score have gotten a fairly wide range of values, as high as 96.  So, take the number with a grain of salt. 


posted on Friday, January 07, 2005 11:10:14 AM (Pacific Standard Time, UTC-08:00)  #    Comments [5]
 Thursday, January 06, 2005

I just got finished debugging a crazy problem with some C# code.  This particular code is part of an application that deals with file spooling, and it deals with alot of ambiguous file locking issues by always locking greedily.  Any spooling task that is unable to gain an exclusive lock on a file simply assumes another thread must be working on the file and it leaves it alone.

The developer used a pattern that handles System.IO.IOException and assumes that any IOException must be because of a concurrency issue.  The problem with this is that there are lots of calls that can cause file IO that you may be unaware of.  In this case, there was an assembly binding issue caused by some plugin-style dynamic loading that was throwing System.IO.FileLoadException (Which actually seems to be out of place as a subclass of IOException since it is specific to assembly loading and not IO in general).  The pattern in the code was assuming that, in general, any IOException was not an exceptional event and signified another condition. So, the task never did any work and never reported the exceptional condition.

Eric Gunnerson wrote a nice overview piece on exceptions in C# on msdn.  Some of his guidelines are

Catch the most specific exception

If your code needs to recover from some exceptions, make sure to catch only those exceptions. If you catch more general ones, it's more likely you'll mistakenly swallow exceptions you don't want to swallow.

Only swallow if you're sure

This is really a corollary of the previous guideline. When you swallow an exception, your saying that you understand all cases where this exception could arise, and that the recovery code you're writing handles all of those cases.

Use lock or using if applicable

If you can use the lock or using statements, use them. They make the code more readable and make it more likely you'll do the right thing.

Wrap exceptions if applicable

If you can add additional information to an exception, by all means do so. If I pass a parameter on to another function, it might be useful for me to add additional information about the parameter.

The first two here are obviously directly applicable to the scenario, and would have at least raised some flags if I had first checked all the IOExceptions to see what they encompass.  The solution for me was to take a look at the pattern and reduce the scope of the IOException catches to only those statements that I expected might throw the exception for locking.

[UPDATE] I wanted to note that the exception handling pattern worked great until it was extended by me to a more complicated scenario involving dynamic assembly loading.

posted on Thursday, January 06, 2005 11:05:29 AM (Pacific Standard Time, UTC-08:00)  #    Comments [2]

Today is my mom's birthday!  Yeah!  I know I usually post a picture of my birthday subjects, but I know she would be mad at me.

Happy Birthday!  Thanks for the many years of support you've given for me to take apart our appliances, make our electricity bill high with tons of electronics in my room, and risk the wrath of Child Protective Services by letting me sleep on the floor, in the closet, in the attic, in the camper, outside on the ground, in a tree, on the roof, in a hammock, etc.

posted on Thursday, January 06, 2005 8:08:49 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Tuesday, January 04, 2005

I've been a proponent of DLP over other display technologies like CRT, plasma, and LCD (direct view and projection) for a while.  I've gotten to the point where I can somewhat easily tell the technology from a glance at the screen alone. All the current technologies have distinguishing characteristics:

  • CRT
    • Direct view - The screen is obviously the front of a CRT
    • Rear Projection - The image is more fuzzy and floor models usually have horrible convergence issues
  • Plasma - Beautiful, bright image.  Super thin
  • DLP - Beautiful bright image, but rainbow effect if you shake your eyeballs really fast on high-contrast images (caused by the color wheel)
  • LCD
    • Direct View - Thin, but not as thin as plasma, and duller than plasma.  Backlit
    • Rear projection - No convergence issues, no rainbow effect, not as bright as DLP

I was browsing in Best Buy the other day and ran into a JVC set whose technology I could not place.  It was obviously rear-projection and it was as beautiful and bright as DLP and plasma, but had no rainbow effect.  I was stumped.  I felt better when I examined it further and found it was a technology I was not familiar with.  It was HD-ILA.  It's based on what they call a direct-drive image light amplifier chip.  It's a reflective technology like DLP, but they use a 3-color process rather than a color wheel, which explains the missing rainbow effect.  It also has a price that's comparable to the DLP sets. Obviously, you could acheive the same results with 3 DLP chips, but at a higher cost.  A further benefit is that they can pack the pixels' reflective surfaces closer together, so more of the lamp light is reflected, so the image can be brighter.

There are a few things I'm still trying to figure out.  They are only using one lamp for all three colors, which may be possible as a result of using the lamp's brightness more efficiently, but I'd still like to break one open and take a look.  JVC's presentations don't have a picture of the insides.  From the presentation, it sounds like they are not using hinges, but perhaps controlling the reflective properties of the pixels themselves to turn pixels on and off. I'm still learning about the technology, but it seems this new player may be the way to go on a new set, which may be closer than I would like, given the problems I've been having with my old Toshiba set lately.

[UPDATE 1:42pm] The technology behind this is LCOS, which is a variant of LCD that has evidently become more manufacturable recently. So, the RGB sub-pixels are on the surface itself and a single lamp simply reflects off of the surface and is focused onto the screen.  This means it avoids convergence issues entirely, which was a concern of mine.  Another perk is that, if the subpixels are aligned the same as LCD, ClearType should work with this technology.

[UPDATE 1:57pm] Here's a review of the set I saw.  Pretty good and fairly humorous.

[UDPATE 1/5/2005 12:19pm] After some more reviews and research, it appears that JVC's D-ILA implementation of LCOS uses three chips, and I would think that eliminates my excitement about ClearType and a convergence problem free set. I'd still like to see the physical configuration. Most reviews recommend it, but the numbers seem to indicate that the current line is targetted at the average consumer rather than at videophiles (super-bright, high black levels, etc).  Unfortunately, I always would like videophile performance at average consumer budget.

posted on Tuesday, January 04, 2005 10:10:39 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Monday, January 03, 2005

I've been off for vacation for a little while, and today I went in for my first day of the new year.  I had been suspicious about whether today was one of the official holidays on the calendar, but I went in anyway.  Hardly anyone was there, and I related my suspicions to my boss, who went and got a new 2005 calendar and confirmed that it was indeed a holiday.  So, we went home.

Luckily, I won't have to spend time tomorrow catching up on my email and such since I did it all this morning.

posted on Monday, January 03, 2005 9:47:33 AM (Pacific Standard Time, UTC-08:00)  #    Comments [2]