6 December 2011

Smartphone Prices Today

Just as a snapshot of history:
  • Samsung Galaxy 3 i5800 - Android 2.1 - 165 €
  • Samsung Galaxy S i9000 - Android 2.2 - 313 € (was 419 € when I bought it in Feb 2011)
  • Samsung Galaxy S Plus i9001 - Android 2.3 - 277 €
  • Samsung Galaxy SII i9100 - Android 2.3 - 419 €
  • Samsung Galaxy Nexus i9250 - Android 4.0 - 529 €
  • iPhone 3 - 390 €
  • iPhone 4 - 644 €
  • iPhone 4S - 715 €

(Prices from Amazon. Of course they might differ widely in other shops...)




17 November 2011

creative endeavors


It recently occurred to me that all of my life can be broken up in moments of consumption, moments of creation, and moments of doing just plain nothing. I think that usually people create and produce for work and consume and relax for fun.

What's special about me is that I need to create to really feel alive, that I have a small limit of how much I can consume. I shop only for necessities; I don't watch TV, rarely read novels and watch only hand-picked movies. Most of my information-consumption is studying specific subjects (favorite reading source: Wikipedia). This often inspires my own creations. Well, mostly it rather inspires ideas, most of which I'll never execute.

It's really hard to relax without consuming anything. Sometimes (especially at night) I eat although I'm not very hungry; just for relaxing. Sometimes I read stuff (especially links on Facebook) that I won't even remember a second later, that's more relaxation than consumption. Doing sports or taking a walk seem to be the least consumtive ways to relax. Cooking can be a good creative/productive way to relax, but it requires that I am not too exhausted in the first place. Talking to a close friend is also a great way to relax and to clear my mind of a lot of things going around in there.

Here are some ways in which I could be creative for my own pleasure:
  • programming stuff
  • making music
  • drawing (architecture and inventions)
  • inventing stuff
  • building bicycles
  • 3D modeling stuff (again, architecture and inventions)
  • writing movie scripts
  • writing religious books
  • writing technical books 
  • doing stuff with languages
Last year, I took a basic class in hand drumming (Djembe playing) and that was fun (I also met great people there), but I didn't find it creative enuf. I thought that after having a basic sense of rhythm, I could experiment with tunes. A very kind person gave me a guitar, but I soon found that the level of practice required before any creativity can take place is way more that I'm willing to invest. In any case I feel that I now have made up for the lack of "trying out music" in my childhood and can move on to other topics now.

tower of bikes in my room

Since the first anniversary of me being in Berlin which coincided with my first paid vacation since graduating from UofT I have been thinking what I want to do with the next year of my life. But since all my vacation was filled with busy trips, I didn't really have time to think about it. At least I took note of the past year's highlights and lowlights and then came this week: spontaneous vacation without a planned trip! In the first days I did some remaining home improvements following my move (also this summer after just a little more than a year in my first place in Berlin). But then I quickly started looking for long-term projects in which to put my precious vacation time.

The result of my deliberations is that I want to start both drawing by hand and 3D modeling with SketchUp (see previous post). I have also decided that the realm of Architecture shall stay a topic of consumption, while my first drawings and 3D models shall be related to the planetary gear adventures. I would also really like to finish a first (or rather zeroth) version of my planetary gear calculator program, but since I find programming so hard, I am shying away from any further work until I find myself with a really large block of uninterrupted-by-work time to concentrate on this.

In the language department, I have decided to learn Dutch, just because it is so easy. In the consumption and inspiration department, I am planning a trip to Asia next fall, but I am uncertain, if I will use the chance to study more of the Chinese language. Practice a bit, certainly yes, but learning new words, it's oh-so-hard...

The future of Wikipedia and the next year for myself

It's been a couple of years that Wikipedia remains one of the world's most-read websites, but stagnates in growth and doesn't offer any really new and exciting features. One of things that I had expected to boost Wikipedia's evolution was a more easy-to-use (read: WYSIWYG) editor and more support for writing articles on specialized subjects. Writing an article about a movie or about a chemical compound or a person's biography are all fundamentally different things and although Wikipedia has subcultures for many specialized domains (and portals and mentors) the software and interface for all those domains remains the same. Since all the knowledge is in the community, not the software, Wikipedia is at a disadvantage compared to other places on the web.

As an aside compare how Facebook encodes their domain knowledge in software: there's only a limited number of romantic relationship types that one can choose and one can only select one single to be in a relationship with. That's a really easy user interface! (Of course, it discriminates against polyamorous people, but Wikipedia would of course offer such settings in a biography interface. ;-) 


A good example for a knowledge-sharing website with goals that overlap Wikipedia's is stackexchange.com which combines Q&A with Wikis and uses many encoded-in-software practices to shepherd its users into creating an ever-better site and ever-better community. Another example would be the Google Places semi-wiki which offer's shop addresses, opening hours, and reviews directly integrated into Google Maps.

But the example that currently takes most of my attention is Google SketchUp with its 3D Warehouse of reusable models. When I started dreaming to redesign some of my favorite subway stations on the computer, I just has wished that such a thing existed. Well, in fact, it existed already, I just didn't know about it. Well, now all I need is to install Windows on my computer (so I can run SketchUp) and also buy a computer mouse.

I just hope that I will have enuf time and calm (meaning not be too exhausted from work) to take up this new hobby!

PS: What I want is to create 3D models as complete as this drawing from London, but for stations in Berlin in Paris.
For the interested: More from London. And even more.

Here's a nice picture from Paris, too:

26 September 2011

Feature-driven, design-guided, and tests-in.


I just typed an answer to a new comment on my last post. Apparently it became to long to be submitted as a comment itself, so here I am turning it into a new post. I starts out with some "loud thinking" but ends with some nice insights.

Hi James, thanks a lot for your comment. You're asking just the right questions and those questions help me see more clearly, what "my problem" with TDD is.

Now, ten days after I wrote that post and through your comment, I realize that there's actually a big gap in how TDD is summarized (especially Uncle Bob's version with the three laws) and in how TDD is actually successfully practiced. I find that when the three rules are taken literally (we tried that in some Dojos), then the development and actual design becomes cluttered with detail of each test case and it's less feature-driven as well as less pattern-guided than I would like. On the other hand, if I'm looking at successful agile development with lots of unit tests, then the three rules are just not visible in the process.
I think that maybe two social processes are at work here: on the one hand, good practices spread thru pair programming and people reading a lot of open-source code, but those practices often don't have catchy names. On the other hand, there's a very catchy concept called TDD and very simple "three rules" and people saying that just by following those rules and refactoring, everything else will follow. For example, some people say that good design automatically follows from testability because only loosely coupled systems are easily testable.

So, the reason I wrote this blog post is that the simple, catchy way, TDD is explained, just won't work. It's also just not true that TDD gives you an easy way to tell when you're done. I am currently working on a medium-complex system (roughly developed by a four-person team over two years) with high unit and integration test coverage and we repeatedly had incidents just because we forgot to add something here or there which didn't get caught by the tests. However, our code is simple enuf that those missing parts would become obvious if we just had a final code review after every iteration where we check all production and test code against (a longish) list of the specific level of done for the project. (Which includes error handling, logging, monitoring, etc.) That review is what we now regularly do. Sometimes we find missing things in tests, sometimes we find them in the source, in each case it's easily fixed before going live. So the seemingly obvious things like "TDD always gives you 100% coverage" or "with TDD you always know when you're done" are just not relevant in practice.

My conclusion after working in a "high unit-test coverage" project are that not tests should come first, but the design of very small parts (a method or a small class) should be first instead. The design is primarily guided by the user (caller) of that unit. Design is always finding a sweet spot between a desired feature on the one hand and technical considerations just as available technologies, efficiency, and -of course- testability, on the other hand. I don't think it matters whether you write the implementation (of a small unit) or its tests first as long as you get all tests to pass before you tackle the next unit. (Personally I prefer implementing it first, because the implementation often is a more holistic description of the problem. Only for complex algorithms (which I find to be rather rare), writing tests first seems to give a better start at properly understanding the problem.) By starting with the design (which most often is an interface specification), I find it much easier to think about the method or class in a holistic fashion and also figure out a set of test cases that's small yet covers everything I need. Would you say that this process is still TDD?

Fast tests with high coverage are very important to me, not least because refactoring is very important to me. But I don't like the term "test-driven" because the driver of development is always some external (non-technical) need, such as a feature or some resource-restriction ("make it faster"). Tests are just a technical tool (albeit an important one) and it's the design that creates interfaces which both fulfill customer needs and technical standards. I think of my development rather as "Feature-driven", "design-guided", and last not least "integrated-testing" (because tests are an integral part of the code). Maybe the term "tests-in" is more catchy? As long it isn't "driven...". After all, model-driven also didn't work that well... ;-)

15 September 2011

How to write good software and why baby-step TDD is a scam

First off, I am obviously not going to tell you all about writing good software in a single blog post about TDD. Writing good software takes a lot of learning and a lot of practice. There have been countless books written on the subject and since this post isn't about a book list for software engineers either, I'll just mention one to give you an idea: Object-oriented software construction by Bertrand Meyer.
The company I work at has quite a large software development department and quite a good leadership for the latter. Our managers promote autonomy (developers choose the technologies and methods they think are best suited for the work) and learning on and off the job. For example, we have regular (voluntary) coding dojos (practice sessions) where a bunch of developers sits together to solve some simple problems with some new approaches. This is certainly an important part of writing good software.
Recently, we experimented with Test-Driven-Development (TDD), which some people also read as Test-Driven-Design. TDD as my colleagues introduced it to the rest of us is based on the following three rules:
  1. You are not allowed to write any production code unless it is to make a failing unit test pass.
  2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
  3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
(Something most proponents of TDD would add is a fourth step to refactor the code while the tests are green, but when TDD is introduced and defined this step is usually not mentioned.)
Our company DOJOs and some reflection upon them have taught me that this is plain bullshit and here's why. In the last two decades, the profession of software development has embraced methods like automated (unit and integration) testing, iterative development, early testing (also called "tests first"), merciless refactoring, design patterns, automated builds and many more. All of those practices are great if done right. Now TDD comes along and claims to condense many of them together into an integrated framework based on the above rules. Going back and forth between tests and code is obviously iterative. Tests obviously have to be automated. You obviously need refactoring, because otherwise TDD will produce terrible code. So TDD dresses itself up as the natural evolution of agile development. But the truth is: TDD is a perversion of agile which over-applies agile principles in a way that doesn't make any sense any more.
Somebody who claims to do TDD either doesn't follow the three rules above or they're doing helplessly bad development. TDD is a scam because it contributes nothing new to the set of agile practices. If someone using “TDD” succeeds writing good code, it is due to the other agile practices, not due to the three rules above. TDD even obscures and ignores a lot of other important methods. SCRUM, for example, tells us to define minimal features and implement them including production code, automated tests, and all that's needed to deploy and run the feature live. SCRUM offers a lot of advice on what a minimal feature is, how to split stories and what's small enuf not to need any further splitting. TDD, on the other hand, splits iterations too much, ignoring SCRUM's advice. Design by Contract tells us how to write minimal interfaces by considering both the needs of the client and the provider and describing the interface succinctly in code. TDD, on the other hand, says that interface should emerge while they instead drown into a plethora of special cases. Finally, testing methods teach us how to design good (and minimal) test cases, get good coverage, and test most where it is needed most. TDD, on the other hand, says nothing about where you start, how to continue, or when you are done. Tests are always green, but when do you have enuf tests?
Think about that: there have been countless example demos of TDD on the internet, on conferences, in practice sessions, but have you ever even seen a small program development finished with TDD? To the contrary, the only thing I see are epic failures. (Thanks, Fred, for the great link!)
So, can we please forget about this exaggerated baby-step TDD, stick to established best practices, and move on writing good software?

Addendum, months later: I saw a good example of TDD in Freeman & Pryce's book "Growing Object-Oriented Software". Their interpretation is much better than the baby-step TDD seen in blogs. The book starts by summarizing established best practice OO design. Their example study is much more elaborate and the problem domain is actually related to the kind of software that professional Java developers are writing for money. If you want to know about the real thing, you have to take the time to read something longer than a couple blog posts.

13 September 2011

Refactoring examples: little steps and big smells

My friendly coworker shared a video of Uncle Bob live refactoring some code. Since I love refactoring I was very excited to watch it, but a few minutes into the video my excitement turned into horror, disappointment and anger. Uncle Bob refactors a piece of smelly code, but instead of removing the cause of complexity (namely too many things being done at once), he just spreads the complexity out into many different methods which communicate with each other via member variables. The result looks cleaner and certainly has good naming and short methods, but it still has way too much complexity. And what's worse, with everything spread out in so many pieces, it's much harder to refactor to really simplify it to the core. And what's the worst of worst: even forty years after the invention of such useful principles as "command-query-separation", "separation-of-concerns", and functional programming, Uncle Bob happily violates all those great principles to clumsily cultivate complexity and call the result "Clean Code" and sell it for money. Skip the jump to see the code, good and bad.

5 September 2011

Cleaner Code

My team of software developers at work has decided (with some consultation by our team leader) to have a biweekly gathering to discuss a chapter of “Clean Code”. I am on vacation just now and had to miss the first meeting, but I am just reading the book on the train home and here's a little insight I want to share. I am talking about the last example of Chapter 2 in the section "Add meaningful context".

I think that the general strategy of giving a bunch of variables a context by putting them in a separate class is good, so I don't object with the point of the book.
However, I also think that this particular example can be improved in another way, which gets rid of the variables altogether by making the code simpler and shorter.

First of all, the naming of the method is wrong. Most of it is concerned with formatting the GuessStatistics, so I'd rename it "formatGuessStatistics" and refactor the call to print out to the calling method. This will also rid us of the dependency to however the statistics are printed.

Now, let's recognize that the method actually does two things: first, recognize the plural which is applied to all numbers but "1" and results in a different verb and plural "s", and second, replace the number "0" with the word "no". Instead of flattening those two choices into three cases, we should seperate the concerns.
private String formatGuessStats(char candidate, int count) {
    final String number = count==0 ? "no" : Integer.toString(count);
    if (count == 1) {
        return String.format("There is 1 %s", candidate);
    } else {
        return String.format("There are %s %ss", number, candidate);
    }
}
Maybe you'll think that I introduced bad redundancy by repeating the word "There ". I, however, think that such a little bit of redundancy is of no harm, especially since in this case it helps us remove abstraction and see more directly what the code is doing. I also think that the redundancy is only accidental a mirrors redundancy in the English language to which we convert here. If, for example, our PO decides that the singular case should read "There's" instead of "There is", our simplified (yet redundant) variant will be a bit easier to change.

Now, let's look at some further minor improvements of this code. Observing that the "number" variable is only used in the second part, we can move it down into the else block.
private String formatGuessStats(char candidate, int count) {
    if (count == 1) {
        return String.format("There is 1 %s", candidate);
    } else { 
        final String number = count==0 ? "no" : Integer.toString(count);
        return String.format("There are %s %ss", number, candidate);
    }
}
Also we could simplify some more and use the handy "%d" instead of the wordy "Integer.toString". If you are tempted to add a comment to the else-block saying something like "// handle plural case", you can as well factor it out to a second method.
private String formatGuessStats(char candidate, int count) {
    if (count == 1) {
        return String.format("There is 1 %s", candidate);
    } else { 
        return formatPluralGuessStats(candidate, count); 
    }
}

private String formatPluralGuessStats(char candidate, int count)  {
    if (count == 0) {
        return String.format("There are no %ss", candidate);
    } else {
        return String.format("There are %d %ss", count, candidate);
    }
}
Incidentally, this leaves us with code that doesn't contain any local variables any more at all. Given that it is so simple now, we could go back to using just one method and sort the cases in increasing order of "count":
private String formatGuessStats(char candidate, int count) {
    if (count == 0) {
        return String.format("There are no%ss", candidate);
    } else if (count == 1) {
        return String.format("There is 1 %s", candidate);
    } else { 
        return String.format("There are %d %ss", count, candidate);
    }
}
Admittedly we now have reintroduced the three cases from the original code. But isn't it so much more direct and clear?

Which variant do you prefer? The original, the final, or any of the intermediate ones?

PS: When continuing to read the book, I found that some of the principles I used in doing this refactoring are also introduced in the book. Apparently not all of the examples used comply with all the rules given. In particular I got very upset about the use of a parameter for output in a later example and went on to write a long rant about why this is bad and how it can be avoided. Two chapters later, Uncle Bob himself states that this is bad and gave the same alternative techniques on how to avoid the problem. I guess this means that at least Uncle Bob agrees with my own principles of coding... PPS: Bloggers new composition interface almost doesn't suck anymore. Good job, guys! Keep it up!

17 July 2011

The chain ring I chose

After loosing my old derailer in an accident (luckily it was only a cheap one), I used the occasion to mount the brand-new cranks and chain ring. Now I think I am riding Germany's only single-gear recumbent bike!
(New gears are already ready to be mounted, but the bike is not...)

The first picture shows how the bolt circle diameter for the new chain ring is slightly different, which is why I also bought new cranks.




Making new filters for our organic waste bin

Just like every summer our organic waste bin has become a paradise for the flies. None of us knew where to buy those carbon-fabric air filters for the bin, so I just went to the next Baumarkt and bought some large sheets of air vent filters. From that we can cut enuf garbage filters for the next decade!


16 May 2011

Chain ring aesthetics

For Knicki, my favorite recumbent bike, I want to buy a 160 mm crank because I hope it will stop make my knees hurt. (I've heard that many recumbent riders find cranks shorter than the normal 170 mm more appropriate.) As a style guide note that I already sprayed Knicki's new rims in a beautiful white:
Sprayed rims for Knicki


I just settled on these Sugino XD cranks:

Now I am looking for a matching 110 mm BCD chain ring with preferably 50 teeth (I also consider 48T ones). Generally I was looking for something as transparent as possible to make the bike look light and slim.

Here's a gallery of what I've found. The first one is from Spécialités T.A. and it was just made to fit the Sugino cranks:
This one's not as transparent as possible but the five surfaces would allow to spray or paint some nice white pattern on.

The next one is from Sugino themselves. The right photo shows it with some cranks and a chain guard as used by Dahon. (I will add a chainguard if the chain falls off as often as it does now.)


And there's another Sugino with flattened edges. The right photo shows how it looks on the cranks, although I will have it as a single ring of course (just didn't find a single photo).

What's really unfortunate is that they don't have it in white. I could get a non-colored one and spray it myself, but it seems hard to cover the edges so well, that the result will look clean. (When I sprayed the rims, some of the lacquer ran underneath the covering tape and left lasting squirts.)

Finally, a wacky design from Blackspire (made in Canada, as the shop says) which also leaves space for painting some small motives.
I made this blog entry so I could look at my options a few times a day and dream of them at night and then decide what to get. I also have to take into account that I have found a German dealer for the first and last ones, but not the two Sugino ones. So it also depends how much I want to go out of my way to make my ride beautiful.

10 May 2011

out of sugar

Today on the S-Bahn I thought of the Firefly Episode Out of Gas (which in itself is a masterpiece of science-fiction which I think you should see...). Also on the S-Bahn I used my “smart” phone to look up recipes for vegan brownies. I had made them before, but I didn't know whether I had kept the recipe and besides it was very handy to look up a recipe and go shopping on my way home, because going home and then back out for shopping would take too much time on a day that was already night.
The first hit on Google seemed like a good recipe and the supermarket had all the ingredients plus some extra walnuts and almond flour which I like in my brownies. In any case, I don't need to buy baking staples because I always have them at home. Well, almost always, actually. At home, I found that I had run out of sugar and the only left-overs were in the sugar portioner for tea.
I also thought that it was just too late to ask the neighbors to borrow me some, so I looked around for replacements and that's where the fun started. I found honey, maple syrup flakes, chocolate powder (which is 50% sugar after all), and raspberry syrup. So I used a fair bit of each plus some cheap Amaretto that I also found while scavenging for sugar. After all I think I still have less sugar in my brownies than the two cups required by the recipe, but I also think that the flavor will be much more interesting!

This experience reminds me that in past epochs of my life I regularly used molasses and sugar beet syrup for baking. Those would probably also have made a good contribution to my recipe.

7 May 2011

strategic jamming (how I just played in the Google code jam)

First, thanks to Stefan Schubert for alerting me to the contest. (Also, many thanks to all people who formed ICPC teams with me back in the good old times. What I did today was based on what I learned with and from you.)

I was surprised that the contest should only take two hours, since I know that in the past, I spent many hours working on problems like those from the code jam. But I actually like that it's so short: it encourages to be prepared for it and allows people who don't have much time to compete without much disadvantage. (Others can spend more time on preparation, but not more time during the contest.) After all, the smartest people often have a lot of different interests and are less likely to spend much time just on one thing, especially when they can produce a good-enuf solution in a rather short time.

So keeping this spirit in mind, I first found out, how many points I would need to advance to the next round and then solve the simplest problem which gets me enuf points. In this case, it was Problem C.

As usually, I solved the problem on paper first, then I wrote the code. Also as usually, I struggled with the input parsing part since Java has so many classes and methods for IO I always forget which one to use. Luckily, I remembered correctly which one to use. (I also tried googling "icpc java parse input" and "code jam java parse input", but none of each gave me any usable hints.)

Finally, I initially found two bugs in my program, the first was actually a bug in my test data, since I had produced an inconsistent input. The other bugs was forgetting two lines of code because I got distracted while writing. I found that bug by adding some debugging output, added the two lines and it the program worked on the sample input given in the problem statement. It also worked on the "small" data set of the contest and then I immediately went ahead and processed the "large" input. Let's see if I made it into the next round ^_^.

Overall it took me about 90 minutes to submit this one problem, not counting the time to log in and find the number of points needed to advance (I just didn't see it on the scoreboard initially) and find the problem that I want to solve. (Although that was pretty easy: I just took a problem that was worth enuf points and had the highest percentage of people who already solved it.)

If I do the next round, I will prepare myself a little by collecting some source code for the IO overhead that I can reuse. Also maybe let myself inspire by some contest-specific programming techniques to be found in example solutions.

Before starting I briefly thought about programming in Haskell, but since I have the some IO troubles there and less online resources to detrouble myself, I stayed with Java. Sure, Haskell is way more fun, but the real fun is solving the problem in one's head and on paper.

There are already more than 10,000 participants (still enuf time for more people to join) over 1,400 of which have solved all four problems. The fastest one used only 40 minutes for all four problems!! So I guess when the contest becomes serious and only the 1,000 best participants advance, it won't be for me any more.

Update: I did indeed make it into the next round. In fact, I am among the best 11,000 participants out of 18,000, which means I left 7,000 other very smart participants behind! In case you want to follow me in the next round, my handle is bob406.

2 May 2011

Kommt ihr süßen Träume

Zur Auflockerung hier ein kleines Gedicht:

Was macht schön und munter und lindert Allergie?
Was schlägt jede Medizin und verfehlt die Wirkung nie?
Ach, was gibt es schöneres .... als Schlaftherapie. 

29 April 2011

Relax and enjoy

"For many decisions that I've taken in my life I just know and feel inside that I've done the right thing for me," she said smilingly with her eyes bright as ever. "But for those two things I really think that everybody should do them." - "You mean quitting smoking and giving up full time work?" To which she nodded back at me.
"Maybe then" I wondered "many people just smoke so that they can stan the stresses of full-time work..."

17 April 2011

growing pains -or- purchasing utilons and warm fuzzies separately

It is a principle of modern organized altruism that the things which makes an altruistic person feel good (like giving money to a beggar, or volunteering at a child care center) are often just not the best uses of one's time and resources to accomplish a given goal (like reducing poverty or fostering education). But if a person takes a totally rational mindset and does the objectively most useful thing, then this might in fact go against their instincts and not give them the good feeling that altruistic behavior normally gives. That's why charity experts advise to purchase utilons (objective usefulness, utility towards a cause) and fuzzies (good feelings) separately.

Now, what's interesting is that this concept which was developed for charity and altruism also seems to apply wonderfully for optimizing my hedonism and egoism! I find that sometimes when I do things that I know are good and important in the long term, they still “feel wrong” in the moment and drain my self-control to a very tiring level. So in fact, every time I do such a thing, I should reward myself with some other short-term pleasure thing that gives me good feelings and let's me be very lazy so self-control gets replenished. Insofar it's quite sad that things which I enjoy most (being creative) always need a minimum in self-control; I just don't know how I can relax well by being lazy!

Gosh, I thought I had found something really fundamental, but now that I am thinking about it, it's just the old known principle about rewarding oneself for doing things that drain a lot of self-control. Bah, never worked for me anyways. Much better for me is to have people around who believe in the same values and give me feedback about what I do. Then, when I feel exhausted, I can get some applause. Don't need anything more....

5 April 2011

Friedrich Schillers politisch-poetische Analyse des Bürgerkriegs in Libyen und ähnlichen Blutvergießereien

Wo rohe Kräfte sinnlos walten,
Da kann sich kein Gebild gestalten,
Wenn sich die Völker selbst befrein,
Da kann die Wohlfahrt nicht gedeihn.
Weh, wenn sich in dem Schoß der Städte
Der Feuerzunder still gehäuft,
Das Volk, zerreißend seine Kette,
Zur Eigenhülfe schrecklich greift!

Da zerret an der Glocke Strängen
Der Aufruhr, daß sie heulend schallt,
Und nur geweiht zu Friedensklängen
Die Losung anstimmt zur Gewalt.
Freiheit und Gleichheit! hört man schallen,
Der ruhge Bürger greift zur Wehr;
Die Straßen füllen sich, die Hallen,
Und Würgerbanden ziehn umher,

Da werden Weiber zu Hyänen
Und treiben mit Entsetzen Scherz,
Noch zuckend, mit des Panthers Zähnen,
Zerreißen sie des Feindes Herz.
Nichts Heiliges ist mehr, es lösen
Sich alle Bande frommer Scheu,
Der Gute räumt den Platz dem Bösen,
Und alle Laster walten frei.

Gefährlich ists den Leu zu wecken,
Verderblich ist des Tigers Zahn,
Jedoch der schrecklichste der Schrecken
Das ist der Mensch in seinem Wahn.
Weh denen, die dem Ewigblinden
Des Lichtes Himmelsfackel leihn!
Sie strahlt ihm nicht, sie kann nur zünden
Und äschert Städt und Länder ein.

(Vollständiger Text)

30 March 2011

Meine neue Brücke

Hier ist die neue Brücke, von der ich neulich berichtet habe. Die Parks auf beiden Seiten sind auch schon im Bau, so dass man bald von meiner Haustür bis nach Tempelhof durchs Grüne fahren kann.
neue Fußgängerbrücke von der Schöneberger Insel nach Tempelhof

27 March 2011

Jack the hub stripper

Yesterday I stripped my first hub (a Sturmey Archer 3-gear with back-pedal brake) and put the photos of the parts I found inside in a flickr set.

Let me just show you the most interesting pictures here:  

On top of the first picture are all the parts I took out from the brake side of the gear (including the main shaft which comes out on this side) and on the bottom is just the drive side bearing cone with its nuts. I named all the parts using part names I found in technical descriptions of similar gear systems. I think my names make sense, but other description you might find might use different names for the parts.

both sides opened and main shaft taken out on brake side

Note especially the main shaft on the top left, with the planet carrier and its four planet wheels (two shown) and the sun wheel, which is hidden, but can be felt when turn the planet carrier on the main shaft, because the sun makes the planets turn. Planets, sun, and ring gear are permanently engaged with each other, no matter what drive speed is chosen.
As for the changing of speeds, you can see a little piece sitting in a slot of the main shaft. This piece is pulled by the actuating cable (thus, the speed-change lever) and pushed back by the spring shown at the bottom. The little piece then moves a larger piece which on the photo is shifted leftwards on the shaft. I call it the “clutch element” and it normally sits right on top of the little piece.

The second picture shows the remaining parts, which are the most interesting, because those parts take part in switching the gears.

ring element, drive side cover, and driver taken out

The part on the left with the two big pawls is the “ring element” on its inside is the ring gear (interior toothing) of the planetary set. The pawls on the outside engage with the hub shell to drive it, but in some gears the metal ring shown above the ring element will cover the pawls, so that the wheel can be driven by another part at a different speed.
The part in the middle screws into the hub shell and has teeth with which pawls can engage (I don't yet know which pawls tho). The part on the right is the “driver” because it carries the chain sprocket and brings the drive input into the hub. It has two pairs of smaller pawls (hard to see because of the grease, here's a close-up). Depending on gear, the driver will drive the ring element, the planet carrier, or the hub shell directly. I haven't figured out the details of this yet, but I think that the “clutch element” shown in the first picture is playing an important part in it. What's making things more complicated is that the driver also needs to actuate the back-pedal brake which I think is why the pawls on the driver are bi-directional.

On the output side, the hub shell will be driven by the planet carrier, the ring element, or the driver directly. I have heard that the brake element (first picture, top middle) is part of the transmission path in some gears, which I think explains why it also has a pair of free-wheel pawls on it.

I'll post more details about all this when I have figured it out better. 

22 March 2011

a disappointment, a niche well-filled, and a dare

Prima Parte – Una Delusione

If you look at the specs SRAM's i-motion 9 gear hub, they are really impressive. Unlike Shimano's proven excellent Inter-8 hub, the gears are spaced very evenly. Unlike previous SRAM hubs, the actuation doesn't sit vulnerably outside the bicycle's frame, but is inside like the Shimano's, but still much easier to take off when changing a tire. The hub got excellent reviews in magazines and blogs (like this one on hubstripping), many bicycle makers embraced it, and the first bunch of buyers were happy. It looked like the German SRAM engineers of Schweinfurt had been able to offer a real alternative to Japanese bicycle parts domination.
However, if you look at the same product right now, there's some disappointment around. The hub really delivers on good gears and easy shifting, but reliability doesn't seem to be so good. Thinks break, hubs have to go to maintenance. Maybe the quality isn't even worse than previous SRAM hubs, like the Spectro S7, but the good performance of Shimano's products which are used in applications more demanding than what gear hubs previously experienced. Looking at the market right now, there are less manufacturers using this hub in their bikes. Biking through Berlin I see hundreds of bikes running Shimano gear hubs (especially the Inter-8 premium and Alfine 8), but I rarely see an i-motion 9 around.

I had decided to get an i-motion 9 for Knicki, because I have the inter-8 on Speedy and like to try something different. But everywhere I look for answers to some buying and fitting details, I find people telling me that I shouldn't get it and get Shimano instead. Of course, I don't know if the hub is really that bad. I requires much experience to make such a statement and I don't know who I can trust. Maybe, it's just bad marketing and bad crisis management at SRAM, while the product is not that bad. But frankly, for my bike I want something desirable and the i-motion isn't desireble to me any more.

Seconda Parte – Una Nicchia ben Riempita

sdfasdf While researching gear options for Knicki I also found Sturmey Archer's new X-RF8 hub. I could write a half-novel now about SA's history and how Sunrace of Taiwan saved this company with very long tradition (or at least some of their heritage). And I could as well talk about the strong parallels in SA's and F&S' history. Fichtel & Sachs (gear hub makers now part of SRAM) and Sturmey Archer both started producing three-speed hubs at the beginning of the 20th century and I am still not quite sure who of the two did actually invent the thing. But to cut a long story short, I want to talk directly about the very interesting business strategy of Sunrace in dealing with SA. The smart thing they did is not to face their competitors directly with similar products but fill market needs that are unsatisfied by the competition. Of course, a large part of their business is selling slightly improved versions of their traditional three-speed hubs to bicycle makers who have bought them for a long time and are still fitting them on (some of) their current models. But another part is the market for fun-bikes and fixes which they provided with a fixed-wheel gear-hub (that is, there is not free-wheel in any gear) and with a gear-hub that shifts by back-pedaling, thus without any cable or switch disturbing the clean looks of one of those “pure” single-speed bikes.
Another big market for SA is folding bikes. Many of their gear hubs are narrower than those of the competition. For example, the five-gear hub fits the Brompton frame without modification. (Even the 8-gear fits the Brompton, albeit with some widening of the frame.) SA also makes a hub which specifically combines with the Brompton's two-sprocket derailler to create a system of six evenly spaced gears. The principle is similar to SRAM Dual Drive and Shimano Intego, but the market is specialized and the product is the only one that not just dispenses with overlapping gears (dual drive 27-gear is just 13 or 15 “net” gears), but it also results in evenly spaced gears. It's been a close cooperation with Brompton Bicycles and it's called “Brompton Wide Gear” (BWR).
But it's SA's 8 gear hub, with the poetic name “X-RF8” (rear freewheel, as opposed to the RD8 with integrated drum brake) that I find particularly fascinating. It is not just constructed narrowly to fit smaller bikes. It also has the gear arrangement designed for smaller wheels. I find that particularly interesting, because I had previously wished that such a hub would exist. A bike with small wheels always needs a larger chain wheel or smaller sprockets to get the same development (distance traveled per crank-turn). The Shimano Inter-8 which I have in Speedy has its neutral gear (that is the gear in which the gear hub behaves like a non-gear hub) in position 5. I thought that if it was in position 4 instead, then the entire gear range would have a larger development and thus work with a larger sprocket than the current, tiny, and rare 14 teeth I am using now. And it is just this idea which engineers at Sunrace have take to their hearts and used to design into the hub. The result is a system where the smallest gear (first gear) is the neutral one and the other seven gears all are longer than neutral. This means that even with small wheels, a bicycle can use standard sizes for chain wheels and sprockets and yield a good development. Smaller chain wheels mean prettier bikes and more possibilities to mount chain guards. Larger sprockets mean less wear and tear. Sturmey Archer being the only company that's building such a hub means they'll have a lot of happy customers. That is, in theory at least. I find it disappointing that I don't know any folding bike manufacturer who's actually offering series models with the X-RF8. A quick googling only shows some custom-tuned Bromptons. Well, Sturmey, I wish you more success in the future with this great idea.

Terza Parte – Una Scommessa

Now that I am doubting to buy the i-motion 9 hub (and not wanting to buy something exotic as the X-RF8), I am almost back to square one again. For sure, I could just get another Shimano Inter-8, which would also be a different one than Speedy's because the product has since been upgraded with the “silent” roller clutches. But I really want to try something different and I especially want to try a hub with more evenly spaced gears so I can feel the difference to the Inter-8's very oddly spaced gears (14 to 22% for the different shifts).
So now, 2011, it's also the first season that Shimano's Alfine 11 is on the market. A device that on paper looks just as good as the i-motion 9 and better. And it comes from the market leader in sporty gear hubs. But does that mean it's gonna be really good? For one thing, it has its neutral gear in position 5 of 11 which means that it is also much easier to fit onto a twenty-incher (such as Knicki), which solves a problem that I had with the i-motion 9. On the other hand, I'd really like to build a wheel that's gonna last and create a bike that also has a good resale value when our relationship ends one day. I'd really like to wait just one more year to see how the new hub does in practice. But Knicki desperatly needs a revamp!
How will things work out for us? Read it on this blog. Sooner or later.

(PS: subscribe to the RSS to get notified of new posts.)

6 March 2011

Another Spring, another Speedy-Tuneup

This year I did it earlier than usual, because my yellow darling had a flat rear tire and taking the rear wheel out is so much work that I used the occasion to also replace the chain and clean the gear actuation on the hub with much affection.

I had learned from past experience that taking the chainglider off and back on will bring dirt on the chain, so I did everything with much care this time. I spent a lot of time on everything, but I think that's perfectly ok to do once per year. For this year, I want to protect Speedy better from rain. I didn't get a basement to rent in my building, but I have a nice bicycle cover for outside or could take him up in my room with the other two bicycles.

I had felt that the chain had suffered a lot in this year's rain. Standing outside day and night is much worse than occasionally riding through rain and having a dry place to sleep. I thought that the sprocket might also need to be replaced, since last time changing the chain, the new one wouldn't fit on the old sprocket. But in fact, I measured the chain and it was just worn out, not totally over worn-out and the sprocket looked just a little worn. In any case I was thinking of getting a larger sprocket to vary my gears a little bit, but because of the flat-emergency I didn't have time to purchase one. (Special-size sprockets are rare!) I guess I'll do the sprocket-varying next year.

I am quite satisfied how the clean-up went. I am only doing it once a year or even less often, and last year at Thomas' shop in Schaffhausen, I didn't pay attention to everything he was doing, but I still remembered the steps well (or at least figured them out). For the rear wheel, the brake cable and torque arm need to come off, then the chainglider (at least the rear part), then the shifting cable, then the wheel comes out, then I can take apart the gear actuation to clean it. When putting things back together I thought of using the tuning-marking to adjust the shifting cable really well. I also thought of giving some slack in the cable housing so it doesn't un-adjust when the rear wheel is moved a bit to tension the chain (as had happened just two weeks ago). I just thought about it after doing the adjusting, so I had to do it again.

Reminder for myself: when I cleaned the gear actuation I found that the dust cover of the hub had a little crack. I need to get a new one, so I can put it on next time I change the chain. Shimano part Y-34R 98110. I also need to find out which tool is needed to take off the sprocket since I never did this myself.

my new bicycle commute to work



Größere Kartenansicht

It's a wonderful 30 mins every morning and night, using mostly quite streets with little traffic and a great choice of restaurants on my way home :-)

I'll post some pictures one day when I am taking the road and not hurrying to work.

2 March 2011

What's the next small thing?

Here's one small habit I adopted recently which had a big impact on my life in the area of procrastination versus getting things done. There's a lot of tasks --like repairing things in the home or doing one's tax declaration-- which linger on my To Do list way longer than needed. The longer things sit there, th harder I imagine them to be. Whenever I think of such an item on the list, the first thing that comes to my mind is "I don't even know how to start on this, how can I ever finish?"

Now the magic trick that helps me get unstuck in this situation is to simply ask myself the question: "What's the first small step that I need to do to advance this issue?" Here are some examples for simple steps: For the tax situation I might need to research a specific question on how to declare something. The small step could be to google it, or look it up in a book, or call the tax office. Or the small step could be to make an appointment with a tax consultant. In a home repair issue, the small step might be to buy a specific replacement part or to write down the exact measures of the part needed. Usually this small step seems minuscule and I might have avoided it because it seems like a lot of effort already just to make a small step. But if I verbalize this step and make it a To Do item of its own, then it will be easier to do, I will plan a time when to do it, and after doing it, I get the feeling of checking off an entire item from my list. After checking off this first small step, I'll feel more optimistic about the entire issue at all and might even be motivated to do some more work on it without planning the individual steps.

On issues that are truly hard, there will be several points at which I get stuck and won't get moving without some investment of self-control. In each case, I just ask: "What's the next small thing to get done?" and this item will provide me guidance on the larger part. It doesn't feel well to be driven by such small-scale To Do list items --I really would rather like to work freely and intuitively, which works really well for me, even on complex tasks. But for some issues, the intuitive way just doesn't work and then the small-scale items is exactly what's needed to get things done. It's not getting things done pleasantly, or creatively, or liberally, but it gets things done without the pain of high-fee overdue notices or looking at unfinished tasks for months. In fact, it is giving up a little bit of liberty ("Today I need to get this small thing done.") to gain a much larger liberty -- namely a life without big dreading unfinished items on one's lists, in one's life, and on one's mind.

I think the reason why this works so well is that it connects the benefits of the larger goal (getting rid of taxes, kitchen tap not dripping any more) with the small effort and quick accomplishing of the small step. I won't get done the large problem with a small step, but I can feel getting closer by my own effort. That feels good and is effective.

I have used this tactic several times in the past weeks after reading about it in the book "Switch: How to Change Things When Change Is Hard". It's a really good book, with many good lessons and I think this is only the first one with profound impact on my life.

16 February 2011

Berlinale: Man at Sea


Yesterday I experienced my first Berlinale screening. “Man at Sea” (directed by Constantine Gianaris), playing in Friedrichstadt-Palast. It was a nice festival atmosphere, mostly because there were quite a few pretty and well-dressed valets checking tickets and helping people find their seats. Friedrichstadt-Palast is a famous and large venue for live variete and other shows (in fact, claiming to be the world's largest theatre stage) and it was nice to experience this place. I first was surprised that there were still empty seats during the screening (during a festival where most shows are sold out to the last seat), but then I learned that the house has 1.895 seats! Hard to fill even during a festival!

The movie was announced by a host and very tersely introduced by the director himself. After the screening, the director came on stage again and introduced some of the cast. I was quite disappointed that there was no more talking with the director, in particular, no questions were taken from the audience. I remember from TIFF (Toronto International Film Festival) that directors would introduce their film with some words about it came to be or why they made it and would take questions afterwards. I was a little disappointed that this didn't happen, but the reason might just as well be, that there are too many people in the venue and that they only do it in smaller cinemas.

Now the movie. Ah! The movie. A freight ship takes some shipwrecked youths on board (who survived a sinking in which the elder passengers died because they left the only life boat to the young) and then can't get rid of them because no country they pass wants to take them on – they are fugitives from the Middle East. This could have been a great movie about life on a ship, about the meeting of two cultures, and about a group of grown-ups decisively shape the life of the young. Instead, the script was overdramatizing it, wasn't very believable in many parts and using black and white where there could have been a million shades of grey. At one point, I considered fleeing from the theatre, but I stayed, and as a went home, I started to develop my own ideas how to treat this subject well. I spent two hours at night to put down my ideas and now need to find some time to turn it into a full screenplay. The basic setup of this story just has so much potential that it just needs to be realized well! In Gianaris' version, at least the acting and pictures were nice and the final scene even had a little bit of that profoundness that the story affords. Just a glimpse of what's possible!

(Found a review of the movie with which I agree.)

6 February 2011

final report of my stay in Dahab

striped rock tree

Those are the three best things about Dahab:
  1. sun and blue sky: even when you're not on the water, under water, or elsewhere in nature, the effect of sunlight on mood is strong and purely positive. so that alone is worth going there!
  2. no advertising posters: this came as a surprise on my second day back in Berlin. There is some advertising in Dahab and there are of course people who want to drag you into their shops or restaurants, but it's the absence of big posters advertising for cars, beauty products or other capitalist bullshit which really make the place so much more tranquil, beautiful and soothing for the mind. Garbage in the dessert or on the beach has a melancholic, placid aesthetic compared to those ugly attention-grabbing posters that line all streets, malls, and transit stations in the big industrialized cities.
  3. no pressure to do anything in particular: now that's a personal one. I've lived in different countries and always had some purpose to go there and pressure to actually succeed in that mission. be it academic research in Toronto or language study in Taipei. This time it was supposed to be wind surfing, but Dahab is not the place where you stick to ambitious training plans. I surfed for fun and didn't surf when I felt like not to. I saw only the sights that I really wanted to see (Mt. Sinai, basically) and spent the rest of the time very spontaneously: some biking along random roads along the sea or into the mountains. Reading, inventing, ... In the last week I build a nice program to calculate epicyclic gears and when the implementation in Java Swing turned out to be harder than thought, I pushed to overcome the difficulties in programming just for the fun of it, not because I felt that it was my mission and I have to do it to have a successful stay. Think of me what you want, but just being there under the blue sky by the Red Sea and working on something that really fascinates me was a great experience that I want to repeat. (I estimate to need three more full-time days to finish my little program and wonder how I can get that much uninterrupted and relaxed time in my busy Berlin life.)

Sinbad's sign lit by rising sun

Here are some further observations from the second half of my stay:
  • Just for the change and also to be around more people I moved from the rather calm Crazy Camel Camp to Sindbad Camp, which had the additional advantage of being right on the beach so that the sunrise would wake me up every morning. There was also a kitchen with a chef where I could order meals or cook myself.
  • I started a new eating routine with muesli-breakfast every morning and regular consumption of yogurt. This and the fact that I didn't go to the touristy restaurants any more changed my ingestion-system-body-state back to normal. Although I have to say that the two first weaks weren't problematic either: just different. (I don't want to go into the shitty details.)
  • rain is something very special in Sinai and you have to experience it to really appreciate it. Not even the very modern Dahab Specialized Hospital has a completely waterproof roof. In my case, the rain meant that I was upgraded to a first-floor room in the camp with an incredibly beautiful view on the beach and the sea (and the Saudi mountains on the other side). But my old room dried quickly and I moved back within a day (using the occasion for a little cleanup).
  • I noticed that the traditional Galabija dress very easily distinguishes rich wearers from the poor as rich people wear white ones, from a finer material and collars, while ordinary people usually wear brown ones (can get dirty without being noticed). I found it very curious how much social class is expressed in the dress, because in Germany fashion can be very obnoxious of class. (I like to joke, that a guy with a tie is either a manager or a receptionist. Of course, some rich people show it in their dress, but it's more subtle and more rare.)
  • Our visit of St. Katherine monastery before climbing Mt. Sinai has proven once again, that I am no fan of sight-seeing, but the mountain and drive thru the dessert was interesting with its many views. Before going up, I had joked that I expected an epiphany when staying in the place where God had talked to Moses. But when I was up there, the only thing that came to mind was “wow, hiking is actually nice, I should do it more often.” Well, that's also something I can keep for my life!
  • The government has granted exclusive rights of being mountain guides to one specific tribe of Beduins who live in the area. When we asked our guide about his relationship to other Beduins living on the mountains, he said “we are all one family” (Thomas was afraid that we would hold up our guide while staying for tea with some beduins, but in fact he was chez soi, at home with family.)
  • While the revolution was going on in Cairo, on the night before the Internet was shut down, shopkeepers in Dahab whom I talked to still expressed their support for the president. Some quotes: “the president is good for import and export”, “don't blame the state if you're unemployed; find work for yourself” (from a man who had opened a shop six weeks ago after doing many different jobs before, because he couldn't find work as an accountant for which he had originally trained). And a beduin said: “all people in the world hate their government. that's no news.”
  • Haggling can really be quite theatrical. For example, one shopkeeper threw a bag after me after I didn't want to buy a shirt whose price I had inquired for and haggled a bit to see what the real price would be (because he had started at about the ten-fold of a realistic price). With his angry reaction he almost successfully made me feel that I had done something wrong and that I now was  obliged to buy the shirt. But of course I wasn't and I think some days later, the guy greeted me with smile and funny remark as I passed by his shop. 
  • I made several observations about work-life balance which is very different in Egypt than in other places. For example, one morning I came to a shop whose door was half-closed (it opened by lifting up) and inside the shopkeepers were still sleeping: their bed was just some blankets on the ground. As the neighboring shop keeper noticed me, he would go inside to fetch what I need and get my money to give them later. In the same vein, when workers leave their shop to visit the washroom (often across the street) or for other errands, their neighbors will take care of business until they are back. In any case, many people stay at their shops from getting up until going back to sleep. The shop is not just their work, but the center of their life. Often they will be visited by friends (if the friends have a job that finishes in the afternoon, such as dive centers do) and all hang out together at the shop. When there's no-one there to understand my English, someone will go look for a neighbor to help translate.

beduin-style hangout area

Here's the flickr set of all my Dahab pictures.

16 January 2011

midterm report of my training holiday

and some windsurfers

Last night was just the half-time of my stay in Dahab, diving mekka at the Gulf of Aqaba. I am on a strict internet and phone diet with most my communication with home being one-way, by post-card. The internet diet is really good to get most out of my stay here and connect with many people as well as with myself. I am checking email only once per week and today I am using the occasion to also post some impressions here:

  • First of all, Dahab is great for windsurfing, so I did in fact come to the right place! Although the rental prices for sail boards are just as expensive as in Berlin, Germany, the service is also as good and includes comfy rides on the rescue boat when you've gone farther than you can make it back. Wind is consistently coming down the gulf from the Nord, although this past week had a lot of quiet days. 
  • The Egyptians can be really fun people and it's totally worth learning a few words of Arabic to impress them and put conversations on a more relaxed and friendly level. They'll often start conversations, and when the conversation goes well, will teach me one or two more words. Some people here, unfortunately, have the job of selling absolutely useless things for astronomic prices and dealing with them is just as awful as with any slimy salesman back home. The prime example is when someone desperately tries to sell overpriced drinks at especially touristic places like an oasis or dive site. This really makes being at that place less enjoyable. On the other hand, it is nice to come back to the same shop (bakery, supermarket, restaurant) in Dahab every so often and getting to know the people there better.
  • There's a lot of foreigners living here, either they operate a business or they just enjoy the great climate and the cheap cost of living. Almost all dive shops have some foreign staff (and/or owner) which I guess is because diving needs a lot of experience and communication to be safe. The main nations represented here are Germans, Brits, and Russians. It seems that the Russians run most of the sail-renting businesses and also some other shops, restaurants, and –of course– diving schools. Russian signs are as common here as locals who speak a bit of Russian. Most of the local–foreigner communication is done in English, tho.
  • The climate in winter is excellent: day temperature just right to wear a T-Shirt outside, without sweating or feeling cold. It's a bit cold for diving, but ok for windsurfing with an optional wet suit when there's a lot of chilly wind.
  • In my first week here, I hung out a lot with a nice man from Berlin who I had met at the airport. He used his stay here to plot out his next career moves after completing a second course of studies and to make plans for the next year. I gave him my copy of the “4-hour work-week” to read and we discussed it a bit. He inspired me to do something similar for myself and I quite liked the results. One of the outcomes is my resolution to celebrate my birthday on the fifth of every month, or in other words, have a monthly party to which I invite everybody I like, just to hang out together and to introduce my friends to each other. I will start with a Dahab-themed party on the week-end after coming back home! 
  • Besides being a great spot for board sailing, Dahab is the most touristy place I have ever been, which has a lot of advantages and disadvantages. The upside is that there are a lot of cheap places to stay. Right now I have a sea-view room for about 7€ a night, although there's no window, so I need to open the door to actually view the sea, but there's always the sound of waves to take me to sleep at night and wake me up in the morning. There are even camps which offer beds in little rooms for 5€ a night. There are a lot of very interesting people in those camps, among them many seasoned travelers and long-time travelers, which have interesting stories to tell. I myself am more a temporary resident than a traveler. The downside is that tourists are herded like sheep on some places and locals sometimes get bad impressions of foreigners.
  • I am trying to live like an expat here, that is, a non-tourist foreigner. I don't go to the restaurants for tourists, avoid souvenir shops and tourist activities, don't go to see the most famous sights. Instead I try to eat where the locals eat, spend my leisure time just hiking or biking around the landscape, and when I do trips then go to any random spot where there are not so many tourists. It as funny to arrive by foot or bicycle at places where tourists are usually brought by bus, jeep, horse, camel or quad-bike. If I pass such a tourist spot while walking or cycling, I do my best to ignore it and move on as quickly as I can.
  • Since the Red Sea is know so well for its underwater life, I bought a very simple snorkel so I can enjoy this at my own pace wherever and whenever I feel like it. I have no interest in diving and expect to discover a lot of beautiful things while snorkeling without all the hassle and cost involved with the diving machinery.
  • Haggling is said to be important in Egypt, but it doesn't need to be. If you need something, just ask a third person (fellow tourist, camp worker, ...) for a fair price and then buy the thing at approximately that price. With the right people, you'll also get automatic discount for being a regular customer or for speaking a little Arabic. 


Abu Galum super market

Planet of the gears, part one

Fascinated by bicycle hub gears and the vision that this type of gears not only works as part of the hub, but also as part of the chainwheel (for example), I have started to study the subject more deeply. Wikipedia doesn't offer much on the subject. Amazon Germany had a book devoted to epicyclic gears (also known as planetary gears), but it covered mostly aspects that I don't need to understand bicycle gears. Finally I discovered some patents on the subject (all available for free online!) and as I am learning more and more about the subject, I will explain it here in simple terms and with close relation to cycling practice. So here's the first part of what I hope to become a comprehensive and exciting series: the planet of the gears.

In this first part I want to deal with one simple question: what is the transmission ratio of the simplest planetary gear set used in bicycles? The entire complexity of planetary gears (and we'll get to pretty complex arrangements in later posts) can be derived from two formulas which I'll show you after explaining the general setting and the terminology (which I call nomenclatura because I like that word). First of all, I follow the literature by reserving the word “gear” for the cog wheels, that is, physical parts of the gear system. The different settings for transmission ratios which in ordinary English are called first gear, second gear, and so on, will be called first speed, second speed, and so on, so we don't confuse them with the parts of our gearbox.

Now, to the Input and Output parts of a simple planetary gear system. There are three shafts which can be used to transmit a force: the sun gear s, the ring gear r, and the carrier c of the planet gears. If all three are used, the gearing adds two inputs to generate an output or vice versa. To use the gearing as a transmission to translate rotational velocities, one of the three possible shafts will be fixed. If we'd fix the planet carrier, then the planets wouldn't revolve around the sun any more and we had a pretty boring non-planetary transmission. There might be reasons to do this in a practical setting (because it could yield an additional speed), but for the calculation of planetary transmission ratios, we do not need to consider it. We'll either fix the ring gear or the sun gear.

Nomenclatura: Big letters S, P, R denote the number of teeth of the sun gear, planet gears, and ring gear respectively. (The planet carrier itself does not have any teeth.)
Small letters s, c, p, r denote the rotational velocities of those gears and the carrier.

Formula of stationary gears: For two spur gears (that is plain, ordinary cog wheels) with teeth numbers Y and Z and rotational velocities y and z which are engaged, the ratio of rotational speeds is the inverse of the ratio of number of teeth, that is, y/z = Z/Y, or y×Y = z×Z. If one of the gears is a ring gear, a minus has to be thrown into the formula like that: -r×R = z×Z.

Stationary transmission ratio: The weird thing about planetary gears is that gears are not just turning around their shafts but the shafts themselves are moving in space. In order to calculate the transmission ratios of planetary gears, we will first assume that those little planets are not actually moving. We will imagine that we –as the observer– are sitting on the planet carrier and from our relative position the planets do not move (but they still rotate). The transmission ratios observed from this viewpoint are called the stationary transmission ratios.

More Nomenclatura: Superscript x^y denotes rotational speed of shaft x when observed while sitting on shaft y. (This will be an actual superscript as soon as I have found a volunteer who'll edit my blog.)

Formula of translation: z^y = z^x - y^x
Let me explain this formula with a picture: imagine X sits on the curb of a street, y sits on the shoulder of somebody who's walking by towards North, and z sits on the shoulder of a cyclist, also going North. From y's point of view, x is moving southwards and z is moving northwards (assumed it's faster than y) with a speed just slower than seen from x.
As a corollary y^y = y^x - y^x = 0.

Let's apply the formulae: in the stationary case, we observe every velocity from the planet carrier, thus all velocity variables get superscripted with c. The sun gear engages with the planets, thus: s^c×S = p^c×P. And the ring gear engages with the planets, thus -r^c×R = p^c×P. Since we are not interested in the rotational speeds of the planets themselves, we can fuse the two equations to get s^c×S = -r^c×R. Additionally we know c^c = 0.

Now let's look at the case of a fixed sun gear. We want to translate all values x from x^c to x^s, thus we apply x^s = x^c - s^c. Since ring gear and planet carrier are our in- and output, we want to derive the ratio r^s/c^s which equals (r^c - s^c)/(c^c - s^c).
Now we fill in what we know from the stationary case, namely c^c = 0 and r^c = - s^c × S/R.
Thus r^s/c^s = (- s^c × S/R - s^c) / ( - s^c ) = S/R + 1.

I hope that even if you got lost a little in the middle, you'll appreciate the simplicity of the result gear_ratio = r^s/c^s = S/R + 1 which we derived from the simple axioms y×Y = z×Z and z^y = z^x - y^x.

Taking the coarse bounds 0 < S < R, we find that we can use this simple planetary layout to get a ratio 1 < δ(r, c) < 2, that is at most double or half the speed. (How close we can get to 1, that is, what the smallest possible gear step is, depends on some further mechanical parameters.) In the next post we will see, how different usages of this simple gear can be used to build a two-speed gearing (as does the Schlumpf speed-drive) and even a three-speed gearing (as do the three-speed hubs from F&S and Sturmey Archer invented a hundred years ago).


Now the case of a fixed ring gear
s^r = s^c - r^c = s^c + s^c*S/R
c^r = 0 - r^c = + s^c*S/R

δ(s, c) = s^r / c^r = (1 + S/R) / S/R = R/S + 1
rough bounds 0 < S < R
so 2 < δ(s, c) < ∞

Now it is theoretically interesting that we can make gears with ratios from 1 to 2 and from 2 to ∞ and thereby cover the entire possible range (with a small gap at 2, meaning we can't have a transmission ratio of exactly or close to 2).

A ratio of more than double is usually impractical for a single gear step, but this arrangement can be used well in combination with the other one. A simple example is Schlumpf's Mountain Drive which is designed to work in combination with a rear derailer. Since the planetary gear's ratio is so big, the arrangement will spread the available gears further out and avoid gear overlap, that is, more effective gears with less logical gears to shift. We will later see, how two planetary stages can be combined to create a staged gear arrangements whose gears can be shifted in a single sequence with a single shifter and no overlap.


Here are some interesting things to cover in the future:
 - How are multiple gears actually switched?
 - How do the traditional 3, 5, and 7 gear hubs work?
 - How do the newer 4, 8, 11, and 14 gear hubs work?
 - What other improvements can be made to a simple gear box: shifting under load, saving weight, increasing reliability, and much more!