Insert data into a VARCHAR field using NDB API: a solution

You are using MySQL Cluster and crazy enough to digest NDB API? Sick of SQL? Here’s a treat: a function to make C/C++ strings ready for inserting into a VARCHAR field. The special thing about them is that the length is prefixed in the first 2 bytes. void make_ndb_varchar(char *buffer, char *str) { int len = strlen(str); int hlen = (len > 255) ? 2 : 1; buffer[0] = len & 0xff; if( len > 255 ) buffer[1] = (len / 256); strcpy(buffer+hlen, str); } Yes, you can use memcpy.

A new dutch word? 'avonkuren'

Day in, day out, I speak, read, write, love, in English. My mother tongue, however, is Dutch (not Flemish spit). Today, I was finalizing the handwritten letter to my grandmother and reading up a message from my sister, I came up with a new Dutch word. Oh, it might already exist, but Google doesn’t know about it yet (unless for the typos). avonkuren: avonturen + kuren .. doing crazy stuff while going through life

A reason for these weird product or website names..

You’ve see them, those product/website names meaning nothing but making millions. Names which seem to come from stupid teenagers writing short messages on their phones.. Today I figured out a possible reason why we have such names. I’m brainstorming a new project and came up with a good name to brand it. The problem? Assholes have parked any combination of the name for most top domains out there. There you go: a good idea down the drain.

There are only bad habits

Vacation, and the mind is free. Then I scribble something, unleash it upon Earth where only a handful might read it: Stop for a moment And watch around Hush for a second And hear the sound Think of your past step And watch the road ahead Pick up a fight And try to flight Break your habits Stop living by one’s wits Take another curve And make some surf

How do you name the device found in your pocket?

Since a few decades, humanity got more and more cursed and/or blessed with a little device now fitting perfectly in a trousers’ pocket or womon’s purse. But how do you call it these days? Here are some possibilities which crossed my mind: Mobile GSM Handy (German) iPhone MP3 player Walkman PDA Alarm some kind of berry Book .. or.. Phone? I just read my first book using Amazon Kindle on my iPhone.