smlunit hello world – with a python dependency

Three years is long enough to forget a lot so I managed to forget that I got this working with python shortly after writing this blog post. Writing this down so I don’t forget again.

  1. Download the smlunit github project. (at a minimum you need the smlunit file and the lib directory)
  2. Download the asserts file and put it in your directory (or elsewhere and refer to it from there)
  3. Write a simple function in a file named helloWorld.sml:
    fun hello(name : string) = "Hello " ^ name
  4. Write a simple test in a file named helloWorldTest.sml:
    use "asserts.sml";
    use "helloWorld.sml";
    assertEqual "hello" (hello("Jeanne")) "did it work?";
  5. Run it:
    Jjeanne$ ./smlunit helloWorldTest.sml 
    did it work?..........................................................FAIL
        Expected: "Hello Jeanne"
        Actual: "hello"
    Ran 1 test in 0.204 seconds (1 failure)
  6. It didn’t work! Fix the expected string in the test (should be assertEqual “Hello Jeanne”…
  7. Run the test again
    jeanne$ ./smlunit helloWorldTest.sml 
    did it work?............................................................OK
    Ran 1 test in 0.207 seconds
  8. Success!

why i usually like books over video

A teammate was discussing the “wonders of learning from video” yesterday.  Which got me thinking.  I generally like learning from books/articles best.  This would be text with illustrations/diagrams, not raw text.  I like reading better because:

  1. It is easier to go at my own pace.  (While you can speed up video, it takes more energy to listen to fast.  And I don’t want it uniformly fast. I want to be able to stop and re-read.  Which is a pain on video.)
  2. I find it easier to find information in text.
  3. I can later search text if electronic.  Or have “physical presence” cues if hard copy.

That said, I’m enjoying some of the MOCC courses online.  Some being the operative word.  A video has to be done right to be good.  (As does a book; it’s just that books tend to go through more editing.)  I’ve noticed that the videos I like tend to be less than 5 -10 minutes in length.  With quizzes or exercises in between or in the middle.  I think the interaction helps.  It is easy to see if I understand what is going on so far.  And to revisit select parts.

Live/in person video doesn’t have the negative side effects that recorded videos do for me.  I think that is because the presenter can adjust real time.  Either by seeing reactions or looking at visual cues or answering questions.  It still feels interactive even if a high percentage is lecture.

When creating documentation

When looking for general information, there are many forms and it is relatively easy to pick the format one desires.  (Although books are more common than videos on specialized topics.)  In a company, the cost to produce internal documentation often precludes doing both.  It’s also harder on the creators to do video because:

  1. Content needs to be searchable (I suppose a video transcription could allow this.)  This is the same reason text in an image should be available in pure text as well.
  2. Producing content for video consumption is very different than merely recording an in person training session.  The focus is different.  The “real time clutter” needs to be removed.  The screen needs to be shown with a different emphasis.  It’s not something to just do on a whim.
  3. Video can’t be watched while on hold, on a conference call, etc.  Granted these aren’t the ideal times to be learning, but it does happen.  Again subtitles could help with this.

What do you think?  How do you balance text vs video for technical content?