Sure the AutoCompleteBox, Expander, TreeView, Charts, etc. from the new Silverlight Toolkit (http://www.codeplex.com/Silverlight ) are cool – and will make some Silverlight apps look even better.  But the ImplicitStyleManager (and related Theme classes) will now allow designers to encapsulate their design work into an assembly and xaml resource dictionary, and easily apply the theme to an entire page (or part of a page).

On the surface this is “duh” you could do that before – but not so.  You had to “touch” every control and add a Style and/or Template to it and have that StaticResource appear in a generic.xaml or App.xaml somewhere in your app.  Now you should be able to “style-up” and entire Page/App in a few declarative steps.

This means that there could be a market for professional looking themes for Silverlight apps that developers could apply for a really polished look in their applications.  It also means that custom themes can be created for a company or project that can be easily and consistently applied to many different controls and/or applications.

I am eager to try this out on a larger scale in the next week or so – will report back.

Check it out (with some nifty pre-packaged themes for your use) at http://www.codeplex.com/Silverlight/Wiki/View.aspx?title=Silverlight%20Toolkit%20Overview%20Part%203&referringTitle=Home&ANCHOR#ImplicitStyleManager


MVC Beta – Non-GAC implementation

Posted on October 22, 2008 00:21 by Admin

Another “geek post”, sorry.

We’ve been updating some of our MVC apps to the beta and were relying on the non-GAC implementation of MVC (i.e. we didn’t want to have to physically install the MVC .dlls on the shared dev and live servers – we’ll do this for RTW but not the betas).

However, even when we copied the DLLs locally and referenced those .dlls we were still getting a “yellow screen” error that the assemblies could not be found.

It turns out that there is a little-known property on the References themselves that is needed to accomplish the task of copying and referencing these .DLLs.  Select one of the References to the .dlls (say System.Web.Routing) and look at the properties.  You must set the “Copy Local” property to “True” in order to reference the local copy.

Took a little while to find this – hope to save others a little time.


World Animal Day – boston.com

Posted on October 19, 2008 08:41 by Admin

This was such an amazing and surprising picture – Narwhals in Arctic Bay, Canada - that I had to share it.  I honestly didn’t know if it was real or not and that made me feel a little stupid.  Many of the rest of the pictures in this article are also awe inspiring.

http://www.boston.com/bigpicture/2008/10/world_animal_day.html

boston_narwhals


This wasn’t specifically Silverlight-related, but you really can’t have much of a Silverlight application without some kind of data access.  We chose WCF services and built up some quick models with NHibernate, in 5 easy steps

I’ll use the example of the “Flashcard” object in the quizzing application which had a front, back, competition information, etc.

Step 1) Interfaces

For the Flashcard object first we built the interfaces that would define the main data parts of the object, both on the model side and on the Silverlight side.

   1:  namespace TBC.Interfaces
   2:  {
   3:      public interface IFlashcard
   4:      {
   5:          int PKID { get; set; }
   6:          int? TBCCompetition { get; set; }
   7:          int? TBCYear { get; set; }
   8:          int? KBCCompetition { get; set; }
   9:          int? KBCYear { get; set; }
  10:          string Front { get; set; }
  11:          string Back { get; set; }
  12:          int? DeckID { get; set; }
  13:          IQuestionType QuizQuestionType { get; set; }
  14:      }
  15:  }

A pretty simple object by most standards – a primary key, competition information, strings for the front of the card and back of the card, a “deck id” to allow for multiple flashcard decks to be prepared, and an IQuestionType.  This is the only custom type and interface in this object. The question type is a complex object that is basically like “multiple choice question”, “fill in the blank question”, etc.

Step 2) Build the Objects

Nothing fancy here either – just implement the interface into an object, but with a little twist.

   1:  using System.Runtime.Serialization;
   2:  using TBC.Interfaces;
   3:   
   4:  namespace TBC.Models
   5:  {
   6:      [DataContract]
   7:      public class FlashcardEntity : IFlashcard
   8:      {
   9:          [DataMember]
  10:          public QuestionTypeEntity QuizQuestionType { get; set; }
  11:   
  12:          #region IFlashcard Members
  13:          [DataMember]
  14:          public int PKID { get; set; }
  15:          [DataMember]
  16:          public int? TBCCompetition { get; set; }
  17:          [DataMember]
  18:          public int? TBCYear { get; set; }
  19:          [DataMember]
  20:          public int? KBCCompetition { get; set; }
  21:          [DataMember]
  22:          public int? KBCYear { get; set; }
  23:          [DataMember]
  24:          public string Front { get; set; }
  25:          [DataMember]
  26:          public string Back { get; set; }
  27:          [DataMember]
  28:          public int? DeckID { get; set; }
  29:   
  30:          IQuestionType IFlashcard.QuizQuestionType
  31:          {
  32:              get { return QuizQuestionType; }
  33:              set { QuizQuestionType = (QuestionTypeEntity) value; }
  34:          }
  35:   
  36:          #endregion
  37:      }
  38:  }

 

Nothing different here, except maybe the [DataContract] and [DataMember] tags. These are added via the System.Runtime.Serialization namespace and will be used to enable the WCF services to expose these objects to Silverlight.

So now we have an object with an interface that is ready to be served up by our WCF service.  Now all we need is to get it in and out of the database.  This leads us to NHibernate 2.0 and the Fluent NHibernate library, whcih leads to …

Step 3) The NHibernate Mapping File

Here is the basic mapping file for this object – and yes it is just another class.  It is important to recognize that it is completely separate from the object itself.

   1:  using FluentNHibernate.Mapping;
   2:   
   3:  namespace TBC.Models.Flashcard
   4:  {
   5:      public class FlashcardMap : ClassMap<FlashcardEntity>
   6:      {
   7:          public FlashcardMap()
   8:          {
   9:              TableName = "quiz_flashcards";
  10:              Id(f => f.PKID);
  11:              Map(f => f.TBCCompetition);
  12:              Map(f => f.TBCYear);
  13:              Map(f => f.KBCCompetition);
  14:              Map(f => f.KBCYear);
  15:              Map(f => f.Front);
  16:              Map(f => f.Back);
  17:              Map(f => f.DeckID);
  18:              References(f => f.QuizQuestionType);
  19:          }
  20:      }

 

This is a little confusing at first, but if you go through it step-by-step then you can understand what it does, even if not how it is actually implemented.  It is a brand new class inheriting from ClassMap<T> and we pass in the FlashcardEntity as the generic type.  Then, in the constructor, we simply define which table in the database contains the Flashcard data, and which element is the primary key.  Since we named the columns in the database the same as the property names we don’t need to use the overload with the column names.  Because of that all we need to do is to add all the Mappings with a simple lambda expression.  The References call is cool.  It “says” that “there is a column called QuizQuestionTypeID that references a single QuizQuestionType object, please go get it for me.”

Step 4) Initialize the Connection and Mapping.

So how do we initialize the connection and mappings we’ve defined?  Once they are all entered and mapped we do this …

   1:      IPersistenceConfigurer persistenceConfigurer =
   2:          MsSqlConfiguration
   3:              .MsSql2000
   4:              .ConnectionString.Is(MainController.GetInstance().Settings.ConnectionString);
   5:   
   6:      _cfg = persistenceConfigurer.ConfigureProperties(new Configuration());
   7:   
   8:      var persistenceModel = new PersistenceModel();
   9:      persistenceModel.Conventions.GetForeignKeyName = (prop => prop.Name + "ID");
  10:      persistenceModel.Conventions.GetForeignKeyNameOfParent = (prop => prop.Name + "ID");
  11:      persistenceModel.addMappingsFromAssembly(Assembly.Load("TBC.Models"));
  12:      persistenceModel.Configure(_cfg);

These are more Fluent NHibernate calls that handle implementing the configuration of NHibernate.  Yes this can all be done with configuration files, but now it can be done in code as well – fairly easily.

Step 5) The basic CRUD code

So now that this is all done, what would the code look like to get all the Flashcards from the database …

   1:  public List<T> GetAll<T>()
   2:  {
   3:        ISession session = NHSessionHelper.GetInstance().GetNewSession();
   4:        List<T> e = default(List<T>);
   5:        e = new List<T>(session.CreateCriteria(typeof (T)).List<T>());
   6:        session.Close();
   7:        return e;
   8:  }

or maybe just get one of the cards by ID and Save/Update …

   1:  public T GetByID<T>(object id)
   2:  {
   3:      ISession session = NHSessionHelper.GetInstance().GetNewSession();
   4:      T e = default(T);
   5:      e = session.Load<T>(id);
   6:      session.Close();
   7:      return e;
   8:  }
   9:   
  10:  public T SaveOrUpdate<T>(T saveEntity)
  11:  {
  12:      ITransaction transaction;
  13:      ISession session = NHSessionHelper.GetInstance().GetNewSession(out transaction);
  14:      session.SaveOrUpdate(saveEntity);
  15:      transaction.Commit();
  16:      session.Close();
  17:      return saveEntity;
  18:  }

Even with the error handling removed for brevity, this is pretty simple code.  In fact, you will notice that there is no mention in any of these methods of the FlashcardEntity classes.  This is because these generic methods can be used for any object that is created and mapped in this way.

Looking back at this there is really only 30 lines of code for the objects (interface, object, and mapping) and the rest of this code is reusable for all objects in the solution.  While these 30 lines could be easily generated, it is a nice number of lines of code to continue crafting code “by hand” and knowing as much as possible about what is going on in your objects.

It is also important to keep your objects “thin” when doing a lot of serialization and deserialization – more on that in post #3.


Silverlight IRL - Requests

Posted on October 15, 2008 23:00 by Admin

This is the first in a series of posts that I promised to do after my presentation to the User Group on Tuesday.  These will be details, link and some sample code.  I am in the process of making sure my code samples are functional under the release version of Silverlight 2.0 RTW - this should be done by Monday (getting the paying/work projects moved over first, and it is going really well).

Since the Microsoft Professional Developers Conference is getting underway in about 10 days, and Silverlight released well in advance of that, I figured it would be a good time to get some requests in for the next version(s) of Silverlight.  To put this in context for those not in attendance, most of the work I've been doing in Silverlight is in the health care and medical fields, with a side project of some Bible quiz games, a jukebox and flashcards.

#1) Microphone and WebCam Support: Doctors don't like to type, and while this is a generalization, dictation services are still doing very well in the market.  To support "digital dictation" I really need an ability to record and transfer digital audio files from Silverlight down to the server.  Add in web cam support as well and the kids can upload an avatar picture to personalize their account a bit as well.

#2) Cross-device as well as cross-browser: several of the doctors and company owners that we deal with regularly are proud iPhone owners.  Kids have their iPods, Zunes, and XBOXes.  Doctors are moving to pen-based tablet-based devices (sometimes PCs, sometimes not) to carry from room to room.  Less and less people are sitting down at a computer to do their work or entertainment.  We need to be able to target portable devices and game consoles with Silverlight applications.

#3) Full keyboard support for full-screen applications: Come on! Do you really have to disable all but a handful of "popular gaming keys" when the application goes to full-screen mode.  Isn't there another way to keep people "safe" from deceptive Silverlight apps?  This takes away the ability for data-entry and full-screen apps for educational purposes.

#4) Improve the tools and error messages: This is evolutionary, but to develop now you really need both Blend and Visual Studio 2008 (neither has critical features of the other (e.g. Intellisense, template support)).  And some of the error messages are so cryptic, and can mean so many different things, that they mine as well just be "Syntax Error"  (actually that is even more useful in some cases).  I am sure these are things that will come with time, but they do point to an immature system.

#5) More native controls: But I hear that there may be announcements to this effect even in the next few weeks.  The native (i.e. available in the plug-in or Microsoft-supplied .dll) controls for Silverlight have gone from literally nothing (i.e. make your own textbox) up to a respectable starter set of common controls (better than ASP.NET at launch).  But I always want more.  Some of my top requests (e.g. autocomplete, tree, expander, etc.) have already been announced as controls to be released  coming weeks.  These will allow for some really great user experiences without a lot of expensive and lengthy time being spent on low-level user-interface work.

[Updated - forgot one] #6) Offline and/or out-of-browser execution: This goes away from the traditional use of a "browser plug-in", but it would be great if the Silverlight code could be used while offline (yes there are places without wireless connectivity).  Also, the ability to (optionally) "install" the application so it can run in its own window with a shortcut, icon, etc. would be really useful- ala Chrome application settings and Adobe AIR.  I guess you could get this functionality today by using Chrome to view the Silverlight page and saving it as an application with settings, but it would be best if Silverlight could do this natively without a particular browser.

More coming soon, and I'll post the PowerPoint stack as well - here is a link to the pptPlex site with downloads for those who were interested in trying out that cool PowerPoint plug-in.


Someone had to do it!

Posted on October 9, 2008 07:01 by Admin

Reason #458 People Don’t Like Computers

Posted on September 16, 2008 02:17 by Admin

After a really busy summer I am making an effort to get back into a routine which includes posting about some interesting things going on personally, professionally, and otherwise.

 

I thought a “soft-launch” back into it would be sharing one of my pet-peeves of the day.

 

search_results_oops

 

The “insult to injury” here is the “Did you find what you wanted?” phrase – because apparently the little doggy did find a lot of things I probably wanted to see, but refused to show them to me.

 

From a Test-Driven Development perspective wouldn’t you do a simple count of the items on the right and match to the “found” number on the left?


I am getting a chance to do something I’ve wanted to do for a while – that is, get paid to do some Silverlight development.

That being said there is a lot to prove to our customer and ourselves that Silverlight is the right choice, and is at the right level of development, to be used as the platform for running day-to-day operations for a multi-million dollar business.  So we are undertaking a process to evaluate Silverlight and prove out some of the “unknowns” of Silverlight.

Other options are out there for the User Interface for this application:

(1) A “fat” installed app (WPF or WinForm) – the current app is a fat Windows 3.11/95-looking application with decent performance (especially when it was designed on PC’s with 1/10 the power of today’s applications).  But this app will be widely deployed (50+ sites) and tech support is limited and costly to overhead.  Web applications, or at least web-deployed applications, are preferred.

(2) An Ajax-enabled Web Site.  There is a lot of “magic” you can do with a little Ajax and some custom Javascript coding.  But, having done several of these sites, you end up feeling that you are making a web page do something “unnatural” (i.e. something it wasn’t designed to do).  And supporting and debugging these applications can be complicated.  Plus there is an inherent performance issue with even the best designed web application.  This is especially true when coming from a very performant Windows application to a new browser-based application.

(3) Flash/Flex. In addition to this Silverlight POC, at CQL we are working on a Flash and a Flex-based application from two other companies.  We’re updating a Flash-based application that gets a lot of XML-based data from simple web services, and we’re writing the services to support a modern site-wide Flex-based application.  There are other RIA options out there, and the two different design firms have much more experience with the Adobe products than Silverlight.  To their credit they have heard of and have used the basic Silverlight tools already, but never anything “production.”  So we need to prove to our clients and our design partners that this is a good idea.

So, what needs to be proven and how are we going to go about proving it out.

Here is the start of the list – this will build over the next few weeks.

1) Automated testing – how to test the front-end Silverlight controls using automated testing tools

2) Web Service calls / Databinding – using secure web service calls for data routines.  Pull-type calls for common actions/methods.  Also Publish/Subscribe type services that could push important data to subscribed controls.  How to handle disconnected concurrency issues?

3) Security / Roles – encrypted traffic.  Working in the same security context as the containing web application (i.e. login, roles, etc.)

4) Dynamic Control Loading – app needs to perform very well and should only load the components that are needed at any one time.

5) Keyboard/Keystroke/Hot-Keys – many of the current functions of the system have assigned key shortcuts than enable staff members to quickly access common features.  Can this be reproduced in Silverlight?

6) Stress/Load Testing – How does the load of an application that is mainly web service based differ from that of a get/post HTML web application?  Many small messages vs. less frequent bigger messages.

7) Real-world ability to work with designers – We’ve all seen the PowerPoint slides showing how easy it is to work with XAML between developers and designers.  Is it true?  Does it work in real life?

8) Uploading a file – can it be done in Silverlight or will we need some Ajax/Web Page interaction?

9) Drag-and-Drop – part of the app is a scheduling calendar – can appointments be rescheduled via drag-and-drop?

10) Controls – are there enough now for what we need in beta 2?  Are any third-party controls worth using/buying?  Can we do common data-entry validation (e.g. masked-edit textbox)?


Lessons from Keynote #2 – Steve Jobs

Posted on June 11, 2008 00:47 by Admin

If you ask most of the world about Steve Job’s keynote this week, they will basically tell you that it was the iPhone 3G announcement (new cheaper, faster, stronger, iPhone for the world) – which is true, but it was more than that.  This was at the WWDC (world-wide developers conference) for Apple Computer. 

iPhone as a Primary Platform

There were 5200 (sold out) developers at the WWDC for 147 different sessions (85 on Mac, 62 on iPhone). 62 on iPhone – 42% of the developer sessions were on the iPhone and new iPhone SDK 2.0.  You see, Apple doesn’t sell that many Macs, as their competitors will tell you.  Macs are only 5-10% of the total number of personal computers out there.  When Apple came out with the iPod and iTunes, they found a market they could dominate.  One of the other slides in this part of the keynote said there were “Three parts to Apple now Mac, Music, and iPhone”.  Apple makes as much, or more, on their iPods and Music as they do their Macintosh computers. 

Now they are looking to dominate the cell phone market as well – specifically the Internet-enabled “smart-phone” market.  And much of the rest of the keynote showed how seriously they are taking this market.  There has been talk of this trend away from personal computers and toward “intra-personal communicators”.  People don’t want to be “tethered” to a desktop PC, but mobile with their laptops and cell phones.

Mobile devices are a first-class development platform for 2008+

Partnership and Perception

So what does Apple need to dominate the phone business that they don’t already have? (1) the Enterprise user (i.e. the Blackberry crowd), (2) the College / GenX crowd, and (3) the Techy crowd (i.e. the ones who timed every download on the “old” EDGE network), (4) Loyal Mac/iPhone fans, (5) Education users (very loyal to Apple) and (6) everyone else.

When announcing all their new features, Apple did some important things.  For the Enterprise announcements they teamed up with top Fortune 500 companies to add credibility.  They dropped key technology names like Exchange and Cisco to gain points with the corporate IT crowd. SEGA was first off with a motion-sensitive Super Monkey Ball application to appeal to fun/gamers with an app done in “2 weeks” that beats all/most N-Gage games 3 or more years into development.  Then for “everyone else” there is eBay, TypePad, AP, MLB.com, etc.  For the Techys/Mac folks there are demos of “Cow Music” and games from Pangea Software.  For Education there are Medical content/training demonstrations.

In short it shows that Apple understands the market and their customers and has something to say to all of them.

Microsoft is doing a similar thing with Silverlight and the Olympics, MLB, NetFlix, and others.

It doesn’t matter how cool your technology is, if key players are not developing for it, then users won’t have any reason to move to it.

Leveraging the “2.0” Trend

Everything “cool” right now is “2.0” – whether it is Web 2.0, Learning 2.0, etc.  Now there is the iPhone SDK 2.0.  Most developers who wanted apps on the iPhone had to create Safari/Web based apps that fit well on the iPhone browser (and this will continue). But now what is touted as an “entirely new platform” enables full APIs (down to 3D graphics, and “presence”) for developing applications.

“2.0” isn’t coming, it is here – BTW, stop calling everything “2.0”

Internationalization

It has been largely possible to develop good web sites, and have them be very successful, using only American English.  Some/few sites have worked to become multi-lingual in other primary languages. Apple made it clear that the iPhone will have support world-wide with versions and cell phone carriers in 70 different countries. 

Developers need to think about multi-language support from the very beginning of applications.


Lessons from Keynote #1: Bill Gates

Posted on June 10, 2008 06:04 by Admin

There have been two interesting keynote speeches in recent memory: Bill Gates at TechEd, and Steve Jobs at WWDC.  They both reflected on the current state of technology, made predictions, and made announcements.  So what of lasting value came out of what they had to say, and how might this impact choices being made for the future?  I’ll give you my $.02 worth on both of them, and see what you think as well (and I’ll try to fix the Blog comments to get some feedback too).

Let’s start with Bill Gates (transcript).  Perhaps the most notable thing coming out of Bill’s keynote is that it will be his last as chairman of Microsoft.  I’m sure he’ll be talking in the future, but not in the same capacity.  What effect might this have on the future of Microsoft?  How much impact has he had in the last few years as chairman, and in what areas of the company?

Continued Increases in Performance

The new trend for increased performance is no longer increases in chip speed (i.e. number of instructions per second).  Now the increases will largely come from having many different cores and processors doing work together in a single machine or on a single chip.  Also, there are systems working together across different machines, even out across the Internet.  Today’s programs aren’t written to take advantage of this Parallel processing and Cloud computing.  New techniques, tools and frameworks will need to be built in order to take advantage of these new resources, or else fall behind.  Sun’s John Gage quote, and Sun’s motto, “The Network is the Computer” is turning into “The Network is the CPU”.  Programmers who don’t learn how to segment and separate their code for distributed processing will soon find themselves at the same disadvantage as those that couldn’t move from procedural programming to event-based and object-oriented techniques.

Changes in Interaction

A big theme in this talk was the future of human-computer interaction.  Now our input devices are basically keyboard and mouse and to a certain extent pen.  The future is all about “natural interfaces” like touch (and multi-touch), voice, and vision. Star Trek, especially The Next Generation, seemed to me to have a nice balance in their technology user interfaces.  There was voice interaction, tactile/touch LCARS screens, and pen-based PADDs.  The Microsoft Surface touch technology, now being demoed for Microsoft Windows 7, could easily implement LCARS.  iPhones have done PADDs even one better by including the communicator.  Really the only illusive technology is the voice-recognition, which is still very hit-or-miss with today’s technology.  The vision systems have a lot to offer.  The Wii implements vision and 3D motion in their controller to great success.  The main lesson here is that developers who do not spend some time looking beyond simple point-and-click and keyboard input may also find themselves falling behind.

Robotics

The last thing that struck me was a seemingly larger commitment to robotics than I have seen from Microsoft before. In a sense robotics is extending the range and type of outputs in much the way the “natural interfaces” were extending the inputs.  They made the interesting comparison between the robotics development environments today and the computer programming environments 30 years ago.  Developing for robots means developing for a mobile system.  It means being able to process a wide variety of sensors and inputs and make decisions quickly.  It also means programming routines that are constantly running (e.g. keeping the robot balanced, monitoring the environment, etc.) and that run independent from one another.  On interesting component in the Microsoft Robotics Studio is the very sophisticated simulation environment.  What it means is that people can create programs for very expensive or dangerous robots and run a variety of tests and actions without ever needing to test on the actual hardware.  In fact Microsoft has started a Robochamp competition to see how well people can do at programming robots in large-scale scenarios (e.g. DARPA urban challenge, Mars rover, etc.) without needing the hardware (or getting to Mars).  In a sense this is disappointing because you don’t get to do the engineering and inventing of the robot (which LEGO Robotics folks will tell you is more than half the battle).  But in another sense it means the people with a simple download can get a flavor of what this type of programming is like without a huge investment.

Creating programs that talk to a wide variety of peripherals and take input from many sensors is an important trend here.  And learning to program and test in a simulated or virtual environment is also a good thing to learn.  All-in-all I think this was a very good breakdown of some of the challenges facing developers today.

Next we’ll look at Steve Job’s perspective …..


How I Got Started in Software Development

Posted on June 6, 2008 07:34 by Admin

Continuing the How I Got Started Meme… cool idea, get to know the TwitterTribe better (and others)

How old were you when you started programming?

Wrote first program at 11 - BASIC 1.0 on Commodore PET

How did you get started in programming?

In grade school I was most likely ADD, so when I got done with my school work early I was a bit "high-maintenance".  The teacher's solution was to send me to the library and let me be someone else's problem.  Fortunately the librarian was great and always had stuff to do, books, filmstrips, etc.  Then one day the Commodore PET arrived and I lost 2-3 hours a day for the rest of 6th grade.  The sample apps were fun to play, but I wanted to see how they worked.  Some apps were "protected" but many others you could see the BASIC code.  A few books and a text-editor later, we were on our way.  Wrote several semi-complex apps, but they were pretty juvenile.

What was your first language?

BASIC 1.0

What was the first real program you wrote?

First of any length was a "Lord of the Rings Adventure" game, modeled loosely on some of the Scott Adams Adventures that were poplular at the time (e.g. Adventureland, Pirate Adventure, etc.).  It was text-only (i.e. a "console app" for younglings) even had a basic parser (bunch of nested if/thens) - AppleSoft Basic.  Even made up some disks of it to sell as "shareware".  Never sold any - gave a couple away.

First program I ever got anything for was a simulation of a beam of light bouncing off a parabolic mirror for the Cranbrook Institute of Science.  They had a huge (4-5 foot diameter) parabolic mirror in one of the exhibits and wanted to simulate how the beams of light went into the mirror and back out.  The program used Apple ][ "hi-res" graphics and a game paddle (PEEK/POKE) so you could move the beams of light around and watch how they moved across the screen, off the mirror, and all went through the focal point.  Hardest part was drawing the parabola.  All I got for it was free admission and access to some of the "backroom" areas of the museum - it was worth it.  Funny thing was when I went back years later the mirror was gone but the Apple ][ was still there (as an exhibit - sigh).

What languages have you used since you started programming?

I'll define "used" as writing 2 or more programs, over 1000 lines of code.
BASIC (many variants), 6502/68000 Assembly, Pascal (several), PAL, Fortran 77, Modula-2, C, Objective C, RPL, AppleScript, HyperTalk, Mathematica, Javascript, LOGO, Iptscrae, Perl, SQL, Java, ActionScript, VBScript, VB.NET, C#, NXT-G

In the "hello world, up and coming" list are: F#, VPL, PHP

What was your first professional programming gig?

The first full-time (summer) job where I got a paycheck was at the Masonry Institute of Michigan.  They needed a Novell 2.11 server installed, Baseband wiring for a network, and mostly a shared database server application.  This was a Paradox database, which meant I spent a few months learning and programming some pretty complex apps in "PAL".  There are still some nice things you could do with PAL that are much more complex to do today.

The next summer I got paid as a research assistant programming quantum-mechanical wave functions in Fortran 77 on a Cray YMP Supercomputer.  The Cray was in California and we connected first via 300 baud modems, and later over this new "Internet" thing.

First full-time professional web programming job was using SuiteSpot with LiveWire Pro from Netscape Communications Corp to code in server-side Javascript.  You got to use Navigator Gold to edit source files which it actually compiled up to the server.  There were objects to maintain state and the suite included Informix to contain application data.  We used Oracle for some data from customers as well.  We used both Solaris and Windows NT 3.51 (with Netscape's HTTPD server, not IIS 1.0).

If you knew then what you know now, would you have started programming?

Yes. No regrets.  I might have taken computer programming "seriously" a bit sooner (I guess implying I take it seriously now).  It was always more of a hobby.

If there is one thing you learned along the way that you would tell new developers, what would it be?

Code a little every day, and use a new language or framework whenever you get a chance.  But, take a day off a week and unplug and go off the grid for a while with real live people, friends, family, nature, etc. and do things.  If it needs batteries or a plug, let it go for 24 hours.  Even just in practical terms, completely letting go of tech regularly tends to "free up your local cache" and "defrag your life".  You might need to drag some others with you, kicking and screaming from their wired "life support", but they will thank you for it, in the end (you know I don't mean literal "life support" right - a metaphor).

What's the most fun you've ever had ... programming?

It's all fun, really, just different kinds of fun.

There is "Puzzle Solving" fun, learning something new, rendering a 3D Fractal for the first time, creating something that wasn't there before.

There is "I have Power" fun, typing in a command and having the computer "obey" you for the first time.  Even now programming a LEGO robot to "do my bidding" is oddly fun.

There is "Gaming" fun, writing a basic game that someone actually has fun/laughs using, playing games (Wii Mario Kart, is fun).

There is "Helping Others" fun, seeing a start-up or inventor/entrepreneur get their site up and running and start bringing in customers, fixing a family computer (again) so they can get back to whatever they were doing (fun for the first few times)

There is "Hacking Fun" taking things apart, putting them back together (sometimes), tracking a Wii controller via Bluetooth, making a touch screen, etc.

Any and all of these could justify an "all-nighter", and be a lot of fun.  There is a lot of "un-fun" things in our business, but most of the actual coding is really fun.


Community Clips

Posted on May 19, 2008 05:26 by Admin

I've been committing to get back to occasional blogging, in addition to following Twitter, so I wanted to see if I really could get out a 10 minute idea-to-blog post.

Here it goes.

I found this really handy utility on the "Office Labs" site called "Community Clips".  On the surface it is "just another screen capture utility" but I found it really handy.

Once installed it will capture the screen (or specified window) and record the input on the microphone.  So you can start recording, do a task you want to help someone with, and save the screen capture and audio down to disk.  The nice thing then is you can just upload that video and you are basically done.  The software will even automatically upload your video to the Community Clips site if you are demonstrating some Microsoft software.  Then your tips will join many others for the same product.  Since I didn't have a real worthy example, I just uploaded mine to Silverlight Streaming and YouTube.

This seems like a great way to do basic tech support or short instructional videos.  There are certainly much higher-end software for longer sessions, special features, editing, etc. - but for the quick one-off videos of this type I think a simple tool like this is ideal.

Below should be the samples - you'll need Silverlight for the top one and Flash for the bottom one.

And yes, this post, plus the video and uploads, fit in the 10 minute post goal!

p.s. The video is really boring - don't have a microphone set up right now.  Just me loading the Community Clips web page.  Just a technical test - but it works.

p.s.s. It is an interesting comparison of Silverlight Streaming vs. YouTube.  If you double-click the Silverlight version it will go full screen - at which point it is quite usable.

Community Clips


MVC Tips and Tricks from WMDoDN 08

Posted on May 12, 2008 00:42 by Admin

Over the next week or so I plan to have individual blog posts about my "favorite" demos in this presentation, but I wanted to get the PowerPoint stack and code samples out there ASAP.  I will definitely blog in detail about the SEOHelper, Blueprint CSS additions, jQuery Ajax (3 ways), and the MasterPage/BaseController/BaseViewData pieces. 

 

Where to get the current MVC builds

 

Blog posts, forums, etc. where many of these ideas/solutions came from

 

Projects, resources, etc. where many of the libraries came from


Day 1 - Festival of Faith and Writing 08

Posted on April 17, 2008 14:05 by Admin

Well it has been quite a day - more than I ever expected.  But a little background first.  Every two years (i.e. the "even" years) since 1990 there has been a conference called the Festival of Faith and Writing, this is the fourth time I've been able to attend. 

Over the years they have attracted great writers, presenters, artists, publishers, editors, etc. (e.g. Updike, L'Engle, Weisel, Dillard, Rushdie) and this year is no different.  Tonight's keynote was Pulitzer Prize winning author Michael Chabon (The Yiddish Policemen's Union, The Amazing Adventures of Kavalier & Clay, McSweeney's Enchanted Chamber of Astonishing Stories).  It was really an inspiring message, and was not at all what I expected.  Tomorrow night's speaker is Yann Martel (Life of Pi) and Saturday night is Katherine Paterson (Bridge to Terabithia, Jacob I Have Loved).  This is after a full day of shorter topical sessions that are also very good.

But why am I here?  I don't write like I used to.  I previously co-wrote a few computer textbooks and labs for teachers and students in the early 90s and monthly educational technology articles for 9 years, through 2006.  But really nothing now.  Should I continue using two vacation days and a lot of time to attend this conference.  After today, I'd have to say an enthusiastic "yes".

The reasons I am eager to attend are varied but mainly include getting out of my "comfort zone" for a short time and experiencing a culture and community in a depth that can rarely be seen in any other forum.  While attending a "reading" (Shauna Niequest reading Cold Tangerines) this morning I realized that I was perhaps only one of 6-7 men in a room full of women of all ages.  I decided that this may be the location of all the women who were notably absent at all the technology conferences I attend.  This is not to say anything bad about men or women - in fact let me make an open invitation to any women who would like to attend our upcoming Day of .NET 2008 on May 10.  Even if it is "sold out" (still free) I'll find a way for you to get in if you want to check it out.  To hear her read one of her very funny and insightful essays (that somehow included childbirth and road rage) was something special and kicked of the day rather well.

But the variety of the day was just getting started.  Next Mary Gordon (Final Payments, Men and Angels) discussed "Is Fiction Moral?" which lead to a thread the rest of the day about whether art/writing/etc. is fundamentally "good".  She added a long experience in writing since the 70s with a feminist and troubled Catholic background, to bring together yet another background and culture I don't interact with much.  Next Gary Schmidt shared experiences of dealing with issues of race, economic inequality, broken trust, failed leaders. How a child goes from a world of "run spot run" to one of beginning to understand issues of vocation, economics, politics, aesthetics and relationships - none of which have easy black-and-white answers.

One more main session left, then the keynote at 7:30 tonight.  My mind is already buzzing in parts of my brain that get sadly little use otherwise.  But next is a presentation by Jon J Muth who is an artist/illustrator of children's books like Stone Soup, The Three Questions, Zen Shorts (NYT Best Seller, Caldecott Honor) and Zen Ties - not to mention drawing graphic novels like Niel Gaiman's The Sandman: The Wake and J.M. DeMatteis' Moonshadow. Muth is a very talented artist with traditional graphite ink-brush.  Half of his presentation was in demonstrating his craft both drawing an intentional object (an elephant in this case) and in letting the drawing come from the strokes themselves.  A practicing Zen Buddhist and artist, he explained how his beliefs, craft, and the experience of the birth of recent twins, has shaped his current work.

I'm now on experience and information overload, so I head home to have dinner and a short nap before the keynote (which I can do because I live less than a mile from the keynote location).  Finishing the day with a well prepared and executed essay and talk by Michael Chabon capped off the day nicely.  He recounted his personal experiences as a Jew in search of an identity, as well as being a child with an amazingly active imagination and unnatural taste for genre fiction.  He led us through a winding path through a book he found almost by accident "Say it in Yiddish" which lead to an amazing amount of introspection, creativity, conflict, and ultimately his novel The Yiddish Policemen's Union. It was an amazingly humorous, but also touching and personal account of his experiences which have led to his numerous writings.

I have no idea how processing all of this will impact my "real job" or "real life" but to hear essays about childbirth, discussions of morality and truth, feminism, race, politics, inequality, art, Zen, and the lost Yiddish language and culture have all given me unique perspectives that I would otherwise have not had.  Two more days of this, and some reflection, and we'll see how this can be applied in my current endeavors.


I don't have time to post much this morning, but I wanted to get this out.

This Saturday (March 22, 2008) we attended the West Michigan FIRST Robotics Regional Competition over the weekend.  I'll post a couple pictures, and my first YouTube video (from my digital camera - came out pretty good).  I'll add some commentary and thoughts about it all very soon.

We got to the competition with the preliminaries already underway.  The rules are quite complex, but here is a link if you are interested.

robo_arena

Then we visited the "pits" where many of the teams were willing to show us their robots close up (safety glasses please) and explain how they worked (and give out their team pin - which were cool to collect).

robo_wobot

This is the "WO-Bot" from West Ottawa High School (near Holland) - this was Nathan's favorite as it tossed the ball over the divide.

I went through all the pictures and they really don't give you a feel for what went on there.  I added the YouTube video below to see if that would help.

Lots of lessons and ideas came out of this day.  More to come.


Cool Tools: Window Clippings

Posted on March 18, 2008 00:31 by Admin

Another tool I use almost daily for documentation and presentations is Window Clippings, by Kenny Kerr.  There have been screen capture utilities out there since ... well ... since there have been screens, so why is this one different?  There are several reasons.

First, as with other really useful tools, Window Clippings integrates seamlessly into your system and just seems to become part of the operating system.  I hit "PrtScrn" and get Window Clippings.

Second, it does the most common things I need with a simple click of the mouse.  Most often when doing a screen capture you are selecting an entire window - Window Clippings knows this and lets you select a window directly.  Also, it is "Vista Friendly" - what I mean by this is that Vista introduced all kinds of transparency and "Aero" features which can lead to other windows (or your desktop) bleeding through transparent areas on windows that end up in your screen capture.  Window clippings isolates the window clears whatever is behind the window from the screen capture.  Nice clean window capture.  After selecting a single window, the most common thing I need is to capture a section of a window (or the entire screen).  Window Clippings lets you crop or expand the capture area before you capture the image so you only get what you want.

Third, Window Clippings gives you options of what to do with the captured image.

image

You can copy the image to the clipboard, save the image to a file (even pick the file type - PNG, JPEG, TIFF, BMP), and even add a "post-save event" to post-process the image once you have taken the picture (never done that - sounds interesting).

The last thing I really like about Window Clippings is the ability to set a time delay before the picture is taken (kind of like the timer on a camera).  This lets you set up things like opening menus initiating pop-up windows or other "strange behavior" on the computer that you couldn't capture with a keypress (i.e. the keypress would either not get through or would take focus away from what you were trying to capture).

There is a free version that implements many of the functions and may be enough for some people's needs.  I dropped the whopping $10 for the full version (adds cropping and time-delay, and more).  I can easily recommend this tool to others.


I know Spring Breaks are coming up (or in progress) and people are heading for Florida.  Having just gotten back from a great trip there, I wanted to share a few more things we found there that greatly exceeded our expectations.  This one is Honeymoon Island and Caladesi Island (both Florida State Parks).

If you are on the "gulf side" of Florida, and anywhere in driving range of the Clearwater Beach / Tampa area, this one may be for you ...

image

The first thing you will notice about the islands is how (relatively) few people will be there (compared to Clearwater Beach or other public beaches).  This is for, in my opinion, three reasons.  First, it is out of the way a bit - you need to drive a little ways to get there, and it is away from any major city.   Second, there are no hotels, motels, restaurants, bars, etc. on the islands - bring a lunch/drinks with you (or settle for the "snack bar" type food there).  Finally, you have to pay to get in - only $5 per car to Honeymoon Island, add $9/adult and $5.50/child to take the ferry to Caladesi Island (yes you can only get there by boat, but it is worth it (see below).  My point is, you need to make an effort (in driving and money) to get there which many/most people will not do.

imageSo why is this place so great?  Let's start with the obvious - it's the #2 rated beach in the country (and stands up to that rating).  I've been to Coco Beach, Daytona Beach, Hilton Head Island, Clearwater Beach, Grand Haven, Sleeping Bear Dunes, and a few others and I can say that Caladesi Island is the nicest beach I have ever been to, by a significant margin.

imageNext, since it is a State Park they have done a lot to not only protect wildlife, but also guide you to see it.

At the entry of Honeymoon Island there is a nature center / ranger station.  There they had a huge deck with a bunch of spotting scopes where we could see herons, egrets, owls, hawks, tortoise and a bunch of other wildlife (even a Nine Branded Armadillo).

The tide was heading out as we got there, and there were more shells (empty and full) than we saw in all our other "shell hunts" combined.  We found many sand dollars and great samples of all kinds of other shells.

imageOne of the ladies that worked there had found a stranded (living) starfish which we put in a pail and watched for a time.  We put him/her/it back out deeper in the ocean before we left to live another day.

They had kayaks to rent as well as chairs / umbrellas if you wanted them.  This is nice as you don't have to haul your own over on the boat, or lay on the sand for 3-4 hours.

imageI forgot to mention that. The ferry to Caladesi Island leaves from Honeymoon Island every hour (or half-hour).  The ferry holds about 30-35 people.  Now the only way off the island is the same ferry going the other way, but there isn't room for everyone who came out during the day to head back after sunset.  So you get pre-booked on the return ferry that leaves four hours from the time you came over.  We came over at 11:30 so we were pre-booked on the 3:30 return ferry.  You can show up for an earlier (or later) ferry, but those who are pre-booked for the return ferry get preference.  So you may have to wait 30-60 minutes for the next ferry if it fills up.  They will run until everyone gets back, but they try to make each run as productive as possible.

So, if you like a great beach, nature, shelling, sunshine, boat rides and a little adventure - then this might just be for you.

Enjoy - let me know if you go - we can share some more stories.


Cool Tools - ZoomIt v1.8

Posted on March 11, 2008 04:45 by Admin

I occasionally run into some cool software tools that I end up using a lot, and wanted to blog about them.

I have a few that I want to post soon - here is the first.

imageZoomIt is a simple free utility developed by Mark Russinovich at Sysinternals and distributed by Microsoft.  It basically does three things, and only three things, but it does them very well.

I use ZoomIt primarily when doing presentations (on a projector or working with several people on a single computer).  When you press a pre-determined key sequence (Ctrl + 1 as a default). The screen will zoom in 2x centered on your current mouse location.  It is a nice animated zoom that clearly shows what is being magnified.  If you want to increase (or decrease) the level of zoom you can use the mouse-wheel or up/down arrow keys.  Hitting the ESC key or right-mouse button returns you to normal operation.  This enables you to quickly zoom up on some text or controls that may be too small to see (or see well) on the screen.  This is allI use ZoomIt for 95% of the time.

But for completeness there are two other functions that exist.  The next is "Draw" mode.  This is kind of a "John Madden" draw-over markup of the current screen.  If you want to highlight, circle, point to, or even type on the screen (in 5 fabulous colors) you can with this function.  It will remind you of working with a very limited paint program, but can be very effective at drawing attention where you want peoples attention (bad example below).

image

You can also type "w" or "k" to wipe out the screen and turn it in to a temporary whiteboard or blackboard.

The final thing that ZoomIt will do for you is pop-up a timer in the middle of the screen.  It is a no-nonsense block of red text on a white background that will count down the seconds for the amount of time that you set.  It defaults to 10 minutes and you can use the mouse-wheel or up/down arrows to adjust up or down the number of minutes.  This is useful if you want to start a presentation on time (i.e. a count-down timer to start), or take a 10/15 minute break in the middle of a presentation, or give your audience a specific amount of time to complete a particular task.  Again, a very simple no-nonsense approach, but well implemented if this is something you need.

ZoomIt v1.8


Looks like at least one announcement got out before the MIX'08 conference even started - and it is a big one.

I am eager to see how this plays out, but it looks like now software developed in Silverlight will be able to run on Nokia Series 40 and S60 phones (which is quite a few phones by the way).

I'm not sure what (if any) subset of the features will be available on phones, and what type of Internet connectivity you can get, but the ability to now easily develop cellphone applications (on non-Microsoft OSes) is really cool.

So how do I get started?

Microsoft, Nokia Put Silverlight On Mobile Devices -- Cell Phone -- InformationWeek


gam_legohaloegamscanfake_490 

If you care about LEGOs and/or Halo you might read the links to this story first before proceeding .....

 

OK, still here - you can always tell a great joke when (1) a person (or persons) really falls for it hard, and (2) it is pretty harmless and in good fun - this one is/was both.  But what I am wondering is, has an April fools gag ever gone on to be actually true?  I mean the reason people fell for this (and I was starting to believe it as well) is that making a LEGO Halo game would be an awesome idea.

Forget the fact that they are completely different audiences (kids vs. adults) and come from game publishers that are in direct competition.  Mixing "M-rated" content from a game into the LEGO world would probably never happen - they had to take all the bad guys out of the Raiders of the Lost Ark series, for example.  So you'd have to suspend all reason to make this work, but it would be cool.  Especially if it was as well done as the Star Wars LEGO games.

April issue of EGM reveals Bungie's next project: Lego Halo - Joystiq