Quivers, RSVP and the Singaplogosphere

This will be one of those writings with no particular direction. Feel free to go read something else that might be more interesting, like the stock market or something.

Archery, Bows and Clairvoyance

I’ve always found bows in RPGs kind of … quaint. It feels to be one of the flimsiest weapons available. It’s practically useless in close combat. And you need two components for it to work, the bow itself and arrows.

It works great for long ranged attacks though. It also brings with it other factors to consider. Wind speed, speed and direction (or velocity for the physics-inclined) of a moving target and angle of trajectory.

You also need to keep in mind the number of arrows you have at hand. I’m so afraid of running out of arrows in games that sometimes, I don’t shoot them at all. I would save them for more important battles, such as boss fights. Of course, the character was usually physically weak (like Rosa in Final Fantasy IV), so the character ends up using other skills like magic to wreak havoc. And I ended up with a lot more arrows than I expected.

There are also different types of arrows in the games. Like fire-based ones for fighting yetis, snowmen and other fire-fearing enemies. Or lightning-charged ones for fighting water monsters.

I too have different types of arrows and I keep them in separate quivers. There’s the quiver of mathematics, quiver of programming and I usually shoot arrows from my quiver of curiosita.

I encountered this term curiosita from the book How to Think Like Leonardo da Vinci by Michael Gelb. The author defines it as

An insatiably curious approach to life and an unrelenting quest for continuous learning.

That might explain my fascination with puzzles recently, such as the one on digital clocks and the math puzzle in a game.

The thing is, I feel like I’m shooting all those arrows into the future, and hoping that when it’s the present, someone, like me, and hopefully you, will find these articles useful, interesting, thought-provoking and preferably funny and downright entertaining too. I don’t always hit the target. I just try very hard to be on the mark.

So I could use some help here. If you have anything you want to talk about, math or programming or even general fun stuff to think about, send them to me and I’ll write something on it. Like puzzles. I love puzzles. Not too hard though… Oh what the heck. Send them to me anyway (original ones please, or cite their source.). I need to look publicly foolish once in a while, trying vainly to solve a puzzle or write on a subject … and failing. Humility’s good for the soul, I’ve heard.

Which brings me to…

Repondez s’il vous plait

I left all the accents alone. R.S.V.P. is short form of a French phrase that means “please respond”. I’d love to hear something from you. In fact, I’m so desperate, I’d love to hear anything from you.

My colleagues don’t really talk about programming very much. Unless they’re in trouble. Then they’d sometimes ask me for suggestions. So I don’t get a lot of intelligent conversation about programming. Not that my colleagues aren’t intelligent. Just nothing about programming. The weather, current affairs and how the latest corporate management rule is going to mess up our lives pretty much fills up our conversations.

By the time this article you’re reading is published, the material is probably about 18 hours old. By the time you actually read it, it’s probably about a day old. I use the scheduling feature of WordPress. Typically, I write the articles the night before and set them off to be published at 5pm the next day. That’s 5pm Singapore time, which is 8 hours ahead of UTC (+0800). That’s about 5am in the morning for America and 9am for United Kingdom.

I do my web site stuff at night, around 8pm to 12 midnight. So if I respond late to your comments and emails, it’s because of the time zone difference. But please feel free to talk to me. You will make a lonely programmer very happy.

You don’t even have to type out a comment or email if you don’t feel like it. Just think of it in your mind. I’ll receive it, because amongst my many talents, I’m also psychic. I’ve already received a few comments in this manner. They usually pertain to enlarging some male body part, so I ignore them. I might even have to set up an ethereal spam filter soon. Do you know of a service like this?

And I want to thank all the wonderful people who’ve commented here or emailed me. I’ve even got a notable visit from the eminent Raymond Chen from The Old New Thing. I jumped out of my chair when I saw his name. I kid you not.

The Singapore blogosphere

Because of my lacklustre attempt at reaching out to people in a geographically agnostic way, I’ve decided to see what I can do closer to home. My impression of the Singapore blogosphere or Singaplogosphere (you know, that’s actually quite cumbersome) is dominated by the technological, political and the personal genres.

I know it’s much more than that now. I found out about this event called Social Media Breakfast, Singapore version, and I attended its 3rd event. It was awesome! I met lots of wonderful people. Then I attended the 4th event (with the practical modification to brunch instead of breakfast. Singaporeans do not like waking up at the unearthly hour of 8am on a Saturday morning to attend an event). It was just as awesome!

Sadly, I didn’t find any programmers there. Everyone’s eyes glazed over when I mentioned math and programming in the same sentence. They’d probably glaze over even if I mentioned math or programming in its own sentence. But everyone’s passionate about something. They’re energetic, opinionated and generally nice people to be around with.

They are so friendly, they managed to get me into Facebook. Yeah, friend power! It’s also why I left Twitter and joined Plurk instead. I think social media sites mean nothing to you if you can’t find a way to have interesting conversations there, whether you invite all your friends or you make new ones.

With that, here are some of the interesting people I know:

  • Daryl Tay, a social media enthusiast and founder of Social Media Breakfast Singapore
  • Claudia, who is in love with her Nikon camera. Check out her spinning photos.
  • Tech65 on technology in general. Check out their podcasts.
  • Sheylara. She’s famous. Seriously. Her face is plastered all over the XBox poster ads in Singapore.
  • Darryl Kang (not to be confused with the Daryl above) or DK as he prefers to be known, had a recent aversion to McDonalds.
  • Krisandro, and his recent pwnage by a 2.21 metre giant.

And that’s that. Back to regular topics. And I’ve got a kicker coming up…

Light bulb at the brink

This is another one of my “lessons learnt from video games” article. The role playing game in question is Romancing Saga. To illustrate my point, I’m going to describe some of the game battle mechanics.

Brief gist of the game. You, the player, can control up to five characters. Characters can be recruited during game play. Characters can master a variety of weapons (such as the sword, broadsword, staff and even martial arts) and magic (one of my favourites is the “sunlight”. Simple, unassuming, cheerful and very anti-violence in name. Still does good damage too.).

Sunlight on lake with mountain background

The difference between Romancing Saga and other RPGs is the method of levelling up. Normal RPGs have an experience point system. The more monsters you kill, and the more vicious they are, the higher the experience points. Once you accumulate a particular number of experience points, you level up, where one or more of the following increases: strength, speed, intelligence, health points (reach 0 and it’s game over), magic points (for casting spells) and other kinds of character statistics.

Romancing Saga, on the other hand, has an incremental system. After every battle, there’s a possibility that one or more of the character’s statistics will increase. I’m going to focus on 2 particular stats, the WP and the JP. The WP determines how many weapon skills a character can unleash. The JP determines how many spells a character can cast. What do they stand for? I’ve only got a hunch. See image below.

Ji Shu kanji

The 2 Chinese characters, or kanji in Japanese, is pronounced “ji” and “shu” respectively (in Chinese). Their Japanese pronunciation are “wa za” and “jiu tsu” respectively. They refer loosely to technical skills and intellectual skills respectively. Can you see it now? Wa za points, or WP. Jiu tsu points, or JP.

I’m focusing on WP and JP because, along with HP (health points?), they fluctuate in battle, usually in the undesirable direction of down. And if you have a long series of battles ahead of you, you want your characters to start with as high a value for each as possible.

So I, uh, sometimes go bully some weaker monsters. I will start off my bullying spree by wasting every single point of WP and JP. Why? This could be some superstitious belief of mine, but I found that when I’ve got 0 WP and 0 JP, my characters seem to improve their base WP and JP more often.

It’s like the game felt that because I’ve got nothing left, I probably don’t have enough WP and JP to begin with, so rewards me with increases of base WP and JP. Then when I rest up (which I hardly ever do), I have higher base stats.

The light bulb

There’s another reason why I waste all my skill points away when I’m trying to level up. In Romancing Saga, you can learn new weapon skills right there in the heat of a battle. You could use a rapier to attack normally, and suddenly, a “kring” sounds, a light bulb appears, and your rapier wielder unleashes an elegant whip-like slice to the monster’s aorta, resulting in fantastic arterial spray (muahahaha). Or you could use a weapon skill, say a double slash, and you learn the next version, the triple slash. It is an awesome sight to behold when your characters are “kringing” left and right…

And… it seems that if you’ve got 0 WP, the light bulbs come a bit more often. It’s like the game senses you’ve got nothing left, and to help you continue the battles, it rewards you with new (and usually devastating) skills so you can vanquish the monsters and actually stay alive.

I love this light bulbing so much that when one of my characters master a weapon (no more skills of that weapon to learn), I switch weapons just so that character continues to “kring”. It’s that much fun.

The obscure kringer

In Romancing Saga 3, there’s this female character you can recruit. In the story, she’s very sick, and cannot leave her home for too long. She’s gentle and sweet and frail. When she joins your party, your first impression of her is that she’s strong in magic, but she’s too weak in other areas to function well. On an overall character evaluation, you might think she’s not a good addition to your party members.

That is probably what the game developers wanted you to believe.

You see, once you can actually get her to survive some battles, her JP starts shooting up. She can learn magic spells faster than anyone else. She can wipe out a group of monsters with a flick of her little finger. She can bring one of your characters back from the brink of death with her healing spell. As a powerful magic user, she’s unbeatable. Until she runs out of JP.

That’s when her secret comes out.

She, is the most prolific kringer I have ever had the pleasure of playing.

Give her a sword, and don’t think she might drop the piece of steel. She can learn up to 3 new skills in a single battle. That’s about an average of one new skill per attack in the entire battle. Not enough money to buy weapons? Start her on unarmed combat. She’ll master the mid level martial arts skills so fast you’d think she’s on steroids. And maybe because the game feels she’s too weak, and grants higher level skills to her. It’s just so amazing to watch.

Sure, her new skill doesn’t do a lot of damage compared to another character performing the same skill, since her strength isn’t high. But as battles go by, and her base stats go up, her polymath abilities to master both weapon skills and magic spells make her a compatible character to whatever group you have in mind.

And get this; her name is Muse.

So what’s the lesson?

You’re at your wit’s end at solving a problem, say finding that elusive bug that’s driving you crazy. Maybe you’re not really at your wit’s end? Give more, give everything you’ve got. Scrutinise every single line of code. Question every single for loop structure. Scan like an infrared sensor and inspect like a telescope.

And sometimes when you’re tired, your vision is blurry, your shoulders are slumped and you’ve got nothing left to give, your brain does something magical. A light bulb “krings”. Your brain presents you the simplest solution requiring the least amount of effort, because you’ve got nothing left.

You light bulbed at the brink.

Courting danger

I was on the brink of death. I forged on despite being woefully under-equipped. Every step I took meant a chance for the enemy to finish me off.

Taking a breather, I glanced at my supplies. “Not good.” I hissed. Safety was still some distance away. Adrenaline coursed through my body. My hands were shaking. I was starting to panic. I don’t even have the energy to retrace my steps. I can’t go forward, and I can’t go back. I’m stuck in the danger zone.

No, I’m not a secret agent. Nor a spy. Nor an explorer. I was playing a role playing game.

Monster genocide

In a role playing game (RPG), when you can’t proceed any further, there are a few common reasons

  • enemies too tough to defeat
  • didn’t do key story plot event
  • failure to solve puzzle

The first one is the most common, and also the easiest to solve. Just stay around the area and kill every enemy you can reasonably defeat. If you still get beaten, backtrack to a previous area where the enemies are weaker and start the bloodshed.

The idea is that either your character is still too weak, or your equipment is still of low quality. So you stay at an area to both strengthen your character (levelling up) and earn enough gold (or whatever game currency used) to buy better weapons and armour.

The thing is, some people carry this to the extreme. They refuse to proceed until they’ve bought all the best equipment they could buy. They refuse to proceed until they could bring down a monster with a touch of their finger.

“Die, die!”

In my earlier gaming years, I shunned such tactics. I wanted to get on with the story, and no measly monster was going to stop me, no matter how many horns or fangs or massive-damage-inflicting skill they had.

So my money management skills in RPGs was this: buy what I needed, then buy what I could. If something cost too much and thus too much time needed to earn the gold, I’d skip it.

What this meant was that every time I reached a new town and a new area, I’d be broke. I tested the waters around the area, and if I could get through a few battles without getting flattened, I was good to go.

What this also meant was that I’m constantly running around with the minimum. So when a boss (an immensely powered up enemy) fight occurred, I struggled. I would throw all my best skills at the boss, cast every magic spell I could, used every damage-inflicting item I had. I also had a tough time staying alive, with the boss wiping out one of my characters every few melee turns.

After maybe 20 minutes to half an hour, I was exhausted. I couldn’t use any more power attacks. I didn’t have any more magic left to cast spells. I’ve only got a few bottles of healing potions left. I’ve got nothing else up my sleeve, and the boss didn’t seem to be dying soon. I could only do simple normal attacks, a sword thrust, a staff prod, a punch.

And you know what? After issuing a normal attack command, I’d shout “Die!”. And the boss didn’t die. And hurt me. I healed as best as I could and issued another attack.

“Die!” I mentally screamed. The boss launched another lethal attack, finishing off one of my characters. I didn’t have the means to even revive that character. I attacked again.

“Die!” I implored. “Please die!”. The boss struck with a counter attack. I was left with just one character on the screen, barely holding up. Healing didn’t mean anything, since the boss’s counter attack would negate the effect anyway. I gave it one last shot.

“Die! Die! Die!

With a flash on the screen, the boss wavered and gave a groan. Then a growl. And collapsed. And the game produced the victory song I waited for so long. It was the happiest moment in my life. For a while at least.

Now to get the rest of my characters up again and reach a safe point before an ant sneezed on me and snuffed me out…

Preparation paralysis

It’s a game. There are relatively finite limits and fixed obstacles. You can prepare until you reach a point where you’re comfortable enough to move on. You can even test your preparation. If you can get through a few battles without getting hurt, you’re probably prepared enough.

Life doesn’t happen that way. Programming requirements don’t happen that way. Sometimes, you can never be sure if you’re prepared enough. I don’t want you to go “analysis paralysis” on me, and I don’t want you to go “practically dying” mode too. Prepare to the best of your knowledge and venture forth to explore new grounds.

But please move on. And if that entails courting danger, well, life would be boring otherwise.

Real money, RPG money

I’m careful with the way I use my money. Once in a while, I splurge a little, maybe a book as a reward. I’m moderately thrifty and have a balanced lifestyle.

All this goes out the window when I play a role playing game.

In a computer/console RPG, I take unimaginably stupid risks. If there’s a piece of armour priced at 2000G (gold pieces), and I had 1950G, I’d go out there and kill a few more monsters to gain the remaining 50G. Even if all my magic were depleted. Even if my healing potions were low on supply. Even if my characters were practically dying. If there’s a better than 50% chance I’ll survive another battle, I’d do it.

If a night’s stay at an inn costs 150G, and my characters are like 70% healthy, I’d skip the inn. Even if I hadn’t rested for like 4 virtual days.

Sometimes, I’d go into an item store and buy 20 herbs (replenish stock), 30 antidotes (next boss specialises in poison attacks), 20 ice crystals (next area monsters vulnerable to cold) and a dozen odds and ends. Then I left the store with zero money. Every single gold piece I had was used up. No savings, no bank, no backup.

Then I’d realise my characters weren’t fully rested. It would be a waste of herbs and potions to restore them to full health. Better to rest at an inn. Oh right, no money. Off to slaughter a few more monsters and earn just enough gold to rest at the inn. Then off to the next adventure.

I would hoard money obsessively to buy some high priced weapon while in virtual mortal danger. I would also spend everything to buy and restock items, to the point of ignoring virtual personal safety. I just don’t handle money in RPGs the way I do in the real world.

There’s no real point I’m trying to make. Just wanted to write about this observation…

Path of a Polymath Programmer Part 3

So I talked about beginner polymath programmers in part 1, and books on role playing games and computer spies in part 2. In store for you in this post are typewriters, juxtaposition and XT86 computers.

Teaching English and learning typing

Due to my prolific reading, I have a moderately good command of the English language. My neighbour wanted to improve her English, and approached me to help her. She’s an adult and I’m just 11 years old then. I told her I might not be up to it, but she insisted. She also offered me an exchange. I’ll coach her on English, and she’ll teach me how to type on the typewriter.

This was in the dawning age of the computers, and typewriters were still pretty cool then. Hmm…. interesting. So I accepted her offer. She’s already attending some English classes, so basically, I was there to help her with some grammar exercises, spellings and pronunciations. She’s also attending typing lessons, so after our language sessions, she’ll let me practise on her typewriter using her typing course materials.

Type “d” then “e” then “d”. Stuff like this. After a while, I got really into the typing, and got my own typewriter. I still borrowed her typing lesson materials, but I practised at home. Typing is a very loud activity and irritating to the ears, and I didn’t want to bother her family.

It was good fun and my fingers were practically flying over the keys. I got to the point where I had instances of typebars (those metal things with the letter imprints) clashing with each other. You know, I think I still have that typewriter around. Excuse me for a second…

Introduction to computers

So, around this period of time, my school started these computer lessons. Computers were a new thing then, and the government wanted to expose young students to computers. So I signed up for them.

The first few lessons were utterly boring. We learned what a monitor was, what a keyboard looks like, the functions of a CPU (central processing unit). Frankly speaking, the worksheets handed out felt like an insult to my intelligence. “Fill in the blanks, what is this?” Monitor. “What does CPU stand for?” Central Processing Unit. Yawn…

Luckily, the teachers also mixed it up with some computer games. One of them had alphabet letters falling from the top of the screen, and I’m supposed to type the bottom-most letter to score. It ends when a letter hits the bottom of the screen. I was phenomenal at that game. The teachers couldn’t believe how a 12 year old could type that fast. Lessons progressed, but I lost interest and dropped out of the computer class.

I graduated out of primary school and plunged into secondary school. Joining other 13 year olds, I struggled with the change of environment, additional study work load and expanded social circles. My friends got me into Chinese comic books, or what one of them termed as “intellectual sustenance”. I remember sneaking a comic book into one of my technical classes and surreptitiously reading it, when I was supposed to be sawing and filing wood pieces for a woodwork project. The memory still brings a smile to my face.

Well, one of my friends was into pencil and paper type role playing games too, and introduced me to the Palladium series. I didn’t exactly got to participate nor game master a campaign, but I love reading through the books and imagining what it’s like to have the power of flight or intangibility.

I was also into console games. In those days, it was the Nintendo or Famicom or Sega. I love the role playing games because I got to live out imaginary stories without the tedious dice throwing and stats management. It was also through this exposure to playing games that I self taught myself Japanese. It was out of necessity, and I’ll leave the details to a later post.

The J word

So what with math formulas, mixing chemicals and wood sawing, I had to take art class as well. And I suck at drawing. I can never quite mix up a particular shade of colour I need. I remember making a colour wheel. That was fun. Then the art teacher threw a humongous word at me: Juxtaposition.

It unbalanced me. Hearing the word for the first time, and outside the context of a typical language learning environment (as in not in class or not while reading a book), I didn’t know what he meant. Later, I think he meant placing two different shapes close together and seeing how it looked like. Much like a polymath bringing two unrelated concepts together and seeing what happens.

Despite my ineptitude at drawing, I persevered. There was this task where I was to draw an apple. I must express the texture of the apple, the play of light across its skin, its shadow falling behind it on a surface. With a pencil. I bought apples and studied them for minutes before laying my pencil on paper. The monochromatic sketchings of that rosy fruit sowed the beginnings of an appreciation of beautiful artwork in me. Although I still can’t draw to save my life.

Programming destiny

My inescapable link with computers caught up then. Everyone around me seemed to have a computer. My friends attended computer lessons, and had cool games on their computers (Double Dragon was my favourite). I was envious and sad and jealous and frustrated. That toy computer I had was fun, but paled in comparison with the real thing.

My father found out about my disappointment. By a stroke of luck, his friend was getting a new computer and offered to give my father the old one. Thus I got my first computer, the quintessential XT86. It was old, displayed green text on black background, and only command prompts were useful, but I was ecstatic over it.

I went crazy trying out all the programs from the Orion adventure books. There wasn’t much of a user interface, but I didn’t care. I think I tried coding a mini text adventure role playing game. It didn’t come into fruition, but I learned a lot from bringing the mechanics of game play into programming. Time went by, and there’s only so much one can do with command prompts, so the computer became obsolete.

Parting words…

Well, I hope you’ve enjoyed reading the post. Stay tuned for the next episode by subscribing to my RSS feed, where you will learn the connection between console games and self-taught Japanese.

Continue to part 4

Path of a Polymath Programmer Part 1

What is a polymath programmer? First, you need to know Merriam-Webster’s definition of a polymath, who is

a person of encyclopedic learning

Wikipedia says a polymath

may be a person who knows a great deal about several fields of study, a person who has proficiency and competence in multiple fields, or even a person who has excelled in multiple fields.

And to answer the very first question:

A polymath programmer is a person who has proficiency and competence in many programming related activities or tasks. More importantly, a polymath programmer can apply knowledge and expertise from non-programming fields to programming.

After reading the above definitions, your first thought might be, “Oh, a jack of all trades”, followed by “and a master of none”. There’s actually a third line to the phrase, and is particularly important to programming.

A jack of all trades
And a master of none
Though ofttimes better than master of one

In fact, being a master of only one programming skill will get you fired faster than you can say “Sacrebleu“. Technology moves fast, and by the time you understand a new language or technique or concept, another one is invented. If you can’t keep up, you’ll be left behind. Doing one thing well isn’t enough anymore. And this is particularly true in our programming field.

What you need is a broad and stable base of knowledge and skills to support you when you travel the shifting sands of the IT landscape. This base of knowledge must be relatively impervious to change, so you need minimal learning time when a new change is invented. And this is why a polymath programmer will thrive, while the average programmer strives to survive.

So how do you become a polymath programmer? I don’t believe there’s one true path to becoming one, but I can guess. Let me start by asking a question. Have you noticed how some physicists and mathematicians make better programmers? They aren’t any better at programming than regular programmers. In fact, some mathematicians write code that’s an abomination to even look at.

So what’s the secret? They can think. And they have an insatiable curiosity about the world around them, whether it’s related to their field of study or not.

Now let me tell you my journey of becoming a polymath programmer. I have to tell you that it didn’t happen overnight. In fact, it took years. And I didn’t even realise I was slowly becoming one.

It started when I was maybe 9 years old. I remember learning and memorising the multiplication tables. I also learned to play chess, Chinese chess and checkers.

I read voraciously. I adventured with Tin Tin, met characters of Enid Blyton, sleuthed with the Hardy Boys and solved mysteries with Encyclopedia Brown. My parents bought me an encyclopedia set, and hours passed by as I browsed through the books, particularly the ones on science and mathematics. The Norse and Greek gods also provided me with tons of legends about heroes and villains.

I also remember this fascinating story explaining why the earth was bountiful for about 6 months only, because Persephone ate 6 pomegranate seeds given by Hades, so she’s forced to stay in the underworld for 6 months. Persephone’s mother, Demeter, the goddess controlling seasons, wept whenever her daughter went underground, and thus the unfruitful and harsh seasons of fall and winter.

Great, but what does all this mean for you? It fires up the imagination, and as Albert Einstein says, “Imagination is more important than knowledge“. You’ve got to be able to imagine and visualise a problem before you could solve it. Then you’ve got to imagine and visualise a solution before you could distill it into programming logic, and subsequently into code.

Then came the part that might interest you more. I got a toy computer. Yes, it was a toy, because my parents bought it from Toys R Us. The other programmer geniuses I read about usually had some ancient artifact of a computer like an XT86 or something. I still got an XT86, but that was later on.

Oh yes, back to my toy computer. It had the standard keyboard. No mouse. And a one line output screen. No graphics. Its play functions included

  • questions and answers about general knowledge, math and science (amongst others)
  • games like hangman
  • typing practice

And the most significant one of all? It included a BASIC compiler! Not that I knew what a compiler was then. I was just ecstatic that I could print a “Hello World!“. I pored over the instruction manual, learning all the BASIC commands listed. I learned the concept of commenting by starting a line of code with REM. I learned that numbering the lines of code makes the code run in sequential order. I questioned the practice of numbering in multiples of ten, even though BASIC code ran perfectly fine so long as the numbers were in increasing order.

Then something happened that jump-started my learning process. There was a book fair in my school, and as I browsed through the offerings, I found and bought two distinct sets of books. The first set included 3 (I think) books called Dragon Warriors, a series of role playing games (RPG) with instructions on playing and game mastering. The second set included a few books from the micro adventure series, where you play Orion, an adolescent secret spy whose area of expertise was programming!

How did those two sets of books propel me towards being a polymath programmer? I’ll tell you more in the next part of this series of posts. … Alright, fine, I’ll give you a preview. Both sets of books wove story plots, game problem mechanics and code tuning/tinkering together.

See you on our path to becoming polymath programmers!

Continue to part 2