Launching Ragnarok Code
It’s my new website! Visit it at http://ragnarokcode.com.
For some time now, I’ve been stagnating in terms of writing code. My day job usually provides me with ideas for post material. The thing is, much of the code, concepts and business logic is proprietary and confidential. So the material’s fairly mangled to unrecognisable pieces before it’s seriously considered for publishing.
I’ve also noticed that my articles are starting to lean towards the theoretical, and not enough practical ones. Practical referring to code, and trying out new concepts, and testing new technology. Besides, I’m starting to bore even myself…
Thinking hard, I came up with the answer. Do my own thing and write code! But I need some purpose. It’s fine and dandy to just write code, but without any purpose, the motivation to write code dies quickly.
My considerations:
- Show my work
- Current interests in C# and ASP.NET
- Love simulations
So I’ve decided to launch a new website, running on .NET. I’ll be able to fulfil the first 2 at one go. The simulations thing will probably be a Windows application, powered by DirectX (or XNA?) for graphics. I’ve got water surface simulations, particles affected by “gravity” fields and so on in mind. I can create the simulations, and make them available for download, maybe even the code (once I make it presentable).
Do you know what’s the hardest part? Coming up with a domain name. I thought through a few, and discarded them one by one. I finally decided on one, but it was taken (expired, but still renewable by the owner).
It’s gone on for a few days, with the search for the perfect domain name and the perfect ASP.NET web host. It started to drive me crazy. Until something inside of me screamed “Stop this!”. And I made a decision, and bought a hosting package and registered the domain name “ragnarokcode.com”.
After I registered the domain name, I realised a fatal mistake. I’m not going to rank well for the word “ragnarok” due to a popular game Ragnarok Online. Totally forgot about it. Eeesshh… It’s fine, since I plan on using the website like a test bed for concepts.
So right now, I’ve only got an implementation of reverse polish notation on the site. What it means is, you can type “2 + 6 / 3″ and get “4″ as an answer. Hardly noteworthy, since you can write that in code and get an answer anyway. Until you realise that to evaluate a new expression “4 - sin(pi/2)”, you have to recompile your code.
This type of dynamic evaluation requires dealing with the symbolic meaning of the terms in the expression (symbolic computing?). There’s this software called Mathematica, which I used in my university days. My implementation just scratches the surface of what’s achievable.
Because I want exceptions to fail silently, that even if the expression doesn’t make sense, every best effort was made to evaluate the given expression. Which gave surprising results when I tested my own creation. Did you know “love + hate” has a numerical answer? *smile*
So here’s the link again: http://ragnarokcode.com. Have fun!
Never incorrect
My friend approached me for help today.
“What does ‘He will never be incorrect‘ mean?” he asked.
The genius logician that I am, I answered “He will always be correct”. My friend gave me a puzzled look. Then I translated the answer into Chinese, because he’s more familiar with Chinese than English.
It took a while, but he finally got it.
Use “positive” words whenever possible. Even words such as “reckless” can be considered “positive”, in the sense that it’s opposed to “incautious”, a direct negation of “cautious”.
This applies to writing code too. Don’t expect the next programmer who reads your code to be an expert logician. Nor a philosopher.
I hate writing about double negatives… I always end up focusing on negatives myself…
From dilemma to tragedy
In game theory, there’s an interesting problem called the prisoner’s dilemma. There were these 2 prisoners who were accomplices in a crime, but they didn’t know each other prior to the crime. They’ve been caught, and were individually questioned. Assuming no social consequences nor retributions, each prisoner was asked to confess to the crime.
If prisoner A confessed, but prisoner B kept quiet, A was let go and B was to take the full blame (and vice versa). If both confessed, both gets jailed, but less than if a single prisoner took the fall. Now, if both kept quiet, both still gets jailed, but for a significantly less amount of time than the previous situation.

[image by Andrejs Zemdega]
The action “keeping quiet” corresponds to “cooperate”. The action “confess” corresponds to “defect”.
When I first learned of the concept, it was in the form of rewards, as opposed to punishment above. So here’s a table where the values correspond to rewards.
| A cooperate | A defect | |
| B cooperate | A gets 0.8 B gets 0.8 |
A gets 1.0 B gets 0.0 |
| B defect | A gets 0.0 B gets 1.0 |
A gets 0.2 B gets 0.2 |
[the table might look a bit crushed together if you're reading in a feed reader]
I made up the values. They’re meant to illustrate the disparity between the cases. You might also have heard of other versions of the prisoner’s dilemma. I want to highlight the part where both prisoners benefit more from cooperation than defection. The special case is if one chose to defect and the other chose to cooperate. But cooperative benefits are higher than an individual benefit.
When total selfishness comes into play, the selfish individual achieves the optimal benefit. But the optimal benefit isn’t much higher than the cooperative benefit. Being even a little less selfish creates a better outcome for all.
Now compare this with tragedy of the commons. A group of people have a shared finite resource. When everyone cooperates by taking only their fair share, all is well. When one person selfishly takes more than his fair share, the group on the whole suffers.
Since there’s no real incentive to be selfless at that point, more people might start taking more (defecting). And suddenly the finite resource gets abused and becomes useless.
For example, carbon footprints. Everyone wants to be environmentally friendly. When someone thinks there’s enough clean air for everybody, he might selfishly decide to up the noxious gas output (as a means of upping his profit too). If it comes to a “every man for himself” situation, the planet is going to be in deep trouble.
Economically speaking, there isn’t much relation between the prisoner’s dilemma and the tragedy of the commons. Socially speaking, in particular selflessness and care for the common good, the latter is a scaled up version of the former.
With the rise of social media and software tools to connect people, I find the relation between the two concepts interesting. Let me know what you think.
Generation Y programmers
I guess I could be labelled as old-fashioned. I grew up knowing DOS and remembered being ecstatic over typing something on the command line and getting an output. When I was in university, Netscape was the browser, I used the vi editor to code on Unix, and Neopets and ICQ were the rage.
I’ve seen some truly horrendous applications. Truly and totally ugly interfaces. I’ve dealt with Delphi and PowerBuilder legacy applications, and had maintained my fair share of web applications. Sometimes, the user experience in those applications were downright hostile.
So when I read this article mentioning the younger workforce, I was stunned by this:
Will Generation Y, who is accustomed to Facebook Applications, Google Docs, Rich internet application interfaces, and advanced web technology (all public) be shocked to find out how bad your enterprise software is?
I’m still reeling from the implications…
Some of my users are, shall we say, sheltered from all the bling on the Internet nowadays. They are quite content to accept some of the user interface inconsistencies. Roundabout and duplicate methods of getting things done pop up, yet they are unfazed by the inconvenience.
How will the younger generation of programmers react to this? They’ve seen all the slick interfaces. How will companies react to them? Companies might be very attached to their legacy applications.
Hip young programmers. Hideous user interfaces. Hmm… Either the programmers spruce up applications from inside the companies, or companies stifle their energy, their passion with corporate rules.
Or maybe something fantastic will come out of this. What do you think?
Game programmer? Need math
I read this article on video game degrees and I felt like “Finally! Someone who got what I’m trying to do here!”. I didn’t know the United Kingdom is so supportive of video game productions. They need mathematicians and computer scientists huh?
What happened to great programming skills, you ask? “I can tell the difference between an ‘is a’ and ‘has a’ relationship in object oriented programming!”
Programming skills are still needed. We’re just talking about complementary skills to that coding ability. Math course too difficult? Well, it’s difficult for a reason.

