Roy Tang

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

Stream Posts Photos Links Archives About

All entries tagged Software Development.

You can subscribe to an RSS feed of this list.

Dec 2016

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 tasks or fixes related to that module, further cementing his expertise.

read more (321 words)

Posted by at /  Software Development / Syndicated: / 0 / 321 words
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.

read more (354 words)

Posted by at /  Software Development / Syndicated: / 0 / 354 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).

read more (361 words)

Posted by at /  javascript  Software Development / Syndicated: / 0 / 361 words

Nov 2016

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.

read more (368 words)

Posted by at /  Software Development / Syndicated: / 0 / 368 words
“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.

read more (579 words)

Posted by at /  Software Development / Syndicated: / 0 / 579 words
  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.

read more (279 words)

Posted by at /  Software Development / Syndicated: / 0 / 279 words
The software development process is already difficult mainly because a lot of it so imprecise. Requirements are often only vague wishes that the client has, with no regard to the sheer number of instructions needed to implement those requirements. Throughout the entire process it’s important to use feedback loops to determine whether development is on the right path. And like all feedback loops, their effectiveness often hinges on how quickly we are able to turn around and give and incorporate feedback into future iterations

read more (592 words)

Posted by at /  Software Development / Syndicated: / 0 / 592 words

Oct 2016

In Tagalog: “Madali lang naman diba?” Probably one of the most annoying things a programmer can hear, especially from a client or a manager who has no appreciation of how complex software development is. It’s presumptuous at best and actively damaging to schedule and morale at worst. We already know estimation is hard, there is no need to make it more complicated by automatically assuming the best-case scenario (or in many cases, an impossible scenario)

read more (356 words)

Posted by at /  Software Development / Syndicated: / 0 / 356 words
“Composition over inheritance” is an object-oriented programming principle that I’m sad to say many devs I’ve encountered aren’t too familiar with. Composition provides greater flexibility, modularity, and extensibility in large software systems as compared to inheritance, especially for statically typed languages like Java that don’t support multiple inheritance The most common examples of the problems caused by too much inheritance involved generic object such as the game objects example in the wikipedia page linked above.

read more (645 words)

Posted by at /  Software Development / Syndicated: / 0 / 645 words
For the better part of my software development career so far, I’ve had the doubtful pleasure of being one of the devs using and maintaining our in-house web development framework. Framework coding is a bit different from the actual application development. At the core it’s a simple idea: you have a whole bunch of code that helps do programming tasks that you expect will often be necessary in a certain set of projects, so you write that code with the intent of reusing it across multiple projects.

read more (844 words)

Posted by at /  Software Development / Syndicated: / 0 / 844 words
“We will encourage you to develop the three great virtues of a programmer: laziness, impatience, and hubris.” — Larry Wall, Programming Perl (1st edition) Hubris is a fancier word for an excessive sense of pride. Why is this to be considered a great virtue for a programmer? Programming is at least partly an act of creation, which means there is an element of craftsmanship involved. A craftsman imbued with hubris is able to take pride in his work – he is driven to create work that is the best quality he can provide.

read more (403 words)

Posted by at /  Software Development / Syndicated: / 0 / 403 words

Sep 2016

… especially for strongly-typed languages. In one of the bigger Java projects that I took over, I was often annoyed to find some devs had written method signatures like public void doTheThing(HashMapparams) Which is silly – not because of the naming, that’s obviously not a real-world function name. The silly part is requiring a particular implementation (HashMap) instead of the generic interface (Map). It unnecessarily restricts your API and makes it less flexible.

read more (162 words)

Posted by at /  Software Development / Syndicated: / 0 / 162 words
Overhead scale up rapidly as project team size increases. Every time you add a new person to the team, he comes with a lot of overhead such as the need to learn the project details, responsibilities of other team members, who to consult when there’s trouble, custom project procedures, and so on It’s a reinforcing cycle too. As overhead increases, the team imposes more processes and restrictions to make sure everyone is doing the right thing and there are no screw-ups.

read more (314 words)

Posted by at /  Software Development / Syndicated: / 0 / 314 words
Overtime in software development projects seems to be a given. Sure, there are projects and companies that don’t need it, but those feel like the exception rather than the norm Overtime in software development is a natural consequence of schedule pressure and the fact that estimation is hard, which is why it’s understandably common, but that doesn’t mean we shouldn’t try to avoid it More than once I’ve been in a situation where the team stays overnight to try to get a build or release ready for the next day only to run out of time and have to delay the deployment anyway.

read more (368 words)

Posted by at /  Software Development / Syndicated: / 0 / 368 words
A while back, news came out that an AI was able to perform a diagnosis after the human doctors were stumped. Having just finished binge-watching the entire run of Star Trek Voyager, I immediately thought that was the sort of AI advancement that could lead to such things as Voyager’s Emergency Medical Hologram, an AI which could replace a human doctor. Of course, it is still very unlikely for this to happen anytime soon, medicine is a very complex field and new things are still being discovered all the time.

read more (491 words)

Posted by at /  Software Development / Syndicated: / 0 / 491 words
Without a doubt, the number one problem in software development projects is schedule pressure, that is, the pressure to meet unreasonable deadlines and targets Almost all other problems can be overcome if there were no schedule pressure: weaker developers could be mentored to become better, more productive, and commit less faults less faults overall will be committed anyway if there were no schedule pressure poor requirements could be threshed out in more detail difficult clients can be argued, worn-down, and eventually reasoned with problematic team members can be counseled, or replaced with new blood and so on But of course, the reality is that we live in a world with deadlines and targets, many of them set by people who have no idea about the complexities of software development.

read more (398 words)

Posted by at /  Software Development / Syndicated: / 0 / 398 words

Aug 2016

Estimation is hard. Estimation has long been the bane of many software developers and software development projects. But there are two secret ways to be able to produce perfect estimates for software development work all the time! One is dependent on talent, and the other is dependent on technology Psychic precognition, i.e. be able to predict the future Have a time machine, so you can go back in time and tell yourself how long the work would have taken Such precognition is necessary to have perfect estimates because of all the unknowns present at the start of a software project.

read more (794 words)

Posted by at /  Software Development / Syndicated: / 0 / 794 words
I like to say that software development is a challenging career because no two projects are ever the same and there are always new challenges to face and new concepts to learn, but the truth of the matter is a bit more complex. Writing software is about breaking down large problems into a series of very small technical problems for which we already have solutions. Examples of small enough technical problems include list sorting, comparison, arithmetic operations, path traversal, string concatenation, returning a string as an HTTP response, rendering text to the screen, retrieving submitted parameters from an HTTP request, and so on.

read more (730 words)

Posted by at /  Software Development / Syndicated: / 0 / 730 words
I was originally going to write a post about the problems development teams face as they get larger, but the section on development standards was long enough by itself so here we are. Having some sort of development standard in a project development team becomes a lot more important as project size goes up (for obvious reasons). There are different kinds of standards to consider, but generally I break them down into design standards and coding standards.

read more (1174 words)

Posted by at /  Software Development / Syndicated: / 0 / 1174 words
Pros: It is a very rewarding career financially. Software development often ranks in the top 10 highest-earning careers in most countries There is a lot of scope – you could be developing web applications, mobile applications, embedded applications, client-side, server-side, data analysis, artificial intelligence, games, etc It is very difficult to be bored. You can always automate away the boring stuff. Different projects always present different challenges. The field is evolving rapidly so there are always new things to learn.

read more (397 words)

Posted by at /  Software Development / Syndicated: / 0 / 397 words

Jul 2016

Evaluation of programmer performance is notoriously hard. You want to be accurate and at the same time fair such that all programmers on your staff are evaluated in the same matter. However, there are no good, objective, universally accepted standard metrics. It follows from the fact that there are no good, objective, universally accepted standard metrics for program size. Typically each programmer in a team will not be doing the same task or even the same type of task, so in order to produce fair evaluations you will need some standard metric of program size to normalize any evaluation.

read more (643 words)

Posted by at /  Software Development / Syndicated: / 0 / 643 words
****Since I wasn’t a graduate of computer science, there were many concepts of software development I really only got exposed to when I started working. One of those was the concept of a relational database, and hence SQL. The company I worked at gave all new hires a training regimen that started with about a week of SQL. Despite not knowing anything about it beforehand, I took to it like a mouse takes to cheese.

read more (1137 words)

Posted by at /  Software Development / Syndicated: / 0 / 1137 words
I never really put much stock in certifications. I felt that they were no guarantee of knowledge or expertise, and that many people who did have knowledge or expertise wouldn’t necessarily have a certification to say so. Add to that it often seem overpriced to even apply for the certifications, so I didn’t have a high opinion of them. That being said, I have had the opportunity to take professional certification exams twice in my life (both luckily paid for by my employer at that time).

read more (945 words)

Posted by at /  Software Development / Syndicated: / 0 / 945 words
A friend of mine had an informal consultation with me the other day (read: asked me questions over FB messenger) about what their IT staff was telling them about a file upload vulnerability that had been recently exploited in one of their applications. Obviously it was difficult for me to judge given that I didn’t know all the details, but for me it was most likely a vulnerability introduced in the application code itself.

read more (649 words)

Posted by at /  Software Development / Syndicated: / 0 / 649 words

Jun 2016

Some time ago, one of my many intrepid followers pointed out that this blog tested poorly on web page performance according to this Speed Testing Tool. Now, I’m of the opinion that for a personal blog such as this, web performance isn’t really a mission-critical sort of thing, but as a software developer who has often had to work hard to optimize the web applications we delivered to our clients, it kind of became a matter of pride :pUnacceptable!

read more (890 words)

Posted by at /  wordpress  Software Development / Syndicated: / 0 / 890 words
I had my first taste with working with software testers during my first project where I was involved with porting an old system to a new version of the software. My first task involved porting reports which were to be generated by the users then printed out. The task wasn’t too difficult: basically you took the source code of the report (it was some weird binary format recognized only by the particular reporting tool – that was how it was done back in the day) and open it using the newer version of the tool, and the tool did some sort of migration magic to adapt it to the new format, then you just save it back again.

read more (1148 words)

Posted by at /  Software Development / Syndicated: / 0 / 1148 words
In the modern era of online services and applications, it is getting more and more common to hear of databases and systems being hacked and user data being exposed. The most dangerous of this data is the user’s password since it may allow access not only to your own service but to other services as well. As an application developer, the below is probably the bare minimum you need to know when handling user passwords:

read more (695 words)

Posted by at /  Software Development  Tech Life / Syndicated: / 1 / 695 words
More stories from the early days. Evaluating someone’s programming ability is hard, especially someone fresh out of college. A student’s grades is in no way indicative of how well he can program after all. So most nontrivial programming jobs have some sort of complicated application process involved. I remember going in and taking an exam. Most application processes will have some sort of written exam to filter out people who look good on paper, but can’t actually do anything.

read more (913 words)

Posted by at /  Software Development / Syndicated: / 0 / 913 words
I once had to advise someone who found himself irritated at receiving lots of comments during code review. I think my response was good enough to quote verbatim: Remember: You are not your code. You are not the hundred or so lines of C or Java or JavaScript or whatever that you wrote today. This problem arises because you are too attached to your code. Your ego is associated with the code you write and you feel that any comments or defects found reflect upon you as a person.

read more (329 words)

Posted by at /  Software Development / Syndicated: / 3 / 329 words

May 2016

A while back I answered a question over on Quora about how I got started down the path of programming. It’s not a particularly interesting story, but I still thought I’d record it here for posterity. Sometime when I was much younger, maybe somewhere between twelve to fourteen years old, I remember having some sort of QBasic programming learning book at home. I forget how we got it, I think my uncle brought it home for me sometime for some reason.

read more (1031 words)

Posted by at /  Software Development / Syndicated: / 0 / 1031 words

Jul 2010

Stack Bragger lets you brag to your Facebook friends whenever you ask new questions or earn new badges at StackOverflow, SuperUser or ServerFault. I was looking for a weekend project and found out that stackoverflow api was released so I thought I’d make a small facebook app. I originally just wanted to post to FB whenever I got a badge, something like how PSN accounts automatically post Trophies to FB. It also posts questions you ask so that any friends you have on facebook not already using stackoverflow might want to help answer 😀

read more (399 words)

Dec 2009

I got tired of having to maintain my own comment moderation system, and I decided against throwing out the django code and going back to wordpress. Instead, I’m migrating the comment system to DISQUS. I love this little mess of django code that’s running my blog. I wish I had time to clean it up. But for now, at least I can have a more industrial-strength comment system in place.

Oct 2009

I’ve been meaning to write a nontrivial app using Google App Engine for a while, and here’s my first weekend project: Decklist Sharing Tool, an tool for MTG players to share decklists online. I had the decklist parsing and autocarding code available for a while (and used on my MTG related posts), so that part was fairly easy, I got it done under 3 hours I think. The rest of the time (around 5-ish hours) was spent on glue logic, fixing minor bugs, working on HTML layout, cleaning up text, etc.

read more (231 words)

Feb 2009

You may have noticed the new color scheme and new “Theme Switcher” widget in the sidebar. I had done some CSS work during the past month in the office and it made me want to tweak the stylesheets on this site a bit. I figured I might as well make it easy to switch stylesheets, so I wrote a small Theme Switcher django app. (Well, it’s more of a stylesheet switcher I guess)

read more (451 words)

Excellent talk given at the Canadian University Software Engineering Conference (CUSEC) last year (2008). The presenter is Zed Shaw who’s a famous Ruby guy or something. The video is around 70 minutes long. The first part of the talk is mostly about a Document Management System he worked on, kinda interesting, but the second part is better where he talks about people who program cool things as a hobby and how to avoid becoming just another corporate code.

read more (101 words)

I was doing code reviews on an interface file-processing framework to be used in one of our projects. The code was workable and already being used by several programs, and I didn’t see any major functional flaws. But design-wise I felt that it could stand for some improvements/refactoring to be “better object-oriented code” or “easier to maintain”. The current design required a lot of inheritance – the usual way of doing things in older Java code at work.

read more (562 words)

Jan 2009

I actually had some trouble using django-pingback on my custom blog engine; the django-pingback documentation is mostly fine, but there were some caveats that I had to discover myself through a bit of debugging: The URL specified for the XML-RPC endpoint in the HTML head needs to be a full absolute url including domain, i.e. http://roytang.net/xmlrpc/, which gave me trouble when I was trying to test using localhost pinging to an online server.

read more (393 words)

For the past few months, I’ve been encountering the COM Surrogate Has Stopped Working Error in Windows Vista, as described here. Unfortunately, most of the recommended fixes on this page didn’t work for me. (I had neither DivX nor Nero installed, etc.) Eventually, I had to download InstalledCodec and use trial and error disabling of all the codecs in my system to trace the problem. I narrowed it down to the Xvid Codec and ended up having to disable it.

read more (80 words)

Dec 2008

My current blog app supports syntax highlighting in the blog posts, something I cribbed off Djangosnippet #119 One problem I encountered was that there was no quick visual reference for the styles available with pygments, so I wrote a short demo page here so that I could easily see the appearance of each syntax highlighting class. Of course, I haven’t had a chance to use it in a post yet…
Frontend: All page templates are valid (X)HTML. However, I choose not to claim valid XHTML (and no doc type declaration) since I can’t guarantee that blog posts I write are compliant! The site uses standard CSS and uses the Blueprint CSS Framework for the grid layout of the page. The site design is entirely original (if not simple and bland – I’m not very good with website design yet!). The site has minor usage of JQuery Javascript library in some parts.

read more (283 words)

I played around with the built-in comments app today, trying to clean it up. Some findings: Some of the moderation views, such as flagging a post or deleting a post, accept a next parameter that determines where the view will redirect to after the operation. However, the way the url’s are set up, there’s no easy way to pass this parameter normally, even through query strings. THis lovely bug is documented in http://code.

read more (435 words)

Posted by at /  royondjango  Software Development / via royondjango / Syndicated: / 0 / 435 words

Nov 2008

I’ve been busy at work so fell a bit behind with Django. Last night I worked on a WordPress importer, so that I could migrate posts from my current blog(s) into the Django-powered blog that I’m coding. I’m using BeautifulSoup to parse the WordPress export file and insert them as Django objects. Since I was running the script repeatedly, I had to figure out how to easily run it from the command line, without having to run it from inside manage.

read more (232 words)

Oct 2008

I wanted to add some basic tagging to my blog app so I tried out django-tagging. Unfortunately, the featured downloads on the Google Code site are quite out-of-date and would not work with Django 1.0, so I did a subversion checkout instead. If you’re getting an error like “ImportError: cannot import name parse_lookup”, then you need to get the source code from SVN. Adding the tagging to the blog was pretty easy:

read more (164 words)

Posted by at /  royondjango  Software Development / via royondjango / Syndicated: / 0 / 164 words
So I got a basic blog app up and running. Posting, paged archives, etc. Comments implemented using the django.contrib.comments. No problems here, the only caveat being most of the current documentation found by Google searches refer to the pre-1.0 version. Need to peruse the official docs for 1.0 stuff. RSS feeds implemented using django.contrib.syndication, this one seems fine. I tested it and it’s running fine on localhost. I also have a free django hosting account at http://bells-n-whistles.

read more (143 words)

Posted by at /  royondjango  Software Development / via royondjango / Syndicated: / 0 / 143 words
My dad asked me to help book a flight from Manila to Boracay for my uncle who would be a balikbayan this weekend. The rates at PAL were better, so we decided to book using their website. I did the search for the flights, booked the seats, input my uncle’s details, etc. When we got to the screen to input the credit card info, my dad went to call my uncle to confirm and to get his credit card.

read more (541 words)

“when redirecting, how can I make the redirect URL decoupled from the urls.py of the parent app?” -> It turns out that HttpResponseRedirect supports relative paths, so this was fine. return HttpResponseRedirect(“../” + str(post.id) + “/”) I got the basic posting structure up. /post/new/ -> To make new posts /post// -> To view a single post /post/all/ -> To view all posts I should probably start thinking of a better url scheme.

read more (167 words)

Posted by at /  royondjango  Software Development / via royondjango / Syndicated: / 0 / 167 words
The quintessential app to learn from is of course a blog. Started using a simple Post model. Added the new post form and view. Can now successfully insert posts into the DB. Next: – create the detail page that will show the post after saving Figure out: – when redirecting, how can I make the redirect URL decoupled from the urls.py of the parent app? i.e. if the parent app has the following mapping:

read more (127 words)

Posted by at /  royondjango  Software Development / via royondjango / Syndicated: / 1 / 127 words

Roy Tang is a:

roytang.net is a personal site, an E/N site, and kind of a commonplace book; I post about a random assortment of topics that interest me including software development, Magic the Gathering, pop culture, gaming, and tech life. This site is perpetually under renovation.