Author: Justin Lee

  • Good Old Games

    I was at the arcade in Bugis for a short while after dinner. I’m not exactly an arcade guy because the noise level at most arcades are on par with an idling Boeing 747, but I was there just to look around and made a few observations.

    The most popular games today are the musical ones – guitar, drum, DJ, dance. Some other popular ones are the car racing games like Initial D. Finally there’s a crowd at the corner with old-style arcade games like Street Fighter where you sit down with a joystick and 3 buttons. I call this crowd the one-token warriors, i.e. one token lasts them an entire day.

    Games come and go, some of them are hypes and go away after a while, some really sucked and didn’t even work out, but some good old classics remain. I asked myself, why?

    On top of that, I had two other questions. What was the game companies’ revenue model? Was it one-off, i.e. the sale of the arcade machine, or was it continuous, e.g. profit sharing. I have no answer for this yet.

    So to figure out an answer to my first question, I narrowed down some classic car racing games that I am familiar with.

    Daytona (the original) is really the best of its’ time. It was around since the mid 1990s – that makes the game more than 10 years old to date. This is quite obvious because it still uses the old fishbowl-shaped CRT tubes.

    Daytona 2 is the newer version released in 1998, but wasn’t very popular and slowly disappeared from some most arcades. There’s a version of the machine with motion simulation as well, making the game a little more fun – I think it’s still around in Cineleisure.

    Sega Rally was launched probably around the same time as Daytona but wasn’t very popular. The hardware is the same as the Daytona, but the game play is very different.

    So I asked myself, what makes Daytona so popular that it still exists in almost every arcade today?

    I think it’s simplicity in game play and moderate realism. Here’s where I think the other two games failed.

    Sega Rally was difficult to control and didn’t have the feeling of thrill – it was too realistic, too diffcult and felt slow.

    Daytona 2 had too many vehicles to choose from. While this sounds like a feature from a marketing perspective, this makes the learning curve steeper, requiring more experimentation from gamers to get it right, and of course more tokens which means the game became too expensive. On top of that, it had the speed realism of Sega Rally and also felt slow. The graphics in the background was also excessively distracting, often causing players to miss a turn.

    Daytona (the original) had only one car, two transmission modes and three stages. The car was easy to control and the graphics were clean and probably fantastic at its time an age. Sounds like a magical number sequence, doesn’t it? 1, 2, 3.

    I draw another observation from my visit to the arcade and the three games above – people love games that challenge their hand-eye co-ordination. Actually, that’s probably what most games really do. Thus it is true that if the game felt slow, it isn’t fun to play. Think about it – Counter Strike, Quake, Daytona, the ancient Snakes game in Nokia phones, the new music games in the arcade… they are all the same in this aspect.

    What do you think?

  • Similarly Human, Different Lives

    Yes, the title comes from the Chinese saying 同人不同命, meaning we are all similarly humans, but we lead different lives.

    I just read Jac’s Blog and it seems that she’s so stressed at work until she lost 4kg. While I would certainly need to lose some weight, I think Jac’s not the right candidate for this weight lost programme.

    Unfortunately as well, 同hamster不同命. Casper made an escape and when wifey came home, he was not in his cage and we found him in the kitchen drain drowned to death. This is his 5th month birthday. Sigh. Silly hamster, why did you choose to jump into a drain when you could go elsewhere? We will miss you. 🙁

    And then while some people very heng to stay in landed property, I have to live in a measly overpriced government flat (a.k.a pigeon hole) with a bloody inconsiderate neighbour upstairs who doesn’t sleep. I mean, there isn’t once I see their room lights go off, not even at 4am in the morning. Actually, I don’t care if they don’t sleep – maybe they do shift work – but that’s not my problem. If they choose not to sleep then they should be considerate to the rest of the people who’s sleeping.

    I keep hearing wooden furniture dragged along the floor, heavy objects dropping and people walking like King Kong. It’s not occasional – I can tolerate that. It’s persists through the night like a JavaBean. I mean, I can have a great day at work and have a great dinner with friends, but the moment I come home, these noises totally ruins my entire day (and sometimes the next.) These aren’t continuous background noises that our minds could filter (e.g. people chatting, piano playing, traffic). These are sudden bursts of loud noises that makes me jump, irritated and stressed out. It’s not I can’t cover the noise, but it’s so resonant that it overpowers my TV!

    Back in December 2009, I tried going upstairs and talking sense into them, but it ended up into a yelling session on the 3rd approach. Then I resorted to knocking on my ceiling with a wooden stick and calling the police. The noises went away for a while, and recently they’re back again. I knocked on the ceiling a few times, but it seems they’ve decided to turn rebellious and knock back. So that’s it, I’m fucking fed up already, I’ve had enough, no more Mr. Nice Guy. I’m going to a psychiatrist because I’m so stressed out, and I am going to send them a lawyer’s letter. If talking and knocking doesn’t work, maybe paying for legal fees will.

  • It’s Really Very Hiong

    Even if I only have one module to do, this one is surely, confirm, 100% chop very hiong. For the past few days I’ve been working on the CS3216 Facebook Assignment and my wife is nagging my ears off because shes says I boh hiew her. I think my teammates lagi worse because they’ve been staying late in school, but it’s good for them lah, once in a while so hiong, otherwise they come out to work, sometimes even more hiong.

    So if you wonder if there’s ever once I had to camp overnight in office to work, the answer ish YES. But the difference is that I wasn’t building a killer app that could potentially earn millions. I was actually working on a major system outage, i.e. debugging.

    Anyway, need to relax my mind so no geek talk, no work talk. Here’s a video just for laughs, this is really funny but a little bit vulgar.

  • MVC Quick Hack in PHP, Tips on Web Development

    Unlike Java, PHP wasn’t designed with MVC in mind, but with bigger projects MVC becomes important to keep code clean and readable. I’m sure a lot of crazy people in the class would have figured out their own MVC quick hack, but I’ll just share mine here.

    • The Model shall remain as MySQL. I’m not going to spend waste time creating beans-like objects because I personally believe beans are inefficient things for retrieving even the simplest of things. In PHP, the mysql_fetch_assoc() function is really all that you need. The web is a stateless thing, let’s keep it that way.
    • The Controller shall be the direct PHP file that gets called, i.e. your URL links to the controller, your form submits to the controller. The controller contains purely logic.
    • The View shall be a PHP file that sits in another directory and gets called using the include() or include_once() function and contains HTML/CSS/JS and some bits of PHP such as loops for displaying content.

    Also, here’s some of my personal tips when developing public-facing web applications.

    • Do create an error handling routine. You may implement this in any way you want, but I typically use an array and use the array_push() function to push errors into the array stack. If the array is empty, we know there’s no errors. But a simple array can be quite ugly, so you might want to create a data structure to take care of where exactly the error message shows.
    • Always end your files with .php. Don’t end it with .inc or .somethingelse because you will be vulnerable to expose your source code, unless you configured Apache to parse .inc files as PHP. Even so, I’d still advise to keep the suffix as .php in an event the files get deployed on another server with missing Apache config. The lesser moving parts, the better.
    • Always escape your string using mysql_escape_string() before querying the database to prevent SQL Injection.
    • Always take care of integer parsing. I like to use intval() because it doesn’t throw a fatal error. If it sees a string, it returns 0. This also prevents SQL Injection.
    • Always clean up output using htmlspecialchars() to prevent Cross-Site Scripting.
    • Never put filenames as parameters as you can be vulnerable to Path Traversal. Try to use other methods if you need to have filenames passed around, such as server-side sessions or constants.
  • The Second Lecture

    So the second lecture was on Software Engineering. Big word and unfortunately means big problem. The class was introduced to Agile/Scrum which is a newer methodology compared to the old waterfall/spiral SDLC model that I was taught in school.

    I used Agile/Scrum about two years ago in my previous job and my experiences were much similar to the ex-students who presented. I worked with teams from about 2 to 6 in size. Honestly, not many teams can get past 10 pax because of $$$. I must say 80 is an awesome huge group!

    So here’s my observations:

    • The common effort multiplier is between 2.5 to 3 not because people are slow or bad at estimating, but because they did not consider time taken for communication and other context switching overheads. However as the team gets better and better at estimating their effort this multiplier can go down to about 2. Don’t forget, Project Manager doesn’t do the actual work but still gets paid. 🙂 So where does his effort go?
    • The biggest problem with estimating effort is with companies billing by the hour. I was constantly questioned for high estimates (thanks to my 3x multiplier) because it ballooned the cost of a project and I was pressurized to push it down, but guess what? It always overruns, i.e. the original high estimate was correct.
    • Agile works well with small projects too, just that you may not need to religiously hold the daily scrums, but the idea of having broken parts down into bite-sizes is the key to easing project management.

    Wei Man is right. Geeks are bad at estimating effort, but we have to know what it takes to do something so that we can manage ourselves. Time, energy and life are finite and therefore our efforts are finite as well. If you don’t learn the skill of estimating efforts I can 100% assure you that you’ll overrun your projects. This is from a personal experience from not getting paid and even almost being sued. 🙁

    ***

    On the documentation part, Prof. Ben is right. There’s a job market out there with people writing documentation. This type of job is called Technical Writing. If you’re good with language, maybe this is a job you can pursue. There’s not many of these companies around and their clients are usually huge (Aerospace, Military, etc.) so you get paid pretty decent. Not to late to change courses now.

  • Ayiah, Another $6 for Parking at NUS

    Ayiah, what to do. I was already one hour late for a meeting with my teammates, but as the saying goes better late than never so I decided to park nearer to COM1 so I have a lesser chance of being knocked over by the NUS shuttle bus or errant drivers while walking up from Yusoff Hall.

    OK, you know I’m lying. Truth is that I’m just fat, lazy and wanted to save 5 minutes of my time walking up a dreaded slope. So for that, I’ve paid my “fine” of $6.85.

    Prof. Ben told me learning is never easy. I didn’t know he meant my wallet!

    So meeting teammates was done over my “official lunchtime” and somehow every time I meet these folks, something interesting comes up. We ended up talking super enthusiastically about a potential gambling app but later found out that it was against Facebook’s policy.

    Damn, otherwise we’ll be the next millionaires by the end of this course. Another fat hope dream busted.