Archive for November, 2008

Weechat Short Cuts

I discovered the alias command a few days ago. This is great when you have more then 10 channels open. Weechat supports alt+# but you only have 10 of those.

The command for opening your 11th buffer is /buffer 11 but this is often longer to type then alt+0+f6. Easy way to make this shorter is to alias /buffer with /b.

/alias /b /buffer $*

This tells it to redirect all params to /buffer

the same can be done with /url for those of you using the urlgrab python plugin.

/alias /u /url $*

For further info on weechat commands.


Tuesday, November 25th, 2008 General Comments Off on Weechat Short Cuts

Pigs Can Fly

Php is so loosely typed that true==false in php.

$a = ‘foo’;
$b = 0;
if ( $a == true && $b == false && $a == $b ) {
echo “Pigs Can Fly”;

Produces “Pigs Can Fly”.
Strings are considered true if they are not empty or null. so ‘foo’==true would be true==true ie true
Numbers are considered false if they are 0. so 0 == false is false == false ie true
As for the last point this still fascinates me.
Because there are no numbers in variable $a, is set to 0, therefore int 0 == int 0.



Wednesday, November 12th, 2008 Programing Comments Off on Pigs Can Fly

Gmail Mobile V2

In one of gmails blogs they announced the release of version 2 of their mobile application for gmail. I was very excited to try out the new features this had to offer

  • Multiple Accounts
  • Basic Off line usage
  • New short cut keys

At first I was very pleased with the cleaned up look and feel the added short cut keys making navigation much simpler on a mobile device with limited screen sizes and most phones lacking fully functional keyboards.

Just for the record I am currently using a Nokia 6300 wiki | gsmarena |nokia making use of edge data connection

At the start of this testing proccess the jar/application was +-256.8kb for a phone application this is quite chunky it is still with in the acceptable bounds for the maximum jar size my phone can handle +-1mb. To my surprise running the application for the first time brought up a loading while it attempted to download the other parts of the application such as images etc. (I do not know exactly what was downloaded with out going into further debugging/decompilation at this point in time I am sure that would breach their EULA) after this proccess the application had taken up +-400kb of my phones internal memory and I had to remove 2 of my previous application in order to make space for this “beast” of an application.

As part of the offline browsing of mail, Gmail has to cache the mail on the phone in order for it to available offline. Using some sort of format in the RMS(Record Management System) anyway phones have a limited amount of RMS data that can be stored per application. This is something that worries me currently my Gmail application is sitting at 830kb this is an exceptionally big for a mobile application.

For a mobile developer as my self I like to see things catered for the lowest (reasonable) common denominator. While using this new improved version of gmail I had to remove another application in order to make space for my ever growing Gmail one.

Benchmarks Questions

  1. Is there a limit to how much Gmail will try and store on my phone?
  2. Does the application ever check getSizeAvailable or getSize before trying to write to the RMS
  3. Will there be an option to turn off offline caching?
  4. How much data transfer is really saved by not reading from an http connection and reading from the RMS – Is the amount of kb’s saved worth the read/write access to my phones persistent storage

I would really like to revert to the older version of Gmail as I use this application often when I am not near a PC in order to check for important emails. The only issue with this I had to remove the old one to make space for V2 and they have since removed the option to download the legacy version.

I have reported this on the Gmail list archives here.

Sunday, November 2nd, 2008 Reviews 5 Comments