Archive for the ‘Uncategorized’ category

George Takei on the 2010 Census

April 2nd, 2010

Thought on iPad

January 28th, 2010

The much anticipated Apple iPad (or Mac’s iPad as it is being called int teh interwebs) debuted yesterday.  And it was a flop.  Apple could have built a great e-reader.  They could have built an incredible tablet.  Instead, they just released a really big iPhone and patted themselves on their collective backs.  Here are a few things that the iPad is sorely lacking if you want to use it for reading:

  1. No electronic ink.  Until you have spent some time with e-ink, you will never understand how much nicer it is than an LCD screen.  Here is a quick example.  Read a page of text off your computer monitor.  Then read a page of text out of a big, hardcover book.  How much nicer is reading that text out of the book?  There isn’t the eye strain associated with a computer monitor, the letters are crisp and clear, and you can see the book in sunlight.  This is the difference now between the iPad and the Kindle.  I doubt we will see many iPads on the beach.
  2. No known ability to load books from outside the iTunes store.  Will this allow you to download free books from Google?  Or can you load books from USB?  I have plenty of books I have obtained outside the Kindle store sitting on my Kindle.  There is no hint that this will be available on the iPad, or if it is if it will be anything close to easy.

Now, if they decided instead to make a great tablet PC, here are a few things they are missing:

  1. No web cam.  Seriously, you built an ultra-portable and don’t think people are going to use the webcam on it?
  2. No Flash or Silverlight support in the web browser or elsewhere.  This has the same crippled browsing as the iPhone.
  3. Not a “real” OS.  OK, I realize this is a stripped-down version of OS X.  But I cannot load my own programs or other programs from the internet on this.  It cannot MULTITASK.  This computer is severely limited compared to my cheap-as-dirt Asus Netbook.  Which has all those things I just mentioned, and does them pretty well.

This picture pretty much sums it up for me:

Unit Testing in Silverlight

October 26th, 2009

Something I am a really big fan of is Unit Testing.  I was a big evangelist of unit testing at my last company.  The code my team wrote unit tests for was, on average, much better code than code that was written without unit testing.  Code-testing coverage via unit testing creates solid code.  It allows developers to thoroughly test their code in an automated fashion.  Unit tests give the developer confidence that they have introduced few or no regressions with new functionality added to old code.  All one needs to do is re-run the old unit tests to ensure everything still works.  Unit tests are a great form of documentation.  When a developer maintains code written by another they can inspect unit tests to see how the code is used, and can run these unit tests to ensure they aren’t breaking functionality they may not understand.  Ultimately unit tests act like a code specification.  In fact there is a style of coding called Test Driven Development (or its sexy new name, Behavior Drive Developer) that mandates that the tests be written first, and then the code is not considered complete until it satisfies the tests.  And even when unit testing is not take to that extreme, developing code that works well with unit tests usually ensures well-designed code from an object-oriented standpoint.  Code that is easily tested by a unit test is usually adequately decoupled and uses OO principles like inheritance, encapsulation and polymorphism in the right way.  Finally, writing code with unit tests can be faster.  Running tests can take less time than standing up an application and entering in the correct criteria to test the code in question.

At my current employer I have found myself working with a very mature (and very good) code-base that does not lend itself to unit testing.  It has probably been a year since I have written a unit test at work.  So when I started diving back into Silverlight I made it a goal to write our new framework to be as compatible with unit testing as possible.  This will help lesson the burden on our QA team, which has already written a lot of UI testing for our current ASP.Net web application.  We will also receive all the benefits mentioned above.

To start off I needed a unit testing framework.  NUnit is my old unit-testing friend and was my first thought.  However, NUnit and other unit testing frameworks don’t work in Silverlight-land, since Silverlight relies on a slightly different set of core .Net assemblies.  I did discover that there is a Silverlight version of NUnit and I considered it.  I also found the Silverlight Unit Testing Framework from Microsoft thanks to a post over on Scott Gu’s website.  The Silverlight Unit Testing Framework is based on the Microsoft library for normal .Net (which is also based on NUnit) but runs in Silverlight, in the browser.

Ultimately I chose the Microsoft library for a couple of important reasons.  First, there seems to be more acceptance and more example of the Microsoft library.  Second, the Silverlight Unit Testing Framework does one thing that is very unique compared to other unit testing frameworks: it runs the tests in the UI thread.  Jeff Wilcox, one of the authors of the framework, has an excellent post here about why Microsoft chose to do this, and it really makes sense.  Silverlight is a graphical library, and bugs will best be found if testing is written from a user-interaction standpoint.  Many things run on the UI thread, or are marshaled back and forth.  The Microsoft Silverlight Unit Testing Framework can work both as a unit testing framework and as a kind of integration testing framework.  The framework makes it very easy to test off the UI thread, and test asynchronously.  I found this excellent post on using the async features of the Silverlight Unit Testing Framework.  It really boils down to the testing environment being the same as the real run-time.  I have run across enough idiosyncrasies in the way Silverlight handles UI thread interaction to know that testing without it will miss a lot of bugs.

I have developed some “test” tests on business objects.  I also tested a thread manager I wrote using the built-in async functionality.  With the experience so far, I feel happy with the results.  My next step is to look at pluging in the unit tests into the automated build at work…

Monty Hall, Being Wrong, Right, and Idiot America

June 22nd, 2009

There is a famous problem in computer science (hang in there with me) called the Monty Hall Problem:

Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what’s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, “Do you want to pick door No. 2?” Is it to your advantage to switch your choice?

You should switch your choice.  Disagree?  You are wrong!   Why?  Well let Wikipedia explain!

This is a really unintuitive one, but one that clever mathematicians solved a long, long time ago.  But a lot of people still disagree with experts in the fields. Why is this?  We all want to think we are smart, but are we all smart in all domains of thinking and knowledge?

I have been reading Jeff Atwoods series of articles on the subject for some time.  His blog is always an interesting read, but his recent article just dovetailed with a book I just finished reading, Idiot American: How Stupidity Became a Virtue in the Land of the Free. Mr. Atwood points to an article by Marilyn vos Savant in which she points out the answer to the “Monty Hall” problem above.  Her correct answer is is blasted by many of her readers.  Its funny she is right despite the opinions of many average Americans, and even many “learned” Americans.

In “Idiot America”, we learn about the tendency in contemporary America to give any given argument equal standing, no matter how ridiculous.  For example, the politically charged issues of evolution and global climate change are both painted by some in American as being “controversial”, yet they aren’t, at all, in the circles of science.  There is no controversy about evolution.  It is considered a scientific fact by biologists, paleontologists, and others.  Global climate change has become one one of the most researched topics of the last 50 years.  It is clear to specialists in the field what is happening.  At a recent convention of climatologists, the debate was not about global climate change, but about how to convince the public it was real.

Television personalities pull some 3rd rate weatherman out of East Kansas to debate a world-renowned Climatologist and both sides are given equal billing on Fox News.  It doesn’t matter that “East Kansas” is probably more concerned with local politics than science, and she/he hasn’t been published in a peer-review journal.  Never mind that the word-renowned scientist has been published, and thereby has had their credibility, skills, etc, put up for review by the peers (and passed).

This is the way our popular media now works.  Never mind the liberal or conservative slant.  Of course many of these talking heads paint all of science as liberal, and thereby political and wrong.  When the truth slant gets out of whack, we are all screwed.  When we quit giving respect to those in our society who strive to have, and gain the most education and accomplishment, we are in a bad place.  When we start giving more credibility to Rush Limbaugh than various, proven scientists, then we are more about ego and personal opinion than truth.

A Quick Round-up of Science Retards

March 6th, 2009

Here is a quick round-up of some events related to science retards:

  1. Oklahoma, hoping to keep its place as the “derrrrr” state, has a proposed resolution in front of the legislature to condemn noted biologist, professor and author Richard Dawkins.  Why?  Because Dawkins is a proponent of Evolution. Retard: Oklahoma
  2. President Obama is set to overturn the idiotic stem-cell ban put in place by the previous administration.  This is a big win for science and for people suffering from diseases and conditions that might be mitigated or cured with stem cell based medicines and technologies.  Retard: W.
  3. Below is an interesting graph from this page which really made me chuckle.  Retard: People who don’t use critical thinking (which is sadly most people in the US).

Silverlight ComboBox Default Style

February 24th, 2009

A few days ago I wrote about learning from the default styles of various Silverlight controls as posted on the MSDN here.  Guess what?  They forgot the ComboBox style, which I found after a little searching.  Enjoy.

JasonJackson.com

February 9th, 2009

I periodically get an email from someone wishing to buy my domain name, JasonJackson.com .  Since my name is Jason Jackson (TM), I don’t quite get any of the requests and always say no.  Anyone else named Jason Jackson is obviously a copy, even if born before me.

The great thing about this domain is that even though it says it expires in 2012, I purchased the 100 year plan. I will always be the real Jason Jackson, and all others will be imitations.  Well, at least for the next 98 years.  I wonder what I will be doing in 2107?

Clinton, Bush and Washington are on a sinking ship

February 8th, 2009

Bill Clinton, George W. Bush and George Washington are on a sinking ship.

As the boat sinks, George Washington heroically shouts, “Save the women!”

George W. Bush hysterically hollers, “Screw the women!”

Bill Clinton’s asks excitedly, “Do we have time?”

Source