January 31, 2003

I worked on merging the custom code snippet toolbar button fixes into BlogMan yesterday. I then modified the UI in Blog so that the entry area would be tabbed like BlogMan and the preview window would be in a different tab. I also moved the built-in comments view to a tab of it’s own and move the category selection stuff next to the entry area instead of below it. I then made similar changes to BlogMan too since some of this wasn’t done in BlogMan. I’m discovering that I am doing a lot of back and forth work between Blog and BlogMan these days since they share a lot of code :p I actually like the new UI better and am thinking of adding a mechanism so that the category selection area can slide in and out on a mouse click so that those who don’t use categories can simply hide it and those who do can use it only when necessary. Let’s see how that goes …

In the meantime, my attention has been turning back to BlogMan since I still need to do a final release. I downloaded B2 yesterday but have not set up a test installation yet. I’ve also been thinking of adding file upload support to BlogMan so that people don’t need to use a separate FTP client but then again there is the to-do feature in Blog where I’m also supposed to make the File Upload manager better – I think that’s slated for Blog 8.0 anyway. I read yesterday that Movable Type 2.6 (which is supposed to be out in 2-3 weeks) will have XML-RPC image/file upload support via a new MetaBlog API call. That might mean that I’ll have to update some stuff at my end too. I guess I can add image upload that way for MT and add FTP upload for other blogging tools or something along those lines. There’s other things to be done but I’m also probably going to start work on an ASP project from today so no telling how soon any of this will get done …

Tags:
Posted by Fahim at 6:44 am  |  2 Comments

January 30, 2003

Make love not …

Why is it that we always tell our children "don’t fight", "violence is not the solution", "might is not right" and so on and then go and do just the opposite? Are we out to prove besides the fact that we are spouting hot air, that we are a bunch of liars and that it is also OK to lie? I don’t know … This is how it seems to me from a simplistic point of view. I know that there are times when war is inevitable but we should do all that is humanly possible before we resort to war.

OK now you know I am going to talk about the US :p So let me put in a few disclaimers and set the stage first. I know that there are a lot of people in the US who feel the same way as I do and I also know that most people online are aware of the fact that there is a world outside the US and that the US is not always right – so when I say something about US people generally, it might not mean *you* even if you live in the US :p The second thing is that when I say "the US" most often than not, I mean the US government and not the people of the US itself – not the average Joe on the street. Incidentally, it’s a curious thing but I’ve noticed that quite a few people from the US support any action by the government just because it’s done *by the government*. Now just because it is a government of the people, by the people, for the people does not mean that we should lose sight of one important fact – it is also a government *of* people. I mean it’s a government made up of people – people with emotions, feelings, prejudices; things that may colour their actions and may not make them always objective. I can’t say that I have a wide experience of the world but I don’t see that particular mentality (the idea that it’s OK because your government does it) in other parts of the world – certainly not in Sri Lanka where people always analyze the actions of the president and the government and look at it – if not fairly – at least critically.

There are many things I don’t understand about the US government’s insistence on war with Iraq. How come they want to fight Iraq over nuclear capabilities that have not yet been discovered (but that the US government insists are there) when they are bending over backwards to accommodate North Korea which openly declares that they are going to resume nuclear testing? Wasn’t North Korea part of George Bush’s "axis of terror"? Or is the *real* reason for going to war with Iraq something else altogether? When I hear all this stubborn insistence that Iraq has nuclear capabilities (with no concrete evidence as far as I know) I begin to believe the stories that I hear about the US actually having provided Iraq with nuclear armament by the US twenty years ago during the time of the Iran-Iraq war – how else can the US know with such certainty that Iraq has nuclear capabilities? I wonder …

There are many things which don’t make sense to me about this looming war. I don’t understand why human lives (does not matter which race, creed or nationality it belongs to) should be lost for political reasons. I wonder if this is just another instance of "Wag the Dog" – which incidentally is a brilliant piece of political satire as far as I am concerned. I didn’t understand when the US government went to war in Afghanistan saying that they were going to bring back Osama Bin Laden to trial – many human lives have been lost (both Afghan and US) but Bin Laden still roams free. If I could see that Bin Laden couldn’t be captured even then (I said so in my blog at that time …), how is it that the US government with all it’s highly-trained and highly-paid analysts couldn’t? Could it be that it was not about bringing Bin Laden to justice but about making a point? Why do we waste human lives for the sake of such pettiness? Is it because human lives (each of which should be so utterly precious) have lost all meaning and value in the world of today? If so, then maybe we do deserve to be wiped out in one big nuclear conflagration …

Tags: ,
Posted by Fahim at 9:17 am  |  3 Comments

I did get back to Blog coding yesterday finally (and before DeViLbOi starts his cry of “PostMan, PostMan” again, I will get to PostMan too but I feel that I should work on the apps that have users since they do want bug fixes :p) and set out to find out what the problem was with adding custom snippet buttons to the edit toolbar. Incidentally, I probably should have started work on BlogMan since that still needs to be finished up for final release but since Blog and BlogMan share the UI, BlogMan has the same problem with adding snippet buttons to the toolbar and so it is all good 🙂

Anyway, since I couldn’t remember what the exact problem had been, I decided to go another route and check up on the ActionBand component in Delphi since that’s what I used to provide the customizable edit toolbar in Blog and that was where adding the snippet buttons was causing problems. I discovered that a new patch had been released which solved some problems with the ActionBand component and though none of the listed fixes seemed relevant to me, I applied the patch anyway since that might fix something obscure which was affecting what I was trying to do. While downloading the patch, I saw a demo which showed you how to save toolbar customizations for ActionBands if you create toolbar items dynamically. Since the snippets are user defined, they have to be created dynamically and so I took a look at the demo and that gave me some ideas as well.

Even after applying the patch and integrating the ideas from the demo, it still didn’t work the way I wanted and so I ended up splitting up the custom snippet menu/toolbar creation code into three separate procedures from the original one. This allowed me to have better control under different circumstances and this helped a bit but I got stuck again at that point. By this time however, I had remembered the actual problems that I was trying to fix :p One was that all edit toolbar customizations disappear when you invoke the custom snippet definition dialog and click OK. I had fixed that by this time. The other was an internal problem that I had discovered earlier while trying to fix the former – internally, the edit toolbar gets multiple copies of the same button and while only one displays, each time you do a customization, the number of invisible buttons on the toolbar goes up. I finally discovered the reason for this too (and that was just by accident) and I managed get it all fixed and now have the custom toolbar stuff working fine 🙂

I also intend to change the UI a bit for the next release – I know it’s supposed to be a bug fix release and there shouldn’t be any functional changes (at least, that’s my internal rule :p) but I think this is necessary. The current UI is a bit too cluttered and confusing since I’ve had many people ask me what the area next to the category selection box is since it’s never used – it’s for built-in Blog comments incidentally – and that’s bad utilization of screen space. So I’ve decided to borrow something from BlogMan and go with a tabbed interface. The main entry area will have a single tab for the title, entry and the category selection box, there will be a separate tab for previewing and another tab for the comments. That should make things a bit more neater and organized – I hope …

Tags:
Posted by Fahim at 6:36 am  |  No Comments

January 29, 2003

About the only coding I did yesterday (after all the hoopla about being back in the thick of coding day before <g>) was to complete work on the CSV reader component and then do the documentation. This was partly due to the fact that I did do other Delphi stuff which falls into the learning/experimentation category and partly due to the fact that I was distracted by “Dungeon Siege” :p The Delphi stuff was basically going through the Orpheus component suite from TurboPower since they’ve decided to open source it and have put it up at SourceForge – search for TurboPower if you are interested. I haven’t used Orpheus before but I do use another of TurboPower’s products, Abbrevia, to handle the backup functionality in Blog. So I’m glad to see that even Abbrevia will be open sourced eventually. I might even come to use Orpheus since it’s a fairly comprehensive component suite and might have something that I can use and now that it is open source, I can be sure of keeping up with newer versions 🙂

I thought last night about what needed to be done by me in the way of coding. There is BlogMan which still needs to be released as a final release – I think all that I need to do there is add support for titles in B2 (sorry about not getting to that yet Greg) and then do some UI customizations to display only the stuff available in each blogging utility. I need to get on it – hopefully soon … I should really install B2 on my server so that I can do some testing – maybe today … I also need to get back to work on Blog and do a bug-fix release. The biggest problem there is the toolbar customizations but I’ve totally forgotten all the work I did there and so I can’t think of an approach to solve it and since I don’t start work unless I get fired up by inspiration, I keep on sitting here thinking about getting back to work on Blog – I need to break this cycle :p

Tags:
Posted by Fahim at 6:51 am  |  2 Comments

January 28, 2003

I actually seem to be back into the thick of coding suddenly and in fact, coded in two different languages yesterday :p The first bit of coding was in C# since I was putting the finishing touches on the CSV reader ASP.NET component that I’ve been working on for a while. I needed to test the component’s new features and so I wrote a demo application and it was actually the demo application which took most of my coding time yesterday rather than the component itself 🙂 I finally got the demo working the way I wanted and was pleased to find that the component worked as it should except for a few minor bugs which were quickly fixed. Of course, after a good night’s sleep and reflection, I have also come up with a few other modifications that I want to make to the component but once that is done, I should be done with that.

The other bit of coding was in Delphi since I finally got back to doing some work on Blog :p I’ve been debating whether I should use Delphi 7.0 or 6.0 for further coding for a while and because I couldn’t make up my mind, I’ve been reluctant to go ahead with the coding on any of my apps. I finally decided that I will stick with Delphi 6.0 – at least for Blog and BlogMan – since I’m not sure Delphi 7.0 will provide any major advantages for those as far as features go. The only thing I had hopes for with Delphi 7.0 was that I might be able to fix the toolbar problems with customized HTML code snippets but now I’m beginning to think maybe it was my own incompetence which was the cause and not a fault of Delphi’s and so am going to go back and look at that code a bit more closely :p

But to get back to the coding I did yesterday, I’ve been receiving bug reports about a “null variant conversion” error (or something similar) from users for a while now but each time I try to isolate it, it disappeared because the user reinstalled Blog or something like that :p I finally found a user (SilverLining) who had the problem and who was able to send me the data. I took a look at the data and realized where the problem was – the digest feature. The digest feature internally keeps track of when the last digest was sent out so that it can figure out whether it’s time for the next digest or not. However, I’d totally overlooked filling the last digest date value when a new journal is created – but the upgrade process would fill the last digest date for existing journals. This is where the problem lay and I’ve fixed it for the next release but for existing blogs this would mean either disabling the digest feature or manually going in and altering the data 🙁

Tags:
Posted by Fahim at 6:39 am  |  No Comments

January 26, 2003

I don’t know what happened (I haven’t been online today yet to find out if there is any news) but a major portion of the Net seemed to go down yesterday around noon and still had not come back into operation by about 9 o’clock at night. I say “seemed” because I personally know of only three servers – mine, a friend’s and an IRC server I was on at the time this happened. Yahoo was fine as was Google but I don’t know if there were any other sites affected but I saw a whole heap of activity on my IM buddy list soon after that since people seemed to keep on appearing and disappearing. So I guess there must have been other problems elsewhere too. To me it seemed as if a major portion of the Net in the US (at least in a large area) went down but I don’t know for sure but things seem to be back to normal now and that’s what matters.

I did complete the work on the image spider program yesterday. I decided to take the easy way out for the moment and simply convert the text encoded ampersands back to ampersands and that did the trick. However, I then ran into another problem. I was basically accessing the IHTMLDocument2 interface of the web browser component and using it’s execCommand method to send a SaveAs command. Now the SaveAs command is supposed not to display the save file dialog if you pass it a destination file name but try as I might, I could not get that to work – it would always display the save file dialog no matter what. So while the image spider will save like 40 images off links on a page, you have to click OK 40 times to do it. While I don’t mind it so much – it can get to be pretty annoying after a while. So now I’m thinking of different methods to do the same thing. One method would be to make use of the DownloadManager interface of the web browser component and simply start multiple downloads – if that method does not pop up the Save dialog. The other method would be to simply download the images using a different component altogether – one that I can control better … like the Indy HTTP component. Each approach has problems – I don’t know if the DownloadManager interface is supported in Delphi (I’ve run into unsupported interface problems before …) and I don’t know if a site which maintains your logged in status would still see you as logged in if you used an external component like Indy instead of the web browser that you used to log in, to do the download. I guess I’ll have to try either or both methods to see if they actually work. I think I’ll give the DownloadManager method a try first though since that does not involve any new components …

Tags:
Posted by Fahim at 6:23 am  |  2 Comments

January 25, 2003

Enter the twilight zone …

I know I haven’t written much lately but it’s not because I had nothing to write (in fact, I had tons of stuff going through my mind which would have made good fodder for this blog :p) but because I was too busy to write. SM actually takes a bit more out of me in the way of writing since it is about ideas and thoughts and dreams and philosophies – unlike DC (The Developer’s Corner) where I just talk about development stuff. Here I have to try and be coherent instead of meandering all over the place as I have a habit of doing :p Anyway, enough of the apologies and on to the stuff I wanted to talk about … well, at least some of it :p

I finished reading Gordon R. Dickson’s "Necromancer" a couple of days ago and all I could say was "wow!!" because that book really spoke to me! I could totally identify with the protagonist and the way he thought and looked at the world and I really didn’t think that there were other people who thought that way (and here I am talking about the author – he must at least have seen the world partially like his protagonist to have written that way … at least that’s what I thought). I thought I coined the term "empath" because I believe that while a true telepath would be an impossibility (well, at least a sane one – all the vicious thoughts and secrets that they’d be bombarded with daily would make them go insane is what I think), I think that "empaths" are real and do exist. An empath (in case you are wondering <g>) according to my definition is basically somebody who can feel the emotions of another without actually knowing their thoughts and secrets. But I discovered that Dickson had used the term to describe his protagonist years ago! Plus, his protagonist says that nothing surprises him much because he can see it coming and the same is true of me – the latest example was that I saw the twist in the story coming in "Necromancer" way before it actually arrived – only thing was, that I was never sure that the plot would resolve the way I thought it would and yet, it did in the end!

Now I find myself wondering if I am simply remembering some of this because I’d read the other books in the series (the Dorsai series in case somebody is interested ..) or if I am just hitting the outskirts of the Twilight Zone :p So I decided to go back and re-read the whole series from the beginning since I’d read half the series ages ago (over ten to fifteen years ago if memory serves right) and have not even read the final half of the series yet. I started with the first book – "Dorsai!" – and was again hit with that weird feeling of … I don’t know .. can’t say deja vu since I have read the book before and so deja vu would be appropriate but then again, it’s not since I don’t remember most of this since I wasn’t thinking along those lines when I first read the book. This time the story is about an intuit – a person who intuitively knows the all possible future outcomes and so can take action so that a certain outcome will be possible. While I had never even thought of the concept of an intuit, I do agree again with some of the protagonist’s views. For instance, at the beginning he is described thus: "What seemed so plain, and simple and straightforward to himself, had always struck others as veiled, torturous and involved. Always he had been like a stranger passing through a town, the ways of whose people were different, and who looked on him with a lack of understanding amounting to suspicion. Their language failed on the doorstep of his motives and could not enter the lonely mansion of his mind. They said "enemy" and "friend"; they said "strong" and "weak" – "them" and "us". They set up a thousand arbitrary classifications and distinctions which he could not comprehend, convinced as he was that all people were only people – and there was very little to choose between them. Only, you dealt with them as individuals, one by one, and always remembered them as individuals, one by one; and always remembering to be patient." That is exactly how I feel about people!

I could probably go on and on with this and make this entry really long and boring but I’ll probably stop here for the moment. But I want to take this up again with another subject that has been on my mind related to people – but this time, to the real world and the situation in the world today … maybe tomorrow 🙂

I tested the image spider code yesterday and found that it worked for the first image and then continued to fetch the same image over and over again for the rest of the links. I thought there must be some bug in the code (and I couldn’t do any debugging with the debugger since each time I exited, Explorer would crash … hard <g> and so I had to debug using message boxes – which I hate doing) and spent most of my time trying to figure out where the bug was. I tried various approaches and went through a lot of code but all that time, I had the sneaking suspicion that the bug was somewhere else .. and I was right :p I discovered the bug finally just as I was about to give up for the day – the URL’s I got from the selected stuff on the page had some text encoding (the ampersand encoded as text for instance) and that was throwing things off. But what had confused me was the fact that any URL brought up the first picture on the list (that was probably a server side thing …) and I so I thought the problem was somewhere else. Ah well, I do have the solution now but I still haven’t implemented it since I tired to be too smart about it :p

I had been using third-party HTML parsing code but then discovered yesterday that I could use the IE browser component’s built-in IHTMLDocument2 interface to get a list of elements on the web page. I was using this fine for parsing a full-page by the time I discovered the problem with the URL text encoding and since I was simply returning the selected stuff on the page as a text range, I decided to use another method which returns a control range since I reasoned that this would allow me to access the stuff in the selection element by element and that the element attributes probably would be in the un-encoded form. However, I discovered only when I ran the code that the particular interface that I was using to do the job was not supported by Delphi! I hate when that happens! I guess I’ll have to go back to the original method I was using and translate the encoded stuff back to their un-encoded form for the moment but when I refine the code, I’m going to do away with the selection method altogether and use some sort of filtering – or simply return a list of links on the page and let the user select the ones that s/he wants to work with. But that’s for another day …

Tags:
Posted by Fahim at 6:45 am  |  No Comments

January 24, 2003

I’ve started work on another new personal project – hopefully a quick one :p You know those web trawling programs like TeleportPro which create a fully copy of your site, or even mass downloaders like ReGet or FlashGet? They have one problem – they don’t seem to work with the newer redirecting sites where a link is actually a redirection to via their server to a different page and the URL is always populated with all sorts of extra junk to make it hard for these programs to work properly. I guess this is just another step in the content-protection war – but I hate it :p So I’m working on a new program which will go around this and still get me the stuff I want from a site given a selected list of links. It’s still not up to the standard of one of those programs which will make a perfect copy of a site on your hard disk – I don’t really want that. I just want to be able to download and save a list of linked files without having to click on each link, wait for it to go to another page and then select save as in the case of images or even have to click multiple links to get downloads started in the case of files. I’ve done most of the preliminary coding already and have tested some of it but the part that actually does the work has not been tested yet since I hit a snag in my coding yesterday. I think I’ve got the solution today however and so intend to complete the app (which I call Spider) today. If it works and enough people like/want it, I might enhance it from it’s current rather crude form – but if not, that’ll probably get added to the pile of apps that I use but nobody else does :p

Tags:
Posted by Fahim at 6:34 am  |  3 Comments

January 23, 2003

OK, we’ve received the go ahead from the client for the CSV reader project 🙂 So I did up some documentation yesterday so that the client could see both my approach for the base component (which is already done) and for the extended component which will have the functionality he will want. I sent that out with a demo for the base component and then started work on the extended component. I think I’m more or less done with the extended component as well but I will need to do some testing to be sure that it works the way it should. I did however learn something else – I need time to work on projects like this … not just to code but to think things over. I spend the odd spare moment going over what has been done and I suddenly see holes in the logic or potential pitfalls. I thought of several such yesterday after I started thinking about the code and will probably need to plug some of that today. I also realized that a class doesn’t necessarily have to have properties for the sake of having properties – so I’m probably going to take out some of the properties that the base class had since the extended class should not need them … but I’m not sure if C# allows you to do that – I know I can do that in Delphi …

Re-discovered an interesting app called MailWasher (sorry am at home and so don’t have the URL but hopefully it should be www.mailwasher.com) which basically allows you to send bounce messages back to spammers – the idea being that they will take your address off their list thinking that your address is no longer active. I don’t really know if it works effectively (the reviewer of the app from whom I learn about it didn’t notice any difference in his spam level either :p) but at least it seems kind of nice to be able to automatically spam the spammers :p So I think I’ll keep on using MailWasher for a while – it’s especially handy with my HotMail account since I usually have to log in once or twice a week to just get rid of the spam since I really don’t receive many important e-mails on that account. Now I can simply do that from my desktop without logging into Hotmail 🙂

Tags:
Posted by Fahim at 5:58 am  |  2 Comments

Next Page »