Browsing Posts published in December, 2008

    I won the lottery?

    No comments

    As amazing as this may sound, I’m pretty sure that before tonight, I have never received a scam email. I’ve gotten tons of spam, but never a scam.  Perhaps I’m a bit too excited about this turn of events but, I’ve never won a lottery before!

    It’s amazing to me that these scams still work.  If they didn’t, why on earth would they continue to be sent out?  Why would there be site after site explaining the scam if people didn’t respond to them?

    What annoys me is that it seems as if the scammers aren’t even trying.  Here’s the email I received:

    Subject:CLAIM YOUR PRICE
    We the Bonoloto Combinacion Ganadora wishes
    you mery xmas and prosperous new year in advance. 
    
    We wish to inform you that, you are lucky
    to have been selected among the 50
    Recipients,your Email Address attached
    to a Ticket Numbers(7 9 17 20 23 27)
    has won an Award Sum of 1,200,000.00.
    (One Million Two Hundred Thousand Euros)
    in Bonoloto. Combinacion Ganadora, Madrid,
    Spain. 
    
    For further inquiry and processment of
    your prize fund,please Contact
    our Fiduciary Agent:
    ...blah, blah, blah

    Now, I’m not the best at grammar, but come on, just hit F7 before pasting this text into a mass email.

    What really annoys me, is if they send this garbage out as-is and people respond to it, what does that say about people in general?

    Spectacle

    No comments

    I’ve don’t like writing unit tests, plain and simple.  Do I write test code?  Absolutely.  I think not writing tests will set you up for a truckload of fail.

    What I don’t like about writing the tests is the seemingly foreign language that their written in.  Sure it might be C# or VB, but it looks drastically different from the object oriented code we write on a daily basis.

       1: MyClass superGuy = new MyClass();
       2: string result = superGuy.GetResult();
       3:
       4: Assert.AreEqual("good result", result);

    I just don’t think that way.  For one, I can’t just look at that line and know what’s being tested without having to read through the entire line, Two, it takes me a few seconds to mentally adjust to thinking about the code that way.  Finally, I have a tendency to swap the expected and actual when writing out the asserts which confuses me when the assertion fails.

    Wouldn’t it be nice to be able to write:

       1: MyClass superGuy = new MyClass();
       2: string result = superGuy.GetResult();
       3:
       4: result.IsNotNull();
       5: result.IsEqualTo("good result");
       6: // or combine them
       7: result.IsNotNull().And.IsEqualTo("good result");

    That’s what spectacle is all about.  It’s a collection of extension methods to ease the pain when writing unit tests.  It only targets MbUnit v2 right now, because that’s what I’m currently using.

    If you want to try it out, clone it from the github repository and build it.  Next all you’ll need to do is add a reference to your test project  and add a “using Spectacle.MbUnitAssertions;” to your code files.

    No, this isn’t some witty post tying some obscure Seinfeld episode to my daily life.  Nor is it some great philosophy gleaned from the musings of latex salesman, puffy shirts or Keith Hernandez.

    Although, now that I think about it, I should probably look into those.

    This post is about a simple technique I read about on lifehacker.  A fellow once asked Jerry Seinfeld how to become a better comedian.  He replied that the way to be a better comedian was to write better jokes.  The way to write better jokes was to write every day.

    Jokes aside (huh huh), that’s good advice for doing anything.

    That’s easy, you say.  Just do more of what you want to be doing.  I’ve said similar things myself.  Do ‘x’ more and more and you’ll become better at ‘x’.  And here I sit with a blog that started October something or other and it’s taken this long to get out a second  post.

    The key to Seinfeld’s technique was how he motivated himself to write everyday.

    First, get a big wall calendar that has the whole year on one page and hang it on a wall.  Second, get a red magic marker.  Everyday you write (or do ‘x’), put a big X on the day.  Write (or do ‘x’) for a couple of days in a row and you’ll have a chain.  Keep going and the chain gets longer and longer.  Pretty soon, you’ll need to keep it going.

    It sounds simple because it is.

    Everything I’m good at, I am because of consistent practice.  Math science, artistic ventures, whatever,  they all take commitment and practice.  It’s easy to skip a few days here and there when there is no visible reminder of what you should be doing.  Those days might turn into weeks or months or heaven forbid, never.

    So why should blogging, or anything really, be any different?

    I know what I’m looking for this holiday season, I just hope I get that red marker with a compass in the stock, and this thing which tells time.