November 2007 Entries
Well I finally realized that advertisements could actually help pay for my website hosting. Now granted there are not many readers right now but I'm working on improving that. A recent post by Jeff Atwood about blog success was somewhat inspirational even if it somewhat cliché. To that end I've created a Technorati Profile and claimed my blog. Hopefully spam won't become a problem.
I just read a blog complaining about the systematic abuse of object-oriented programming and it reminds me of my complaint about the teaching of object-oriented programming. The typical object-oriented tutorial will define a vehicle class then create two or three derived classes such as a car, truck, and/or motorcycle (example 1 and example 2). This instruction is useful purely on the theoretical level but fails to actually teach the student how to use polymorphism, inheritance, and encapsulation. The issue is far more than object-oriented programming, but rather code structure and layout and design patterns. The most useful exercises in learning...
I was browsing various blogs today and I came across a good example for using a verbatim string instead of a StringBuilder object. The code I came across looked like this (I mean absolutely no disrespect to the author, so I won't include the original link):private void ClientScript()
{
StringBuilder sb_Script = new StringBuilder();
sb_Script.Append("<script language=\"javascript\">");
sb_Script.Append("\r");
sb_Script.Append("\r");
sb_Script.Append("function cb_verify(sender) {");
sb_Script.Append("\r");
sb_Script.Append("var val = document.getElementById(document.getElementById"
+"(sender.id).controltovalidate);");
sb_Script.Append("\r");
sb_Script.Append("var col = val.getElementsByTagName(\"*\");");
sb_Script.Append("\r");
sb_Script.Append("if ( col != null ) {");
...
After a long project is drawing to a close, I am taking a little vacation this week. It has been a very busy time so it is nice to relax a little bit. However I just saw yesterday that Microsoft released Visual Studio 2008 so I might have to check it out during my vacation.
I finally worked on my blog theme last night and I managed to get the dp.SyntaxHighlighter to work with Subtext. I recall seeing someone else use it with Subtext, but I can't locate the blog anymore. Here are the steps involved: Create a custom skin for Subtext Copy the shCore.js, shBrushCSharp.js, shBrushXxx.js files in the custom skin Scripts directory (~/Skins/YourCustomSkin/Controls) Copy the SyntaxHighlighter.css file to the custom skin Styles directory (~/Skins/YourCustomSkin/Styles). If you choose to use the Flash clipboard.swf functionality, place it in the root Scripts directory. Create a Skins.User.config file in the ~/Admin directory. Add...
My bout with Windows Script Host (WSH) the other day turned out fine. I managed to get a working script less than an hour after my post, but it left me thinking about low-level issues in today's environment. There are some low-level issues that are truly inconsequential such as old DOS relics like expanded memory (XMS) and extended memory (EMS) specifications but there are also many useful aspects as well. Things like two's complement, Karnaugh maps (haven't had to use it in quite a while though), floating point data format (something I had to discover on my own) -- I...
I have spent the past hour trying to modify a VBScript / JavaScript utility to print out my password expiration date and it is driving me a little crazy. I cannot understand why something that should be so simple can be so blasted difficult. I have several account at client sites and the password expires periodically. In order to make sure I don't let the account lapse, I wanted to print the password expiration date. I had a version that worked before but the distinguishedName had to be exact. I used the adfind utility to figure out my distinguished name...
I had the privilege of studying with an excellent teacher in middle school for Life Science and later in Physical Science and his equally excellent wife who taught Earth Science. One of the pearl of wisdom they imparted was the use of the metric system or Système International d'Unités. I still remember the basic conversion table (0°C = 32°F, 10°C = 50°F, 20°C = 68°F, 30°C = 86°F, 40°C = 104°F) to this day. The project that I am finishing up at work uses a DCS and it has a mish-mash of English and metric units creating utter confusion. It...
One of the things that bothers me a lot is using a lot of string concatenation when you can just use the verbatim string literal (@"") to define a large block of text. For example, I saw some code on a blog the other day that looked something like this:string strValue = "<div id='test'>";
strValue += "<input type='text' id='name' value='" + strName + "/>";
strValue += "<input type='submit' />";
strValue += "</div>";
// Many more lines before it finally
// finished building the string
There are many things wrong with the code sample above including not using StringBuilder. I have seen the same type of code...
With the holiday shopping season fast approaching, the manufacturers of Blu-ray and HD DVD are going to be competing for your money. In fact they are going to go to great lengths to entice you into supporting their platform. I just read that Wal-mart is going to be offering a sale special for an HD DVD player for $100 which is plain amazing. The player that is offered is already replaced by a newer model so it is somewhat outdated, but nevertheless it is amazing. The nearest Blu-ray player that I have seen is at least $400 (perhaps the Playstation...