Saturday, December 26, 2009

Busy weeks


So much for the Neoteny updates, last two weeks has been a case of Murphy's Law unleashed. Barely had time for anything else besides the events unfolding at work.

Catching up on Android development now. Getting the hang of it. Eclipse integration makes it a wonderful and painless experience.

Sunday, December 13, 2009

Neoteny Singapore Camp 1

Attended Neoteny at SMU on Saturday, primarily to meet up with James and to get a feel of what the VCs and entrepreneurs are doing here.

I'll do a writeup later. Plenty of work keeping me busy later part of that Saturday till today.

Tuesday, December 8, 2009

Renting stuff off the Cloud

While chatting with the owner of BuUuk.com(Jon), he briefly mentioned that he was using Amazon EC to serve static content at a cheap rate. This got me thinking - perhaps I can host my lab machine on the cloud and rent it at a far cheaper rate than what I would pay for a physical machine. I'll have to do my calculations( or best impression of it ) and then dive in and hope for the best :)



Sunday, December 6, 2009

Being clever and not following standards

Had a quick glance and will look it over later. Programmers sometimes(or is it most of the time) have the habit to perform a 'quick hack', a duct tape approach if you will, when approaching a problem. It solves the problem fast but by not following coding practices set by the organization will cause headaches later on for the rest of the team.


http://www.omninerd.com/articles/Coding_Practices

Friday, November 27, 2009

Ubuntu on MSI Wind U100

Got my Wind Netbook yesterday, took out Windows 7 and installed Ubuntu Karmic Koala. The distribution do not run well on Wind. The brightness control will increase and decrease by itself for about 2-3 minutes till the system settles down.

The solution was to downgrade to 9.04(Jaunty Jackalope). That worked well enough but I'm a little disappointed that I can't use 9.10. Karmic has nicer GUI and package management enhancements which I was used to.

Hoping that the bugs will be fixed in the near future.



Saturday, November 21, 2009

Where did lighttpd go?

Bummer, site seems to be down. Think I'll use Mongoose httpd instead.

Subversion and Google Projects

Installed Subversive


Useful link



Checking out projects from Google Code - the URL should be configured as:
https://yourproject.googlecode.com/svn







SVN client on eclipse

SubEclipse works perfectly when installed in Windows but not Ubuntu. You'll receive a dialog "Unable to load default SVN Client". It's because the Linux version does not come with JavaHL .



Apparently installation of JavaHL isn't straightforward.

I've found an alternative:

Will be trying this out.


Friday, November 20, 2009

HTML 5

I've avoided doing any HTML/Javascript related work since HTML 3.2
Lately I've noticed HTML 5 being talked about in the usual tech forums and I thought it's just some incremental improvements with a video tag being thrown in. I was mistaken.

The proposed HTML 5 standard apparently covers not just video, but how you can manipulate images and shapes in the browser as well. The appearance of the canvas element should be a welcomed specification. Finally Flash will not be the only player in town(Silverlight too?).

I'll be looking closely at the canvas element. Graphics is something I love playing with since the microcomputer days( 10 GR: 20 PLOT 10,20)

Back to my google wave gadget...

Sunday, November 1, 2009

Server Name Indicator

Something to think about next time when deploying servers.

http://en.wikipedia.org/wiki/Server_Name_Indication


Noticed Google App hosting doesn't support it now.

Sunday, October 18, 2009

Hello World in Android

What do you get when you put a hot weather , a bored programmer and a bottle of tequila together?

You get hello world in Android!

Downloaded the bunch of dev kits, Eclipse IDE (bye bye Netbeans) and read the docs from Google.

Here's the result!



Sunday, July 5, 2009

Regular Expressions on a rainy Sunday afternoon

Since it's raining and there's nothing much to do outdoors I've began coding the portion of the code to parse Subject of an smtp mail to check for magic code for my pidgin plugin. Revisiting some rusty regexp knowledge.

Thursday, July 2, 2009

Nmake 1.5 doesn't work on 64bit Win7

grrrr.

Replacement is http://search.cpan.org/dist/dmake/

Hope it works

Saturday, June 27, 2009

S/MIME for Windows Mobile

Some reading up to do.

http://www.jacco2.dds.nl/networking/windowsmobile-smime.html

Gmail has POP3 too?

I didn't know that. Guess I shouldn't have signed up for hotmail if I could POP using gmail...
Switching to IMAP, LiveMail POP3 has connection limitation, you can't poll every 5 mins for hotmail.

Ran into an issue with my CPAN as documented here

More Perl stuff

Done with the SMTP code for pidgin, now writing the script for checking live.com pop3 email.
Doing an upgrade to the CPAN module and then installing Mail::Message( yes to everything). I need this to read MIME messages.



CPAN install failed:
Appending installation info to C:\Perl\lib/perllocal.pod
PLOBBES/Mail-IMAPClient-3.19.tar.gz
nmake install -- OK
Running install for module 'IO::Scalar'
Running make for D/DS/DSKOLL/IO-stringy-2.110.tar.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/D/DS/DSKOLL/IO-stringy-2.110.tar.g

Alert: While trying to 'parse' YAML file
'C:\Perl\cpan\FTPstats.yml'
with 'YAML::XS' the following error was encountered:
Usage: YAML::XS::LibYAML::Load(yaml_sv) at C:\Perl\lib/YAML/XS.pm line 70.

Going to snag a copy from:

Saturday, June 20, 2009

Treasure hunting for Perl Modules Part 2

Windows Live Mail has recently enabled Secured POP3 so you could connect using any normal modern email client to retrieve email. I've wrote a Perl script using Mail::POP3Client to retrieve email from my hotmail account. The script kept returning DEAD when I checked the connection status, the script completed way too early, indicating that it probably didn't perform any socket connections at all.

Dumping the Connect(); and Message(); calls to STDERR gave away the error:
IO:Sockets::SSL wasn't installed.

AS PPM doesn't have the required modules so it was off to http://cpan.uwinnipeg.ca/PPMPackages/10xx/ to grab the IO::Sockets::SSL and the dependancies.

ppm install http://www.bribes.org/perl/ppm/Net-SSLeay.ppd
install Scalar-List-Utils from default ActiveState PPM repo
ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/IO-Socket-SSL.ppd

Works now :)
Off to grind on the warlock.

Treasure hunting Perl Modules

I'm trying to render HTML content output as plaintext much like Lynx, I found some posting suggesting to try HTML::FormatText.
Fired up ActiveState PPM to install it but the .pm apparently wasn't in the repo. Found a similar module on PPM :

HTML::FormatText::WithLinks.

Installed it, problem was that I couldn't figure out why I was getting this:

Can't locate object method "new" via package

Yes that's with the example from the module documentation. Grrr...

Had to install it via CPAN, which started to complain it didn't have a make tool.Download NMAKE 1.5. Wow it's been a long time since I had MS NMAKE on my system.
Finally the code works.

I'm off to play PVP to let off some steam.

Tuesday, June 16, 2009

iTunes under XP 64? Tough one

This isn't the first time I've encountered lack of device support for XP64. The recent one was my Huawei hsdpa stick. Works in xp32bit and Window 7 64bit rc hmmmm.

I had some problems with iTunes too, it kept insisting that it needed s 64bit Vista. Downloaded Orca from Microsoft and removed the restrictions from the iTunes64 msi. It... works now.
-posted via mobile while travelling on a crowded bus

How i wasted a tuesday evening

My old Dell XPS notebook runs at home while I go to work and I occasionally RDP back to it. I usually see some IMs on my Pidgin IM when I log in, thought it would be a good idea to script something in Python+ D-BUS to send mail to my gmail account once I get any new messages, so I can check them on my work desktop, or Wince mobile. Till I realized the Win32 Pidgin doesn't have D-BUS.

The next best alternative calls for a quick and dirty scripting using Perl(ActivePerl 5.10). Boy the documentation is pretty sparse. After googling around(http://sriunplugged.blogspot.com/2009/03/autoreminder-in-pidgin.html) I've managed to come up with a script that works. Phew. Todo: presense + stripping html tags from the messages.

Bedtime now.



use Purple;
use Pidgin;
use Net::SMTP;

%PLUGIN_INFO = (
perl_api_version => 2,
name => "Email New Message Plugin",
version => "0.3",
summary => "script to mail to user any message received",
description => "Sends an email when a new message is recieved",
author => "Alvin Ng (Rebooting at gmail) ",
url => "http://pidgin.im",
load => "plugin_load",
unload => "plugin_unload"
);
sub plugin_init {
return %PLUGIN_INFO;
}
sub plugin_load {
my $plugin = shift;
Purple::Debug::info("testplugin", "plugin_load() - Test Plugin Loaded.\n");
Purple::Signal::connect(Purple::Conversations::get_handle(),'received-im-msg',$plugin,\&im_received,

'received-im-msg');

}


sub im_received {
Purple::Debug::info('incoming', "im_received\n");
# SMTP details here
my $smtp_server="smtp server";
my $sender='sender@domain';
my $recp = 'recipient@domain';

my ($account, $imsender, $message, $conv, $flags) = @_;

#log it

#send it, TODO: mail it when the client is set to any other status but online

$smtp = Net::SMTP->new($smtp_server);
$smtp->mail($sender);
$smtp->to($recp);

$smtp->data();
$smtp->datasend("To: $recp \n");
$smtp->datasend("From: $imsender\n");
$smtp->datasend("Subject: New Message from $account::$imsender \n\n");
$smtp->datasend("$account : $imsender \n");
$smtp->datasend($message);
$smtp->dataend();
$smtp->quit;

}
sub plugin_unload {
my $plugin = shift;
Purple::Debug::info("testplugin", "plugin_unload() - Test Plugin Unloaded.\n");
}

Monday, June 15, 2009

Iron Python

Putting this posting to remind me to find out about iron python. can I use it for WMI?

Thursday, June 4, 2009

Umm.. I just remembered Kubuntu

Having some trouble compiling the VirtualBox Guest addons for Fedora. I'll just snag a copy of Kubuntu off bit torrent and see if this one's any better. What a pity, FC 10 really looked good.

Hello Fedora 10


It's certainly nice to try Fedora again, the version I last used was FC 3 and that was it. I'm getting tired of using Gnome on Ubuntu and wondered how the KDE version of Fedora looks like. Just got around installing it. I'm going to use it to develop stuff and see how it goes.

Sunday, May 24, 2009

Do virtual entities deserve names?

I've been naming my machines after World of Warcraft places, it's no surprise my Ubuntu's called IceCrown and my new Windows XP's called Barrens :) I hope none of my machines will turn into a Molten Core....

Saturday, May 23, 2009

Unison

happened to glance at my #linux channel on freenode irc:
Unison

Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.

http://www.cis.upenn.edu/~bcpierce/unison/


great stuff

Thursday, May 21, 2009

Revisiting C++

I've just had an opportunity to revist C++ programming when a good friend of mine asked me some advice on an assignment question. I've cleanly forgotten the pain of having to manage memory ... has it been that long ago since I've touch that language?

C++'s only fun when you're trying to score that assignment - hee hee.

Wednesday, May 20, 2009

Note to self

Installation of Solaris with 512MB ram is bad.

Tuesday, May 19, 2009

Back, finally

Almost half of 2009 has gone by and I've not done a single thing, I'm reviving my virtual machines and getting back to my python stuff.