Monday, July 30, 2007

Create Slide Shows With Picasa Web Albums

Blogger Templates has a great online tool to help generate HTML code for Picasa Web Album based Slide Shows.  I am reproducing it here for my convenience. I have made a few small changes for posting here.

 

Installing a Picasa Slide Show In Blogger Or Other Web Page

1
Go to the album you want to display in Picasa Web Album.
2
Right-click on the  button and "Copy shortcut" (?).
3
 

     e.g. http://picasaweb.google.com/jsmith/Album2007?authkey=kqiIFUT#s123456789123456789
4

     e.g. My Beautiful Album
5
       (You have to be logged in to your Blogger account)
6 Not at Blogger.com?

      Get the code


Disclaimer:

This code is from Blogger Templates. Please visit their Picasa Slide Show Post to see the original. No copyright violation is intended.

[Update] - A link to this post has been added to the side bar.

Picasa Web Album Slide Show

A slide show of our trip to Srisailam in early June 2007.

 

Picasa SlideshowPicasa Web AlbumsFullscreen

 

Create you own Picasa Album Slide Shows here.

100 Open Source Downloads

A categorized list of 100 Open Source software. I love lists and I found this one particularly useful. I quickly realized that I use a number of software on this list. Audacity, AC3Filter, MP3Gain, LAME, jEdit, DOSBox, PDFCreator, Vuze (Azureus), eMule, FreeMind to name a few.

This list underlines the growing vitality of Open Source software and underlines the fact that they are slowly but steadily creeping into our computers.

Long Live Open Source!

Java Logging with JDBC

I hate debuggers! Not that they don't do the job they are meant for but I have always found them to be a big waste of time in the initial stages of debugging a code issue. I prefer to use a logger mechanism and then jump into the debugger for detailed runtime data only if I cannot track down the problem theoretically using my logs.

Anyway, I work in an environment where all development is done remotely and I don't have much control over the servers that actually run my code. I do have access to the database for the different environments and can create tables etc. I normally use Log4J for my logging needs but adding that manually to my development environment is a pain. So I finally turned to Java's logging API and found that it fell way below my Log4J based expectations. Firstly it did not give me much control over the logging configuration. Secondly, there was no JDBC based logging mechanism available. Well I decided to roll my own.

Features:

  • JDBC support for logging
  • Custom logging configuration (including the JDBC support configuration). Can be used for creating any custom configuration and not just the JDBC support.
  • Message caching. This implementation caches messages up to a configured threshold. All cached messages are logged to the database as soon as the threshold is reached.
  • Open source. Use, modify, distribute (as long as you retain the copyright notice below). Suggestions, bug reports welcome.
Pending Features (Stuff I would like to add but haven't yet):
  • Configurable Asynchronous logging: So that we don't block the main thread making the logging calls.
  • Performance Tunning: The current release is not optimized and has numerous areas which can benefit from some performance tunning.
I am releasing the source code to my JDBC support for Java's logging APIs. You can download the source code here. You may use this code for any purpose, as long as you leave the copyright notice attached. Use this code at your own risk.

See the readme.txt file in the zip archive for details of how to use the code. The JavaDoc is also a good place to look for further details. The source code is of course the best source for implementation and usage details.

-------------------------------------------------------------------------------
Copyright (C) 2006 Gautam Satpathy (gautam@satpathy.in)
You may use this code for any purpose, as long as you leave the copyright notice
attached. Use this code at your own risk.
-------------------------------------------------------------------------------

Sunday, July 29, 2007

Web2PDF - Convert Web Pages to PDF

Web2PDF is nifty service that is a snap to setup and provides a easy way to convert HTML web pages into PDF documents. And best of all it is free!

With Web2PDF you can add a "Save page as PDF" button to your web page and allow users to convert you page into a PDF document with one click. It is  easy to setup. First of all you have to sign up for an account. After completing that you need to specify some standard settings like Portrait or Landscape modes, your web page's URL etc. You can run an immediate test to see the result of your settings. Once you are satisfied, generate the required JavaScript and paste it into your web page wherever you want the "Save page as PDF" button to appear.

I have added one to this blog. Works fine. Do give it a try.

I have to figure out a few things though - How to change the formats (CSS) used during the conversion process. Not sure if they can be changed at all. For example I would not like the generated PDF to have a black background with white text. Quite the opposite really.

Saturday, July 28, 2007

Pictobrowser - Changing Background Color

I figured out how to change the background color for the Pictobrowser!

Code for my Pictobrowser.

<embed
name="PictoBrowser" align="middle"
src="http://www.db798.com/pictobrowser.swf"
width="500" height="580"
type="application/x-shockwave-flash"
flashvars="ids=72157600558349014&amp;names=Mamli And Holi 2004&amp;userName=gautamsatpathy&amp;userId=76312656@N00&amp;titles=on&amp;source=sets"
loop="true"
quality="best"
scale="noscale"
bgcolor="#000000">
</embed>

Note the bgcolor attribute in the HTML code generated for your Pictobrowser. Just change the color value to whatever you want. The default value generated by Pictobrowser is White (#FFFFFF). I prefer Black (#000000).

Technically you can do a lot of cool stuff with the Pictobrowser generated HTML code. You can put it in a DIV etc. I have not tried changing the dimensions or other values yet. Will post again if I learn anything new.

Pictobrowser - A Really Cool Piece Of Software!

The previous post about a Flickr photo slide show is based on Pictobrowser, the creation of Carlos J. Gómez de Llarena (Creative direction, interaction design) & Diego Bauducco (Concept, graphic & interaction design, development).

What they have created is not only a great tool to display pictures but also a brand new distribution model. Each web site using Pictobrowser is a source of HTML code for new users to embed Pictobrowser in their web sites & blogs. Do read about it on the Pictobrowser web site.

Okay. Now let us see how we can use this thing.

Setup Instructions:

  1. The first thing is a Flickr account. Get one if you don't already have one. You can use your Yahoo account.
  2. Upload your photos to Flickr.
  3. Mark your photos as "Public"
  4. Create some Sets, and / or Groups. The Sets / groups must be public for Pictobrowser to be able to retrieve them.
  5. Click the Info link at the bottom of a Pictobrowser like the one below. (See Screen shot below)
  6. This will display the "Get Your Pictobrowser" page. Enter you Flickr User ID on this screen and click the Submit button. (See Screen Shot below)
  7. Pictobrowser will use the User ID to access Flickr. It will display a blank screen with Sets, tags & groups as clickable buttons on the top. (See Screen Shot below)
  8. Click the Sets button (or Tags or groups). Whatever. Pictobrowser will access Flickr and pull a list of you public Sets (or Tags or groups. Whatever. (See Screen Shot below)
  9. Click the Set you want to use. Pictobrowser will display a new screen with the required HTML code. Copy & paste it into your blog post screen in HTML Code view. (See Screen Shot below). You can also use this screen to see a preview of your new Pictobrowser.

Screen Shots:


Click Info (circled in Red above) link at bottom of Pictobrowser. Go back to Setup Instructions.


Enter your Flickr User ID. Go back to Setup Instructions.


Pictobrowser accesses Flickr. Select Sets. Go back to Setup Instructions.


Pictobrowser pulls list of public sets from your Flickr account. Select the one you want to use. Go back to Setup Instructions.



Go grab the HTML code! Go back to Setup Instructions.


Pictobrowser In Action


Flickr Slide Show On Blogger!

I saw this neat Flickr Slide Show app on Blogger Templates, a great place to find Blogger related information, tips & tricks etc.

This post is a test to see how things work. I will post instructions on the usage in a subsequent post.

 

Monday, July 23, 2007

Reading A Book - How To Find The Time?

I read for pleasure. The information content is incidental as far as I am concerned. That is to say I don't go looking for books that will teach me something. Rather I read books that I want to read because they are fun to read. I would rather curl up with a pot boiler than read Jack Welch.

That is not to say I do not learn anything from the books I read. I do. In addition to the pleasure factor, every book has something to give. Some piece of information, a thought or two or simply a different way of looking at things.

The problem is that there are only so many hours in a day. Weekends are for householdy things. Groceries, the broken clock, insurance premium payments, etc etc. And of course to catch up on sleep

Anyway, I read a number of blogs regularly and one of them, Life Hack, has this post titled "How To Automatically Read A Book Per Week Without Taking Any Additional Time Out Of Your Day". The title caught my attention and I eagerly started reading. Agreed with the author for the first few paragraphs. And then I started getting irritated.

The author talks about Audio Books as the solution. Nice, techy solution. But will it work? Say in an Indian context? Let us look at an example:

My wife, Padmaja, is a professional with two kids and a husband. I mention the husband part because she claims she has a lazy bum of a husband. She commutes to work on a scooter. A drive of about 8 Km's which takes about 30 minutes each way. Her day starts at 6.00 am when she has to cook breakfast & lunch for everybody. Then she kicks my butt out of bed at about 6.30 and goes to wake up our daughter, Mamli. She then spends about 45 mins with Mamli reviewing homework or preparation for any tests etc. In the meantime I do my morning stuff (teeth, tea, emails, shave, shower etc) before waking the boy, Bablu. Then we rush through the rest of the morning ritual of getting the kids to school (they commute by school bus) and getting ready for work. Padmaja returns from work at about 6.30 p.m. The rest of the evening is usually taken up by homework and dinner. The kids go to bed at about 9.00 p.m. and we have dinner right after. Bed by 10.30 - 11.30. We rarely watch TV. The post dinner hour is reserved for husband - wife discussions. Plans, moans, etc.

So how does Padmaja find / make the time to read a book? Will audio books work for her? If not, why?

  • Audio books are expensive. Paperbacks are relatively inexpensive in comparison.
  • They take time to setup on a player like the iPod. Paperback books do not need any "setup". They are ready to go out-of-the-box.
  • It is easy to put down a book and then pick it up again after a while. You can quickly scan the previous lines and pick up from where you left off. Try that with an Audio book!
  • Unlike for Audio books you don't need a computer to buy and read a regular paper based book. Padmaja hates the home PC anyway. Claims she spends enough time staring at a computer screen at work.
  • You can read a book on the pot, leave it in the bathroom till you come back without worrying about damaging a 10,000 rupee gadget. Same with the bed. I am usually very careful where I put down the iPod. The kids are always jumping on the bed and I don't want one of them landing on my precious
  • Driving in Hyderabad, India, while listening to an audio book is a recipe for disaster. Very very bad idea. Listening to music on a portable player if fine as long as you are not trying to understand each and every word of the lyrics.

So on and so forth...

So how does Padmaja find / make time for a book or two?

  • Get the lazy bum of a husband to share some of the house work. Let him grumble and scowl but make him do it anyway. A kiss or two (or more)  at the end of the day would work nicely to reduce the grumbling and increase the householdy contributions 
  • Read in bed. She is normally too tired.
  • Read on the pot.
  • Read in the kitchen. I feel safe making this suggestion because I know Padmaja is a fantastic cook and the end result even with a book in the picture will be excellent. My rotund self is living testimony to this fact!
  • Read during coffee breaks. Carrying a paperback in her handbag is not difficult. Of course she would rather spend it speaking with other people! Ecch!

Our lives leave very little time for the things that make life worth living. And to me a good book is one of those things. I am willing to sacrifice other things like sleep to be able to read a book.

Maybe Yama Raj will put me in charge of Patal's Library.

Tattoos For Geeks

Most Indians I know don't use Tattoos. Oh maybe the odd kid here and there trying to show how cool he or she is. But in general Tattoos is seen as a western thing that is not cool.

I saw this advert for Geek Tattoos on the web recently and thought I would share it here. I would love to have the guts to wear one of these. The "Born To Code" one is particularly cool!

I dare say the wife will kick my butt out of the house though the kids might love the stuff. On themselves. Not sure if they will like Daddy walking around with one of these...