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

August 2, 2006
 by 

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

July 2, 2006
 by 

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

June 1, 2006
 by 

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

May 18, 2006
 by 

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

March 12, 2006
 by 

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

February 6, 2006
 by 

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


Time for a motor rebuild

January 4, 2006
 by 

Besides the fact that my little 4 cylinder is burning oil, its also drawing a lot of attention, as well as polluting horribly so I think its time for a motor rebuild. The odometer reads a little over 68k but it has also stopped. As to whether its 168k or 268k I’ll never know. Nevertheless, its time to yank the motor.

As I said before, I have little automotive experience, however I have been building and tinkering my whole life so I figure I can tackle this one. The first thing I did was found a competent machinist who could deck, place, hone, rebuild and balance. I found a great guy in Livermore, CA named Terry Tinney who I would highly recommend.

Now it was time for disassembly. This was quite simple actually. The hardest part was keeping track of everything. As always, I used my trusty wiki to photo document for reassembly. Also, plastic baggies are clutch. Label and keep everything!

Here are a few shots of the motor pulled out.
Empty and dirty engine bay  Another view of the dirty engine bay

While Terry is rebuilding the motor, I will be scrubbing down the engine bay to get ready for a coat of paint. If you’re anything like me, you’re probably wondering whats up with the specs on the motor! They can be found on the wiki, but also right here:


-Bored, decked, honed, polished head and crank, and balanced final assembly with clutch
-9.5:1 piano top Mahle cast-iron tii pistons
-278 degree regrind (lift int/ex .288″/.288″)
-Crane XR700 optical electronic ignition
-tii exhaust manifold

-Sach’s sport clutch kit
-Weber 38/38


Vintage bluetooh handset

September 18, 2005
 by 

Bluetooth headset stuck in an old phone

Essentially, all I did was take a bluetooth headset, one of those little ones that fits in your ear, and put it inside a retro looking phone. This is only a prototype, but eventually I will make a more advanced one, this is quite rudementary. The red button you see is the call button. It is used to pick up and hang up the phone. It is also used for voice dialing. The power cord is attached to the phone cord through the back of the phone’s base. Then the power travels up the stock line to a 1/4″ stereo jack right to the base of the phone for easy removal. Thats it. Instant bluetooth handset. It works quite well for being my first go at it. The sound is good and so is the range. The total porject cost was barely $75 dollars.


My First Restoration

September 2, 2005
 by 

Since I was kid, I have always been in love with classic European automobiles, especially the 1970′s BMW 2002 (the model number not the year). Although these cars are often forgotten, they still live on today as what we now call the 3-series. This car is infamous in car circles, all over the world, and especially in American because this was the first large-scale production vehicle to hit our shores.

So in August of 2005 I found the perfect one for me and went out and bought it from a guy in Navato, just north of me in San Francisco. When I bought the car it was burning oil, was in need of interior repairs, but all around a stable vehicle. This is literally the FIRST car I have dug into like this so follow along and watch as I learn. Nothing is that hard if you have the patience to learn and understand what you are doing.

Here are some photos of the old beat up motor

1973 BMW 2002 motor in bad shape Another shot of the BMW 2002’s motor in rough shape


Copyright © 2005-2011 John Clarke Mills

Wordpress theme is open source and available on github.