Archive for 2010

My Experiences Attempting To Scale The Semantic Web

Last week I gave a long overdue presentation on my experiences at Radar Networks where we attempted to built a consumer product using Semantic technologies. I presented this at the San Francisco Semantic Web Meetup that was hosted at my old company CNET (now owned by CBS).

I don’t work in this space anymore but I wanted to share the experiences that I had in the two years I worked with the Semantic Web. This is a very engineering-centric presentation based around the idea of engineering web-scale systems. Hopefully it comes in handy for some of you out there interested in this slowly growing space.

Group text messaging weekend startup project

Its 2010 and there still isn’t an ad-free and non-paid way to have many-to-many text messages with a group of people! Almost a year ago I built a script in PHP that leveraged twitter as the middle man to solve this simple problem for my neighborhood buddies; essentially creating a mobile chat room. Just last weekend a few of my industry friends and I decided to sit down and productize the thing as an exersize. Two days, some pizza, and a bit of open source code we had Twitmob.com. Here’s how it works.

Simply create a Twitter account for your group, say @bffs_4_eva, and invite your friends to follow. Then when a follower tweets “@bbfs_4_eva happy hour!”, Twitmob will re-tweet the message. Now all of your other followers will see, “RT @a_follower: happy hour today!”. Once your friends turn on Twitter’s mobile updates for the group you can chat with them anywhere. No smart phone required!

Check out Twitmob.com to see how it works. Its quite simple and only takes a few minutes.

Building a folding rigid insulation hexayurt


You can see all the build photos on Flickr.

For this years Burning Man I am building a rigid foam insulation panel hexayurt for my girlfriend and I. In years past I have camped in a tent under a large shade structure with the rest of my camp mates which is all fine and well but this year I wanted to try something different and a little more comfortable.

A hexayurt has many advantages over a traditional nylon tent. The main one being insulation, as that is what it is made out of. Not only will it slow down the transfer of heat it will also cut down on some of the noise, mostly treble. The other advantage is dust prevention. As this is sealed with wide bi-filament tape at every seam and taped down to a tarp dust has a hard time getting in.

Above you can see a rendering of what my yurt looks like. I used 8 panels of 1″ thick Thermax, sometimes called R Max, rigid foam board insulation. I then bought 2 rolls of 3M 8959 6″ wide filament tape from goodbuyguys.com (link) to tape up all the panels edges as well as connect them to each other. Below you can see a model that someone had built. I built the same model which made the actual build a lot easier.

As you can see, this is a folding hexayurt. This makes assembly out in the desert very simple and less time consuming. Doing more work ahead of time makes this simple setup possible. Grab a friend and in 3 or 4 hours and you can have one of these built and ready for transport. Oh, and I found that cutting the foam with a circular saw made the cuts more precise and go a lot faster. Below you can see a photo of it completed and unfolding. It really goes up quite quickly.

The only other things you have to worry about are anchoring it to the ground and ventilation. To anchor it to the ground I ran two long strips of tape across the broad side of the structure, giving 4 anchor points on each side. Then I ran a rope down the ridgeline. This should be sufficient enough anchoring. Once out on the playa and anchored to the ground I will tape the yurt to the tarp to seal out the dust.

Regarding the ventilation I have a couple of ideas but unfortunately I am unable to give them a good test given the San Francisco climate. My current plan is to use two $25 attic fans that are solar powered. I’ll report more information once I return from the desert

For more information check out hexayurt.com. And finally, the best part of this design is the entire yurt folds down to be a little over a foot thick and only 4′ x 8′ so it can be transported on top of a car.

Learning PHP after years of Java

Its been nearly 6 months since my new gig as a lead engineer at Transpond and I havent posted anything about software or much of anything else for that matter. I’ve been busy with many other projects as well as learning and writing PHP. Well, mostly writing as the learning curve isnt bad at all. The more I was able to block Java and what I know of it out of my mind the faster I was able to learn PHP.


Anyway, there are tons of books and blog posts about how to write PHP so Im not going to go into that. What I have compiled though is a list of things that helped me get over the hump. Although Java and PHP have a lot of similarities, their life cycles are different. Here are the things the differences that stood out the most in my mind.

Classes

Now that PHP is fully object oriented we can use classes as well as objects. Lots of new open source projects out there seem to take advantage of them; however, a lot do not, especially older ones. What I find to be very common throughout PHP are the untyped array objects with lots of nested arrays. This appears to be very standard. The sooner you get over this fact the sooner you will be able to code. The point of a dynamic language is to be able to build quickly and not deal with POJO’s.

Instantiation

Just like Java, classes in PHP have constructors and even destructors; however, they are not declared as you may think. You will need to use the special notation for these functions, __construct and __destruct respectively. Also, be careful when building more complicated stacks or frameworks. Objects get destructed at unusual points in a requests lifecycle so getting your debugger running can come in handy.


What is also interesting is that classes cannot be static in the way we would normally think about them. You can make a class that has all static methods which effectively makes a class static but you cannot use the static keyword for a class declaration.

Imports (require or include in PHP terms)

Unlike Java, PHP is file based not package based. This makes for some interesting issues at first. Trying to grok this idea and deal with file paths can be daunting. What we found to be helpful was name spacing which is somewhat recent to PHP. We use that in conjunction with __autoload() which makes class loading very simple. Essentially we can dynamically load classes easily based on their namespaces and not their file location as much (our autoloader handles that).

Methods, functions, and void (or lack thereof)

As you probably already noticed, methods are called functions. These function do not need to declare what type of object they will return, as this is a dynamic language. In fact, the same method could return nothing (void), and object, or a string. This puts the burden of good engineering on the caller.


Functions in PHP (methods in Java) are however similar in the way they are declared. They can have public, private, and protected declarations, as well as static, abstract, and final keywords. This makes the transition from Java pretty simple, however; there is something strange I noticed. Member variables cannot have the final declaration which I find to be frustrating but there are obvious ways around it. The main reason for this being, most objects are passed by value so modifying a member variable is harder than in Java. I will go into this more later.

Conclusions

So far I am really enjoying PHP. The environment is very simple and straightforward, there is a ton of support for it, and there is a plethora of open source projects to choose from. All of this makes for a quick development time and a quick ramp up time. As I mentioned before, the sooner I stopped thinking about how Java worked, the sooner I was about to pickup PHP.

Building a workshop workbench

Every shop needs a good workbench and its about time I built myself one. I sourced most of the parts locally from the $75 solid maple butcher block top to the $40 shelves with drawers I got at a local salvage yard. The only things I bought new were the three Rockler vises which I have yet to install. The picture above is of everything all mocked up.

I have assembled the bottom section out of 4×4′s and 2×4′s secured with long galvanized deck screws. The base frame itself is 45″ long and 23″ deep. The butcher block will overhang 3″ on the front and back, and 12″ and 18″ respectively on the left and right. This will accommodate the vice setup I will be installing but I will post more on that when its complete. For now, you can see more pictures by clicking on the image above.

Copyright © 2005-2011 John Clarke Mills

Wordpress theme is open source and available on github.