June 6, 2008

Ruby, Ruby, Ruby

I formatted my OS partition and re-installed Vista a month or so ago. At the same time, I did a complete overhaul of my old applications partition and removed a lot of folders/apps that I had had installed that I hadn’t used in a long time. Ruby was one of those folders to go since I don’t do much Ruby development. However, I wanted to re-install Ruby yesterday because I wanted to test out the latest crop of Ruby IDEs. But would you believe that there appear to be no instructions anywhere on how to install Ruby on Windows manually?

Most other languages/compilers at least have a text file which describes how to set it up under most of the major platforms. But Ruby simply says something along the lines of "if you don’t know how to set Ruby up manually, then you shouldn’t be trying to do so. Instead, use the one-click installer." Wherever I looked for help on installing Ruby manually under Windows, all I saw were references to the one-click installer. No info on how to do the deed yourself if you wanted a svelte and compact installation that had just the bits you wanted.

So I decided to try it myself 🙂 And here are the steps in case somebody else is looking to find out how to install Ruby manually under Windows.

  1. Download the Ruby binary ZIP file from the Ruby site’s download page. At the moment, the latest stable appears to be 1.8.7 and the development version is 1.9.0. But this will of course change.
  2. Extract the ZIP file (keeping the folder structure intact) to the folder where you want Ruby installed. In my case, I extracted everything to D:\Ruby.
  3. Add the Ruby bin folder (in my case, D:\Ruby\bin) to your system path.
  4. Download zlib for Windows from the site and copy the zlib1.dll (from the bin folder inside the ZIP file) as zlib.dll (the renaming is important) to either your Ruby bin folder or to your Windows system folder. (I believe it just needs to be in your system path somewhere).
  5. Download iconv from the Sourceforge site and add the iconv.dll file (from the bin folder inside the ZIP file) again to your Ruby bin folder or to your Windows system folder.
  6. Now download RubyGems to add gems support to your installation of Ruby. You can either download the ZIP file or get the .gem file but my instructions are for working with the ZIP file since there is no .gem support in the installation of Ruby we’ve done 🙂
  7. Extract the RubyGems ZIP file to a temporary folder.
  8. Open a command prompt, change the folder to the temporary folder from step #7 above and run the following command:
    ruby setup.rb
  9. Once the gems installation completes successfully, you can remove the temporary folder and your Ruby installation should be ready 🙂
Tags: , ,
Posted by Fahim at 6:23 am  |  No Comments

June 5, 2008

Plugging Away at Plugins

Interesting how things work sometimes depending on the test data. I use the WP-ShortStats plugin to keep track of the traffic statistics to my blog. And of course, one of the most interesting stats to watch is the search keywords because sometimes you get such weird stuff 🙂

I like the WP-ShortStat plugin because it is compact, unobtrusive and gives a lot of stats which warm the cockles of a geek’s heart 🙂 However, a couple of days ago, I noticed that the plugin was giving me only a couple of search keywords instead of the longer list I had been used to getting before that and none of the terms which had appeared for a couple of weeks before, were now appearing. I thought maybe there was some automatic purging code in place which removed older entries and thought no more about it. At least for the time being.

Today, I felt like doing a little bit of digging since the ShortStat display was getting cluttered by lots of spam referrers and so on. So I took a look at the plugin code. It turns out that the plugin simply pulls the last 100 records matching certain criteria to give a list of search terms. So I ran the query on my data to see what I got. I noticed that of the 100 records returned, very few actually were search queries 🙂

So I took a look at the SQL and the ShortStat plugin code to see if there was a way to improve upon the code. It turned out that I could add an extra condition to the SQL query to return results which were more likely to be search queries. I did that and I suddenly had a full list of search terms in my WP control panel again!

I’m sure that the WP-ShortStat developer did a lot of testing of the plugin before you released it. However, as I mentioned initially, sometimes it’s the data which determines what sort of output you get. And no, this is not really a bug in the plugin but it did explain some unexpected behaviour and in case somebody else is in the same position I was in, hopefully this clarifies what is going on 🙂

Tags: , , ,
Posted by Fahim at 11:31 am  |  No Comments

June 4, 2008

Loafing Around

Some time back, I wrote about my search for a good time tracking application and how I couldn’t find anything which really met my needs. As I mentioned in that post, I coded my own app, named Loafer, since I wanted specific features from a time tracking application. At that point in time, I wasn’t sure if I was going to release Loafer as freeware or not.

However, I realized that I liked releasing applications that I found useful, as freeware. It seems wrong to charge money for an application just because I can code it and somebody else can’t. Besides, if I were to charge money for the app, I would have to handle all the support issues that come along with a paid app 😀

Anyway, even after I had decided to release Loafer as freeware, I never got around to doing it since the app wasn’t totally complete. It was able to track time without any trouble but I wanted reports, I wanted billing management and I even wanted some way to do invoicing. At last, I’ve got most of that in place (minus the invoicing) and so I’m ready to release the first version of Loafer to the public. Go get it from my downloads page

It does what I want from a time tracking app but you might want a lot more. If you do, do drop me a line and I’ll see what I can do about adding the extra functionality in 🙂

Tags: , ,
Posted by Fahim at 11:18 am  |  No Comments

May 3, 2008

A Gallery, My Kingdom for a Gallery!

I meant to write another post in the All Things Art and Good series today since I have received permission from a lot of wonderful artists whose amazing creations I’m eager to share with the blogosphere 🙂 However, I had this little WordPress plugin/coding entry that I had to make since it has some relevance to the art posts.

When I wanted to start writing about artists and their work, I wanted to liven up the posts with some images. Instead of providing links which led in all directions and which people might not be interested in following, I wanted to provide some visual cue as to all the wonder and beauty they might find in my own post. A thumbnail gallery of images seemed the best way to do this.

Unfortunately, I couldn’t find a single gallery plugin for WordPress which did what I wanted 🙁 There were WordPress gallery plugins aplenty which either provided a gallery provided the images were on your own server or on a remote Gallery2 installation or on a remote image sharing service like Flickr. But what if I didn’t want to download somebodyelse’s copyrighted material and put it up on my own server? (That somehow felt a little icky to me …) What if all I wanted was a simple gallery of images mentioned in each post that provided a thumbnail image at the end of the post and linked back to the original image? There just didn’t seem to be such a beast …

So, I decided to code my own. In fact, I spent most of the day before I wrote the first All Things Art and Good entry in coding up the plugin 🙂 At the moment, the plugin simply takes a list of image links in a post as long as they follow a specific format, remove the image links from the post and instead creates a gallery of these images at the end of the post. The plugin will automatically create a thumbnail version of the original image on my server the very first time. After that, the cached thumbnail is used for the gallery each and every time.

I originally created the gallery to follow a rigid grid pattern based on a certain number of columns. This worked fine except that the nitpicky side of me couldn’t abide the fact that when you resized the browser window, sometimes you might have a lot of empty space because you went with a low number of columns 🙂 So I went for a more fluid gallery which would adjust its layout as the browser window was resized. Unfortunately, this dynamic layout results in some rather strange layout issues. However, I’m going with it for the moment.

Of course, there’s another issue. When I wrote the plugin, I was testing things with the entry I did on Ruben de Vela. Now all of Ruben’s images were direct links to a specific image file. So my method of extracting info from an IMG tag and linking back to the original image worked fine. But when I got to Phil McDarby, I realized that I had a problem – Phil had pages for each image and these pages were full of other images and links which would provide a lot more information to a fan of his work. But my thumbnails were linking directly to the main image only, not to the HTML page!

Of course, I mention the pages in my post and link to them directly as well so as to get around this but I’d rather have the thumbnails themselves link to the proper page. I’ll probably have to modify the way the plugin works to do that though. So I’m thinking about how I’m going to do that at the moment. If you’ve got some solutions to the issues I’m facing, or have been looking for a similar plugin and would like to get the plugin from me, let me know. But tomorrow, we get back to our regularly scheduled program and look at the beautiful and funny artwork of Denis Zilber 🙂

Tags: , , ,
Posted by Fahim at 6:57 am  |  No Comments

June 11, 2007

Best of Times

I’ve been doing a lot of project work lately and so have come back to something I’ve needed in the past – a good project time tracker 🙂 Now in the past, I’ve tried various software offerings. Of course, there are also online options such as SlimTimer or Toggl. But the thing is, I don’t like relying on online systems much, especially when I would have to be online to use the functionality when I needed it. Internet connectivity out here can sometimes go down suddenly and not come back for a while (sometimes weeks in one infamous incident :p). So, I’d rather have my tools on my desktop where I can access them quickly and always.

With the online stuff eliminated (or not even considered :p), I turned my attention to the desktop apps. And I tell you, there sure are a lot 🙂 But the thing is, all of them fell short in one respect or another. My personal favourites were TimeStamp, Easy Time Tracking Pro, Activity Time Tracker and AllNetic Working Time Tracker. Each of them had their own strengths and weaknesses.

TimeStamp is freeware and the source is included. So if need be, I could modify it to work the way I wanted it to. However, the interface was clunky (probably because the author was using freeware components so that he could keep the source open) and it didn’t have support for multiple tasks for a project. Or rather, it did have support for multiple tasks, but I didn’t like the way it did timings since you couldn’t get individual time blocks for each task. Plus, it had this whole thing about "slack time" that I didn’t really like :p

There is a free version of Easy Time Tracking (ETT) but what I downloaded was the pro version but I believe either would have suited my purposes. ETT is a solid application and it appears to have everything you might need. It allows you to manage multiple customers, projects and tasks for projects. You can set rates at the customer, project and task level. However, each time you start a timer, you have to specify which customer, project and task the timer is for – it will not take the current selection into account. However, you can pause the current timer at any point and restart and it will add multiple timing records for each time chunk. But the interface to do all this was clunky as you had to right-click on the system tray icon, get a menu and select your option from there. The other issue with ETT was the fact that it does not support multiple files/databases – all your project and customer information has to go into one pre-set database. So I didn’t like it overall :p

While ETT looked big, complicated and all-encompassing, Activity Time Tracker (ATT) went in the opposite direction 🙂 It’s compact, looks colourful and presented all the relevant information in one screen. But at the same time, it had client management and projects but not tasks. However, you could attach a description to each timing block and so link together multiple time blocks as one task. ATT did remember the currently selected project (and allowed you to switch projects via the tray menu) but starting/stopping the timer was cumbersome since you had to do it via the tray menu. There was no rate information at the customer level but you could enter different rates at the project level but it was all for the default system currency – you could not specify different currencies. ATT had some detailed reporting and a time sheet wizard to generate your time sheets for you but it too suffered from the same issue as ETT – there was only one single database and there was no way to change that.

AllNetic Working Time Tracker (AWTT) was probably my favourite out of the lot. Their website might not look very professional and be a little chaotic but the application was great and very simple 🙂 It provided support for individual project files (you could save as many as you wanted), projects and tasks within each project. There was no client management but since you could have multiple files, I assumed they were looking at somebody maintaining one file for each customer/client. There was a rudimentary billing system which kept track of whether specific tasks/projects had been settled or not and it keeps track of the currently selected project/task for timing purposes. However, AWTT has nary a sign of rates anywhere! You can’t specify rates and you certainly don’t see a sign of rates or currency in any of the various reports it can generate. What I did like about AWTT though was the fact that you could assign hotkeys to start/stop the timer and the nifty little hint window it popped up when you hovered over its icon in the system tray. Unlike normal tooltips which show only the app name or other little bits of information, AWTT actually pops up a tiny window where you could see all the project time totals for today, yesterday, the week and the month at the overall, project and task levels. You could also start and stop the timer from there as well. Overall, I loved the features and interface of AWTT but the fact that there was no option to enter rates (or currency) was a deal breaker.

Given that I didn’t like any of the programs I looked at, I decided to write my own. I had actually begun work on this app sometime ago and had called it Loafer. (If you notice most of the time tracking apps had really long names – I wanted something short and easy :p) I’d done about a day or two of work on Loafer and had then stopped but started again a couple of days ago. After several days of work, I have a usable app which allows multiple files (for separation of projects by client), projects, tasks, billing rates at both the project and task level and multiple currencies 🙂 I’ve integrated most of the features that I really wanted and I’m quite happy with it. It’s still a bit rough around the edges and I do need to do some more work on it and to add in reporting but once I get it all together, I believe it would be a pretty neat app. If anybody wants a copy of it for evaluation purposes, I can send you a time-limited version but I’m not sure I’m going to give this one away 🙂

Tags: , , ,
Posted by Fahim at 6:39 am  |  4 Comments

February 17, 2007

Free or fee?

I’m on this mailing list for Movable Type developers and over the last couple of days they’ve been having this discussion about how some Movable Type plugins are more expensive than some of the commercial versions of MT itself 🙂 I had no opinion on this one way or another since each developer has to work things out according to their own needs/goals and while overcharging people doesn’t sit well with me, I believe that the market will ultimately determine the price – if it’s too highly priced, nobody will buy it.

However, some of the developer reaction to this suggestion appeared to be extremely negative. They got defensive – How dare anybody suggest that prices should be moderated? Didn’t people know that they spent a lot of time on development? This I found to be both humorous and a bit annoying :p

I’ve spent over 10 years on developing (and supporting) a variety of freeware apps and I ran into the same issues that these people are complaining about. But I didn’t think of charging anybody for it. Somebody said that they had to deal with a lot of non-licensed user support issues and they were not compensated for it. So another person suggested that they use forums. The first person said that forums were ineffective. Now I’ve run support forums for several years and I’ve found them to be extremely effective. Once you build up enough answers to common issues (and have a FAQ) most of your user support consists of pointing to the relevant thread or to the FAQ. Sure, it takes a little bit of time which might be better spent coding but in the end, the end-user appreciates that time. Of course, not all of them thank you but if you develop software expecting money or thanks, then you are most probably in for a rough time.

But then again, I guess that was the crux of the matter in the discussion – what did the developers who charge money actually want? Did they want the monetary compensation? Did they simply want less support hassles by providing support to only those who paid them? Did they want to elevate their code from a simple "freebie" to something with a bit more stature because you had to pay for it? I don’t know. Each person’s motivations are different. But some of the arguments did ring hollow to me – it was as if they actually wanted to be paid but didn’t want to say so.

There’s nothing wrong with wanting to be paid (or not paid) for your work. Just be honest about your motivations instead of hiding behind excuses. At least, that’s the way I feel 🙂

Tags: , ,
Posted by Fahim at 7:09 am  |  No Comments

December 25, 2006

Shameless plugs

I meant to write about .NET 3.0, which has dropped by the wayside for the moment (for me personally) due to the fact that there is no really capable IDE to do development in and I’m too lazy to download the 4GB or so of files necessary to run the CTP of Orcas (the next version of Visual Studio) as a virtual machine 🙂 I also meant to write about Ruby and Rails, which I’m actually beginning to like as a development environment for doing web-based work because of how fast you can get off the ground.

I would also have liked to have written about Eclipse, which I’d taken a look at many times over the years as a possible Java IDE but had always given up because it didn’t appear to be ready – it seems to be ready now, or much closer 🙂 I particularly wanted to write about RadRails which integrates nicely into Eclipse and provides you with an amazing IDE to do Rails development in :p I might also have liked to have mentioned the fact that Eclipse also appears to have plugins for PHP and some of the other languages out there and is now on my list to be looked at as the development IDE of choice. But I haven’t actually tested out PHP or the other plugins :p

So, I think I will content myself with a simple blatant plug for something else totally not development related 🙂 There’s this link on the sidebar for another site of mine named, "Honest, the Martian Ate Your Dog". It’s the first iteration of this novel I’m working on and I’m putting up a few new pages every week. Some people seem to like it. So go on, take a look and let me know what you think 🙂

Tags: , ,
Posted by Fahim at 8:06 am  |  No Comments

December 24, 2006

Railing at .NET

At around the same time I began developing an interest in the .NET 3.0 framework, my friend Nigel contacted me regarding a Ruby project that he was involved in named Hobo 🙂 I had looked at Ruby several times before (just as I had looked at Python and a few other languages of that ilk :p) but the fact of the matter is, I’m a desktop developer mainly. While I do enjoy coding for the sake of coding, what gets me going most of the time is to be able to develop a completely new UI that just rocks and to be able to tie in functionality to that UI that makes it not just a pretty face 🙂 I just can’t do that kind of thing with web apps. They are just too stable, too boring – at least for me 🙂 So I save the web apps for when I get paid to do work and I do most of my development work in my spare time for the desktop.

Now that’s not to say that I don’t do web apps development. On several occasions, I’ve developed web apps to fill a need that I had. But most of the time, my personal needs are more for desktop apps than for web apps. However, in the course of our discussions, Nige said something interesting – or at least, something that got me thinking and something which prompted this post 🙂 He said that "desktop apps were going the way of the Dodo". Of course, it’s possible that he was just being facetious but the remark struck me the same way Larry Ellison‘s championing of the thin client a long time ago (in computing terms that is) did 🙂

Just like desktops are not going away any time soon to be replaced by thin clients (or network computers), desktop apps are not going to be suddenly supplanted by web apps. There is a place under the sun for both. There are times when a server-based solution would work for you better than a desktop one and then there are other instances, that it would just be plain foolish to go for a web-based solution just because you thought web-apps were the greatest thing since sliced bread :p For instance, I know that a lot of people think highly of services like Writely (now renamed to Google Docs & Spreadsheets) because you can have your document online, share it with anybody and be able to access it from anywhere. Call me paranoid but I don’t like online services for document editing – at least not as my primary access point for said document. I’d rather have it on my own hard disk where I can take the damn computer to a technician if the thing breaks down, or I can simply login and copy the data even if my Internet access is down.

Of course, the flip side of the coin is that Google probably has better backups and better disaster recovery in place than I do 🙂 But on the other hand, Google might not be the best case to argue the scenario of web-apps vs. desktop apps. What about the roll-your-own type of web app? You deploy it on your webserver (hosted elsewhere) and put your data on it. Are you going to be completely sanguine in the belief that your data will be safe and accessible from anywhere, any time you want? I know I won’t be – but then again, as I said before, I’m probably more paranoid than others :p

In the end, I guess whether you go desktop or web-based, the decision will depend to an extent on personal choices and other factors. But I don’t believe either web-apps or desktop ones will die away anytime soon 🙂

Tags: , ,
Posted by Fahim at 6:46 am  |  No Comments

December 23, 2006

To .NET or not .NET

I come from a coding background where we always tried to keep application sizes down and memory utilization low. So, if I can create an application which results in a 1-2MB download, I’m really happy. Even my biggest application is probably under 5MB. Sure, I realize that in today’s world of multi-gigabyte game and application downloads, that is an anachronism but I still like keeping my application sizes small 🙂

Because of this obsessive-compulsive desire (or rather, need) to keep application sizes small, I have not looked at .NET as a possible development platform for my personal projects. Sure, I’ve done .NET development when I worked for different companies. Since internal deployment was via the network, the 20MB or so download for the core framework wasn’t that big a deal. However, when you distribute software (and freeware at that) over the Internet, I really feel bad when I have to ask somebody to download a hefty runtime before they can run my app.

So what has changed? In a sense, nothing? .NET 3.0 is out and the framework now stand at around 50MB and the basic situation is the same. If you don’t have the .NET 3.0 framework installed, you still have to go through a 50MB download. But what’s new is what the framework offers. The possibilities are (while not endless) quite interesting 🙂 I love what the framework promises with the 3.0 iteration and the ease with which much of it can be done. Being a software junkie, I’m allured by the new UI elements and what they can do for my own application. In fact, I’m definitely considering shifting to .NET 3.0 at least for some of my applications.

Of course, there are issues. The aforementioned hefty download being but one issue. The other is deployment of web apps. Sure, .NET 3.0 offers beguiling promises for web applications – the possibility to have a really nice web interface for your applications. But as far as I understand, in order to develop and run web applications using .NET 3.0, you still need a Windows server running IIS. And how stable are Windows servers? Personally, I haven’t had much luck with Windows as a web server and I really wouldn’t want all of my critical sites on a Windows server. So that makes .NET 3.0 web apps, (at least for me) something nice to play with but not something I’d want to use on a production basis. But that is just based on my own personal requirements and situation. Your mileage will certainly vary 🙂

Tags: , , ,
Posted by Fahim at 7:13 am  |  No Comments

September 12, 2006

Weekly update

It’s been a rather interesting week 🙂 The highlights – I pulled all but six scenes from "Honest, the Martian Ate Your Dog" and decided to rewrite it, I started work on a new PIM application and above all, I’ve been communicating with a lot of people and it’s been both good and bad (and yes, I can’t mention some of it here even in broad, general terms due to various reasons :p)

First, the writing news. After reading Simon‘s Hal books (and receiving a kind crit from him about both my query letter and the first page), I decided to plunge in and do something that I’d been considering for a while. I decided to re-write my first novel 🙂 As some of you might know, I’ve been trying to get an agent or publisher interested in the book for a while now. While a few were mildly interested, nothing has come of it so far. I knew that the book wasn’t the usual fare – it was humorous science fiction, it had no definite villain and it didn’t have much action. But I thought that this was my "style" of writing. That it was a personal thing.

However, after reading Simon’s Hal novels, I finally came to realize that my story just wasn’t interesting to everybody out there. Sure, some people will find it interesting because it appeals to their specific natures (like it does to mine :p) but it doesn’t have mass appeal. And that was where I had to make a choice. I could have said, this is a personal work deeply connected to me emotionally and I’m not changing a word, no matter what. Or, I could have said that I’d make whatever changes necessary to get published. Of the two roads, I decided to take the one which (hopefully) will lead to publication 🙂

I enjoy writing and there was a time when I said that I’d simply write for the sake of writing as long as somebody enjoyed what I wrote. I still feel that way but with the advent of old age, I am getting to the stage where I don’t want to simply do something with no goals set 🙂 I see no point to spending months on a novel if nobody will read it. So I’ve decided to put my all into this new version of "Honest" and see if it will get published. If it doesn’t, then its perhaps time to say that getting published is not the dream to follow – or not, I really don’t know. I’m rather fickle that way :p But at least for the moment, that’s the goal.

In order to do this, I’ve decided to restructure "Honest" completely. I’ve dropped everything but the first six scenes and even those are being changed to introduce more conflict and get things happening more quickly. I’ll be bringing back some of the older scenes depending on how the story develops but at least one sub-plot will be completely dropped and I might change the current four-threads-of-story format to something different. Besides, the current format gives equal time to all four threads and that wasn’t working either :p Let’s see where it goes when I take up writing again.

But writing’s on hold for the moment while I work on my latest coding project – a PIM (Personal Information Manager) which allows you to store all kinds of information using a treeview format. There are tons of other PIMs along the same lines, right? Yes, but the thing is that none of them have the one thing I really want. The ability to tag information so that I don’t have to rely on the tree paradigm to categorize and store information. I’ve found only two PIM apps which actually allow tagging but they don’t have anything besides basic editing features for their notes. So I decided to create my own. But things have been so hectic that I am not making as much headway as I’d like. Ah, well …

Tags: , , ,
Posted by Fahim at 7:02 am  |  No Comments

« Previous PageNext Page »