Archive for June, 2008

File Based or Disk Based Backups?

Monday, June 23rd, 2008

Let’s talk backups. How do you do it? I mean, you do make backups, right? We talked about this before many times. Backups are not an option! They are not something that computer geeks do for fun.They are necessity, and if you neglect them or ignore them you will regret it. Don’t tell me you don’t have anything worth backing up on your computer. Just don’t! Everyone says that and then when they lose all their data they cry. When will you people realize that the 60 GB of mp3’s you have meticulously collected since they you were 13 can never be recovered, or recreated once your hard drive dies. It’s gone! You have to start from scratch! Do you even remember which songs you had there? How about your emails? Letters from your first girlfriend/boyfriend? Pictures from that crazy spring break that you never printed or uploaded anywhere cause they were to embarrassing? Don’t tell me things like that are not important to you. Cut the bullshit and go start backing up your data. Yes! Go! Right Now! I’ll wait.

backup.gif

Ok, so now that I made you think about backing up your data, here is a question: do you image the whole disk, so that you can roll back your system to a previous state, or do you just backup your data? Both methods have their benefits and flaws.

Right now, backup mostly my data by rsyncing up my home directory to an external drive. On Windows I use Unison instead of rsync but idea is the same - incremental sync of just my data files. I leave system files and applications alone.

For one it saves space. Believe it or not, the OS, games and software tend to be huge. By saving only the stuff I actually care about, I make better use out of my external media and cut down on backup time.

Secondly, file based backup can be less failure prone. I used to use NTBackup on my windows machine back in the day to take snapshots of the OS state and the results were less than impressive. The backup would run for 18+ hours and then would fail right near the end leaving me with an unusable 100+ GB file on the external media. That may be because NTBackup generally sucks but I believe that most applications that work this way would have similar flaws. I also tried ghosting, but that required a reboot into the ghost environment and had a simillar issue. After the backup was done, I had one big file, which could become easily corrupted. I hear that newer versions of Ghost do not require a reboot but from what I have seen they are terribly bloated which is sort of a trademark for Symantec products. Huge, slow and bloated. Bleh…

A file based backup seems like a more robust procedure to me at the moment. Even if the process fails in the middle of execution, I still usually get a partial backup. Furthermore the files are directly accessible if I need to do only a very selective restore. I do not need to go through some special application to unpack the data I need. I just mount the drive and grab the necessary files.

But that’s me, and I’m always open to new ideas. How do you do your backups? What software do you use? Do you think backing up just data is a bad idea? If I wanted to do full system backup, what should I use? Let me know in the comments.

Dexter: Season 1

Friday, June 20th, 2008

Recently I realized that I really don’t watch much TV. Or rather I do watch fair share of it, but I don’t do it the way normal people do it. When I come back from work, I tune my TV to one of the following channels: History Channel, Discovery Channel or Comedy Central. Then I sit at my computer and do my stuff. I like documentaries, and I like the John Stewart, Colbert, South Park, Futurama and etc.. At 11 I flip it to Adult Swim and watch the silliness there. I don’t watch daytime TV. I abhor reality shows and I usually can’t stand news because I really don’t give a flying fuck about celebrities, sensationalist fear mongering and stupidity - I’ll get my news online, thank you very much.

The truth is, that 80% of stuff on TV is total crap. 18% is decent, and 1% is pure gold. And since I don’t usually watch new shows, or actually keep track of premiers I often miss that awesome stuff. But I make point of actually revisiting the good stuff - for example when it comes out on DVD. Every once in a while I go hunting for a new show to obsess with and I often find them.

That’s how I found Lost, Heroes and Battlestar Galactica. I got into all these shows late, then got my hands on few shows and was subsequently glued to the TV for weeks. All of these induced what I call the “just one more episode before I go to sleep” syndrome. They just keep you on the edge all the time, and you can’t wait to see what’s going to happen next.

I just found a new show, and it’s called Dexter. I just watched the first season, and all I can say is: damn good TV! A big plus is that it is a Showtime show, which means they can show gore, nudity and can actually curse like normal people do in real life. Which, considering the topic matter, makes it more true to life and attractive.

Dexter

Dexter could be described as sort of a cop drama - but with a very interesting twist. The titular character, Dexter is not a cop - he is a serial killer who happens to work for the police as a forensic expert on blood spatter. So it’s kinda like watching CSI but with interesting, complicated and conflicted characters, and a very well written story arc. I usually detest cop dramas and think that CSI shows are beyond silly, but this - this I like. It’s deep, unconventional, quirky. And of course we are rooting for the bad guy - a heinous murderer who has an insatiable desire to kill. Despite being a monster, Dexter is actually a very compelling and likable character with very dark sense of humor, and sensibility and morality of his own.

To most people Dexter is just a really nice, harmless, ordinary guy. He is always smiling, cracking jokes, brining donuts and coffee. Sure, he is a little bit geeky, and tad odd - but I guess anyone whose job specialization was “forensic blood spatter analysis” would probably come off strange. On the other hand he is this strong, manipulative, controlling, sadistic monster who enjoys torturing his victims. He hides his dark side so well, that he probably comes off more “normal” than you and me.

vlcsnap-627102-custom.JPG

The only person who knew his secret was Harry - his foster father. He discovered Dexter’s desire to kill and taught him how to channel it and use it constructively. He instilled a very strong moral code in his son. Thanks to Harry’s code Dexter never takes an innocent life. His victims always deserve their fate - they are all notorious murderers who killed many innocent victims, and yet somehow slipped through the cracks in the system and avoided getting caught by the police. So he is sort of a vigilante, or a dark hero dishing out justice to those beyond the reach of the law. But that’s not why he kills. He does it because he enjoys it and he knows that his actions are morally reprehensible.

vlcsnap-629072-custom.JPG

Michael C. Hall was born to play this role! I really didn’t watch Six Feet Under so I’m not familiar with his body of work, but he does an absolutely amazing job portraying this offbeat, disturbing and interesting character. In fact, the whole cast is excellent. Everyone delivers a very compelling performance - even most of the extras, and one-off characters are great. So is the writing and direction. The plot starts slowly and lightly showing dexter doing his thing, but quickly thickens and spins out of control. Shows like Lost and Heroes usually rely on a cliffhanger driven episode transitions. Dexter, not so much. Most episodes offer satisfying resolution and a small hook to get you interested in the next installment. Real cliffhangers are used sparingly but when they do happen, the effect is striking because you do not expect them. It really shows that the story is very well thought out, building up the tension in small increments, and offering localized catharsis moments at the end of each episode.

What I like the most however that just like with Heroes the first season is a closed chapter. It tells a story which has a begging, middle and an end. There is no meandering, and no huge frustrating season finale cliffhanger that leaves you hanging, and speculating for months. What you get is a satisfying resolution. If the show got canceled after the first season, it would still have been a great story, with a great ending and I applaud that. It’s way to easy to go overboard with the cliffhangers and it seems that Dexter has them firmly in check using them the way they are supposed to be used - for special occasions.

I rarely notice tings like music in TV shows, but I must mention that Dexter has a very distinctive sound track. To give you an idea how the music, and camera work make this show special watch this short opening sequence from the show:

This is pretty much Dexter’s morning routine: shaving, getting ready, making breakfast, brewing coffee and etc.. But the way it was shot subtly suggests something else. When he cuts the ham, it looks like he is cutting flesh. When he ties his shoes it looks as if he was strangling someone. When he squeezes out a grapefruit it seems to ooze blood. The unsettling yet catchy music only helps to emphasize that odd sinister light in which we view the ordinary, everyday routine. Very clever, very well done and sort of indicative of the overall quality and attention to detail on the show.

vlcsnap-629824-custom.JPG

If you haven’t watched it, I highly recommend this show. It will capture you with the surprising death, dark humor, the offbeat protagonist, and character driven drama. After just one episode I was sucked in. After two I became addicted. If you are planning to check it out, better set aside a chunk of time because it will be very hard to resist watching 3-4 episodes in one sitting. Both seasons are out on DVD now, so you can buy them, rent them, netflicks them or whatever.

Now excuse me while I go watch the second season. Let’s hope it doesn’t fizzle out and loose the spark the way Heroes sort of did after their first season.

Games With Best Replay Value

Thursday, June 19th, 2008

I usually play though most of the video games I own once - sometimes twice. Some games I just never finish - of abandon after just few days. I find that strategy games (especially RTS games) rarely hold my interest for longer than a week or so and I hardly ever finish their campaigns unless there is an interesting story unfolding in the cut scenes. I usually finish games which I like, but I rarely re-play them - even those which I absolutely adore. I really don’t ever do speed runs - I explore, and try different things making a good use of my trusty quick save button. So usually when I’m done with a Half Life game or a Hitman game (or portal for example), I’m really done with it. I have seen all there was to see in this game. Few games out there really offer a re-playable experience that would entice me and keep me coming back. Multiplayer games are sort of an exception because it’s not really the game itself that adds the replayability value but the unpredictable nature of playing with human beings.

There are however few single player games that just never get old, and I keep re-playing them over and over. Sometimes I lose interest in them for months, even years. I often banish them from my hard drive, but they always work their way back into my good graces.

How do they achieve this? Well, there are several way to do this. Some games are simply so immense, and so complex that they can’t be simply “finished” in my obsessive compulsive way of exploring every available inch of space, picking up everything that is not nailed down, and talking to every NPC. One of such games is Morrowind (and it’s bastard offspring Oblivion). The sheer size of that game, and the open sandbox game play with multitude of side quests means that “finishing” the main quest is only a tip of the iceberg. In fact it is impossible to actually explore the every aspect of the game with a single character. If you want to advance your status with one faction, you may need to do missions that often directly harm another one. Missions from opposing factions usually have conflicting goals and some of your choices will lock you out from completing certain parts of the game. It’s also one of the few games where completing side quests can be rewarding enough to put the main quest on hold, and lucrative enough to quickly advance your characters, and raise his reputation in the game world.

Morrowind

Each time you play, you can have a very different experience, and take your character in a very different direction. For example, my last character was a warrior who joined the imperial legion, and took side jobs from the fighters guild. The game was very combat oriented and my missions usually required me to travel to far off places and clear out caves and dungeons from bandits, thieves, poachers and other scum.

My current character is a Thief quickly rising through the ranks of House Hlaalu and the Thieves guild. Most of my missions include some sort of subterfuge, diplomacy and subtlety and I hardly ever need to leave civilization behind and trek through wilderness. The difference between these two experiences is so striking, it’s actually hard to believe it’s the same game.

And this is why I know I will likely revisit this game many more times in the future. I still haven’t really finished the main quest which is actually quite interesting in itself. I never seriously played as a wizard character, and never really explored the locations added by Tribunal and Bloodmoon expansion sets. One day I will likely exhaust the pool of possible character combinations, and explore most of the interesting locations in the game - but it won’t be anytime soon.

Another game that keeps me coming back is… Nethack. While very different from Morrowind at almost every level, it does have similarly vast scope. In fact, it’s actually hard to believe that none of the modern dungeon looting games which model themselves after nethack and other rougelikes (like Diablo and it’s clones) never even comes close to matching the complexity, and the simplicity of these terminal based games. One thing that makes nethack so engaging is that it is always random and fairly unique and unpredictable. The large dose of humor, combined with the permadeath feature make the game both enticing, and incredibly infuriating despite the fact that there is basically no plot, and the “graphics” are made out of ASCII characters. I guess dying in very stupid, unpredictable and random ways is part of the fun. Maybe I’m a glutton for punishment. But I keep coming back to it. Most people do.

Nethack

Here is a random fact - I own Diablo 1 and 2, and I beat them both. They also have random dungeons, randomized loot drops and similar mode of game play. I did spend unhealthy amount of man-hours playing these games back in the day. But guess what game is currently installed on every machine that I own? Yup, it’s nethack. Go figure.

So what are your most re-playable games? Which ones make you keep coming back to them time and time again? Let me know, perhaps it will become by brand new addiction. P

The problem with Wikis

Wednesday, June 18th, 2008

There is a billion and one wiki engines out there. Some are very simple, others have many advanced features. And almost every single one has it’s own idea on what a wiki syntax ought to be. There is really very little consistency between these engines. Yes, there are 3 major wiki “languages” which are fairly widespread out there:

  1. Textile
  2. Markdown
  3. MediaWiki

All of these have strong proponents. For example, Google likes Textile which is used for their Google Code wiki engine. MediaWiki is naturally the syntax used on Wikipedia, so it’s popularity should not even be questioned. And there is some love for Markdown in the Ruby camp as evidenced by projects such as Instiki which I blogged about some time ago. But these are by no means the only lightweight markup languages used out there. There are dozens of them in active use - both in and outside of wiki engines.

Better yet, some wiki developers eschew established standards altogether and invent their own. I’m messing around with DokuWiki right now (which btw is astonishingly full featured for a “lightweight” flat file engine) and it basically uses some sort of Markdown like syntax which nevertheless seems to be quite unique.

In my mind this poses two problems. First one of course is picking a markup language you can live with. I personally can get used to anything - I mean, I hack in Perl and PHP for a living, I write a lot of stuff in LaTex and I actually like lisp. So switching between markup languages doesn’t bother me. But I will say that while they are all simple and easy to learn, they are not all equally intuitive.

For example, the I like the MediaWiki syntax for headings which seems more readable and easier on the eyes to me than the Textile or Markdown syntax:

==This is MediaWiki Heading== 
 
h1. This is a Textile Heading
 
# This is a Markdown Heading
 
This is also a Markdown Heading
========================

The MediaWiki creates a fairly unique visual clue, while the Textile syntax is sort of a throwback to HTML which your average wiki user may or may not know. Markdown is somewhere in between, the two but the two different methods of accomplishing the same thing may be confusing to novice users.

On the other hand WikiMedia has kinda ugly syntax for bold and italics:

WikiMedia '''bold''', ''italicized'' 
      and '''''bold italicized''''' text.
 
Textile *bold* and _italicized_ text.
 
Markdown **bold** or __bold__, *italicized* or _italicized_ 
     and ***bold italicized*** text

Here Textile is arguably the simplest one, with each style having it’s own unique character - and MediaWiki the worst one, requiring you to count the tiny quote marks. Ugh.

And of course Textile can do something the other two lightweight syntax language can’t - add custom attributes to certain elements. For example to produce an H1 heading with the id of “my_heading” all you need to do is to write:

h1(#my_heading). This is my heading

Which makes it great for people who know what they are doing. All are equally straightforward, but MediaWiki tend to be “clearer” and less scary at the first glance - or rather more plain-text centric. Textile on the other hand lends toward HTML like complexity in some places. So when I’m picking a wiki that is to be used by non-technical folks I usually tend to gravitate towards MediaWiki/Markdown like syntax - since they probably won’t be able to fully utilize all the attribute magic embedded in Textile.

Second problem is migrating from one wiki to another. Migrating data from one platform to another is always a pain so let’s not even talk about that. Let’s assume there is no data to migrate - you are just setting up a new wiki, and it is a different engine than the old Wiki or something like that. Unbeknown to your users and perhaps even to you the markup language in this new wiki may be subtly different from the one they are used to. This issue can be mitigated by picking a popular syntax and then just sticking to it. The little graphical formating buttons on top of the text box also help a little bit to ease users into the brand new wiki environment.

Which syntax do you like? Which is the one you would recommend for clueless users? And of course which wiki is your favorite? If you had to set up a wiki for your personal project, which one would you use? How about for non-technical staff that nevertheless wants to jump on the internal wiki bandwagon? Let me know in the comments.

Laptops in the Classroom

Tuesday, June 17th, 2008

Here is a short excerpt from a longer article someone posted to the MSU [discuss] list the other day. I found it somewhat interesting because it is actually like the only vaguely on topic message on that list I saw in months.

It’s unusual to walk into a law class, or any classroom in a professional school today, without viewing a sea of open laptop lids blocking students’ faces and hearing the steady hum of fingers striking keyboards.

But a growing — albeit small — number of law professors like Mr. Herzog are pushing back. Students with laptops, they argue, surf the Web instead of engaging in class, and play games, shop online, or e-mail friends, distracting themselves and those who sit near them. The complaints highlight how technologies once eagerly adopted by colleges can later pose problems.

Aside from the Michigan campus, others where law professors have banned laptops include Florida International, Georgetown, and Harvard Universities, and the University of Wisconsin.

Business-school professors, too, complain about laptops’ sabotaging discussions. As a result, some business professors are asking students to close their laptops during conversations.

The backlash appears to be primarily in the law schools, however. Law professors say the Socratic method, the cornerstone of a legal education, in which professors ask students to accept or refute a long series of questions, is under assault by the vast array of amusements available to students on their laptops. The learning method calls for focused interaction between students and professor, as he or she tests their assumptions. Laptops, psychologically and literally, get in the way.

The Chronicle of Higher Education: Information Technology, Volume 54, Issue 40, Page A1

I find that very telling that the Law and Business professors are the ones spearheading this Luddite movement of technology hate. It’s completely unsurprising considering the track record of business school students.

The running joke is that if you have absolutely no idea what to do with your life, no ambition, no drive and no desire to study you sign up for a business program. If, on top of all of the above you can’t do basic arithmetic or operate Excel then you usually go into law. Don’t get offended. I mean, all Math/Science students are considered antisocial nerds by the outside world so I think it is only fair if we retaliate a little bit with stereotypes of our own.

So you can see why I’m not surprised why law professors scoff at laptops in the classroom. They don’t know how to utilize technology in the classroom and their students are probably not using it constructively either. I don’t think I need to mention that using a laptop in most CS classes is invaluable. Especially when you are learning about new programming language or technology it lets you actually try the examples outlined in the lecture in real time.

Some people actually do take notes this way. I tried it couple of times with mixed results in grad school. My biggest problem was that in most classes we did a lot of drawings, diagrams, tables and etc. For me a perfect note taking tool would probably be a tablet with OneNote like software. Unfortunately I never owned one. I could see however how taking electronic notes using a regular laptop in a law related course would be much easier for a fast typist.

I would usually use my laptop to follow along with the PowerPoint presentation. Most professors made their lecture slides available online and this allowed me to flip back and forward through the slides - sometimes out of sync with the lecture - for example to go back few slides to a concept that I did not fully understood as it was explained. I’d also pull up old notes, google unfamiliar terms and try to find interesting arguments and counter-examples to what was being taught in class. So yes, I was browsing the web, but usually constructively.

laptops_in_classroom.png
comic © Doonesbury

As a teacher I have limited use for laptops during the lecture portion of the course, but I sometimes engage my laptop wielding students and make them do some work - for example google some interesting term and read the definition to the class or try out something that I just explained - which can be easy when you are teaching basic computer concepts. The lab portion when they learn how to use MS Office and make HTML websites is a whole other thing.

Naturally given a chance students will browse the web, update their facebook and IM each other. There is no way around it. But I guess this is a matter of personal responsibility. I mean, we are talking about college here. Your students should be responsible adults and they are actually paying large sums of money to be in your class. If they want to waste the time and money by browsing the web that is their problem.

This actually touches on a problem that pains me greatly. I honestly believe that attendance should be optional. I would much rather conduct a class for only the people who actually want to be there, participate and ask questions than force students to sit there and be bored out of their mind, checking their watch every 5 minutes and sneering, and rolling their eyes every time another student asks a question or tries to engage in a discussion. Unfortunately this doesn’t work. I tried this optional attendance thing my first semester as a teacher and I ended up with 6 people showing up one day, and 3 leaving halfway through the lecture. It is silly, irresponsible and kinda stupid. If you don’t want to sit in a given class, why take it at all?

Banishing laptops out of your classroom because some people don’t care to participate in the class, or simply can’t resist the online distractions seems like a step backward. We will have more technology in the classroom in the future - and not less. And pen & paper notes have many huge disadvantages. They can’t be shared and disseminated easily. They can’t be searched, tagged and cataloged. And of course they are easily lost and damaged. If I wanted to look through some of my old class notes from my undergrad classes right now, I would have to dig though boxes papers sitting in a dark corner of my closet or somewhere in the attic. The electronic or scanned notes that I took as a grad student on the other hand are still here sitting on my hard drive. Think about that before banning useful technology out your classroom.