Archive for October, 2006

OF error messages, emoticons and happy endings

Yesterday was one of my worst computer days of my life. I had trouble installing debian on a particular area on my hard drive, consistently. I tried reinstalling about 15 times on that area but every time something would fail. And the annoying thing about the debian install is the fact that it does never give error messages like beloved windows. It just stops bang in the middle, no sign of life.

Even naughtier than that was the way windows treated me. I went back to windows after the hundredth unsuccessful debian netinstall. So I decide that windows can have the crappy partition and I?ll give a better area of my hard drive to debian.? So I go to disk management (remember kids, this is stupid, use a decent partition manager) and when I try erasing the partition, Windows gives me a nice little bubble saying that there was a delayed write and my partitions are lost. And that too in a little warning bubble. Hello? Do you fu*ing hear me Mr. Gates? 3 years of music collections, 5698 songs, 29.2GB, all wiped. All my project work, all my downloads, all my server data, visual studio, and everything all GONE and what does it show me? A stupid mofoking bubble which disappears when I click on it and it?s gone.

I almost threw up and felt dizzy. I always felt secure about my data. I never really faced hard drive problems before. So I had to recollect myself and I had a dvd full of diagnostic tools and basically a computer unf***ing kit. I recovered my partitions and got my data back. I knew what was wrong. I had a partition table corruption. This was in a way my worst fear. I had to perform a full low level wipe of my 80gb hard drive. I freed up space on my backup 40 gb hard drive and backed up my most important files and mirrored some of my most precious and rare music on a dvd.

I nearly fainted after I had to confirm the wipe. I used a bootup utility and it asked for four confirmations making absolutely sure I knew what I was doing. It took nearly 20 mins to finish the job.

Once it was done, I pulled my Fedora Core 6 DVD out. Funny really. I got windows XP three years after it released. I?m installing operating systems three days after they release now. The install worked fine with only one minor hitch and the desktop looked great. Then I was greeted by pleasant news that there?ll be a local mirror for fedora core 6 repositories available in a couple of days. There was a happy ending after all.

More on FC6 later.

On an endnote, I might add to my shock and amazement the brilliance of mandriva programmers. Earlier I?d tried installing mandriva on the faulty partition and this is what it told me:

?I?m afraid I can?t read the partition tables on /dev/hdb/ because the partition tables may be corrupt :( Of course, I can erase the partition tables and rewrite them but I?m afraid you?ll lose all your data and partitions. Or you can configure the filesystem manually with partdrake.

Do you agree to lose all your data??

(o) Yes
( ) No

Whoah, a first person error message. Microsoft should take a word? or two from these guys. It won?t be long before we?ll be seeing.

?oops, my bad?

And yes. There was indeed an emoticon in my error message.

Wordpress 2.0.5 out

If you haven’t heard already, wordpress 2.0.5 was released 8 hours ago(at the point of writing this).

http://wordpress.org/development/2006/10/205-ronan/

I saw this on my admin interface and upgraded. Apparently it’s mainly security fixes. This is a disturbing thing for me. Are all software based on only security fixes? People are a lot more interested nowadays on fixing security rather than adding features. It’s that everyone’s so bothered about security, there’s really not that many hackers around who want to exploit it and even if they wanted to exploit your site or system, there’s no stopping them.

I upgraded, nothing new. But there’s nothing wrong with wordpress right now anyways.

How to install incompatible extensions in firefox 2.

Many people have firefox extensions they can’t live without. And some are incompatible with firefox 2.0. The funny part is that most extensions work with firefox 2.0, here’s how to do it:

Disclaimer: This might not work with all extensions. I use firefox with only one extension(CSS viewer). This did not work with 2.0 but after doing this, it worked. A lot of other extensions worked to.

  1. Back up your stuff: Things can go wrong. Though it’s not likely, there is a small chance the extension can mess things up.
  2. Find the download page for the extension you want.
  3. Right click the install link and click “save link as” and save it somewhere you can find it.
  4. Open the file with an archiving utility like winrar/winzip or tar.
  5. Extract all the files.
  6. Open the install.rdf. and look for a section that looks like this - the (=< and )=>
    (em:minVersion)1.0(/em:minVersion)
    (em:maxVersion)1.5.0.*(/em:maxVersion)
  7. Change it to this
    (/em:minVersion)1.0(/em:minVersion)
    (/em:maxVersion)2.0(/em:maxVersion)
    (I can’t use angle brackets as firefox reads it as html)
  8. Save it and zip the entire folder again, with the install.rdf and manifest in the root directory. Save the file as .xpi file.
  9. Drag and drop this new xpi file into firefox, and install it when the prompt comes.
  10. Enjoy, hopefully.

Radiant AI - This is awesome and freaky

The Elder Scrolls 4 - Oblivion is one of the best and easily the most technically advanced game that I’d played (I’d played it a long while back). One thing in particular that surprised me was the AI. I sometimes used to follow around NPC to see where he goes and the AI was remarkably lifelike, and I stumbled across an interview with the developers of bethesda and the radiant AI, and how the spoke of the AI, which’d gotten so complicated so that the following disturbing situations arose:

1. One character was given a rake and the goal “rake leaves”; another was given a broom and the goal “sweep paths,” and this worked smoothly. Then they swapped the items, so that the raker was given a broom and the sweeper was given the rake. In the end, one of them killed the other so he could get the proper item.
2. In another test, a minotaur was given a task of protecting a unicorn. However, the Minotaur repeatedly tried to kill the unicorn because he was set to be an aggressive creature.
3. In one Dark Brotherhood quest, the player can meet up with a shady merchant who sells skooma, an in-game drug. During testing, the NPC would be dead when the player got to him. The reason was that NPCs from the local skooma den were trying to get their fix, did not have any money, and so were killing the merchant to get it.
4. While testing to confirm that the physics models for a magical item known as the “Skull of Corruption,” which creates an evil copy of the character/monster it is used on, were working properly, a tester dropped the item on the ground. An NPC immediately picked it up and used it on the player character, creating a copy of him that proceeded to kill every NPC in sight.
5. In one test, after a guard became hungry and left his post in search of food, the other guards followed to arrest him. The town people looted the town shops, due to lack of guards.

Bethesda worked to fix these issues, balancing an NPC’s needs against his penchant for destruction so that the game world still functions in a usable fashion. In-game there are over 1,000 different NPCs, not including randomly spawned monsters and bandits. The result is that the AI in the release version is much reduced, only featuring NPC schedules.

Apparently, the developers did not mean for this to happen, and the final version had to be dumbed down but still I found some disturbing AI.

Now this makes me question: “If a game AI can go out of hand, if we dabble with real AI, and things can really go out of hand.” What this might mean is that the terminator type of story might not be so far away after all.

Visual C++ Rocks

I made quite a bit of progress in my opengl, more on this later. But I was assigned another task for kshitij webteam work.

Material: 250 pages of share prices copy-pasted into a .doc file.
Task: Add all the data into a sql database
Current proposed solution:
Copy paste. Will require an average user about 6-7 hours of work. And prone to be very buggy.

What I tried to do:
Convert the html into unicode and parse it. Strip out all formatting and tags between << and >>. Now look for a repeating pattern and store the appropriate data in a memory buffer from which you make an sql file where all the commands are placed for easy addition into a server via phpmyadmin for web access and php use.

My experience:
I used visual studio for the first time in a non guided project. Since I was a veteran of writing quick easy console programs, I was able to get hello world program running with medium effort. I got up some reference docs about CString in firefox in the background and started the coding. Wrote a little testing function with CStrings to familarize myself with them and things worked fine. I tried printing them with cout, when I had a error. After some typecasting issues, I tried using the GetBuffer function to make some use but it just kept printing the memory address of the variable, and even printf did the same thing. I looked online and realized cout and cstring don’t like each other. So I decided to chuck it and wrote the code in dev-c++ 5beta, and the code compiled. I haven’t used STL much so I resorted to using strings in their most primitive format and wrote a simple, surprisingly efficient code to parse the entire code and ignore anything unless an >> is encountered and until a <<. The code compiled but the compiler kept telling me that the fstream header was deperceated. I didn’t have time to look in the net for updated headers. I ended up uysing them anyway and they worked surprisingly well. So I ran them on the html code generated by word and the results was scary. The size of the file, instead of falling, increased by a factor of four and the text was unreadable. Some tweaking later realized that this is no ordinary html, so had to abandon that. Seems like we’ll have to copy paste. I went to a seniors room and he proposed something that made me want to kick myself.

His solution:
Copy paste the entire document in excel and export in csv after applying delimiters and then adding to the sql database. Too simple to be true, and it dind’t work because there was an inconsistent number of fields.

My final solution:
Make the file into excel and export as a comma seperated values file. This worked but made no sense when viewed raw. So I wrote code to first load a large number of lines into a buffer. Sort it into the four - the three tables and junk lines. Write three seperate files and independently parse them and make loading of files into the sql easy.

The current problem:
I was crippled without cout to display realtime debugging information(I still don’t use all the great debugging features like watches yet, for some reason) i display values of results of critical function for debugging purposes. That and cstring still had some problems. Ultimately rushin solved my problem by telling me that there are inbuilt console printing functions. And that rocks. Now with cfile and cstring in my palm I can fix this up.

But not today. Have to mug and do illu kaam.
will Update when done.

OpenGL - Day 1

I have to learn opengl and finally decided to get my ass to the seat and learn it. I always slinked away when trying to learn it, because of the tremondous amount of code I had to write for it.
I got the visual studio 2005 and installed visual c++, and went to This great tutorial site where I did five lessons till now.

The first lesson was bad. I had to write about 450 lines of code to produce a black screen.
Lesson 2: draw a triangle and square with 20 more lines. not bad
Lesson 3: blended colors. Not bad. And add rotation while you’re at it
Lesson 4: Make the triangle and square 3d. Now we’re getting somewhere
Lesson 5: Map a bitmap as a texture. Now we’re cooking and the total comes out to 600 lines. Neat!!!

I tried loading several bitmaps, of all sizes and it handled even hi-res images beautifully. At the end of the day, you can see a screenshot of my work. A six sided cube with Gordon Freenman
mapped from a 500*500 texture. Part of my code is visible too :) I’ll upload the stuff when I do something nice.

Free Image Hosting at www.ImageShack.us

It’s been a while

I have a long, yet justified absence and I apologize to all two of you who actually read this stuff.

I’ve been studying. Things look bleak on the academic front and reinforcements are in order.
Linux: Fiddling around with debian and ubuntu on vmware. I’m downloading sabayon.
Coding: Learning Visual C++ gui programming
Illu kaam when I can(I should do a bit more)
Exercise
Going and watching WTMS practice

so I justified my abence ad assure that I’ll write more soon.

Why I installed debian over my copy of vista rc2 Part 2

This is part 2 of a 2 part article.
Read Part 1 Here.

I have a seeming split personality when it comes to open source and free(both cost and gratis) software. I’ve used free software, and paid ones extensively. My argument is that:
suppose the free software is so feature rich so that it can compare to paid software, the devolopers of the proprietary closed software need to sell at least something to make a living. If open source was really all that good, why aren’t we living in a world with free software everywhere, somehow it makes sense to think that if you’re really gonna use something, use a paid system instead. But of course, most paid software is severely overpriced.

I was really skeptical about Linux from the beginning.
“So you’re telling me this is can allow me to work with my files, programs, surf the net, play my music, allow me to write programs and compile them, and do a lot more than that. All that included in a single package, with free Microsoft-office like software, Hmmmm, so tell me why we don’t live in a world with free gasoline, and there are more Ferrari than bicycles”(ok, pathetic analogy, but you get the point)

So you expect me to change over to something built by a few hackers with a little time to kill on their hands. Unlearn whatever I know and relearn something new.

We come to a key aspect of Linux at that time and even now. Unlearning. Unlearn the control panel, unlearn the simple, powerless interfaces, unlearn the double click install. Learning is no big deal, but I kept asking “why isn’t there a neat little place to uninstall all my stuff”. and where’s the cute little office assistant.

But still, though the glass seemed fake, it looked greener on the other side. I got hold of linux isos and burnt them when I got my new computer. I had installed xp before and the first distro I tried was mandrake 10.1, it was 2003 I think then. I installed it and to my shock, it blew up my windows bootloader. But I didn’t give up and still kept trying. I eventually had tried knoppix, red hat (before it was known as fedora project) and fedora cores 3, 4, all over 6-7 times each, each time failing and giving up in 2-3 hours as sound/video drivers were unavailable. I’d do something stupid and it’d mess everything up. I eventually after a few months’ break, tried out Slackware, suse(many times over), Debian, Ubuntu, kubuntu, xubuntu, edubuntu, Gentoo, mandriva 2007, pclinuxos, and to my dismay, the kororaga xgl cd which didn’t work.

My favorites so far:
1. Debian (this is probably obvious)
2. Kubuntu (this is based on the debian core and is easier to install but had some hitch for me)
3. Suse

So let me stop with my personal history (I’ve been known to do that, annoying. I know)

My question is that: Is the grass on the other side actually greener. Can Linux actually compete against a full blown vista home or ultimate edition. I’ll actually take an unbiased stand.

A: The installation.
Vista is better to install compared to suse which requires some more partitioning skills and package selection can be a little daunting. Debian is really difficult to install. But Kubuntu/Ubuntu is a breeze to install.
During XP or vista installation, you have to watch a percentage meter rise, but in (k)ubuntu, you can actually browse the net, listen to music, read your mail while you’re installing. No kidding.

B: Drivers and Inital setup:
Windows wins hands down any day. “I have a superfking powerful nvidia 7600GT that I payed 13000 big ones for, why the hell do you include drivers from every god-forsaken 1980 graphics drivers, but not this? Ohhhh!!! I see it’s not opensource or something. Oh is that. Well then @#$% you!!!”
I needn’t install drivers for vista for anything, but a
sudo apt-get install nvidia-glx would do it for debian systems for me.

C: Customizability:
Installing themes in Windows XP required buying proprietary software like windowblinds, but for debian, a simple visit to your desktop manager site gives you countless options to expand. But windows has a nicer control panel system, but yast tool from suse seems like it’s pretty good.

D:Speed:
Because of my great *blush* (thank you parents) hardware, I haven’t seen anything really different. Linux takes a tad bit longer to boot up though.

E: Compatibility
Wine can do quite a bit but it’s not quite enough. Windows can’t run linux programs and linux can run most simple and some slightly complex windows applications. One thing I love to do is to run virtual machines like VMWare but that’s again a proprietary software even for linux. There are several (rather 2) other systems for linux, Cedega transgaming claims to be able to even install elder scrolls 4 oblivion (which, by the way, is a great game, I should write about it soon) And crossover office, a more enhanced and easy to use wine.

F: Bundled Programs
Windows: Notepad, minesweeper and the likes.
Any linux distro: More software than you’ll ever need

Now comes the more debian specific thing.
I prefer debian not because of all the free software and liscensing and that’s more politics than software. I discovered the magic of one word: APT. I still have no clue what it means(if you do plz comment with it). Apparently it can install any software, any software that’s written for linux with a single click. It’s as easy as going to the package manager, finding the one you want and clicking apply, and the software is installed.

Now windows has the double click install, but this involves going to the site, finding a download mirror and then downloading the installlation file locally which has a lot of stuff bundled with it. Say you’re downloading a program based on java, it’ll have java re bundled with it most probably making it big and bloated. In apt, it checks for dependancies, if I get a java app, it checks if hava is installed and if it’s not, it then downloads it. It may seem simple, and useless, but you get what you need with what you want, and with no annoying error messages.

F: EYE CANDY: The smooth moving of windows and all the plesant effects.
If you think vista’s ui and flying windows and all was pretty, google out xgl+compiz and get blown away.

G: Upgrades.
Debian clobbers, skins and decapitates windows (almost all linux distros do it) when it comes to upgrades. While windows allows you to download updates, that too security updates to core components, but debian updates everything, and when I say everything, I mean EVERYTHING!!!. In my five days of using it, I found the wonder of the upgrade. I was using a piece of software (something to do with personal organization) and I kept wishing there was a little feature that would make things better. I let the whole system upgrade and I noticed that feature appeared the next day. It’s that simple.

Now the main and final reason I switched to debian. Sorry linux fanatics, sorry debian fanatics and free software supporters, it’s not because of you. It’s because my institute has a local self-updating debian mirror containing most packages that are available. This means while I have dialup speeds for the internet, I can have all my software downloads and updates at 100mbps. Sweet eh?

It’d take me ages to download remote programs like ruby on rails and stuff like that. That’s why I switched to debian over vista.
My apologies to everyone for not making any point.
Have a nice day.
You can turn off your computer now.

Why I installed debian over my copy of vista rc2

This is part 1 of a 2 part article.
Part 2 here

I was bored. Terribly bored. Bored of Five years of the same goddamn desktop. The blue and the green and the supposed eye candy. I had kubuntu installed on another partition and was excited but I did something stupid and destroyed it.

I was pretty sure of not switching to linux because I liked windows, despite all the negative hype, and had hope that vista would have something interesting up it’s sleeve. Then, driven by the lack of things to do, I got a copy of vista rc2, 5744 for 64 bit and installed it, effectively destroying the installation of linux I’d ruined while playing around a few days back.

The installation was more or less straightforward except for the partitioning, which was absolutely terrible. Despite the eye candy, I had difficulty finding the disk/partition options to allow me to format it, which didn’t give me any warning about the data that’s being erased. It didn’t make it clear which hard drive and label of the partition that’s being erased. But five years of installing various operating systems(9 linux distros, win-all and macosx) allowed me to figure out what’s to be done, but… unfortunately might not be for most other people. Now that it was done, before I knew it, installation began. No double triple warning like xp installation. That kindof pissed me off. and it told me the minimum size for a hard drive is 15gb. I had to format my nearby swap partition to just reach 15 gb and let it install.

After what seemed like ages I was at the desktop. ‘Pretty impressive’ I thought to myself. Two completely useless sidebar widgets one for the time and a scratch pad. I had trouble looking for drivers when none of my drivers installed. For some reason all the alpha blending worked and the directX version was 10. Apparently vista used some generic driver and sound and networking worked fine. Though still there seemed to be some problem with the hardware and I downloaded the 88.61 forceware drivers from nvidia but that failed to work. I got my music up and running in media player 11 which is more impressive than meda player 10 but sucks ass compared to amaroK.

Things I liked about vista.
1. Improved File management system. It’s a little easier with favourite links and I like what they did to the address bar which is, in my opinion, shamelessly copied from nautilus.
2. Network Configuration: Hats off to microsoft for a brilliant network and sharing manager, which diagnosed my internet problems as a bad proxy connection(like I didn’t know that) I had to go the same extreme depth to configure the proxy(to think they’d have made it easier)
3. The speed: To my surprise, visa isn’t as slow as I thought it’d be. Mostly because of my comparitively bleeding edge hardware and my supercool super powerful graphics card. But also, yes, it does work faster.
4. Disk caching: I found that my free ram was 2mb. I freaked and was about to shut down and figured out it might be similar to what I used to have in linux, and yes, it was a disk cache, another seemingly liftoff from linux.
5. Indexing and media gathering: The user folder is more accessible. And all media is together, though my 21gb music collection won’t fit in this partition.
6. Media Center: I loved it. It was pathetic and as useless as dead dung beetles, but I loved it nevertheless. IT hogged my whole screen and put all my album artwork in a really neat pile allowing me to search, though using it in daily life is gonna be a big problem.
7. System Benchmarking: Vista assigns a score to your computer which helps you choose software, which is mainly balderdash, but interesting. I’ve never bought software based on a single rating. All games have a low graphics mode and the minimum system requirements are pretty cheap nowadays.

But all of the above(except maybe in the file management, can be done in xp. And definitely allp can be topped in linux)

New features which I found absolutely useless:
1. The themes: I’ve been studying digital asthetics for a few months and I can guess that this is not the bes that can be done and microsoft should’ve shipped atleast 10 more themes.
2. Aero: It’s of obviously good, but what for. I like the windows flipping by but who’d want to pay so much for that. Also, if you do, how many days will you go before it becomes “just another thing”. All the pretty effects and the ui is not important after a while.
3. Shadow system and backing up: Fine, there might be a time when I want to revert back a file that I “accidentally” modified. Now is that worth making previous copies or whatever of every fricking file on the disk.
4. The control panel: While hoping to be more helpful and intuitive, I had to struggle to find slightly more advanced options. All vista does is put ten crappy settings a baby knows how to change and makes it supposedly intuitive. I still haven’t figured out how to disable the file shadow thing.

What you’ll be paying $300(average upgrade=260/fresh=400) for:
1. a new, fine, let’s admit it, pretty theme, where windows fade in and out and fly around when you want them to.
2. A simple photo organizer and video maker and a simple mail application.
3. A simple system benchmarking tool.
4. A better file organizing software.
5. A welcome center which helpfully allows you to buy more microsoft stuff.
6. Windows XP(more or less)

Hope that puts things a bit more in perspective.

PART 2

Link Dump for tonight

http://www.google.com/intl/xx-hacker/ must check this one out if you understand leet (or 1337)

http://uncyclopedia.org/wiki/Google

The future of the desktop

good night world