# Terminally Incoherent

Utterly random, incoherent and disjointed rants and ramblings...

## Sunday, April 30, 2006

### Twin Sisters

Is it just me or is Haley Berry stealing Gigi Edgley's Chiana look in X3? I swear, X3 storm and Chiana look like they were separated at birth:

If they painted Haley the same grayish paint, she could play Chiana's sister :P

Can't wait for X3. So far the X-men movies have been getting better. X1 was ok, X2 was better, so if that trend continues X3 should be actually a good movie. But then again, who knows.

## Saturday, April 29, 2006

### Monster Mega Breackfast

Monster Mega Breackfast,
Ark and me went to the Red Hawk Diner today. We made the mistake of ordering their Mega Meals. He ordered the Gut Buster and I got the 12" Pankakes.

To my dismay, these pankakes were called 12" because they have a 12" diameter. Duh! I did not expect them to be that big. I don't know what the hell was I thinking. They are fucking huge ass, mastodonic, garganduan pankakes!

The manager told me that if I eat them both, my meal is free :P I tried, but couldn't do it. I didn't even finish one of them. I think I need to bring Nick, our local eathing champion, with me next time :)

Needless to say, I think I'm done with pankakes for a while :P

## Friday, April 28, 2006

### Best Fan Film Ever!

Rayan vs Dorkman must be one of the most awesome Star Wars fan films I have ever seen. Check it out!

### LaTex Annoyances

I really like LaTex. I much prefer to typset my papers, rather than manufacture them in word. But every once in a while, I find little things that make using LaTex a PITA.

For example, in my document, I have text that often needs to be repeated. For example, I need the title on the titlepage (duh), the copyright page, the signature page and etc... Same goes for actor. I spent countless hours searching how to extract data from the built in variables initialized via the standard \author and \title calls. I even emailed my old mentor in all things LaTex and he also had no clue.

So I decided to fake it:

\newcommand{\printtitle}{Title of My Paper}

Now wherever I need to put title, I just use \printtitle and I'm done. This is not a perfect solution, but it works. At least as long as you don't start nesting functions. For example if you do:

\uppercase{\printtitle}

You get lowercase letters. Why? Latex does not have a proper stack, and so nesting functions may or may not work depending on circumstances. At least that's what I have been told.

This is annoying as shit. Anyone knows the proper way to do this? I know that the answer must be locked up somewhere deap within article.cls which includes the implementation of the \maketitle call. But for the life of me, I can't decipher how to extract title and author from there.

### What is a pirate?

Abso-fucking-lutely priceless!

## Thursday, April 27, 2006

### Makes you think...

Note, this video is over an hour long, but it is worth it:

Think about this stuff when you watch United 93. Is United 93 an inspirational story, or a governmental propaganda?

Everything you know about 9/11 might be a lie. Including the story of United 93. Watch the clip I posted. It really asks allot of good questions.

## Wednesday, April 26, 2006

### Tape Drives for $2k? My hardware people recomend switching to a HP LTO2 tape drive for backups. I looked at their qoute, and I nearly fell off my chair. They were asking almost$2,000 just for the drive! Holy poop on a stick!

I was so shocked I actually went to HP website to verify the pricing. And yeah, it is within the ballpark. This is crazy! Absolutely in-fucking-sane. I can get a semi-decent, brand new desktop for that price! WTF! I can't understand why would these things be so damn expensive!

Why don't I just buy 5 250GB firewire drives for half the price of that drive, and use them to image my disk every day of the week?


Now I had 7 tab delimited text files that could be easily imported into Excel.

That was easy! Easy as π!

### Coding AJAXified pages drives me nuts!

The little inconsistencies between the way IE, and Firefox handle various DOM requests will drive me mad one day. Why can't we just all code to the standard? :(

For example, I wanted to have a collapsible table which displays list of entries. You click on a 'remove' checkbox next to one entry, and it goes away as the table neatly collapses to fill in the gap. In the background you have asynchronous call to remove this row from the db. One would think that the hardest part would be the db call. But that was easy!

First you create the http request object:

request_o = new ActiveXObject("Microsoft.XMLHTTP"); // IErequest_o = new XMLHttpRequest(); // everyone else

Then I send a post request to a php script (here aptly named ajax_request_handler.php..

request_o.open('post', 'ajax_request_handler.php');request_o.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');request_o.http.send('rowid=' + rowid);

This works like an oridinary post request from a web form (ie. php can access the sent value via $_POST["rowid"]). At this point I don't care about error handling. If there was some error then the php script will fail quietly and no harm is done. The hard part was collapsing the table! What I initially did is I marked the tr tags with id's representing row numbers: <tr id="row_1"> ... </tr> Then I have onChange javascript call to handle the reformatting and AJAX call: <input type='checkbox' name='remove' onChange='removeRow("row_1");'> I implement this function in Javascript: function removeRow(rowid){ document.getElementByID(rowid).innerHTML="";} So in effect the contents of the <ltr> tag are set to an empty string. Should work, eh? It did work but only on IE! FF refused to cooperate - and I'm not sure why. I know that the browser does implement the innerHTML property. I could for example grab all the code inside the <tr> tag but I could not erease it. Any clue why? After several hours of agonizing over this, and constant browser flipping (fix some code, test in IE, test in FF, fix some code, etc...) I gave up and decided to change approach. Instead of removing the information, I would just hide it: document.getElementByID(rowid).style.display="none"; This is not necessarily what I initially had in mind but it works in both browsers. Good enough for me. When the user refreshes the page the hidden entries will be gone anyway, because they were removed from the DB via AJAX call. Of course, it was still far from perfect. FF and IE handle the onChange attribute differently! In FF, when I click on the checkbox the entry is removed and collapsed immediately. In IE however it sticks around. I have to click on the checkbox, and then click on something else for onChange to be registered. Gah! I didn't know that. I don't use fucking IE! I thought that for checkboxes onChange is handled the same way as onClick - immidiately. I guess MS developers thought differently. So I changed my onChange to onClick just to be consistent. So far everything seems to work correctly. Sigh.. Why does client side coding have to be so painful? ## Tuesday, April 04, 2006 ### It's pronounced Au-then-ti-ca-tion Can I ask a question? Is it really that difficult to pronounce the word authentication? Seriously! I don't know. I have a little bit of an accent going, so I do not always pronounce things the right way. For example, when I say multi-threaded it kindoff comes out sounding like the infamous "Multipas" from the Fifth Element most of the time :P Saying "thirty three" kills me every single time. You sneaky English people with your soft r's and your "th" sounds. I get it wrong 90% of the time :P So I usually do not make fun of people mispronouncing words (unless they happen to be the president of the united states - you have no excuse then), especially when they speak with an accent. But most people I work with are native English speakers - and yet they can never pronounce authentication. Even if I say it first: Me: "Now check Outgoing server requires authentication" Luser: "server requires au... au.. authentification... ok, checked" Really! It's pronounced au-then-ti-ca-tion! Much easier than 33 in my opinion! I mean it's not like I'm making you say for example: "w szczebrzeszynie chrząszcz brzmi w trzcinie" or "konstantynopolitańczykowianeczka". ### Gmail Manager Firefox Extension B0rked If you use the Gmail Manager extension for Firefox you probably have noticed that it could not log in today. It appears that Google has changed something with their protocol again. However, the newest version 0.4.3.5 (dated for April 3rd) fixes this. I upgraded, and I'm able to receive gmail notifications again. I kinda felt disconnected without that little icon showing me how many emails I got so far. Todd Long is the man! He fixed the extension the same day Google broke it! Wohoo! Thank's Todd! ## Monday, April 03, 2006 ### Inuyasha = DragonBall-Z for Girls LOL Image: VGCats disses Inuyasha Hehehe! It so is DragonBall-Z for girls! LOLOL! My brother was always a big Ranma fan, so I kindoff got suckered into watching Inuyasha on the account off "hey, this was done by Rumiko Takashi". What's funny, is that when you think about it, you can do almost 1:1 mapping of Ranma characters to Inuyasha characters. Just try it: Ranma = Inuyasha Akane = Kogome Ryoga = Koga Happosai = Totosai/Myoga and etc.. If you never saw the show, here is what you need to know: Inuyasha is a guy with a Really Big Sword™ which can deliver a single devastating super move that can kill a 100 daemons in one go. He keeps winning with daemons that are much more powerful than him simply using that one move (he gets like upgrades to the move later on, but it's still basically the same damn thing). Then there is some questing plot line (searching for sacred jewel shards), and a classic shipper bent for girls (think Inuyasha is to Kogome as Moulder is to Scully or John Crichton is to Aeryn Sun). So yes, DragonBall-Z for girls kinda sums it up pretty well :P Strangely enough, I find it more watchable than Dragonball - perhaps because Inuyasha lacks those super powerful individuals that can destroy planets with a fart. Or perhaps because most of Inuyasha combat scenes do not streach longer than 1-2 episodes. Sooner or later every villain gets a Wind Scar (Inuyasha's main super move) in the face, and dies. Consistency, ladies and gentlemen is they key :P Of course if you were to choose, I would say watch Fullmetal Alchemist instead of Inuyasha. Fullmetal is simply much better, and more original show. Not mentioning Evangelion - which is in a league of it's own. ### Code Segments in Latex Whenever I copy and paste some code segments into my Latex documents, the verbatim environment eats my tabs. Apparently it is a feature, so I usually make my text editor convert tabs to n spaces before I import or copy the code into Kile. But that's annoying as hell! The other day I found a simple and elegant solution. Use moreverb package. Somewhere at the beginning of the document do: \usepackage{moreverb} Then, instead of using normal verbatim environment do: \begin{verbatimtab}% code with tabs\end{verbatimtab} Easy as pie! The only downside - Kile does not consider verbatimtab to be a verbatim like environment so it does not highlight the text inside a different color like it does for standard verbatim blocks. But that's a small price to pay for the added convenience. ### MPAA still doesn't get it. This is priceless. zewrestler told me about it this morning, and now I just found this on boingboing. Apparently MPAA intends to sell movie downloads for twice the price of a DVD. of course we are talking about a DRM, crippled, windows only versions. Brilliant! Abso-fucking-lutely brilliant! This will definitely put a stop to all that illegal downloading. After all, a free, uncrippled, platform independent version can't compete with a locked down, super-expensive, windows-ony one... Er, wait... Seriously, who does market research for these people? Do they even do market research at all? If they would offer the movies at 1/2 price of the DVD on account of the stupid DRM cripplage then maybe they would get some buyers. Let me spell it for you: iTunes! The reason why they are so popular is because the songs seem to be cheap! They are not, but for an average Joe 99 cents for a crippled song sounds reasonable. In the same way,$5 for a crippled movie sounds semi-decent. Think about it - after you pay off costs of online distribution (which is incredibly cheap - you will usually pay a flat monthly fee for hosting and maintenance and bandwidth) it's pure profit. They already did a killing in the box office, profited from DVD sales - and etc.. Online sales are just free cash for them.

But no... Free cash is not enough. They want to sell you downloads for twice the cost of the DVD even though it costs them less than a quarter of the DVD price to host it.

Ladies and gentlemen - this is exactly how corporate greed kills business. Sigh...

## Sunday, April 02, 2006

### Matlab vs Java

This SUCKS balls! I was at school today, trying to run my NMF algorithm on a 4MB image file. I started running the test around 12pm - it was chugging along happily as I was working on my Programming Languages homework (which is crazy btw).

I left at 6, and my program was still running. That's 6 hours and counting. What's funny is that Dr. Robila implemented the same algo in Matlab and it processed the very same image in under 5 minutes. Aaaagh!

Of course you need to take into consideration that in Matlab matrix multiplication, or a transpose is accomplished with a single operator. This means that there are years of tweaking, and anal optimization behind each of these. I'm doing all of this using loops, and my data is stored in Java's DataBuffers. This means that every access is a function call.

I'm thinking about optimizing this using arrays. I will have to look into how much faster is it to access an element of a multidimensional array, as opposed to accessing an element of a DataBuffer. Perhaps it is not even worth bothering, as Java arrays are sort-of-objects anyway.

If that damn JDS machine freezes before finishing this 6+ hour run, I will take a fucking baseball bat to it or something :P I better see some results tomorrow!

### Online Calculator Which Works

Yeah, I know that there is always google to calculate stuff online, but calcr is done with AJAX! This means no waiting for page to reload to see the result!

These guys learned their web design style from Google too - the page is minimalistic, clean and spiffy. It looks really, really simple, but there has to be allot of AJAX code underneath. I love it.

My only suggestion would be - allow the users to pick between degrees/radians for the trig functions. Other than that, it is really neat web app.

Of course I lately do most of my calculations in Octave. I'm continually amazed how much functionality does that environment have. It kicks the shit out of the good old bc :P

### Time.gov fears DDOS during Daylight Savings switch?

time.gov ph34rz DDOS
I don't trust any clocks today. This is what happens when some of your clocks roll over to daylight savings automatically, and some do not. My alarm clock didn't, but my cell phone, laptop, desktop and VCR did. So today whenever check the time, I wonder if this particular clock rolls over automatically or not.

So just to be sure I popped over to time.gov, and this is what I saw (see the screenshot). Apparently, they disable the usual animated clock on the switch days fearing a massive DDOS from time confused citizenry :P This is gay. Hire a better sysadmin people - preferably one that knows a little bit about load balancing, and high traffic management. And if that's not enough, beef up your server for god's sake!

It is a damn shame to see a very popular and useful governmental site removing features during high-traffic days. It kindoff indicates a piss-poor hardware and/or maintenance. This means that theoretically time.gov could be slashdoted, farked or simply DDOS'ed by some script kiddie. And this is just ridiculous. It makes you wonder where your taxes are going...

### Ghostly Farts in the Shell

I was sitting here, at my computer doing some stuff and Ghost in the Shell: Standalone Complex was playing in the background. My brother was in the same room playing some game. All of a sudden, he started asking me if I heard farting noises. I told him that he is hearing things. :P

But then I also started hearing them. We started looking around the room and we finally realized that the noises are coming from the TV. But why on earth would there be farting noises on Ghost in the Shell? I started paying attention to the show, and whenever someone bent over or made a silly face there was an audible fart effect. WTF?

For few minutes we were watching this, and we could not believe that this was going on. Then I looked at the calendar, and I realized that it was April Fools :P Way to go [adult-swim]! LOL I completely forgot about April Fools!

As a side note, if I knew what was going on, I would play along and keep telling my brother that he is hearing shit. For a minute there he was actually thinking that he was loosing his mind. hehe

This went till the end of the episode. They also kept farting throughout Fullmetal Alchemist. I found it amusing at first, then absolutely hilarious, then annoying, then hilarious again. Finally, it just got plain old boring. I think they stopped it at midnight or something...

They also aired a Chuck Norris and Mr. T cartoons. LOL