In the past few weeks I have fallen into so many parts at such incredible prices I couldnt resist. Some of the parts I acquired are pictured below but some of the ones that arent include a 5 speed, a limited slip 3.9:1 differential, the bottom end to another 2002, and a complete M3 motor from the 80′s that needs to be rebuilt. I am going to be building some interesting things in the near future. I cant wait!
I recently wrote a letter to the editor of the Roundel Magazine, published by the BMW Car Club Of America, about my friend JP Cadoux at A1 Imports Autoworks in an effort to get the word out about what he does. I am kinda surprised they actually published considering I wrote in a serious manner but frustrated after reading silly articles about carbon fiber, xenon headlights, and other useless do-dads. Nevertheless, here it is.
After many many car trips to random houses in the bay collecting 100 year old chimney brick and a days worth of laying we are finally done. We chose a herringbone pattern which was a little more complicated but totally worth it. The whole project was pretty easy just time consuming. A little research, making sure your patio is square, and grading the dirt before the sand is all you need to do. More pictures and a video will follow once the lighting and beds are done.
My roommates and I just moved into a beautiful house that has been completely redone except for the yard. Two months later, 750 free bricks on Craiglist, many trips to the hardware store, and a sod delivery we are almost complete. Here is what it looked like before we moved in.
Up until recently I never had to write any code that dealt with reflection. Before now I worked for CNET which is basically a series of differnent CMS’ with one request, one response. My first week at the new job required me to build a JMS system that would accept method invocations across the wire seamlessly for the producer. Java.lang.reflect was the answer.
Once you can wrap your head around the idea its pretty simple to write. Essentially what we are attempting to do is shield the caller from having to know anything about the other method that is going to invoked behind the scenes.
public Class MyConcreteProxyClass implements InvocationHandler {
Object obj;
public MyDynamicProxyClass(Object obj)
{ this.obj = obj; }
public Object invoke(Object proxy, Method m, Object[] args)
throws Throwable {
try {
// do stuff
} catch (Exception e) {
throw e;
}
// return something
}
}
Now we have to create the proxy interface which the caller will implement. Any of the methods of this class that he implements and fire will invoke method on the MyConcreteProxyClass object.
public interface ProxyInterface{
public Object myMethod();
}
Now its time to create wire everything up. There are several ways to do this which help hide this proxying like a static factory method but this simply demonstrates how this works.
In an effort to the use social media to gain more publicity for the fantastic work that JP does we created this video and posted it on YouTube. Within the first day it recieved a few thousand views and was honored for two weeks on the site. It generated a lot of buzz on the Internet and was picked up by Jalopnik.com due to an anonymous tipster (myself). Here is a link to the post.
I’ve owned this car for almost 2 years this August and for the life of me I have not been able to get this car to sit flat, i.e. not sag in the rear. I have replaced every bushing, removed every spacer, replaced the springs and shocks and still, the sagging continued. So I finally bit the bullet and replaced my front suspension struts with coilovers which allow for an adjustable ride height. Not only does the car sit level it handles better, especially squatting into a corner.
Yes it may sound crazy but once a URL goes live you must maintain it… forever! (if SEO is your thing that is). Now that isn’t to say that you shouldn’t change or remove some URL’s, just make sure you create an Apache rewrite rule utilizing a 301 redirect. I deal with this on a monthly basis at work and its not so bad as long as you track your URL movements. Rewrites are an SEO’s best friend. Here is a good way to check to see if a Google has any records of a given string in your URLs:
Having never heard of this before, it came as a shock. Its so simple that seems almost like a trick but its really not. I actually do like the question for that reason. Sometimes in the real world solutions are that simple as its a good trait to be able to recognize it. I answered the question well (or so I think), but I didnt pick up the simple refactor. If I was coding in front a computer I would have seen it in about 5 minutes but its different when you’re on a whiteboard in front of two senior architects. So heres the question:
Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.
So here’s what I came up with (in pseduo code):
for ( int i = 1 ; i <= 100; i ++ ) {
if (i % 15 == 0 ) print "FizzBuzz";
elseif (i % 3 == 0 ) print "Fizz";
elseif (i % 5 == 0 ) print "Buzz";
else print i;
}
So? Do you see it? Do you see the 'refactor' if it were (ignoring the ugly switch, design patterns, or thread safety for that matter)? Although the change is small change it does make a difference. Keep in mind this is pseudo code but they wanted me to see that if I cant print "Fizz" and "Buzz" in two separate 'if' blocks.
for ( int i = 1 ; i <= 100; i ++ ) {
if (i % 3 == 0 ) print "Fizz";
if (i % 5 == 0 ) print "Buzz";
This is now one of my favorite books on Java which I am probably going to read again just to be sure I have soaked up as much information as I can. This is a practical book written by a practical person who understands his audience, engineers. He is straight to the point with his code examples and doesnt bore you to death explaining every little detail or referencing lines of code and functions 8 pages back. I wish more technical writers would be this concise and straight to the point. There is something to be said for any technical writer who can get their message across with fewer words. No where else can I think of a better example of the old adage “less is more”. I would highly recommend this book to any engineer, especially associates.