Archive for December, 2007

Installing AUCTex with EmacsW32

Tuesday, December 18th, 2007

Here is part two of my quest to make Emacs my default LaTex IDE on both windows and Linux. Installation and configuration of Emacs and the LaTex add-on AUCTex on Ubuntu was surprisingly easy and uneventful. On windows however I ran into little bit more difficulty.

Of course I could download the precompiled Emacs + AUCTex bundle from the AUCTex website but I wasn’t really thrilled about that. You see, I was already had a nice copy of Emacs on my system - on windows I’m using EmacsW32. What is the difference you ask?

Well, EmacsW32 comes with a nice MSI installer that adds all sorts of registry hooks that make it act as a first class Windows application. It also makes the GUI look more polished and native. I prefer it to other ways of getting Emacs on windows because I get an up to date binaries that work right out of the box.

AUCTex unfortunately does not ship binaries you could just “plug” into place so I had to download the sources and compile them. Compiling? From Source? On windows? Yup, that’s what I said. I can sees shock and disgust sweeping all over your faces. Before you run away let me assure you it’s easy as pie. Well, at least it was for me.

You will need a working copy of gcc and make. How do you get them on Windows? You could always get the MSYS from MinGW. Since I didn’t have MSYS but had a working Cygwin installation I used that. I simply pulled up my cygwin bash sell and did:

$ ./configure	--prefix='c:/Program Files/Emacs/emacs/' 
		--with-texmf-dir='c:/Program Files/MiKTeX 2.5' 
		--with-lispdir='c:/Program Files/Emacs/site-lisp'
$ make
$ make install

You may want to tweak the parameters for the configure script with appropriate paths. As you can see I’m using MiKTeX 2.5 on my machine. If you are using something else, you should probably change that line. Also, if you are not using EmacsW32 then you might need to change the –prefix and –with-lispdir lines to point them to your emacs installation directory. If you get an error, tweak the parameter or download dependencies and try again.

I really had no dependency problems or anything but I don’t remember what exactly did I have in my Cygwin install. It’s possible that you may need to download a package or two like maybe the cygwin Emacs version. Before you ask - I don’t use the cygwin version of Emacs because I don’t feel like running a full instance of X server for the GUI. Besides, EmacsW32 is much more responsive being that it is a native app and all.

Note that I’m using the Windows path notation with inverted searator specifying the drive as c:/ instead of the cygwin notation /cygdrive/c/. Your cygwin installation should be able to map C:/ to /cygdrive/c/. If not you may need to adjust this. If you installed your cygwin in C:\ instead of C:\cygwin then you can just use / to indicate the root drive. This is actually the “smart” way to use cygwin - Steve Yagge says so, and when Steve says something you better listen and take fucking notes.

The make install command should seamlessly slip AUCTex files into your EmacsW32 directory. Unfortunately, you will need to configure your emacs manually to use them. How to do this?

Open up your C:\Program Files\Emacs\site-lisp directory and edit site-start.el file. Add the following lines somewhere:

(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
(require 'tex-mik)
(eval-after-load 'info
       '(add-to-list 'Info-directory-list "c:/Program Files/Emacs/share/info"))
(setq TeX-auto-save t)
(setq TeX-parse-self t)

I actually got this snippet from Oliver Sturm who figured this configuration before me.

When I tried to use the inline preview feature of AUCTex it did not work for me. It game me some odd message saying that “gs” is not a recognized command or something like that. It turns out that it was right. On windws the default ghostscript binary is not called gs but gswin32c.exe. You will need to change this - simply open some LaTex file, pull down the Preview menu, go to Customize and find the GS Command option. Set it to: C:\Program Files\gs\gs8.54\bin\gswin32c.exe. Make sure you are not using the C:\Program Files\Ghostgum\gsview\gsview32.exe binary. That is the default windows DVI viewer which ships with Ghostscript and many people confuse the two.

All that was left was to add a command to convert the DVI files into PDF. AUCTex already ships with a DVI to PS script under Command called FILE (yeah, go figure why they called it that). I simply added the following to my .emacs:

(eval-after-load "tex"
  '(add-to-list 'TeX-command-list
                '("DVI to PDF" "dvipdfm %d" TeX-run-command t t) t))

This will add a DVI to PDF option in the Command menu which will let you generate pdf files.

So, was this really hard? I thought it was a piece of cake, compared to for example setting up that nethack server.

Happy Emacsing everyone!

Redundant Facebook Apps Diluting Service Value?

Monday, December 17th, 2007

Every day I get a bunch of application invitations on Facebook to join some new crazy little thing. There is a septillion of apps on facebook, and the funny thing is that half of them are the same exact thing, just implemented in slightly different way. For example, there are around 20 different “poke” applications, multitude of “wall” replacements. There are also few dozen “Courses App” replacements, but they all mostly suck.

The abundance of silly fun apps like super-pokes, super-walls and etc is not that bad. You just use what your friends use and have fun with it. You could say that users are actually benefiting from the abundance of them giving us a better Facebook experience. Then again, it’s kinda annoying. For one it clutters facebook profiles and makes them look more and more like MySpace pages every day. I liked the clean, and lean design even if it was a tad spartan. But that’s just me - I like simplicity.

Then again, I’m a blogger. I express myself by writing these long ass posts that put most of normal people to sleep around the end of the first paragraph. (I’m not saying you guys are not normal - it’s just that people who comment here seem to be smarter than the average facebook or myspace profile owner.) Other people express themselves by adding more blinkenlights to their profile.

Btw, my favorite question is: “hey, did you hear my new myspace song?”. No of course I didn’t. Apparently you didn’t pay attention when I told you that I have myspace music disabled. Seriously, browsing MySpace without these mandatory greasemonkey plugins is like going back in into the 90’s and browsing the geocities pages with the ubiquitous embedded MIDI’s.

And then there is the redundancy. Am I the only person who sees no difference between the snowball fight, pillow fight, pie fight, dodge ball, tag game, ping pong and the “poke” type application? They are essentially all the same - you send a notification to the other user, and they send one back to you. All of this could be handled by a single central “poke” application. In fact, the Super Poke already supports custom “pokes” where you can actually specify your own action by typing it into a text box. But, since not everyone is using that app, every once in a while someone gets a bright idea.

Hey, how about we make a Facebook app where people could like flick poop at each other. I know, I know all those custom poke apps already let you do things like that, but this one will be better cause we will have cool monkey icons, and we will keep statistics on how many grams of poop you flung, and had flung back at you. That’d be cool, right?

Sigh…

The services which help you to connect with people such as that Courses application suffer even more from this type decentralization. The decision to remove the core Courses app diluted the value of this service. What is the point of having course tracking if your classmates are spread thin over 20 different implementations. I guess the hope was that one of these apps would become dominant one but that did not happen. They are all equally useless. Is there any point in using 6 different courses apps to keep track of people in your classes 5 users at a time?

I’m all for freedom, and I love having choices. I think the whole paradox of choice thing is bullshit. The only people who are confused by having too many choices are those who don’t care enough to do their research. But with social apps you also need to worry about stuff like user base. To many choices dilute the user base. If you are producing a text editor, an OS or a database you may be content to cater exclusively to a very small niche market. The value of your product is not associated with the size of your user base.

On the other hand if you are creating an application that is supposed to help people to interact with eachother on a social network, then the value of your app can be directly measured by the size of your user base. Who needs a networking app that only has 20 users?

What is the solution here? Let’s borrow methodology from the open source community - or more specifically from Linux distributors. How do they deal with the multitude of redundant applications out there? They cherry pick the apps they like and bundle them with the OS. Users are free to install their own and change the defaults, and add more but they get a set of solid popular applications they could start with. Facebook should do the same.

They should embrace the most successful apps and make them part of a “featured applications” package. All the featured apps would be automatically enabled on the new profiles. Existing users would get a notification when an app is added or dropped from the featured list. They should also deprecate their original services and replace them with featured apps. So when Facebook dropped “Courses” they should have picked a popular course app and say “hey, we are deprecating our old courses feature, but you should try this one instead”. Same goes for the Wall and Poke applications - pick the best one, and replace the old system with it.

How would you choose the featured apps? I don’t know - perhaps facebook team could just pick apps which they thing fit the most with their site based on the feature set, user base, support and communication with the authors. Perhaps they could ask the community to vote on apps in different categories. Perhaps set a user base threshold - if you reach a million of users, you automatically get featured. If two apps of the same time both have a million of users then we either pick one, or make the community choose.

How many apps should be on the featured list? I would say no more than 10. You want to have representative apps from each of the popular categories such as the pokes, the walls, course tracking and etc.. The point is to cover the most ground in the least amount of applications. Add too many, and you run into duplicates and dilute value again.

Implementing a featured list give us both the choice, as well as a baseline of useful apps with large user base which provide lots of value to end users. I really think this is the best way to go at this point.

Showdown at Area 51

Sunday, December 16th, 2007

I was flipping channels yesterday, and all of a sudden something grabbed my attention. Hey, this girl looks familiar! As a matter of fact, I actually talked to her once, and I got her autograph! Yay for the 2002 NYC Farscape convention. If you want to see a low res, grainy embarrassing picture of me with the Farscape cast there is one here. Note the mandatory shitty yellow name tag, and me sporting the whole dorkus maximus look over there.

If you go bit back in the archives you know my unhealthy obsession with Gigi Edgley. I knew she was working on some sort of scifi movie all the way back in August 2006. Hell, IMDB did not even list it back then. My cyber stalking skills are far superior it seems. This very movie that I posted about last year just premiered on SciFi Channel yesterday and I hand no clue about it. It was a total fluke that I just stumbled upon it! Which tells me this was fate, divine intervention or some shit like that. I was meant to review this movie, and damn it, I’m going to because no one else will!

This movie sucked. End review.

No seriously, the original title was “Alien vs. Alien” but SciFi apparently renamed it to “Showdown at Area 51″ which is probably the only possible title that is even more tacky than “Alien vs. Alien”. With a title like that, do you really expect a Science Fiction masterpiece? Nah, this is one of those few shitty, low budget flicks that Scifi buys each year so that they can shut up the critics who say that they actually don’t air any original science fiction on their network.

What do you mean we don’t air original SF movies? We had that Alien vs. Alien thing in December. That’s SF - it has the fucking word Alien in the title twice. And that chick from “Firescape” (sic) was in it. No, not Claudia Black, the other one.

Actually, the fact that I sat through this whole movie just shows depth of my obsession with appreciation for Ms. Edgley. I don’t really have any screenshots to show you since I just saw it on TV and I doubt that anyone actually went to the trouble of capping this one yet. So instead here is the promo shot from scifi.com:

Showdown at Area 51

The plot is fairly simple - two aliens get sent to earth. One is a bad guy who is supposed to do something bad, and the other one is a good guy who is sent to stop him. Sigh… I already saw that movie when it was called Terminator, and it was much better back then. Everyone keeps trying trying to cash in on this formula but no one really produces anything of value.

Alien #1 is a bold dude with a tatoo on his face, wearing all leather. Why is it that people from space (and from the future) always wear black leather? Seriously? I will call this first guy baldie because I didn’t bother to remember his space name which doubtlessly have four X’s, 3 V’s and no vowels in it - cause you know that all aliens have names like that.

The alien #2 is a fat guy in a gas mask - cause, apparently, cool prosthetics are expensive and they went all out kitting the other guy in biker leather gear. Gigi and her boyfriend who I think is a park ranger (Ranger Smith let’s call him) - because he wears some ridiculous khaki uniform - somehow get in the middle of the fight between these two. I missed the first 20 or 30 minutes of plot exposition so I’m not really sure how they did that.

Both aliens claim to be good guys but they show it in different ways. For example Baldie kidnaps Gigi to convince her. Gas mask on the other hand decides to convinces Ranger Smith about his good intentions and tell him how baldie is The Real Bad Guy™. This would actually be an interesting plot twist if they actually cared to develop it some more. It turns out that gas mask just wanted a ride in a van, and as soon as they reach destination he decides to kill his new best friend. Baldie shows up to the rescue out of nowhere and you go WTF! They set up this moderately interesting situation where the two pairs could meet and while the aliens fight the humans need to decide which one of them to trust. If they trust the wrong one, and follow his instructions or simply do nothing the earth blows up. So you have some suspense and high tension drama here - actually pretty good shit, right up Gigi’s alley. But of course that would require good writing that does not include phrases such as:

“We need to put the ether-rod into the termination port of the ever-seed.”

But then there are many moments in this movie that actually make no fucking sense. For example there is a scene where baldie and Gigi are in a car, and they hit road block manned by armed soldiers. Baldie decides to go for it, and tank-rush the squad. The soldiers open fire. Lo and behold, not only is the car bulletproof but it actually doesn’t even get scratched up. Once they pass the barricade though some lucky shot breaks off the rear bumper and which point Baldie stops ditches the car and decides to run into the forest with Gigi in tow. In the next scene the car with ranger dude and fat-mask arrives and the same scenario repeats. Their car is also bullet proof.

What’s better is that once they go past the barricade and stop on the other side the soldiers immediately stop shooting decide to pack it in and disappear. They don’t pursue the cars that got past, or even try to investigate them.

No, I’m not kidding - ranger Smith gets out of the car, gas mask tries to kill him, baldie shows up, but the soldiers are fucking gone. Where did they go?

There is another scene where the ranger points a bazooka at the fat alien. The problem is that fatso is lying on the ground, and the he is standing above him. I’m pretty sure that rocket jumping doesn’t really work in real life, so I’m entirely certain how he was planning to get our of the blast area. Unfortunately the alien doesn’t see the silliness of the situation, and actually takes the threat seriously. Sigh… Nothing in this movie really makes much sense.

You will also laugh at the props. For example, the big bad device that will blow up the earth is a glowing traffic cone painted gold. The entry shaft that leads to the resting place of the cone is made out of a plastic garbage can cover but everyone acts as if it was really heavy metal cover. The gas mask’s costume is so laughably pathetic that it’s not even funny. It’s a mess!

As it is the norm in these sort of movies the dialog is atrocious. I could see that Gigi was trying really hard to work with the lines she was given, but there is just no way to deliver some of these gems without looking stupid. You can be the best actor in the world, but the script and direction are very important. If you don’t believe me go watch Revenge of the Sith. Natalie Portman is actually a really good actress, but you probably wouldn’t think that if you only seen that movie. Same applies for Gigi in this flick. She does all the right things though. She is really in character, her emotions are convincing and etc. She is probably the only person on the screen who is actually doing some acting. Everyone else seems to be just pretty content to deliver their lines on cue and move on. And hell, she looks really cute in this one. Sadly she got really shitty lines, and her characters actions made no sense at times. So yes, this role won’t really get her noticed out there. (

But hey, it’s exposure right? She can now put a “lead actress in a Scifi Channel original movie” on her resume. I don’t know. I’m trying to make the best of it. I’m actually surprised she agreed to do this but I guess this movie probably sounded much better in the casting pitch than it actually turned out.

If you are a Gigi fan, you should probably watch this because she looks so damned cute, and gets lots of screen time. If you are not, then watch at your own peril. Seriously, just watch the cute blond girl and don’t even try to think about the plot because there isn’t any. Your best bet is probably to mute the damn thing when Gigi is not on the screen to protect your sanity.

If you are interested the Scifi channel will air the movie again on Thursday (Dec. 20) on 9 pm. I will probably be watching it then to catch the first 20 minutes that I missed.

Living in the Browser

Saturday, December 15th, 2007

If you read yesterday’s post, you know that at least one of my students thinks that the Internet is an operating system. It’s kinda funny, but it really got me thinking. I have been seeing these patterns emerging in the recent years and it seems that for many people Windows is just a bloated background process for running Internet Explorer or Firefox which they use for everything else.

I already mentioned that email clients are virtually unheard of amongst college students. If you ask them about their favorite email client, they will probably tell you about Gmail, Yahoo or AOL. Besides, email seems to be something you use to talk to your mom and grandpa these days. To a lot of students email is a dead medium and they much prefer to use tools like IM, Facebook or Twitter for rapid communication.

Social networks are of course browser based. Those who still use email, usually choose webmail interfaces over old fashioned clients. IM is also slowly moving from the desktop space into the browser space. Meebo was probably the first foray into this market, but with the explosion of Web 2.0 and the AJAX craze, all the major IM networks provide web based clients these days. Gmail has one built right into their webmail client. AIM offers AIMExpress, Yahoo offers their WebMessenger. Even Microsoft jumped onto this bandwagon with their own brand of MSN web messenger.

Btw, don’t you guys miss the days when you could prevent your employees and/or student from chatting on your time by simply giving them user level privileges instead of admin, so that they couldn’t install the clients. Sigh… These days are long gone - now if you want to be a BOFH, you need to do content filtering. (

But that’s not all. There is like a dozen of AJAX based office versions that let you create basic documents, spreadsheets and presentations and export them into several different formats. Abundance of pastebins and services such as Jottit eliminate the need to use the good old notepad for quick notes.

Virtually, every aspect of average users daily life is moving off their desktop and into the online space. All this user needs these days is just a browser and perhaps a rudimentary file manager. In my UI Evolution piece I theorized that the line between web and desktop applications will be blurred via the use of tools like Google Gears and rich AJAX based interfaces. Now I’m not even so sure - why blend the two if you could simply provide users with a browser and internet connection and let them worry about everything else on their own?

This is why the cheepo Walmart Linux laptops are selling like hotcakes. If you told me something like this would happen two years ago, I would not believe you. But it’s true, clueless people are buying Linux machines and are loving them. Why? Because for these customers desktop applications are really becoming irrelevant. All they need is a big icon on the desktop that says “double click for internets” and they are good to go. And since a lot of users got burned by the scary new look of IE 7.0 the might actually think that nicely skinned Firefox or Opera is a nice return to what they knew from IE 6.0 rather than some arcane evil magic as before.

Of course geeks like you and me will still have strong opinions about operating systems, file managers, browsers, email clients and etc. We will still tweak our systems and learn how they work. Gamers will still purchase crazy ass rigs with all the newest bells and whistles. But the general public seems to be blissfully drifting towards a thin-client like infrastructure where their local resources are fully focused on running some kind of browser and everything else is done online. And as long as that browser looks and feels like other browsers, and can deal with the Web 2.0 things, the brand of the browser and the type of OS won’t really even register for them.

On the 2007 Final Exams

Friday, December 14th, 2007

The other day I gave one of my sections their final exam. The thing is mostly multiple choice but I do give them couple of optional open ended questions at the end of the test so that they can make up for the points they might have lost when they confused XML with SQL or when they told me that Excel is a database, and WWW==Internet. I put different sorts of questions there each semester but most of them are relatively common sense things that most people should get if they actually went to class, and at least skimmed through the lecture slides.

For example, I had a whole lecture on operating systems, where I explained what an OS is, what does it do, and compared and contrasted several modern operating systems. So I had few slides on windows, few slides on Mac OS and few slides on Linux and Unix. That included a slide on Gnu and GPL. Then I reiterated GPL when we talked about software licensing. So I figured I can ask them what operating system is distributed for free under GPL.

Most people left this question blank. Quite a few correctly answered that it was Linux. Then there was someone who put “the internet” in the answer box. WTF?

This pretty much tells me that this person not only doesn’t have the faintest clue what an operating system or GPL license is, but also does not really know how the internet works. And we have actually spent like 3 lectures on internet, networking, online security and web related topics alone. Furthermore, questions related to these topics were a large part of this exam.

And I really don’t think this was a simple case of mis-understanding the question. I mean, how many ways you can interpret:

What operating system is distributed for free under GPL (General Public License)?

Besides, someone asked me to clarify this question during the exam, and I specifically said that the answer is one of the 4 different operating systems we talked about in class like Windows, Mac OS, Unix and so on. I specifically didn’t say Linux so that I wouldn’t give it away but that should have clued them in that the answer is probably not “the internet”.

Of course another person answered the same question with “freeware”. Apparently I have failed to impart any sort of usable knowledge on these two people this semester. Sigh…

Another optional question I gave them was a bit dirty:

1+1=10. Explain why this is true.

The answer is one word: binary. We spent tons of time learning how to convert numbers into binary, I showed them a flash game that they could use to practice, and we went over binary once again when talking about IP addresses. Why do octets in the IP can only go up to 255? Because they are 8 bit long and 11111111b == 255.

I also told them the “there are only 10 kinds of people in the world” joke. They did not appreciate it, just like they didn’t think that recursive acronyms are cool ( but it should have been a hint. Some people got it, some left it blank, and one person got all philosophical on my ass:

This is true, because while the obvious answer is 2, there can be many interpretations and answers possible to the equation.

And I’m paraphrasing here, because the actual answer was a contorted, fragmentary sentence but I’m guessing that this was the gist of it. While obviously not the answer I was looking for, this is actually correct in a way. The correctness of that formula actually depends on the way we define the terms and operators which are it’s components. Usually when we write 1+1 we mean base 10 integers in Arabic numeral notation. I thought I was being clever when I silently switched the base, but by changing the rules according to which the equation was evaluated I really removed the whole framework that grounded this equation. I assumed that students will recognize 10 as binary 2 and guess that I switched the base.

Then again, if this was a C++ class, the students could say that I overloaded the operator “+” in such a way that a+b becomes a*(10*b) or something like that. And that would be an absolutely valid answer.

I could also assume that 1 is not a numeric value but a logical symbol and that in this fictional symbolic system 1+1 can be contracted as 10 in the same way as in English “is not” can be contracted to “isn’t”. Hell, when you assume that the symbols involved are not necessarily Arabic numerals there is an infinite number of possible reasons why this equation might be true.

So… Partial credit? I mean, I’m pretty sure the student was just trying to apply weapons grade bullshit to a question he/she had no clue about. But it made me think…

Anyway, this question will not appear on the other test.