Tuesday, February 27, 2007

Jeff Atwood posted a great article talking about programmers that can't actually program.

I've been thinking about this a lot lately. Actually, lately is probably the wrong word, because I really started thinking about this way back when Joel Spolsky posted his infamous article on why he believes that colleges should teach C instead of Java. When that article came out, I had only been out of college for about a couple of years, but during that time, I had already seen my share of examples of programmers who couldn't program. Joel's article couldn't solve this problem for me, though, because these programmers would have had just as much trouble developing in Java as in C.

For many (non-)programmers, there seems to be a fundamental misunderstanding about programming in general, particularly with the ability to formulate basic algorithms to solve simple tasks. One example involved a programmer that had trouble with anything beyond placing formatted data to an HTML form. This programmer was tasked with moving through a DOM table to highlight cells that had certain values in them. In programming terms, he basically had to traverse an array checking for conditions - a very simple algorithm. However, he froze when he got to that part of his project, because he hadn't been trained in thinking about problems and how to solve them.

The examples that Jeff notes are just as much or more appalling and also show that these aren't isolated incidents.

What do we do about this problem?

At the end of his post, Jeff notes Steve McConnell's book on the profession of software development. It is an interesting concept and reminds me of a conversation I had with a pharmacist I met in my MBA program. He noted that some professions, such as pharmacy, have certifications to let the rest of us know that an individual actually knows what he or she is talking about regarding their profession while there are other professions that don't provide any sort of guarantee as to the actual knowledge someone possesses. I'm reminded of my wife in this case, because she has certifications for speech and language pathology. One of the requirements for her to keep her certifications is that she must have X number of hours of continuing education each year.

Could something like this work with software development?

There are obviously already many different certifications that exist (Microsoft certifications, Sun certifications, Oracle certifications, the list goes on), but that really brings out one of the problems with certifications in software development. I don't want to be a good developer with just Microsoft tools - I want to be a good developer period. If a software development certification existed that could ensure that someone was a competent developer and had a good knowledge of programming in general, it might work, but then again, the field changes constantly.

"OOP all the way!"

"No! TDD all the way!"

"Oh yeah, well, what about functional programming?"

"But... you can have functional and TDD at the same time!"

"You guys are all morons, QUANTUM programming is the way to go!"

It would be nigh impossible to have a certification that would be relevant and, more importantly, STAY relevant.

I'm sure I'm not adding anything new to this subject, but it has been on my mind for a while. I think I like the idea of a certification that requires continuing education - that almost seems like a must with software development. I primarily work with .NET 2.0 right now but it almost feels like what I'm working on isn't even relevant because of all the talk about .NET 3.0 (I know, just an extension of .NET 2.0) and LINQ, DLINQ, etc (actually coming from the upcoming new version of the framework.... 3.5?).

How would continuing education be defined in software development? Is it conferences? Reading blogs or books? Working on a variety of different projects so that you gain experience with different technologies?

Can the problem of programmers who can't program even be solved?

(By the way, before someone starts griping, I'm not advocating certifications... at least I don't think I am. I just want to see this problem fixed. Isn't that what all programmers want to do? Solve problems?)

...

I think this might be one of the longest posts I've ever written.

NOTE: This post was NOT inspired by anyone in particular... don't worry. Don't go thinking you're an awful programmer and I hate you.  :-)

posted on Tuesday, February 27, 2007 12:53:07 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, February 26, 2007

I guess Worse Than Failure fits a little better than what I had resorted to calling it on my own: "Where's the Function?"

It didn't communicate the same feeling of horror and disbelief as the actual, intended acronym, but it was cleaner and easier to speak openly about among the cubicle farm :-)

Now to get used to the new name.

posted on Monday, February 26, 2007 7:18:23 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Tuesday, February 20, 2007

Check this out...

My Vista stability score was well on its way back to 10 when I got hammered with some hard crashes in Internet Explorer. It took me a while to figure out what the problem was, but then I noticed the Sun Java icon in the toolbar and the Data Execution Protection message...

I had recently enabled DEP with Internet Explorer via the Internet Options menu (you'll have to run Internet Explorer as an Administrator before you can change this option). I was sort of curious about it and wanted to check it out.

I discovered about DEP and Internet Explorer 7 via Michael Howard's blog and I also verified from a comment to his post that (as of the writing of this post), the Sun JVM does not work with DEP in Internet Explorer.

So, if you're getting a lot of random crashes in IE, don't stress out. It might be DEP.

Too bad my stability score had to drop so low, though.

posted on Tuesday, February 20, 2007 8:05:41 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, February 12, 2007

Lately, I've been doing some work with the WebBrowser control (new in the 2.0 framework). It really does offer a lot of benefits over directly using the underlying ActiveX web browser control. And when the new functionality doesn't cover a need you may have, you can always get at the ActiveX control (though you'll need plenty of COM interface definitions - hello pinvoke.net!).

The typical usage scenario with the WebBrowser control is that, if you want more than just a basic control, you're going to inherit from it. I was wanting to be able to provide a custom context menu instead of using the default IE one. Here comes MSDN documentation to the rescue! According to the documentation on the protected CreateWebBrowserSiteBase method, the method can be overridden to provide a custom WebBrowser.WebBrowserSite object. Here's the quote from the documentation:

To use this feature, implement classes that inherit from the WebBrowser and WebBrowser.WebBrowserSite classes. The unmanaged WebBrowser ActiveX control uses the protected CreateWebBrowserSiteBase method to retrieve extensibility interfaces implemented by the WebBrowser.WebBrowserSite class. Override the CreateWebBrowserSiteBase method to return an instance of your own class that inherits from the WebBrowser.WebBrowserSite class. The WebBrowser.WebBrowserSite class provides default implementations of the OLE IDocHostUIHandler. You can provide your own implementation of this interface or implement any other WebBrowser ActiveX control interface in order to customize the behavior of the control.

Super!

Because the WebBrowserSite class is protected and internal to the WebBrowser, your implementation must be internal to your inherited WebBrowser class to have access to it. Like so:

public class CustomWebBrowser : WebBrowser
{
	private class CustomBrowserSite : WebBrowserSite
	{
		// Your implementation
	}
}

So, I happily pulled up the interface definition for IDocHostUIHandler, coded it up and made my custom WebBrowserSite implement it. To verify that it was working, I just stuck a message box to tell me hello in the ShowContextMenu method. When I ran my test, I right clicked and saw a context menu... the default context menu! Huh?!?

I was positive I must have missed something, because the documentation is CLEAR on the fact that this scenario is possible.

And yet... and yet... WHAT IS THIS?!?

More searching and I find that there is a bug reported for this exact scenario on Microsoft Connect! And what's more, it has been closed because it has been postponed!!!

This wouldn't really irk me so much except that the documentation specifically says that it can be done. Here is a snippet of the reasoning behind closing the bug:

... The bug you entered has been reproduced, but our evaluation determined that it does not meet the criteria to be addressed in this release. The main reason for this is that in this release, our webBrowser control is tightly tied to the IDocHostUIHandler not leaving much room for such customization. ...

Why, oh why wasn't this tested? The documentation says THAT THIS CAN BE DONE! Don't post documentation that says that you can do this and then tell us that you can't because your implementation won't allow it!

Luckily, there are 2 workarounds listed that let you hook your own IDocHostUIHandler implementation in (it involves implementing ICustomDoc and calling the SetUIHandler method, see this CodeProject article for more details). Tightly tied my butt... the workaround gets the same results just fine.

posted on Monday, February 12, 2007 1:01:36 PM (Central Standard Time, UTC-06:00)  #    Comments [1]