Monday, May 24, 2010

Tester-driven development? What is the proper utilization of QA?

I was reading about more software development anti-patterns because on Tuesday I'll have to conduct a code review for a particular client. I managed to somehow stumble on to Tester-Driven Development. I honestly thought it was a typo and assumed they meant Test-Driven Development. I started laughing at the fact that there are projects that allow QA to drive the requirements of the application--but hey? Sometimes projects are so terribly managed that it happens!

If you ever find yourself on a project where production-level people (Developers, QA, Designers) are creating the requirements instead of the primary stakeholders, you better take a step back and think about how bad that could turn out. Oh wait, I forgot you could be telepathic and just automagically know what the client wants.

Here's my two cents.

When a web project starts, the respective discipline leads (developer, QA, design, project management, stakeholders) need to figure out what their strategic goals are whether they are long-term or short-term. The reason why we have QA in at the start is to ensure that a lot of the functionality being built is not going to be a bug. Two really good examples I can think of off the top of my head would be scrollbars and IE6 graceful degradation. When running through a website that has a lot of transparencies, rounded corners, and drop shadows in Internet Explorer 6, you're bound to run into a "wat teh fuk" moment.

The best thing to do is to ensure that everyone (even the client) is aware that IE6 is an archaic web browser and doesn't support certain functionality without spending an extensive amount of effort hacking it into the application. This is why we employ graceful degradation on the agreement that there will be some 'weird' things happening for any IE6 users. The application will continue to function normally but there will be quirky things in the view, such as, fonts won't look anti-aliased or drop shadows won't be fully supported or transparencies won't be fully supported. Even Facebook, the biggest social network with over 300+ million members has decided to drop support for IE6. You can use this argument when you're explaining to the client. If they are hard set on supporting IE6, then it will impact both QA and Development time. Ultimately, depending on how complex the application you're trying to build, it could even double your hours just having IE6 being fully supported. Adding to this, you should definitely look into the web traffic metrics to see which browsers their customers are using. If IE6 is a minority, use this to your advantage in your argument towards partially supporting IE6.

Once the client understands that their customers using IE6 are a minority or it just isn't worth it, we can filter that down to the rest of the team. I truly believe that QA is underestimated in all agency work that I've dealt with. Most people above production-level work (project managers and up) just think QA click the application and try to break it. That's probably only 5% of the work they can actually do. Since we're bringing in QA at the start of the project, it allows them to write clear and concise acceptance tests for the requirements, as well as, prepare their automation tools for upcoming features.

Sadly, from what I've seen, they aren't utilized for those roles. They are simply clickers and subject to late hours because defects need to be regressed. If it was up to me, I'd have the whole team test the application--you'd be surprised to know how many project managers don't even know how to use the product they're building.

Starcraft 2 Map Editor will use Galaxy (Blizzard's nerfed version of C)

I recently stumbled upon this video showing the power of Starcraft 2's new map editor. Blizzard intends to have a "map store" much like the Apple iTunes app store for people to buy and download maps to play. Based on a little bit of research, it turns out SC2's map editor will be using Blizzard's version of C called Galaxy. This is actually pretty awesome compared to their older games.

Warcraft III Map Editor JASS is terribad

Warcraft III's map editor uses JASS which terribly fails in all angles. Firstly, its context free, allowing developers to run rampant with their spaghetti code. Secondly, it's infested with memory leaks. Thirdly, it has the shittiest, dumb down syntax that you'll ever see.

Let's check this out:
function Trig_JASS_test_Actions takes player p returns nothing
 local integer i=0
   exitwhen i==90
   call DisplayTextToPlayer(p, 0,0, "Hello, world! "+I2S(i))
   set i=i+1

"takes player p returns nothing". Terribad. Go away.

Wishlist for Starcraft 2 Map Editor

Easy to use API for Data Stores

Even if Blizzard just sell hosting for a database on, this would allow map editors to essentially create persistent stats for players. For example, in the 3rd person shooter, what if the map editor expanded towards providing rankings for each player? I ran into this problem while building a World of Warcraft addon. All the persistent data would be saved to a SavedVariables.lua file, which is absolute shit because clients that use the addon won't be able to synchronize their data unless they redownload the file from some shady website.

Verbose usage statistics for Maps (much like Omniture, but for maps)

As many of you know, starting out with a Map may be fun but to really achieve success you have to keep constantly measuring its performance. If you find that certain players like one aspect of your map, perhaps you could invest more time into that particular feature so that you can keep your customers happy. If you're a sole developer trying to make money off the Map Store, you would definitely agree with for this reporting software.

Not so shitty debugging tools

The xcode tools provided for iphone app development allows developers to constantly monitor their application's performance in real time. Subsequently, you can easily fuzz out memory leaks with these kinds of tools.

Each update to the Map should not charge the user

If a user on decides to purchase your map for $5 USD, they shouldn't have to repurchase it when you roll out hotfixes.

Fast approval process for deploying new maps

We all know about Apple's retarded approval process for applications. As a developer, we need to be able to deploy hotfixes or major patches without having to wait 6 months for some asshole to approve it.

Open source MIT Maps if they are freely downloadable

All maps that are free should have their source released to the public. I believe this won't happen because of their digital download business model; could you imagine if Apple iTunes Apps had their source released? :) It's all good though--that's what de-compilers are for.

Can't wait for the SC2 Map Editor.


Sunday, May 23, 2010

Plenty of Fish is able to predict who you will marry

I tend to read Markus Frind's blog a lot because he's a successful, local vancouverite developer that built Most of the time on his blog entries, he goes on to detailing his experiences with ad companies and how a lot of them are shady. In his latest post, he claims to have developed a dependable algorithm for predicting who you will marry or enter into a relationship with. This is rather interesting because I don't believe that any other free online dating site has this technology. Here are the dimensions the algorithm uses:

  1. Self-Confidence: This dimension was created to measure the extent to which an individual feel comfortable with him or herself. The items in this dimension reflect elements of self-confidence in both private and public contexts.
  2. Family Orientation: This dimension was developed to assess the degree to which a person possess a family orientation.
  3. Self-Control: This dimension measures the extent to which a person exerts control over sundry aspects of their lives and the lives of others.
  4. Social Dependency/Openness: This dimension measures the extent to which a person is open to and dependent upon other people.
  5. Easygoingness: This dimension taps into characteristics associated with being relaxed and psychologically flexible.
  • Married couples who met online have an average courtship period of 18.5 months. Married couples who met offline courtship period last on average 42 months.
  • The Better Business Bureau in the US said in 2009 they received 2,660 compaints about dating services. In 2005 they received 824 and only 126 in 2004
  • The online dating industry is now worth $4 billion worldwide.
  • In 2010 it is estimated that Craigslist will earn $122 million with $88 to $99 million being profit. The Adult Services listings make up 30 percent of the revenue.
  • In the last year 17% of couples who married met on a dating site.
  • 1 in 5 singles have dated someone they met on a dating site.
  • 1 in 5 singles are currently in a committed relationship with someone they met on a dating site.
Although having the ability for predictive marriages seems ridiculous, the ability to predict who you will get into a relationship with provides the most value in using Plenty of Fish. I don't use the site, but essentially instead of searching for people (millions) and engaging them, all the grunt work is done by the algorithm to narrow results. The more you use Plenty of Fish, more of your behavioural tendencies will be tracked, ultimately making the predictions more accurate.

Blast Mojo Tutorial (Episode 3): How to invoke a web service

In episode 3, we go over the following:

1) Creating the markup for our application
2) Enabling the templating feature in Blast Mojo
3) Creating a dummy data provider
4) Implementing a Service Locator
5) Invoking the web service within a Command
6) Rendering that data from the web service into the view

As for episode 4, I've started to employ full screen code in the recordings, overviews where I go over the parts in the video, as well as, copy pasting more and then explaining what the code does. In Episode 2, I did a lot of coding on the fly which led to spelling mistakes or syntax errors. Thanks for the feedback Loyal! That said, episode 4 has hit a snag. It turns out that Mojo's Standard Library is not open source, so I can't go about writing public code tutorials--so I've decided to change its topic from "Using Mojo's Reusable Controllers in Standard Library" to "Creating Your Own Reusable Controller".

Stay tuned!

Wednesday, May 19, 2010

Blast Mojo Tutorial (Episode 2): How to build a Hello World application

I've been playing around with for a while now and I recently started becoming more and more passionate about creating tutorials for aspiring web programmers. Even though this is just my first tutorial video (doing random episodes before I do episode one, as episode one will be quite heavy on the theory portion of Blast Mojo), I've learned a few things:

  1. Use a higher zoom on TextMate so that the viewers can see the code more clearly
  2. Use better transitions in between cuts, it seemed very jagged playing it through
  3. Be consistent--you'll see that iTunes appears in the 2nd take
  4. Increase microphone volume, the music started to overtake my narratives
Episode 3 will go over using the Service Locator, invoking a web service, and displaying data. Stay tuned for it next week!


Sunday, May 16, 2010

Honesty over the Internet: Sales of Virtual Goods

If you watch the video you'll see that Markee produced it because of a mishap recently. After a "customer" made about $20,000 in purchases for virtual goods, they did a reversal essentially having that amount of money returned. Incidentally, there is a certain amount of time that a user can reverse purchases ( I don't believe a user can reverse a purchase that was made 3 years ago)---in this particular case, the amount it was stopped at was approximately $13,000.

In the end, notice that Markee's message is about stealing from companies that sell virtual goods and how the level of honesty in parents can directly affects their children's perspective on stealing.  Although his company did take a large financial hit for the customer's reversals, it is more of an issue for his company to step up their legal strength.

A customer should never be able to reverse purchases after 30 days. A terms of service/use is very important. If you look at company that has an air-tight terms of use--look at World of Warcraft's. There is absolutely nothing that a user can do to put Blizzard Entertainment at a bad position even when the game itself encompasses a plethora of scams, phishes, and frauds.

Lesson learned--that goes to tell you that there are many dishonest and dishonourable people on the Internet and companies (in sales for virtual goods) need to take the necessary steps to establish a higher level of legal control.

Monday, May 10, 2010

TextMate Tutorial: How to add a Strikethrough keybind to your Markdown bundle

Markdown is awesome for quickly generating Readme's on Github. After looking at other projects using the strike tag, I've decided to create a custom keybind for it in my TextMate Markdown bundle. Here's how:

1) Click the + sign on the bottom left and click New Command.
2) Paste this into the editbox and make sure you name your command "Strikethrough".

For the input field, select WORD in the drop down.
For the output field, select "insert as snippet".
As for the keybind, you can totally map it to whatever you're comfortable with but I chose Command-D as it is the same thing in Microsoft Word.


World of Warcraft Ninjalist addon: version 0.1 coming along quite nicely

After toying around with more GUI related issues in World of Warcraft's API, I've decided to take a totally different direction. Originally when I architected this addon, I knew in my mind it would be a super simple Console application that a user could easily paste in a name and add it to the database; however, why stop there?

After discovering AceGUI, I can easily start developing UI components in no time! As of right now, I've got it saving data in between game sessions--the interesting part will come when I'll have to develop the web service that will parse the SavedVariable.lua, eliminate duplicate entries, as well as, do a huge merge between their copy and whats on the server's (per realm basis of course).

Here's a screen shot of the responses when adding new Ninjas to your list:
When a user clicks add after entering a name in the textbox, it'll go ahead and add that person to the ninjalist tagging the user's realm and current date/time. Someday, I'd like to go further and somehow implement item recording (a ninja took X, Y, Z items from Vault of Archavon); but that's for version 2.0.


How to persist data between sessions in your World of Warcraft Addon

After fiddling around with trying to save data between game sessions, I've laid out a few lines of code that could easily used in any sample addon you ever decide to develop. Assuming that you've already setup your hello world addon, you can simply add these lines to to your OnInitialize callback to create a new data store.

Now if you want to save data to it (or insert a row), do the following

If you want to read off of the data store, do the following

The reason why I put 'global' is because global signifies storing data for all characters between the account. As the developer, you have a choice of scoping:

  • 'profile'
  • 'char'
  • 'realm'
  • 'race'
  • 'faction'
  • 'class'
  • 'factionrealm'
  • 'global'
  • 'profiles'
Since the addon I'm developing stores data across all characters I set mine up for global data collection.

Sunday, May 9, 2010

Google "Jaime Bueza"--I've come a long way since I was a young Ninja

Have you ever googled your name? I recently went about googling other colleagues of mine and the results were always their digital portfolios or resume; however, mine turns out to be a broken blog and 6 year old forum topic I created about how to set ranges on randomly generated numbers. I was terrible.
October 10th, 2004 I posted on asking about how to set a range on a randomly generated number in Java. I can't believe that still shows up on Google's search results when you search "Jaime Bueza". 

Here's a few points of advice for aspiring software developers:
  • If you're going to ask a trivial question, ensure that you sign up as a troll. Name yourself: "lolyougotowned" or "trollpride" or "trollingftw". Don't put your real name down when you're asking technical questions. I'm sure that these search results will be detrimental to my career down the road.
  • If you're going to ask a trivial question, ensure that you've taken the necessary steps to hide your tracks (using a troll email address, etc). 
  • Given the fact that all technical interviewers will Google your name, ensure you can 'seed' your results to be in your favour. Use your SEO skills here! If you can somehow tilt the results in your favour (linking to your latest projects or a really intelligent response to an open source technical topic)--DO IT! A true Ninja will always tilt the situation in his favour for positional advantage over his enemies!
Incidentally, I asked that question on because of my undisciplined work ethic back in the day. Before I enrolled into the BCIT CST program, I always wanted to learn things without actually picking up a book (learning by example on the web). This was actually a bad idea for me as there's so much garbage on the web. The problem back then was that I had no formal development training, so I tried to learn how to code by myself. In my opinion, the best way to learn on the web is ensure that you have a solid foundation of knowledge: architectural skill set (design) and an understanding in different philosophical approaches to developing software (patterns). If I could turn back time; I'd ensure that I learned topics, such as, OOP, AOP, and inversion of control. I'm sure that if I had a solid understanding of those concepts prior to BCIT, I would've been more experienced in putting them into practice on different projects. If you have a strong foundation in regards to software development approaches and philosophies, learning a new programming language will come naturally.

Ultimately, languages, frameworks, and toolkits all fade away as time goes on; however, philosophies and approaches remain to be forever unchanged given how fast technology evolves. This is absolutely necessary to understand as this really shows how truly strong a programmer is: his ability to adapt to change and to be able to be successful in any language. This post is a segue to my next post about how to be a Kage developer (if you've watched Naruto, Kage is the highest ranking Ninja). 


PS: I don't even watch Naruto; but it's cool they have a ranking system for Ninjas. 
PPS: I wrote this blog listening to TI - What You Know on repeat.

Iron Man 2: Apache configuration files show up on Iron Man's HUD UI

Whenever they show Iron Man or War Machine's HUD user interface, you'll see at the very bottom it said:

<IfModule ____>


Are we to believe that Tony Stark was adamant about Apache configuration file syntax? Just joking--the person who designed it from a movie was probably being creative, so he copy pasted some stuff from his Apache configuration file.

I don't want to spoil it for you but I felt like I had to talk about this: whenever someone non-technical tries to be technical. A perfect example of this was the Hammer Industries CEO. When Ivan "hacks" his encrypted software and the Hammer Industries CEO says, "Wow, you totally bypassed the firewall so fast". Wait a second. Firewalls essentially protect the system from outside attackers (emphasize outside trying to come in). So why would they even care if it was a terminal INSIDE the corporate infrastructure. Totally defeats the purpose of network security. 

Another terrible example of "code" showing up in movies is: This movie has HTML/CSS/Javascript in the introduction graphics! Also, if you think about the plot, they're using Javascript to communicate with a satellite-based interface. I think these guys are way too ahead of our times but when the day comes for raw Javascript to have the ability to control satellites--I'll be a very happy man.

If you haven't seen Iron Man 2, go watch it--it's a great entertaining movie. I watched it with my family for Mother's day.

The absolute best site for Apple product buyers

So, after a terrible experience on Ubuntu for my father, I've decided to just go buy him a Mac Mini. Firstly, before I pull out the credit card, the first thing I do is go to MacRumors and look up the last update date for the Mac Mini. Incidentally, the Mac Mini was last updated on October 2009. That said, I'll be holding off on my purchase for a while as Apple may be updating these machines sometime within the next few months.

After buying so many Apple products, I've come to realize that if you're going to buy any Apple hardware, you need to buy it ASAP after it comes out. I made the huge mistake of buying an Intel Core Duo Macbook a few years ago, receiving it, and then 4 days later Apple releases an Intel Core Duo 2 Macbook with a bigger hard-drive and a lower price tag.

It's okay though--Pudge (the name of my old Intel Core Duo Macbook) lasted for a good 3+ years until he passed away from an accidental swim in "diet coke".

Dear Adobe, your Flash player has terrible performance on Linux platforms

After doing a simple 1-2 hour install on a new Ubuntu box, I decided to surf a few HD videos on YouTube. The reason I installed Ubuntu is because I wanted to test out the user experience of 'web surfing' on a Linux platform. Turns out, Adobe Flash Player has terrible performance when loading anything labeled "HD" on YouTube.

At first I thought it was just YouTube's video player, but I went to Vimeo and tested a few of their high definition videos and the same issues occur:

  • Ridiculous CPU spiking to 95%
  • Framerate for videos drop to 1-3 FPS

If you take the same box and view the videos on WIndows or Mac OS X, you can see such a huge difference in performance. Since pretty much every video site you'll ever encounter is powered by a Flash player (instead of HTML5 video!) I doubt that Linux will ever be a great user experience for a casual user (only watches videos, reads news, checks email).

Now that I've mentioned HTML5 Video, go check out my fork for HTML5 video implementation with Flash fallback for the poor IE users


Part 2 on dealing with Ninjas: This addon will blow your mind

If you've checked out the code on my github, you can see that it's already setup to take commands and start saving names in between game sessions. Incidentally, this doesn't exactly solve the problem with providing users with an early warning system of any ninjas in tehir raid group (for themselves yes, but for others no). To solve this problem, I thought of a web service that I'd have to build that gave users the ability to upload their .lua file of SavedVariables. Essentially, the following flow would happen:

  1. A user will upload their WTF\Account\ACCOUNTNAME\SavedVariables\Ninjalist.lua file to the web service
  2. A user will then have to specify what realm they are on in order to scope the query
  3. The web service will take their Ninjalist (Table variable type in Lua) and merge it with any other Ninjas in the database but is specifically scoped to only those within the same Realm.
  4. The web service will return a new Lua file with the merge completed and the user can place the newly generated Ninjalist.lua file into their SavedVariables folder

Does this seem complicated? The reason why I'm building this web service is because if you've read the first post, addons don't have any API of invoking anything external to the game.

Part 3: Merging and the construction of the web service--Coming soon!

PS: Here's some sweet programming music:

This song is actually from the Oceans 12 movie (the laser dancing scene)

Social architecture of World of Warcraft: Dealing with Ninjas

Contextually speaking, Ninjas in the World of Warcraft are people who purposely make the effort of lying to 24 other people (a raid) about fair looting rules when in reality their intention is to steal all the items.

Can software really solve the inherent problems in World of Warcraft's social system?

The problem with World of Warcraft's social system is there are no enforcers that punish people for stealing. Can you imagine a world where anyone could steal from you because there was no law enforcement?

As soon as I saw my distressed guild mate say that in chat, I started to think: if there's no enforcement on who steals something in WoW, could a tool be made to at least warn the user before cooperating with a ninja so he/she could avoid getting stolen from? Ding.

After I gathered my thoughts, I said to myself that I would create a World of Warcraft addon that will query a remote database for a subset of names inside their current raid (when the user enters a raid group). Ultimately, the addon would verify if any participants in the raid group have any accusations of stealing items. Little did I know, the following would happen to me:

Part 2, coming soon! I have the code that I've written so far on Github.

I'll document my trials and tribulations of solving this social fail in World of Warcraft. Believe it.