Roy Tang

Programmer, engineer, scientist, critic, gamer, dreamer, and kid-at-heart.

Blog Notes Photos Links Archives About

2016 December

  • Review: Xenoblade Chronicles X

    Just in time for the end of the year, I finally finished Xenoblade Chronicles X, which I started playing around the first week of August (5 months!), with 120+ hours of game time. The game doesn't have the best graphics (WiiU, etc), but I really like how it looks and how the world is built and all the different environments and the weird and sometimes absurdly large beasts. src="" width="1280" height="720" /> There's a whole lot of stuff to do in-game. It plays mostly like a single-player MMO, with party members that act on their own and most skills on

    read more (230 words)

    Posted by under blog at #review #gaming

    Also on: tumblr twitter / 230 words

  • Cleaning up your Code

    In one of my most recent projects, a large system that had gone through a relatively long and unstable period of many, many changes due to sales demonstrations, different clients and whatnot, one of the "fun buffer tasks" I always kept around for devs was code cleanup. Because of the unstable nature of the project, there was always a lot of duplication, unused/unnecessary/obsolete classes/functions/files and so on. Unnecessarily large CSS files where most of the selectors were no longer really needed or JS libraries that weren't actually used. That kind of thing. It's one of those things that you'll never

    read more (290 words)

  • Decluttering

    I traditionally try to save some time on the week between Christmas and New Year's Day to do some cleaning up and decluttering of my stuff. One would assume that having more time meant I would be better able to organize my stuff and all that, but one would be wrong. My room still has stacks of books, toys, Magic cards and other stuff in random places. Or maybe I just have too much OCD that I want everything to be neat and organized, but I'm not industrious enough to make it happen. I'm sure there are people a lot

    read more (358 words)

    Posted by under blog at #opinions

    Also on: tumblr twitter / 358 words

  • Learning a New Programming Language

    Related: Learning new skills While many people working as programmers/software developers are happy enough specializing in a single programming language or platform, I generally consider it a better idea to have a wider toolset and the ability to easily pick up new programming languages as needed. The benefits should be obvious: when you have a wide variety of tools under your belt and are able to quickly learn to use a new tool, the number of work options you have increases greatly. Happily, programming languages share a lot of similar constructs. Only your first programming language (when you first learn

    read more (581 words)

    Posted by under blog at #software-development

    Also on: tumblr twitter / 581 words

  • Learning New Skills

    When Hanamichi Sakuragi from the manga Slam Dunk tries to get into the basketball club, he insists he's a genius who doesn't need to practice the basics and instead wants to go immediately to doing spectacular things like Slam Dunks. Sadly, the vast majority of us cannot claim to be geniuses at anything, and we are forced to undergo a bit of hard work if we want to learn a new skill. Malcolm Gladwell says one needs 10,000 hours of work at something to become proficient, but that probably only holds true if you're using those hours "smartly" and not

    read more (837 words)

    Posted by under blog at #self-improvement

    Also on: tumblr twitter / 💬 1 837 words

  • Generalists and Specialists in Dev Teams

    In any reasonably large software project, the system will be so large that no one developer will have a good grasp of the details of every function in the codebase. The tendency is for developers to specialize -- that is, developers tend to focus only on certain parts of the codebase and become more familiar with that part, while not having much knowledge about the other parts. This tendency is self-reinforcing -- once it becomes known that the developer is an "expert" in the given module, there is a tendency that he will be assigned the most difficult and urgent

    read more (321 words)

    Posted by under blog at #software-development

    Also on: tumblr twitter / 321 words

  • Nine Ways to Work Around Mental Blocks

    Posted by under blog at #writing

    Also on: tumblr twitter / 638 words

  • Power Distance in Software Development

    I was in a meeting once with my boss (literally the CEO, a Malaysian) and some representatives of another company (Americans) where we were discussing the technical details of a possible future partnership. At one point, one of the Americans said to my boss that he was pleasantly surprised that I was openly speaking up independently of my boss and willing to correct him on some points when he didn't quite get the technical details right. It seems they were used to working with some Indian outsourcing firms, where due to cultural differences, the tendency was for the Indian guys

    read more (354 words)

  • Nanowrimo 2016 Post-Mortem

    Posted by under blog at #writing

    Also on: tumblr twitter / 1607 words

  • In JavaScript, referencing variables that are declared outside of a function's scope can be tricky. If you have code like this: var btn = document.getElementById("BTN"); var test = 1; btn.onclick = function() { alert(test); } test = 2; The click handler above retains a reference to the test variable even though it falls out of scope as soon as the script block finishes execution. When you actually click the button, the alert will show the last value of the variable when the block finished execution (2) instead of the value at the time the function was initialized (1). I thought

    read more (361 words)

2016 November

  • Are you willing to accept criticism?

    If a friend found out your work was horrible, would you want to know? Or would your feelings be hurt? If your coworkers think you're doing something wrong, would you prefer that they keep quiet or that they call you out? As a leader, do you prefer to have sycophants who sing your praises or people who are willing to tell you that you have no clothes? Is your ego more important than doing a good job or self-improvement? But what if the guy is just being an asshole who hates me and wants to discredit me? Whether or not

    read more (191 words)

  • The Amber Spyglass by Philip Pullman My rating: 3 of 5 stars Pros:- I liked having the bear back- Diamond-legged creatures with wheels!- An honest effort to tie up all the loose ends and give each character decent endings- A decent read, at leastCons:- allegories aren't very subtle- people get miraculously redeemed, even Mrs Coulter who was such a great villain- build up of Asriel's awesome plan to take the War to Heaven only to find out he didn't really know what he was doing until he found out he had to somehow help two kids find their pets- build

    read more (115 words)

    Posted by under blog at #books #dark-materials

    Also on: goodreads / 115 words

  • Your Product Should Be Easy to Install

    This is a story of something I consider to be one of my worst mistakes in software product development. Some years ago I was asked whether it was feasible to write software that would be integrated with Software X that allowed us to export that software's output into a format that was compatible with Standard Y. I took a look and after a while came back with "Well sure. We could use Programming Language M that has an API that lets us integrate into Software X so we can export the output data. Then we'll have to use Library N

    read more (368 words)

    Posted by under blog at #software-development

    Also on: tumblr twitter / 368 words

  • The Subtle Knife by Philip Pullman My rating: 3 of 5 stars Well, the knife may be subtle, but the allegories are not. I can see why some religious folk might find the trilogy's themes controversial, but as far as I can see they're still just fantasy stories. We'll see how things ramp up in the last book.I kind of miss that bear though. View all my reviews
    Posted by under blog at #books #dark-materials

    Also on: goodreads / 68 words

  • Wizard's First Rule and Demagoguery

    The series was a bit formulaic, and towards the end really preachy toward's the authors personal philosophies, but Terry Goodkind's Sword of Truth series always comes back to me because it codified one of life's most important truths: Wizard's First Rule: "People are stupid. They will believe a lie because they want to believe it's true, or because they are afraid it might be true." That doesn't mean you're stupid or I'm stupid, just that collectively, we're kind of dumb. Put another way by another wise character in popular culture, from the film Men in Black: Kay: A person is

    read more (326 words)

    Posted by under blog at #opinions

    Also on: tumblr twitter / 326 words

  • Unclear error messages

    "Button for non-service floor does not light up." For more than a decade I regularly went to an office building where the elevators verbally spouted this nonsense message whenever you tried to go to a floor that the current elevator car did not service. For context, the elevators in the building were zoned programmatically -- this means that they only service a particular subset of the floors that are provided on the elevator panel itself. They sometimes disable the zoning depending on the loading among the elevator cars so simply removing the buttons for the unsupported floors isn't a viable

    read more (579 words)

    Posted by under blog at #software-development

    Also on: tumblr twitter / 579 words

  • Bad news

    Recent events both in my country and abroad, both of wide importance and personal importance, have made the past week or so difficult. Bad news and bad events have no master or timing, they do not consider giving us a break, they come and go as they please no matter how bad the situation already is. I fully understand why many people choose to withdraw from daily news or shut it out altogether or even just avoid social media completely. Hearing the bad news can be disheartening, and it comes at us even when there is work to be done

    read more (288 words)

    Posted by under blog at #opinions

    Also on: tumblr twitter / 288 words

  • Be Willing To Throw Prototypes Away

    There was this project we had where there was a strange bug. The developer working on it found that the problem only appears when the record ID was 12. When it was 11 or less, everything was fine. When it was 13 or more, everything was also fine. After some investigation, it was found that there was some code that executed with a condition of "if record id == 12", which was already a WTF. It turns out that some behavior had been hardcoded for a previous demo to a client and was never reverted and made it all the

    read more (278 words)

    Posted by under blog at #software-development

    Also on: tumblr twitter / 278 words