Archive for 2006

The BMW 2002 is running open source!

Friday, December 1st, 2006


After months of planning, documenting, and gathering parts the project is finally complete (almost). I still have to ditch the distributor for a crank fired ignition system but this’ll do for now. As always, more details and exact plans can be found on the wiki

MegaSquirt EFI assembly is almost complete

Wednesday, November 8th, 2006

getting_there.jpg

After 5 days of working on the fuel injection I am finally almost complete. Fortunately my friend let me use his garage for week which has been extremely helpful. I also had the help of my roommate. Right now are are stuck because my computer cannot get a signal from the coil telling it to fire. I have to do some more research but I am sure it will work.

SEO training

Wednesday, October 18th, 2006

My boss is a huge proponent to proper SEO standardization which means I have to be also. Every move I make, every URL I modify, every link I create it scrupulously examined. If him training me wasnt enough, he had the CEO from NetConcepts come in from Australia to teach us more tricks of the trade. Needless to say, I learned a hell of a lot. I will post more of my findings as I implement them.

How H1 tags and Title tags are different in the eyes of Google

Wednesday, August 2nd, 2006

I have just noticed that this site (based on WordPress) is using title tags incorrectly. Unlike H1 tags, tittle tags are read backwards in the eyes of Google. For example, on subcategory pages on this site, the titles read “John Clarke Mills >> Portfolio”. Ideally they would read something like this “Portfolio - John Clarke Mills”.

In a shopping comparison example, lets say you are looking for men’s jeans and you have drilled down based on these attributes or facets. The title should read something like “Jeans - Mens - myShoppingSite.com”. However, the H1 tag like the breadcrumb would read something like “Home - Men’s - Jeans”. Makes sense once you know it but kinda strange at first.

TWM throttle bodies have arrived

Sunday, July 2nd, 2006

dual_throttle_bodiesjpg.jpg  twm_componentsjpg.jpg  main_throttlejpg.jpg

After doing hours and hours of research I have decided to go a different route and use individual throttle bodies (ITB’s). This means that each port will have its own throttle plate, ideally allowing more air and hence more fuel; however this does create more issues in setting up and tuning. My MegaSquirt computer wants a pressure reading of the air between the throttle plate(s) and the valves. With my setup I have to tie all four individual runners together so the computer can get a reading.

MegaSquirt Electronic Fuel Injection

Thursday, June 1st, 2006

In the spirit of being open source, I have decided to convert my little BMW to Electronic Fuel Injection (EFI). What prompted this decision was a road trip to Chico when my car didnt perform as well due to the environment, i.e. the altitude. This is due the carburetor, a great invention that works incredibly well to this day, but for me, it wasnt enough. I liked the idea of being able to tune my car with a computer. Even while I’m driving! It sure beats taking the carbs apart over and over to change the jets ;). As always, I will be managing the project and researching on my wiki.

The MegaSquirt system was built by a bunch of Assembler engineers who realized that there was a place for open source in this industry. If I were to do the same via some of the closed source manufacturers I would be paying thousands with very limited resources. This is exactly how I view software in my day job. I am 100% open source in all of my environments. Now my car is the same. More info on this project can be found on the MegaSquirt website.

Spring pagination support for Hiberate

Thursday, May 18th, 2006

As I have said before I love Spring and Hibernate; however, there is no Spring support for Hibernate’s pagination API. Why am I am not sure. Maybe they are supporting it now but heres what I did. First I made and abstract object I called ‘Page’. I also have a Solr subclass of this object but I will cover that later.


public abstract class Page {

    public List results;
    private int pageNumber;
    private int resultsPerPage;
    private int totalCount;
    private String queryString;
    private Integer totalPages = null;

    /*
        Getters and setters
    */

}


public class PageHibernate extends Page implements HibernateCallback {

    public PageHibernate() { }

    public PageHibernate(String queryString, int page, int resultsPerPage) {
        this.setPageNumber(page);
        this.setResultsPerPage(resultsPerPage);
        this.setQueryString(queryString);
    }


    public final Object doInHibernate(Session session)
            throws HibernateException {

        Query query = session.createQuery(this.getQueryString());
        query.setFirstResult((getPageNumber() - 1) * getResultsPerPage());
        query.setMaxResults(getResultsPerPage());

        return this.results = query.list();
    }
}


Since Spring abstracts your Hibernate interaction with HibernateDaoSupport you dont have to write straight criteria calls to Hibernate if you dont want to. Spring does create simple implementation to allow to write straight HQL and many other functions but not pagination. Rather than tackle this problem at this angle I decided to make the abstract class ‘Page’ that you see above for all my data stores. Anyway, here’s how easy it is to then hit the database with this object properly constructed and have it returned ready for use.


public Page getPageOfThings(int page, int resultsPerPage, String orderBy) {

    PageHibernate newPage = new PageHibernate(
            ”FROM Thing”, page, resultsPerPage);

    getHibernateTemplate().executeFind(newPage);

    List count = getHibernateTemplate().find(”SELECT count(*) FROM Thing”);

    newPage.setTotalCount(Integer.parseInt(count.get(0).toString()));

    return newPage;

}

Spring and Hibernate

Sunday, March 12th, 2006

Spring and Hibernate make Java web application development so much easier I barely remember what I did without them. Despite the steep learning curve, Hibernate especially so, they work so well together thanks to Spring. Spring is probably the most “open” open source framework out there for Java. It can and will play nice with tons of other frameworks like Tiles, SiteMesh, Velocity, JSF, as well as backend technologies like iBatis, Hibernate, ACEGI, and countless others.

I have begun to like them so much at the office that I am using it a home in all of my side projects. This blog will hopefully shed some light on some of these technologies to hopefully give back. Blogs like this are especially important because although these frameworks aren’t relatively new, there can be some holes in the documentation. Two books that helped me through my trouble were Matt Raible’s book “Spring Live!” and “Hibernate in Action”

Motor is back and ready for installation

Monday, February 6th, 2006

After a long month of work and restoration the motor is finally back and ready for installation. It was somewhat straightforward to install; however, since this was my first time it did take time. I had 2 friends helping me which was definitely a plus. After we negotiated the motor in we had to deal with the output shaft from the tranny which was tough. After at least an hour we got it locked in and the clutch was feeling good. Here are some shots. Much more can be found on the wiki

rebuilt MW M10 ready for installation  BMW M10 motor going in

Engine bay is ready for the new motor

Sunday, January 15th, 2006

After hours and hours of scrubbing and sanding the engine bay is finally clean and ready for primer, base, and clear coats. Here are a few photos.

Engine bay is scrubbed and clean    bay_masked_off_and_cleanedjpg.jpg

Color has been sprayed awaiting the clear    The 2002’s engine bay is complete