Wednesday, May 17, 2006

On Being An Anti-Technology Technologist

Scott Hanselman (recently added to my Blogroll by the way) points to this absolutely fantastic post:

With the amount of crap being vomited up by his Ethernet connection -- all day, every day -- it's tough to walk away from the spigot for fear that he'll return to waist-deep water. Ethan reads his mail in real-time to avoid being greeted by a hundred-message pile-up when he gets back from lunch. Bringing the computer with you is the only way to keep up.
...
Years ago, someone phoned you and you weren't home, you missed the call and they had to try back -- now, the messages queue up in voice-mail. TV shows used to slip unwatched by unless you were there to suck them up them in real-time -- today, my TiVo has hours of mindless crap that it's faithfully holding for me. The Web originally required me to actually go out and do something as quaint as visit sites to read them -- these days, my feed reader pulls down megabytes of data -- a large portion of it, of course, cat pictures -- and piles it up, forever. Each of these swollen reservoirs of data silently mocks me with my inadequacy.

For my part, my life looks nothing like this, and it took a lot of work to keep it that way. I recognized the pattern early on when I was working for a small consulting company while going to MSOE. They gave me a pager... and my life changed. I started calling it my mood changer, because every time it would vibrate, now matter where I was or what I was doing, I'd get a scowl, and everyone knew I got paged. Did you know that nobody ever pages you with good news? When I interviewed for my next job, and they gave me a chance to ask questions of them about the position, my very first one was, "Will I be required to be on call or carry a pager?"

For a couple years after that experience I even refused to own a cell phone. I didn't want to risk being that available. I liked the fact that people had to send me an email, or leave a... *gasp* ...message on an answering machine. It's frankly quite liberating. Even today, now that I have a cell phone, I'm fairly protective of the number. I don't use SMS, don't own a Crackberry... hell... I don't even carry a PDA around anymore (though I did experiment with one for a while).

At the various companies where I work, they tend to have mass email lists for every project that flood you with useless crap every five minutes. Instead of sending a very directed message, peole love sending it on the list, even though only 1% of the list members really care. I make it a habit to have myself removed from that list as soon as I'm off a project. If I can't swing that, then I always set up a Rule Wizard to file the message off into a folder I never read. I'm religious about it.

Someone I used to work with never was that good about getting off those email lists. If he was out of the office for a week, he'd end up with hundreds of messages in his Inbox. When he got back into the office, he would delete all his Inbox messages, and then send one mass email to everyone saying that he'd "lost all his email" while he was out, and that he'd "appreciate it if everyone would forward any important messages". He'd end up with about five. I vowed to never let my Inbox get to that point, and so far it's worked.

My sister Sarah is a great example of someone who bucks this trend. She has two cell phones, a Crackberry, and who knows how many other little gadgets. When she commented to me about how surprised she was to see I didn't have these things, since I work in the technology field (I even still file my taxes on paper), I laughed and told her "I'm the last anti-technology technologist". I use technology to improve my life, and not let technology determine my life. Sometimes I wonder whether she brings this flood of information onto herself because she has the technology, as opposed to using the technology to manage the flood.

I will concede one point. I love my RSS Reader. But the nice part about RSS is that it uses a pull, as opposed to a push method. I subscribe to things I'm interested in (like a good dessert), as opposed to having emails forced down my throat because others think it's good for me (like broccoli). Even if not every item in the feed is worthwhile, the fact that I chose to get it makes it more palatable to me.

#    1:35 PM by Nick | 1 Comment |
 Tuesday, May 16, 2006

What Motivates You?

My boss at the consulting company sent me a questionnaire asking me to place 10 things in order of importance as far as what motivates me. There was a list of 10 things like base salary, time off, interesting work, etc. with fancy little combo boxes next to each one so I could put a number next to them. Someone in HR I'm sure put in a good amount of time figuring out how forms in Word works.

This is probably the one major problem with working for a company you never go to. I'm always on the client site, so I rarely see my actual boss. That means that my boss has to rely on silly questionnaires to get a sense of what is important to me, along with the occasional lunch.

Worse yet, I'm not sure what I sent is accurate. First of all, I didn't put a lot of thought into it, since I forgot about it until the day it was due. Secondly, I'm not sure I can rate those items from 1 to 10. Usually I have an idea of what I want from each category, and then view the sum total in aggregate. Rarely if ever do I say to myself, "Well the pay isn't that great, but the PTO is fantastic. However, since I rate base pay as more important, I can't take the job."

That's just not how I think.

#    4:58 PM by Nick | 1 Comment |
 Sunday, May 14, 2006

The Coding Monkey Song!

OH. MY. GOD! It's the Code Monkey Song! This is a must download!

Via The Sells Brothers.

#    11:33 AM by Nick | No Comments |
 Tuesday, April 25, 2006

Pet Peeve

I absolutely hate, with a vengeance, any website that emails your password to you after you sign up for services with them. Email is not secure you jerk wads! And if I happen to be using Gmail, then that email you sent me, even if I delete it, will probably sit in their cache forever to be subpoenaed by who knows what agency somewhere.

Here's a clue. I just had to type my password twice. I know what it is. You don't have to send it to me.

#    12:55 PM by Nick | 2 Comments |

Talk About a Blown Weekend

I felt like last weekend was cut short. Saturday was definitely the most gorgeous day out of the two, and I spent the entire thing indoors at the WI-INETA Deeper in .NET conference. I suppose I shouldn't complain, since it was free, and 4 out of the 5 speakers were pretty good. I even got a free book out of the deal (even though I'm getting a ton through BlogCritics these days). So why am I complaining? Well, why don't' I just give you a review of the speakers that were there.

Michèle Leroux Bustamante: She spoke first thing in the morning about WCF (formerly Indigo, not the World Curling Federation, Matt). It was a pretty good talk, and she was definitely knowledgeable and well prepared. The problem is... well... she didn't explain what problems this would solve for us. WCF is supposed to finally bring together web services and .NET remoting under one unified architecture, but to be honest, I don't have many problems with the current architecture. I think talking about what problems exist that will be solved is crucial, since WCF is still in early development stages. Really, the code samples I saw looked an awful lot like current Web Services and .NET Remoting. So what's really changed? The hosting environment? Big whoop.

Scott Hanselman: Scott was next, and had I left after his talk, I would have been a very happy camper. His talk was supposed to be about a "Successful ASP.NET architecture using dasBlog as an example", but he really didn't talk to much about dasBlog. What he did talk about were internals in ASP.NET, serialization, debugging tips and tricks, and all sorts of other really random cool goodies. I came out of there with about 2 pages worth of notes. He went off on so many tangents, that he might as well have thrown away his slides, but that was OK. His tangents were incredibly good. He was also incredibly funny.

Julie Lerman: This was the only talk that I considered bad. It wasn't that she wasn't enthusiastic, but she just presented her material (ADO.NET and SQL Server 2005) very poorly. She's a self confessed "data geek", which few people are. Most of us (me included) view databases as a means to an end, while she views them as an end unto themselves. Most of her examples didn't actually serve any purpose other than to say "look, this works", without showing why you'd want to use this new feature. Everyone in the audience was staring at their watches waiting for her talk to be over.

Bill Hatfield: Bill gave an interesting talk on AJAX, and the new .NET components for developing AJAX applications called Atlas. It was a decent talk, with good real world examples. I think he mislead people several times when he claimed that there would be "no round trip to the server", which is completely false. The point of AJAX isn't to eliminate round trips to the server. Rather, you only go the server to replace a small portion of the current DOM, instead of making a round trip to the server to replace the entire page. He didn't explain this well at all. He also leaned on the "I don't know because this is beta" crutch too much when answering questions. If your talk is on a beta product, then you should know the ins and outs more than he did. A few times during his talk, people from the audience were telling him how it worked.

Jason Beres: This was the last talk, and was interesting if nothing else. Though I have to say... turn down the volume! His talk was on WPF (formerly known as Avalon). Being a thick client programmer, and having worked on SVG previously, this was an intriguing topic. What I found most disturbing was the fact that he confessed to having no real knowledge on the topic except what he picked up from someone else's slides and examples, which he learned in two days. With that said, he did a very good job presenting everything had learned, but it still seemed strange.

So if the majority of the talks were good, then why was it a waste of my time? Because most of these technologies are still quite a ways off, and will be changing quite a lot between now, and when they are officially released. Frankly, very few companies are willing to take the risk into bleeding edge technologies. Had they had more talks like Scott's, and had Julie's been better (both were on current technologies), I would have felt better.

As it was, I would have rather been out enjoying the sun.

#    10:51 AM by Nick | No Comments |
 Thursday, April 13, 2006

Any Fool Can Criticize...

"... condemn and complain... and most fools do."
- Dale Carnegie

I have another review up at BlogCritics.org, on The Visual Basic 2005 Jumpstart from O'Reilly.

#    11:21 PM by Nick | No Comments |
 Saturday, April 08, 2006

I Have Another Review Up

As Mel Brooks once said, "Critics can't even make music by rubbing their back legs together." But we can certainly write. Check out my latest review on BlogCritics.org of the "C# Cookbook, 2nd Edition".
#    1:18 PM by Nick | No Comments |
 Friday, April 07, 2006

You Code Like a Girl!

Thanks to Virginia Postrel for pointing out this rather interesting post about the aesthetics of code:

What prompted this post--and it's whimsical title--is a post by Jamis Buck titled Beautiful code, test first, which includes the following:
"He was telling me how he feels like he has to sit and tweak his code over and over until it not only acts right, but looks right. It cannot be merely functional, it must be beautiful, as well."

But the best part was a comment by "Morten" that included the line:

"As for spending too much time on making the code look right down to the last indentation - my code has been called "girl code" for the same reason..."


Frankly, I don't know if gender really has anything to do with it, but I do firmly believe that there are people in general who code in this fashion, and that certain programming languages cater to this desire. A number of years ago, I saw this post on who a typical C# programmer is:

When we talk about “code focused” this meant a couple of things to us. First, the users we watched were very persnickety about their code. For example, they would spend a lot of time formatting their code the way they wanted. They would write a block of code, and then go back and indent it the way they wanted. They would copy code from somewhere, and then format it in their editor before they even read it. There just seems to be a sense that the code itself can be beautiful, and code that was ugly, and here I mean was formatted in the wrong way, was fixed up.

The other part of being code focused has to do with the way they see the designers and other parts of the Visual Studio tools that were not code editors. For instance, the Windows Form designer. Many developers look at programming as designing a form, and then writing “code behind” that makes the form work. The form itself is the program, and the code is annotations that make the program do what they want. The Visual C# developers, however, tend to think of the Windows Form designer as a code generator. For example, we saw one developer use the form design and the sever explorer to bind to data. Then he went in and cut out all the generated data code and put it into it’s own class. He didn’t mind using the generated code, but the code was his, not the form’s. Furthermore, he couldn’t live with having the data code embedded in the UI code, he just had to factor it out or he wouldn’t have slept well that night.


So what some interpret as a "girly coder"... just might mean you're code focused.
#    9:15 AM by Nick | 1 Comment |
 Tuesday, March 28, 2006

How Many Companies Use Apple?

There is a reason why companies prefer Microsoft over Apple. The NY Times tries to bill legacy support as bad:

As a result, each new version of Windows carries the baggage of its past. As Windows has grown, the technical challenge has become increasingly daunting. Several thousand engineers have labored to build and test Windows Vista, a sprawling, complex software construction project with 50 million lines of code, or more than 40 percent larger than Windows XP.

"Windows is now so big and onerous because of the size of its code base, the size of its ecosystem and its insistence on compatibility with the legacy hardware and software, that it just slows everything down," observed David B. Yoffie, a professor at the Harvard Business School. "That's why a company like Apple has such an easier time of innovation."

Microsoft certainly understands the problem, the need to change and the potential long-term threat to its business from rivals like Apple, the free Linux operating system, and from companies like Google that distribute software as a service over the Internet.


Microsoft has understood this from the very beginning... dating back to its first dealings with IBM. Microsoft recognized that software was just as crucial as hardware, if not more so. It also recognized that software was an investment. Not only does software cost money, but so does deploying it across a large corporation. From the deployment itself, to testing and training, and backwards compatibility concerns with legacy documents. Companies make an investment in software.

Apple over the years has ignored that fundamental business reality to its own detriment. They unveil new hardware that won't run old code. They create new operating systems that require new versions of other software to use. As a result, companies are unwilling to buy Apple computers and operating systems because they realize that an upgrade to the OS would not only require paying for the new operating system, but also investing in new versions of other software to work on that operating system.

While Windows may be slower, you can still run old versions of Office on Windows XP for instance. That allows companies to delay, or even completely avoid upgrading peripheral software that may currently fit its needs. This decision is key when companies scale up in size. Because new hardware won't run old operating systems, it is not uncommon for large corporations to run mixed hardware and operating systems across the enterprise. However, because Microsoft handles legacy applications so well, they can still run the same version of Office, or any other application. Companies can then invest in new hardware for new employees, and not worry that it will create inconsistencies elsewhere.

So while handling legacy code may have disadvantages to pure performance in the operating system, it has far more advantages in the enterprise. Apple's sales numbers, and market penetration over the years more than prove that. Hopefully Microsoft won't forget it.

#    12:16 PM by Nick | 1 Comment |
 Sunday, March 26, 2006

You Can Find Me Other Places Too

As Joseph Addison once said, "There is no defense against criticism except obscurity." And with that said, you can find my latest review up at BlogCritics.org. It's a review of the new O'Reilly book, Information Dashboard Design by Stephen Few.
#    5:29 PM by Nick | No Comments |
 Friday, March 24, 2006

You Have to Understand The History

One of my favorite quotes about software is from Michael Sinz:

Programming is like sex, one mistake and you have to support it for the rest of your life.

If you've programed in Visual Basic.NET for any length of time, you soon realize that this is a language that has to make a lot of child support payments. Yesterday I had to answer a question from a colleague about yet another bastard child feature in VB.NET... Array Declarations. She kept having issues because there was one extra item in the array than she was expecting. Previously she'd really only dealt with collection classes like ArrayList. So she was very confused when this statement created an array of 7 elements:

Dim pkTableCol(6) As DataColumn

After all, this statement initializes an ArrayList with a Capacity of 6 elements:

Dim pkTableCol As New ArrayList(6)

In the majority of languages like C, C++, C#, Java, and who knows how many others, you declare an array with the size of the array. The array is then indexed from 0 to Size - 1. In Visual Basic, you declare an array with the largest index. Therefore you get an array that is indexed from 0 to Index. But why on Earth would you make that decision? It's all due to the long and storied history of Visual Basic.

Visual Basic isn't like most programming languages, in that it was designed to be used by people without general computer science backgrounds. One of the "User Friendly Features" they created was arrays that were indexed starting at 1, instead of 0, and ended at Size, instead of Size - 1. While programmers are used to counting starting at 0, most non-programmers start counting at 1. While most C++ programmers would walk through an array list this:

const int ARRAY_SIZE = 6;
int array[ARRAY_SIZE];
for ( int i = 0; i < ARRAY_SIZE; i++ )
{
   array[i] = i * 1000;
}

A VB 6 programmer would have walked through an array this way:

Const ARRAY_SIZE As Integer = 6
Dim array(ARRAY_SIZE) As Integer
Dim i As Integer
For i = 1 To ARRAY_SIZE
   array(i) = i*1000
Next i

In this context, the To keyword is inclusive, so it's equivalent to <= in the C++ for loop. Unfortunately, this lead to a lot of issues. While arrays in Visual Basic worked this way, and so did some of the internal collections, may other types of lists and collections had to be 0 based because they interacted with the Windows API which is C based. So Visual Basic code was filled with mixed base arrays that confused the hell out of a lot people. You could, if you knew about it, actually change the base of an array either by using the Option Base directive, or by changing your array declarations:

Dim array(0 To ARRAY_SIZE-1) As Integer

But many people either didn't know of this feature, or just didn't bother with it. That meant that when Visual Basic.NET came along, there was a lot of old code that had to be supported for conversion from VB6 to .NET.

In .NET, no matter what language you use, arrays are indexed from 0 to Size - 1. This allows for interoperability between all the .NET languages, the Windows API, and COM controls as well. Even Visual Basic array are indexed this way. However, by changing the array declaration syntax to continue to support the old way, they supported all the old code. This way, old VB6 code would still work, there would just be one extra element in the array at index 0, which would never be used. But, the advantage is you don't get all sorts of index out of range exceptions when you convert and run your old code.

Had they changed the array declarations to come in line with the C family of languages, then you'd have to go in and modify a lot of old code if you were converting a VB6 project, because the last element wouldn't exist if you started counting at 1. Was this a good idea? Should they have forced people to modify their old code? That's up for debate. But that's all water under the bridge at this point. The decision has already been made, and now you have to support it.

#    9:41 AM by Nick | No Comments |
 Wednesday, March 22, 2006

If It Ain't Broke, Don't Fix It

One of the projects that I sometimes still get dragged back into now and then is about a week and a half from going to production. This is a fun time when the last of the defects are quickly being fixed, and testers scramble around to run the last of their scripts. Then you see a defect that is in code that you know has been working for a long time. After investigating the defect for a bit, you run into the buggy line of code.

That's when I usually say out loud, "How did that get in there?"

The very first thing I do in this case is search through the file history in Source Safe. Sure enough, something was just checked in prior to today's build. So I look at the check-in details. "Fixed Defect #xxxxx and changed a couple other things".

"Great. I wonder what 'other things' got changed."

I've run into this problem at the end of more releases than I care to remember. There is usually at least one developer in any group who loves to tinker. They usually say to themselves, "Well as long as I'm working in this file anyway, I might as well clean a few others things up too." And that's when the new defects come in.

While it can be all well and good to change around some ugly code during development, you should always let ugly code lie at the end of a release. There simply isn't enough time to test your changes. And your changes should be tested. What's worse, is that these "minor changes" are rarely ever called to anyone's attention when checked in. They're simply snuck in, so people don't know that they need to test them. As the old saying goes, "If it ain't broke, don't fix it."

#    4:12 PM by Nick | No Comments |
 Friday, March 17, 2006

You Know You're a Geek When...

Have you ever written a really bad joke or pun into an email, and not realize how awful it was until after you hit send? Yesterday, I happened to put this in an email response:

Just wanted to make sure I didn't get lost in the void... or
the void* for that matter.

If that person didn't know I was a geek before... he does now.
#    9:11 AM by Nick | No Comments |
 Friday, March 10, 2006

How Many Designs Have You Regretted?

With out this guy, Dilbert would have never been popular:

Robert Oppenheimer agonized over building the A-bomb. Alfred Nobel got queasy about creating dynamite. Robert Propst invented nothing so destructive. Yet before he died in 2000, he lamented his unwitting contribution to what he called 'monolithic insanity.'

Propst is the father of the cubicle. More than 30 years after he unleashed it on the world, we are still trying to get out of the box. The cubicle has been called many things in its long and terrible reign. But what it has lacked in beauty and amenity, it has made up for in crabgrass-like persistence.


Of course we all have some decisions that we've regretted... but how many can you say have made the lives of millions of people miserable? Now that's an accomplishment.
#    8:22 AM by Nick | No Comments |
 Friday, March 03, 2006

Pimp My Cube?

This seems like a good idea, except for what's included in the kit:

For only $14.95, you can turn your own drab office space into 'dazzling digs.' That's the promise of a soon-to-be-released kit, Pimp My Cubicle. With a title spun off the popular MTV show 'Pimp My Ride,' the kit will be released March 14, providing office workers with gold pushpins, a mini disco ball, a dollar-sign paperweight, leopard-print fringe and an adhesive gold keyboard key—'to give you a little start on your bling.'

Adding some flair to your cube is always fun... but I think most people who dwell in cubes aren't looking for gold studded bling. This is the sort of stuff we put in our cubes. Know your market!
#    12:14 PM by Nick | No Comments |
 Tuesday, February 28, 2006

Error Message of the Day

Here is a fun one. I got this error message when I opened up a VB.NET project in Visual Studio 2003 that was not part of a Visual Source Safe repository (or any source code control system for that matter):

Made me double take.

#    3:54 PM by Nick | 1 Comment |
 Wednesday, February 22, 2006

Compiler Error of the Day

Here is a compiler error I got while quickly throwing together a custom collection:

Public Overrides Sub RemoveAt(index As Integer)' cannot override 'Public Overridable NotOverridable Sub RemoveAt(index As Integer)' because it is declared 'NotOverridable'

Overridable NotOverridable?! Huh?! Yet another reason why Visual Basic really chaps my hide.
#    2:52 PM by Nick | 1 Comment |
 Thursday, February 16, 2006

Pet Peeve

Why do people insist on touching your monitor when they're showing you something on your computer? Use the mouse, or a closed pen... but for God's sake don't touch the screen! You think I want your finger prints all over my monitor while I'm trying to work? Someone was just over by my desk and insisted on touching my monitor about 20 times (not an exaggeration), and now every other word I'm typing on the screen is covered with a smudgy fingerprint. Excuse me while I go get some Windex.
#    4:30 PM by Nick | 6 Comments |
 Friday, February 03, 2006

Another Del.icio.us Wish

I made a wish a while ago looking for tag compliments. Now I've got a few more, now that I'm using del.icio.us more and more.

First, I'd like them to improve their Tagroll feature so that I can limit the tags list only to show those that are included in a specific bundle. They already do something similar with Linkrolls, which allows me to only show links that have specific tags associated with them, now I want similar functionality with Tagrolls please.

Secondly, I'd like them to add more functionality to JSON (javascript object). Specifically, I'd like to query with a specific URL, and get back a list of the tags associated with that URL.

Finally, I'd like some mechanism so that I can mark a link as private, and only visible if I'm logged into del.icio.us. Yes... sometimes I want to hide my porn. So sue me. ;) At least I'm brave enough to admit it.

#    3:04 PM by Nick | No Comments |
 Monday, January 23, 2006

Interviewing Tips

A friend of mine recently sent me an email (along with his resume), saying that he was going to be out of work in a couple weeks. The company he was contracting with was not going continue his contract, because apparently the project he was working with wasn't going forward. My consulting company is pretty good, and they offer a good referral bonus to consultants, so I'm usually pretty good about recommending my company, and asking my friends how happy my friends are where they're working.

Anyway, I forwarded his resume on to my resource manager, and my friend was interviewed. He went through the gauntlet pretty well, and eventually was made an offer. My manager sent me an email thanking me, and forwarded a comment from one of the people who interviewed him. One of the things that impressed him the most (and very well could have lead to his offer) was the fact that he sent a thank you note after the interview. He said it was the only thank you note he can remember receiving in dozens of interviews.

I remember that little bit of advice from our career counselors in college, when they were prepping us for interviewing when we graduated. They were right. It doesn't have to be much. Hell, it doesn't even have to be a hand written note. Send an email. Be sincere. It works.

#    9:38 AM by Nick | 1 Comment |
 Tuesday, January 17, 2006

Short Circuit Logic

I participated in a small group talk at my company last week on the topic of "Upgrading VB6 to VB.NET". The presenter had scoured the Internet looking for helpful information, and going over pros, cons, and typical problems that people encounter when converting existing code from VB6 to .NET. One of the issues he brought up was with short circuit logic. He found this article on The Scarms (which I never heard of), that said that VB.NET now did short circuit logic where VB6 did not:

New to VB.NET is short circuit logic. Short circuit logic only evaluates multiple conditions in a logical statement if necessary. Consider:

Dim b As Boolean

b = Function1() And Function2()

Under VB6 both functions are evaluated. Under VB.NET if function1 is false, function2 is not evaluated since "b" cannot be True. While this is more efficient it can cause problems. If a side effect of evaluating function2 is the setting of a global variable, that variable will no longer get set. This will produce the desired effect:

Dim b As Boolean
Dim c As Boolean
Dim d As Boolean

c = Function1()
d = Function2()
b = c And d


This is dead wrong. VB.NET by default will still evaluate all terms in a logical expression as it did in VB6. For many VB6 programmers who did a lot of C, this bothered them greatly, and so VB.NET introduced two new keywords to perform short cirucit logic (AndAlso does short circuit And, and OrElse does short circuit Or). However, the operation of And and Or have not changed. Here is an example VB.NET program which illustrates this:

Module VBPlayground

   Sub Main()

      Dim bFirstParam As Boolean = False
      Console.WriteLine("Testing And")
      If (bFirstParam And SecondParam()) Then
         ' Do Nothing
      End If

      Console.WriteLine("Testing AndAlso")
      If (bFirstParam AndAlso SecondParam()) Then
         ' Do Nothing
      End If

      bFirstParam = True
      Console.WriteLine("Testing Or")
      If (bFirstParam Or SecondParam()) Then
         ' Do Nothing
      End If

      Console.WriteLine("Testing OrElse")
      If (bFirstParam OrElse SecondParam()) Then
         ' Do Nothing
      End If

      Console.Read()

   End Sub

   Private Function SecondParam() As Boolean

      Console.WriteLine("Second Parameter Called")
      Return True

   End Function

End Module


And here is the output from that program:


Testing And
Second Parameter Called
Testing AndAlso
Testing Or
Second Parameter Called
Testing OrElse

So why did the VB.NET folks decide to continue this behavior, instead of bringing it inline with the other .NET languages like C# and J#? The answer is pretty straightforward... backwards compatibility. If they changed the behavior, and you tried to port your code from VB6 to VB.NET, you could potentially run into all sorts of weird bugs that would be difficult to find, since you might depend on the side effects of a function that might never get called. Imagine if some important database call occurred in SecondParam(). Thats why they introduced the new keywords, and I think it makes sense.

However, this is also a good reminder to use AndAlso and OrElse instead of And and Or in your regular Visual Basic programming from now on, unless you have a specific reason for all parameters to be evaluated.

#    11:02 AM by Nick | No Comments |
 Thursday, January 12, 2006

Understand Your Workforce

When you run a company full of people writing software... there are certain things that an office should have in order to support its workforce. Sure things like pens, paper, computers, printers, desks and chairs are all well and good. But when your vending machines don't have any Diet Mountain Dew in them... can you really claim understand to understand those who work for you? Sheesh.
#    11:19 AM by Nick | 4 Comments |
 Tuesday, January 10, 2006

The Bench

I ended my last client engagement at the end of December... and so now I'm sitting on "the bench". It's actually nice to have a quiet piece of time to do some training, try to finish up my MCSD, and most importantly to take a breath and gain some distance from my last job in preparation for my next.

I thought I'd mention a few random things as I sit in my new cube:

  • Having a cube next to a window is really cool. Literally... it's winter here and windows offer absolutely no insulation. I'm freezing!
  • The chair I have has two levers on it. One of them adjusts the height of the chair, while the other has absolutely no function whatsoever. Seriously... I've spent the last 10 minutes trying to just get the damn thing to move in one of 6 directions, and it doesn't budge.
  • Being able to experiment on things you've wanted to for a while is definitely an added bonus to the bench... except when you realize how poorly certain SDK's are documented. I think I need to go find some blogs for members of the VSIP team.
#    12:53 PM by Nick | 2 Comments |
 Wednesday, January 04, 2006

Readme Item of the Day

Was reading the Visual Studio 2005 SDK Readme and happened upon this rather humorous note:

Setup fails if the installation path is customized to path with more than 128 characters excluding the drive letter and the slashes. (We realize it is ironic to put this information in a file that is installed by setup, but at least you know that we know about the problem you have already worked around).

And now you know that I know that they know about the problem...
#    11:00 AM by Nick | No Comments |
 Tuesday, December 27, 2005

Never Put "Bible" In the Title of Your Book

Among various other gift cards I received this Christmas, I got one from Barnes & Noble. I love books of all kinds... so I stopped by a store yesterday to peruse through the isles. As it turns out, I didn't buy any, but I did spend a while looking. My stack of unread books is still pretty high, and so I decided I needed to shorten the stack before I bought more. I always go through the section of the store that has programming books to see if anything catches my eye. The store at Mayfair has unfortunately decided to shrink that section more and more every time I go... I guess I'll be getting even more of my technical books from Amazon now.

Anyway... one title caught my eye in particular... and not because I was interested in the subject matter anymore: Standard C++ Bible. I don't write C++ anymore, though I used to do a lot of it. What caught my eye was the title. I would never buy a book... ever... that had "Bible" in the title... except maybe one. As far as technical books go... if you have to put "Bible" in the title, then it isn't one. Technical bibles are known as such because of their good information and well known authors. They're the types of books that are known simply by their author's last names. This is the C++ bible... and "Bible" is not in the title.

This actually reminds of a Friend's episode (as sadly many things do). It's the one where Monica has recently broken up with Richard, and gets a message on her answering machine from him, but doesn't know if it's old or new. She ends up leaving a message on his machine and ends it with "I'm breezy". Joey then tells her... "Hey, you can't say you're breezy. That totally negates the breezy!". This may in fact be the only time in the history of the show where Joey used the word "negates"... and is very much out of character for him. Anyway... I digress. You can't put "Bible" in the title of the book... it totally negates the holiness of your writing.

#    9:23 AM by Nick | No Comments |
 Friday, December 23, 2005

Pet Peeve

White papers available for download as an exe. Why? It's a white paper. Make it available immediately in one of the many many formats for transferring documents. What about Word format, HTML, PDF... any of those. If it's huge... zip it up! I don't want to have to run an exe just to get a doc. Who knows what else is in there. Besides, who doesn't have zip on their computer these days? The more steps you make me go through to actually read the paper, the less likely I am to read it... I'm just saying.
#    11:53 AM by Nick | 2 Comments |

One More Reason I Liked My Alma Mater

You won't find any of these courses where I went to school. They actually offer courses and labs having to do with... you know... your degree program. Here's some of my favorites from the list of the Most Bizarre College Courses:

The Unbearable Whiteness of Barbie: Race and Popular Culture in the United States at Occidental College in California explores ways "which scientific racism has been put to use in the making of Barbie [and] to an interpretation of the film The Matrix as a Marxist critique of capitalism."
...
Alfred University's Nip, Tuck, Perm, Pierce, and Tattoo: Adventures with Embodied Culture, mostly made up of women, encourages students to think about the meaning behind "teeth whitening, tanning, shaving, and hair dyeing." Special projects include visiting a tattoo-and-piercing studio and watching Arnold Schwarzenegger’s bodybuilding film, Pumping Iron.

I wonder if students will think those classes were worthwhile when they have to figure out how to pay off their student loans?
#    9:19 AM by Nick | No Comments |
 Wednesday, December 14, 2005

Go For the Take Aways

Yesterday I went to the local Visual Studio Launch Event in Brookfield. Everyone was there for one thing... the free copies of software. Specifically they gave away full versions of Visual Studio 2005 Standard, and SQL Server 2005 Standard (not time expiring versions). The talk they gave was... well... about what you'd expect. I thought I'd share a few impressions.

First of all, I know its a difficult thing to do one of these so well, as to not have any complaints from anyone. Whidbey included so many new features, that trying to talk about all of them in 4 hours, in sufficient depth to satisfy everyone, is simply impossible. But that doesn't mean I can't complain does it?

One of the first things that they talked about was Visual Studio Team System. This includes functionality of Team Foundation Server (bug tracking, source code control, and project management), as well as developer tools like unit testing, and architecture tools. This is not a new market space. Products have existed for a long time in these areas from companies like Rational (now owned by IBM), PVCS (now owned by Serena), NUnit, and many many more. The funniest part about the talk was how they pretended like they were innovating here, instead of simply duplicating existing products. Of course the reality too is that there simply aren't as many features in their versions, as with the products they aim to replace. The only advantage is the tighter integration with Visual Studio proper.

Next up was the discussion of new functionality in ASP.NET. He blew a lot of time here. Unfortunately for him, he tried to move off of the script, and there were several times where it didn't work for him. It wasn't his fault at all, as he was trying to write code on the fly, and naturally had errors occur, some of which weren't easily debugged. There were some interesting things shown here, and I suppose I was disappointed that so much time was spent here mostly because I'm a Windows Forms developer. But even I do some web development, so I could appreciate what was being shown.

Then came the Windows Forms demonstration. It sucked. First of all, he spent about half and hour showing a couple custom controls he wrote, which didn't use any new features in .NET 2.0. They were written completely with functionality available in 1.0. So what was the point? He did show two new controls that are available in .NET 2.0, but it was a very short demo. Finally, he demonstrated Click Once Deployment, which was intriguing, and fairly worthwhile.

Overall, I think they made the mistake of showing too much code. Really, in a 4 hour demonstration, you can't show any code that's not trivial, so why bother with really trivial code at all? Why not concentrate on a higher level discussion of new features? Just my two cents. Like I said in the beginning, I was really just there for the take aways.

#    2:29 PM by Nick | No Comments |
 Tuesday, December 06, 2005

Even More Pronunciation

I had this discussion with someone at work a few days ago. If you're a programmer, then you've seen the built-in data type char. So how do you pronounce that? I think most people pronounce it one of two ways:

Char as in char broiled. In other words, pronounce it phonetically, which is how I pronounce it.

Car as in automobile. This one kind of annoys me. The thinking is that char is short for character, so you should pronounce the ch as a hard k. But if that's your thinking, then shouldn't you pronounce it like...

Care as in care package. After all, character is pronounced care-acter. But if you're going to go that far, then why not...

Chair? Maybe I'm taking this too far, after all... nobody says chair-acter.

Now then, my mom is really good at English, but if I asked her, then she'd say...

Shar... because her name is Charlotte which is pronounced Sharlotte, and her nickname is Char (pronounced Shar).

Isn't it funny how such a simple topic can take on a life of its own?

#    8:31 PM by Nick | 1 Comment |
 Saturday, December 03, 2005

Did You Know You Could Do That?

I promised a couple weeks ago that I'd start a series where I would discuss little known features of the .NET Framework. In this first installment, I'll be talking about including resources in a .NET assembly. To be honest, I don't know why people don't use this feature more often than they do. Resources contained within binaries is not a new feature introduced in .NET after all... they've been the basis of Windows programming since before Petzold wrote his first book. What is newer in .NET however is the variety of files that you can include as a resource, and also the ease with which you can gain access to them. When I say variety... I mean variety. You can include literally any type of file as a resource that you'd like to. How's that for flexible?

So before I go into how you do this... let's answer another basic question. Why would you want to include a file as a resource? There are several reasons why you might want to which I'll go over (and this is by no means exhaustive).

Internationalization: .NET includes an easy way to internationalize your text, and part of that is having separate assemblies for each locale. But what if you have more than just string constants that need to be translated? Perhaps you have images that include text in the image, or you have a rich text file that you want to display that needs to be translated. Those can be included inline in the translated assembly, allowing you to make use of .NET's ability to load the correct version of your assembly for the locale of the system, and get at the correct translated resource.

Ease of Installation and Safety: Some of the more annoying parts of writing software is making sure that you get all the proper components on the target system, and then having to deal with those files being removed when they shouldn't. By including required files that don't need to be modified (like an XML schema) in your assembly, you reduce the number of files that need be copied to the target system, and you also don't have to worry about those files going missing later. There's nothing worse than dealing with people who decide they want to clear up 50 KB on a computer that has a 50 GB hard drive by removing "unnecessary" files.

Default Configurations: This is one of my favorite uses. I generally don't like to use the .NET config file mechanism for storing configuration settings, because I find it ugly. It's really not that hard to roll your own simpler XML scheme, and sometimes you might be required not to use the .NET config file mechanism(as I have been in the past). But what happens if that settings file does go missing? You'd like to still include a set of default settings... so how do you do it? Well, one possibility is to sprinkle those defaults across all your classes in the form of constants, and lines of code in constructors. The problem with that solution is that its a pain in the butt to go around and find them later if they need to change. Wouldn't it be smarter to have two versions of your configuration file? One that has the defaults, and one that has the user settings? That way you can load your defaults using the code that you wrote to read in user settings, and then they're also all centralized. As you'll see in a second, you can put that defaults file in the assembly as a resource, and then read it just like any other file later.

So how is this done? Well, the first thing you want to do is make sure that you have your project's default namespace setup correctly. The Visual Studio Compiler uses this to set the namespace of your resource in the assembly, which is what you'll use to gain access to it.

Then, add each file that you want to be a resource to your project, and for each one set it's build action to embedded resource. In this example, the file has to be be referenced as "SummerCampProductions.ResourceDemo.Config.xml". If you add a folder to your project, then the folder name will be used as a child namespace, and any files under that will be in that child namespace.

That's it... that's all there is to adding a file as a resource to your assembly. But now how do you gain access to it in your code? Here is some example code that checks for a configuration file in the executable directory, and if it's missing, loads the defaults from an embedded resource file.

Stream SettingsStream = null;
try
{
   string UserSettings = Path.Combine( Environment.CurrentDirectory, "Config.xml" );
   SettingsStream = new FileStream( UserSettings, FileMode.Open, FileAccess.Read );
}
catch
{
   string DefaultSettings = "SummerCampProductions.ResourceDemo.Config.xml";
   SettingsStream = Assembly.GetEntryAssembly().GetManifestResourceStream( DefaultSettings );
}

XmlDocument SettingsDoc = new XmlDocument();
SettingsDoc.Load( SettingsStream );

// Load Settings Here

#    9:46 PM by Nick | No Comments |
 Thursday, December 01, 2005

Blog Rolling

I've added Gooey Bugs to my Microsoft Blogroll on the right side. It's a tips and tricks blog by Jim Gries over in the Visual Studio team, and has some great debugging tricks and feature overviews, including new features in Visual Studio 2005 like Object IDs which are freaking cool!
#    10:13 AM by Nick | No Comments |
 Wednesday, November 30, 2005

Not On the Flock Bandwagon Yet?

I don't blame you one bit as Flock is still pretty raw... but if you use Firefox, and also use del.icio.us, you need this plugin. You can read about all the features at the del.icio.us blog. Enjoy!
#    2:04 PM by Nick | No Comments |
 Monday, November 21, 2005

Research We Can All Use

First off, Slashdot points us to this very important bit of research... How to write unmaintainable code. Before you go there thinking this will actually be an informative article on good programming practices, think again. This really is an informative article on bad programming practices, and why you would want to use them. If you read this, and then say to yourself, "Gee, I should start doing this stuff too", then stop coming here. I don't ever want to see you again. OK... maybe it's mostly written tongue in cheek... but I am serious about disowning you. Don't think I won't.

On a more serious note, the Microsoft Font Blog has an interesting post on the way that we raed mssipelled words. It's actually very enlightening, and a pretty cool look into how our brains work. As a small aside, after reading this I don't feel nearly as bad about how I sometimes have to correct my blog weeks later. Being somewhat of a perfectionist, I often times get upset at myself when I re-read what I've written and find little spelling goofs (and quickly correct them, even weeks later). I do edit my work when I write it, but my eyes often times glance over casual mistakes because the thoughts that I wrote are still fresh in my head, and I still see those thoughts on the screen, instead of the actual words.

#    3:05 PM by Nick | 1 Comment |
 Saturday, November 19, 2005

Microsoft's Education Problem

I recently was talking to my brother-in-law about a whole slew of different programming topics. My brother-in-law in many ways has been a mentor to me in my software career, and is a brilliant software engineer (even though he doesn't have an engineering degree). He really needs to get back to blogging, because he could provide a lot of good insight. During our discussion, he brought up the fact that he just found out that you could embed files as a resource stream in a .NET assembly. I was taken back for a moment... not because I didn't know you could that, but because he didn't know you could do that. That's actually one of the common tools in my programming arsenal. Later on that night it really struck me. Microsoft doesn't do a good enough job in educating it's programmers with .NET.

Microsoft has created a huge framework in .NET. It's so huge in fact, that people don't really know how big it is, or what is contained in it for you to use. I don't know how many times I've gone into a company and seem them writing code to do some task, when the majority of that code is already contained in the framework somewhere if they just knew where to look for it. The majority of Microsoft's marketing and educational campaigns to date have concentrated on two main things. First they push their languages, and second they push their tools. People know a lot about the nuts and bolts of C# and VB.NET, and they know a lot about the productivity enhancements contained in the various versions of Visual Studio.

But did you know that the Windows Forms editor is actually a part of the .NET framework which you could host inside your own application if you knew how? Did you know that if you wanted to output well formatted HTML to a text file in a windows forms application (as opposed to an ASP.NET app) that you could use the XmlTextWriter to do it, and it would be significantly easier than using simple strings or StringBuilder? A lot of people know that .NET has a support for regular expressions, but did you know that it also has the ability to create an assembly of precompiled regular expressions that you can use as a regular expression library?

Of course I'm really just scratching the surface here, but you get the idea. So as a public service to the .NET community, I'm going to start a new series of posts here at The Coding Monkey called "Did You Know You Could Do That?" where I'll hopefully shine the light on a feature of the framework that you didn't know existed before, or that you didn't know how to use. Look for it soon.

#    12:11 PM by Nick | No Comments |
 Thursday, November 17, 2005

More on Pronunciation

A couple days ago I blogged about confusion in the software industry over certain terms... and ended by talking about confusion with pronunciation of other terms. A friend of mine decided to send me links to a couple things on Bjarne Stroustrup's site that seem especially relevant. The funniest was his FAQ, which among other things explains how to pronounce his name:

It can be difficult for non-Scandinavians. The best suggestion I have heard yet was "start by saying it a few times in Norwegian, then stuff a potato down your throat and do it again :-)" Here is a wav file.

For people who can't receive sound, here is a suggestion: Both of my names are pronounced with two syllables: Bjar-ne Strou-strup. Neither the B nor the J in my first name are stressed and the NE is rather weak so maybe Be-ar-neh or By-ar-ne would give an idea. The first U in my second name really should have been a V making the first syllable end far down the throat: Strov-strup. The second U is a bit like the OO in OOP, but still short; maybe Strov-stroop will give an idea.

Yes, this probably is the most frequently asked question :-)

P.S. My first name is Bjarne - not Bjorn (not a name), Bjørn (a related but different name), nor Barney (an unrelated name). My second name is Stroustrup - not Stroustroup, Stroustrop, Strustrup, Strustrop, Strustroup, Straustrup, nor Straustroup (documents using each of these misspellings can be found using google).


He's really pretty funny. Too bad he doesn't have a blog.
#    9:58 AM by Nick | No Comments |
 Tuesday, November 15, 2005

Name That Term

I had a conversation recently with another programmer... which was a bit confusing... if only because we kept using terms that we thought the other would understand, but didn't because they understood that term to mean something else. Understand?

Our industry is chalk full of buzzwords, paradigms, and models, and a lot of other things that generate confusion. So what are some of them?

Object: The most overused word of them all! The object of this object is to objectify the objective of this other object. Everything is an object, whether someone is actually referring to a class definition, a physical instance of a class in memory, or a requirement for a class. It's not just women who have to deal with objectification... programmers deal with it on a daily basis.

Metaprogramming: This one got me last night. When I hear metaprogramming, I think immediately of metadata... which makes me think of Attributes being used to mark classes, methods, and assemblies in .NET for use in Reflection. This got super confusing because the other person was talking about metaprogramming in its more traditional sense where one program is used to write or manipulate other programs. In this case, it was using C++ template specialization to do some hard core stuff with the template preprocessor. They are related... but really involve two very different aspects of the same concept.

Modal/Modeless: I discussed earlier what happens when non-technical people try to sound technical by using terms that don't exist. Confusing modal and modeless is a great example of that.

ActiveX: I haven't done COM programming in a few years now, but back in the day I was pretty hardcore into COM/ATL and ActiveX. When I was working at Rockwell Automation... towards the end of the ActiveX reign on the Windows world... it was hilarious to see the marketing guys push ActiveX on us. Everything had to be ActiveX. They wanted to start using it just as everyone was stopping using it. Someone in that department heard the term, love it, thought it was all the rage, and so whether it made sense or not, we all needed to be writing them. Of course they didn't really know what they were for... but that never stops someone in marketing. In reality though, there were lots of programmers who were just as confused by ActiveX and how it differed from COM and OLE. To be clear for those who don't know... an ActiveX control was a specific type of COM control which implemented a specific set of interfaces (there were 13 I believe). If you didn't implement them all, it wasn't an ActiveX control.

Of course... it's hardly fair to talk about terms, without talking about how people pronounce certain terms. You'd be amazed at how serious some people get about it... almost to the point of religious fervor. Is GUID a Gooid, or a Gwid? And should you even use the term GUID anymore... and instead use UUID? Is it Linux pronounced with a long or short i? There are some who confuse matters even more by pronouncing the u in different ways. Is SQL pronounced S-Q-L or Sequel? Is OLE spelled out too... or is it Olé?

Are we all a bunch of geeks for caring so much about something so unimportant? Well... duh.

#    4:08 PM by Nick | 6 Comments |
 Saturday, November 05, 2005

Meet the Flockers

I have a pretty general rule about my computer. I don't install two programs that both do the same thing on my machine unless I have a very good reason to. I find one program that does what I want it to do, and I learn how to use that program very well. Once I have decided on the program for my particular purpose, it is generally very difficult to get me to switch away. You have to make a very good case for it. As you can probably guess from my blog, I'm a Microsoft junkie. I've grown up in my programming with Microsoft technologies, and have gotten very good at using them, so it should come as no surprise then that I use Internet Explorer. I used to use Netscape way back when during the old browser wars, but they eventually lost my allegiance when they tried to shove too much into the browser that I didn't use or want. Around that time Internet Explorer had matured enough to win my favor, and it's had it ever since.

When Firefox came out, I will admit I briefly toyed with it. I emphasize briefly. Having sold myself long ago to the Microsoft devil, the "Use Firefox because Microsoft is evil" argument never persuaded me. I don't use one software package just to spite the other company. If a package does what I want it to do, and does it well, then I use it. Believe it or not, the "Firefox is more secure" argument never did much for me either. My contention has always been, and I think recent security reports verify the belief, that Firefox is just as insecure as Internet Explorer. The reason it appeared not to be was because it wasn't popular enough to be a target. As soon as enough people started using it, hackers decided it was worth their time. So for a short time it may have been artificially more secure, but that is quickly changing. In the end I looked at Firefox and saw a less mature piece of software that did the same things that Internet Explorer does. So why should I switch?

Then came Flock. For those not familiar, Flock is a new browser that is based off the Mozilla source branch (like Firefox). The reason it intrigued me when I first saw it talked about on Slashdot was because I saw that it wasn't just another browser that does the same things all browsers have always done. For some time now, I've been del.icio.us for managing my Favorites. Sure Firefox and Internet Explorer can make use of them, but it's not elegant. I've always felt like my del.icio.us favorites were glued onto the side of my browser, instead of built in. Flock uses del.icio.us specifically for managing Favorites, and makes it an integrated piece of the program. Now that is cool.

Obviously I also blog... you are reading this after all aren't you? Sure there are plenty of third party applications that I could use to publish to my blog, but all of them are once again either separate applications, or crappy popup windows that I get in an Internet Explorer or Firefox toolbar. If I want to blog about something I read somewhere, it takes all sorts of extra steps to go from that blog, to my own. Once again, it always felt like my blogging experience was duct taped to the side of my browser. Flock goes to the trouble of integrating those features as first class parts of the browser. Have a Flickr photo album? You can browse through your album (or any other), post pictures to your album, and post photos to your blog all in one step, integrated right in the browser.

Some have suggested that Flock is an answer to a question that nobody asked. Perhaps for many this is true. But at least for me, it is the answer to a question I didn't know I could ask, but wish I had. If you don't use Flickr, del.icio.us, or don't blog, then it's true that there is no reason for you to switch to Flock. But if you do use any or all of them, then Flock will offer you an experience that is very worthwhile. Now then, with all that said, I'm not making the full switch yet. I still primarily use Internet Explorer. But Flock is installed, and I use it now and then to see how things work, and I'm definitely following the builds as they are posted. It's not ready for prime time yet, but of all the browsers I've tried so far, this is the one that has the best chance of replacing Internet Explorer for me.

#    1:38 PM by Nick | No Comments |
 Wednesday, November 02, 2005

How Come The Application Broke?

Today one of my project leaders came by and asked for help figuring out why one of our production systems that I helped work on broke suddenly. We hadn't touched the code in months, so we had no clue what would have suddenly changed. My initial thought was that because it threw an unknown exception at application startup, some needed libraries had been removed or something. After doing a couple minutes of debugging, we found out the problem was a little simpler than that:

StartDate = New Date(Now.Year, Now.Month + 2, 1)

EndDate = Date.Now.AddMonths(2)


And yesterday was November 1st! Doh! Sadly... there is no 13th month in the year, and the Date constructor doesn't rollover properly in this case. Thanfully I didn't write this code... but still had to help fix it. Don't you hate it when really trivial stuff kills you? Hmmm... sorta like Office Space:

Michael Bolton: Ok! Ok! I must have, I must have put a decimal point in the wrong place or something. Shit. I always do that. I always mess up some mundane
detail.
Peter Gibbons: Oh! What is this fairly mundane detail, Michael?!!!!!
#    4:59 PM by Nick | 3 Comments |
 Monday, October 31, 2005

Update: Cube Goodies

Those of you who've started to regularly read this blog, might remember the question I asked at the end of this post:

Recently a friend turned me onto this site, called Despair which is just hilarious. Being a consultant, I was thinking of getting a small version of this to put in my cube. My question is... is that going over the line? Would it be unprofessional to have something so blatantly cynical in my cube, no matter how true?

Well... after some careful deliberation (like us engineering types tend to do), I decided against the "Consulting" one. Instead I went with this one on "Inspiration" which is hard to take in anything but a funny light... I hope. It's sitting on my desk right now.
#    4:51 PM by Nick | No Comments |
 Friday, October 28, 2005

So What Do You Wear to Work?

Overheard the following conversation today:

Developer 1: That's his presentation outfit.
Developer 2: Not to be confused with his funeral outfit, or his interview outfit.
Developer 3: What's wrong with interviewing in my funeral outfit?

It's funny when you work in a software group... the way people dress is almost so standard, that any deviation is quickly noticed. If you dress up one day... you invariably hear the comment... "So, you have an interview somewhere later?"

I once had a contract gig at a place that actually had a uniform that employees wore... from the people who worked on the factory floor, to the engineers, even up to the executives. It was not exactly attractive either.  I never would have taken a full time position there, if only because of that uniform. People either loved it, or they hated it. The common thing I heard was, "It's nice to wake up in the morning and not think about what you're going to wear. You just go into the closet and pick out the next clean uniform and go." For me, I actually like to have the choice in the morning, and to maybe stand out a bit from my coworkers. Not only that, but what I wear is not only a reflection on me, but also how I feel that day.

I actually tended to dress a bit down at that particular client. Part of it was laziness... and part of it was that there wasn't much competition for the dressing nice contest when most everyone else is wearing blue poly blends. Now that I'm working for a new consulting firm, I tend to dress a bit better, and I like to think that I stand out a bit. I think its also important because it reflects on my company. That's not to say that I don't enjoy jeans on Friday, nor am I anywhere near being a metrosexual... but still... clothes do make the man don't they?

#    11:57 AM by Nick | 1 Comment |

Release the Hounds

Visual Studio 2005 has officially shipped! If you're an MSDN Universal Subscriber, and you have more bandwidth than God, then you should be able to download it right now. If you're an unlucky sap like me, you'll have to wait a few weeks before the boxed sets become available. I'll be going to a launch event here in Milwaukee early December where they're giving away copies of VS2005 to all attendees... so if you can make one, I highly suggest you go.

For those of you who installed Beta editions of VS2005, you'll have to go through a 23 step uninstall procedure before installing the official version. If that seems mind numbingly awful to you, I would suggest this tool (thanks Chris).

#    8:35 AM by Nick | No Comments |
 Wednesday, October 26, 2005

Microsoft Mind Rot

Charles Petzold recently gave a very interesting, and rare, talk to a User's Group... and asks whether Visual Studio Rots the Mind:

Visual Studio can be one of the programmer's best friends, but over the years it has become increasingly pushy, domineering, and suffering from unsettling control issues. Should we just surrender to Visual Studio's insistence on writing our code for us? Or is Visual Studio sapping our programming intelligence rather than augmenting it? This talk dissects the code generated by Visual Studio; analyzes the appalling programming practices it perpetuates; rhapsodizes about the joys, frustrations, and satisfactions of unassisted coding; and speculates about the radical changes that Avalon will bring.

I've talked about these sorts of issues at various times, both on this blog, and on my normal blog before I created this one. In my very first month of blogging in fact, I wrote about Why I Hate Wizards. The problem is that not only do Wizards write sometimes bad code, but even if it writes good code, you still need to know what it is! As the developer, and someone who will have to debug that program, you are still responsible for it. Your boss won't accept the excuse of, "Well, the wizard really wrote that code, not me." Personally, I find it very cool that I share so many opinions with Charles Petzold in this regard. I also wonder what Petzold thinks of the new implicit variable feature in C# 3.0?

Petzold also talked about Intellisense quite a bit. My problem with Intellisense is that those who use it a lot, tend to lean on it so much, that it effects everything they do, right down to sloppy variable naming. For me, as a person who prints out code, this is a problem. Unfortunately, Microsoft has yet to develop Intellisense popup tooltips that work on paper. But Petzold brings up a much better point:


For example, for many years programmers have debated whether it's best to code in a top-down manner, where you basically start with the overall structure of the program and then eventually code the more detailed routines at the bottom; or, alternatively, the bottom-up approach, where you start with the low-level functions and then proceed upwards. Some languages, such as classical Pascal, basically impose a bottom-up approach, but other languages do not.

Well, the debate is now over. In order to get IntelliSense to work correctly, bottom-up programming is best. IntelliSense wants every class, every method, every property, every field, every method parameter, every local variable properly defined before you refer to it. If that's not the case, then IntelliSense will try to correct what you're typing by using something that has been defined, and which is probably just plain wrong.

For example, suppose you're typing some code and you decide you need a variable named id, and instead of defining it first, you start typing a statement that begins with id and a space. I always type a space between my variable and the equals sign. Because id is not defined anywhere, IntelliSense will find something that begins with those two letters that is syntactically correct in accordance with the references, namespaces, and context of your code. In my particular case, IntelliSense decided that I really wanted to define a variable of interface type IDataGridColumnStyleEditingNotificationService, an interface I've never had occasion to use.
...
But the implication here is staggering. To get IntelliSense to work right, not only must you code in a bottom-up structure, but within each method or property, you must also write you code linearly from beginning to end - just as if you were using that old DOS line editor, EDLIN. You must define all variables before you use them. No more skipping around in your code.

It's not that IntelliSense is teaching us to program like a machine; it's just that IntelliSense would be much happier if we did.

And I think it's making us dumber. Instead of finding out exactly the method I need, or instead of trying to remember an elusive property name, I find myself scrolling through the possibilities that IntelliSense provides, looking for a familiar name, or at least something that seems like it might do the job.


Because you end up writing your code bottom up instead of top down, you end up doing a much poorer job of architecting it, leading to spaghettified code much earlier in the lifecycle of the program. Until now, I'd never really connected the dots between Intellisense and Spaghetti Code... but I think it's there to see if you look for it.

Anyway, just read the whole thing.

#    1:56 PM by Nick | 2 Comments |
 Monday, October 24, 2005

How Do You Like My Flair?

No post about flair would be complete without an Office Space quote:

Joanna: You know what, Stan, if you want me to wear 37 pieces of flair, like your pretty boy over there Bryan, why don't you make the minimum 37 pieces of flair?
Stan, Chotchkie's Manager: Well, I thought I remembered you saying that you wanted to express yourself.
Joanna: You know what, I do want to express myself, okay. And I don't need 37 pieces of flair to do it.

If you'll notice on the right hand side, there is a neat little graphic with a scrolling list of my most recent posts. And if you click on it, you'll find that it links to the site feed for The Coding Monkey. Many thanks to Duncan Mackenzie for modifying his flair generator, which originally came from Coding 4 Fun, to work with ATOM.
#    1:37 PM by Nick | No Comments |
 Friday, October 21, 2005

Now That You've Read This Email...

We'd like to tell you that you read it by mistake, and that you're criminally liable for what you just read. You are ordered to forget everything you just read, delete it from every one of your systems, then scrub your brain of all neurons that may have been imprinted with the memory of this message.

Sound familiar? That's about what the typical email footer looks like that gets automatically attached to outgoing messages by many corporate email systems. Here is the actual text of one. I won't say what company it's from... who knows... they may send a huge guy named Tiny to break my knee caps:


This e-mail message and all attachments transmitted with it may contain legally privileged and/or confidential information intended solely for the use of the addressee(s). If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, forwarding or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete this message and all copies and backups thereof.

Thank you.


From an honest to goodness legal perspective... how is this even workable? As I read into this message carefully, I find that it's actually a no-op. It means absolutely nothing. Not only is it unenforceable... but the circumstances under which it might be enforced can never realistically occur.

It says... "If the reader is not the intended recipient"... but the only way to know who the intended recipient is, is by looking at the address it was sent to. After all, as a reader, I have no way of really knowing what the intent of the sender is. I've been using email for probably 15 years now. I've yet to receive an email where my name wasn't in the To field. The way that email works... the reader is always the addressee.

The warning then says that reading the message is prohibited. Well that's a neat little catch 22 now isn't it? After all, in order to see the warning (which is at the bottom of the email mind you), you have to have already read the email. Maybe they could make a case if they stuck that ugly nasty warning at the top of the email, but that wouldn't be very business like now would it?

From a contract law perspective (and I did take one class in business law in college), this is completely unenforceable. They're trying to bind you to a contract after the fact. You have already read the message, and they're saying that now that you've read the message, you now have to accept their contract which comes after the message. Because you've already fulfilled their reading clause, you have no way to not accept their contract. It is really unenforceable on its face. In contract law, there is no such thing as a contract that you can't refuse.

So while it's an interesting request that they make... you don't actually have to abide by it. Reading, dissemination, distribution, copying, forwarding or other use of this message or its attachments is not strictly prohibited... it is in fact your right as the recipient of the message, intended or not.

Makes you want to share all sorts of secrets you get by email doesn't it? You know... just to spite a stupid lawyer and his idle threats.

#    10:44 AM by Nick | 4 Comments |
 Thursday, October 20, 2005

A Del.icio.us Wish

In case you haven't noticed... I use del.icio.us quite a bit. I have a growing list of links, and I also maintain my blog rolls using del.icio.us link rolls. For those of you that have never used del.icio.us, it allows to you add web links, and mark them with tags. You can then show different lists of your links using single tags, or multiple tags. Really, del.icio.us is based around sets.

When you add a link to del.icio.us, you say what sets (called tags) that link belongs to. You can then list all your sets, or alternatively you can list the intersection of different sets to narrow down your links. Realizing that del.icio.us is really just a website for managing sets, I wonder why they don't have ability to display a tag's complement.

Using a basic numeric example, I might have two sets:

A = {0, 1, 2, 3, 4}
B = {3, 4, 5, 6, 7}

Currently, delicious allows me to execute the intersection of A n B (I'm using n instead of the intersection symbol which is an upside down U):

A n B = {3, 4}

This is great as it allows me to create link rolls like blog+Microsoft for my right hand sidebar. But what about the complement? Sometimes I want to see all items that have a specific tag, but don't have another tag. I can't do that right now.

B - A = {5, 6, 7}

That way I can look through all my links and see all developer links that aren't articles, or blogs. That would be cool.

#    11:30 AM by Nick | 1 Comment |

Yet Another Anders Interview

Scott Wiltamuth points to a new fresh interview with Anders Hejlsberg at OnDotNet.com. It's Part 1 of a two parter... but Part 2 is not up yet. I complained a while ago here about another Anders interview... and my complaints I think are still valid on this one.

Interviews with him are always really generic (not to be confused with templatized), and tend to always cover the same bland topics. Compare C# to Java... again. Is C++ going to completely go away... honestly... are you sure it won't? Can you compare C# to Java for us? Oh... did we already ask that? Do it again... please. I will give some credit here... they actually do start hitting some new features like LINQ. However, it seemed like the interviewer had to be dragged kicking and screaming there... then tries to go back to really dull generic stuff again, only to have Anders drag him back to new language features.

From that perspective the whole thing is rather amusing. I suppose I should cut these guys some slack. Trying to "talk code" is actually rather difficult... especially if its code that hasn't been written yet using features of a language that aren't even solidified.

#    10:55 AM by Nick | No Comments |
 Friday, October 14, 2005

When Non Technical People Try to Sound Technical

I was recently reviewing a use case for a project I'm working on written by a person in the business group who is really non-technical. The use case said:

When the user tabs off of the [xxxxx] field, and the [xxxxx] is valid, add a pop-up window (non-Modal) to validate the number that was just entered.

Non-modal? I've been writing Windows applications for approaching 10 years now. I've never heard of a "Non-modal" window. I've heard of a modal window, and a modeless window... but never a non-modal one. Did he mean modeless? A modeless dialog to force verification of information is definitely the wrong way to go.

So I sent an email out. It was a long email, explaining the difference between modal and modeless, and what the implications were. For those of you who are unaware, here are the basic difference.

Modal: A modal window is a window that keeps the focus, and doesn't allow you to continue until you dismiss the window. A good example is a standard Message Box with an OK or Cancel button. You can't do anything else in the application until you click either OK or Cancel.

Modeless: A modeless window is a window that stays on top, but can have the focus taken away from it. A good example is the find window in Word. You can find a word, then make changes to the document while keeping the dialog open, and click Find again. Usually you end up dragging the modeless window into the corner and out of the way while it's open so you can still work on the main document.

So as it turns out, he meant modal, not modeless... but in his reply email he confused the two again at one point, which was just... well... confusing. I really wish that non-technical people would not try to use terminology they don't understand. In an attempt to look really smart, he ended up looking kinda stupid.

#    3:45 PM by Nick | 4 Comments |

Cube Goodies

Forgive me for such a long post. When I first got the idea to write this, I didn't intend for it to go so long. Great plans of mice and men and all that. If you stick through the entire post, I do have a question for you at the end.

You spend at least 8 hours in the office (at least those of us that work)... so it's natural that you want to fill your work environment with a part of you... something that you will enjoy. There are certain things that I always have in my cube that I never can seem to do without.

First there are those certain books that I never crack open any more, yet I seem to need to have in sight to feel complete. They're what I call the Programming Testaments. If you are a book learner like I am, then you know these titles in one form or another. They all have various editions, but are so well known that they're often simply referred to by their author's name now. I'd love to write a book some day that was so well known that people would say "Hey, can I borrow your copy of Schweitzer?"

Programming Windows: This is the bible of Win32 API programming. Every now and then people still ask to borrow my copy of Petzold. He even has a blog now. Even today with managed code and object oriented programming, having an understanding of the basic Win32 API is valuable. All the layers that have been built since then still eventually call here.

Advanced Windows: This is the bible of memory management and threading for the WinNT platform (which whether you realize it or not is what Windows XP is). Things change, and .NET has made this somewhat obsolete... but if you do interop with .NET like I still do... than Richter is still a good reference to have. Remember... the OS isn't managed.

The C++ Programming Language: I don't program C++ any more, yet I still consider this to be my first language. I have the newer edition of Stroustrup in my cube, and an older edition at home that was given to me by my brother-in-law Shannon. That older edition is special to me. It's highlighted, coffee stained, worn, and well read. He gave it to me early in my career and said "Read this and you'll know everything you need to." He lied. I had to read it several times.

The C# Programming Language: This is what I consider my primary language now, even though I actually write VB.NET at work. I hate VB.NET for reasons I share from time to time on this blog. Keeping this book in my cube reminds me that not all languages are trite, wordy, silly, and hamstrung. Anders (I refer to him by his first name when I reference the book for some reason) isn't as well written as Stroustrup though. Stroustrup can be read like a real book, even if it is incredibly difficult. Anders is written purely as a language reference.

Code Complete: This is not considered to be any sort of testament by many people, but it ought to be. McConnell is one of those books you keep in your cube to see who looks at it and says, hey you have a copy of Code Complete, can I borrow that sometime? It's a litmus test of developers to see whether they simply hack out code or design software. If you don't think there is a difference between the two, then get away from me.

But besides the books, there are other more superfluous things that I like to keep in my cube, that hopefully reflect more on my personality. They're just some fun things I've collected over the years.

The Scream: Its by Edvard Munch, and one of my favorite paintings. I have a blow up doll version that I keep on a shelf.

Dilbert Mint Tins: The tins are empty now, but every cube has to have some sort of reference to Dilbert in it. It's a law you know.

The Binary Clock: My mom gave it to me for Christmas one year. I thought it was silly at the time, but now it's kind of interesting. Every now and then someone will walk in my cube and just stare at it... and then eventually say "I give up. What is that?" After some clues, some people eventually figure it out, usually by guessing. Mind you, these are all software developers that I work with. When I tell the ones who can't guess that it's a binary clock, they eventually say something like, "Oh, OK" and then walk away. It always makes me a little sad when that happens.

Acrobots: This is just a fun little guy that I occasionally pose in different ways to see if anyone notices the change. Nobody has yet. Maybe that's because nobody comes to my cube that often... hmmm... I won't ponder that thought.

I have a few other miscellaneous things, but you get the idea. Recently a friend turned me onto this site, called Despair which is just hilarious. Being a consultant, I was thinking of getting a small version of this to put in my cube. My question is... is that going over the line? Would it be unprofessional to have something so blatantly cynical in my cube, no matter how true?

#    9:30 AM by Nick | 6 Comments |
 Thursday, October 13, 2005

Microchip Easter Eggs?


Via Engaget is this fascinating article on CNET about chip designers who design in art onto the physical circuits:

More than 10 years ago, Michael Davidson went looking to capture the beauty of microchip circuitry in photographs. In among the transistors and wire traces, he found something unexpected: Waldo.

"When I first saw him, he was upside-down, and I didn't recognize his face," the Florida-based cell biology researcher said.

Davidson suspected at first that the tiny design he saw was circular patterns added to the chip to thwart attempts by reverse-engineers to deduce its inner workings. But a second inspection showed it to be the characteristically hard-to-find character from the children's book series. "I realized, 'This is a doodle of some kind.' Then I started looking over the whole chip. I discovered Daffy Duck and other things on that chip," Davidson said.

That was just the start of a catalog that now holds more than 100 images of extremely small automobiles, dinosaurs, birds of prey, cartoon characters and even a wedding announcement silhouette--all tucked away among microchip circuits. Davidson calls the collection the Silicon Zoo.


You can see a small gallery of the images here. The photographer's site is here.
#    2:12 PM by Nick | No Comments |
 Tuesday, October 11, 2005

Code You Must

The dark side clouds everything. Impossible to see the future is. Is Matt right? Will we all be programming like this soon?

(args of string many are they) Main is what they seek yet return they do not.

Brace you must
     Written it is, the Console. "Hello World"

And I thought VB.NET was bad. I really stopped reading the Wayward Weblog a while ago after it seemed that he just stopped posting. Well it seems like he's back, and as good as ever. Be sure to check out his musings regularly.

#    9:13 AM by Nick | No Comments |
 Monday, October 10, 2005

Making the Switch

Recently there was an "Ask Slashdot" on Moving from a Permanent Position to Contract Work?

"I'm sure many developers in salaried, permanent positions have been tempted by the self-management, flexibility and higher pay that are the perks of being a contractor, while at the same time looking nervously at the uncertainty and irregular income. So, to all those in the Slashdot crowd who've made the change - what was it like, was it worth it, and what advice can you share?"

I did the whole contract thing... mostly during the "bad time" when I had been laid off my permanent job, and software work in the area was scarce. I did it for less than a year, before I found my current position at a consulting company. From my short "contracting" time, I didn't find the uncertainty to be a big deal. I went and got a individual emergency medical plan, and then forked in the dough. Being the age that I am, an emergency plan was plenty since I really don't go to the doctor anyway.

What I've since found out is that consulting is the real place to be. For me, the allure wasn't necessarily the money, but the ability to switch jobs without actually switching jobs. Looking back on my employment history, I found that I ended up switching permanent jobs about every one or two years anyway. I'd get sick of what I was doing, and would want something new. The problem is that you get knocked to the bottom of the totem poll of benefits every time you make the switch, unless you can wrangle extra benefits into your offer, which is a pain in the butt to do.

The benefit now of my consulting job is that I can switch clients when a project gets complete and goes into maintenance, and I just move to a different client, but my pay and benefits still scale with me. Plus, I get the added benefit of being salaried, and getting paid overtime... and great vacation benefits. It's hard to beat that combination.

What I've never understood, are the consultants or contractors who end up staying a client for many years. Some of the folks at my consulting company have been at the same client for more than 5 years, and some more than 10! When you've been at a client for that long, with no signs of leaving, why wouldn't you make the switch to permanent at that point? I'd think that the benefits of being a permanent employee would outweigh contracting at that point in time, but maybe I'm wrong.

For me... after two years... I really have to start wondering whether I should just stay on permanently.

#    1:02 PM by Nick | No Comments |
 Thursday, October 06, 2005

You Know You're a Geek When...

You think the following conversation is funny. Of course it wasn't a real conversation... it was an email conversation... but anyway:

Coworker: I'll be OOO - EAD Monday.
Me: ASAP - WD OOO EAD RM?
Coworker: Out of office - Essential Absence Day. It's the terminology that [Client Name] uses for personal days.
Me: Great... another TLA.
Coworker: Alright - what does TLA mean?
Me: Three Letter Acronym.
#    10:16 AM by Nick | 1 Comment |
 Friday, September 30, 2005

I'll Be Sticking to NUnit Thanks

I've recently been playing with the Visual Studio 2005 betas, including the new unit testing framework that they have included. First impressions with this sort of new offering are always big with me... and my first impression was that it sucks... and sucks royally. That's a bold statement I know. The reason I say this is because it is missing one huge, gigantic, extremely important feature that NUnit has. NUnit allows you to inherit from a test class, and Visual Studio doesn't... and won't for the first release according to this bug report on Microsoft's site.

Why would you want to do this anyway? Allow me to paint the picture. If you're like me, you were hugely disappointed with Microsoft's initial offerings of collections. Hashtable and ArrayList just aren't enough for some of us. What about Binary Search Trees, and Skip Lists? What about a Set class? Being the good general purpose developer that I am, I wrote my own. I also decided that in order to make them easily usable among my peers, I made sure that they conformed to the standard Microsoft collection interfaces, like IDictionary. Also being the good general purpose developer, I wanted to write unit tests that fully tested my new collection classes... but I didn't want to write a separate test for each of my new classes. After all, if all my collections implement IDictionary, I should be able to just write one test that runs against IDictionary, and then create simple classes that inherit from that big one, and simply create the specific collection to test against in the inherited class... which is exactly what I did. It's a rather big test class too which not only tests the basic functionality, but also tests all the out of bounds cases for the IDictionary methods, and the border cases too.

So naturally, when I got a hold of the betas of Visual Studio 2005, I migrated my collection classes over, and improved them to use the new capabilities of generics. I also migrated over my NUnit test cases to use the new unit testing functionality built in. I find it strange that a tool, which promotes good Object Oriented design and programming practices would not allow you to use those same practices for unit testing that code. This was the very first thing I tried to do... and it failed miserably. You simply aren't allowed to do it in the first version. I think this is a huge mistake by Microsoft.

#    9:34 AM by Nick | No Comments |
 Wednesday, September 28, 2005

Killing Readability?

There's been a lot of action recently in blogs over at Microsoft talking about C# 3.0. I won't even begin to discuss how silly this is since C# 2.0 isn't even out of beta yet... but anyway. The coolest feature to be included is something called Linq. If you even looked at C-Omega, then Linq ought to look very familiar. The basic idea is to allow you to inject SQL type language structures directly in your code, make data calls more type safe, and have result sets be first class objects in your code. This basically gets rid of funky data layers that try to meld between your database and business objects. It's a very cool idea. Cyrus has been talking a lot about here and here.

Linq has naturally been getting a lot of the attention. What's been getting less attention is another new feature called "Implicitly Typed Local Variables". Cyrus recently blogged about it here. The idea is to take code like this:

int i = 5;
string s = "Hello";
double d = 1.0;
int[] numbers = new int[] {1, 2, 3};
Dictionary<int,Order> orders = new Dictionary<int,Order>();

And turn it into code like this:

var i = 5;
var s = "Hello";
var d = 1.0;
var numbers = new int[] {1, 2, 3};
var orders = new Dictionary<int,Order>();

To be very clear. Var is not like object! Variables declared with var will still be of their specific type. The difference is that now the compiler will figure out what type it is for you, and generate the right type under the hood. So the generated IL for both would be the same. In other words, it's just syntactic sugar.

So this makes for less work which is a good thing right? Here is my fear. I think it will cut down on readability. As the .NET languages progress, Microsoft continues to add things to the language that require you to make use of intellisense to figure out. If I see the following:

var foo = BarWhichReturnsSomething();

I have to use intellisense to figure out what foo really is. Call me old fashioned, but I still actually print out code on paper (I'm no environmentalist) when I review code... especially other people's code. You can't exactly hold your mouse over a piece of paper and have a tooltip pop up can you?

I find this feature especially strange since many of the language requirements in C# are built around making code explicitly more readable. My understanding is that Anders Hejlsberg (the father of C#) was a stickler for this sort of thing. For instance, if you declare a method as taking an out parameter, you have to also put out on the variable when you call the method. When you override a virtual method in an inherited class, you have to put override on your method. Neither of these to things are actually needed (the compiler is perfectly capable of inferring both), but C# requires it because it makes code more readable, and therefore reduces bugs (hopefully).

So why the change in this paradigm? Where are you Anders?

#    2:03 PM by Nick | No Comments |

An Engineer Who Failed His First Test

I've been out of engineering school for five years now. I think that's given me sufficient time to look back on my education as it's related to my career thus far, and to see how my education prepared me for my job. All I can say is that I was damned lucky to go where I did. I'm reminded of this after reading Confessions of an Engineering Washout on Tech Central Station today:

I am an engineering washout. I left a chemical engineering major in shame and disgust to pursue the softer pleasures of a liberal arts education. No, do not pity me, gentle reader; do not assuage your horror and dismay at my degradation by flinging a filthy quarter into my shiny tin cup. Instead, hear my story, and learn why the United States lacks engineers.

Not long ago, I showed up for my first year at Smartypants U., fresh from a high school career full of awards and honors and gold stars. My accomplishments all pointed towards a more verbal course of study, but I was determined to spend my college days learning something useful. With my strong science grades and excellent standardized test scores, I felt certain that I could handle whatever engineering challenges Smartypants U. had to offer. Remember: Kern = real good at math and science. You will have cause to forget that fact very soon.


What follows is a very interesting article on his experience of living with the consequences of failing his first Engineering test. What is most interesting is that he never mentions the first test he failed. To be honest, I don't even know if he realizes he failed it, or even took it.

To what magical esteemed test am I referring? He picked the wrong school. Picking the right school is probably the most important test an aspiring engineer will ever take. From the sounds of it, our friend Doug went to the school with a stellar reputation for taking in brilliant people. What more and more people are realizing however is that these schools that take in brilliant people seem to think that accepting you into their little club is the most important part of college. What comes after the entrance exam is just gravy. What you learn in that college seems to be less important than then fact that you now own that coveted piece of paper with Smartypants U written on the top. Congratulations, you are now the proud owner of a piece of paper, instead of an education.

I say these things having had numerous conversations with several people who either have gone to, or know people who have gone to these types of institutions. I always laugh, because I never seemed to experience the same issues that they did. I've come to realize that it's simply because I picked the right school... and a damned unique one at that. I went to a school that:


  • Doesn't tenure professors
  • Rarely hires a professor that doesn't have significant experience in industry
  • Doesn't use teaching assistants
  • Has relatively small class sizes (on the order of 30 or less... seriously)
  • Actually devotes significant parts of classes to laboratory work
I wonder how much different his experience would have been had he just picked a better place to learn.
#    1:15 PM by Nick | 3 Comments |
 Tuesday, September 06, 2005

How the GPL Will Kill Free Software

MSNBC has an article about a proposed update to the GNU Public License:

The free software association said on Tuesday it would start adapting rules for development and use of free software by including penalties against those who patent software or use anti-piracy technology.
...
The license needs to be adapted to a world in which e-commerce firms like Amazon.com have patented 'one click ordering' which prevents software makers from freely using such a feature in their programs, said the president of the Free Software Foundation Europe, Georg Greve.

"Software patents are clearly a menace to society and innovation. We like this to be more explicit. The basic idea is that if someone patents software, he loses the right to use free software. It's like a patent retaliation clause," Greve said.

Such a clause may have a big impact, because many commercial companies have benefited from free software. The GPL is employed by tens of thousands of software projects, and companies and governments around the world use it in their software or services.


In essence what GNU is doing is to declare war on anyone who dares to make a profit off of software by patenting software processes. I think this could backfire severely on the free software movement. Before I continue, I do think that some of the patents that have been granted to software companies are nuts. Many of these stupid patents (Microsoft's IsNot patent, Amazon's One Click Ordering patent, and Microsoft's Text Highlighting patent) should never have been granted. The reason is because they clearly exist in prior art, or because they're not novel (both being requirements for a patent). But their abuse doesn't make all software patents evil, it simply means that the USPTO needs an overhaul to allow them to be more effective at their lawful purpose. They obviously don't understand what currently exists in prior art or is novel in the context of software. This is understandable as software patents are a relatively new enterprise for the USPTO.

With that said, I do think this will backfire for GNU. The reason I say this is because much of the GPL'd software out there right now is provided to the public by companies that hold software patents, or would like to have software patents. While much of the free software community see GPL'd software as a movement for all to fully embrace, most companies do not. They see the GPL more as charity work, or a donation back to the software community. They view it as something to give back to others. While this may seem like an insult to many people out there who subsist on GPL'd software and code, one should not look a gift horse in the mouth.

If you reject these companies because they also hold software patents, you won't find them giving up on the idea of patenting software. Instead you'll find that they'll give up on providing as much GPL'd software as they use. That would be a loss to the free software community that it simply cannot afford.

#    2:02 PM by Nick | No Comments |
 Friday, August 12, 2005

Click Here to Find Out There's Nothing You Can Do

I have a really cool USB Keychain Hard Drive which I absolutely love. It happens to be USB 2.0, but works on USB 1.1 ports. Now then, my computer at home has USB 2.0, but my computer at work only has USB 1.1. Every single time I plug it in at work, I get the following popup from Windows:

It's only mildly annoying, and usually I just clicked on the X to make it go away. But then I thought... maybe there really is a USB 2.0 port on this computer that I don't know about. After all, if there wasn't a way to fix the perceived problem, why would Windows bother telling me about it? So I clicked on the popup bubble only to get the following dialog:

So as it turns out, there really are no USB 2.0 ports, yet Windows will keep telling me that every single time I try to use it. Never mind that the device still works perfectly well... you'd think that they'd give you a checkbox on the dialog saying something like "Don't tell me this again". They do it for other things. If only Microsoft brought me into a usability lab for one day... I'd rock their world.

#    9:34 AM by Nick | 3 Comments |
 Wednesday, June 22, 2005

Rest In Peace Jack

A man whose name you probably never knew died 2 days ago. A man who has influenced your life more than you think about day to day has passed. Jack Kilby, the inventor of the integrated circuit, died at age 81 after a brief fight with cancer. He invented the integrated circuit instead of going on vacation while working for Texas Instruments... can you imagine a world where he did go on vacation? I know my life wouldn't be the same. You will be missed, and your contribution not forgotten.
#    4:06 PM by Nick | No Comments |
 Friday, June 17, 2005

Anders Hejlsberg on C#... Again

InfoWorld has an interview with Anders Hejlsberg from Microsoft TechEd 2005 in Orlando. (H/T to Eric Gunnerson). It's the standard Anders interview. Anders has been with Microsoft for about 8 years now (before that he was with Borland where he architected Delphi). He's been the man with the plan on C# and .NET for about 5 years now. All his interviews are the same, and it kinda grinds on me, because this guy is amazing, and I wish people interviewing him would branch out some more.

  • So what is C#... or sometimes... why do we need C# over C ?
  • How does it compare to Java? Why nobody asks how it compares to Delphi I don't know, because there are a lot of similarities (duh).
  • How do you feel about open source movements?
  • What's your feelings about Microsoft? He works for them... what do you think he's going to say?
They talked a little bit about C-Omega which is cool, but even then it was just boilerplate stuff. It's a nice interview, but come one... lets get some more meat to it.
#    8:26 AM by Nick | No Comments |
 Thursday, June 09, 2005

Making Yourself Laugh in Code

Here is a comment I left in some code I wrote a couple months ago:

' If you can understand this code... then I congradulate you. See me for a cookie.

I'm not going to publish the code, as it wouldn't make sense out of context... but let's just say I had Hashtables containing Hashtables containing ArrayLists. I'm not saying it was the smartest idea, but it worked.

Anyway, I had to make a change to this code today, saw the comment, and had to laugh at myself.

#    3:07 PM by Nick | No Comments |
 Tuesday, June 07, 2005

@this and that

Chris Sells points writes about a piece of C# code that freaked him out:

class Class1 {
   static void Foo(object @this) {
      Console.WriteLine(@this);
   }

   static void Main(string[] args) {
      Foo("hi");
   }
}

In case you don't quite see it... a keyword (this) is being used as a variable to represent something other than the current object. You can do this because placing the @ before a variable tells the compiler to ignore it as a keyword. It's kind of cool, but also confusing I think. VB has a similar ability if you wrap the variable in square brackets (for instance you can name something [Me]).

I knew about the square brackets in VB, but only thought an @ in C# could be used in front of a literal string. You learn something new every day.

#    10:16 AM by Nick | No Comments |

What Does That Mean?

I'm looking over some code that I wrote just prior to going on vacation, and have been forced to say to myself "What does that mean?" I have variables that I'm not sure make sense in context, and I'm not quite sure exactly what they represent despite the fact that I added comments after their declaration. Even after I go over more of the code further down, I'm not quite sure it's right, even though it seems to be working. Never before have I been baffled by my own code so soon after writing it. This process generally takes several months to occur, not two weeks. I guess I was already on vacation before I even left.
#    10:13 AM by Nick | No Comments |
 Friday, June 03, 2005

I'm Not Trying to Be a Jerk

Honestly... I'm really not... though it may seem that way to some. One of my projects is in defect fixing mode. That of course means we get to wade through tester's descriptions of problems, and figure out what's causing them... or sometimes figure out if there is a problem at all. I'm a stickler for reproduction steps. Some may say I'm a jerk about it. If I don't see real steps to reproduce a defect, with example files that demostrate it where appropriate... I immediately reply asking for them. I'm not being a jerk... it's just experience.

This morning was a great example. I get a defect saying that every file that has a *blank* causes a problem when he does *blank*. I don't bother to check... I immediately respond with "Can you please provide an example file?" Of course the tester doesn't send me the file that caused the problem for him... he sends a list of files that have *blank* criteria in it that he says causes the problem. Of course there was the indignant tone in his email saying it's so easy to reproduce, try any one of these hundred. Fine.. that's not what I asked for, but I'll go through your list. I went through the first 6 in the list and couldn't reproduce the defect. I reply back. "Ummm... try the files that also have *blank*." Of course he still didn't send me the actual file that had caused him the problem. Fine. I go through the first one and still couldn't reproduce it. I was going to respond back after that one... but for grins I tried one more on the list and finally got the defect to reproduce.

As it turns out, the defect only reproduced under very specific circumstances... contrary to the original defect which made it sound huge, broad, and awful. It was a simple fix, but took 10 times longer to find simply because he never gave steps to reproduce. That's why I'm picky. Had he given me the actual file that he used to cause the problem, I would have been able to turn around that defect in 5 minutes. Sometimes testers just piss me off.

#    10:11 AM by Nick | 1 Comment |
 Thursday, June 02, 2005

In Defense of Hungarian Notation

Joel on Software has an excellent article defending Hungarian Notation, which I highly recommend. It's an excellent article which gives examples of how Hungarian is still useful today. I'm a firm believer in Hungarian Notation, and still use it to this day (properly I might add) despite the evil looks from coworkers. The problem with Hungarian was that it was bastardized over the years. When it was originally invented by Charles Simonyi at the Microsoft Apps team (think Word and Excel), it was used to differentiate variables of the same type, that had radically different meanings. For instance, two variables might represent coordinates with DWORDs, but one might be relative to the screen, and one might be relative to the page. Assigning directly between the two would cause an error, but would be syntactically correct:

DWORD xwCell;   // Cell location relative to Window
DWORD xlCell;   // Cell location relative to Layout

// ... Later on

xwCell = xlCell;             // Logic Error
xwCell = XwFromXl(xlCell);   // This is Ok, we converted.

Somehow (and Joel explains this), Hungarian got bastardized so that the prefix was only used to denote the variables physical type. So you would get code that looked like this instead:

DWORD dwCell;    // Cell location relative to Window
DWORD dwCell2;   // Cell location relative to Layout

// ... Later on ... imagine a couple screens away

dwCell = dwCell2;   // Logic Error... but would you know it?

As you can see... the Hungarian that eventually took hold has much less utility. Sure it's nice to know that a variable is a DWORD, but that doesn't prevent the logic error. Maybe it's the fact that I'm a huge fan of code reviews that makes me like Hungarian. I actually print out code and go over it with a pen and highlighter. I write notes, I ask questions... and having conventions that make these errors pop out at you help more than you can know.

#    8:47 AM by Nick | No Comments |
 Wednesday, May 11, 2005

Working on Something

I know I haven't posted here in a while... but I'm actually writing up a long winded wish for .NET generics. Stay tuned.
#    9:42 AM by Nick | No Comments |
 Saturday, April 30, 2005

Under the Radar

I think I'll ease you all into the life a software engineer with a tail of requirements. Hopefully if you're on a well run project, you'll have a list of requirements that your software has to fulfill. The more detailed they are, the better things tend to be. Recently I was assigned to complete a requirement on a project which had fallen through the cracks. The project is nearing completion, and somehow this one never got assigned.

As I was reading through it, I realized that the person who wrote it must have been smoking something, because I had no idea what I was actually supposed to do. So, as you always do in this sort of situation in a large company, I called a meeting. We got a half dozen people in a room and for an hour we went around about what we really were trying to accomplish... just trying to understand what was written on this piece of paper. Finally, after coming to an understanding about what was being asked, the person who originally wrote the requirements was told to rewrite them so we could understand them as we talked about in the meeting.

You'd think that would be the end of this tale. A new draft is sent out, and everyone agrees that they now look good, so I start writing some code to accomplish what is asked. Then two days later, when I'm almost done, an "updated copy" is sent out, with a few minor "tweaks". I read the new document only to see that these new requirements are quite different than the old ones. I replied back asking if it was just my imagination, or were these different. His response? "I just reworded them a little". So I reread them, and then responded back that these were in fact quite different, and listed the differences, carbon copying several people in on the email. Was he trying to sneak something under the radar?

This is a real danger. More projects are delayed, and bugs introduced into software by "requirements" snuck under the radar, so I called him on it. After talking to my project manager, I found out that he had ok'd it with the business after several hours of back channel discussions. Why didn't he just say - after discussing it with so and so, the business agreed that we want it done this way? Why lie and say "I just reworded it". And people wonder why so many software projects go over budget.

#    11:05 AM by Nick | 1 Comment |
 Friday, April 29, 2005

Welcome to The Coding Monkey

For those of you who don't know me, I maintain another blog called The World According to Nick. I started that blog talking a lot about programming, and technology, but it gradually morphed into politics and current events. As that blog got more a political voice, I never felt right about posting real technical stuff because my audience probably wouldn't get it. So this blog will be my new place for ultra techy, uber software talk. We'll see how this works out.

Welcome to The Coding Monkey.

#    10:15 PM by Nick | 2 Comments |