Write LOGO Code…

January 6th, 2009 11:00 AM by Luke Maciak

As you may remember, this past semester I had my students do some very simple programming exercises in LOGO. The lab session could actually be considered a success since most of the students seemed to enjoy playing with the Tortue interpreter.

On the final exam I decided to include an extra credit question to see how many students have retained any understanding of that lab session. It asked the students to draw two squares of different color on the canvas and it was worth 10 points that would get added to the student’s total score. I wasn’t really looking for 100% correct solution - merely an attempt that would show some degree of understanding of the question.

Since the question was optional and also non-trivial, I expected many people to skip it. Surprisingly quite a few students answered it with a high degree of correctness. In fact, I was surprised that more people attempted to answer the LOGO question rather than a very similar optional question which asked them to write down the syntax for a HTML table. But perhaps it’s because the HTML exercise we did was right after the midterm, while the LOGO lab was 2 weeks before the final so it was still fresh in their memory.

Most of the answers were either correct, or close to be correct. Only one made me laugh out loud though. And it’s not because I’m an evil bastard and I laugh at students failure. It’s because it was a genuine attempt at humor. I decided to scan it in and share it with you:

lgogo_code2.JPG

Get it? I said “Write Tortue Logo code” and he did. Anyways, I found it amusing. I reminded me of the infamous find x problem that has been passed around on the Internets for ages now:

findx.JPG

Find x is so ancient it doesn’t even seem to have an original source. That is, I’m sure there is one but I have no clue what it could be because just about every blog, forum and image board has posted and re-posted it a hundred times over without any attribution. In fact, I have seen people claiming that this image is not actual genuine scan from a test, but just something that someone did as a joke. Perhaps, but the limited amount of teaching experience that I have tells me that it probably is genuine. Especially since now I have my own variation on the same theme.

The question is - was this a homage, or an original attempt at humor that just turned out to be derivative. Cause, as you probably know we have exhausted almost all original content left in the universe around the turn of the century (if not earlier) and almost everything that is being created now re-uses old themes, tropes and ideas. This is especially true for internet culture which thrives on memetics, repetition and self referential humor.

Electronic Test Taking

January 5th, 2009 11:23 AM by Luke Maciak

I’m a fan of technology. I believe that most things can be made better via automation, virtualization and all the other *-tions that introduce technology into equation. In most cases, if something is preceded by “electronic” or “online” it means better. There are exceptions of course. One exception is called shitty implementation and unfortunately happens roughly 70% of the time. It happens to every one - that’s why we have websites like The Daily WTF.

Then there are things that should not be automated, mechanized or put online. One of these things is test taking. I dislike taking electronic tests, and as a rule I avoid giving them. I simply think they do not work as well as most people think they do. Sure, they are easy to administer, easy to grade, and easy to generate and randomize. You can build a database of questions, rate them by challenge level, and randomly generate unique tests of equal difficulty ad infinitum. But I believe they are not entirely fair to the students who take them.

For one, students are trained to take paper based tests. In most schools and universities, nearly all exams are administered using traditional methods such as blue books, or Scantron sheets or simple printouts that students fill out by hand and turn in. When you ask them to take an online test, you are working against years of conditioning and test taking habits. They are faced with unfamiliar format, unfamiliar input methods and a new interface. In fact a lot of test taking engines introduce distracting or stressful features that may negatively impact final scores.

For example, some electronic tests like to display the test score, or notify the taker whether they got the question right or wrong immediately after they have submitted the answer. I believe this is a mistake as it may easily create a negative feedback loop. A student who gets many questions in a row wrong, gets progressively more and more stressed. Each wrong answer adds to the pressure to the point of panic where most of the concentration is lost.

Displaying a ticking clock, elapsed time, or time left for the test may have similar effect. Students often start to do a lot of random guessing when they notice they are behind the clock. This goes double for engines which require that questions are answered within some specific time limit. Especially if test penalizes you for leaving blank answers.

These distractions and negative feedback loops do not exist in paper based tests. Students have unlimited amount of time to work on each question, and can keep track of the elapsed time at their own measure. They also do not know whether or not they got a given question right or wrong so they do not have to think about their score until after the test. Naturally, over time they could learn to ignore these types of distracting feedback. But this takes practice, and requires a uniform interface. But as I mentioned above, most students do not get to take online exams very often and thus lack the familiarity with the medium.

Electronic tests require a different test taking strategy. For example, one of the fundamental test taking tips is to skip difficult questions and then get back to them at the end. This prevents you from getting stuck on a difficult problem, and loosing too much time. Good test takers will tackle problems in an increasing order of difficulty to maximize the number of correct questions. Is this possible with electronic tests?

It really depends on implementation. Some test engines do not provide this functionality. Others do it by looping the questions around. When you deplete the list of questions, it starts showing you your skipped questions. Unfortunately most implementations do not allow for the level or prioritization allowed by a paper based test.

Electronic tests also do not allow you to back-track and “fix” the previously answered question. Test takers are often discouraged from doing this, implying that their first instinct is usually correct. Of course one has to remember most tests are flawed in such way that one question may give hints for solving a previous one. I will give you an example. Let’s say a test taker is asked for a definition of a buzzword, given 4 choices. He eliminates two of them right off the bat but not knowing the definition he makes a guess. Later on, the buzzword comes up again in one of the answers and through elimination the test taker is able to extrapolate that the have answered the previous question wrong.

Some people may say this is irrelevant, because the test taker did not know the answer to begin with. But the ability to connect the two questions, and correct the answer shows that the test taker is good at logically reasoning out hard problems based on given information. It may also indicate deeper understanding of the subject at hand. This is more valuable than mere ability to regurgitate memorized material and should be rewarded.

Electronic tests hardly ever allow you to change an answer that was already given. In fact, test engines that immediately indicate success or failure to answer a question make this type of reasoning impossible.

Not to mention that the test takers attention span may be different depending on the medium. It has been shown by countless studies that people tend to get bored and distracted with electronic, online and on-screen media much faster than with paper based media. That’s why most Youtube videos are short. That’s why blog posts tend to be short, and digestible in one sitting. So using medium that is commonly associated with fast paced, short attention span, burst communication to administer a long, drawn out test is not the best idea. Because of this attention span dissonance, a lot of electronic tests tend to seem more draining and exhausting than they should be.

These are the reasons why I dislike taking, and/or giving tests using electronic medium. I prefer good old scantron technology which combines a paper based test with a machine assisted grading. You just need to make sure you bring #2 pencils for everyone.

Of course, if you ignore the attention span problem, it would be possible to design an electronic test that would aim to emulate paper based experience. Make it look like an actual test booklet with several questions per page. Each question would have an active area where the student would check or type in answers. The engine would allow the student to scroll up and down, and flip pages, answer questions in random order even read the whole test without answering any questions without penalty. It would also have to allow the student to go back and fix previous answers at any time. In fact, such an interface could be easily designed using the all-present Web 2.0 design style and philosophy. But I haven’t seen anything like that in use yet. Have you?

Besides, a multiple choice tests can be machine-graded whether they are administered online or not as long as you use Scantron or similar scannable test sheets. Essay questions on the other hand must be graded “by hand” regardless of the medium. Online versions remove the issues with deciphering illegible handwriting, but other than that offer the same grading experience. So why not give students the paper based tests they are used to. If for nothing else, just for the tactile experience.

Potentially Awesome Movies Ruined Half Way Through

January 2nd, 2009 11:14 AM by Luke Maciak

I really don’t know why do I continue to watch Hollywood movies. 90% of the blockbusters out there are total crap. Stuff that is actually worth watching is incredibly rare. I would say that you probably won’t find more than one or two decent flicks coming out Hollywood each year. Three at most - and that’s on a good year.

These few rare gems swim in the sea of mediocrity. Then there are movies that could have been great. Every once in a while you find a movie that starts great and then takes a wrong turn somewhere and ruins all the buildup, positive impressions and shatters viewers expectations. I’m not talking about sequels here - they are a whole other story. I’m talking about movies that start great, and then flop. These are often much worse to watch than a movie that is bad through and through because they build up your expectation and then fail to deliver in twisted, and horrible ways.

Prime example here would be Hancock. The movie starts with a great premise: a deconstruction of the superman mythos. It explores what would happen if Clark Kent was a disgruntled, amnesiac short tempered black man who grew up on the streets of the inner city, instead of a white country boy raised to be a hero by idealistic and loving parents. It tries to answer questions such as: How would an average person, who was not trained and groomed to be a super-hero deal with having super-strength, invulnerability to all known weapons and ability to fly? How would it affect him if such incredible powers were bestowed upon him suddenly, out of the blue and without any explanation. Would he use them to fight crime? Would he indulge himself, knowing full well he would be virtually above the law? Or would he try to find a compromise between these two extremes?

It also talcked issue that is hardly ever even mentioned in high-powered superhero genre: collateral damage and it’s impact on normal people. It seems that in almost every comic book super-powered heroes and villains demolish whole city blocks in epic battles but no one ever seems to mind. On the other hand the damage Hancock’s antics cause to public property seem to be the focus of the first part of the movie.

As I was watching the first two acts, I could not believe how good it was. It started with a great characterization of Hancock as the anti-hero, described his fall from graces (due to the massive collateral damage to public property), his voluntary incarceration and return as a fully fledged hero. I was expecting the third act to deal with Hancock trying to cope with the demands of maintaining his new PR persona, and perhaps struggling to keep his temper. I was half expecting him to laps back into the old ways or something. The movie also set up an interesting rift between him and his only friend/PR manager - and a potential big reveal as to the mysterious source of his powers.

Unfortunately at that point someone decided that Charlize Theron also needs kick-ass superpowers. That was pretty much the end of awesomeness, and beginning of ever increasing suck. The whole thing turned into some bizarre mix of themes and genres. It was like The Ultimate Showdown of Ultimate Destiny meets Highlander meets Romeo and Juliet meets The Matrix with a little bit of mythology thrown in cause 300 was apparently an awesome movie.

They had a great thing going and then they fucked it up.

I experienced similar disappointment while watching Steven Spielberg’s AI. The movie started with a very intriguing premise of an infertile couple purchasing a custom made android boy to act as their son, only to succeed in having a real child shortly afterward. It was fascinating to see the family go through the motions, first treating the “fake boy” as a real child, then as an expensive an complex toy for their growing son, and finally see them discard him as he outgrew his purpose. This could have been the whole movie - and it would be a tear jerkier. But instead, the plot continues after the boy is abandoned and we accompany him on a bizarre and surreal quest to become a real boy.

The developed characters of family members are trashed, and the story turns into a futuristic re-imaging of Pinocchio. Which is not all bad. It is an amusing re-make of the old story, and it culminates in a very sad but poignant scene: the android boy ultimately fails in his quest. It was doubly striking because of the juxtaposition between the magical world of Pinocchio and the Scifi setting of AI. The wooden boy lived in a world full of wonder, and magic and thus readers could believe that somehow he will succeed and become a real person. AI’s character on the other hand is an android and the world he lives in is devoid of magic. Science that created him, cannot turn him into a real person of flesh.

So he finds himself within the arms reach from his goal (in his mind) but at the same time infinitely distant (in the viewers mind). Then some aliens come and reunite him with some sort of simulated reconstruction of his mother’s persona. I guess it was supposed to be a happy ending, but to me it was almost like a bitter joke, or a mockery. I actually felt cheated out of the “good” ending.

I could also mention is I am Legend here. It is a classic example of a failed book adaptation, or what I call the “I did not finish the book, but I totally know how I would end it” syndrome. The adaptation completely, and stupidly subverted the whole point of the original. Book version of Robert Neville discovers that the vampires he was systematically exterminating are not really monsters. He discovers he was slaughtering not vampires but innocent victims of the disease. The title refers to his realization that he is considered to be a legendary monster among the intelligent, cultured and highly social vampires.

The movie version of Robert Neville on the other hand becomes “a legend” because he somehow manages to find the cure for the vampire disease. While the film had great visuals, and featured a great performance by Will Smith, the ending ruined the message completely and took away a very striking twist ending.

Not to mention that this un-twisting of the ending seemed to be a last minute change. One likely done to dumb down the movie. An alternate ending that leaked out on the internet revealed that the movie was initially supposed to end on a similar note as the book - with Neville being the monster.

I could go on with the examples here, but this post is already getting too long. So I will leave the rest up to you. What other movies do you think were ruined half-way through or even at the last minute? Did you ever started to watch a movie, decided that it was awesome only to be cheated and horribly disappointed when the final credits started to roll? Let me know in the comments!

Update 01/02/2009 04:23:44 PM

Note: the original version of this post was not spell checked or proofread at all. I more or less vomited my stream of consciousness onto the blog and it was… Well, terminally incoherent. Somehow most of it slipped past the spelling and grammar nazi’s but I apologize nevertheless. I re-red the post today and I realized that it was really, really below my usual (already low) standard. I fixed most of the glaring spelling mistakes, grammar abominations and mega-run-on-sentences. To my defense, when I typed this up, it was 5am, and I actually had a fever (some nasty flu I’m still recovering from).

Happy New Year

December 31st, 2008 11:35 AM by Luke Maciak

I may or may not be busy getting ready to celebrate the end of the year today. I may or may not be intoxicated later on. In either case, I wanted to wish everyone Happy New Year!

For your reference here is the year 2009 in all it’s irregular glory:

      January               February               March        
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
             1  2  3   1  2  3  4  5  6  7   1  2  3  4  5  6  7
 4  5  6  7  8  9 10   8  9 10 11 12 13 14   8  9 10 11 12 13 14
11 12 13 14 15 16 17  15 16 17 18 19 20 21  15 16 17 18 19 20 21
18 19 20 21 22 23 24  22 23 24 25 26 27 28  22 23 24 25 26 27 28
25 26 27 28 29 30 31                        29 30 31            
 
       April                  May                   June        
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
          1  2  3  4                  1  2      1  2  3  4  5  6
 5  6  7  8  9 10 11   3  4  5  6  7  8  9   7  8  9 10 11 12 13
12 13 14 15 16 17 18  10 11 12 13 14 15 16  14 15 16 17 18 19 20
19 20 21 22 23 24 25  17 18 19 20 21 22 23  21 22 23 24 25 26 27
26 27 28 29 30        24 25 26 27 28 29 30  28 29 30            
                      31                                        
        July                 August              September      
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
          1  2  3  4                     1         1  2  3  4  5
 5  6  7  8  9 10 11   2  3  4  5  6  7  8   6  7  8  9 10 11 12
12 13 14 15 16 17 18   9 10 11 12 13 14 15  13 14 15 16 17 18 19
19 20 21 22 23 24 25  16 17 18 19 20 21 22  20 21 22 23 24 25 26
26 27 28 29 30 31     23 24 25 26 27 28 29  27 28 29 30         
                      30 31                                     
      October               November              December      
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
             1  2  3   1  2  3  4  5  6  7         1  2  3  4  5
 4  5  6  7  8  9 10   8  9 10 11 12 13 14   6  7  8  9 10 11 12
11 12 13 14 15 16 17  15 16 17 18 19 20 21  13 14 15 16 17 18 19
18 19 20 21 22 23 24  22 23 24 25 26 27 28  20 21 22 23 24 25 26
25 26 27 28 29 30 31  29 30                 27 28 29 30 31

Apparently, 2009 is the International Year of Astronomy and also the year of Ox according to the Chinese calendar (last year of the Ox being 97). This useless trivia was brought to you by the combined power of the intertubes.

Speaking of which, as you may or may not know, the internet (and by extension the universe) ends on January 19, 2038 at 03:14.08 UTC sharp. This only leaves us 29 years of awesome so make this one count folks!

See you all next year! Enjoy your New Year’s eve celebrations. If your preferred calendar does not roll over to the next year today, please keep in mind that mine does and my future posts will be dated appropriately.

Also, due to the celebration of the International Hangover Day, there will be no post tomorrow.

Reflections on the Wii

December 30th, 2008 11:28 AM by Luke Maciak

Believe it or not but until this month my exposure to the new generation of consoles, including the Wii was minimal. The only console I have ever owned was a PS1, but that was long time ago. I simply never had the urge to own one of the newer consoles, and for some strange reason I never really had a chance to play with the Wii for an extended amount of time.

This year my cousin got a Wii for Christmas and so I was able to play around with the thing. I’m not going to comment on the social aspect of the console because it is a closed topic. Needless to say, the nature of the controller makes it immediately accessible and attractive to people who usually have little interest in console gaming. It provides a more natural and intuitive interface that people have no problem learning.

But as with many innovative interfaces, it does not work well for traditional software. For example, while playing Smash Bros I was longing for the traditional controller Playing a game that required traditional input, and did not rely on the Wii’s motion control using the Wiimote and a Nunchuk was awkward to say the least. Aiming with the Wiimote is also quite difficult making it useless for FPS games. I’m not sure how much does the Wii Zapper extension change this but in my experience even something as simple as hitting a button on the screen requires a quite bit of waving, and aiming and is far from effortless or intuitive. Or rather, it is intuitive because everyone immediately knows how to use the controller, but actually putting the pointer on a button and clicking it requires some effort.

To fully exploit the device you must write software that is designed for it from the ground up, and keep in mind it’s various quirks. For example I noticed that the Wii Sports that ships with the console has a very fuzzy motion detection system. Or rather, the emphasis of the system is to create fun and engaging game play mechanic rather than forcing the user to learn complex Wiimote motions. Thus:

  1. The golf game does not really care which way you swing. I would actually always swing away from the TV for better control.
  2. The baseball game does not really seem to be able to tell the difference between an underhand an overhand swing when pitching. Also, both pitching and batting could be accomplished with just a quick wrist snap.
  3. The tennis game did not appear to care which way you swing when you try to hit the ball. I successfully struck the ball by swinging in the opposite direction without any negative effects
  4. The boxing game seemed especially fuzzy, ignoring roughly half of the frantic Wiimote wailing

All of this made me wonder how exactly does the Wiimote works. How does it report the motion back to the console, and how hard it is to detect and interpret these signals. I’m wondering if the fuzzy controls of Wii Sports are actually conscious design choices, or are they dictated by the shortcomings of the technology itself.

It might be a little bit of both. It turns out that the Wii devices use 3-axis accelerometers (probably these) which report back the acceleration imparted on the controller via Bluetooth. When you are holding the controller perfectly horizontally with the A button facing up, you will likely get a reading of 0 on the X and Y axis and a negative reading on the Z axis due to gravity). If you stand it up on the table with the IR sensor facing down, and the expansion port facing up, you will get a read on the Y axis, and zero everywhere else. Finally, if you lay it flat on the side you will get a reading on the X axis.

Based on these 3 numbers and compensating for gravity you can extrapolate how and when the Wiimote is moved, and approximately in which direction it is pitched or rolled. However, you can’t exactly pinpoint the position of the Wiimote with respect to the screen - that’s what the infrared sensors are for. You probably can’t also detect the yaw of the controller because rotating it on the spot will not exert any acceleration on the X axis.

So while Wii sports could probably detect which way I’m swinging it is likely that the actual Wiimote API actually abstracts basic motions. And if it doesn’t, I believe that the first thing that any Wii development team writes are motion libraries. Let’s face it - it is much easier to create a basic listener that tracks the Wiimote and fires of an uniquely named event when it detects a predefined motion than to re-invent the wheel every time you want to detect whether or not the user is swinging the controller or holding it still. On the other hand, detecting complex motions with high degree of accuracy might actually not be all that easy considering your only inputs are acceleration readings. It is probably trivial to detect a swing as a noticable acceleration spike on one or more axis. It is probably more difficult to differentiate between an underhand, overhand or a backhand swing. If you throw in more complex motions into the mix, it quickly becomes a mess. Which I believe is what I experienced in the Boxing mini game. Wii was dropping half of my rapid motions because it was detecting them as continuations of previous ones. When I started throwing punches one at a time, the detection rate seemed to improve.

Keeping the motions simple, guarantees good detection and responsiveness. Thus, not caring about the direction of the swing makes for a better game play.

Detecting complex Wiimote motions is actually an interesting research area. I’ll refer you to the Wiigee project which is a Java framework which uses Hidden Markov Models for training and analysis of the controller motions. They are able to recognize complex movements such as drawing a circle, square or a Z shape in the air solely based on the accelerometer input.

But you can do much more. If you combine the accelerometer readings with the IR sensor readings you can fully track the remote in 3D space allowing you to do some pretty amazing stuff. Check out Oliver Kreylo’s Wiimote Hacking page (especially this video) or the infamous head tracking project by Johny Lee.