I have just pushed out the responsive version of this site's theme, so you should see it immediately. Though the various tweaks may not be immediately apparent, the experience of this site on a mobile device or tablet (or a smaller screen in general) should be much better than before. Resize your browser window in the horizontal direction to see the style changes in real time!

There are still a few pain points to work through:

  1. I'm still a little unsure how to handle the syntax-highlighted code snippets in the various posts around the site. Snippets that don't use syntax highlighting will word-wrap, but the syntax-highlighted blocks currently just offer a horizontal scroll bar.
  2. Various images in older posts need to have their hard-coded sizes removed from the img tags, so that they'll scale appropriately. This is just a matter of going through and making those changes.

There could be other issues that I have yet to stumble across. From my limited testing, the site looks alright in Firefox, Chrome, and IE-9. I'm sure I'll be tweaking stuff here and there over the next few days. If you spot problems, please let me know by leaving a comment.

I'm currently working on converting this site's layout to a fluid, responsive-design variant, which will make the site much more usable on mobile devices (as of this writing, the mobile experience is pretty bad). In my efforts to improve the design, I noted that the browser on my Android phone didn't respond to my changes at all. The Responsive Design View in Firefox yielded acceptable results, as did the developer tools available in Chrome (which, by the way, are pretty terrible). So why did my phone look so different?

The answer has to do with the concept of the viewport. I found a terrific pair of articles detailing the ideas behind viewports on both the desktop and mobile devices (be sure to read the desktop article first; it sets the stage for the second). It turns out that my page's header was missing a key meta element, whose very existence we can thank Apple (of all people) for. The tag looks like this:

<meta name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=8" />

Using this meta entry allows devices to scale their layout viewport appropriately. Adding this one element fixed my phone, causing the site to render as expected. There are other articles that discuss this element better than I could, so give them a look. And don't forget this one line if you're designing responsively; it'll save you a lot of potential headache!

I have decided to start using the SyntaxHighlighter package here at this website, to make various code snippets a little easier to read. This package really appeals to me since it supports a number of languages, has a graceful fallback mechanism, and looks nice. Rolling out these changes will be slow, however, since I have to go through and apply some styling to all the appropriate code blocks. As always, let me know if you spot a problem with this new feature.

Missing Backslashes

Feb 14, 2013

I just realized that a number of posts that were imported to this site from my old blog are missing backslash characters. After doing some investigation, I found out that there's an associated WordPress bug (Ticket #21007) against the importer utility. Apparently, backslashes aren't preserved as they should be.

I'm working to fix all of the relevant posts and comments. When I've completed this task, I'll update this post.

Update: I believe I have fixed all of the relevant posts. If you spot a problem somewhere, let me know!

The Firebug extension is a very helpful tool for web development. But did you know that you can use its console as an output target for your Firefox extensions? It's pretty simple to do:

Firebug.Console.log("Text to log"); // Output text
Firebug.Console.log(myObj); // Output an object

Is that easy or what? Having this capability is a great way to print out JavaScript objects from your Firefox extensions, making your debugging life much easier.

I have a Samsung Galaxy Tab 7.0 Plus running the Ice Cream Sandwich version (4.0.4) of Android. For some unexplained reason, the location services feature stopped working a few months ago, but only for what seemed like a few applications. Google Plus no longer knew my location, Radar Now no longer knew it, and the stock web browser was also clueless. Google Maps, on the other hand, knew right where I was. Since I use the tablet in the house, GPS isn't much help. I frustratingly was unable to fix things, until today, when I stumbled on a solution. Here's how I did it:

  1. I opened up Settings » Location services and unchecked the Location and Google search option
  2. I rebooted my device
  3. Back in Settings » Location services, I rechecked the Location and Google search option
  4. I then toggled the Use wireless networks option, and answered a prompt that appeared about using my network location in third-party apps (or something similar; I don't have the exact message in front of me).
  5. Success!

Using GPS to lock in on my position worked outside, but that alone didn't seem to set things right. Disabling the above option, rebooting, and then re-enabling it seemed to do the trick. Hopefully this will help anyone else who might have a similar problem.

I went looking for how to install iTunes recently without the bloat (because I remember seeing an article about doing just that a while back), and though I found the article, it had apparently moved from its original location. As such, I'm going to note down the steps here in case said article ever disappears. The following is intended for use on a Windows 7 64-bit system, but I think these steps should work in general. It's also intended for using an iPod classic, which is the only Apple device I care to use (though these instructions also work with the nano, mini, and shuffle variants).

  1. Download the iTunes installer
  2. Unpack the installer using something like IZArc
  3. Run the installers, using the given commands, in the following order:
    • AppleApplicationSupport.msi /passive
    • Quicktime.msi /passive (if this installer is present)
    • iTunes64.msi /passive

Torchlight 2 Review

Oct 9, 2012

Back in 2009, I reviewed the original Torchlight. Now that the sequel is out, I thought I'd post a few brief thoughts on it as well. Note that I've only played the single-player aspect of this game so far (oddly enough, that's the kind of gaming I prefer). In short, not only does this game blow the original out of the water, it comes close (in my opinion) to doing the same to Diablo 2, which is my favorite action-RPG of all time.

The Good

Bigger Maps
The maps in Torchlight 2 are so much larger than in the first game, that it's ridiculous. There are tons of places to explore, including some sub-dungeons that are completely optional! Make sure you explore every nook and cranny; you might otherwise miss something awesome.
Level Randomization
The randomization of each level is mind blowing. I currently have five characters I'm playing (I've finished the game with two of them so far), and in every play through I've seen something different. And I'm not just talking about level layout; I've actually seen different set pieces every time I've played! Finding new stuff is always a thrill.
Great Graphics
I've seen lots of people complain about the look of this game, but I love it. Sure it may look "cartoony," but that's part of the charm. It's different. And it runs really well on my aging computer, which is always a plus.
New Classes
This time around there are four new classes to play. Although they share some features with the original game's classes, for the most part they are all unique and different. How you play each will change drastically, depending on the build you develop over time. There's a ton of re-playability right here alone! As of this writing, I've completed the game with the Berserker and the Engineer. I'm currently playing as an Embermage, and will try out the Outlander (which looked to be the weakest class) last.
Cheap
It's still only $20!

The Bad

No Respecs
Unfortunately, you can only respec the last three skills you've earned at any given time (for a price!). This makes it very easy to paint yourself into a corner with a lousy character build. Being able to respec all of my character's skills would be great, so I could try different builds on the fly. Hopefully someone will improve this situation when the modding tools are released.
Weak Story (Again)
The storyline in this game is pretty weak (as it was in the first one), and isn't as clear as it should be. I wasn't expecting much, though, so this is a minor gripe.

The Verdict

Torchlight 2 is a fantastic game, and has more fun-per-dollar baked in than any other game on the market. At only $20, the only question worth asking is why wouldn't you buy this game? A+

Even though the site aggravated me at first, I still occasionally troll Stack Overflow. One of the leading problems I see in questions pertaining to PHP & MySQL, is people's use of the MySQL extension in PHP. This extension, it turns out, is being deprecated. But does the documentation reflect this fact? Yes and no.

Certain function pages, such as mysql_real_escape_string, have big red boxes at the top indicating that the extension is being deprecated. "Don't use this", they seem to shout. Other function pages, however, such as the mysql_result page, don't have these warnings. Likewise, the top-level MySQL Drivers and Plugins page lists the MySQL extension first, with no indication whatsoever that the extension is being deprecated.

At the very least, every single documentation page that deals with the MySQL extension in any form or fashion, needs to include information about its intended deprecation. Otherwise, thousands upon thousands of programmers will write code using a plugin that is quickly nearing it's end-of-life. Which, based on what I see at Stack Overflow, already seems to be the case.

Back in June of 2010, I began tracking my weight using the Libra app for Android. For those who don't recall, this app uses some of the tracking ideas presented in The Hacker’s Diet, a fantastic (and free!) weight loss book.

Over the weekend, I finally got the trend line to dip below my target weight for the first time! Here's a snapshot of the latest chart:

This new goal line is slightly modified from my original goal, which can be seen in the old chart:

As you can see, I used to be up in the "overweight" section for someone my height; now I'm down into the "normal" range! I cannot recommend this app highly enough. Simply tracking my weight has been a useful tool in helping me to get a little healthier. Hopefully it can help others out there as well!

After a great deal of preparation, I have finally closed the doors on Year of the Code Monkey, my former blog URL. All of the old URLs should redirect to this site instead, including the RSS feed. If you have a subscription to the old Year of the Code Monkey RSS feed, please update the URL to point to the Born Geek feed instead. At some point in the future, I will remove the redirection rule for that feed.

As always, let me know if you spot some sort of problem with this migration.

I'm in the process of moving my blog posts here to Born Geek. Lots of links, photos, and styles are broken at the moment, so please bear with me as I move all of this data.

Update: The migration has been completed.

Code Articles Moved

Jun 21, 2012

In further preparation for merging my blog with Born Geek, the "Code" section of this website has been relocated. You will now find all of the old Visual-C++ articles filed as back-dated posts beneath the Visual-C++ tag. If you spot a problem with any of them, let me know by leaving a comment here. Below is a master list of the articles, for convenience:

General Articles

Dialog Based Applications

Window Placement and Sizing

Site Design Tweaks

Jun 14, 2012

Over the next few days, as I have available time, I will be tweaking the design of this site. My ultimate goal is to merge my blog with this site, closing the former down once that's complete. The style changes I'll be making are in anticipation of that move.

If you spot something broken, let me know by leaving a comment here, but just be warned that things will be in a state of flux as I make updates.

At midnight Pacific time last night, the highly anticipated Diablo 3 was released. Judging by all the negative tweets I woke up to this morning, I'm glad I didn't buy in to the hype. It seems as though virtually everyone failed to connect to the Blizzard servers last night, something you're required to do even for single player games.

This point really gnaws at me. On one hand, I'm disgusted that you have to connect to a remote server to enjoy a single-player experience. I've seen some claims that this was done to prevent cheating, but we all know that this policy is about software piracy. Who really cares if I cheat while playing by myself? No one, that's who.

On the other hand, I use Steam all the time, which is an (albeit loose) analogy to Blizzard's Diablo 3 strategy. I typically connect to the Steam servers before I play, though for virtually all of the games I own, it's not a requirement. Perhaps it's the fact that you're required to connect that bothers me. It's one more online account that I'd rather not deal with.

A few journalists in the gaming world have predicted that this is the future of single player gaming. Only time will tell whether or not that's true. Maybe this launch will sour people's opinions enough that mandatory online gaming will be deferred for a little longer. As a single-player gaming enthusiast, I certainly hope so.

Last night, I finished reading Zen and the Art of Motorcycle Maintenance: An Inquiry into Values, by Robert Pirsig. What a thought provoking book! It's essentially an introduction to philosophy, by way of the story of a motorcycle trip that a father (the author) and his son take across the country. The narrative bounces between events of the actual trip and a series of Chautauquas on the author's nagging question: "What is Quality?" His explorations of what Quality is and what it means for each of us is very intriguing, and has given me some new insights into what I should be striving for in my life.

That said, this book isn't the easiest read. It's clearly a volume that warrants a second (and perhaps, third) reading. So much food for thought is presented to the reader, that it becomes difficult to digest. Approach this work with an open mind and with an eagerness to learn. Anything less and you may find yourself bored from the start. If you're willing to read through it, however, I can guarantee that this book will leave you pondering the same questions that have haunted philosophers all these years.

One other, similar book that I'd like to mention in passing is The Mind of the Maker, by Dorothy Sayers. I read this particular title before reading Zen and the Art of Motorcycle Maintenance, and found it equally as intriguing. This title is an even more difficult work to get into, but there are such gems embedded within it that the work is worth the effort. Although Sayers's work focuses primarily on creativity and the art of creating, it inevitably ends up treading over some of the same territory that Pirsig's work does. Quality, it turns out, is at the root of everything; very intriguing stuff.

My last post dealt with a few issues I encountered during my first 30 days of using Stack Overflow. I would now like to propose a few ways I think some of these can be smoothed over. This will be my final post on the Stack Overflow topic; I think I've pretty well worn it out.

Hide user scores by default
New users shouldn't see other people's reputation scores by default. If the primary goal of scores is to identify the most "helpful" users in the community, use a color-coded or sliding scale graphic instead. Perhaps low-scoring users are on the "cool" end of the spectrum, while high-scoring users are on the "hot" side. Hiding scores by default seems to me to be an easy way to take away some of the competitiveness, while leaving some sort of means for determining a contributor's "worth" to the community.
Implement a back-off for power-users
The more "powerful" a user (i.e. the higher their score), the longer they should be locked out from answering new questions. A delay of this sort doesn't need to be giant; a few minutes would suffice. For example, perhaps new users can answer questions immediately, an "average" user can't answer new questions for three minutes, and power users are locked out for five minutes. This would encourage newer users to answer the newest questions, and would make it harder for power users to snatch up points for simply being the fastest on the block.
Implement a delay for accepting answers
If a back-off delay is implemented, clearly an answer acceptance delay is needed. Let's say that answers for new questions cannot be accepted for 10 or 15 minutes after they are asked. This would give everyone a chance to form well thought out answers to the questions asked, and would help keep new users from gaming the back-off delay.
Create a better user manual
Hire a competent writer and create a better user manual. This should be self explanatory.

If you have thoughts on these suggestions, I'd enjoy hearing them.

After thinking about it for a while, I've decided to remove the Software section of this website. The applications that were posted were all relatively ancient, and saw little (if any) download traffic.

Contact Form Restored

Feb 8, 2012

The contact form at this site has been restored. If you see any additional problems with it, please let me know by leaving a comment on this post.

Having used Stack Overflow for over 30 days now, I'd like to share a few of my personal gripes with the site. Those of you who are frequent Stack Overflow contributors may disagree with the views I express below; if so, feel free to leave a comment. I'm going to try my hardest to point out issues that seem particularly problematic to new users. My next post on this subject will cover a few ways I think some of these problems could be smoothed over.

Stack Overflow is a game
This is a controversial viewpoint, but one that has some merit, especially for the dedicated user base. Every Stack Exchange website has both points and achievements. Given those two incentives, many dedicated users seem to play solely to "win." If you look at the activity reports for some of the top-scoring users, you'll find that they spend many hours a day, every day, answering questions and leaving comments. I recently viewed one person's profile, and saw that he had answered several questions an hour for over 8 hours in a row (he must not have a very demanding job or life)! How can new users "compete" with folks like this?
The game is, by design, not winnable
The ultimate irony is that the "game" cannot be won. There's no end-point, no game-over screen; just a never-ending leader board. Other than seeing your name among the top contributors, and apart from gaining a small set of user privileges as your score increases, what's the point? Why have points and achievements at all? I can understand wanting to foster constructive discussion, but won't that naturally occur given the question and answer voting mechanisms? It seems to me that if points were left out altogether, good answers and good questions would still be easy to find, taking precedence over less useful material.
Being fast is often a requirement
This is my pet peeve with the site. Because Stack Overflow itself has so many "players," and because they are all playing for the same points, it's inevitable that faster players end up scoring more than slower ones. I pity the person who yearns to contribute, but whose motor impairment makes it difficult to respond in a timely manner. So too the person who may really know what they're talking about but, because they post in haste, their answer contains a mistake, resulting in its being down-voted by trigger happy power users.
The instruction manual stinks
Like most documentation developed by engineers, the training manual is way too thin. I cannot stress this highly enough. For the first few days on the site, I was overwhelmed by all the various rules and regulations. Most of my "education" came through mistakes I made early on, some of which resulted in a punishment to my score. It doesn't help that one must dig down into another site to find a fuller set of instructions, many of which should have been in the training manual to begin with. A set of tutorials describing how the site works is sorely needed. I'm a reasonably intelligent person, and if I'm having trouble, think about how many others are out there having the same problem.
Established users are generally rude to newbies
This is a problem that cannot be solved. People are jerks. But the points system really exacerbates the issue. I've seen so many negative comments towards new users trying to answer questions; especially towards those who make mistakes in their answers. I had hoped that people would be friendlier, seeing as everyone's goal is (hopefully) to learn and grow as programmers. Sadly, that wasn't the case. I guess I should have known better.

Now that my 30 days are over, I will be dialing back my use of the site considerably. My original intention of helping others may have been noble, but it turns out that there are already too many operators standing by. I question whether that game is really worth playing.