Sunday, December 28, 2003

XP seems to be all the buzz with me lately, doesn't it? Another fad that's soon to fade, (un?)fortunately.

The Mac dockbar is a nice little piece of eye-candy, and it's understandable to emulate the Aqua interface on XP. A few options exist - YzDock has apparently been shutdown by Apple, but you can still download it (there are also numerous docklets here). MobyDock is a promising program that's in development, although it crashed on me whenever I tried to remove items from the dockbar. Finally, there is ObjectDock, which I haven't used yet, primarily because of bad experiences I've had with WindowBlinds a few years ago. I guess I'm living proof of the scars bad software can create.

Actually, I don't remember WindowBlinds being bad at all; in fact, I don't remember it being anything- it just was. Come to think of it, I don't even remember installing it. So there you have it - I've got bad experiences with software I'm not sure I installed a few years ago.

"I'm sorry, our session is over"...
While Windows XP's default themes are pretty good, they are of course, a little limited - seeing as how there are only three of them. XP does have a theme format, allowing for user-created themes; however, by default, XP only recognizes themes made by Microsoft (which is a bit constrictive). However, the free PatchXP modifies the uxtheme.dll file on your system, allowing you to download any use any user-made theme. (Of course, a fair few user-made themes are much worse compared to the default MS ones!)

Friday, December 26, 2003

A nice set of Windows XP style icons can be found here.
While playing around with Window forms, I was disappointed to discover that there was no inbuilt mechanism for using Windows XP visual styles for controls - only the title bar appears XP style without any work needed. The actual process of using visual styles, however, is not that complicated.

What is needed is a manifest file placed in the bin directory of your project. The filename should be of the form ApplicationName.exe.manifest where ApplicationName is the name of your application. The actual contents of the manifest file should be like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<description>A nice program that behaves properly</description>

You can change the "name" attribute to the name of the program.

Finally, some controls have a FlatStyle property; for these controls, this needs to be set to "System".

Recompile and watch the glory of XP visual styles. Unless you're not running XP. In which case you're a very silly person.

Friday, December 12, 2003

My program has unfortunately come to a screeching halt..connecting to a website in .Net is pretty simple, but unfortunately the darn thing is throwing WebExceptions like nobody's business. The problem comes about when trying to create a HttpWebRequest to the All Music Guide site; it insists that the connection is unexpectedly closed. Not good.

I've posted my problem on three sites, but don't have any responses yet! Sometimes it makes you realize how alone you are on the net or something.

I've started driving lessons (at last), and so have been paralyzed with fear for the most part of the day. I'm looking forward to looking back (hmm nice juxtaposition) on these early days and laughing. That is, of course, assuming I haven't crashed the car by then.

Monday, December 08, 2003

A blog on my birthday was avoided perhaps a bit deliberately, in order to skip the inevitable reflection and retrospection, and the bold prophetic view of the future. Although, having said that, I don't think there's anything particularly wrong with any of those things. It's just the way I feel at this instant in time, that those things are..hmm I can't explain what, but they're something.

The music catalogue program has grown to a decent stage now, where it can query the AMG site and get information about albums and artists. I'm rather happy with the whole thing as it stands, which I suppose bodes well for any future projects in C#.

Friday, December 05, 2003

Although it has been clear for a long time that the internet is a medium so powerful that it is simply bound to become all-pervasive in software, I have remained unusually aloof in terms of web-related development. Perhaps it was the lack of standardized networking libraries in C++, or perhaps just a belief that it was all irrelevant. Hmm.

Thursday, December 04, 2003

Actually, to be fair, GUI design with Window Forms really ought to be compared with the use of an IDE for GUI design in C++/Java, and this is something that I have limited experience with.

Tuesday, December 02, 2003

At around 12 pm today, I was taking a much-deserved break from Baldur's Gate, and was browsing the net for ways to create a music catalogue in Access. I had tried coming up with a solution in Access, but I realized that I don't quite know enough about databases to make a thorough solution. Instead of finding something related to Access, I stumbled across a demo for a piece of stand-alone software for cataloguing music.

And then it hit me.

I could try to make a program like this!

I don't know why I found this experience so profoundly exhiliarting, but ever since I've been really excited; it's that lovely infectious excitement you get whenever you start out on something you want to do.

I decided to finally do something serious with C#, and so I'm going to try to use it to make the program. So far, my experience with C# has revealed some really nice features. For instance:

  • Properties At first I found them a bit odd, but now I am quite struck by them

  • Window Forms Oh yes! By far the best way to design GUIs that I've seen. I shudder thinking of the hours wasted in C++ and Java where I manually made my GUIs..

  • Operator overloading Yeah, yeah, it's in C++, but it's a relief using == once again with string comparisons after 4 months of Java

Saturday, November 29, 2003

Speaking of RPGs, another brilliant RPG is Ultima 7. I have particularly fond memories of this game, because it was the first multimedia game I played on the PC, perhaps as far back as 1996. However, interestingly enough I was only able to finish it last year! The experience proved too demanding back then, because I remember cheating like crazy "just for fun"..

Anyway, if you've tried to run it on a Windows machine, you'll soon realize that it's not easy! You have two options:

  • This page has a program, U7Win9x, which replaces your Ultima 7 executable with one that should work on Windows

  • Exult is an open-source project that aims to achieve the same thing. However, they've also added many useful features to the game. For instance, you can change the resolution of the game, as well as many other graphical options. Also, you can see your party members' HP/MP at any point, something I found very useful

A few summers ago, I spent a lot of time immersing myself in Baldur's Gate II (Shadows Of Amn), and found the experience to be one of a kind. I was unable to go a whole day without at least 6 hours of that game, and even then I would spend time thinking of strategies for combat and what have you. In short, I was thoroughly addicted. It remains the only game I've replayed immediately after finishing it the first time!

Last year when I came across the original, I was however surprisingly apathetic about buying it. Perhaps I was burnt out because I'd played its sequel for so long, or perhaps I felt that it was somehow inferior. Perhaps also it was because the intrigue of the story would be lost on me, because I had already played the sequel and so knew the outcome of the first game. Whatever it was, in the end I did buy it after all.

And now, for a week or so I've been rivalling the gaming experience I had with its sequel. Which makes me think that the Baldur's Gate saga must be the greatest saga ever! Well, perhaps that's a little extreme, but both the games (excluding the expansions) in the saga are quite simply, remarkable. In my narrow-minded opinion, it's the RPG saga.

In case you don't know what Baldur's Gate is, it's an RPG that's set in the Forgetten Realms world of D&D. Unlike demi RPGs like Diablo, there is an amazing amount of depth to the game. Since it's based on D&D rules, there are a few aspects of it that take a while to get used to. For instance, there is no notion of mana, but to cast a spell you must "memorize" it first (which involves resting). Sounds tedious, but it just needs a little getting used to. The game has tons of magical weapons of equipment, not to mention some fantastic spells, which make (most) combat very interesting, with a lot of options. And of course there's the role-playing aspect of it, where you can decide what kind of character you play (good, neutral, evil).

Friday, November 28, 2003

It's amazing how quickly this blogging business faded away into nothing for me..just like I predicted! Ahh well, I suppose I'm so used to temporary fads that I'm apathetic to what it means for my life.

I feel it's time to begin the book. "Everyone has a story to tell", isn't that a saying? I suppose I have a story to tell, although I have fanciful notions of it being one of epic proportions, asking the fundamental questions of human existence blah blah. In reality, I suppose if I do start it, it will be both a rip-off of whichever author has impressed me the most as well as a totally immature and nonsensical piece of work.

Of course, I'm amusedly waiting to see how long it takes for me to totally forget about the book and latch on to something else. Sad, isn't it?

Monday, November 17, 2003

I think many people have at some point run into, or at least heard about the Nigerian scam. Annoying, and at times laughable - but I would never have imagined that anyone would manage to make something like this out of the whole deal. It's a collection of correspondences between unwitting scammers and their "victims", who just happen to be fully aware that the whole thing is rubbish from the start. Some of the letters on there are pretty hilarious! It even has photos that these "victims" demand the scammer provide to prove that they're the real deal..some of them are so fake that you'll burst out laughing.

Obligatory warning: Some of the material in the linked site is of a slightly mature nature!

Thursday, November 13, 2003

OR* helped me realize how little I really know about programming. I used to think that getting code to work properly was a good thing. But OR changed things for me. I mean, what's so great about code that works? You compile it, it runs, woohoo. Big deal. At the end of the day, all you've got is something that works.

But OR..OR is different. I mean, it doesn't even compile. Take a moment to let that sink in.

* If you don't know what OR is, you don't want to know.

Wednesday, November 12, 2003

Want to live forever? Sure you do!

I don't quite know what to make of the above site.
I wonder what point multiple choice questions serve. I mean, you make a mistake and that's it, you've lost a mark. Sure, it's nice to have a MC when you don't know anything, and you just want to have a guess. In that circumstance, it gives an opportunity for one to employ a sort of "refined" guess - which is I suppose testing something. But otherwise, I hate them! Ah well, to each his own.

Monday, November 10, 2003


With exams coming up, what better way to spend time that attempting to analyze the issues surrounding them in an attempt to pass time? Sure beats studying, for one.

The funny thing about anything I seem to learn at university is that it all seems too ephemeral, or at least when compared to anything I learnt in school, a lot of which I seem to be able to recall till this day. Anything which I've done at the start of first semester seems to trickle away into nothingness by the end of second semester - and that's quite peculiar.

I don't think there has been a fundamental shift in the actual nature of what is being taught at uni. Yet, I do get the feeling that perhaps the style of teaching encourages (well, in my unique case at least) that one not necessarily retain a fair bit of the material. The problem being that a lot of stuff is "studied" in the following way:

  • Listen to lecturer talk about it in one lecture

  • Work on questions in tutorial

  • Forget about it until the exams

  • Work on questions again before exam

The difference here, between high school, being the short period of time you get to actually work on the ideas that are introduced. In most subjects you tend to finish a topic a week - just not enough time for consolidation. That's why step 3 comes into play - my brain just doesn't bother retaining the information, because it hasn't received sufficient exposure to it.

Perhaps the onus is now on the student to be the sole motivator of this exposure - perhaps it is expected that we spend how much ever time that is necessary acquainting ourselves with material, not using the amount of time spent formally in university on a particular topic as any sort of yardstick as to how much time is required. I suppose that if this is the case, that's one change in rationale that I haven't quite managed to keep up with.

Sunday, November 09, 2003

And now for something completely different..

C = Customer (John Cleese), O = Owner (Michael Palin)

C: I understand this IS Bolton.
O: Yes?
C: You told me it was Ipswitch!
O: ...It was a pun.
C: (Pauses) A PUN?!?
O: No, no...not a pun...What's that thing that spells the same backwards as forwards?
C: (Long pause) A palindrome...?
O: Yeah, that's it!
C: It's not a palindrome! The palindrome of "Bolton" would be "Notlob"!! It don't work!!
O: Well, what do you want?
C: I'm not prepared to pursue my line of inquiry any longer as I think this is getting too silly!

Saturday, November 08, 2003

According to this article, if you don't know/learn a computer programming language, you're as good as being stuck in the Matrix (that movie is too popular for its own good).

I disagree with the notion that in the future, "the ability to read and write code will be as essential for professionals of every stripe as the ability to read and write a human language is today". I don't quite understand where the author gets this idea from. It strikes me that it would indeed be true if one were to say that the ability to use a computer will become essential in any profession, but not writing code itself. Computers are emerging in nearly everything nowadays, and so familiarity with using a computer seems to be essential.

A professional in any field will of course want to be focussing on the aspects of work that are local to that profession. What a terrible waste if your accountants were to spend weeks on end trying to write a program to do something clever with the employee records. Surely it would make more sense to get someone who's a specialist (a progammer) to do that for you (either through a commercial product, or by getting a custom-made project). At some point you have to identify a boundary, where a task is related to your main goal, but not inherently associated with it.

Statements such as "the gulf between those who understand computers and those who don't will get wider and wider" seem again to be more appropriate if one were to change "understand" to "understand how to operate".

Assume that a person is taught from a young age a programming language, and with time (s)he becomes fluent with it. We first have to consider what "fluent" means in this context. If you define it to mean that (s)he is able to understand the syntax properly and can write code that compiles, then I suppose it is possible to do, with time. But if you consider whether this person can use it properly, you have a problem. Programming is very much something that needs to be learnt from experience. For this hypothetical person to be fluent, (s)he would have to be aware of various design patterns, code cliches, "good" programming's here that things start to get complicated.

Of course, you might argue that there's no need to make good programmers out of everyone - just make them able to get the job done. But without these good principles, getting the job done gets really hard. And not to mention, once it's done it's probably going to be set in stone, with no hope of anyone else every modifying it.

And let's not forget, programming isn't for everyone. No, really, it isn't. I don't think it's out of a sense of elitism that I say this, but purely from experience. Not many people will have fun spending hours trying to spot a bug that appears in some undetermined section of code. Sure, you might argue that if you follow good programming principles, this should happen rarely, and when it does, it's either not severe or easy to tame. But if programmers - even if they are mediocre ones - can run into such problems, can we really expect the everyday person to be equipped against them?

The argument against Windows seems to suggest that its use of a GUI to hide details from the user are a pitfall rather than a benefit. Sure, if you're talking about programming. Yes, maybe it's impratical to think that I can make any program by working with a GUI alone - at some point I'd imagine it would become necessary to type out code with the keyboard. But there's nothing wrong with hiding details from the user. If you broke down the illusion that the computer "understands" what you say when you click a button in a GUI..well, out goes user-friendliness. Why do I have to be forced to use a command line to do something when it makes more sense for it to be handled graphically? Do I really have to know the intricate details of the program I'm using and the way it works for it to perform a simple task? I think not. However, the author maintains that this is just us choosing "to remain inside the dream world of The Matrix".

It seems that the argument is equivalent to this: since you don't know the internal workings of your electronic devices, you are at their mercy. That because someone else made it and as in control of it, you are automatically out of the loop - the person in control can do whatever they want. Frankly, that comes off as slightly paranoid ("The Windows control us").

Friday, November 07, 2003

I have the intention of creating a text editor for TeX, mainly because there don't seem to be very many free ones out there that I'm comfortable with. In all likelihood, this will go down as another project that I start off with high hopes and good intentions, but end up loathing and never thinking about again. Gotta love programming.

I remember trying to make an editor for HTML a few years ago in Visual Basic. Those were easily the worst times ever as far as programming went. No planning or design whatsoever, just straight out spaghetti. Needless to say, after I had gotten as far as creating a GUI (which, of course, in VB is trivial), I was brought to a total halt. I can't remember what wild escapade I went on after that, but chances are it met a similar fate to my poor editor.

Perhaps I will make it using C#. The talk about Windows Forms has been interesting, and has intrigued me to have a go at it. My brief exposure to it thus far has created the impression that it's akin to using Visual Basic to design the GUI, and then using C++ to handle the intricacies of what actually happens when you click a button etc. etc. GUI programming in C++ has been a torture for me, and so I suppose I've got another idealistic notion of C# being the solution to all the problems I've faced and what have you.

Actually, I don't think my aim is so much to create an editor as it is to learn new stuff. In the sense that, I don't know if I will be bitterly disappointed if I come out of the experience with a partially working program, so long as I have learnt something new. Just off the top of my head, integrating the editor with Adobe Reader will be interesting - having a button that converts TeX to PDF, and then opens Adobe Reader with that PDF is not hard (a simple ShellExecute call in C++), but what about when the file is already open in Adobe, and you try to make the PDF again? If there is some API (and there probably is) for interfacing with Reader, I think that will be interesting.

What I want to know is, if I'm able to recognize that a lot of stuff is out of idealizations on my part, why do I keep pursuing them?

Thursday, November 06, 2003

The use of the blog today seems fairly widespread. So much so, that in all likelihood this one will get buried in a pile of others.

The fundamental problem is, of course, that I find that I have nothing to say. Various romantic notions of posting interesting, thought-provoking pieces every once in a while is what seems to have driven me to this state (creating a blog).

But perhaps soon I will manage to push this one into the right direction. Heck, it's sort of fun wondering what I can make of it.