Diary of a Tinkerer http://johan.beyers.co.za/ Opinions and things en-us Fri, 01 Jun 2018 00:00:00 +0200 http://johan.beyers.co.za/2018/06/01/meetup_report_31_may_2018.html http://johan.beyers.co.za/2018/06/01/meetup_report_31_may_2018.html <![CDATA[Meetup report: 31 May 2018 (And the previous week)]]> Meetup report: 31 May 2018 (And the previous week)

TL;DR: Knock sensors, ATTINY85, Satellite antennas, huge 3D printers and some drawing machine stuff.

Successful lissajous test

Last week

First, a quick report on last week: Steph did the Arduino knock sensor tutorial, but it looked like his piezo element was not working. We tried a few of mine, but most were actually buzzers, which don’t work in this application.

Evert came by: He’s interested in an IOT project with remote sensing, so we talked through the options, paying attention to the power requirements of the different technologies. This is very dependent on the data rates and radio technology used.

I messed around with the 3D printer and started getting my drawing machine going.

This week

Hard at work

Otto worked on his portable 3D printer, getting some misalignment sorted out. He had prints on the SD card, but most of them were sliced with ABS filament settings. PET-G needs a much slower first layer, otherwise the extrusion just gums up the nozzle. The few PET-G prints he had were either too long (time-wise) or just simple calibration prints.

Sorting out the printer

This is a really neat little printer.

Neat printer

Steph got the knock sensor working using one of my (many) scavenged piezo elements. Yay! He then started setting up some of the ATTINY85s that he bought from me, getting the bootloader onto them using an Arduino as an ISP. He got the first one working by the end of the evening, nice!

ATTINY programming

Jan had some soldering to do. He is building an azimuth/elevation satellite tracker to get satellite coverage in a big chunk of the southern hemisphere for SatNOGS. Awesome project: https://satnogs.org/documentation/projects/

Tracker soldering

Cassidy came by and chatted about the maker ecosystem in Stellenbosch, as well as a HUGE (2.4m square build volume) 3D printer he’s been developing for a client. Some interesting problems you pick up at that scale: 6 kW heated bed, getting things straight and squared up over those distances, and making sure that the multi-day prints can be stopped and resumed if needed. Very interesting.

(Also had some interesting sports scoring application, nice project to work on)

I got the drawing machine working again. The whole setup is a bit finicky: It depends on the order in which things are connected and started. I really want this to be a bit more solid.

Clearly obsessed with harmonic motion.

All in all, a very enjoyable evening.

Fri, 01 Jun 2018 00:00:00 +0200
http://johan.beyers.co.za/2018/05/21/meetup_report_17_may_2018.html http://johan.beyers.co.za/2018/05/21/meetup_report_17_may_2018.html <![CDATA[Meetup report: 17 May 2018]]> Meetup report: 17 May 2018

TL;DR: 3D printers, robots and Sonoffs.

My Sonoff Basic Wifi switches arrived! My evening was spent getting them working and set up the way I wanted.

First step was to connect them and get them going with the stock firmware. I downloaded the EWeLink app and got one of them working.

That done, they needed to be reflashed with OS firmware.

Tasmota looked like the most complete firmware for the Sonoffs. It also had one BIG advantage: OTA (Over The Air) updating from the stock firmware to Tasmota! No need to open up and solder extra pins to the devices.

I used the experimental OTA update method and it worked perfectly. Luckily the factory firmware was still a slightly older version. The newest versions don’t work with this method.

Spoiler alert: Over the weekend I got Home Assistant running on my Raspberry Pi to integrate these switches as a home automation solution.

I let the 3D printer run in the background on a print job or 2, just to visually test the bed movement. As I suspected, right at the top of the travel, the bed moves sideways as the print head moves. This sloppyness is probably a combination of the Z-axis standing on a non-stuck-down base and the fact that the spectra line is not aligned correctly, which shows up particularly at the top of its travel. Some manual tweaking should fix this.

I let the pendulum wave run for a while and took some better photos of the waveforms.


Otto also worked on his printer. The print surface was not flat and calibrated, so with some effort he got the bed leveling to work.

Jan had some good inputs to add on all our projects, and helped Steph with his Alphabot. Looks like the screen is a 2-color OLED, and works as advertised, mostly.

An interesting evening, will do again.

Mon, 21 May 2018 00:00:00 +0200
http://johan.beyers.co.za/2018/05/14/meetup_report_10_may_2018.html http://johan.beyers.co.za/2018/05/14/meetup_report_10_may_2018.html <![CDATA[Meetup report: 10 May 2018]]> Meetup report: 10 May 2018

TL;DR: Interesting evening, and we’ll do it again this Thursday.

The tables

Earlier in the week, I managed to redesign the pendulum ball holders to snugly fit the magnets in place, as well as being a bit more springy an nicer-looking. My mission for the evening was to print out a few examples and tweak until happy. I did get a few prints, but the bottom layers are squished and misaligned, leading to a misshapen print that did not fit that great. I think I’m overextruding.

Some prints

I also tried a newer version of Cura, but that resulted in skipped steps which messed up the last print I did.

Otto's rfid indicator project

Otto brought a very interesting project he’s doing for a friend: An ESP32 with OLED screen and RFID reader integrated into a handheld tool, with a Mutitoyo indicator attached. The idea is that this is used to make measurements easier. The user would position the indicator at a specific point and then scan an RFID tag near the point to capture the reading. The tag also stores the allowable range of readings to indicate a pass or fail. The ESP32 also serves as a web server to automatically transfer the readings to a central database. This eliminated manual entry errors and makes the whole process faster.

We discussed placing of a possible RFID sensor for home entry. Putting it into the mains power meter box seems a bit risky and uninsurable. However, the front gate has an extra access plate which is accessible and probably has 12V power already, so it should be pretty easy to wire in there.

Bob the Biped

Tom and Steph worked some more on the Alphabot. Not sure what they managed to figure out.


Ruan brought a disassembled smoothie maker. He is hoping to use the motor to make a wood lathe. We figured out how it’s controlled and came to the conclusion that the motor was probably too fast and had too little torque for a direct drive.

Triac for speed control

He then worked on the square tube layout for the lathe.

Lathe design

All in all, a nice evening.

Mon, 14 May 2018 00:00:00 +0200
http://johan.beyers.co.za/2018/05/07/meetup_report_3_may_2018.html http://johan.beyers.co.za/2018/05/07/meetup_report_3_may_2018.html <![CDATA[Meetup report: 3 May 2018]]> Meetup report: 3 May 2018

We had an interesting evening. My phone camera is fuzzy, and I forgot to take lots of photos again...

Otto showed us his 3D printer battery holder for an ancient Festo drill/driver. Great design, with space for 4 18650 cells and a voltmeter to provide manual discharge cutoff. A really solid way to upcycle a rugged tool with modern batteries. No photos, aaargh.

Otto also brought his Fluke scopemeter, and we hooked it up to the pendulum wave op-amp output and the FET gate. There’s a lot of noise, but the signals from the coil picking up the magnet (amplified by the op-amp) comes through nicely. We got a 500mV swing either way of the average.

coil op-amp signals

You can also clearly see the asymmetry in the signal caused by the coil being offset from the center position. The output of the op-amp shows a clear grouping of 2 pulses with a longer pause between them, exactly as planned.

Driving signal, interference and pulse length

We measured the op-amp pulse length, and it’s about 50ms from the start of the rise to the zero-crossing. This corresponds well to my observations that a driving pulse of longer than about 45ms did nothing to drive the pendulum faster.

We picked up no interference from the other pendulums. However, we saw some big spurious signals when the other coils were firing.

Steph and Tom got the Arduino on the Alphabot working, and with some help from a spare lipo battery I had lying around, got the wheels turning. Needs batteries.

I also got the 3D printer printing, but the filament broke inside the extruder, where I could not see it, so I only printed a part once everyone was gone.

Altogether a nice evening. Doing it again this Thursday 6:30 pm.

Mon, 07 May 2018 00:00:00 +0200
http://johan.beyers.co.za/2018/04/20/meetup_report_19_april_2018.html http://johan.beyers.co.za/2018/04/20/meetup_report_19_april_2018.html <![CDATA[Meetup report: 19 April 2018]]> Meetup report: 19 April 2018

Another successful maker evening! I was so busy that I forgot to take any photos, and I did not make a timelapse, so just a text report this week.

Tom brought his little walking robot, an updated version of Bob The Biped . Very nice little robot.

Stèph brought his Alphabot 2 robot, which he’s busy getting up and running. With some help from Tom, he managed to get it programmed, but there’s still some issues with the display etc, and he needs the correct batteries to get it to run.

Henré brought 2 projects: He has a nice electric guitar that needs some modifications, and he opened up his custom open source keyboard to see if there are any open pins on the controller that could be repurposed. Looks like there are 2 open digital pins, but not the hoped-for analogs. The guitar needs some routing to get the new parts in...

Li brought an old, rusted hand plane (Stanley 4, I think) and set about cleaning and restoring it. Some of the parts cleaned up nicely, but she still had a lot of work to do on the main body.

I got set up with the 3D printer, and made a print or 2. I had some trouble getting the prints to stick, as the bed height was not set up super-accurately. I tried some glue stick, and wow, that works. Had trouble getting the parts off the bed, even after it cooled down.

Reminders for next time: Take some photos!

Since next week Thursday is the last workday of the week, the next meetup will be in 2 weeks time.

Fri, 20 Apr 2018 00:00:00 +0200
http://johan.beyers.co.za/2018/04/14/damping_the_swinging_cutting_wire_in_my_vertical_hot_wire_cutter.html http://johan.beyers.co.za/2018/04/14/damping_the_swinging_cutting_wire_in_my_vertical_hot_wire_cutter.html <![CDATA[Damping the swinging cutting wire in my vertical hot wire cutter]]> Damping the swinging cutting wire in my vertical hot wire cutter

My 3D printer has a detachable x-y stage, which makes it very easy to create a hot wire cutter. In fact, that was the first thing I did when I got the x-y stage working. The cutter is very simple: I hang a rope from the roof, with the cutting wire (a steel guitar string) tied to it, and a 12V supply to heat up the guitar string. I added a weight at the bottom to keep the guitar string under tension and vertical. The x-y stage moves the wire horizontally in any shape I want, and I place the foam just below the x-y stage.

A video of this in action:

The only problem with this arrangement is that the wire swings back and forth when I move it, since it’s basically a heavy pendulum. These movements take a lot of time to die down, so I have to slow down the cutter a lot to avoid having wavy cut lines.

I thought that putting the weight in a tub of water would dampen the movement, but that is messy and does not provide great damping.

After seeing one of those videos with magnets falling slowly through a pipe, I had an idea: Why not use a magnetic eddy current brake?

The design is simple: I just attach a strong magnet (scavenged from an old harddrive) to the bottom of the hanging weight, and put a thick piece of aluminium below it on the floor. This works very well: Any swings in the weight is damped out within a few seconds, and it still allows the wire to move freely.

I uploaded a video of it here:

I’m really happy with the result. This means I now have a hot wire foam cutter added to my tools as well.

Sat, 14 Apr 2018 00:00:00 +0200
http://johan.beyers.co.za/2018/04/13/meetup_report_12_april_2018.html http://johan.beyers.co.za/2018/04/13/meetup_report_12_april_2018.html <![CDATA[Meetup report: 12 April 2018]]>

Meetup report: 12 April 2018

Discussing deep maker things

Yesterday evening I hosted a Maker evening in my garage. We had some good discussions and even worked a bit on projects! The garage door was wide open most of the evening, so people had no trouble finding us. Nice warm evening.

Timelapse of almost the whole thing here: https://youtu.be/rVXQBAnWsEs


Otto showed his very nifty 3D printer that folds up into an aluminium tool briefcase. He mentioned how much trouble he had getting the heated bed to work, since it’s a very specific smaller size. He first tried cutting down a heated bed circuit board and repairing/joining the cut pieces, which turned out to not work. Eventually, he built a heater out of nichrome wire with a 6mm aluminium bed that spreads the heat nicely. His mission for the evening was installing an inductive bed sensor. This required changing the firmware settings, which led him down a rabbit-hole of updating the Marlin version so that the newer Arduino IDE could compile it, and then figuring out what all the new settings needed to be. Not done, but good progress. Thanks to Luke for the tip about the older Marlin not compiling on the newer Arduino IDE.

Chris talked about his home automation efforts, getting his Raspberry Pi talking to his solar power inverter, as well as using a R600 gadget to measure water in his rainwater tanks. Interesting projects. Looks like home automation will be an ongoing theme, as I have some ideas for that as well. Otto has some entry control parts still to be done too.

Brad popped in for a short while, talking about the project to get kids in the Mitchell’s Plain area up and running on electronics projects. We mentioned Robotics Cape Town workshops as a great resource. We’re always willing to help too if anyone gets stuck. Very interesting project.

Luke talked about his latest 3D printer, an own design with linear rails, an H-bot xy top, and lasercut metal parts. Looks like an awesome machine. I’d like to see that in action, and also chat through the specifics of extruders and hotends. My 3D printer is due for an upgrade.

I had my pendulum wave set up and running, and managed to get the drawing machine to do one drawing before it refused to do anything else. That needs to be more robust.

I also managed to test a setup I thought of a while ago: When using the 3D printer xy stage as a vertical hanging hot wire cutter, the bottom of the hot wire swings around and causes ripples in the cut, since it’s basically a wire with a weight hanging free. I took a strong magnet, mounted it on the underside of the weight, and placed about 6mm of aluminium plate below it on the ground. The combination acts as an eddy current brake: It dampens the swinging of the weight very quickly and smoothly. This is a winner.

Lastly, I did get the 3D printer partly working. After a bit of oiling, the demo print (no extrusion, just the movement) works fine.


Next week, I’ll see if I can upgrade the firmware and OctoPi for the 3D printer and actually do some prints. I’m thinking of doing some sort of bed sensor too. I also want to put Home Assistant on a Pi and see if I can do anything with it.


That was fun. I’m going to continue doing this. Anyone is welcome.

I need to take photos. I have a timelapse of the whole evening, which turned out OK, but no closeup photos at all. Ah well....

Home Automation seems like a big interest of quite a few people in the group.

That’s it!

Fri, 13 Apr 2018 00:00:00 +0200
http://johan.beyers.co.za/2018/04/11/having_a_meetup_in_my_garage.html http://johan.beyers.co.za/2018/04/11/having_a_meetup_in_my_garage.html <![CDATA[Having a meetup in my garage]]> Having a meetup in my garage

I’ve decided to start holding makers meetups in my garage. I announced it on Facebook on the Arduino Cape Town group and on Zatech Slack. Here’s some info, copied from the announcement posts:

Initial announcement:

Calling all Makers in the Stellenbosch area! I have a double garage, a bunch of tools for mechanical and electronic making, and Thursday evenings dedicated to building interesting things. Bring your projects, get some help and inspiration, and make things! This will be free and really informal. I’ll provide tables, power and tools. Anyone with enthusiasm for making is welcome. First meetup is this coming Thursday 12 April, 6:30 pm. Please RSVP so that I know how much workspace to provide.

Based on the questions I got, I added some more info:

This will be a regular thing, almost every Thursday. I will be tinkering then, even if no-one else arrives.

Anyone is welcome, beginner to pro.

You don’t have to bring a project, you can come just to chat or get ideas for projects. I might have a spare Arduino or Raspi, some sensors or lights, and breadboards available if you want to mess around with that, but no guarantees. Might be useful to bring your own laptop, even if you don’t have a project, so you can start researching one :)

Just to get the conversations started, I’ll probably have my pendulum wave set up and also will have the new, improved drawing machine with Jupyter notebook control set up. And the 3D printer, of course.

I have free wifi with 10Mbps uncapped ADSL.

If you want anything to eat or drink, you have to bring it yourself.

Bring warm clothes, the garage might be cold.

I have some parts and raw materials, which you are welcome to use within reason. This includes a bunch of scavenged motors and magnets from printers and harddrives, Solar cells from old garden lights, lots of foam, and random electronic parts.

I have a soldering station, drill press, small semi-working lathe and lots of hand powertools, mostly woodworking. Also a 3D printer, if I can get it to work.

My goal for this week is getting the 3D printer set up and working and getting the place in shape so that everything is accessible.

This is NOT the makerspace that the engineering students are setting up at the Launchlab. I’m planning on joining that and helping too, but this is just something I want to start and see where it leads to.

Wed, 11 Apr 2018 00:00:00 +0200
http://johan.beyers.co.za/2017/10/06/building_a_speedometer_for_my_dog.html http://johan.beyers.co.za/2017/10/06/building_a_speedometer_for_my_dog.html <![CDATA[Building a Speedometer for my Dog]]> Building a Speedometer for my Dog

TL;DR: I built a Persistence of Vision speed indicator for my dog, using an Arduino, a few LEDs and resistors, and less than 40 lines of code. This is the story of the process and results.

The beginning

I’ve had an arduino for ages, but didn’t really have a project that I wanted to build. Then, at the end of 2012, I had an idea: Why not build something interesting and a little bit crazy? Thus, the dog speedometer was born.

Pippi being enthusiastic about squirrels

Our dog, Pippi, a Jack Russell of sorts, is always brimming over with enthusiasm and happiness. One day, watching her tearing through the garden, I started thinking about how to measure how fast she runs.

There are many ways to measure speed, but I wanted something very simple with a visual indication. I’ve always liked Persistence Of Vision displays, and thought that showing her speed using a POV display would be cool. Since a POV display has to be attached to something that’s moving, it would work well if the display could show how fast it’s going.

The idea

I’m always looking for ways to get functionality out of the minimum amount of hardware, so options like gps and inertial measurement were right out.

Slowly the idea formed that the display itself could be the speed measurement.

Hi spelled out in sweeties in a POV way

A POV display works by moving a line of LEDs and lighting them up with exact timings so that they leave an after-image in your sight. The stop-motion example above shows the white line of sweets representing the LEDs and the blue ones showing the after-image if they are lit up in sequence.

Since it’s a POV display, could I skew the line of leds and time the signals so that they only line up at specific speeds?

Same light sequence, different speeds

This stop-motion sequence shows the basic idea: Skew the line of LEDs to an arrow shape. All the arrows are flashing the same pattern with the same timing, but they are moving at different speeds. The middle line is moving at a speed that results in a perfectly straight line. The top line is moving at half that speed, and the bottom line is moving at 1.5x the speed.


There was a regular weekly maker meetup at the local university. At one of these nights, I implemented a simple version of the board to demonstrate the idea.

Breadboard build

The initial build was very crude, built on a breadboard.

Google is a great calculator

I programmed it to show the numbers 1-9 in sequence. Each number is shown at a slightly different rate, so that the undistorted number would be the speed I was moving at. Breadboard spacing is 1/10th of an inch and the LEDs are placed 2 holes apart, so an 18ms delay is roughly equivalent to 1 km/h.

# The binary sequence to output to the port for each number.

byte one[] = {B0, B10001, B1010, B100, B0};
byte two[] = {B10001, B10011, B10101, B01100, B100};
byte three[] = {B100, B100, B10101, B11011, B10001};
byte four[] = {B100, B1100, B10100, B1010, B10001};
byte five[] = {B10001, B11001, B10101, B110, B100};
byte six[] = {B100, B1110, B10101, B10011, B10001};
byte seven[] = {B0, B0, B10100, B11010, B10001};
byte eight[] = {B100, B1110, B10101, B11011, B10001};
byte nine[] = {B100, B1100, B10101, B11011, B10001};
byte zero[] = {B100, B1010, B10101, B11011, B10001};

int i = 0;

# Prep the output port

void setup() {
  DDRD = 0xff;

void loop() {

  # One is shown at 18ms delay.

  for (i=0; i<5; i++) {
    PORTD = one[i];

  # Two is shown at 9ms delay.

  for (i=0; i<5; i++) {
    PORTD = two[i];

# ------------------- etc.

The program above is shortened for clarity. Note that those binary sequences are the reversed ones (see the inverted arrow of the next build).

Walking at different speeds in a corridor

I took it out to a dark corridor and did a few tests. I walked along at different speeds, with the result showing in the separate lines. The top one shows a faster walk.

Note that in all these lines, the flashing sequence is exactly the same. What you see depends on the walking speed.

Also, at this point I did not know about the Arduino microseconds timer, so it was all milliseconds.

More permanent build

Having proved that it worked in principle, it was time for a bit more robust build.

Some things I noticed from the test build:

  • The arrow idea works, but it points the wrong way. I would like the skewing to point towards the correct value, not away from it.
  • The arrow shape needs to be more pronounced, otherwise the result is very skewed in the slow direction, but almost straight in the fast direction.
  • Since a slow speed indication takes up a lot of space, it’s best to pick a range of expected speeds so that the slowest speed does not take up several meters to render.

For the final run I chose a speed range of 10 to 30 km/h. Showing every value in that range would also take up too much space, so I picked a simple scheme: I would show a vertical line representing 10km/h, the number 15 to represent 15km/h, another vertical line for 20km/h, 25km/h as a number, and a line for 30km/h.

It should look something like this:

1 15 1 25 1

(but skewed, of course)

Business end of the board

The build itself was done on a simple piece of veroboard. The hole spacing is 1/10th inch, and the build is simple enough for an out-of-practice solderer like me. The button is actually not needed.

Soldering horror

If the veroboard build uses only a few pins, you can leave out the weirdly-spaced ones on the one row of the Arduino, so you don’t even have to bend any pins.

I have larger photos and v2 code up on github:


Test run

She did not like this

Pippi was not crazy about wearing the harness. We had real trouble getting her to run while wearing it.

Going for a run

Success! Running at about 20 km/h.


  • It works! You can get a good speed indication to within 1 km/h.
  • You need a camera to really see the result clearly. The speed shown is too slow for a good POV effect.
  • If you want to use a normal camera, you have to shoot in low light so you get a long exposure. I used CHDK on a Canon camera to get a long enough exposure.
  • Obviously, this only works with an object moving from left to right.
  • It should work well on bicycles, rc cars, drones and merry-go-rounds.
  • Less than 40 lines of code in total. This is a really simple project.


I made a demo video of the speedo in action. Not on the dog, but on a special rig I built to show the principle.


I had planned to do a custom board design and some other refinements, but I got distracted with some other projects. I may still do this.

Fri, 06 Oct 2017 00:00:00 +0200
http://johan.beyers.co.za/2014/10/22/impressions_of_beijing.html http://johan.beyers.co.za/2014/10/22/impressions_of_beijing.html <![CDATA[Impressions of Beijing]]> Impressions of Beijing

Our family went on a 10-day trip to Beijing at the beginning of October. I won’t give a blow-by-blow account, just note some of my impressions.

We were invited by Astrid’s parents, and stayed with them. Her father is a guest professor at the Beijing Forestry University for a few months each year. While we did all the touristy things, we had a chance to experience some aspects of Beijing city life that the typical short-term tourist does not see.

Since we stayed in Beijing except for an outing to the Great Wall, our experience is limited, so these impressions should be taken in that context.


The first few days we had good weather. Since it was their National Day Golden Week holiday, most of the factories were closed or not running at full capacity.

Towards the end of our stay, we saw how bad the pollution could be. Levels reached heights that only happen once or twice a year. The smog was so bad that most people wore masks. Apparently the masks do not help much. Visibility was down to 50-100 meters, and the sun looked like a red, angry moon.

The Chinese are very aware of the problem, and in conversations I got the idea that they consider cycling, electric bikes and public transportation as a duty to lessen it. However, this fact alone would deter me from spending a large amount of time in big Chinese cities.


On the streets, I was immediately struck by the amount of electric bicycles, mopeds and cargo trikes. Maybe one out of several thousand mopeds are powered by internal combustion. The cargo trikes, being mostly older and probably used for a much larger part of the day, were mostly non-electric. There were also a lot of electrified bicycles, consisting of a lengthened frame with space for a battery pack and an extra seat at the back. The battery packs are removable and are plugged into mains power for charging. Altogether a great system.

Cycling is also big, helped by the fact that Beijing is pretty flat. The underground is fast and cheap (2 yuan per trip irrespective of distance), so pretty full.

Cars are only allowed on the road on alternative days, determined according to the number plate. Apparently rich people have 2 cars to enable them to drive any day.

The traffic is chaotic. People push in front of you whenever they can, and give way easily. This actually results in remarkably smooth-flowing traffic, since it’s all predictable: There is no hesitation, trying to figure out what the other person will do: They will take any gap, without hesitation. The cars, bicycles and people intermingle and flow.


I found the chinese people very friendly, and very curious. The fact that Caucasian people are a relative rarity, and that we were generally the tallest people in the room, probably contributed to that. People asked us where we came from, asked to pose with us for photos (mostly with my daughters), and were clearly curious.

We spent one Friday evening at the Renmin University English corner, where people come to practice their english. We were questioned about our lifestyle (do we have cars?), animals (We are from Africa, after all), and on our impressions of China. Seems that the people are very proud of their country, with a strong desire to grow China as well as themselves.

Workdays are long, and many people work 6 or 7 days a week.


We ate many things, a lot of which I could not identify. Staple is rice, with usually some stew over it. There is a lot of mushrooms and tofu, and some vegetables. We actually had donkey meat once.

The custom seems to be to have enormous amounts of food. Several times I could not finish a meal, even a takeaway, and this is something that happens very seldom to me. On the occasions we were invited to a meal by Chinese people, we generally managed to eat at most half of the food on the table. This is a cultural thing: Eating all the food implies that the host is stingy...

Food in general was cheap, except for Western fast food. Coffee is hideously expensive.

Although we had stir-fried food on occasion, I got the impression that food is mostly boiled or steamed, with very little of the panfried tastes that westerners are used to.

We never saw any seasoning like salt and pepper anywhere. The food usually comes with a sauce, which is spicy/tasty enough. I did miss the pepper on fried egg, though.

I think that the food has a lot less fat than Western food. The Chinese are generally slim, and the only dangerously obese people I saw were Western tourists.


This is not a priority. From conversations I gathered that the concept of excercise for health is very foreign to the Chinese people.

On the other hand, a lot of people use public transport or cycle, which leads to a minimum of physical activity much higher than a car-bound western lifestyle. Maybe this is another reason you don’t see fat people.

Culture and history

This was simply astounding. It is weirdly different to the feeling you get in Europe. In Europe, you see various churches and cathedrals, in all kinds of different styles that indicates their relative ages.

In China, I was struck by how similar all the palaces and temples were. This starts to feel boring for a while, until you realise the implication: These people had a very consistent culture and way of doing things for a long, long time. It seems like their history is a lot more cohesive than western history, which makes you realise that the current communist government is a mere blip in their history.


Of course, China can be a shopping experience of note. Since I’m not into many of the typical wares available, I found the shopping not as enjoyable as I would have liked. I think it helps in bargaining to know some Mandarin.


This was a fascinating trip. We saw, did and experienced so much, and came back enriched by the experience. Seeing a different culture and way of life both broadens my perspective on my own life, and makes me very glad to be living where I do.

Wed, 22 Oct 2014 00:00:00 +0200
http://johan.beyers.co.za/2014/09/26/using_pocket.html http://johan.beyers.co.za/2014/09/26/using_pocket.html <![CDATA[Using Pocket]]> Using Pocket

I’ve been using Pocket (formerly Readitlater) for a few years now, and I find it indispensable. It’s simple and fits easily into the way I handle links.

Bookmarking and baggage

Putting bookmarks into a browser bookmarking hierarchy is the digital equivalent of hoarding. I never go back to the bookmarks, so they just become a mental burden. Every few years, I move to a different browser and either lose all the bookmarks, or copy them over, never to be looked at again. When I started my Pocket system, I imported 1600 links into pocket, many of which were not active anymore, and most of which I could not even remember having added.

So what about other online bookmarking services? While they are more portable, they suffer from the same basic problem: I never go back, they are cumbersome to organise and they require me to categorise.

Enter Pocket

Pocket has a few advantages compared to other systems:

  • It’s designed around a single stream of information, organised by the date you place the link into Pocket.
  • It has browser plugins and Android actions.
  • It has offline readers for Android and iOS.
  • It has an API, so I can get access to my queue from scripts.

Getting stuff in

I have 2 ways to get info into pocket: Sharing from my phone and saving from the browser.

On my phone I usually save items directly from my twitter feed. Pocket places a sharing option on the Android context menu, so I can save tweets with links directly from my timeline. The only problem I have with this is the case where a tweet has 2 links. Pocket then only saves the first one.

In my browsers on my computer I have the Pocket addons, so I just hit the button to save a page for later viewing. Firefox is really nice here: The tab closes automatically when I save a page to Pocket, so it’s a quick one-click operation.

The thing to note here is that I don’t do any filtering or categorising when putting content into the list. If I might want to look at something later, it goes into the list. Takes less than a second.

Getting stuff out

If I only used Pocket as a general reading list, it would have been OK, but I would sit with the same problem: Too many links, neglected and forgotten. Instead, I have a system that automatically recycles the links, courtesy of some scripts I set up:

Every day, some time after 5pm, my browser automatically opens between 10 and 20 links from my Pocket queue. These are the oldest links in the queue. I then have some choices:

If I don’t want to spend time on these links, I just close the tabs quickly. This keeps the links and they will re-open the next day.

If I have time, I read through them. The plugin automatically removes them from Pocket if I view a tab for more than 5 seconds.

If I want to keep the link around for a while, I just push it back into Pocket. This puts it back into the queue as a new link, so I’ll only see it when it comes round again.

The end result

Using this system, I cycle through the full queue roughly every two to three weeks. It blocks out time for reading them, and is not distracting at any other time. I can confidently just push things into Pocket and forget about them, knowing that I’ll get around to them soon.

Since the Pocket list is searchable, I can refer back to items on it if I recall something that piqued my interest recently.

An interesting side effect is the serendipity of random connections: Every so often I see a link that triggers some insight, just at the right time. It’s a bit like putting your music on shuffle and listening to a song that randomly captures the exact mood.

Fri, 26 Sep 2014 00:00:00 +0200
http://johan.beyers.co.za/2014/09/21/a_trick_to_autonumber_in_zpt.html http://johan.beyers.co.za/2014/09/21/a_trick_to_autonumber_in_zpt.html <![CDATA[A trick to autonumber in ZPT]]> A trick to autonumber in ZPT

I had an interesting issue a few months ago. I was doing some work where I needed to create a pdf from a template. This was a numbered legal document with optional clauses. The problem is this:

How do you make some clauses conditional, but then autonumber the rest?

Normally, you would hardcode clause numbers into the paragraphs, but if you did that, the paragraphs following on the optional ones would be incorrectly numbered.

My coworker came up with the idea of using python’s ‘next’ functionality to just increment an iterator. I was skeptical, since I did not think of a page template as an environment where python objects would be able to keep state outside of tal statements. I was wrong.

The final solution is remarkably simple. In this case, the numbers for the first 20 clauses were hardcoded. We start off with a tal statement to get an iterator:

<body tal:define=”clause_numbers python:iter(range(21,28));”>

This allows you to number up to clause 27.

In each clause, just do the following:

<span tal:content=”python:clause_numbers.next();”></span>

and it works!

In retrospect, this does make sense, since the template is backed by persistent code objects, so an iterator should do the job.

Sun, 21 Sep 2014 00:00:00 +0200
http://johan.beyers.co.za/2013/09/24/configuration_tools__a_few_thoughts.html http://johan.beyers.co.za/2013/09/24/configuration_tools__a_few_thoughts.html <![CDATA[Configuration tools: A few thoughts]]> Configuration tools: A few thoughts

I just found a post in my drafts folder, summing up my thoughts about CM (Configuration Management) tools from a little under a year ago. Since then, I’ve started using Ansible to set up servers. I’m still not fully converted, but I find Ansible a very useful tool. I have 7 active machines at home, and running my update scripts on each of those is a pain. Ansible makes it a lot easier.


Tue, 24 Sep 2013 00:00:00 +0200
http://johan.beyers.co.za/2013/01/26/setting_up_a_simple_smtp_server_for_testing.html http://johan.beyers.co.za/2013/01/26/setting_up_a_simple_smtp_server_for_testing.html <![CDATA[Setting up a simple smtp server for testing]]> Setting up a simple smtp server for testing

On many websites, there is a need for sending mail from the webserver. While testing, it’s sometimes painful to get a working smtp server to test this.

I’ve used this script for a while now, since it’s the simplest way to get a mailserver running. It will accept any smtp connection and print the mail to the terminal where you started it from.

The script:

import smtpd, asyncore
print 'Mailserver is on port 8025. Press ctrl-c to stop.'
server = smtpd.DebuggingServer(('localhost', 8025), None)

Place those four lines into a python file (I used dummymailserver.py) and then run the python file:

python dummymailserver.py

And you’re done!

Sat, 26 Jan 2013 00:00:00 +0200
http://johan.beyers.co.za/2012/10/21/plone_conference__a_great_experience.html http://johan.beyers.co.za/2012/10/21/plone_conference__a_great_experience.html <![CDATA[Plone Conference: A great experience]]> Plone Conference: A great experience

I went to the Plone Conf 2012 in October. This was my first Plone conference, although I’ve been working on Plone since 2006. The conference was from Wednesday 10 to Friday 12 October in Arnhem in the Netherlands. I also stayed for the coding sprint on the 13th and 14th.

TL;DR: The conference was awesome. I had an incredible time, learned a lot and came back energised and enthusiastic about contributing to Plone and the community.


Sun, 21 Oct 2012 00:00:00 +0200
http://johan.beyers.co.za/2012/09/28/100_words.html http://johan.beyers.co.za/2012/09/28/100_words.html <![CDATA[100 Words]]> 100 Words

100 words each day. That’s the goal.

I have almost started a blog for a few years now. I get going with a post, and then the impetus to finish just kind of peters out.

So I’ve decided to take another tack: Just write consistently each day.


Fri, 28 Sep 2012 00:00:00 +0200
http://johan.beyers.co.za/2012/09/23/using_fabric_to_manage_your_deployments.html http://johan.beyers.co.za/2012/09/23/using_fabric_to_manage_your_deployments.html <![CDATA[Using Fabric to manage your deployments]]> Using Fabric to manage your deployments

I’m using Fabric very successfully to manage deployments of projects on my servers. Fabric is simple enough that it does not add extra layers of complexity to the setup, and easy enough to use that it makes deployments easy and much less error-prone. This blogpost is an updated and expanded version of a presentation that I did at the local Plone users group.


Sun, 23 Sep 2012 00:00:00 +0200
http://johan.beyers.co.za/2012/08/23/polycaprolactone__wonderful_stuff.html http://johan.beyers.co.za/2012/08/23/polycaprolactone__wonderful_stuff.html <![CDATA[Polycaprolactone: Wonderful stuff]]> Polycaprolactone: Wonderful stuff

I recently got my hands on some polycaprolactone, and I’m really enjoying playing with it. It is one of the most useful materials I’ve seen in a long time.

This is a summary of a talk I gave at #HackSTB on 21 August.


Thu, 23 Aug 2012 00:00:00 +0200
http://johan.beyers.co.za/2012/07/26/hello_world_.html http://johan.beyers.co.za/2012/07/26/hello_world_.html <![CDATA[Hello World!]]> Hello World!

Well, first post. Let’s see what develops...

Thu, 26 Jul 2012 00:00:00 +0200