All posts by admin

More Screencast Production Technology

Videoscribe: creates animations of hands scribbling text. Could be used to produce an attention grabbing moment in screencasts and/or videos. Subscription based model at the rate of $25/month, which seems excessive to me. I’d have to have hard evidence that the scribbling hand animation produces a significant cognitive impact that justifies the expense. Since the data is certainly not coming, I’m not buying.

ScreenFlow: easy to use, great alternative to record and edit screen casts all in one package. Costs $99, but it is definitely worth it. It seems to me, so far, that I have to record the entire screen, but cropping the video is easy and fast. The time that it takes to render the video, with very good quality, is incredibly shorter than what you get with iMovie. You can annotate the videos easily. I can easily add stills into the movie, if I want. This means that I can simplify the workflow I had before where I generated stills from Keynote/PowerPoint slides to insert in the iMovie project. I say ‘simplify’ because my previous workflow included several steps involving SnapzProX, Keynote, and iMovie. I can now do it all with just ScreenFlow.

Mouseposé: this is a really neat program to give your mouse cursor better visibility in screencasts. I bought this for $4.99 from the OS X App Store and it was definitely worth the price. It seems to be available for free, possibly even legally on the web. Works nicely with ScreenFlow.

Camtasia: another alternative for screen recording and editing, with a $99 price tag. Available for both Mac and Windows. I haven’t tried it and probably won’t since it replicates much of what ScreenFlow is doing nicely for me.

Screenium: I didn’t love this any more than my previous workflow of recording with SnapzProX and stitching short clips together with iMovie. I know of people who really use this well and love it, though. This is more affordable than other options costing $40.

 

 

Flipping Out

I’m going to start creating some content for ‘flipped classroom’ activities and I’m collecting ideas on methods for generating materials and pedagogies. If you have any suggestions, I’d enjoy hearing from you.

As of right now, I’m evaluating different iOS and OS X technologies that I might leverage for the creation of video (primarily screencast) content. Here’s an incomplete list of what I am looking at:

I thought that it would be simple to run through Keynote (or MS Powerpoint) slides while capturing the screen with SnapzProX. As it turns out, there are a few “tricks” to keep in mind. First, there are certain options with SnapzProX that I needed to adjust: record the microphone track, make the cursor visible (so that I could use it as a pointer), and record the computer’s audio track, whenever it made sense. Second, there seems to be a bit of a gotcha I need to work out: when I record a running slide show, I don’t really capture what is on screen. What I end up with are blank (black) screens and a voice over. (When I start the slideshow and then activate SnapzProX, there seems to be some contention for screen access.)

My solution, so far, to generate the content I need was to record small movies from me using a shell and/or text editor, export each of my Keynote slides as an individual PNG image, and use iMovie to piece everything together. The short movies have voice over (recorded together with the screen), but the slides that appear in the iMovie-edited full product have a bit of silence. Generating content can be tricky, but it’s not rocket science. Since a lot of the content seems to take the shape of movies, in particular screencasts, it’s good to keep in mind what not to do.

Mastering the content production technology is nothing if you don’t know how it will impact your teaching. Here are a few interesting pointers that help you reflect on the whys and hows:

  • http://flippedclassroom.org/
  • http://www.edutopia.org/blog/flipped-classroom-best-practices-andrew-miller

Hooked on hooks

I’ve been pretty impressed with what modern source version controls systems are able to do ever since Bryan Ward introduced me to git. (“Introduced me to git” is not strong enough, it’s more like “forced me to use git” and I couldn’t be more grateful to him for that!)

Among the many features of git that I love, one that it has in common with Mercurial, is the ability to customize hooks. One can define shell scripts that are executed when certain events happen. Bryan set one of these up to generate HTML pages from documentation in RST files we had for a project. Every time we pushed to the project’s git repo, the hook would run the command to update the HTML pages and our online documentation was always up to date.

Obviously, hooks can be used for much more than that. One use that I like a lot is running tests on code before you commit. This can protect programmers from poisoning the code base (or looking less than smart to their colleagues). Another one is to set up email notification to a group of people every time there’s new commit. All in all, this business of hooks is a great idea that can address a number of interesting issues.

More on the specifics of setting up git hooks are available here.

Document translation

The moment you start writing a document, you get that nagging feeling that you made the wrong choice of format.  Sooner or later you end up having to convert everything you wrote to another format. Today, I discovered a tool that will get rid my choice anxiety and the hassle of manual conversion.

I was looking around for automatic converters from LaTeX to rST and stumbled upon Pandoc. It took me all but one minute to download, install, and run it on my document. (Ok, maybe two minutes.) And I’m pretty happy with the quality of the job.

Decorators

One of my great weaknesses is that I know next to nothing about object oriented design patterns (as in the Gang of 4 book). By “next to nothing”, I meant that I understand singleton and can even see when it’s needed or useful, but then again, everyone knows at least that pattern.

Today, my research student Chris Main called my attention to a piece of Python code using the Fabric library, which mentioned decorators. In a moment of “holy ignorance, Batman!”, I thought that although I didn’t know what a decorator was, I knew it was a design pattern. And I felt good that, at the very least, I knew what the concept was. And how awfully mistaken I was.

A decorator design pattern is one which means to change the behavior of an object at run time, by extending its functionality, without changing the other instances of that class. In Python programming, decorators are not quite the same thing: they are a type of syntactic modifier that is meant to change a method or a function. Wikipedia seems to have a good explanation of the two concepts:

How to not sell something

My wife asked me to go to Lowe’s and look at tiles and a shower door. I agreed with the proviso that we’d also make a pit stop at <Store X>, so I’d do some research on HDTV options. We entered the store and my kids immediately went to the PS and Wii demo stations, while my wife went to look at refrigerators. My Y chromosome enabled me to keep my priorities straight so I went directly to the big screens.

<sarcasm>As I looked around, there came the ever helpful salesperson of the day.</sarcasm> It was an interesting encounter. Being a weekend afternoon, I was dressed as a common slob in shorts, a 7-year old t-shirt, and a baseball hat. I had left my pompous, intellectual, professorial air at home, so to all intents and purposes, I was just your average person. The conversation between 20-year old Mr. Sales Dude and I was enchanting. It started with me asking a few simple questions about brands, LCD vs. LED-LCD screens, and WiFi connectivity then it quickly moved into strange territory. I got no answers to my questions, but I somehow ended up stating that I wasn’t looking to spend more then X dollars. At this point, Mr. Sales Dude went on to ask if I was buying my first HDTV, stating that he’d bought several already, that my budget would have to account for the purchase of some incredibly awesome HDMI cables at $8o a pop, a power line conditioner to protect my investment, a Blu-Ray player, a few hundreds of dollars worth of a multi-year extended warranty plan, and some additional evidence of his amazing knowledge of consumer electronics that were only somewhat tangential to my research. He didn’t have any inkling that my understanding of digital data transmission and electromagnetic shielding rendered much of his speech null and void. I was left with the impression that, after I challenged his knowledge, Mr. Sales Dude wanted to convince me that I couldn’t afford to buy and HDTV and that I should just leave.

This reminded me of an incident in the heyday of the late <Store Y>, many years ago. I was a budget-minded grad student dressed in jeans and flannel, who had gone in to shop for a good amplifier. As I was getting the long, smart speech from the salesperson, I made the mistake of interrupting to ask what was the total harmonic distortion of a certain model. The conversation was brought to a grinding halt and I was sent to the back of the store to have someone fish out the manual so that I could go dig for the information.

I’m not sure what to conclude from these incidents other than:

  1. Customers who ask for technical details that are not part of the salesperson speech shall be ignored for they are likely to not be awed by the knowledge of store employees.
  2. Customers who don’t look like they are going to spend a lot are not worth the salesperson’s time. This time, however, at <Store X>, after I did a lap around the store and came back to the TV section, I ended up having a very informative conversation with another salesperson and left the place with the sense that there’s still hope for the human race.
  3. Consumer electronics stores that provide good, knowledgeable service in the beginning of their business won’t necessarily keep it up. The delivery of pre-canned speeches by salespeople might signal the start of the downslope toward irrelevance and eventual bankruptcy. (Correlation or causation? I really don’t know.)

PS: Store names have been omitted from this story so that no one will have direct evidence that it is their business which needs to improve service or finds clues as to what might have led them to lose so many customers that they became inviable.

La raison de “to blog”

I heard Twyla Tharp at the Bucknell Forum last night. This year, the forum’s theme is “Creativity: Beyond The Box” and it should appeal to everyone who cares about making a contribution to this world. I’m a computer scientist in the general areas of simulation and systems, both of which can use creative professionals, and in my teaching and in my scholarship, I have the tendency to look for what hasn’t been done before.

We can always rely on the successes of the past to figure out how we should go about a certain task. It’s not always positive, though, to keep on replicating the successful model. The world has a way of changing constantly around us and even the best solutions get stale after a short time. In teaching, for instance, what worked last year with a certain group of students, might not be effective with a new group of students. It’s important to be perceptive about the current circumstances and to be bold, creative, and agile at trying out new ideas. Sometimes, even the smallest tweak yields the greatest delta of improvement on what one does, so I find it essential to keep looking for ways to innovate.

Tharp spent about an hour talking about two of her books: The Creative Habit: Learn It and Use It for Life and The Collaborative Habit: Life Lessons for Working Together. Throughout her lecture, I found that the lessons that this accomplished choreographer was trying to convey had been deliberately chosen to have maximum impact on me, for they related very much to my current work. I enjoyed the discussion on how we experience “blocks” for getting lost in the myriad possible alternatives to do something optimally, for having fear that we’re not being innovative enough, for having fear that we will be judged by the experts who came before us. I also enjoyed the discussion on how we can push ourselves to produce something novel in a pinch.

Near the conclusion of her lecture, she dropped an idea that took me back to something I was asked about recently: “What is the point of blogging?” In Turning Back the Clock: Hot Wars and Media Populism, Umberto Eco argues that we might blog (or tweet, if we’re into the micro-thing) because of an overinflated sense of self-importance. It’s all an ego trip. The web has given us all (us on this side of the digital divide, that is) our private soapbox. Tharp, on the other hand, argues that everyone has something to say and that we should put it out there. That something, that tiny little thing, might end up being a needle in this humungous media haystack, but as long as we who blog or tweet have the means, why not “speak up”? From a more optimistic perspective, your blog might end up bringing great benefit to someone else.

I don’t write because I assume that people will read this blog (the data shows that most of my visitors come here for spamming, after all). I blog first and foremost for myself and second for others. You might understand this as a piece of evidence in support of Eco’s argument, but what I mean is that I enjoy having a record of my ideas so that I can revisit them later. It’s a checkpoint to enable future growth. In the unlikely event that I am being read, though, there it is: the best I can offer at some given moment is out there for public scrutiny and discussion. If the science/art of search engines ends up directing someone there, maybe they will take something positive from what I had to say or, even better, leave me a constructive remark/challenge/etc. How cool is it to be able to validate your ideas against those of other people?

Expect to find the most varied things here as I expose what I know, what baffles me, and what I’m ignorant about. As what applies to you: you do have something to say, I’m as sure of it as Twyla Tharp, so if you have the time and the means, blog or micro-blog away!

Creating a new module in ns-3

At times people create new functionality for ns-3 that takes the shape of module, that is, multiple files that implement various classes. If you’re looking for information on how to put together a new ns-3 module, you’ve come to the right place. I’ll walk you through a sequence of steps toward setting up your installation to build and recognize your module.

Step 1 – Create a directory for your new module

I’ll start the assumption that you are working with a tarball distribution – if you’re working with a mercurial repo, you’ll will know how to change the path names in this discussion. Say you want to create a new module for ns-3 and that you will want it to live in the contrib directory. This means your code will be in a path such as:

~/tarballs/ns-allinone-3.9/ns-3.9/src/contrib

For the sake of discussion, say your module is called “awesome”. Let’s further assume that it will live in a directory called:

~/tarballs/ns-allinone-3.9/ns-3.9/src/contrib/awesome

This is not just an assumption for the sake of discussion: it’s a requirement. The directory must have the same name as the module.

Step 2 – Tweak the build system

Before you write any actual code, let’s tweak the waf build scripts to take care of your new module. In a text editor, open file:

~tarballs/ns-allinone-3.9/ns-3.9/src/wscript

In this file, you will see a list of all the modules that the build system is already aware of. It’s appropriately called “all_modules”, and it will look like this:

all_modules = (
    'core',
    'common',
    'simulator',
    'contrib',
    'node',
    'internet-stack',
    'devices/point-to-point',
    ...
    'mpi',
    'contrib/topology-read',
    'contrib/energy',
    )

Add your new module to the list (perhaps at the end), so that it reads:

all_modules = (
    'core',
    'common',
    'simulator',
    'contrib',
    'node',
    'internet-stack',
    'devices/point-to-point',
    ...
    'mpi',
    'contrib/topology-read',
    'contrib/energy',
    'contrib/awesome',
    )

Next, change to the directory where your module lives. Following the pattern in this example, that would be:

~/tarballs/ns-allinone-3.9/ns-3.9/src/contrib/awesome

Now, create a new file called wscript in this directory. This file will state for the build system a complete list of your implementation (.cc) and header files (.h).

## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-

def build(bld):
    obj = bld.create_ns3_module('dcf', ['node'])
    obj.source = [
          'one_of_your.cc',
          'another_of_your.cc',
          ...
          ]
    headers = bld.new_task_gen('ns3header')
    headers.module = 'dcf'
    headers.source = [
         'one_of_your.h',
         'another_of_your.h',
         ...
    ]

Step 3 – Implement your module

By now, you have set everything up for the build system to create code for your new module. You might already have started on the development of the .cc and .h files for your module, but otherwise, you ready to start working on them. There’s more about creating a new module that I’ll address in a different post (I’ll come back to drop a hyperlink here when that is ready). For now, suffice to say that you’ll fall into the classic iterative pattern of software development: design, code, compile, run, and debug, repeating each of these steps as needed.

Remember that to compile, you will change to the directory at the root of your ns-3 distribution, which in our example has been:

~/tarballs/ns-allinone-3.9/ns-3.9/

To build in your new module, you do:

./waf build

If all goes well and your code compiled flawlessly, you can check out the fruits of your labor. Take a look at:

~tarballs/ns-allinone-3.9/ns-3.9/build/debug/ns3

You will discover that this directory contains a file called awesome-module.h, which corresponds directly to your new module. This is an aggregator header file, that is, a single header file which end-user C++ programs must include to use all the features implemented in your module. (The aggregator stands in for possibly multiple header files in your module.) These end-user scripts will be able to use your module after one single #include, such as:

#include “ns3/awesome-module.h”

Note that the ns3/ part in the path to your include refers to the directory under:

~tarballs/ns-allinone-3.9/ns-3.9/build/

which contains all the headers for all the modules in your installation. Depending on your particular configuration, this directory may be

~tarballs/ns-allinone-3.9/ns-3.9/build/debug/ns3
or
~tarballs/ns-allinone-3.9/ns-3.9/build/optimized/ns3

Step 4 – Create examples using your module

Finally, once you’ve tested and debugged your module, remember to be kind to the community and to leave some working code that demonstrates how one can use your work. Consider creating a directory such as:

~tarballs/ns-allinone-3.9/ns-3.9/examples/awesome/

which should contain one or more examples of how to use your module.

Père Lachaise

I just visited Paris for the first time and had a very hard time coming back home. It’s a big understatement to say that I fell in love with the city. The delicious pastries, the amazing traditional bistro food cooked with passion, the tangible feeling of a long history everywhere you go, the excellent public transportation, the incredible museums and bookstores, … I could go on and on. I could see myself living a very happy life there.

When booking this trip (meant as an early celebration of our 10th wedding anniversary in 2011), I confess that I didn’t have many plans. Other than eating and walking all over the city, that is. Of course I might end up seeing the Eiffel Tower, the Arc de Triomphe, the Louvre, the Orsay, and all that, but I wasn’t really planning touristy activities. Whatever happened would have been fun, with one exception: there had to be one sure visit to the Père Lachaise cemetery. Why one would want to visit a cemetery on a romantic get away? You could probably try to psychoanalyze this to no end and you’d be wrong on most accounts, so I’ll give you a couple of clues.

First, Dead Can Dance is one of my all time favorite music groups (I wouldn’t call them a “band”) and one of their most intriguing album covers was from Within The Realm of a Dying Sun. Ever since I learned that this sad but beautiful artwork was a mausoleum at Père Lachaise (back in the 80’s), I vowed to see it in person some day. Second, back when I was studying photography in the 90’s, I used to enjoying going out to look for unusual angles on unusual subjects; in that search, I visited cemeteries that would have interesting artwork. One of them, was the Hollywood Cemetery in Richmond, VA. At first, I was just attracted by the look of moss covered, decaying stone or cement (yes, I used to listen to a lot of goth/darkwave music). Later on, though, I started to enjoy the sense of peace in those places and developed an interest, if not the reverence, for the history and the lives of the people in those resting places. There’s quite a bit of sadness in a cemetery, but there’s also a sense that someone’s life left behind something tangible for us to appreciate even in the brief history contained in a epitaph, in their dates of birth and of passing. The melancholy mood is there, of course, that sense that humanity as a whole was diminished by a life that was extinguished. I discovered, though, that when I close my eyes in front a mausoleum, I feel inspired by the known or imagined contributions that those people would have left behind.

I’m really glad that in the midst of our time in gorgeous, but tourist mobbed, loud, and often hectic Paris, Lisa and I took a couple of hours to walk around serene Père Lachaise. We agreed that it turned out to be a very inspiring time for both of us. We paid homage to Jim Morrison, which on that day had his tombstone draped with a Brazilian flag. The sight inspired me to revisit my Doors music collection and to watch When You’re Strange, a great documentary from 2009 (which was actually being shown in theaters in Paris this summer). We also visited Oscar Wilde, one of my favorite writers, whose mausoleum is covered by red lipstick imprints. We tried to find Brillat-Savarin (“Tell me what you eat and I’ll tell you who you are”, author of The Phisiology of Taste quoted on the opening of the original Iron Chef), but got lost in the process.

The part of the visit that got us really down was the section reserved to honor the victims of the WWII holocaust. The appropriately stark and harrowing artwork is a slap on your face that gets you out of whatever romantic reveries you might be entertaining and reminds you that mankind is capable of creating horror as well as beauty.

I say “NO!” to blog spam

I’ve been getting a lot of comments on this blog, which will never see the light of day. I made the decision of moderating comments to avoid people posting objectionable content, but I confess that it didn’t strike me as likely that some of that objectionability would be spam.

Interesting concept this one of “blog spam”. A comment listing some bogus email and a URL that shoots you off onto sites that sell counterfeit Chanel bags, or chiropractic services in the U.K., or something of lewd nature. The marketing concept is not totally absurd, if you would assume that the spam would be posted on high-traffic blog, where people actually would care to read comments to posts.

There are two flies in the ointment of those trying to spam this blog, though. First, as Gandalf said to the Balrog, “You shall not pass!” – comments are moderated here. Second, come on, do your really think this is a high-traffic blog?