Archive for October, 2008

Favorite Function Key

Friday, October 31st, 2008

Function keys were designed to be ultimate shortcuts or “hot-keys” on your keyboard. By definition, they were there so you could bind some sort of a function or a command to them for quick access. They are like the speed dial buttons on your phone. And yet, they remain some of the least used keys on your keyboard. Why is that?

500px-qwertysvg.png

Let’s face it, if we made a heat-map of average persons daily keyboard use the function row would probably barely register any strokes. This is sort of the opposite of what these keys were intended for. There are few reasons for it though. They are not standard, and may work differently in different applications. This context dependence is by design - the original idea was to leave them un-bound so that users can assign their own functions to them. Unfortunately some OS’s like windows do not allow users to define global shortcuts like this out of the box. So, application developers started assigning their own functions to them. This naturally turned out to be very confusing so over the years we developed unofficial conventions such as using F1 for help, F3 for search and F5 for refresh. When users can expect a key to work predictably, they start hitting these keys more often.

The de-facto standardization however doesn’t change the fact that these keys are like 100 miles away from the home row. Hitting any of them requires you to lift your hand and and move it about inch or two upwards to reach the key you need. You can’t you just can’t touch type them and this is an issue. This is why functions such as copy, paste or save which would be perfect for F keys are usually bound to easily touch typed key combos such as Ctrl+C, Ctrl+V, Ctrl+S.

I find that I hardly ever use any F keys these days. For example, I like to use multi-button mice which allow me to back-forward and refresh pages with my thumb. This means I hardly ever touch F5. I don’t like full screen (kiosk) mode so I hardly ever touch F11. I do my searching using the ‘/’ key (works with vim and firefox which are the two apps I use the most) or Ctrl+F (most other apps) so I have no practical use for F3.

The only function key I actually do use is F12 which on my Kubuntu system is bound to the Yakuake pull-down console and I don’t even remember if that was by default, or if I bound it myself.

How do you use function keys? Do you bind them yourself? Let me know which one is your favorite!

Favorite Function Key
View Results

If you don’t see your favorite key listed above, choose ‘other’ and let me know what it is in the comments, and how do you use it.

Also, Happy Halloween! Sorry that today’s post is non-spooky but whatever. :)

Open Letter to the future George Lucas Estate

Thursday, October 30th, 2008

George Lucas is an old man. He will die soon. I’m addressing this open letter to the future holders of his estate. You dear Sir and/or Madam will one day own the rights to the very popular Star Wars franchise. Let me ask you a question - have you seen the Star Wars prequels? Did you like them? If you did, then stop reading right now. I probably won’t be able to reach you. If you found them a little bit lacking, keep on reading.

Most Star Wars fans consider these prequels to be an atrocity. A horrible, horrible rape committed on our beloved fictional universe. These 3 movies were a deliberate slap in the face for all long time enthusiasts of the original trilogy. Prequels were crap. Ever since they were released Lucas has been trying to integrate them into the Star Wars continuity. This of course does not work, because of the huge plot holes, and inconsistencies. Nevertheless he keeps on ret-conning, and re-writing parts of the universe to make this possible. He is soiling the Star Wars universe with the cancer that is the prequel trilogy. But he won’t live forever. In fact the two trilogies are so divergent that making them into one consistent whole is a job that would take many life times. Soon George Lucas will be dead and you will be in a position to undo all the harm he caused and re-invigorate the Star Wars franchise.

This post is a suggestion of what you could do once this happens. Naturally you will do as you please, but if you follow this advice you will not only make Star Wars fans across the globe really happy. You will also make quite a bit of money. You will need to spend some money, but the return will be huge because people will want to see Star Wars on the big screen again. In fact I assume that you would not be opposed to making a new Star Wars movie at all. The only problem is where to place it in the current time line. You could place the new movie before the prequels but I don’t believe that there is any interesting lore to explore there. You could put it after the original trilogy, but then you would be stepping on the toes of various novel writers who explored this area thoroughly.

Here is what you do: you listen to the loyal fans. The prequels are a piece of shit. They are what Highlander 2 was to the Highlander franchise. They are what Batman and Robin was to the Batman franchise. Blockbuster success but a complete and utter cinematic crap. What you need to do is to take Phantom Menace, Attack of the Clones and Return of the Sith and toss it. Declare it non-cannon! Yes, I said it. George Lucas has been desperately trying to bridge the prequels with the original trilogy but it can’t work because prequels are a square peg and original trilogy us a round hole. No matter how much you try, the two won’t fit together.

So you branch the franchise into two continuities. One line would be Star Wars Classic™ which would include the original trilogy and the expanded universe stuff that was created before the prequels, or which ignores some of the radical changes they introduced.
The other one would be The New Star Wars™ which consist the prequels and all the licensed stuff is based on them. This would probably include the excellent “Knights of the Old Republic” games which I believe alluded to the prequels in some ways. In The New Star Wars™ force has biological underpinnings so you can technically create Jedi via blood transfusion, Darth Vader is an angsty teenager who built C3PO on Tatooine and etc…

The point is that if you split them this way they can both be consistent and no one will need to fret over the huge plot holes and inconsistencies. For example, have you ever wondered why Ben Kenobi does not recognize R2 in A New Hope? Did you ever wonder how coul Leia remember her real mother? Or how come it took the empire 18+ years to build the first Death Star (we see it being constructed at the end of ROTS, but it becomes operational in ANH when Luke and Leia are already grown up) but only a tiny fraction of that time to build the second one.

Solution is to stop trying to integrate the two. Just split them in half and declare both continuities are valid but not compatible. When you are trying to license or adapt the SW franchise you can now go with either continuity. It may be confusing at first, but it is not as confusing as the plot-hole clusterfuck we have right now.

Your next step is to hire a team of best writers you can afford, supply them with as much of Star Wars Classic expanded universe materials as you can and task them with doing for Star Wars prequels what Batman Begins did for Batman. Write a darker and more serious tale about the fall of the Jedi order and the rise of one of the most infamous and recognizable villains in existence. Forget everything that George Lucas wrote in the prequels. Give them free reign, as long as they tell a compelling story about Darth Vader’s origin. They don’t need to split it into a trilogy like Lucas did. They can do it in one movie if they can and want to. The aim is to still keep it somewhat the spirit of the Classic continuity but the Vader parts ought to be darker and more serious for obvious reasons. Make sure that R2D2, C3PO, Chewbacka and Fett family do not appear in this movie at all.

Keep in mind that you do not need to use Tatooine as Anakin’s place of birth. I don’t believe his planet of origin was ever specified before the prequels so you can skip that planet altogether and create something different. Keep the force powers low key and lightsaber combat simple. Avoid acrobatics and heavily choreographed sequences - it should be more static and poised and technical - basic cuts, thrusts, parries and feints. It should look like samurai katana duels rather than the crazy, whirling nuttiness of prequels. Yes, that stuff looks awesome but looks weird comparing the fighting styles from the classic trilogy.

Hire actors who can actually act and cast them as characters fans can actually care about. The original Star Wars gave us Han Solo, Darth Vader, Luke and Leia, Yoda. The prequels re-hashed most of the original characters and gave us… To tell you the truth the only character that fans feel strongly about is Jar Jar and that’s not a good thing. Well, there is Mace Windu but he is marginal - sort of like Bobba Fett. The new prequel should introduce original characters we could actually care about. And for God’s sake, Anakin does not have to be likable. He needs to be bad ass!

All that teenage angst and love crap needs to go. Anakin needs to be a strong guy with a big ego and an iron will. He never backs down, he is never humble and he makes no excuses. He is direct, focused and ambitious. When he wants something he will get it. If you happen to be in his way he will treat you as an obstacle and remove it. This Anakin does not need to be tempted into the dark side - he chooses it freely and willingly because it gives him strength.

Above and beyond all the new prequel must be consistent with the original movies. Seriously, invite few dozen of SW geeks to go through the script line by line hunting for plot holes before you actually shoot it. Barring that, leak the script out and observe the forums. Then go back and re-write and re-write until it works.

Think of the money you could make here. I’m writing about this right now so that you have time to think about it. You can weigh the pro’s and cons and make preparations. We all know that George Lucas will die one day. To most of us he is already dead because of what he did to Star Wars and Indiana Jones. You will be able to fix this. You will have a chance to make a lot of money, and become a hero to millions of SW fans at the same time. Think about it. There is still plenty of time. Just remember this post when that fateful day comes.

Magic As Programming

Wednesday, October 29th, 2008

Magic exists in almost every fantasy world out there. In some worlds magic is scarce and feared, while in others it is ubiquitous and commonplace. However the archetype of a wizard in most fantasy settings is modeled after medieval alchemists and mystics who had no supernatural powers. Magicians who existed in our universe did not use magic but science, trickery and ignorance of others to raise to notoriety. Thus it’s no wonder that most of them were reclusive and secretive, and that they hoarded, and guarded their arcane lore from everyone save for trusted apprentices. That’s because they had no power, and their position and status depended on cultivating the mystery around their practices.

wizrd-1.jpg

In an universe where magic is real there would be no reason to assume the same secretive mode. After all wizard are scholars and they stand to benefit from free exchange of knowledge much more than craftsman guilds who jealously guarded their trade secrets. I think the best parallel to magic we have today is software. Yeah, don’t laugh. Just like magical spells software has no physical form. It is a thought - an abstract idea bound by human will to accomplish certain task. Thus, I imagine that one could draw parallels between a wizard and a software developer with the respect to how they work.

For example, I imagine that there would exist magical algorithms. For example, there might be a thousand different ways to form a fireball but only some of them are efficient with respect to casting time, energy consumption and the relative power of the spell. Someone probably figured that out long time ago and most wizards just re-use that algorithm. Naturally every rookie designs his own fireball spell early on, but it is usually as efficient as bubble sort. I’m sure there would be many wizards swearing by their own version of particular spell just like there are developers who insist on reinventing the wheel for every single project.

Fortunately we do have a body of knowledge to draw upon, and we are able to build upon the shoulders of giants. You need to sort stuff? You use quick sort or merge sort as needed. You need a fireball? You use thermal Sir Jeffrey’s Conflagration and Roderigo’s Fast Projectile. Or something like that - you can probably see where I’m going with this. I can’t imagine something as complex as magic to work any differently. Especially in a world where it is not that rare, there must be an academic movement dedicated to open exchange of knowledge.

Usually you see Wizard casting spells using recited formulas and gestures. In most cases saying “hocus pocus” however is not enough since wizards need to learn how to channel the energy for the spell and etc. I imagine that these words and gestures are usually mnemonics that wizards train to be able to cast spells on the fly. They don’t have hardware on which they could compile their spell and then run it, so they use these mental shortcuts. The actual magic would probably be done by keeping series of abstract symbols of power (complex multi-dimensional structures impossible to write down on paper) in mind and channeling energy through them. Wizards would memorize these symbols in groups, each bound to certain syllables or gestures. Then performing that gesture would trigger memory of the true symbols and thus execute the spells. Obviously this concept is probably not compatible with all settings but it sort of makes sense to me.

A side effect of such a setup would be existence of many different mnemonic systems - or spell casting languages of sorts. Some of them would be more abstract combining longer chains but creating short and easy to cast spells. Others very low level, allowing the wizard control over many variables when casting at the cost of a longer, more cumbersome recitation. There would be arguments on which system is best, and fads among wizards to use one over the others. You know - just like we have now with programming languages.

Naturally there would be proprietary magic too. This goes without saying. There would be wizards working in secret on proprietary spells that would give them competitive advantage over the others. They would still use the same algorithms, and their “code” could still leak out just like with software. Also, they probably wouldn’t be able to sell “spells” because they could be easily reverse-engineered. Instead I’d imagine that proprietary market would invest into producing magical commodities. They would be making magical items bestowing supernatural powers upon the owner, scrolls that would allow anyone cast complex spells set number of times before crumbling or bound spell items with set or renewable number of charges.

red_wizard.jpg

Special group of magical items would probably be wizard arcana - stuff like magical staffs and wands. I’d imagine that rather than hold specific bound spell, or confer a magical buff upon the users these tools would carry a spell-writers toolkit. I think of them as the IDE’s of magic users - they would make casting spells faster and more convenient to the point where some wizards would be helpless without them. They’d probably have common incantations bound to them, and perhaps they would allow you to slot custom spells onto them as you go. So casting a fireball would be as easy as triggering the 4′th and 6′th slot on your staff. Each wizard would be carrying their customized toolkit of their favorite magical “libraries”, macros and algorithms they could weave into their magic.

Or something among those lines. I’d see these items as useful productivity tools most wizards would want to have, but not necessarily need. They could still cast spells without their staff, or wand but they would be slower at it.

Finally, it would not be out of question to see an “open source magic” movement to develop. Note that most branches of science strive for open exchange of ideas. But whenever there is a significant amount of money to be made on new discoveries or implementations proprietary interest may attempt to hinder this process. It is much more profitable to maintain a trade secret for many years and build a market monopoly than to release your discoveries and then compete with everyone else who decides to use it. It is likely that magic would follow the same pattern. Major guilds and/or Wizard societies would maintain secrecy and teach their signature spells only to trusted members. They would sell the popular spells bound to items, or as one-use scrolls or as a service (ie. if you need it, they will send a Wizard to cast it for you).

Just like in our world the response to dominance of proprietary magic on the market would be creation of a movement dedicated to open exchange of ideas and re-implementation of popular applications. There would be wizards re-implementing the popular proprietary spells from scratch creating free and open alternatives. So if you don’t want to pay for that bound Haste spell, you can potentially learn “Quicken” spell that has a similar effect but perhaps it may lack some of the fine tuned optimization of it’s proprietary counterpart.

Why no one ever portrays magic this way? Probably because few fantasy writers have computer science background and thus they may not see these parallels. Also, the traditional, established fantasy canon is familiar to the readers and easy to understand and relate to. This alternative look at magic may be interesting concept to us (you know, computer geeks) but that’s only because we understand software. Normal people don’t - to them, software is like magic. Explaining magic through another abstract system that is “just like magic” is probably not the best idea.

Still, if you often play with bunch of programmers or engineers (both are common career choices among RPG enthusiast btw) in a magic-intensive setting it could be a fun to draw this parallel in one way or another. It actually could be an interesting idea for a campaign background for a company composed solely of spell casters.

Update 10/30/2008 12:29:43 AM

Someone suggested that I ought to pick up Ars Magica. It offers an interesting combinatorial verb-noun mechanic for constructing your own spells. It’s not as complex as what I described above but it’s still pretty cool.

Ubuntu: Change Sensitivity of the Synaptics Touchpad

Tuesday, October 28th, 2008

I hardly ever use the touchpad on my laptop. At work, my morning routine is plugging in my external monitor, ethernet cable and the USB hub into the back of my machine. Yes, I could get a docking station but why bother? I have a little USB hub on my desk where I connect my mouse, keyboard, the external drive for backups and occasionally a flash drive or two. It is almost like a desktop replacement which it practically is. Dell Latitude 830 is a monster of a laptop. I love this machine but it is big and bulky and definitely designed to be stationary more than portable.

Today I had the crazy idea of walking around with it and using it as a normal person would use a laptop. Bad idea! It is nice to have that big wide screen when you work on this machine but it really was quite unwieldy when I was trying to carry it and a stack of papers around the building. Not to mention that the suspend to disk just does not work on that machine. Not that I’m surprised. I have never owned, nor seen a Linux laptop in which ACPI functions such as suspend or hibernate would work with any degree of reliability. If you have one, congratulations! I envy you. Perhaps Hardy will solve my issues once I finally upgrade to it. But I digress…

I took the laptop with me to the classroom without an external mouse and noticed two things. One, my keyboard was dusty showing how often I actually use this machine as a laptop. Two, my touchpad was sluggish. Quick glance at the KDE System Settings panel assured me that there was no such thing as touchpad settings applet. One was clear - I had to do something. I tried using the rubber nipple (yes this a technical term) located between my G and H keys but that thing is so inaccurate it is not even funny. It is like trying to mouse around with a Joystick - something that I actually did quite a few times back on Amiga when I was to lazy to plug in a mouse in between games. It will get things done, but it is neither pleasurable nor productive.

So I decided to fix this. Quick google told me that all I really needed to do was to add few short lines to xorg.conf. Look for the following section in your file:

Section "InputDevice"
    Identifier     "Synaptics Touchpad"
    Driver         "synaptics"
    Option         "SendCoreEvents" 	"true"
    Option         "Device" 		"/dev/psaux"
    Option         "Protocol" 		"auto-dev"
    Option         "HorizEdgeScroll" 	"0"
    Option	     "MinSpeed"		"1.0"
    Option	     "MaxSpeed"		"1.8"
    Option	     "AccelFactor"	"0.3"
    Option	     "MaxTapTime"	"0"
EndSection

This is how mine looks right now, which is after applying the changes. You see, I added the MinSpeed, MaxSpeed and AccelFactor options to this section. You might need to play around with the numbers but keep in mind that the higher the MaxSpeed the less control you have over the cursor. At 1.8 my touchpad is a bit jumpy but I can swipe it from corner to corner of my screen without picking up my finger which is what I wanted. I’d say that 1.5 would be a medium speed you’d want to aim for, and 2.0 is way to fast. I haven’t experimented with acceleration much because I got tired of restarting my X.

Here is the thing - why can’t I have an applet with adjustable sliders for all of this in my System Settings area in KDE? It would be much easier and more convenient than editing xorg.conf and restarting X, don’t you think?

In case you noticed the last option MaxTapTime being set to 0, that is me disabling the tap to click functionality. Why? Because it was just to sensitive. I was sitting in the class as my students were taking an exam and readig Terminally Incoherent comments. At one point I was trying to move my muse pointer and I inadvertently clicked on one of the google video ads that sometimes show up above or below the comment box and my laptop went:

“DUM DUM DUM DUM! THE ICREDIBLE HULK! CRAAAAASH! ROOOOAR! COMMING SOON ON DVD! BA DUM DUM DUM! WHOOSH! KABLOOM!”

By that time I of course scrolled up so I didn’t see the video playing. I was just like “WTF??? Who is watching videos during an exam”. Then I realized it was me. Fun times.

So yeah, tap to click is gonzo for now. I don’t really need it and it was more annoying than useful.