Archive for 2008

Make your own chandelier

Saturday, November 22nd, 2008

When my housemate and I moved into our new place we weren’t thrilled with the victorian-style knockoff chandelier that was in our living room. Our friend recommended we paint it and see if we still wanted to throw it out. So, I took the idea and ran with it. Needless to say, it’s definitely not getting thrown out any time soon. Here is a picture of the finished product.



This was a pretty simple project and started out with a beat up old chandelier. I took it down and cleaned it off as best I could with soap and water. Then I sprayed it with some white primer before hitting it with two coats of high gloss orange. That was the easy part and didnt take too long.


Next I had to track down some small lamp shade covers. I came across a nice set of 8 at lampsplus.com. First thing I did when I got them was template. This was crucial in cutting out 5 copies from the fabric. I simply wrapped a big enough piece of paper around the lamp shade and taped it. Then I trimmed up all the excess and unwrapped it. Voila template.



(click the image to see it larger)


After all of the fabric was cut out it was time to warm up the glue gun. Make sure to try and line up the fabric seam with the seam thats already on the lamp shade. First I glued one side down where I wanted it, then I would take out all the slack and wrinkles and fold the over the other side. Dont worry about making this perfect. Once you fold over the top and button around the lamp shade rim you can deal with the rest of the slack.



(click the image to see it larger)


And thats it! There’s not much to it and it didnt take long. I was able to save an old chandelier from the dump and go something completely original in return. There are more pictures up on Flickr including one of the completed room.

Can you see the concurrency flaw?

Monday, November 3rd, 2008

A coworker and I came across this block of code which was causing us numerous headaches over the past few weeks. For a while, there was absolutely no time delay which was causing an inordinate amount of CPU cycles but thats besides the point. After that was fixed with a short delay we were left with what you see below. Can you tell what’s wrong?


   while ( true ) {
        TriggeredSend ts = queue.peek();
        if ( ts != null ) {
            switch( doPost( ts ) ) {
                case SUCCESS:
                    queue.take();
                    ts.complete( true );
                    break;
                case FAILURE:
                    queue.take();
                    ts.complete( false );
                    break;
                case SYSTEM_UNAVAILABLE:
                    systemIsAvailable = false;
                    break;
            }
        }
        Thread.sleep( delay );
   }


As with most concurrency bugs, its hard to determine what’s actually happening without experience. You can turn on your debugger but then you are changing the way the code behaves by slowing it down, essentially taking out any race conditions. Turns out, the same task was getting invoked multiple times well as some other strange conditions. That led us to the block of code you see above.


Figure it out yet? Well, what’s happening is that when the code is peeking into the queue, its assigning the result to a variable which is then being called. According to the java.util.concurrency spec, the peek method is used to see if the queue has tasks in it and not used to take any tasks off the queue. Not only that, but after the task was invoked, another task was being pulled off the queue. So what happens when multiple threads come through that block of code and peek? Well, they can both get the same task and invoke it. Bad bad bad.

The Semantic Question: To Delete or Not To Delete

Friday, September 12th, 2008

Originally published on semanticweb.com


A few months back I posed a question to the folks at DERI (Digital Enterprise Research Institute) from the University of Ireland when they came to visit Radar Networks. This is a question that I have struggled with for a long time; seeking for answers anywhere I could. When I asked them, I heard the same question in response that I always hear.


Why? Why would you ever want to delete something out of the ontology?


Ontologies were not originally created to have things removed from them. They were created to classify and organize information in a relational format. Just because a species goes extinct it doesn’t mean it should removed from the domain of animals does it? Just like a car that isn’t manufactured anymore or a disease that was officially wiped out. These and many more are probably the reasons why Semantic Web gurus and ontologists alike don’t like the idea of deleting entities.


I am helping to create a social site where users generate content; objects, notes, data, and connections to others and other things that are their own. If they want to delete something that they have created, so be it. Sounds easy right? Well, yes and no. This problem is dealt with throughout computer systems. It is essentially all about managing pointers in memory. You can’t delete something that other things are pointing to. Who knows what will happen or how our application will respond when certain pieces of information are missing? Some things we account for on purpose because they are optional — but some things we just can’t. Every application has its unique constructs, whether it is built on a relational database or a triple store.


So what I have to do is define ontological restrictions, stating what links can and cannot be broken. On top of that, we must worry about permissions. Am I allowed to break an object link from someone else’s object to my own? Also, what if the object being deleted has dependent objects that cannot exist alone, or more importantly, don’t make sense on its own? A great example of this is a user object and a profile object. There should either be zero or two, never just one.


My friend and coworker Jesse Byler had dealt with a similar problem in the application tier a few months back regarding dependent objects. He had written a recursive algorithm that would spider the graph until it hit the lowest leaf node matching certain criteria and then begin to operate. I took this same principle and pushed it down into our platform and began to mark restrictions in our ontology.


This is where it became tricky. Some relationships are bi-directional and some are not. In the user and profile example above the relationship is bi-directional; however, many of our relationships are not. An example to this would be a group and an invitation to that group. Sure the group can exist without invitations, but the invitation cannot exist without the group.


All in all, the design pattern isn’t overly complex, nor are the ontological restrictions. But as a whole, it makes for an interesting problem with a lot of nuance. Careful consideration must go into this process because mistakes could be catastrophic. Data integrity is paramount and dangling references could leave the application in a terrible state due to one bad linkage. Although simple in practice, the execution is anything but.


And for those of you who are still asking yourselves why?


Here’s the answer. Scalability. As if working with a triple store wasn’t hard enough, keeping useless data around that will never be used again will definitely make matters worse. We are attempting to build a practical everyday application — not classify organisms. Surely there is a place somewhere in the mind of the ontologist where he can think practically about using ontologies for data storage. Isn’t there?


As more applications are built using OWL and RDF, this problem will become more and more real — and there’s nothing the ontologist can do about it but adapt, or die a little inside. Either way, at the end of the day, I am still an engineer trying to make do with what I have.


If we must delete, then so be it.

Open source home automation project

Friday, August 15th, 2008

open automator screen shot
Being a long time geek and open source advocate I’ve finally decided to start an open source project for home automation. I’ve always dreamt of being able to wake up to my curtains opening and my heat turning on rather than the usual “beep! beep! beep!” that beckons me to work each day. How about checking on the house when I’m away or open the front door while I’m in the back of the house. The possibilities are endless and my ideas are just beginning to flow.


The project is called Open Automator and it can be found on Source Forge’s site. Its still a very basic framework but its coming along well. It works using the Insteon protocol that communicates over the power lines in your house. Its very similar to the X10 of yesteryear but with updated speed, reliability, and redundancy. It costs a little bit more but it will be well worth it. These devices can be found all over the internet from sites like smarthome.com.


This first rendition will be geared toward the iPhone and Simple Home Net’s EZServe which communicates via an XML socket connection. That being said, I will be making this application very flexible allowing for many different types of implementations, not just Insteon either. The application is Java based with Maven being used for building and dependency management. This will be coupled with Spring and Hibernate to manage database and model view support. The final product will have Jetty and some sort of SQL engine rolled in to make the application extremely portable and platform agnostic.


I will be writing a lot more about this project in the months to come as well as recording some online videos about how it works and how to set it up. I would like to make this product as simple as possible so its usable by the masses. Just because its open source doesnt mean its going to be complicated. If you are interesting in being a developer please let me know.

5-speed and limited slip differential installed

Thursday, July 31st, 2008

I have owned my 1973 BMW 2002 for 3 years now and put in countless hours of work and changed out nearly everything, except the drive line. Two weekends ago I went up to my friends shop to finally change it all out. I have been running the stock setup from the clutch back for too long. Also, the lack of a 5th overdrive gear is hurting my gas mileage.


The install went pretty smoothly and took only a day to accomplish. While we were putting in the new transmission and driveshaft we also threw out the stock open differential for a 3.9:1 limited slip. I have said this after numerous projects before, but wow it feels like a new car! The transmission is smooth and the shift throw is much shorter and tighter. In conjunction with the new differential gear ratio the gets off the line quicker. Also, since power is put down the wheels evenly it comes out of corners like a race car. Previously with my open differential the car ‘wiggled’ as it regained traction after a hard corner due to the fact that is sends power down unevenly.


To see pictures of the installation check out the Flickr set.

Open differential versus limited slip differential

Open differential vs a limited slip

I’m not going to go into great detail regarding all of the differences because that can easily be Googled. I just wanted to show the the main difference. On left we have my stock differential which is an ‘open differential’. On the right we have my new Limited Slip Differential (LSD) with a gear ratio of 3.9:1.


The major difference and also the major weak point of the open differential are the spider gears. This allows the wheels to spin independently. With the car in the air, I can spin one back wheel and the other one will spin in the opposite direction. The limited slip on the other hand doesnt have those gears. Not only can it handle more power it also makes locks the wheels together. Putting the car in the air and spinning one wheel will make the other spin in the same direction. More information can be found at howstuffworks.com.

20th century steampunk clock

Sunday, July 13th, 2008

Steampunk nixie tube clock finished


Well, the victorian ages are finally over. The internal combustion gasoline engine has replaced the need for steam and coal. People have devices in their houses to talk to one another and we no longer burn oil to read at night. These were also the times when we understood electricity well enough where we could really start building the unimaginable. Although nixie tubes were created in the 1950’s, neon signs have been around since the early 1900’s. I have always had an interest in these interesting little tubes and decided to give them a period correct home, albeit strange.


This project started out from a kit from tubeclock.com. The only other thing I really needed was a proper clock case which eBay gladly provided for around 20 dollars. Glueing in supports for the nixie tube clock to sit on The only other things I needed were a few hand tools, clamps, and some wood scrap. As you can see from the picture to your left (click to enlarge), I cut two straps of wood and glued them to the inside of the clock. This served as the mounting point for the tubes. After that, it was a matter of lining everything up nice and plum before I drilled two mounting holes. To finish the project, I smoked the glass to give it a patina’d look.


All in all it was a pretty simple and fun project to bring some nixie tubes into my home. In total the project was less than 200 dollars with most of it being spend on the tube kit. More pictures can be found in this flickr album.

nixie tube

What is a nixie tube?

As you can see from the picture, its a metal apparatus that sits inside a glass tube (removed in this photo) that is filled with neon gas. When an electrical charge is applied to one of the ten digits, cathodes, they glow. They come in many different shapes and sizes and can be controlled in a number of ways. In this case, they are used to display the time. To read more about how they work and where they have been used check out the nixie tube wikipedia article. Thanks to the evil mad scientists for the photo.

New fuel map for the 2002

Monday, July 7th, 2008

Fuel map for the ITB BMW 2002Its been a long time since I last tuned the car ever since I started on the new M3 motor. Just as I was getting back into practice and tuning for efficiency given the high gas prices, a friend gave me his fuel map for a similar car also with Individual Throttle Bodies (ITB’s). After about 30 minutes of tuning the car ran superbly!


It had taken me quite a long time to get where I was and from the looks of the map above it would have taken me several more outings. One of my main trouble points was coming back off overrun and right off idle. The latter is a common problem with ITB’s that normal cars dont have with one throttle body. When the throttles quickly open the pressure drops to near full atmosphere and therefore we are getting much better volumetric efficiency requiring more gas.


So far everything is performing wonderfully. The hesitation off idle is gone and the power band is strong all the way up. Also, overrun back onto wide-open throttle is amazing. The fuel efficiency appears to have improved as well. This may not make sense to some but hopefully this is useful to somebody out there (click on the picture above to see a larger image).

Finally, a worthy tool chest

Sunday, July 6th, 2008

Craftsman ball bearing tool chestI’ve waited too long to take the plunge and start the tool collection I have always wanted. For years I have had an assortment of tools scattered between my various toolboxes, my car, and the friends who like to ‘borrow’ them. Now they finally have a place to call home.


Although I have never owned a chest like this before I feel good knowing they are Craftsman and guaranteed for life. Having used them in other shops and hearing only good things from all my friends I know they are going to last. The price wasnt too bad either. I also opted to stuff the drawers even more with a new set of 150 piece metric and assorted SAE sockets and wrenches. Now if only I had a real shop to put these in. For now, my front stoop and back yard will have to do.

SEO and the Semantic Web

Wednesday, July 2nd, 2008

I posted this over at SEOmoz’s YOUmoz blog, their user generated blog. If you happen to be a member and like the article please vote for it so it will get promoted on their main blog.



From SEO and the Semantic Web on YOUmoz:


With the proliferation of the Semantic Web, all of our data will be structured and organized so perfectly that search engines will know exactly what we are looking for, all of the time. Even the newest of newbies will be able to create the most well-structured site that would take tens of thousands of dollars today. Everyone’s information will be so precise and semantically correct there will be no need for Search Engine Optimization anymore!


The fact of the matter is, this is never going to happen. Being a long-time SEO practitioner myself, I am very interested in the ramifications of the Semantic Web on today’s search, especially because I am tasked with optimizing Twine when it first becomes publicly readable this summer.


Before we dive too deep, let’s first look at what SEO experts and professionals do today. In a nutshell, we research, study, and test hypotheses learned by watching the heuristics of a search algorithm. We implement by writing clean and semantically correct HTML in certain combinations in order to allow robots to easier asses the meaning of a page. We use CSS to abstract the presentation layer, we follow good linking structures, add proper metadata, and write concise paragraphs. We organize our information in a meaningful way to show bots clean parse-able HTML. In some sense we are information architects, in another we are marketers.


But what would happen if a search engine company published their algorithm? Although that probably isn’t going to happen anytime soon, what if they would tell us exactly what they were looking for? That’s what the Semantic Web is going to do to search. Just the other day Yahoo announced SearchMonkey for just this purpose. It is only going to get bigger. Being told how to mark up your information certainly takes a lot of the guesswork out of it. But in terms of the role of the SEO expert or professional, I don’t think we can retire just yet.


The Semantic Web is organized by people just like the Web of today. The only difference is that now we are going to organize around better standards. Just as people have a hard time organizing their closets, attics, and garages, people have a hard time organizing their websites. Although the Semantic Web will add structure to the Internet, make it easier for novice users to create structured content, and change the way we search, there is still a need for experienced help.


Enter SEO. Some of our roles may have changed, but for the near future there will be still be a lot of similarities. The need to study and analyze robot behaviors to better tune information isn’t going away. They will still have to be on top of the emerging trends, search technologies, and organic ways to drive traffic. The fact of the matter is, nothing is going to change drastically for a while. In the near term, I am mostly worried about how to integrate Twine into the Web of today.


Not very semantic, huh? Well, that’s not say we aren’t going to integrate with microformats, display RDF in our pages, and publish our ontology. All of this is extremely important as the Semantic Web emerges; however, in a world where search is run by Google we have to cater to them. There are a growing number of semantic search engines and document indices out there, which are definitely raising awareness to the mainstream. Yahoo just jumped on the semantic bandwagon publicly and you know Google can’t be too far behind.


In conclusion, there’s nothing to worry about anytime soon. The SEO expert’s salary isn’t going back into the company budget. We still have to tune our pages to the beat of Google’s drum for the time being. When things do take a drastic turn, we will adapt and overcome as we always have. That’s what good SEO does. As for me, I will tune Twine just as I used to tune pages over at CNET, following the teachings of Sir Matthew Cutts et al.

Semanticweb.com published my semantic tagging article

Monday, June 23rd, 2008

Unfortunately its been a while since I have written anything new and interesting here although I have been working on some very exciting stuff (more on that later). In the meantime, Josh Dilworth from our great PR team at Porter Novelli submitted my last article to semanticweb.com and they published it! Its the first thing I have ever written that has been published somewhere besides this dinky little blog ;). Anywho, for those who didnt read it the first time, here is the article on semanticweb.com.