Turning the page

To put thoughts into words, and to share those words with you, the reader. Such is writing. Some people have no problem talking about ideas, but hand them a paper and pen and they are lost. There is something about writing that forces you to structure your thoughts, to make up for the lack of context provided by a conversation in person.

I want to become a better writer. To better share what I know, and better understand what I do not. So here I am, practising. Practice makes perfect, so they say, but there is a reason why I’ve been playing badminton off and on for a number of years now but still get my ass handed to me every time. I like playing badminton, but I certainly can’t say I’ve been practising.

I want to become a better writer. To think better. There is a reason why people pay for time to practice. Exchanging cash for focus sounds like a quick fix, a shortcut to mastery. I think there is something to it, but only if you are thinking about what you are doing and constantly reevaluating. Only if you are thinking about what you are writing.

Derek Sivers, founder of CDBaby and all round amazing guy has advice for TED speakers. Speak only about insightful things. Only talk about what brings value for the audience, because it’s not about you. On one hand, once you know something, it is hard to imagine how “not knowing” feels like, so what is valuable to your audience does not seem as valuable to you. The other side of the coin is when I’m the only person on the planet who might find how a specific configuration of parts on software causes a bug interesting.

And there is always the fear. The fear that stops me dead in my tracks. The fear that stops me from pushing the publish button. The fear that makes me pause, look at what I’ve written and say I can’t believe I wrote that and toss it in the graveyard of forgotten dreams.

I will write, and I will think about what I write. I will write regularly, and I will write for you, whoever you may be, whereever you are. There will be no room for fear, no time for hesitation. The audience await, the readers clamour for the souls of manuscripts pushing against the door of existence.

All that is left is to turn the page, to put pen to paper and make them real.

Tim Ferriss and Derek Sivers

I picked up a book called the 4-hour workweek when I was in the university, and although at the time I didn’t completely buy it, the book introduced me to Tim Ferriss, the author of the book and a fast-learner extraordinaire.

Every two years since then, I checked out where Tim is at. Just like a startup releasing better version of its app, Tim released more books, learned more languages (up to seven now), and best of all, started a podcast channel. His channel is called “The Tim Ferriss Podcast“, and I have been listening to it on a daily basis for a while.

Yesterday I found one wonderful episode in the podcast between Tim and Derek Sivers, a musician turned programmer, and a really nice wise guy (I meant that really in the nicest way possible!).

The episode is two hours long. Yes, it is long, I know. But if you are even remotely interested in some of the topics listed on the title of this podcast: “Developing Confidence, Finding Happiness, and Saying ‘No’ to Millions”, then you should find the time to listen to it.

The link to the podcast: http://fourhourworkweek.com/2015/12/14/derek-sivers-on-developing-confidence-finding-happiness-and-saying-no-to-millions/

Review: editing made easy

book cover

She owned a mixing bowl designed to please a cook with a round bottom.

Read the above sentence one more time, and try to make sense of its meaning. How can a cook has a round bottom, does it mean big bottom? Aha, it is the round bottom of a mixing bowl, not a cook’s. That is unclear. The phrases are ordered incorrectly, mixed up in its meaning and context, but it can easily be fixed by re-ordering and adding a comma: She owned a mixing bowl with a round bottom, designed to please a cook. There you go. For many, writing is already difficult, but editing is even harder. Fortunately with this book, Bruce Kaplan provides an easy-to-understand rules in common situations to edit and to improve your writing.

The table of content is below for you to peruse:

Why learn editing? the benefits for you
Lean and clean: what editors do
The golden rules: for professional writing and editing
Ruthless people: what makes a good editor?
Be active: avoiding the passive voice
Split personalities: beware the split infinitive
Time for action: turning nouns into verbs
Small and pesky: two words that slow the pace
Nuisance value: more overused words
Is that so? how to avoid that
Every which way: the difference between which and that
Short is beautiful: avoid long sentences
Briefly speaking: a guide to shorter, simpler words
Pronouns: how to avoid confusion
Feeling single, seeing plural: more tricky pronouns
Collective nouns: which verb form do I use?
Clichés: avoid them like the plague
The future that is to come: the tautology trap
Stating the obvious: first cousin to the tautology
There, there: a few little words we can do without
Putting on the style: be consistent
Punctuation: basic rules
Contractions: when, and when not, to use them
To quote or not to quote: direct and indirect speech
Tricky, tricky: serial or cereal?
The plurals trap: don't get caught
Under a spell: a handy guide to difficult words
Oops: the misplaced phrase
If only: be careful to say what you mean
Now, see here: look out for this common error
Kid stuff: avoid slang
Former, latter, last: how to keep order
Get to the point: how to write a news story
Heads, you win: how to write a headline
Editing checklist: a last round-up
Hot tips: things to remember
And finally: set your standards high
Resources: things to keep handy

My favourite section is ‘every which way’. It is a section that explains the difference between which and that. Which introduces a non-defining clause, where the information within it can be completely omitted from the sentence. For example: The car, which a teenager was driving, crashed into a post. In this sentence, the main information is that the car crashed, and the driver, incidentally happened to be a teenager.

On the other hand, that introduces a defining clause, where the information within the clause is essential to the meaning of the sentence. For example: The car that the teenager was driving crashed into a post. In this case, the main information includes the fact that a teenager drove the car. If you are not sure whether to use which or that, Kaplan advises to always use that.

Another favourite section of mine is the ‘two words that slow the pace’. According to Kaplan, the words of the are not needed. Rather than writing the manager of the bank, I should write the bank manager. Another example, rather than the owner of the horse, I should write the horse’s owner. Brilliant! It is more succinct, easier to read and more pleasing to the eye.

I finished reading the book within an hour, it is a short book, and it can easily be skimmed, and you will find loads of hidden treasure as you do. Later, I plan to at least gloss over this book every time I need to edit my own writing, it makes it so much easier to do, almost like priming my brain to by having a checklist for editing. Editing made easy, indeed.

Thank you Bruce Kaplan.

Would you snow please?

When the sound of the gusting wind woke me up at 1 am this morning, I sat up in bed. I couldn’t sleep anymore; the noise was intolerable, like the constant sound of waves hitting a beach. On and on, with no end in sight. My memory traveled back to when we visited a small boutique hotel on the waterfront of Curaçao, where I heard the same rhythm, except now I was in my own flat, 14 stories above sea level.

I looked outside the window, hoping for something interesting. Farsta train station shone brightly. A train left the platform, illuminating its surroundings briefly with the warm, soft, fluorescent light of its windows. As it faded in the distance, dullness returned: an empty car park, empty roads, and dark apartment blocks. Everyone was asleep except me.

I wished it would snow, like last week. The snow didn’t stay, but I was hooked for hours by the window watching the beautiful snow flakes as they fell, as they melted away to nothingness when they touched the road. In May when we moved in, the sales brochure had painted a tantalising picture of how the scenery would look like in winter. The trees were all white, filling up spaces where the roads were absent. On the horizon, there were two gleaming frozen lakes, inviting me to visit. A lovely backdrop that we had fallen in love with.

I have never missed a Christmas in Sweden. Every Christmas for the last three years, I have chosen to be in Stockholm, but every year I have never received a white Christmas. I hate January and February for their abundance of snow, because snow should only appear in December. As a former southern hemisphere inhabitant from Australia, that was what we were missing with our Christmas, we were told. We had the delicious ham, the hearty roast and the bountiful presents, but the Europeans told us, “it’s never the same, because it’s not a white Christmas”. Bloody hell, I am in one of the coldest countries on earth but where is my white Christmas?

The morning came and I walked out of my apartment. The path I usually walked on had turned into a slippery slope, buried deep in snow. I called out for Min’an to take a look, and soon after he came with a red snow sleigh. Very unlike him, I thought. He never fancied the white stuff. Nevertheless we rode the sleigh on the slope, woo hoo! It was only for a short time but it felt satisfyingly triumphant when we reached the bottom. I had not done that in my life ever, I thought.

And I was right – I still had not done that yet in my life. Because it was just a dream. I woke up and sat up in bed again, this time at 3.36 am, just about two hours later. The wind was still howling like wolves. I slumped back to bed, struggling to sleep with all my might.

Would you snow please, Stockholm?

Stuck in Stockholm

The second quarter for 2015 just ended and it’s been pretty chock full for us. After an unsuccessful attempt to get to London we’ve decided to stay in Stockholm for the next few years!

Fresh off the boat

Apart from some certainty about where we’ll be six months from now (we really didn’t know at the beginning of Q2!), it also means we can make some concrete decisions about where we’re staying and working on. There’s no avoiding the winters, but at least it’s sunny outside for now.

Sunny weather outside!

Now that we’ve been in Stockholm for just over 2 years, and likely a few more, we might as well make better use of it. Inspired by Eat your Kimchi, we’re starting a small side blog to write up some of our experiences in Stockholm. Something we’ve affectionately titled Stuck in Stockholm.

Getting to know the people and the places here has not always been a walk in the park, and we’d like to share some of our experiences navigating the foreign landscape that is Stockholm.

This is for you, the new migrant stepping off the boat, ready for danger at any turn. Whether for work, for education, or more commonly as it turns out, for love, you’re ready to roll up your sleeves and do the hard yards to call yourself a resident of the land… at least for a few months.

Check it out, comments are welcome with more posts to come.

We’ve also got our own spot now, so if any of you are passing by Stockholm you’ve got a bed in this part of the world. Here’s a shot of the living room.

Our new living room
Not the most creative bunch as you can tell 😉 Not only does it look uncannily similar to our place in Sydney, it’s even filled with the same things!

Board games
To be fair, they aren’t the same set of games but they will be after our next trip down under.

On the topic of board games, we’ve also put our small boardgame scanning app Gamenauts on the app store, play store, amazon store and more to come. Don’t even get me started on the horrigible release and approval process…or the horrors of how much of a cut they take. >:(

Gamenauts

Much learning here, we’ve actually had the app out on the Google Play store for a while now, but it’s only after Marty spammed a bunch of board game groups on Google+ that we started seeing a spike in numbers.

It’s still a modest number of downloads, and even less in actual revenue. Let’s just say it isn’t enough to cover a decent meal here in Stockholm, but the upward gradient has been steeper than anything we’ve had so far. It’s also hard to describe the feeling you get when you see someone else writing about you, in a different language no less!

I’m going to cut the shameless hawking here and spare you the agony. There’ve been a few more things we’ve been up to though, so stay tuned!

The revival of an old hobby

My phone broke again this morning. It wouldn’t turn on. And this was not the first time it had happened. Minch had to replace the battery just one month ago, and I waited for two weeks for the battery to come, all while using a replacement mobile.

I thought getting home from work would be the most boring ride today. What would I do? My laptop was useless without the internet, which I relied upon my phone to access. As I arrived on the platform, I missed my train, just. The next train to go home was in three minutes.

So, I found a place to sit down and started drawing to kill time. I drew a lot last year, but this year not so much, not sure why. Maybe the negativity I suffered at work has started to affect me long-term. I was drawn to the garbage bin on the platform. It was an easy pick, cylindrical shape at the top, cylindrical shape at the bottom, connected by a rectangular block. Before I knew it, the train had arrived. I hurried into the train and I continued my drawing, this time with different target objects. Everyone is very interesting when you look at them closely.

Garbage bin

Then I heard it, “Enskede Gård”.
I looked out of the window, the announcement lady wasn’t lying, it was the Enskede Gård station.
“Shit”. I hopped out of the train immediately.
I had taken the wrong train. Thanks to the garbage bin I drew. I cursed myself. I had to take a train two stations back to take the correct train. Bah, the returning train would only be there for another eight minutes. Eight minutes! I thought I would be home by now.

I glanced over the railways to the scenery of residential houses around the station. There were lots of apartment blocks, with plenty of greenery surrounding them. I gathered my attention to a park nearby, looking for shapes I could easily draw. My next target object was a playhouse for children next to the sandpit. Drawing the shapes took me just several minutes, and that times goes by very fast, I love it, I was in the zone. I forgot about anything else, and it’s such a distant feeling. I feelit sometimes when I write, but never as intense as when I draw. After I finished, I re-drew the playhouse, this time in just two minutes. This was today’s deliberate practice.

Playhouse

The train carried me back to the connecting station, only for me to miss another train in the right direction to get home. But this time rather than sighing, I knew the drill. I took my pencil out and I drew another target object. The lady was sitting in the waiting area and her jeans had a huge hole that exposed her knee. I was worried that she would think I was creepy, looking at her legs rather intently.

Before I knew it, the right train arrived, and I got home. I had spent a good 40 minutes getting lost on the metro, though it felt really quick.

Minch fixed my phone and by the next day I was back in action without a hitch. Using the internet during the train journey was not going to be a problem anymore, but I will certainly be drawing more often instead.

Last drawing

CS0234: The type or namespace name ‘System’ does not exist in the namespace ‘Windows.’ when running Cordova for WP8

All this cryptic error messages really says is…use the 64 bit version of Windows, not the 32 bit as the cordova docs suggest.

As a tip to prevent much pain, suffering and tears, the Windows Phone emulator will NOT run in in a nested virtualisation environment, at least not when I tried it on Virtualbox. e.g. it won’t run on a mac running Virtualbox containing Windows.

Bootcamp or something similar is probably your best bet for running it on a mac. Or a windows phone device, though Parallels users might have better luck.

Simplest event system you can use with React.js

A common scenario when dealing with React is inter-component communication, particularly when the components do not share a parent child relationship.

For example, consider the case of a context-dependent header bar action that affects the main content window.

<Layout>  
    <AppBar />
    <Content />
</Layout>  

Arguably, there are a number of alternative solutions such as providing a callback to the AppBar, and propogate back down to the content (you can invoke component methods directly via a ref), but we’ll focus on the non parent-child case mentioned in the official docs.

It turns out that if you’re using browserify you already have access to an implementation of NodeJS events, so emit away.

// eventService.js
'use strict';

var events = require('events');  
var eventEmitter = new events.EventEmitter();

module.exports = eventEmitter;  
var bus = require('./eventService');

...
// caller
handleAction: function(arg) {  
  bus.emit('addCard', arg);
}

// receiver
componentDidMount: function() {  
  bus.on('addCard', this.addCard);
}

Closing popovers in Ratchet

Ratchet is a css/js library for prototyping iOS apps. Maintained by Twitter, it looks similar to its more established older brother Bootstrap but is much less mature and has an anemic API.

Simple things like closing its popovers don’t seem to exist. If you need to do this, digging into the source reveals

element.addEventListener('touchend', function () {  
      popover.addEventListener('webkitTransitionEnd', onPopoverHidden);
      popover.classList.remove('visible');
      popover.parentNode.removeChild(backdrop);
});

for the popover backdrop, so doing something like

var backdrop = document.querySelector('div.backdrop');  
if (backdrop) {  
  // sad there's not real way to close this
  // https://github.com/twbs/ratchet/issues/625
  var evt = document.createEvent('TouchEvent');
  evt.initUIEvent('touchend', true, true);
  evt.target = backdrop;
  backdrop.dispatchEvent(evt);
}

to dispatch the touch event was sufficient for my purposes.

See https://github.com/twbs/ratchet/issues/625 for a short discussion on this.

Uncaught Error: DATA_CLONE_ERR: DOM Exception 25

If you’re using IndexedDB in Chrome and getting this exception, AND you’re not using web workers like this StackOverflow question, you might have members of type Functions on the object you’re saving.

See MDN’s article on structured clones for more info on what’s allowed. Also worth noting are that prototype chains and property features are not cloned.

Hope this helps 🙂