Saturday, November 2, 2013

Disc-Brake Road Bike (Part 2: Frame Received)

As I outlined in part one of this series, I'm building up a disc-brake road bike -- the FM145 from Yishun Bike specifically.

The frame shipped out within a day or so of my "two week" estimate (wasn't built yet) and I received it exactly one week after it shipped (EMS).

The Frame

In short, the frame looks great (as I was expecting it to)!
The weight for the 60cm frame (with hardware) turns out to be 1080g (a little under the claimed 1100g).
This is a raw UD matte carbon finish.  As such, when you get closer you can see the layup seams for the UD layer (I assume this is just a superficial layer).  This is also true for my UD carbon wheels and perusing other raw carbon finishes from bigger names (e.g. Canyon is notorious) this seems to be normal.  It definitely gives it some "character", though.

I'm not sure I love this carbon aesthetic, but some people do; I'm sure it'll grow on me or I won't care.  (I realize now that my Motobecane Le Champion CF frame must actually be painted a matte black, as it has a completely uniform -- no seams -- finish.)  You can see the additional port there under bottle mounts; I assume that's for Di2 wiring, so won't be applying to me in the near future.

Looking down into the head tube you can see some artifacts from the construction process.  Inside the seat tube and BB junction the tubes look very clean, but this shot reveals a little about how the sausage is made.


The caliper post mounts look clean.  I have read of issues with lining up the calipers on some frames; obviously I haven't gotten that far yet.  These is configured for a 140mm rotor (and I would guess that a larger rotor would not clear chainstay).
The derailleur hanger arrived without incident and looks to be well-secured (I have left the rubber guard on it).  Quite an sharp angle there from the chainstay to the dropouts.  I know some comments on the FM166 frame (which seems very similar if not identical) suggest needing to take out the skewer to remove wheel.  Even if that proves to be the case, I don't anticipate that being a problem.
You can see the guide for the derailleur cable sticking out there.  I imagine it's standard practice, but I'm glad these are included! :)  I don't know much about internal routing, but it seems that some frames want you to route solid housing and others, such as this frame, want just cables in the frame; there are stops for the housing and only room for cables in the guides under the BB.


I received this frame with some expectation that there would be some imperfections. The first one (and only one so far) that I have had to deal with is the right-side grommet for the derailleur cable inner routing.  At first it appeared it just wasn't all the way screwed in:
Some more careful study revealed that the hole in the grommet wasn't lining up with the hold for the screw in the frame.  There was more material on one side of the port, so I took a file and evened it out.
After evening out the port, the grommet snaps in and the screw lined up perfectly..

While I had it on my work bench, I went ahead and measured the rear dropout spacing.  I wanted to confirm that it was 135mm, since the schematic had listed 130mm (definitely *not* what I want for a disc-brake hub).  The sales rep had assured me it was 135 and that the drawings were wrong, but I still wanted to confirm.
Well that looks to be just about exactly 135mm, so that's great.

The Fork

This appears to be the same fork that is sold with the Hongfu/Dengfu FM166/FM079 frames.  Including the somewhat tacky sheet metal cable guide.  While the fork seems very solid, I'm planning to buy the Whisky 15mm thru-axle fork instead.  I'll just sell this later to perhaps offset the rather hefty price tag of the Whisky No 9.
Weight came in at 448 grams (claimed weight 440g) -- not super light, but not bad for a disc-brake fork.  (For comparison, the Enve road disc fork has a claimed weight of 435g.  The Whisky No 9 is 375g.)

I think the finish on the fork is excellent.  Unlike the frame, the seams are not obvious.


Of course that sheet-metal cable guide is a little tacky.  Painting it black would be a good first step.  (If I were keeping the fork, I would give this more thought.)
Here are the UD seams inside the fork legs.
And the disc caliper post mounts.  (This is for a 140mm rotor; 160mm will need an adapter.)

So, on the whole I'm very pleased with the frame.  Next step in this process is likely going to be building the wheels.  More to come on that topic once I've received all the parts.

(Update: continue on to part 3 for overall build & impressions.)

Thursday, October 24, 2013

Disc-Brake Road Bike (Part 1: Frame Research and Sourcing)


Behold the beginning of a new bike build.
Notice the little nubs near the dropout on the NDS chainstay.


Yes, I have decided to build a disc-brake road bike. I have used disc brakes on my mountain bikes (of course) for years; this past year I have done most of my day-to-day riding on a disc-brake equipped touring/cross bike (which is setup pretty much like an all-weather road bike). Ultimately, I am convinced of the value of disc brakes on the road. Not just for the wet days. Sure, disc brakes stop better when its wet, but they also stop better when it's dry. They also solve the problem of carbon clinchers and brake heat -- and the inferior braking on carbon brake tracks, in general. I love the idea of not worrying about taking carbon clinchers on rides with significant descents.

There are many that say that disc brakes on road bikes are unnecessary; I agree with that, but this same argument could be made for any number of cycling innovations over the past hundred years (indexed shifting, 10-speed cassettes, 11-speed cassettes, electronic shifting, etc.). Disc-brake systems are (still) heavier and give up some aerodynamics, but the technology is indisputably better at one thing: stopping the bicycle. It is clear that discs are here for the long haul on road bikes. You don't have to look much further than the current cover of Bicycling magazine to see that this is an idea whose time has come.


Of course, disc brakes are still not UCI-legal for racing, and the marketing machine for bicycles is heavily driven by the pro peleton.  So buying a disc-brake road bike now is jumping the gun a little, because despite there being an option from most of the bike manufacturers, the market hasn't quite exploded yet and some of the components are still a bit pricey (hydraulics, for example) .  And because they're not UCI legal yet, the vast majority of the frames that are out there are "endurance road" which basically split the difference between a road and a touring frame (longer stays, taller head tubes, clearance for larger tires, etc.).  While I don't need a pure race bike, I definitely want something more race-y than my commuter.  This bike won't need fenders or tires larger than 25mm.

Frame Research

I do love titanium, but my only marginally affordable titanium option is [somewhat ironically] building a custom frame through Habanero -- or custom frame direct from China. No, for this first foray into disc-brake road bikes, I am going to purchase a stock carbon frame direct from China.

I started by surveying the market to figure out what the options were and which frame was going to be the closest fit.

There are a few few main / "big-name" (relatively speaking) frames and then a few additional ones that can be found on alibaba.com; I'll just address the main ones here. Also I'm only looking at frames which offer a 60cm size or similar reach (the stack/reach numbers vary quite a bit), which definitely narrows the field.

Hongfu/Dengfu (Flybike factory) FM166

http://www.hongfu-bikes.com/html_products/2013-Disc-brake-Road-Frame-287.html

Hongfu and Dengfu are just distributors here; the FM166 is the same frame. Ordering from Hongfu or Dengfu seems to be more a question of customer service than anything else.

Here is a good youtube review of this frame: http://www.youtube.com/watch?v=hQjXAiagvsE
Hongfu/Dengfu FM166 Geometry  
(The headtube angle appears to be wrong in this table.)

On the whole this frame was near the top of the list for me.

Hongfu/Dengfu (Flybike factory) FM079


For 2014, there is a new bike available from these guys which looks very similar to the FM166; however, it has significantly different geometry options. If the FM166 does not fit, you might wish to check this one out.
Hongfu/Dengfu FM079 
This frame provides more reach but also more stack with a 200mm headtube (for size 60); I want the flexibility to have a slightly more aggressive drop without a -17-degree stem.

FlyXii FR-320


At time of writing, this is the only Chinese disc-brake road frame that is available on ebay.  This one doesn't come in a size 60; I briefly considered it anyway, since the geometry matches my Motobecane frame almost exactly (and with a short headtube the reach is comparable to some of the 60cm frames).  The deal breaker for me is the 402mm chainstay length. For comparison, the other frames here have 410mm or 412mm stays (even that may be pushing it, we'll see).  I cannot fathom how the heel of my size-48 shoe would not be hitting the calipers (or the chainstays) with 135mm rear spacing.  It's close enough on my 405mm chainstays with 130mm rear spacing.


Carbonal Talia Disc


I don't know much (anything) about this company, but I came across their products and they seem legit enough to mention here.

The geometry on this one is fairly short, though; the 60cm has a 58cm ETT.  So that was pretty much dead in the water.


Yishun FM145

http://www.yishunbike.com/yishunbike-fm145-bb30bsa-700c-disc-brake-carbon-road-racing-frameset-p-880.html

Yishun is primarily known for their wheels, but they also make (or distribute) frames and they've been in business for at least a few years. Their frames come with a 2-year warranty, which is a little less helpful when shipping is over 10% of the frame price, but it's something. The reviews I could find were generally (but not all) positive; that seems to be about par for the course with these better-known mainland manufacturers. Gavin Wu responded to my email to their sales department and he and I were in regular communication through the ordering process.

FM145 60cm


(Note that there is an error in the schematic; the rear spacing is 135mm on this frame. Gavin was quick to respond that the schematic was wrong; hopefully the factory knows that too...)
One of the primary reasons I decided to go with Yishun was the excellent communication -- both in terms of responsiveness and in terms of language skills and bicycle knowledge / understanding (which definitely puts one at ease when ordering something sight-unseen like this).

I decided to not opt for any decals or painting. I'd kinda like to personalize it, but I honestly couldn't think of anything specific, so I ordered it in the [quite trendy] matte black UD finish.

The size I wanted was not in stock with the BSA bottom bracket, so a new one had to be ordered from the factory. It is scheduled to ship out this week, so I should have it in a couple weeks.

More to come!

Update: See part 2 for a look at the received frame or part 3 for the final build & impressions.

Sunday, July 29, 2012

Wilderness 101 Race Report

This Wilderness 101 was my first 100-mile mountain-bike race, and while I've done several endurance events in the past, the 100-mile race tends to be seen as the culmination of mountain biking endurance events (well, maybe the 24-hour solo tops that, but I think that is pursued by a [much] smaller subset of cyclists).

Part of the experience is the camping.  We arrived the evening before and setup camp, gorged ourselves on pasta, and fell asleep.

Race day started off with fog.
Looking over the campers is Coburn park.

And that shortly turned into light rain.  My little waterproof camera does fairly poorly in low-light situations, so most of my early-on photos were garbage.  This one is also blurry, but I think captures the mood of the start: this race starts fast -- on the road.

A fast start with misting rain.
In fact, the race basically stays on gravel roads for the first third of the race.  A common theme was working to bridge up to small groups of riders so I could sit in the draft for the long road stretches (and conserve energy for later).

This view typified the beginning of the race, and a good percentage of the race throughout.
Later the race starts adding more singletrack.  A lot of the singletrack was in fairly technical (or at least rocky) descents (I didn't take any photos on any of the descents, for probably obvious reasons), but there was some riding along the ridge tops too.  
Ridgetop singletrack riding.
 Despite the high percentage of effectively "road riding", there was some really spectacular scenery (though relatively few opportunities to see out over the valleys).  I loved riding through the huge pine forests, for example.

And there were some very dramatic bridge crossings.  I hit this bridge just as it started to rain on us.  (This bridge was less narrow than the one that came later.)

The first narrow bridge.
And there was some more more technical singletrack in the second half (or last third?) of the race.

Technical uphill section.
I crashed (flipped over forwards) a couple times in the race.  Neither time was too painful and only had to straighten out my bars and seat to keep riding.

And in the last 15 miles there were some fantastic sections of "rail grade" (converted railroad tracks).  Some of it was double track; this particular section here was single-track.  The rail grade is fast (16+ mph) and there were a few of us hammering out a good pace for the last half dozen miles to the finish.

Rail grade.
 And then we hit the much narrower bridge.  It was tough to ride through this with wide bars (and mine aren't even very wide) -- as they keep hitting the edges.
The second/last narrow bridge.
There were also a couple of great tunnels toward the end of the race, which I also did not photograph.

On the whole this race was a lot of fun.  The weather was great (high in low 80s) and I didn't have any mechanical issues (or flat tires).  I probably carried too much food/water, but I did stay well hydrated and consumed gobs of electrolytes to keep from cramping up (something that seemed to be happening to lots of riders around me).  And lots of stretching on the bike early on which kept me from getting too sore later (notably my back was fine, despite wearing a Camelbak).

And the support on this race was excellent.  It would be a grossly incomplete account of the race not to mention the quality of the aid-station volunteers and race organization in general.  As soon as I would arrive at the stations someone would have my drop bag for me and be asking me what I wanted in my bottles, helping pour water for my Camelbak, etc.  They had mechanics at the aid stations to help with bike repairs, etc.  It was awesome.  And the local beer at the end was awesome too.

While the race was definitely difficult, I think that my teammates had over-hyped this race a bit (and maybe 100-mile mtb races in general).  I was expecting that the experience would be harrowing, epic, demoralizing, and sublime like nothing else.  It wasn't all that bad.  I suspect that means I didn't push hard enough; certainly many people did it much faster than I did, after all.

It is hard to compare experiences between years (I'm in better shape this year than I've been in the past), but this race made me appreciate the Revenge of the Rattlesnake race I've been doing out in WV for the past couple years.  I've always just ridden it to ride it (not race it), but that race really gives the W101 a run for its money in terms of the epic-ness and sense of accomplishment.  The ROTR race is much shorter distance-wise (usually ~40 miles) but is almost all single-track, much of which is barely rideable (and plenty is unrideable for me), and it is an extremely lonely race in a fantastic and almost surreal natural environment.  (That race typically takes me almost 6 hours.)  I found a great race report that captures the beauty and brutality of that race.  The W101 had some great technical sections, but it was a very small percentage of the course.  And the other parts of the course were repetitive enough (climb up this mountain on gravel roads, descent on gravel roads) that after 4 or 5 hours those patterns started to feel a little boring.

All in all, I'm very pleased with my race.  The time was better than I was hoping for first time out (total time ~9:20).  I think I can improve that time next time (probably by pushing a little harder on the climbs and being more efficient at the aid stations), but I expected to make those types of mistakes.  I'm just glad I didn't have any serious crashes or mechanical issues.  I suppose if I slowed down less to take photos I might have shaved off a few seconds too :)  Interestingly my Garmin only recorded 98 miles.


I'm guessing that if/when I do my next 100-miler, it'll probably be the Shenandoah Mountain 100 race (maybe next year?).  For now, I'm glad that this major cycling event is past; I don't need to stress out anymore about whether I'm getting enough training in and can get back to a more normal cycling routine.

Sunday, November 20, 2011

Addicted to Ti: Habanero Cycles

My first road bike (of my adult life) was a 2002 Lemond Victoire.  It was a wonderful bike, but it had one fatal flaw: it didn't fit me.  Of course it took me awhile (about 4 years, I guess) to fully appreciate this; after all, I had nothing to compare it to.  I didn't realize that hitting ones knees on the front bars when pedaling out of the saddle wasn't the norm, that fairly significant (> 1") toe-front-wheel overlap wasn't a requirement, or that 12.5cm disparity between seat and handlebar height was as appropriate a position for a bike as a Snoop Dogg music video. Apparently I was a little naive.  And by "was", I mean up until a couple weeks ago when I sold that bike and bought a new Habanero Cycles frame.

Habanero Cycles, judging from their site, is a few guys down in Florida that act as a (super-lightweight) middle man for titanium frames made in China.  I think this graphic on the landing page pretty much sums up the shop:
This simple GIF, with its jagged pixel edges and MS-Paint-era aesthetic, eschews modern web design fashions and technologies.  Habanero Cycles with their straight tubes, traditional triangles, and encouragement of 1" head tubes seems to do much the  does the equivalent in the cycling world.

But, perhaps unlike the GIF image above, I think a lot of people would agree that these are really timeless and attractive  bicycles.  I certainly think so.  After all, this is my second Habanero Cycles frame.

Last year, I decided to build a cyclocross bike for commuting, to replace my single speed.  I like riding a single speed, but I wanted a bike that could fit fenders and one that had gears since I was anticipating pulling a baby trailer with it on the weekends.  Here was the bike in "commuter mode" after building it and before actually making it practical for commuting (adding fenders, lights, switching to compact crankset, etc.):

As it turns out, it also works for riding as a cyclocross bike.  I raced in my first cx race this fall and plan to do another in a couple weeks.

My new bike is a road frame, which I have to explain to my non-cycling friends and family is very, very different from a cyclocross frame -- you just can't really tell by looking at it.

(Yes, I removed the down-tube decals; I wasn't a big fan of the orange lettering on this model.)

I think that I would be betraying the "NO HYPE" mantra of Habanero Cycles if I started weaving word tapestries (or at least potholders) from the cycling reviewer lexicon: "lateral stiffness", "vertical compliance", "soak up road chatter", "effortless climbing", etc.  (but not too many cetera, this is a shockingly shallow vocabulary pool).  I do, however, have a few general statements that I would like to make about both frames:

  • They are very well built.  The craftsmanship is excellent; the finish fantastic; the welds are beautiful.  (I tried explaining this value of "beautiful welds" to my wife, but she seemed unconvinced that this is why it should cost as much as a personal computer.)
  • They are built like (light) tanks.  Strength and durability are values that Habanero Cycles extols and these frames implement those values.  And as a result ...
  • They're not super-lightweight frames.  I'd guess that you could probably find high-end designer steel frames around the same weight, but I can't imagine they would be anywhere near as strong or stiff.  My Lemond Victoire frame probably weighed almost 1 lb less than the Habanero that replaced it, but it was very flexy (wheels would rub brakes on out of seat climbing).  I would rather have a solid frame.  And you can save weight in other places.  My 60cm Habanero build weighted in at 17 lbs 3oz (compared to 18 lbs 11oz for my Lemond) -- and didn't break the bank.
  • They ride like bicycles.  In truth, I think both frames feel fantastic.  If I had to elaborate, I would say that the ride is similar to steel bikes I've ridden (e.g. my SE Lager single speed or the '80s Bianchi I rented last winter): the frame feels solid & mutes texture on paved surfaces.  To borrow another buzz phrase, these are also laterally stiff frames.  I don't notice them wagging side to side when standing on the pedals.  They both just kinda ride like bikes should.

Perhaps on par with the quality of the frames themselves, though, is the the customer service. I have worked mostly with Mark (I think he does the online stuff for them, and I tend to do more by email than phone) and the customer support has been superb.  We had many back and forth emails where he helped me choose frame size and suggestion other component dimensions to get the geometry I wanted; he's worked with me through some follow-up issues with seatpost slipping (diagnosis is bad seatpost binder bold; he's sending a replacement) -- answering emails on weekends, etc.  I have certainly never experienced such excellent customer service in the cycling industry.

After writing this, I think it's less that I'm addicted to titanium, and more that I'm addicted to the ideals embodied by that "NO HYPE" GIF image.  I like the fact that these bikes don't claim to be anything more than well-built bicycles: they embrace the fundamental triangle design that all other frame designs circle around, use traditional dimensions and geometries, favor strength and durability over weight savings, and represent a really well-crafted product.  I do like the stress-free qualities (low-maintenance finish, no rusting) and ride quality, but I think this is just part of that same bigger picture here.  There's nothing wrong with innovation, but there's often nothing wrong with the original edition either.

Wednesday, October 19, 2011

Commuter tires: the Continental 4 Seasons review

Choosing tires always feels like such an important decision.  They're obviously an important aspect of a bike's setup, the interface to the environment, and a powerful fashion statement.  It's not a fleeting decision; tires last a long time -- or they're supposed to -- and while you can change them if they're wrong it's a pain and it makes your hands black.  I can only imagine that the weight of this decision is akin to drafting a fantasy football team -- or maybe even a real football team.

And probably much like a football team, you wouldn't want to use the same tires from year to year.  No, you'd want to toss out the thing that worked great (in my case the Panaracer T-Serv tires that I sold with my single speed) and change it up.

MSRP $80 (!!!), street price $60+.

I love my (700x23c) Continental Gatorskin tires on my road bike so much I decided that the Continental 4 Seasons were the tires for me.  After all, I do ride for 4 seasons.  The marketing blurb struck a chord in my heart: 

A tire meant for road riders who do it the real way - ride all the time, on all types of roads, in all types of conditions. [...] Get the speed and dependability you need with the 4 Season, built for the long haul road rider.


Perfect! At the time I found them on sale for $47 so the price wasn't just stupid.  I was starting off riding in the winter, so I figured it was a perfect test.  These are lightweight tires at 240g for the 700x25c.

Well, my first rear tire only lasted 300 miles or so before the bead blew out on an otherwise serene ride into work.  Luckily it blew out right near work, so I could walk the bike in the last couple blocks.


I made a halfhearted attempt to get Continental to warranty the tire, but they never got back to me.  I couldn't find my receipt.  I ordered from the internet.  So I walked into my LBS with my head hung low and paid full price for a replacement.  I figured that by paying the price of a one-way airplane ticket across the country, I'd probably be able to at least get that many miles out of it.

Well, after approximately 3,000 miles this is what my rear tire looks like.  (The danger of having full fenders on your bike is that you can forget to check your rear tire.) 


I have to say that I find it a little ironic they're called "4 seasons", since they only seem to last two.  Maybe by "long haul road rider" they actually meant, "someone that takes a short spin on the weekends -- weather permitting".

Maybe 3,000 miles is expected (though it looks like I should have replaced these hundreds of miles ago), but it seems a little premature to me.

I will say that the tires have good grip and they did as well as could be expected on icy trails.  Probably the softness of the rubber is what's accounting for the wear.  I did get a flat once when I drove over glass on the nearby trail, but one can only expect so much of rubber.

So, your mileage may vary.  (Hopefully your mileage is greater than mine.)

Saturday, October 15, 2011

CyanogenMod, you saved my Captivate.

I've decided to start writing a few short blog posts again.  I think my problem with "contributing to the internet" is that it does require a certain sense of confidence in the value of one's thoughts or opinions.  I typically don't think mine are worth sharing, but every now and then I do think "this might help others avoid misery".  This is one of those times.  Oh, Samsung Captivate, it is of you I sing.


If you were, as I was, lured away from the iPhone to the Samsung Captivate (the Galaxy S model for AT&T), I am sorry for what you have had to endure.  Don't let this phone drive you away from Android.  There's a light at the end of this tunnel; it's cyan-colored.

To be fair here, there are some good things about the Captivate.

  1. The screen.  The Super AMOLED screen on the Captivate is beautiful.  Maybe it's because Samsung makes TVs, but they know how to do color, contrast, etc.
  2. Photo and video quality.  The camera is a 5mp camera which takes good pictures (for a phone).  The HD video recording is also really great (for a phone).  It's made it possible to take lots of decent quality, impromptu baby videos and that's really valuable.  The recording app itself is not that great, but the products are nice.
  3. And of course, there's Android.  This phone has definitely done a poor job of "porting" it over, but I do love the Android OS.  I can run Python scripts on my phone, build apps without paying for a developer license, run Samba for sharing files to my desktop, view content in Flash, use the latest & greatest Google apps, etc.  And I believe in open software.

... but there are some things that are not so great:

  1. Performance.  This phone with the official Android builds is SLOW!  The stock phone came with Eclaire (2.1), which was acceptable but missing enough capabilities that it was a little hard to be slow at anything.  Everyone was waiting eagerly for Froyo (2.2).  I ran a "leaked" Froyo for a little bit, but it was horribly slow.  For example, it would take multiple attempts with the swipe pattern to unlock my phone because it was not recognizing touches; answering calls was hit or miss for the same reason.  Swiping between screens was jerky.  Apps would get stuck in unresponsive states.  It was a disaster.  I tried one of the "aftermarket" kernels that did improve speed but at the cost of a battery that only lasted half a day.  I downgraded to Eclaire.  Then official Froyo came out and I upgraded.  It was better than the leaked version, but not a lot.  Less jerky movements, but still lots of applications hanging for a long time.  Games like Need for Speed were jerky while playing.  If I was honest, it was pretty crappy.
  2. Bluetooth.  So probably half of my phone calls are made in the car and I use my car's Bluetooth so that I don't have to be driving dangerously (or illegally) .  Well, the Samsung pairs fine with my car, but it would disconnect after being used for a couple of minutes.  Then it would reconnect.  So imagine driving down the highway at 65mph and your car saying "the bluetooth connection has been lost".  I'm trying to get the phone of out my pocket and yelling "hang on a sec" so that the other party doesn't say anything important that only my nether region could hear. As soon as I get it out of my pocket, the car picks up the link again.  What a piece of crap.
  3. Samsung's Android skin and crapware.  Samsung made some sort of iPhone-like skin.  It's not really all that surprising that Apple is suing them.  Their app list was a cheap knock-off of the iPhone screens.  They provided a bunch of really junky applications that you couldn't uninstall.  The camera and video app worked but were pretty annoying to use. There are ways to work around this and replace some of the stock behaviors with Android (the beauty of Android), but the out-of-the-box OS experience was pretty disheartening.  If I was a less technically savvy or less adventurous user, I'm sure I would have returned this phone within a week.
  4. Abysmal update schedule.  Samsung is way behind with their software updates.  Gingerbread was released in Dec 2010 and still hasn't been released for the Captivate (it's now Oct 2011).
  5. GPS is horrible.  This is probably partly hardware related, but the functionality of the GPS has also been greatly affected by the OS version.  Some versions of the OS have worked better than others (Froyo was an improvement), but it's bad enough that it makes Google Navigation frequently useless (it keeps thinking I've left the route when I haven't, for example).
  6. Locked down by AT&T.  They disabled "Untrusted Sources" for installing apps.   So you can only use the official market.  You can obviously work around this with rooting, but one shouldn't have to void their warranty to install something from Amazon's market or from an open-source google code project.

On the whole, I would say that the negatives outweighed the positives quite significantly.  So if you had any less self-discipline-- or faster automatic windows in your car -- your Captivate is probably in a river or the ditch alongside some stretch of highway.  I'm sure you don't regret that decision.  If you do still have your Captivate, though, I have some good news: CyanogenMod.
CyanogenMod is an open-source, aftermarket firmware for numerous smartphones; and as of version 7.1.0, the Samsung Captivate is on the list of supported phones.  (In theory the official ROMs are also open-source, since they have to be by [GPL] license, but they are not developed as open-source projects.)  CyanogenMod was not trivial to install (more below) but was well worth it.  It is a huge improvement and basically makes this feel like a new, and vastly superior phone.  (I've been running this for around a month now.)
  • The Bluetooth now works.  I was worried since I assumed it uses the BlueZ Linux BT stack, which doesn't have the best reputation, but it works flawlessly in my car.  No more rummaging in my pocket, while yelling at the person on the other end.
  • The camera/video recorder app is vastly superior to Samsung's.
  • I have the latest (Gingerbread) version of the Android OS, with all the improvements that brings (not least of which is a much better keyboard).
  • Performance is fantastic.  Feels twice as fast as stock Froyo build.  No more jerky unlocking or call answering; no more jerkiness in Need for Speed car racing :)
  • CyanogenMod uses ADWLauncher as it's "skin" which is  also vastly superior to Samsung's.
  • No more crap applications I can't delete.
  • GPS seems to work better than any other OS/version I've tried.  It is still slow to lock on to exact position, but seems to track correctly and not randomly jump a few neighborhoods over.  It is definitely usable now.
  • Lots of developer-friendly features.  Obviously things like "Unsigned Sources" can be enabled.  There's also tethering and a while lot more. I haven't scratched the surface of this yet.
  • Battery life did not degrade. I would have expected that a phone that runs much faster would suck down battery faster, but I get the same battery life as before (which admittedly is only a day of few calls and moderate network use).
The downside is that you'll void your warranty.  Of course, at this point Samsung's warranty is likely expired for me and even it it was still active, it was only going to guarantee me the crappy performance, poor hardware support, and inferior OS spin of the stock system.  Yeah, that was a pretty easy decision.


Getting it installed is not hard if you have some patience, a strong stomach (you may need to descend into the bowels of the internet or wade through troll-infested forums for help or obscure workarounds). If things go wrong, it may help to have some understanding of Linux systems, but you're going to be following some forum steps either way.  There is a good installation guide on Cyanogen's wiki; follow that and it may just work for you without a hitch.  Basically you will need to install a new kernel which supports ClockworkMod Recovery using Heimdall, then install ClockworkMod Recovery itself, and finally install the CyanogenMod ROM using ClockworkMod recovery application.  So you will first have a stock-ish system running on ClockworkMod Recovery before you then install CyanogenMod.  The beauty of this is that ClockworkMod will let you backup your current ROM completely in case something goes wrong.  Before you start you'll also want to make sure your apps (and their data) are all backed up.  I use Titanium Backup; it does this well.

I had one significant problem following the instructions.  If you are running (stock) Froyo, as I was, you will need to ensure that your "recovery" application is downgraded to version 2e.  The 3e recovery utility will only run/install signed packages, which prevented me from getting the ClockworkMod Recovery boot loader installed.  This thread may help.  Or Google for "2e recovery Captivate" and wade through the results.  When I originally had this problem I was able to find a thread where someone had posted just the 2e recovery utility, and I was able to overwrite the utility through the phone (needed root and a file utility that supported remounting partitions rw -- I told you this wasn't for weak stomachs) -- I'm not able to find that thread right now.  I was happy that I didn't have to boot into Windows to do any of the upgrade steps (I'm running Ubuntu 64-bit).

Anyway, hopefully this proves useful to someone.  If you haven't already thrown away your Captivate, don't; rescue it with CyanogenMod!

Friday, November 5, 2010

stompclient: another STOMP client for the Python community

Astute readers (as if I have enough readers to actually differentiate) may remember that I've previously entered the python STOMP world with my CoilMQ project. And now I'm at it again, but this time from the client side with my (perhaps presumptuously named) stompclient project. Yes, there are other clients out there -- stomp.py, stompy, and stomper to name the main players. So why a new one?  Well, we've been using a couple of these in various stages of production, and based on my experiences I'd decided that there was room for an additional player in this game.

  1. I wanted a STOMP client that would be easy to use without getting in the way.  For example, spawning listener threads from within the class (as stomp.py does) is easy; however, if you want to exercise some more control over how received messages are handled, it's in the way.
  2. I wanted a STOMP client that would support a publish-only usage model.  Most of my needs to interact with a stomp server from Python have involved writing clients that need to just push messages onto topics/queues (e.g. from python WSGI web applications).
  3. I wanted to also provide a helpful set of STOMP library utilities for other projects. Specifically, I wanted to flesh out & clean up the Frame classes that I had started implementing for CoilMQ and add in my fixed version of stomper's FrameBuffer that would traffic natively in frames.
  4. I really wanted a better-documented, better-tested, and generally cleaner, more pythonic (pep-8) codebase.
  5. And finally, this was really another opportunity to learn more about sockets and multi-threaded application design (& testing) in Python.
Unlike HTTP, the STOMP protocol is not a serial request-response protocol.  This actually makes it non-trivial to write a client that can both send and receive messages, since you can't simply sock.send() a frame and then sock.recv() a frame and expect that to the response to your sent frame.    Of course, this makes sense since a subscribing client also needs to be able to receive message frames from the server (without being in response to any request).  So to have a client that can both send and receive messages, there needs to be some sort of receiver loop constantly running. I chose to take inspiration from the way that the stompy does this and use queues.  My approach was a little simpler in that there is simply a listener loop (expected to be run in its own frame) that enqueues any received frames on the appropriate queue (e.g. message frames go on the message queue, receipt frames on the receipt queue, etc.).  Very simple, but seems quite effective. This approach is also flexible, since it means you could create pool of worker threads that all pull from the appropriate queue(s) to process messages concurrently.  (It probably wouldn't be too difficult to also provide a multiprocessing implementation for the worker pool.) Here's the simple publish-only example that pushes some binary content (a pickled python object) onto a queue:
import pickle
from datetime import datetime

from stompclient import PublishClient

client = PublishClient('127.0.0.1', 61613)
client.connect()
payload = {'key': 'value', 'counter': 0, 'list': ['a', 'b', 'c'], 'date': datetime.now()}
client.send('/queue/example', pickle.dumps(payload, protocol=pickle.HIGHEST_PROTOCOL))
client.disconnect()
Head on over to the project website for more examples, documentation, and download links.