Raam Dev’s Weblog

Avatar

A man without scars has not lived his life to the fullest.

My own version of the $1 Image Stabilizer

I’ve seen the $14 Steadycam “The Poor Mans Steadicam” in the past and always thought it would be a cool project to tackle whenever I have some free time (aka never). Even though I own more tools than I’m able to name (when you take care of your own rental properties you need a wide array of tools!), the large number of tools and parts required for the “Poor Mans Steadicam” always turned me off.

Then I saw this cool $1 Image Stabilizer video from MetaCafe:


$1 Image Stabilizer For Any Camera - Lose The Tripod - The best free videos are right here

Sure enough, I found an immediate need for an image stabilizer when I took pictures of the box for my new MacBook Pro power supply. I had some rope in my closet and I remembered the tripod adapter which screws into the bottom of my camera already had a little hole that I could loop the rope through. It took two minutes of my time to tie the rope around the tripod adapter. I then stood on the excess rope and pulled up to steady the camera:

It worked great! Here is the first picture I took without the stabilizer and here is the second picture taken with the stabilizer. You can clearly see the difference!

My co-worker, Raf, spontaneously came up with the idea of using a giant rubber band instead of string or rope. Just as he was laughing it off as a silly idea, I told him I actually have giant rubber bands that I use for fitness. As I was writing this post, I decided to try out his idea:

It also worked well, however the because the rubber band needs to loop around the camera, it was uncomfortable and also difficult to access the camera controls. Besides, not only would I not want to carry around a giant rubber band, I also wouldn’t want the camera to slip out of my hands and go crashing to the ground just as I lifted it to take a picture!

I love the way pictures come out when taken with natural light (no flash). However, when the camera detects low light it slows the shutter speed down so it can absorb enough light to make a clear picture. Even the slightest movement during this slow shutter speed will cause the picture to come out blurry. It’s quite amazing how such a simple image stabilizer fixes that problem!

Attic Studio Renovation

Back in 2003 I spent about $30,000 turning the attic of my 100 year old house into a beautiful studio apartment. I found these pictures while browsing my computer today.

Most of the framing and insulation was done by a contractor. I helped my uncle sheetrock the entire place. My dad and I did the painting, built the two closets, installed custom kitchen counters, and did some of the plumbing. I installed the lights, the hardwood floor, and the shower.

I lived in this studio for a few years until I moved into the partially renovated basement (where I happened to install the exact same shower). This attic studio is now rented for $750 a month.

My First (Real) Electronics Project / Invention

When I was 13 or 14 years old I discovered the need for something to easily change the connections made between VCR’s, tape decks, and speakers. I needed to change inputs and move cables around to different ports. Constantly moving around equipment to access the ports on the back was becoming very cumbersome. I needed an AV Selector. Although one probably existed at the time, I didn’t know of its existence and so I marched on with inventing one.

I had never soldered before, and this was the first time I found a real purpose to solder. My solution was simple: Connect each of the cables coming from the equipment into a box that was easily accessible. For each port on the equipment, the box would have two ports: one that connects from the equipment to the box and then another on the box that connects to another one of these boxes, which is connected to yet more equipment. This would allow me to be able to unplug and change the connections easily by simply manging the connections on the boxes.

To help you understand how this actually worked, I whipped up a quick diagram:

So I bought some parts from the local RadioShack, including a little plastic project box which needed to have openings cut out for the ports (very difficult without the right tools — I think I used a razor and broke a few blades). A few hours later, and my invention was complete. It certainly wasn’t pretty, but it worked exactly as I planned!

Of course there are much more professional AV Switchers out there now, such as this one made by Sony:

CORBAWeb Blog

I setup a blog for CORBAWeb, the new name for my web hosting business. I like the idea of having a separate blog for each of my projects or business ventures. It will allow me to post information specific to that blog instead of using this blog for everything.

It will be a few weeks before the new CORBAWeb site is up and running, but I decided to setup the blog to help motivate me to finish it. There is no real pressure to get the new site up and running, but I really feel my web hosting business is lacking that polished look. Since more and more people have been inquiring about it lately, I feel it’s about time I make it look polished.

NoteSake.com beat me to the punchline

For the past two years or so, I’ve been slowly working on a website called SaveNotes.com. However, while reading LifeHacker I came across a site called NoteSake.com. Apparently, they beat me to the punchline.

Their site looks great and has very similar features as what I had planned for SaveNotes.com. There are a couple of things I planned on doing differently, such as the ability to quickly create a note without logging in or authenticating yourself, but there were a lot of things I hadn’t even thought of, such as the ability to export notes as a PDF or share notes with other NoteSake users.

I tried creating an account on NoteSake.com to try out the features, however I’m still waiting for the email that contains the confirmation URL (which is another reason I disliked the idea of requiring an account).

Perhaps I will continue to develop SaveNotes.com simply because it would be a tool I would find very useful. Besides, NoteSake.com doesn’t really have any competition. Yet. :)

Another wet basement weekend

I didn’t post much this past weekend because on Friday morning at 7am I got a call from one of my tenants telling me their kitchen was soaked, and water was still dripping down from the apartment above. The tenant called again 2 minutes later because she felt she didn’t make it sound urgent enough the first time.

I drove back to Lowell from Cambridge and sure enough, her kitchen was SOAKED. I went into the vacant unit below on the first floor — nothing. It was dry as could be. Puzzled, I went into the partially finished basement, where I stay during the weekends. I discovered about 3″ of water on the basement floor. As I walked through the water with my sandals on, the water came up to my ankles. I stood in the huge pool of water and looked over towards where my server, external hard drives, and router was plugged in — all the power cords were partially submerged in the water… and I was standing in that same water. I realized how easily I could be electrocuted and slowly walked over to the breaker panel to turn off the main switch.

I wondered how so much water could come from the air conditioning unit on the third floor without making the first floor wet at all. As I stood there assessing the damage, I heard a dripping sound coming from the other side of the basement, near the hot water tanks. Come to find out, one of the three hot water tanks had eroded and was leaking water! It must have started earlier in the week because mold was already starting to form on the carpet and desk where my computer equipment was!

After paying $95 to have the A/C system fixed, I looked in the phone book (well actually, yellowpages.com on my Blackberry) for plumbing companies. I called 5 numbers, only one person answered. He came over with his girlfriend (or wife?), who surprisingly helped him with most of the work and knew the names of all the tools and fittings (I’m not being sexist, she just didn’t look like someone who would know anything about plumbing). Within an hour he had the hot water tank disconnected and the water was turned back on. Looking around at how much stuff had been ruined by the water, I knew how the rest of my weekend would be spent.

With Sitha’s help, we managed to clean the entire basement over the weekend, the first real cleaning it’s had in two years. The A/C issue that was supposed to have been fixed on Friday morning was not fixed at all and I had to have an on-call A/C tech come back Saturday morning. He explained how the installation techs who install the systems don’t understand what kind of access is needed to service those systems. He said if anything major happens to the system, I’ll have to tear apart the bathroom walls just to gain access to the A/C unit (the unit is inside an attic crawl space of the finished attic).

After 8 years, I’m finally getting tired of the nuisances that come with living in basements or attics. This weekend I’ll be moving into a second floor apartment in Cambridge, inside the same building I’m currently in, but with 5 huge windows and plenty of light. I will be quite an experience and I’m looking forward to it.

ImgListGenerator

Introduction

I’ve been doing a lot of eBay auctions lately and one of the most time consuming parts was creating the HTML for all the images in my auction description. I could reuse a lot the HTML, simply changing the directory and image names, but it was still a lot of repetitive work. This week I had 25 items to list and the repetitive work really got to me, so I stopped and spent 30 minutes putting together a script that would help me.

Usage

To simplify things, I decided not to support the ability to choose the directory with the images for which you want to generate HTML. Instead, you simply upload the index.php file to the directory that contains your images, visit that directory with your web browser, and the HTML is generated. Since your web browser reads HTML, the images will be displayed just as they would in your eBay auction. Simply right click on the page, choose View Source, copy the nicely formatted HTML and paste it into your eBay description.

You can view this script in action by browsing some of my images here.

Details

Here’s a sample output from this script:

<P align="center"><IMG src="http://www.ekarma.net/demo/pics/sample/DSC_0001.jpg"></P>
<P align="center"><IMG src="http://www.ekarma.net/demo/pics/sample/DSC_0003.jpg"></P>
<P align="center"><IMG src="http://www.ekarma.net/demo/pics/sample/DSC_0004.JPG"></P>
<P align="center"><IMG src="http://www.ekarma.net/demo/pics/sample/DSC_0010.JPG"></P>

The code I had to write for this script was rather simple. The real meat of the work is done by a very nice function called preg_find() by Paul Gregg. His code is too much to show here, but I’ll show you the code I wrote for this little script:

// Find all .jpg or .JPG files in the current directory using preg_find()
$files = preg_find('/.jpg|.JPG/', '.', PREG_FIND_SORTBASENAME);

// Store the path to the current directory
// (PHP_SELF includes index.php, so we use substr to remove that)
$link_dir = substr($_SERVER['PHP_SELF'], 0, -9);

// Loop through each of the files and generate the HTML
foreach($files as $file){
	$my_file = substr($file, 2, strlen($file));
	echo "<P align=\"center\"><IMG src=\"http://". $_SERVER['SERVER_NAME'] . $link_dir . $my_file ."\"></P>\n";
}

That’s it! Of course it would be much nicer if you could upload this script to the root directory and either enter or choose a path with images, then click generate. However, this script does exactly what I need, so I don’t plan to make any changes to it.

Download

This script can be downloaded here: index.php.zip (4KB)

Project Magnolia

As I mentioned a few days ago, Thea and I are starting a new project together. We’ll be using PHP & MySQL on the backend and CSS, XHTML, & AJAX on the front end. Exact project goals have not yet been defined, however we already have a good idea what Magnolia will be: A retail store that allows easy category and item management, while providing the most common tools to serve customers. It would probably make more sense to make use of an open-source shopping cart, however we’re both doing this as a learning process and to build project organization skills.

I’ve created a wiki for the project to help with documentation and development. You can check it out here. I’ve decided to make the wiki public, as I can’t imagine there will be any confidential information added to it. Since the wiki is open to the public, feel free to add your own feature requests to the Feature Requests section of the wiki.

A sore body and a new collaboration

I am incredibly sore from Monday and Tuesdays workouts. Ravi wanted to do arms on Tuesday, so we did workout C instead of workout B. That was probably a bad idea, because it didn’t give my chest or arm muscles enough time to recover from the previous day’s workout. I’m mostly feeling it in my triceps and obliques — when I lift my arms over my head.

I’ve been going over Thea’s place on Wednesday nights and tutoring him in PHP programming. The past few sessions haven’t been very productive, but thats because I had to get his programming environment setup properly. I installed XAMPP and Eclipse (with the PHP plugin). We decided today that we’re going to work on a project together; a web retail store which will allow Wholesale Floral Corp to sell discontinued items to the public. Building this application together will be excellent experience for the both of us. We’re going to use the Smarty PHP template engine and stick to Object-Oriented programming as much as possible. To collaborate our development work we’re going to use my home CVS server.

SimplrRaam - Modified Simplr Theme

As you can see, I am now using a modified version of the Wordpress Simplr theme by Scott. It took me a good 4 1/2 hours to modify and to make sure everything was working the way I wanted it to.

Changes:

  • The sidebar has been moved from the bottom to the right.
  • Single post pages are shown without any sidebar to make room for actual post content when you’re reading the post.
  • Each of the pages (About, Contact, Archives, etc) also do not show the sidebar.
  • From the main page, when you click one of the categories from the sidebar to browse the posts in that category, you will be provided with a sidebar to further navigate via categories while you’re reading posts.
  • The theme is designed to stretch with the browser window, so it should work on many different resolutions (even 640×480, though that wouldn’t be very usable)
  • Moved the title of the blog into the top left corner, on the same line as the page links
  • Moved the tagline (my quote) to the right corner, under the page links

Important Installation Notes:

  • You can no longer use the Simplr Layout Width or Sidebar Layout options.
  • You MUST change Layout Width to 95% once you have activated the theme.
  • I recommend you set the Base Font Size to 75%
  • If you change the Base Font Size option to something greater than 75%, you may need to increase the following in style.css: div.postcontainer { margin-right: 330px; }
  • The rest of the Simplr options should work.

Screenshot:

Download: simplrraam.zip (379kb)

Keep in mind that I did this in a hurry, so many of my changes to the theme files are not documented. I also plugged in extra CSS styles where I needed to get things working. Please feel free to post comments, fixes, or suggestions to this theme below.

Adding Power and Lights to my Shed

I needed light in my shed and the only way I would be satisfied was if I had real lights, not those dim battery operated ones. Besides, I know having an outlet in the shed to plug things into would be very helpful. I already ran the wire to my door when I installed the outside light, so all I needed to do was get the power 12 feet away to my shed.

First I dug a 14″ deep trench between my basement door and shed (sorry, no pics of the trench :( the line in the sand shows where the trench was). Inside that trench I laid metal conduit with an outdoor 12/2 wire inside. Since I might build a summer house next spring, I figured I would take advantage of running the wire and add a CAT5 Ethernet cable along side the power cable. I’m not sure how the power cable will effect the data running on the CAT5 cable, but I had extra CAT5 cable laying around so I ran it anyway.

I used flexible conduit at the basement door and where the wire comes up from the trench into the shed.

After adding a junction box to the ceiling of the basement entrance (power in on the top, on the bottom one wire to outside light, one wire to shed), I added a junction box inside the shed where the wire comes in. I’m going to be adding an outlet later and having the junction box right there will make that a lot easier. I then ran power up to a switch and from the switch up to the florescent light. The switch will control two lights, but I’m only attaching one light for now. I ran the wire for the second light but just wrapped the end with electrical tape.

Once I attached and wired the florescent light to the ceiling joists of the shed, I turned on the breaker in my basement and flipped the switch in the shed.

House Hacking

Hacking your own house can be pretty fun. I don’t want to incriminate myself on my own blog so I won’t go into the details. I may not have any gas, but after 45 minutes, I do have hot water.

    The power of knowledge is not realized until that knowledge
    plays a key role in bridging an otherwise impossible gap.

I was having trouble displaying PNG images in Internet Explorer while cross-browser testing the programming work I’m doing for Aerva. A Google search later and I found this site providing the solution. Very useful if you’ve ever wondered why PNG images don’t maintain their transparency in IE.

I removed the collapse categories plugin I had previously installed for the side bar. I found a page with information on how to use the wp_list_cats() function, which is apart of the standard WordPress installation, to format the category list in a much more useful way. Calling the function with particular options allows you to see all the categories in hierarchal fashion. I used the following options to display the categories as you see them on the right. Just edit your sidebar.php file inside your current theme’s directory:

wp_list_cats('sort_column=name&optioncount=0&hierarchical=1')

I was tired of not having any light outside my back door at night, so I installed one today. $35 and an hour of running 14/2 wire from a junction box to the back door (yes, the door is dirty. rain + dirt + door = what you see below):

Building a shed from scratch

Building a 12'x16' shed from scratchThis project, like the basement project, started in 2004 when I began digging out the dirt from my basement. I realized I had no place to store everything that was in the basement and the old 8′x6′ shed in my backyard was already full of stuff (and not very organized I might add), so I really had no where to store anything. Since I started purchasing investment properties and maintaining them myself, my collection of tools grew. I realized I needed a nice big area in which to organize and store everything. As usual, I looked into what I could build to fix that problem. [Read more]

Renovating a 100 year old basement

Last Update: February 11th, 2008

The basement of my two family house started with a dirt floor and approximately 6′ of clearance from the dirt to the first floor rafters. Some of the pipes made the clearance even less. I decided that I wanted to make the basement into a livable area, however that would only be possible with a concrete floor. I also realized that if I wanted to put in a ceiling, I would need at least another 2′ of clearance. The first shovel full of dirt was removed in 2004. I had planned on completing the basement that year, however I had no idea how much work would be involved. [Read more]