Walk Alone

My shadow’s the only one that walks beside me

Archive for March, 2006

XAMPP  

Bhise has finally settled down to using b2evolution. From his first post on the new setup:

this new blog setup took me 3 days of work, 12 opensource blog engines, 5 free hosting sites and many hours of frustration.

To reduce the frustration, I pointed him towards XAMPP. It has re-affirmed my belief (along with The Portable Suite and TiddlyWiki) that good things come in little sizes too. From its site:

Apache HTTPD 2.2.0, MySQL 5.0.18, PHP 5.1.1 + 4.4.1 pl1 + PEAR + Switch, MiniPerl 5.8.7, mod_ssl 2.0.55, Openssl 0.9.8a, PHPMyAdmin 2.7.0 pl1, XAMPP Control Panel 2.1, eAccelerator 0.9.4, Webalizer 2.01-10, Mercury Mail Transport System für Win32 und NetWare Systems v4.01a, FileZilla FTP Server 0.9.10a, SQLite 2.8.15, ADODB 4.65, Zend Optimizer 2.5.10a, XAMPP Security. For Windows 98, 2000, XP.

The least file size available is a self-extracting archive at 26MB, and a ZIP at 77MB. Now lets see, I got a pretty impressive setup on my machine - Apache 2.0.54 (4.66MB), PHP 4.4.0 (6.64MB), MySQL 4.1.13 (15.4MB), PHPMyAdmin 2.7.0 (1.87MB) and ActivePerl 5.8.7 (12.7MB). And the file size in toto? 41.27MB. And I don’t have an FTP or mail server or the other add-ons that they have listed… WOW!

Forget file size - XAMPP gives the user one control panel to configure its services and one directory to look after. Compared to what a user would have faced if he had installed the components individually, its utopia.

Compared with WOS Portable, XAMPP has a clear advantage in its array of components on offer; but as I’ve mentioned earlier, XAMPP is not truly portable, even if it is offered in an “unzip, run, delete” format.

And why am I not using XAMMP? Even after recommending it to others? Because where I’m headed, XAMPP is redundant. The environment would be just as I have set it up right now - independent directories and config files, etc. etc. But its nice to know that if I ever get frustrated with the LAMP/WAMP architecture, I can turn to XAMPP ;-) .

March 12th, 2006 at 1:02 pm

The Portable Suite  

I made a mistake - I bought a USB thumb drive that has a measly 128MB. And right now, I’m straining at the filespace constraints. Life for a thumbdrive user just got a lot more exciting. And it is Open Source leading the steps on the dance floor.

Linux users are quite familiar with the concept of a “live” (you! get your mind out of the gutter; not you; you!) CD. ISOLINUX is a bootloader that helps Linux to boot from read-only media - CDs and DVDs. SYSLINUX does the same from a FAT (FAT32?) partition. I made an attempt (aborted because my motherboard couldn’t boot a USB device) to make a bootable USB Linux distro.

Windows users, on the other hand, have had a limited exposure to a “live” OS; the Win98SE rescue disk was the closest I’ve seen to a “create once - run anywhere” live Windows OS.

So, a couple of ingenious people have come up with the next-to-perfect solution. Portable applications. Self-sufficient versions of popular Open Source apps that fit on a (large enough, by my means) thumbdrive and can be run on any Windows OS that can autodetect a USB thumbdrive. In a word or two, Win XP or later.

  • OpenOffice.org - Want to take advantage of the OpenDoc format, but worried your friend/college/workplace doesn’t have OpenOffice? Just get Portable OpenOffice.org.
  • Portable Firefox and Portable Thunderbird - Need I say more? No longer shall you be constrained by the stupidity of the admin in your college/workplace or by your friend’s insistence on sticking to IE (I say, ask him to drop IE, also Outlook; or drop him).
  • WebserverOnStick Portable - The ultimate power app. It runs Apache/PHP/MySQL from your stick, um, I mean thumbdrive.
  • TiddlyWiki - Did I mention TiddlyWikiOnStick?

One important feature of these apps is they do not write any changes to your registry (specially services, in case of WOS). This is where XAMPP failed - it interfered with the Apache and MySQL services I had already installed - not a happy scenario at your workplace/college or if your friend is a newbie in these things.

Of course, by the time I get around to buying a large enough thumbdrive, the scenario would have evolved considerably!

March 12th, 2006 at 12:14 pm

Dave’s survey  

Dave asked me to setup a survey for him - to be precise, I told him that with the sort of survey he wanted, a custom-built one was the best option. So I set about creating one for him - my first true PHP/MySQL application. With no help from anyone except the manual and the Net. Bhise did the text field and form part - guess I was too lazy to do that; but then I did the scripting and the radio buttons, so there you are. Besides, I wanted to do the stuff all by myself.

There were many differences and much grumbling. I experienced first hand what I heard in OOAD and Project Management.

Client’s demands are exceeding the scope. Client is not comprehending the software capabilities. Client’s vision of the project is flawed.

And much more stuff in a similar vein. All that for a simple survey script. No wonder the success rate for software projects is around 20% (thats what I remember from the OOAD course - no research done; so no flames on that please).

Anyway, its done and online. Dave will let you all know in due course where you should head to participate in the survey. I’ll put up the sanitized code (can’t let you have my database details now, can I?) in a few days.

March 12th, 2006 at 12:59 am

Tagged with , ,

Feeling Tiddly!  

I have moved the site to TiddlyWiki. You all know my preference for a Wiki as an underlying CMS for my site. If not, well, you know it now! From the TiddlyWiki site:

Welcome to TiddlyWiki, a free MicroContent WikiWikiWeb created by JeremyRuston and a busy Community of independent developers. It’s written in HTML, CSS and JavaScript to run on any modern browser without needing any ServerSide logic. It allows anyone to create personal SelfContained hypertext documents that can be posted to a WebServer, sent by email or kept on a USB thumb drive to make a WikiOnAStick. This is revision 2.0.6 of TiddlyWiki, and is published under an OpenSourceLicense.

That is what it runs on. What is TiddlyWiki?

A TiddlyWiki is like a blog because it’s divided up into neat little chunks, but it encourages you to read it by hyperlinking rather than sequentially: if you like, a non-linear blog analogue that binds the individual microcontent items into a cohesive whole. I think that TiddlyWiki represents a novel medium for writing, and will promote its own distinctive WritingStyle.

The first thing to do was (no points for guessing) to break into it. To see whether I could seperate the JavaScript from HTML. I had two good reasons.

  1. I’m using sitecopy for syncing my local and remote hosts - I can’t afford to upload 150+ KB every time. Splitting TiddlyWiki reduced the upload to 30+ KB.
  2. I can now run multiple Wikis from the same JavaScript file - TiddlyWiki farms anyone?

The split threw up some problems. The JS from the host’s ads were interfering with the Wiki’s JS and not allowing it to initiate - “bootstrap” is the word. A hint from the TW mailing list and I fixed that - ads or no ads, TW now works!

With another hack in its main(), I plan to use it as an index file for my USB stick and single-session/to-be-finalized CDs.

March 11th, 2006 at 11:56 pm

cookie time for browsers  

The browser wars continue. I was involved in quite a few activities lately that had me comparing browsers. Mostly FF and Opera. IE simply did not figure in the race.

The first time I decided on comparing browsers was when I moved my images to an image host. Naturally, I had to resize them. Can’t have images breaking the CSS, can we? The trouble came up when I used the width attribute in the img tag. FF would crawl whenever the image was in the view-port. A search revealed that FF 1.5 has an issue with memory handling when dealing with image files. It simply refuses to return the memory to the heap! This I could verify. Opening image files in multiple tabs would bring FF down. Per se, FF 1.5 seemed to have bad memory management; again, verified. The 1.5 version is the only one I’ve had to kill from the task manager. Thite mentioned that this was a “feature, not a bug” thing meant to speed up using the Back and Forward tabs. The feature he alluded to, does indeed exist. But it is independent of the problem I’ve mentioned which has been documented and verified.

So, I turned to Opera. No problems here. Resized image or not, it handled images like it was a goddamned image editor. I could even grab images with the pointer and shuffle them around! Though of course, I had to drop them, since I had nowhere to drag the images to. So that feature wasn’t explored much.

The problem wasn’t being fixed, though. So I took a guess and put in images that were already resized. No problem. A few quick checks later, I was able to verify that FF has a problem with images if it has to resize them dynamically - through the img tag or maybe because you are asking it to “fit image to window”. It could handle static images of any size easily, the earlier problem (which I dug up) not withstanding.

Cookie for image handling goes to Opera.

Next up are the feeds. Opera detects and handles both RSS and Atom. FF simply displays the RSS XML file and downloads the Atom XML file. Nothing that a plugin can’t fix. However, I had an error in my page that was reflected in the RSS feed. Opera simply displayed the entries upto the one having the error and stayed quiet. FF showed me a yellow page with the error message in bold and a nice arrow pointing to the location of the suspect syntax in my RSS feed.

As an end user, I’d have preferred Opera’s response. As a site developer, it was FF which helped me detect and correct my error and set up a correct feed.

Half a cookie to Opera and FF both for feeds.

Opera has a tendency to poach others’ resources. How? Do an opera:about. If you have FF installed, you will see FF’s plugin path included in Opera’s plugin path. Very clever. I also tend to believe Opera takes stuff from other browsers’ cache. In the college lab, I had loaded a page (I’ll come to it later) in IE. Opera displayed the page in the same style. In case you are wondering, the styles had been set for IE/non-IE browsers; so Opera should not have dispalyed the page in the same way; but well, it did. Back home, where I use FF, it showed the page in the non-IE style. So, form your own conclusions.

Half a cookie to Opera for being smart. Half a cookie to FF for its open source roots that enabled Opera to poach on its plugins.

No more cookies - IE bashing ahead.

When I edited this template, I simply didn’t think any of my readers (pitifully less they may be) would be using IE. So I skipped modifying the IE style (yes, the page mentioned above is this blog’s index file). To my horror, a friend using IE told me today the page wasn’t looking good. To make matters worse, it appeared different on the college machine’s IE from what had appeared on his own IE. This was also where the suspected cache poaching by Opera took place.

Back home, I tried all sorts of tricks. None worked. Finally, I disposed of the IE stylesheet and set the template to give the same style to all browsers. The page worked when served from localhost. No rollover effects though. When served from the remote host, it loaded the page, but popped this error.

Line: 2
Char: 1
Error: Syntax error
Code: 0
URL: http://rvbhute.freelinuxhost.com/wordpress/

I have no idea where to start looking. When I asked a friend to check up on the page, he reported no errors but said the sidebar was displaced to the bottom! So apparently, even the rendering was inconsistent.

My advice - get FF. If you are anti-FF for some reason, get Opera.

March 6th, 2006 at 10:00 pm