Roy Tang

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

Posts Photos Comments Links Archives Resume About

All entries tagged Software Development. You can subscribe to an RSS feed of this list.

:: 451 words

royondjango software-development

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

:: 101 words

software-development

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

:: 562 words

software-development

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

:: 393 words

royondjango software-development

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

:: 80 words

software-development

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

:: 70 words

software-development

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…

:: 283 words

royondjango software-development

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

:: 435 words

royondjango software-development

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

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

:: 86 words

software-development

21112008130.jpg Originally uploaded by zroytang A while back I got an email telling me that Adobe was sending out free Flex T-Shirts to people who had contributed to Flex 3. I had reported a few bugs on Flex JIRA, apparently that was enough for me to get a free shirt! The picture here shows the back of the shirt, the front just has a small Adobe logo.

read more

:: 164 words

royondjango software-development

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

:: 143 words

royondjango software-development

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

:: 541 words

software-development

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

:: 167 words

royondjango software-development

“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

:: 127 words

royondjango software-development

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

:: 247 words

software-development

I was looking to try out some Flex stuff at home, but of course I didn’t have a personal Flex Builder license I could use. (A coworker of mine wisely advised me not to try using my work license at home.) So I looked around to see if there were any free (as in beer and as in speech) alternatives. The one I found was FlashDevelop. Although the IDE looks Eclipse-like, it’s actually built using .

read more

:: 376 words

software-development

In my continuing quest to become better than everybody else, I spent some time today learning Django (a Python webapp framework) and the Google App Engine. I tried following the tutorials included in the Django Book for a while, but I’ve never taken too well with just typing up examples from a book, so I decided to write something from scratch. I decided to write a simple message board application.

read more

Roy Tang is a:

roytang.net is a personal site; 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.