Tuesday, October 31, 2006

rome rss atom parsing java library

Rome is a really nice library to parse and create syndication feeds. it works seamless with many rss versions and atom. It could be very tempting to write your own rss parser after going through the rss specs. But the main issue is , there are so many versions of rss floating around the net. One of the feeds i use is still 0.91. so a simple exercise in parsing document may soon turn into a quagmire given all the different formats of feeds. with rome, you work with uniform interfaces irrespective of underlying feed format.

Monday, October 30, 2006

our poster boy


Today i thought of posting our poster boy and indiglooo senior programmer bunbun's profile. For quite some time i have been wondering how to give him a wash. There is lot of dust in bangalore air, even on my 3rd floor flat. So bunbun is now all dirty , even his soles are black with soot. Earlier he had a T shirt on but now a days he prefers being naked. This shot was taken during winter months. bunbun stayed in this T shirt for more than 3 months. he hates windows but likes my small 12" iBOOK. BunBun does most of his coding on this iBook when everyone around is sound asleep ;o)

Wink screencast creation tool

Weekend just flew by. I had carried back the black and ugly thinkpad R52 from work but i might as well have left it on my desk. The only piece was looking at wink in action.

wink is a tool from debug mode. (http://www.debugmode.com/wink/) that can create screencasts (I am not sure if that is right , i have not seen much ;o) and do static capture of slides , print PDF etc.

wink appears to be a nice tool and i would give it a spin some time soon. Sanjeev has been preaching us his technique of solving aptitude test papers. Now he hopes to capture his techniques in a nice tutorial format with wink. I tried writing some code twice and then just gave up. sometimes you should not fight your inner self too much ;o)

Friday, October 27, 2006

CPAN with Activestate PERL on windows

You need CPAN if you are doing any serious work. During the course of my work I was using EMail::Valid and GMail::Checker and perl JSON modules. None of this was available from activestate PPM repository.

This is a serious limitation and I was looking for a way to install CPAN modules on windows.
To make CPAN install work you have to install the Visual C++ /.NET framework toolset. The list of things to install is pretty long and discouraging. I was not ready to go all the distance. Because typically these install sessions degenerate into install A to install B to install C dependency hell.

The win32 perl wiki proved to be useful (http://win32.perl.org/wiki/index.php). There is one distribution called CamelPack. Camelpack install activestate perl and dev-c++ plus nmake tool. Just use the camelpack installer with a net connection ON. The installer does everything for you. At the end of it I was able to install all the 3 modules using CPAN.

Few caveats
  • You may need to set LIB and INCLUDE env variabled
  • The camelpack installer will install activestate perl in location c:\perl, it did not ask me for a location. That was a problem because i already had one copy of activestate perl installed.
  • I am not sure if my install works for complicated modules. I was not able to install DBI. I just fetched DBI using ppm.

Friday, October 20, 2006

Outlook conference room booking

This is how we book our conference rooms. You click the calendar link in outlook panel. Then you create a new appointment. Fill in the details of new appointment and click on invite attendees. From the attendee screen, select the name of your conference room. (like _bangalore) In the To address list put all the recipient names as well. Schedule the appointment by clicking on the schedule tab. here you can see if the conference room is already booked for meeting or not. Finally, send the invite. The new invitation should appear on your calendar. enjoy!

Access gmail INBOX from perl

Gmail provides pop3 access. You can set your gmail box for pop access using the settings link. They have detailed step by step guide for most of the clients. First I tried to access my gmail pop3 mail box using Net::pop3 module.(http://search.cpan.org)

No luck and I was wondering what is happening because the same program worked with other pop3 account. It took me a while to grasp that gmail is using pop3s (pop3 over SSL ) and net::pop3 has no SSL support ( I could be wrong , I did not dig very deep). But since gmail is such a nice and popular mbox there were plenty of links dealing with my issue.

My first try was to use GNU stunnel with Net::pop3 module. (http://www.stunnel.org) Stunnel can accept normal socket requests and forward as secure socket. I did stunnel install on windows XP. grab and install the windows MSI exe. Then copy the 2 DLLs (libeay and libssl) to your systems/win32 folder. And change the stunnel.conf file with accept and connect parameters. issue the command $stunnel --install to install stunnel as a windows service. Once stunnel is configured and running on your machine, you can use the localhost stunnel port for Net::Pop3. stunnel will then forward your requests over SSL.


schematics is perl Net::pop3 => normal => stunnel => SSL => gmail

However I could not get it to work. I tried creating and testing the localhost stunnel port from outlook but again no luck. maybe i was missing something with stunnel. I tried connecting using telnet and do a HELO but again no luck!!

I have a mac os x box at home. However before trying stunnel on that I just typed gmail cpan and out came GMail::Checker module. This module is a wrapper around gmail access. It took approx. 2 mins to run a sample program using Gmail::Checker on my mac os x box. ActiveState does not have Gmail::Checker module. So I really do not know how can I run my program on windows XP box. cygwin port of perl maybe ?

Thursday, October 19, 2006

oracle import and export tool

my wife always asks what do i do in office. well if she asks me today i would say that I keep doing the same things over and over again. we had an issue with moving data between two oracle databases this morning. At the end of it i still do not know what i did. Ganesh as usual , came to rescue!!. There is simply no tool that would let you move data between two databases. If i hear oracle enterprise manager named as a tool I would just laugh! There was one tool bundled with HsqlDB for data transfer. I am not sure if it takes care of constraints etc or not.
Anyways we did it with oracle import and export tool. Three things to keep in mind when you do it/>
  • (A) exp user/passwd@TNS , export users, give the dump file some name
  • (B) make sure same tablespace exists in the target database
  • (C) The target user has the DBA privilege. if not then grant DBA privilege to user.
C:\sw\orainstant>sqlplus /nolog
SQL> connect sys@remotedb as sysdba
Enter password:
Connected.
SQL> grant dba to rajeev;
Grant succeeded.


Thursday, October 12, 2006

first entry from new workplace

I had to think very hard to come up with a nice blog title. Finally i settled on the most obvious. Performancing is a good tool, no doubt about it. I have joined my new workplace. when you move to a new place you miss your old machine more than anything. my old dell laptop had a million of things installed and configured. I really need a tool that can post my mahcines image to internet before i move onto next machine. first 2 -3 days on the job are always wasted in getting your machine up and ready that too with most of the services available online. There was a time when you had to backup your old emails and bookmarks as well.
Not anymore.
Most of my digital life is online thanks to sites like esnips, yahoo, writely and gmail. However moving between machines still poses a challenge of install and configuration for programming related tools. First task that i have is to setup tools and environment for everyone else to follow. That was easy. Only new thing that i encountered was myeclipse plug-ins but they have nice step-by-step tutorials for every feature. The product is a portal kind of thing. I am going to concentrate more on backend (oracle) now.
© Life of a third world developer
Maira Gall