Programming magic, glory, and juices.

Recent Comments >>

termi-NATE-or!

May 31st, 2009


For my next work of art I am going to write a program called SkyNet. Its continual mission will be to seek out new life and new civilization, and to boldly destroy it like no machine has done before. All programs in the future use the .NET framework and so will Sky.NET. The source code will be closed and entirely written in C#. It will come preinstalled with every Microsoft product including Internet Explorer. It will self replicate. It will assimilate. Resistance is futile.

while (TimeEverlasting()) {
    DestroyHumanity();
    DestroyJohnConner();
}

End of string comparision

April 16th, 2009


I’ve been checking for the end of a string the following ways…

while (*String != '\0')

or

while (*String != L'\0')

But have found out that it is better to use 0 instead of ‘\0′ when looking for the end of a string. Comparing to 0 works with both ascii and unicode strings, whereas comparing to ‘\0′ only works for ascii strings. For unicode strings you would have to do L’\0′.

while (*String != 0)

Almost Perfect

April 13th, 2009


After hearing about the book Almost Perfect from Coding Horror I decided to read it. The book is out of print and free to read online. It covers the rise and fall of the WordPerfect Corporation. Very interesting read. I enjoyed the historical aspects relating to the computer industry at the time.

As pertaining to the author who co-founded the WordPerfect Corporation. I thought that it sounded a lot like the company was run with no real structure or organization. It is almost ironic that the way the corporation was started by-passed all the business development steps that may have helped in the end. But what really crushed WordPerfect was their own inability to develop a solid product on Windows. The whole reason why WordPerfect was number one on DOS was because it was the great product. I think they automatically assumed that because they had a great DOS product that their Windows product would be just as great.

Add tabs to Windows Explorer

April 11th, 2009


And just when you thought the tab revolution was over! Now you can add tabs to Windows Explorer. It is called QTTabBar! It has a ton of options and a feature called Groups. With one click of a button or keystroke you can open up a group of different folders. It also has the grids for the details view with alternating row colors and full row selection. It comes with its own standard button toolbar that has recent folders button so you can go right to any of your recent folders. We’ll see how well this works in the long run, but I like the idea and the added enhancements that it brings to Windows Explorer.

And yes I do have both Perl and PHP installed and it is not something I am proud of.

ISAPI Filter to convert + to spaces

March 29th, 2009


Here is an IIS ISAPI filter I wrote that does a url rewrite and converts + to spaces (%20). Tested with Windows 2003 server and IIS 6. I needed such an ISAPI because uTorrent’s ability to retrieve data from a reliable source utterly sucks.

Download

From IMAP to Exchange

March 5th, 2009


GoDaddy now offers Exchange e-mail hosting. So I decided to try to move from my IMAP e-mail provider to Exchange. Migrating all of my e-mails was difficult. I tried..

  • Copying each folder through drag and drop in both Outlook and Thunderbird. Outlook occasionally locked up. And Thunderbird did recursively copy correctly and sometimes when it came across an email it couldn’t handle, it would go into a download message loop.
  • Using the IMAPCopy program. It didn’t work for me and had problems with some of my emails and threw errors. Furthermore, if something happened and it got disconnected then I ended up having to find where it left off and continue otherwise it would recopy everything and make duplicates.
  • Using imapsync perl script. This was a nightmare for me to try and setup and configure because it doesn’t support the most recent version of the perl IMAPClient class. Furthermore the dates didn’t sync correctly and it threw errors which I didn’t want to have to deal with and I got fed up with it.

The way I got all my emails migrated was..

Forcing Outlook to download the full e-mails from my IMAP server and using the resulting .PST to import my emails into the Exchange server. It was so much simpler and less prone to importation error. It was also a lot quicker than any of the scripts that I tried.

Also I would recommend this other post on changing when a message is marked read.

The Apprentice Returns!!

March 4th, 2009


The Apprentice is like the characters on heroes, they die but their powers keep bringing them back to life. What powers did Donald Trump use to get The Apprentice back on the air? Perhaps his power is in his hair. If the Don hears something he doesn’t like his hair leaps off his head and attaches itself to the head of its prey and starts sucking the brains out of it.

Honestly, I’ve been a fan of the show forever and even I believe it doesn’t deserve to be on television anymore! It’s 2009 people!!! Where’s my flying car?!!! The show is OLD like all the has been celebrities that frequent it. It is time to give it a rest Don. Don’t you love it.. you know a show really sucks when they don’t even bother playing the full length intro anymore. Furthermore the show isn’t even in HD anymore. How can you go on television and say your show is the greatest on cable and it is not even in Hi-def. NBC, don’t bring The Apprentice back for season 9.. resist the whiles of the Don.