Tuesday, December 28, 2010

A new laptop

My Dell M1530 went kerput on me for the 2nd time.  The first time the HDD died. That wasn't so bad because it was still under warranty and Dell sent me a new one. The second time it went, it was the motherboard. This time I was out of warranty. The cost would have been around $500 to replace it so I got an Asus laptop from Best Buy for $550.  So far so good.  I guess when it comes to laptops, I need to just budget money for a new one every two years.  Every single laptop I've owned has gone out with in three years.  Gateway, IBM (pre-Lenovo), and two Dells.  They usually just sit in a room.  They don't get dusty.  They don't get too hot.  I'm very mindful of them when I travel.  My Dell desktop had several problems as well.  It still runs but it needs some TLC to stay running.  Why am I boring you with all this talk of busted machines?

Well, I used to build custom machines.  I say build but really it was assembling about a dozen components inside a case.  "Building" sounds cooler, like you are magnetizing each sector of the drive and etching the circuits on the CPU.  Anyway, those beige boxes lasted a long time.  They lasted for several different customers that kept them in a variety of work spaces and to my knowledge none of them ever broken down.  I'm not saying I had any great workmanship (I didn't, my wire organization was awful).  What I am saying is that the corners that get cut in a large company's assembly line seem to make the difference between real PC longevity and two years of use before the machines goes dark.  It's hard to make a profit on a computer.  The big PC manufacturers have to make them as cheaply as possible.  When you build your own, you build it slower and with (a little) more attention to detail.  Most cases these days are spacious enough to have good air flow to keep things from getting too hot inside.  That's probably the biggest difference right there.  I have a custom machine from 1998 in my basement and when I went down and turned it on, it booted right up to Windows 2000.  But enough about desktops.

I got the new laptop and erased the drive.  I made a large Windows 7, NTFS partition and two partitions that are around 100 GB each.  I loaded Ubuntu 10 on one of those and Fedora 14 on the other (Ubuntu and Fedora are different flavors, distros, of Linux).  It took a while to configure each OS and get all the software loaded.  I still don't have the Linux partitions like I want them but I know so little about Linux that I'm happy that I got the laptop to triple boot at all.  All in good time.

Mozy.com has been my backup provider for a while and I have been pleased with them so far. $5 a month for unlimited backup.  I bought a 2TB external drive where I'm going to store iTunes data and other files.  I'll point Mozy at that and have it back up a few folders on the actual Windows 7 partition.  I think I can have the Linux partitions write to a shared location that I can have backed up as well.  I'll figure it out.

That is all for now.  I'm not going to do any die rolls for the next several posts because I have some ideas about what I want to write about.  Mostly they will have to do with a Microsoft developer learning how to develop on the Linux platform.  There will be some writing related posts as well as a recap of my second semester at UPenn.  All in good time.

Thursday, October 28, 2010

Looking forward

     I almost wrote another post on how and why I got into software development.  I was thinking a lot about that after I downloaded a Texas Instruments 99/4A emulator.  I was amazed at how much my fingers remembered.  Double tap the 1 key and start typing line numbers and commands.  Anyway, I'm not going to do that.  I'm going to talk about what's ahead for me in software development.

     Mobile development.  That's what I see when I look forward.  The place where I work is getting into iPhone development.  I tried to get my department to give the windows mobile platform a shot but even I couldn't take WinMo 6.x after a while.  Maybe Windows Mobile 7 will be better but for now it's the iPhone.  People like using their iPhones.  People love it when you write an application that gives them yet another reason to whip out the iPhone and start two finger tapping.

     So far I've been writing the back end web services that handle the data part of our iPhone applications and my co-worker, Kotaro, has been writing the front ends on his Mac in Objective C.  The web services part is great because since it's just XML/Soap, any platform could connect to it and make use of the services, with proper authentication of course.  What I'm trying to do now is expand my skill set to include actual iPhone development using tools from Mono Touch by Novell.  The Mono Project is an open source .Net framework that allows a developer to write .Net code and target Windows, Mac and Linux.  I want to do iPhone/iPad development with it but it'd be great to get familiar with those other platforms as well by writing code for them.

     Why learn a new development platform?  Same reason I learned the first one, because it's fun.

     I've also been thinking about the gaps in my skill set.  One of the problems that comes from being a self taught developer is that I've wasted many hours writing something that has already been written.  Also, there's this gnawing concern that there is so much about development, even on the Microsoft platform, that I don't know that...I don't know what I don't know.  Sometimes I come across posts like this and this and think, "Dangit!  I've been doing this over a decade and I've never even heard of some of this stuff!"  At first I tried to tell myself that it was just one guy's opinion (it is) and that there's lots I know that isn't on those lists (also true) and I've been doing this for years so I must be doing something right (right?).  But the more I thought about it, the more I realized that I was just a few Google searches and test projects away from being able to answer all of the questions in those two posts.  Just another visit from the binary thought system 0 (I'll never figure all this out) and 1 (Why shouldn't I be able to figure it out?).

     Still reading? Even after that 0 and 1 nonsense?  Okay.  I'm trying to go deeper.  In episode 6 of This Developers Life, Scott Hanselman and Rob Conery talk about "The Stack" and how much a developer should know about it.  Professional developers  are constantly running into things they don't know how to fix (at first).  Take a look at this Twitter stream and you will see.  The Stack is all the stuff between what a developer types and the 1s and 0s the system actually works with (sort of).  For example, when I write code in a high level language like Visual Basic .Net or C#, it looks something like this:

string firstname = "John";
string lastname = "Smith";
string fullname = firstname + " " + lastname;
Console.WriteLine(fullname);


     Not beautiful code, but you get the idea.  I click "Build" and several steps later it's processed into something like 10011010010101110001010...and the machine does something.  The point is, I don't really know how to program a computer at all.  I stand on the shoulders of giants standing on the shoulder of giants so I can reach high enough to pull the lever and make the computer spin.  I only know how to write descriptions of what a program should do and then I let the magic of MSIL and various compilers actually write the program for me.  So when I say I want to get deeper into the Stack, I mean that I want to learn more about what goes on after I type up all my C# or VB code and hit Build.  That means getting into things like C++ and Assembly.

     Now it's possible I'm going to get into the Stack and run screaming from what I find there.  There is a part of me that says I'm 36, I am what I am and it's hard enough to learn all the new stuff let alone all the old stuff.  

     Maybe.

     But thinking about this stuff reminds me of a story I read about a modern boat that ran aground several years back because of a GPS error.  The crew on board could have used their map or just looked out the window but the GPS said everything was fine so they went full speed ahead until the hull split open.

     So I'm going to write a program in C++ that does something useful but simple.  Then I'm going to write a program in Assembly.

     If you made it all the way to the end of this post and you want more, I suggest:
     The next post will be...a true life entry.

Saturday, October 16, 2010

Try the Kindle

Last week I wrote a long post about how I use Amazon's Kindle and how freaking great it is.  I had all these great little stories and use cases.  Then I read over it and decided to scrap the whole thing.  Why write about how I use it when you could just try it yourself?  So like I said, I chucked that post and wrote this, much shorter one, instead.

You don't have to spend money to get books in the Kindle format.  You don't have have to buy a Kindle at all.  If you have a Windows PC, Mac, iPhone, iPod Touch, iPad, Android phone or Blackberry you can get Kindle stuff without buying the device itself.  All you need is an Amazon account.  Download one of the free software applications for your device and start using Kindle stuff right away.  Lots of great classics are free or .99.  You can get sample chapters of dang near everything to try before you buy.  The built in dictionary is great for when you're reading David Copperfield and you come across words like blandishment or scapegrace.   You can highlight passages, add notes and they'll sync across all devices.

Maybe you'll hate reading books in an electronic format.  I thought I would.  Just try it out.  It'll cost you nothing.

You can download the software free from Amazon here.

Once you are set up, here's a sample of some books you can read for free:

The die roll says another tech post.

Saturday, October 9, 2010

Wrong Major

     "You are in the wrong major."

     It was the spring of 1992.  I was attending Loyola Marymount University in Los Angeles and  I was sitting in the office of my Human Genetics professor.  I had demonstrated some software I had written that simulated the random generation of nucleotides and then told you if any interesting amino acids would form as a result.  That may sound impressive but it really wasn't much of a program.  It generated some random numbers and told the user if a certain set of numbers occurred.  Only instead of showing the user random numbers, the program displayed words like "guanine" and "cytosine" and some other terms that I cannot remember.

     Anyway this was in 1992-1993 when it was rare for a non-engineering freshman to have a computer in his dorm room let alone be able to write programs on it.  The program was nothing big, just odd, given the circumstances.  It wasn't an assignment, I just thought it would be a fun way to implement some of what I had learned in class.

     "You're a film major?" the professor asked.

     "Yes.  I've always wanted to be a film maker," I said.

     The professor shook her head.  "You are in the wrong major."

     Of course I blew it off.  It was flattering that she liked the program but there was no way no how I was going to switch majors away from film.  Certainly nothing to do with computers.  Film was/is cool.  Computers were not cool then and, Apple products aside, they are not cool now.  I was finally free of the computer nerd stench that clung to me all through junior high (where I won two programming contests) and high school(where I always did well in science fair by writing software).  I was going to be an auteur.  Truth be told, I felt like I already was one.  Did you see my 8th video project called Tenja the Teenage Ninja?

     But the film career never got going.  I decided, for a number of reasons, to drop the film degree but I sure was not going to do anything related to computers.  That was for dorks.  Did I ever stop writing code though?  Nope.  I wrote code for my employers.  I wrote code for friends who were still in school (I dropped out of college altogether).  The bulk of what I wrote was just for me, just to see if I could make the computer do something.  I bought books on PC hardware and software development and read them cover to cover.  I eventually ended up working in the tech shop for Best Buy (this was pre-Geek Squad).  I worked tech support for Intuit where I finally finagled my way into doing some software development.  Five years of unmet expectations had finally gotten through to me.  Life had given me a mountain of software development lemons...it was time to make some software development lemonade.

     I thought about this the other day as I was reading Outliers: The Story of Success by Malcolm Gladwell.  He talks a lot about the Rule of 10,000 which says that if a person devotes 10,000 hours or more to a certain interest they will become very, very good at it.  I set the book aside, did some quick calculations and realized that I had cleared the 10,000 hours of software development before I ever got paid a dime for doing it.  My parents tell stories of my early teenage years where they would be sitting in the den and have a conversation that went something like this:

     "Where's Jon?" asked my mother.

     "In his room I guess," said my dad.

     "He's been in there for hours.  What's he doing?" asked my mom.

     They got up and knocked on my door.  No answer.  My dad cracked open the door and there I was sitting in front of my TI 99/4A complete with b/w TV as a monitor, coding a way.  I had the headphones on with the Walkman blaring Van Halen or The Police.  My dad would come back around 11:30pm and if I was still awake he would make me go to bed, where I would read Dragonlance Chronicles  by flash light until I fell asleep around 1am.  I nodded off in class a lot.

     Anyway, I'm thirty six years old now and finally back in school.  However, I still haven't decided on a technology related degree.  I'm really digging the English courses I'm taking now, but Cognitive Science is looking pretty interesting.  It does not really matter since I plan to be in school for a long, long time.

-----
     Sorry for the disjointed post.  I'll do better next time.

     Next up, a tech post!

Sunday, August 29, 2010

Time keeps on slippin'

     In the August 26th Sports section of the WSJ, there is a side-bar on page D8 that discusses the practice of fouling late in close NBA games.  In particular, the article talks about whether or not a team that is up by three should foul the opposition in order to keep them from launching a three pointer and tying the game.  According to John Ezekowitz at the Harvard Sports Analysis Collective, it doesn’t really matter.  

     Clock management will continue to be a metric on which coaches and players are judged.  Several of the major NBA statistics sites have a category for "crunch time" shooting percentage, which is, how well does a player shoot in the waining seconds of a close game.  Of course, baskets scored in the first quarter count just as much as baskets late in the game, but the excitement isn’t the same.  It makes sense to take clock management in the waning seconds of a game seriously, but it was not always so.  At one time, end game clock management started a lot sooner.  Sometimes at the beginning of the 4th quarter.  Sometimes midway through the third.  Let me take you back to a time when the game moved...a...whole...lot...(wait for it)...slower.

     On November 22nd, 1950 fans of the NBA were treated to the lowest scoring game in the history of the league.  Final score: 19-18.  That's four full periods of professional basketball.  The record still stands.  The court was narrower than it is today, the players were bigger and there was little finesse to the game.  Conservative coaching styles made it worse.  Players such as Bob Cousy of the Boston Celtics were masters at holding the ball and dribbling out minute after mind numbing minute.  During that futile game, each team scored four baskets (the rest of the points came from the free throw line).  Four total points were scored in the final twelve minutes.  

     Enter Danny Biasone, the owner of the Syracuse Nationals.  In addition to having the perfect last name for an NBA owner, Mr. Biasone knew that something needed to change.  If things kept up, parents were going to start sending their kids to NBA games as punishment.  Groups of Zen students started showing up to games for Zazen in the gym nights (notice the thought, return to the game, notice the thought, return to the game...) He felt the game needed to be sped up.  A lot.  So, rather than allowing a team to hold onto the ball for as long as it literally could hold onto it, he decided a team had to attempt a shot within a predetermined amount time.  The device he came up with that tracked how many seconds remained before a team had to take a shot was called the Secondary Horologicaly Optimal Timepiece or S.H.O.T. clock.   

     According to the article History of the Shot Clock on NBA.com, Mr. Biasone came up with 24 seconds as the magical, league saving interval, by taking the total number of seconds in an NBA game and dividing that by the average number shots attempted by both teams.  This is incorrect.  What Mr. Biasone did was look through the box scores of games that he had enjoyed immensely, and took the average number of shots attempted in those games.  Masochist disasters like the like the one that happened on November 22nd, 1950 were not used.  Mr. Biasone calculated that exciting games that people enjoyed watching were ones where each team attempted about sixty shots each.  That came to one hundred twenty shots per game.  Take 2,880 seconds and divide by 120 and you get...24 seconds.  

     Twenty four.  It was perfect.  It was the number of hours in day, the number of carats in pure gold, the number major and minor keys in Western tonal music.  It was the number that saved the game of professional basketball.

     By the end of the 1958-1959 season, every team in the league was averaging at least one hundred points.   The NBA never looked back.  It was not long before NCAA basketball games had shot clocks as well.
Had it not been for the genius of Mr. Biasone, we would not have the excellent game we have today. Without the shot clock the NBA would have probably died out somewhere in the 60s with the final few games resembling the movement of tectonic plates.  Thanks to Mr. Biasone we no longer confuse the final score of basketball games with baseball and hockey final scores.  The history of the shot clock everyone.  I hope you’ve enjoyed this week’s article.  

     What will we have next time?  The die roll is a...10.  Coming up, a short fiction piece.

Wednesday, July 21, 2010

Facebook Value

Just a quick one question poll.  Just pretend it's radio buttons instead of check boxes.  I only meant to allow one answer.  That's what you get for making a poll on an iPhone.



Friday, July 2, 2010

Installing a Windows Service

There are already numerous posts on the web that explain how to do parts of this.  Unfortunately, few of them have all of the steps in one post.  Windows services are great, but they ain't all that easy to install once you are done developing them.

The following assumes Visual Studio 2008.

To create a windows service:

Start a New VB Project

Select Windows






    Select Windows Service









    The once it's created, double click the service1.vb file in the project explorer (or whatever you want to name it).

    There are only two sub routines in this file, OnStart() and OnStop().  There are comments inside each subroutine telling you how they should be used.

    In order to debug this service, you need to add the following sub routine to the file:

    Public Sub New()

    ' This call is required by the Windows Form Designer.

         InitializeComponent()

         ' Add any initialization after the InitializeComponent() call.

         If Debugger.IsAttached = True Then

              Dim tempargs() As String

              Me.OnStart(tempargs)

              System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite)

         End If

    End Sub


    When you debug your service, you’ll actually be able to debug it like a regular console/winforms application.  You can leave this code in the application when you release it, since it won’t run if there is no debugger attached.

    Now comes the fun part.  Services don’t install the regular way:  Once you are done with your project, you need to add an Installer to your windows service project  Open the designer for the service class.  It will look something like this:








    Right click somewhere in the gray area and select Add Installer:
















    Give it a NAME!  Don’t leave it as Installer1.vb.  Call it Install.vb or something like that.  Double click your new install file (it’s in the solution explorer) and look at the designer view.  You should see a message stating that you should add components.  Right click the tool box and select “Choose Items”

    Wait a while so that VS can come up with the list of components.  This make take a bit.  There’s no progress bar so you’ll just have to wait.

    Once the list comes up, scroll down to the S’es and select ServiceInstaller and ServiceProcessInstaller.  Click okay and you should see them in your tool box.


    1. Drag a ServiceInstaller to the Designer
    2. Drag a ServiceProcessInstaller to the Designer
    3. Click on the ServiceProcessInstaller1 control
      1. Make sure the Parent Property is set to the name of your Installer Class (It’s the installer file you added to the solution explorer).  If you click Parent you should see a drop down list of classes.  Choose the installer class you added.
    4. Click the ServiceInstaller1 control
    5. Make sure the Parent Property is set to the name of your Installer Class (It’s the installer file you added to the solution explorer).  If you click Parent you should see a drop down list of classes.  Choose the installer class you added.
    6. Type the description of the service. (This will show up in the Services MMC window with all the other installed services).
    7. Type the DisplayName. (This will show up in the Services MMC window with all the other installed services).
    8. Type the ServiceName. (I believe this is the name of the process that will show up in Task Manager)
    9. Set the Startup Type (Automatic, Manual or Disabled)  You’ll probably want Automatic.
    10. Change the compile option from Debug to Release.
    11. Now you are ready to compile and install.
    12. Build the application.  Do no publish it.
      1. Make sure that the server you will run this on has .NET 3.5 SP1.  If it does not, you’ll have to install it on that server before continuing.
    13. Copy your release directory to that server.
    14. RDP to that server and open a command prompt.
    15. Change directory to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
    16. That is not a mistake, it should be the v2 directory.
    17. Run the following command:
    18. Installutil.exe (followed by the path to the exe you setup in step 13).
    19. If you selected the service to run as a User you’ll get a pop up asking for the user credentials.
    If everything installed correctly, you should see a bunch of text that ends with this:





    Open up the Services MMC and you should see your service installed.

    Be sure to start it.

    There you go.  Now you can run windows services instead of constantly writing console applications that are fired off every five minutes from the Windows Task Scheduler.

    Wednesday, May 12, 2010

    I'm on iPhonegraphy today!

    Just a quick note:  I've really gotten into the iPhone photography thing here lately.  The good folks at iPhoneography were kind enough to show my stuff in one of their reader showcases.  You can find their site here.

    I do have lots of software related posts to do, but they take a while to prepare.  I'll get back to the main mission soon.

    Friday, May 7, 2010

    Learning about Twitter

    I was going to write a long post about Twitter and how useful it is. I've spoken to several people who think it's all celebs and teenagers. There's a fair amount of that, but there is so much more. Lots of people are using it for very useful purposes.  Twitter demographic statistics can be found here.

    Anyway, like I said, I was going to write a post about Twitter, but the post I wanted to write has already been written by Scott Hanselman.  If you aren't on Twitter or don't know much about it, I highly recommend you read this post.

    Interested?  Sign up here.  If you do, then follow me.

    Also check out his video about Life with Diabetes and find out how you can make a contribution to help find a cure.



    Tuesday, May 4, 2010

    Starting a blog

    Starting a blog is easy.  Making sure you always have new (and somewhat interesting) content is hard.  I'll make you a deal, I'll give you some pointers on how to make a blog and leave the content up to you.  I do the easy part and you can do the hard part.  Fair enough?

    Actually, there can be lots to just starting a blog.  There are many different ways of doing this and there are multiple companies that provide similar services.  I have no strong feeling one way or the other for most of these.  This just happens to be what i use.  One more thing, you don't need any of this stuff to have fun blogging (other than the first step...creating a blog).  Let's begin.
    • Create a blog on Blogger (owned by Google).
      • I suggest Blogger but only because I'm  used to it.  WordPress is also one of the better known services.  
      • There are lots of settings within blogger that you can mess around with.  I'm not going to go into detail on each of these but Blogger is well documented.  Help pages abound.
    • Google Analytics (owned by Google)
      • Google Analytics is a free service provided by Google that tracks your blog's visitors.  You can get their location down to the city, what browser they are using, screen size, what pages they visited on your site, how long they stayed there, what operating system they were using...it's all there.  
    • Feed Burner (owned by Google)
      • Lots of people use RSS readers instead of visiting individual sites.  You should enable the RSS feed for your blog.  The only problem is, RSS readers don't register as site visitors since they are only reading the RSS feed, not the site itself.  Enter FeedBurner.  It's like Google Analytics for RSS feeds.  You don't have to do this to have an RSS feed.  All blogs provide one.  But you can use FeedBurner to track RSS subscribes so you can have a better idea of your true audience.
    • TwiterFeed
      • I could write an entire post on Twitter alone (and I probably will).  Even if you don't use Twitter, you want to link your blog to a Twitter account.  Why?  Because people who use Twitter share things they find with other people on Twitter.  So if they like your content, it's like free advertising.  So create a Twitter account that sounds something like your blog.  Fill in the blog's web address in the Twitter profile.  Then go over to TwitterFeed and link your blog's RSS feed to the Twitter account.  Once you have done this, each time you create a new blog post, it will automatically show up with in your Twitter feed.  It'll put the title and a bit.ly link back to the full page.  What is bit.ly?  Read on...
    • Bit.ly
      • There are many different URL shorteners (more info).  Bit.ly just happens to be the one I use.  Bit.ly kind of builds off TwitterFeed and Twitter.  Since Twitter is limited to 140 characters, often times your entire Tweet is taken up by the URL alone.  Bit.ly takes the long URL and gives it a short one.  And...if you create a bit.ly account and then link it to your TwitterFeed account, you'll be able to track who,what, where, when people are clicking your bit.ly links from tweets auto generated by TwitterFeed.  
    • Addthis.com
      • Addthis provides a handy little snippet of JavaScript (don't be afraid, the directions are easy to follow) that puts group of links at the bottom of your posts that allow people to share the link on Twitter, Facebook, Myspace, and several other social networking sites.  This is huge.  Why?  Because people who search for content like yours and find it often know other people who are interested in the same thing and if you make it easy for them to share what they found on your site, they will probably get more eyeballs on your content.
      • Sharethis.com provides a similar service.
    • Facebook Page
      • If you're on Facebook, I would consider making a Facebook Page that imports it's wall content directly from your blog's RSS feed (a la Twitterfeed).  This allows people on Face Book to become a fan of it and then their friends see it an potentially join and so on.  You can also add a few other things to the page, like a calendar for events and a link back to the main blog.
    • Custom URL
      • You can register a URL that links to your blog so that, for example, the address bar says, "http://www.jonwear.com" instead of "http://jonwear.blogspot.com".  It makes you look a little more stable.  This is the only thing in this lists that costs money.  Usually you can get a URL for around $10 a year. This involves a little know how involving things like DNS and A Name records and the like.  There's lots of documentation on the web on how to get this done, but you might want to bring  in a knowledgeable friend to get this setup.  I'm sure you know one.
    • Money!
      • First off...you probably aren't going to make much (or any) money with your blog.  But you might, who knows...you might make pennies from the masses and retire.  Both of these services  integrate well with Blogger.  I suggest:
        • Google's Adsense (You get very small amounts of money when people click ads on your site)
        • Amazon Associates (You get a cut of purchases that people make through your site)

    Wednesday, April 28, 2010

    iPhone Images

    I'm experimenting with the iPhone camera and some of the little photo apps that you can get for it.  I'm not sure if I'm taking good photographs or not, but I'm having a fun time with it.  Hard to believe that it has all these imaging capabilities...and it's a phone too.

    As is my usual MO, I setup a whole other blog devoted to just my iPhone masterpieces.  Common sense finally took over and I decided to do just a post about it instead.  I may do others and if I'm still into this several months from now then maybe I'll spin off another blog then.

    I've enjoyed working with the limitations of the iPhone.  I have to look for places with good lighting or else trick them up some way with the editing software.  The constraints are quite liberating so far.  Anyway...here they are.  I'll keep uploading new images to this Flickr album (RSS):


    Wednesday, April 21, 2010

    Time to learn

    Several years ago I worked with a developer that did all of his development with classic ASP pages. It didn't matter what the task was, a classic ASP page was the answer. Instead of writing a console app or writing a .bat file to run an automated file manipulation task, he would reference COM objects from within the ASP page and run it under an account that had access to the file system and then schedule IE to run with that page as a command line argument. And it ran...most of the time. This guy was very comfortable with his classic ASP. During the time I knew him I never saw him write a windows application or a .net application of any kind. Classic ASP uber alles!

    I am not like that.  I certainly have my comfort zones.  I stayed with classic ASP during the initial days of ASP.Net.  I didn't fully leave my spaghetti code ways behind until version 2.0 of the framework came out.  Then I left it behind for good.  But VB6?  I dropped it as soon as I tried my first .Net WinForms application.  I cannot quite explain why.  It was different enough that I found myself spending a lot of time relearning old tasks (like adding items to a drop down box and actually seeing the text).  But I could see the potential.  You'd think I would have seen it in ASP.Net from the get go but I've always been a console/backend/windows developer first and a web developer by necessity.

    Anyway, version 2.0 of the framework came along and that got me excited about web development.  It seemed like there were a dozen new technologies to learn.  Right about the time I got up to speed on the relevant (to me) parts of framework 2.0, version 3.0 came out.  Then version 3.5...the version 3.5 sp1...and SQL Server 2008.  I threw up my hands and gave up trying to learn it all.  I picked a few things here and there and learned what I could.  When I found something really useful, like Linq-to-SQL, I would talk it up with the other developers in my department and try to get them using the new better ways.  Some took to the new ways, some kept on slogging the .Net 1.1 way.  You can bring a developer to water but you can't make him Linq.

    For me, I usualkly learn so much about new technologies while working on a project that by the time it's finished, I want to rewrite the entire thing in the stuff I was learning while coding with the old stuff.

    What is this post about?

    This post is about all the new stuff that's come out recently(and somewhat recently) from Microsoft.  I was making a list of books I need to buy to get current on things and realized I was going to be spending a fortune.  Here are the technologies that I want to learn about:
    • MVC 2.0
    • WPF
    • Silverlight 4.0
    • .Net Framework 4.0
    • Powershell (So hard to leave my cmd ways behind, but I need to)
    • JQuery (I'm way behind on this)
    • IIS 7.0
    • SQL Server 2008 (somewhat advanced)
    • Windows 7 (It's cool, I like it, but I'm still stumbling around some)
    That's a full year's worth of reading right there.  I'm going to have to go back to doing it like I did in the old days when I ways trying as hard as I could to get out of the technical support department and into development.  I'll buy a book (or two) about each technology and read them from start to finish.  I won't remember all of what I read, but general concepts and terms will stick.  Later, I'll be thinking about a problem and think, "Wait a second....I read something about this..." and I'll flip through a book or Google a certain term and find my solution.  The fun parts of reading these 800+ page behemoths is when I come across a better way to do something I do all the time.  I know that sounds strange but, yes, those are the fun parts.  If it wasn't fun I wouldn't be able to do this for a living.

    Anyway, time to get reading. 

    Thursday, April 1, 2010

    Twitter Feeds For Websites That Don't Have Twitter Feeds

    How many times have you come across a website and thought, "Hey!  I'd like to follow this on Twitter!" but when you looked around for a "Follow Me" button on the website, you can't find one.  Not very often right?  I mean, most places have a Twitter feed now.  But not everyone.  So what do you do?

    Well, almost every single website that publishes content on at least a semi-regular basis has an RSS feed.  That's your ticket.  You can use the RSS feed to create a Twitter feed.  Here's how:

    • Open a new Twitter account and give it a name and a unique email address.
      • Gmail makes this easy by allowing you to add "+somename" to the account part of your email address.  So if your gmail address is "myname@gmail.com" you can use the email address "myname+something@gmail.com" and it will still go to your regular Gmail account but you can register it as a unique email address elsewhere.
    • Open an account at www.twitterfeed.com.
    • Click Create A New Feed
    • Paste in the URL of the RSS feed.
      • Click Advanced if you want to look through the other options.
    • Click Next and link the feed to your newly created Twitter account.
    • Now go back to your REAL twitter account.
    • Follow the Twitter account you just created.
    For instance, I'm interested in player trades and roster changes in the NBA.  There is an RSS feed for this but no Twitter feed.  At least there was no Twitter feed.  Now there is and you can follow it at:


    Saturday, March 27, 2010

    Numlock Morse Code

    In Neal Stephenson's novel Cryptonomicon, Randy Waterhouse finds himself in a prison in the Philippines.  Randy has a laptop with some very valuable information on it that some bad guys want, but since the information is encrypted, they can't get to it.  So they allow Randy to keep his laptop in his jail cell but the only place he can put it is on top of a short, locked, file cabinet that has been chained to the floor.  The battery has been removed so the only way to get power is to leave it plugged in on top of the filing cabinet.  The thing is, Randy doesn't even know what the information is yet, because it's encrypted too. He needs to decrypt the information, but not let the bad guys know he is decrypting it, or rather, he wants them to think he's doing it but give them the wrong information.

    He can't show the real decrypted info on the laptop display because he is afraid that the bad guys are trying to use a Van Eck Phreaking antenna that is inside the filing cabinet so they can eavesdrop on his laptop screen (he's already made sure there are no hidden cameras).   So he comes up with some fake decryption that he shows on the screen, but the real info has to be displayed another way.  He writes a program that takes text and translates it into Morse Code.  The program turns the the scroll lock light on and off to simulate dots and dashes.  Now he knows the real info from the blinking light, and the bad guys get the fake info he showed on the screen.

    I thought that was kind of cool so I wrote a program that does just that.  The only difference is my program blinks the num lock key instead of the scroll lock key (my keyboard doesn't have a scroll lock key).

    If you were to load this application on your windows PC and run the following from the command line:

    c:\waterhouse\waterhouse.exe /T:"sos"

    You would get this:




    Notice the /T:"sos" that comes after the name of the application.  The /T: switch says, "turn this text into Morse code."

    You could also type this:

    c:\waterhouse\waterhouse.exe /F:c:\morse.txt

    /F: says to load a file and turn that into Morse code.  It can be a file on your computer, a UNC path or a file on the web (just prepend it with http://).  The contents of the file c:\morse.txt on my computer happens to be my name.  So when you hit enter, you see this:




    Help is available by typing the /? or /help switches.

    You can download the compiled application here. (Windows only)

    You can download the source code here.

    You can download Microsoft's free Visual Basic 2008 Express development environment here.

    Wikipedia: Morse code