Tern GSD Review

I started writing a personal review on my Tern GSD R14 purchased last August on my Mastodon. But this is probably better kept in a blog post format, so here it is.

Now that I have used it for a few months, I would like to share some experiences with the Tern GSD cargo bike.

First impression: it is heavy. Especially since I got two batteries. My bike is over 37 kg. The weight makes getting on the bike and maneuvering in tight spaces more challenging. The good thing is that it is built like a tank, sturdy and stable when parked.

After getting used to the weight, it is actually not a huge problem to ride most of the time, given the powerful Bosch cargo line motor. Getting on 12% hill with full of cargo feels like a breeze. However, I do feel like I need extra attention if I need to jump off the bike, because then I need all my strength to hold the bike steady.

It is also quite a challenge to get it into small elevators even when you can lift it upright, so I would not recommend getting it if you live in an old apartment building. Newer ones typically have deeper elevators so it wouldn’t be a problem to push it right in. Overall, I think the Tern HSD or Quick Haul might be better options if you want a more nimble and agile bike.

That said, this thing is a beast when it comes to hauling cargo. I have the Clubhouse+, Storm Box, and the Transporteur rack accessories installed. Buying groceries, picking up packages, dropping off recyclables to local recycling station has been so efficient, honestly I prefer it to cars most of the time, since I don’t need to bother finding a parking spot in the city.

It is quite capable getting passengers around too. Since we have a lot of rain and snow here I also have the Storm Shield installed, and it is so helpful at keeping the wind and water out. Comparing to a smaller bike like the HSD or Quick Haul with similar (mini) setup the GSD gives more space for the passengers, so you can fit in some cargo even when carrying a kid.

For anti-theft I use the local BikeFinder, a GPS tracker hidden in the handlebar. It comes with a 200 NOK/month insurance that allows me to use the built in frame lock only. The tracker works fine but I do wish its battery last a little longer, and easier to charge.

I got the R14 model with Rohloff hub which is quite a bit more expensive than the base S10 with Shimano Deore or the S00 with Enviolo gear hub. But I’m glad that I made the choice because the Rohloff R14 has been flawless and a joy to use. I found gear 8 or 9 is my sweet spot. And belt drive is such a good pairing with electric bikes in muddy conditions.

For winter tires, I followed Tern’s advice and got the Schwalbe Marathon Winter Plus 20×2.15. You do sacrifice quite a bit of speed compare to the stock Schwalbe Big Ben Plus due to much heavier weight and more rolling resistance, but in icy or packed snow conditions it is also much safer. The only thing I can’t safely ride with these are fresh, loose snow, especially going down or uphill.

The studs helped a little for the traction but not quite enough especially when you need to turn or going from one tire track to another. I was quite nervous when going over a motorway overpass bridge in condition like that. The bike lanes within Oslo ring 3 are fine though, as there weren’t much snow on there.

Changing into the winter tires hasn’t been much of a trouble either: putting the bike in upright position saved me from using a bike repair stand (my stand can’t handle the weight anyways). The front one is pretty straightforward. The rear one requires unplug the Rohloff cable, which is quite tightly coupled. You can find guide on YouTube or Reddit for the steps even though Tern didn’t provide an instruction officially.

For carrying our little one I first went with the most straightforward solution: Thule Yepp Maxi EasyFit. It is really simple to put on or take off, and the safety belt is easy to fasten as well. It should be quite comfortable on its own given the bike has a suspension. Having the Clubhouse+ in addition is kind of nice as it gives the child to have something to hold on to while riding. The Storm Box meanwhile can keep their feet warm and dry by blocking wind and water.

You can certainly still carry an adult plus a kid with this setup as long as the total weight including the bike is within 200 kg. But that is pushing the bike a bit far especially going uphill. It also feels less safe since you have to keep the adult closer to the center and the kid further at the back to balance the weight distribution, otherwise the bike will tilt to the back when loading.

Another option is attaching a trailer: we went for a Thule Chariot Sport 1 because for longer trips, having the child fall asleep on the Yepp feels awkward, as they certainly don’t look comfortable sleeping upright. Tern has a guide on fitting trailers to the GSD gen 2, however the M10 nut and bolt pair for attaching the Thule Chariot arm is surprisingly hard to find here. I had to ask our local bike workshop (Evo) for help.

Comparing to the GSD, the Quick Haul my wife owns has a simpler quick release skewer and the longer skewer Thule provides fits perfectly. Once attached, getting the trailer on or off is quick, steering it through the roads is also quite easy. I expected that to require some getting used to but we were able to do it as soon as we get on our bikes.

Having the kid in the trailer free up a lot of cargo space as well, we were able to ride to our local Plantasjen to get a few bags of firewood with this setup. Each bag is 40L and fits perfectly to the Storm Box slots and stacked on the rear rack quite secure with the Clubhouse+ keeping them from falling off. We can stack even more by fasten the bags with some bungee cord.

As for the front rack, the big Transporteur rack I got is handy at loading package boxes, pizza boxes, or backpacks, but it also makes sliding the bike into normal stationary bike stand a challenge, since most of those stands are in a reversed U shape the rack likely will get in your way, especially if you want to lock it with a chain or U lock.

New Beginning


It has been a while since my last post. A lot has happened. The most important one is that I have come back to China to join the fruit company everyone loves or hates.

It’s a new beginning for me, almost three years ago I joined Opera to build their new Mac browser from scratch. It’s an opportunity that few programmers could ask for. I met some incredibly talented colleagues and became really good friends with many of them. To sum up, the jump to Opera is a decision I will never regret.

But that’s a small jump compare to the one I just made. After moved to Norway for five years, I’m moving back to Beijing for a new job.

After working on desktop UI programming for a while I realized that I still prefer lower level work involving frameworks and APIs. I still love working on text and fonts in particular. Fortunately, this new job is exactly about those stuff.

Of course, the job is not supposed to be easy and being remote for a while is going to be tough. But I’m still positive about this new beginning. We will see.


Codesigning is one of the worst issues we had been having since we started working on the new Opera for Mac. How Apple managed to screw this up never ceased to amaze us.

Since yesterday morning our build servers started to get CSSMERR_TP_NOT_TRUSTED error while code signing the Mac builds. Well, we didn’t notice until trying to release the new Opera Next build in the afternoon, which is obviously a bad timing. When it happened, immediate reaction was search for it in Google, unfortunately, when it happened words haven’t been spread yet so all results we got were from early 2009 ~ 2011, about some intermediate certificates missing, which completely mislead us. We spent a couple of hours inspecting certificates on all 3 of our Mac buildbot servers, none of them seemed wrong. One of my colleagues tried to resign a package locally with certificates/keys installed, got the same error as well.

Fortunately our build server didn’t get the same error every time so we managed to get a build for release.

When I later did a search for the same keyword but limit the results in last 24 hours, we finally found the real answer to the problem this time. According to this discussion:

Apple timestamp server(s) after all that is the problem here. If I add the --timestamp=none option, codesign always succeeds.

I have exactly the same problem. Probably Apple got two timeservers, with one broken, and a 50% chance for us to reach the working one.

And it worked for us perfectly as well. The only thing I didn’t know was whether it’s safe to release a build without requesting a timestamp (or where can we find other trusted timestamp servers).

This morning I woke up and saw this summary about yesterday’s incident.

According to Allan Odgaard (the author of TextMate):

As long as the key hasn’t expired, there should be no issue with shipping an app without a date stamp, and quite sure I have shipped a few builds without the signed date stamp.

That at least give us some confidence that if such incident happen again, it shouldn’t be a big issue to turn timestamp off.

Update: More explanations from Apple:

The point of cryptographic timestamps is to assist with situations where your key is compromised. You recover from key compromise by asking Apple to revoke your certificate, which will invalidate (as far as code signing and Gatekeeper are concerned) every signature ever made with it unless it has a cryptographic timestamp that proves it was made before you lost control of your key. Every signature that does not have such a timestamp will become invalid upon revocation.

Mac 连接环绕立体声系统

在家看电影这么久,老早就在琢磨要不要换一个更强大一点的 5.1 环绕立体声系统,因为空间有限,专业的音响系统用不上也听不出差别,最近 XBMC 出了一个模拟立体声的 bug,让我又开始想要不要换到用数字输出才不浪费大部分 BluRay rip 里的 DTS 5.1 音频了。

Logitech Z906
Logitech Z906

Mac 的数字音频输出有两种方式,通过集成的数字/模拟音频输出 3.5mm 口用 TOSLINK 线,或者通过 HDMI。因为我用来放电影的 Mac mini 还是 2009 年的型号,所以用 TOSLINK 是唯一的解法。注意 TOSLINK 相比 HDMI 的限制是由于带宽所限无法直接输出 DTS HDMA 或者 Dolby TrueHD 的音频,但考虑到 OS X 的限制即使是用 HDMI 也无法直接输出这两种格式的,所以也就没啥好说的了。

硬件选择上,一开始考虑选择低端的数字音频解码器,比如 Yamaha RX-V473 或者 Pioneer VSX-527-S,价位相近,2000 ~ 3000 kr。优点是这两款低端的解码器对于我的需求来说都绰绰有余了,而且都支持 7.1 的 HD 音频,日后升级也有余地。缺点也很明显,单有解码器只解决一半问题,至少还得买一套 5.1 的音箱系统来替换我原来用的 Logitech Z523 2.1 系统。

所以再仔细一看 Logitech 现在的产品,替换原来的 Z5500 的这套 Z906 倒是个很好的选择:自带 DTS 和 Dolby 5.1 解码,有数字和模拟音频输入,省掉了解码器的费用,而且本身也正好是一套不错的 5.1 音箱。看看到处评价都不错,就买来试试了,一同买的还有一根 TOSLINK – 3.5mm 线,其中 3.5mm 头接 Mac mini,当然也可以买 TOSLINK – TOSLINK 线然后加一个 TOSLINK – 3.5mm 转接头

今天收到货,接上之后 OS X 直接就识别出了数字输出 (副作用是这样就锁定了音量,必须通过解码终端来控制音量),在 XBMC 中也切换为数字输出 5.1 DTS/AC3 音频很顺利的就在 Z906 中正确解码了,唯一需要注意的是 Z906 的“Input”选择必须切换为数字输入对应的端口 (有 3 或者 4 两个 TOSLINK 输入,我用的是 3)。相比原来的音箱,感觉音效果然提升不少。

除了 XBMC 以外,MPlayer XVLC 都应该支持 5.1 DTS/AC3 输出,但其他的应用比如 Mac 下的游戏我还没尝试。另外可以考虑再找条 TOSLINK 线试试用 PS3 玩游戏的效果。

不过 Logitech Z906 的缺点也很明显,不支持 DTS HDMA/Dolby TrueHD 解码,也没有 HDMI 输入输出,相信下一代产品会有改进吧。

opf-cc: epub 和 mobi 的自动简繁转换工具

写一个自动转换 epub 或者 mobi 格式文件的中文简繁体的工具是我一直想做的事情,因为有不少格式内容精美的书籍资源都只有繁体中文版本,而我又不习惯长篇阅读繁体,所以常常要手工转换再用 calibre 封装,不胜其烦,相信其他人也有类似需求。

上周末有空,就用 Python 写了 opf-cc 这个项目,是 Open Packaging Format Chinese Conversion 的缩写,因为 epub 和 Amazon 采用的 mobi 都只是封装方式,具体的文件布局都是按照 OPF 规范的。这里说说实现的思路。

简繁转换这个问题相对好解决,有现成的 OpenCC 在处理多繁一简或者多简一繁的问题上已经很完善了,所以就稍微修改了一下 OpenCC 的代码直接拿来用了,修改都作为 pull request 已经提交到上游了。

解包 epub 比较简单,因为 epub 实际上就是 zip 压缩包,所以用 Python 的 zipfile 模块直接就可以解压。mobi 的解包稍微麻烦一些,如果不用 calibre 那一套庞大的库,mobiunpack 就是最好的选择。

解包后需要找到应该转换的文件,比较麻烦的地方是有的目录中 href 到的文件名本身就是繁体,如果直接整个目录文件一起转换,就得把文件也对应改名,比较麻烦,这里我尝试用 lxml 来解析目录文件,挑出文本来调用 OpenCC 的 Python 模块进行转换,对于 href 属性的内容则不转换。

重新打包 epub 也简单,用 OS X 的 zip 工具一压就可以了 (更新: fishy 提供了不依赖单独 zip 工具而是直接用 Python 的 zipfile 的实现),但 mobi 的打包比较麻烦,要么用 calibre 要么用 Amazon 提供的 KindleGen,好处是下载安装一个二进制程序就可以了,坏处是生成的文件大小要比原来的文件大一倍有余,calibre 就没这个问题 (更新: 经 byelims 推荐使用 kindlestrip 来处理 KindleGen 生成的文件,可以去掉冗余的数据)。

总的说来这个项目还有不少可以改进的地方,除了上述两点以外,还有可以加入简体转繁体的功能,也就是给 OpenCC 传一个不同的参数的事而已。不过我设想该有的功能都已经有了,具体应用的时候遇到什么问题再拿来改进。

另外有兴趣的朋友可以提供更方便的封装,比如用 Automator 或者 ThisService 做成 OS X 的 Service,就可以直接在 Finder 里选中文件右键点击转换了。