2009-03-21

Gmail4J - Gmail API for Java



Seems that Google has no Gmail API available, so I made a small Java library called Gmail4J. The library is designed to be extensible, allowing various implementations. Currently the only available implementation allows getting new unread messages from their RSS feed. That's not much, but it's a start.

Here is the example code (updated to conform with Gmail4J 0.2):

GmailClient client = new RssGmailClient();
GmailConnection connection = new HttpGmailConnection("user", "pass".toCharArray());
client.setConnection(connection);
final List<GmailMessage> messages = client.getUnreadMessages();
for (GmailMessage message : messages) {
System.out.println(message);
}

Next implementation will probably be based on JavaMail IMAP functionality. It should be able to do more than getting unread messages.

2009-03-15

JAD Java Decompiler download mirror

As http://www.kpdus.com is no longer accessible, JAD Java Decompiler download is extremely hard to find. I've put up a mirror where you can get jad executable for Windows, Linux and Mac OS X: http://www.varaneckas.com/jad

Hope this helps those who are having a hard time finding a working JAD download.

2009-03-05

My little anniversary

It has been one year since I've quit smoking. Even though it's not my first attempt it's hopefully the last one.



I used to smoke up to 20-30 cigarettes a day, I used to have a constant cough all the time at all seasons, telling myself "that's just a little cold". Now it's all gone. I feel great, I can run much longer distances than I could before, and of course, I save a nice piece of money on what I've used to spend. Meanwhile cigarette prices have increased, and they are about to increase again.

This quitting was probably one of the most significant things I did for my own good. How did I do that? Very simple:

  • Cold turkey - quit right now, throw away all smoking attributes with no remorse.
  • Avoid the "I feel so sorry for my poor self" sessions.
The motivating factor was this little book. It uplifted me and gave the needed strength to do it.

Like in object oriented programming, it's better to have less dependencies on anything.