AJAXing the site

I've had some lull time the last couple days and decided to put it to good use and put some new things on the site. What resulted from that hackery is the webcam image and the flickr images on the sidebar. So, the low down on what is occuring - the webcam image comes from my webcam, using a program called camorama, which then uploads the picture to my web server. Once your web browser has loaded the image, it checks back periodically with the web server to see if a new image has been uploaded. If so, it updates the image. On the administrative side, I have an AJAXed caption field that allows me to update the caption of the webcam pic, which will then be picked up by anyone with the site open the next time their browser looks for an updated image. It's nothing ground-breaking but I like it. The Flickr plugin (FAlbum) itself is really great. I added the little button to the right of the heading so that users can pull new random pictures. It goes back to the server and uses the plugin to pick another set of pictures. The animations of the images are provided by the scriptaculous javascript library. Again, there is nothing too ground-breaking about what has happened, but I like it and its my site, so there! Hehe…Seriously though, nothing here is static. Have an idea to improve something? Let me know in the comments. Or email. Or telepathy.

Programming Epigrams

First, to catch some up, a definition: epigram: n.

  1. A short, witty poem expressing a single thought or observation.
  2. A concise, clever, often paradoxical statement.

From a list of programming epigrams, I liked these two a lot: 35. Everyone can be taught to sculpt: Michelangelo would have had to be taught not to. So it is with great programmers. 116. You think you know when you can learn, are more sure when you can write, even more when you can teach, but certain when you can program.

Uploading video to Google Video

Where to host that huge home video without killing your bandwidth? Never fear, Google is here. Sign up for a Google Video Upload account and you can post your videos for free for all the world to see. Some software is required to download to your computer to enable uploads, however, but Google does provide nice guides on how to install it for Windows and Mac users. The Linux version, however, can be a little cryptic, especially for those without java experience. That said, for those with Linux, here are some steps to giving yourself upload capabilities: 1. Download the jar file. Place it somewhere you won't forget too soon (I chose $HOME/bin/ ). 2. Create a file with a descriptive name, like googleupload, or whatever you wish, somewhere in your $PATH (usr/bin would be a safe bet, but I chose $HOME/bin/ ). 3. At the top of the file, type java -jar $HOME/bin/GoogleVideoUploader.jar (some versions of Linux may require a shebang line first). Substitute $HOME/bin/ for the absolute path of the jar file if you saved it elsewhere. 4. Save the file and chmod it to be executable (755 is probably a safe bet). 5. Run the executable from the terminal. Happy uploading…

Copy that DVD with MEncoder

In the console of choice: 1. Type mplayer dvd://1 -alang en -vf cropdetect Use the appropriate chapter of your DVD. Let the DVD play for a bit, then quit. You should see lines resembling this: crop area: X: 6..719 Y: 0..477 (-vf crop=704:464:12:8) 0.7% 35 0 The (-vf crop …) is the important part. Remember this for later. 2. There are three stages to the rip, with lots of configurable options. Here's a sample. First, rip the audio: mencoder dvd://1 -alang en -ovc frameno -o frameno.avi -oac mp3lame -lameopts abr:br=96:vol=5 Next, the first pass for the video: mencoder dvd://1 -nosound -oac copy -o /dev/null -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=1 -aspect 16:9 -vf crop=*704:464:12:8*,scale -zoom -xy 640 Lastly, bring it all together: mencoder dvd://1 -oac copy -o file.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=2 -aspect 16:9 -vf crop=*704:464:12:8*,scale -zoom -xy 640 The difference between stages 2 and 3 were the -o option and the vpass attribute. The -vf crop should be replaced with your -vf crop from the beginning. There are tons of options which one can play with to vary filesize and quality, but I'll leave those to the reader to discover. Do set aside a healty chunk of time, as this process can take 3-5 hours for a full DVD.

Cooking Old School

It seems that Teflon, that wondercoat that saved many a novice chef from hours of painstaking scrubbing of pots and pans, is no longer the golden child of the cooking world. It appears that Teflon contains PFOA (perfluorooctanoic acid), recently classified as a likely carcinogen by the EPA. So what's a cooking n00b to do? Do it like the pro's yo! Carl Tashian gives a nice write-up of the ways to use non-Teflon pans to achieve superior cooking performance. Will certainly put these into practice as I sub out the Teflon. Who doesn't like better prepared food? I certainly want to leet up in the kitchen!

Sweetness

I like to think that the prevalence of green articles means things are actually moving that way, and not unsubstantiated hype. That said, here's an article highlighting some of Britan's steps towards switching off their dependance on oil and turning on the bioethanol flood, generated from renewable resources like sugar.

New Look

After updating the codebase to 2.0, I thought, "Hey, Kubric has been nice, but I think it's time to change the theme." After a little browsing, I found tonus and decided to give it a whirl. Thus far, I like it. We'll see tomorrow whether I still like it.

Take Up Your Trays

Who hasn't been in this situation: Eating with a group of friends, the conversation on fire, everyone's finished and yet no one is moving? You know you have things to do and places to be, but still you sit. At last, someone makes the move, and the whole table springs up as if the chairs were pinching their occupants. I feel like this scenario is applicable to the world's dependancy on oil and the reluctance to move away from the black gold to greener alternatives. All that is needed is for a nation to make the move, convert 100% to green energy, and then poof, other nations take notice. The Guardian has an article highlighting a few of the countries that are trying to be that impetus. Now it is up to the rest of the world to take notice and do the same.

Light Bulbs, Not As Bright As You Think

BBC has an interesting article today on the incandescent light bulb and its wastefulness. From the article:

It has been estimated that if every household in the US replaced just three of its incandescent light bulbs with energy-saving designs and used them for five hours per day, it would reduce emissions of carbon dioxide by 23 million tonnes, reduce electricity demand by the equivalent of 11 coal-fired power stations and save $1.8bn. Given that investing $450m could save $1.8bn, it is hard to understand why anyone would still choose incandescent bulbs.

It seems like the big drawback to going green is that it requires us to modify our way of life. Hopefully we will begin to see that there are easy ways, such as replacing our traditional light bulbs with energy-saving ones, to reduce our energy consumption without affecting our lifestyles. So go ahead, make the change. Your wallet and your world will thank you in the long run…