Monthly Archive for March, 2008

Speed up Firefox Startup with Firefox Preloader

My Firefox startup was slow. Its one of my primary applications as a web developer so its very important that it runs well.

I found Firefox Preloader and it did the trick. It cut down my initial startup time to a few seconds.

One more thing. It turns out I've been blogging here for a year now and I just past my 100th post. This is post 101. Feels good still to be around. Thanks for visiting.

Choosing Your Freelance Clients

Freelancers have this advantage over companies. You can choose who you want to work with on a personal level. Old school business types would tell you its not personal just business, that you should be able to work with anyone.

But when we work from home and get to know our clients first hand and see their software grow up with them, it becomes personal.

Choose your clients well. A few will stick with you for a long time. That one annoying client that pays more but gives you too much stress will take your attention away from your other, probably better clients.

Oh sometimes you get great clients that pay well too! :)

Update: similar articles

Top 10 Ways to Fire the Client From Hell - Inside CRM

SitePoint Blogs ยป How to fire a client

Internet on the Road with WIFI, 3G and JoikuSpot

I tried out JoikuSpot with my Nokia N80 and notebook. Its simple to setup and worked pretty well. This is definitely useful on the road.

This method can't beat 3G modems since they can go up to 7.5Mbps. The Nokia N80 only supports 384 kbps. But its better than buying a dedicated 3G modem for me because I don't need to use it often between ADSL points.

If you don't already have a 3G phone it might be cheaper and faster to get a 3G modem.

I checked Mobitel and Dialog for 3G modems a few months ago. Back then I was on Linux only and they didn't have drivers etc. This should work on Linux as well since its on WIFI.

JoikuSpot has a few limitations at this time. It only supports HTTP/HTTPS and the WIFI hotspot is not secure. They say other protocols and security is on the way.

Here is the introduction from the developers:

JoikuSpot is a free mobile software solution that turns a Nokia Smartphone to a WLAN HotSpot. You will carry internet in your pocket. Connect your laptop to web everywhere! FREE -- INSTANT -- EASY

Technorati Tags:

SQLite Vacuum on F-Spot

I heard on FLOSS Weekly 26: SQLite the other day about the vacuum command in SQLite and how it rebuilds the database and makes Apple Mail faster.

I started F-Spot to check some old photos and it was getting stuck. Hmm wait F-Spot uses a SQLite database too, so I tried something like this.

Went to the F-Spot directory.

cd /home/dilantha/.gnome2/f-spot

Backed up the current SQLite database.

cp photos.db photos.db.20080326

Opened the database

sqlite3 photos.db

Then in SQLite I got some help, listed tables and ran vacuum on photos and photo_tags.


.help
.tables
vacuum photos;
vacuum photo_tags;
.quit

Now F-Spot is running smooth as ever.

Technorati Tags:

Running Bash Scripts in Windows Scheduler

Normally you can run scripts in the Cygwin shell. But I wanted to run a bash script in Windows scheduler. Find the Cygwin.bat file probably located in C:\cygwin. It looks something like this.


@echo off

C:
chdir C:\cygwin\bin

bash --login -i

This batch file doesn't let you run an external script with it. Add a %1 at the bash command's end like this. What you are doing is passing the first parameter in Windows to bash.


@echo off

C:
chdir C:\cygwin\bin

bash --login -i %1

Now drag and drop the Cygwin.bat file into the Windows scheduler window and edit running time properties etc. Now add the script to run at the end of the Cygwin command. For example like

C:\cygwin\Cygwin.bat ./bin/mysql/db.dilantha.info.sh

Windows Scheduler

Technorati Tags: ,

Bajaj Pulsar Mania TV Commercial

I like this ad. When will Sri Lanka catch up?

Update: Looks like Scourge had something similar to say. Here is another good ad that takes a while to sink in.

Technorati Tags:

PHP for Developers

I like to follow up on Why You should learn PHP by rumblinglankan.com which talks about PHP for bloggers and extend it for programmers in general.

I was a full blown Java developer back in the day. I knew many developers who stuck to their guns and did one thing like Oracle, Java or .NET and said it would never go away and there would always be a market for it.

Well things change. Windows administrators are learning Linux, VB6 guys probably moved to VB.NET etc. If you sit still your skills will become obsolete.

A few years ago I saw the potential of PHP. It was simple to learn widely deployed on the Internet. I started building some Intranets with it, thinking I can move some of that logic out to a website later.

That was back in 2005. Now more than 50% of my work day is PHP, MySql, drupal, Code Igniter, WordPress or something other than Java. If I locked myself into Java I wouldn't have got most of the projects or opportunities I got.

Now I use PHP from writing system scripts to extending drupal. I'm also thinking about trying PHP GTK to write a Windows GUI application.

Look around and try something. Software is always changing, try to keep up. :)

Technorati Tags:

Learning from Stats

Looking at my stats I found the following.

  • Hits go up from Monday to Wednesday. Then goes down towards the weekend.
  • Weekdays visitors come first thing in the morning or after lunch around 2pm
  • There are less hits in the weekend, but visitors stay longer and read more posts.

So most visitors drop by for a quick check on weekdays starting on Monday. They probably check on Kottu and just pop into a few posts they like and go back.

This means my current tendency for short regular posts during weekdays work well. Visitors don't have time to stick around for a long read anyway.

Its a good idea to write longer and in-depth content during the weekend.

Technorati Tags:

File Sharing Between Linux and Windows

I wanted to backup from my work (Windows) box to my personal (Linux) box. I found these useful videos on setting up Samba file sharing. This first guy was right I didn't know about the extra configuration changes.

http://screencasts.ubuntu.com/SAMBA_Filesharing

Funny story. I did all this and didn't see the Linux box on the network. Hmm that's strange. I opened Firefox on Ubuntu to find no Internet either! With a quick glance at the back of the computer I saw the network cable was not plugged in. :)

I need to get another network cable for the mac. I keep switching between them.

Here is the Ubuntu Wiki page for Samba. Which has more details.

Technorati Tags: ,

Looking for a PHP Developer

The company I work for is looking to hire a PHP developer. Please contact me with your CV.

We are looking for PHP, MySql, HTML, CSS, JavaScript and drupal experience.