Thursday, November 16, 2006

Zune XP Theme

Yes, a free XP theme from Microsoft (and it’s not blue).


You can download it from here. Or, you can download it from the Zune website.

Thursday, September 07, 2006

Happy Birthday Google

Google turns 8 (not seven as previously posted) today. Google's official birthday is September 7, 1998. Unfortunately, the folks at Google did not make their usual birthday doodle this year, so we had to take matters into our own hands...
You can read about Google's history here. And, if you are looking for the September 7 date, you will just have to google for it.

Monday, August 07, 2006

Maintainable Software

In looking at some code today, I was reminded of Billy Hollis’s 2005 Grok Talk. If you haven’t seen it (or want to see it again) it can be found on Google Videos here.

I think the real point is that building maintainable systems is more important then just cranking out reams of code. Software spends most of its life in the maintenance phase and not in the creation phase. This is a very important lesson for developers to learn. Although it is not easy to do, there must be a conscious effort to build maintainable software.

Some things that I have found:
- Inheritance can be very useful when you are trying to create things quickly, however inheritance can be very difficult to maintain. Form inheritance is one of those things that can make development very fast, however will ultimately make it very difficult for someone else to maintain. I am talking about the case where you have a base form that tries to do some logic and then you inherit off of it and try to extend it in a way to add or change the logic.
- Another thing to think about is how many classes you have to touch in order to add a new field. You should try to keep the number of classes as low as possible. Try to separate your objects so that they don’t rely heavily on each other. Adding a new field is one of the most common ways software is grown.
- Something else that should be obvious is that less code is better and the more straight-forward your code is, the easier it will be to maintain. Of course that is easier said then done. But none the less, it is something to strive for.

Monday, July 17, 2006

Windows PowerShell

I downloaded the (CRT) version of Windows PowerShell (formerly known as Monad). I wanted to see how easy it would be to create a command off of an assembly. The idea of writing a library that can be used in a WinForm application, web page (on the server side), and now from the command-line is very exciting. I find batch files and script files very useful. There are times you need to perform a simple task and it is just easier to write a simple script file and run it from the command-line. It would be nice if you could develop applications and expose the same functionality in your application via command-line commands. Although PowerShell does have the ability to “new” any .Net object and perform operations on it just as easily as you would a COM object in VBScript, it also has the ability to load custom Cmdlets. A Cmdlet is a command-line command that for the most part is very similar to an old DOS command. Microsoft has added this concept of verb dash noun (example get-command or get-process) as a naming convention, but other then that it still accepts arguments in pretty much the same way as a regular DOS command (example "get-command *PSSnapin*" or "get-command –verb “get”"). A Cmdlet lives as a first class citizen in the PowerShell world and Microsoft has made it fairly easy to create new ones. When you install Windows PowerShell you will get the System.Management.Automation.dll that will hold the classes that you will need to inherit from when you create your own Cmdlet. It should be noted that your Cmdlet lives in an object called a PSSnapin that descends from Installer. The Installer is used by InstallUtil.EXE to install your assembly and PSSnapin into Windows PowerShell. However, even though it is installed you must call Add-PSSnapin followed by the name of your PSSnapin (the name that is defined in the Name property not the name of the DLL) before you will be able to use your new Cmdlets in Windows PowerShell. One thing to remember when you are creating a core DLL, a command-line object is a little different then objects that you would use in a WinForm application. The command-line is a different environment. It is transaction based while WinForm applications are primarily event driven. You should expect that if you want to have a DLL that will be used by both a WinForm application and a Windows PowerShell Cmdlet that you will have to design it in a way that would make it useful for the two environments. There is a pretty good article on creating Cmdlets on CodeProject. This is a good place to start if you want to write your own Cmdlet. I do like the way that command-line flags and parameters are easily defined by just adding attributes to properties. This really simplifies development (no more reading the args parameter in the traditional static main method). Microsoft has done a really good job of handling this. After working with this for awhile you will wonder how we ever programmed command-line applications before Windows PowerShell. I also like the way that Cmdlets are executed. You override the BeginProcessing, ProcessRecord, EndProcessing and then you can use the WriteObject, WriteError, WriteWarning, WriteVerbose and WriteDebug to send different levels of information to the console that is controlled by standard flags that all Cmdlet have. It is exciting to see a more powerful command-line shell and I look forward to the official release.

By the way, if you want to create and launch a WinForm from Windows PowerShell, enter the following at the command-line:

[reflection.assembly]::LoadWithPartialName("System.Windows.Forms")
$form = new-object system.windows.forms.form
$form.text="HELLO WORLD"
$form.showDialog();

Tuesday, July 04, 2006

New Microsoft Keyboard

Yes, a Microsoft green button and and a Microsoft blue logo.

Wednesday, June 14, 2006

Windows Colors

As Don Box points out, the four colors in the Windows logo (red, blue, yellow, and green) are the same colors that appear in the Google logo. Are these the magic colors? Did Google consciously or unconsciously copy Microsoft? Or are there just not that many primary colors to choose from?




Or maybe, both Microsoft and Google are using the Olympic colors.

Thursday, April 27, 2006

Steganography

Steganography is the science of hiding messages. Steganography is from the Greek for “covered writing”. The idea is that you can hide a file (or message) in an image. Images such as bitmaps and gif store the values for each pixel in a series of 3 bytes (where the first byte is for red, the second byte is for green, and the third byte is for blue). If you use the lower bit of the 3 bytes to store the bits of your hidden file, the image will still appear to be the same as the original image. An example of this can be found at http://www.cs.vu.nl/~ast/books/mos2/zebras.html (the web site for the book “Computer Networks” by Andrew S. Tanenbaum). In the Tanenbaum example he has a 1024X768 pixel bitmap that contains a compressed file of five complete works of William Shakespeare. (BTW “Computer Networks” is an excellent book and is the primary book that is used in the CSCIE-131b course that I am taking.)

This technique can also be used to watermark images and can also be used on music and video files (just imagine what you could store in a 1GB video file).


(There is no hidden file in this image)

Sunday, April 16, 2006

Bill Gates and Napoleon Dynamite

If you haven’t seen this yet, you should check it out.


Brought to you by YouTube.

Thursday, April 13, 2006

Brett’s Corner

I have added the “Brett’s Corner” to the right hand side of my blog. The "Great" Brett McNealy requested a place on my blog to post his pictures. The first picture is a picture of me done in ASCII art. Brett’s hobbies include putting coworker’s faces on different bodies, so I expect that some of Brett’s pictures may get a little crazy.

Friday, April 07, 2006

Model-View-Controller Song


I borrowed the book Head First Design Patterns from a coworker. I wanted to read the section on Model-View-Controller. In the book there are the words to the “Model-View-Controller Song” (you can also listen to the mp3 from their website). The song is a little cheesy but I do like geek songs.

Wednesday, February 15, 2006

Ctrl+Mouse Wheel

I just found this one yesterday. Being that I just love finding shortcuts and hotkeys I wanted to share this one. If you hold down the Ctrl key and use the mouse wheel you can change the font size in IE. This also works in Outlook. Also this will zoom in and out inside of Word and Excel. I am not sure how often I will use this but it is cool.

Sunday, January 29, 2006

FedEx

My brother ruined FedEx for me.




If you look at the white space between the E and the X you will see an arrow. Now every time I see a FedEx truck or a FedEx label, all I see is that crazy arrow.




I wonder if FedEx did this on purpose. Is it some kind of subliminal message?

Sunday, January 08, 2006

Shipping in the Technology Age

I think there is a lot that we can do to make the internet buying experience better. Why can’t companies tell you how long it will take to deliver your online order? I ordered iPod’s for my brothers this past Christmas from www.apple.com. I ordered them on Saturday and paid the extra $20 for the 2-3 day FedEx delivery thinking that I would receive them before I left on Thursday. (I should have known that 2-3 day delivery would really mean a 6-7 day delivery). I didn’t receive an email from apple until Tuesday telling me that they had sent the iPod’s and after checking the FedEx web site, I noticed that it was being sent from China. I quickly realized that I would not receive it until after I left. Why couldn’t apple tell me that my 2-3 days delivery would not actually be shipped for another 2 business days? We need to get to the point where companies can tell us exactly how long it will take to fill and deliver our orders. I was even willing to pay the extra money for the delivery. Online buying is all about delivering products. If you are in a hurry to receive it and pay the extra money to get it they should tell you how long it will take. I don’t think that it was FedEx’s fault. The problem was that apple didn’t tell me how long it was going to take for them to fill the order. This is a problem that most of not all online companies have. I realize that this can be a tricky thing, especially when quantities run out and things go on back order, but if I was willing to wait I would not have paid the extra money.