Test of Microformatter
Posted in Uncategorized on December 12th, 2008 by Alan Hietala – Be the first to commentthis is a test of our awesome office
this is a test of our awesome office
I’ve been dealing with some API’s lately some better designed than others. One thing struck me while I was coding away. wouldn’t it be neat if your IDE could show you what methods were usable based on a set of preconditions for those methods?
Here is an example of what I mean. Method 1 requires nothing but the object to be initialized. method 2 requires authentication and therefore either the object to be initialized with the correct information or have an authentication property set. If these conditions aren’t met the intelisense would show the method as not having all of its preconditions met and you would know that something else needs to be filled out in order for your code to execute properly.
Granted, if the API is built properly an exception would be thrown that would let you know what was wrong, but alas not all code is created equal.
one good way would be to support this type of metadata in the comments much like how javadoc etc is generated. It could take the form of // pre:this.constructor(string, int)||this.someproperty = set
meaning that this method requires the constructor to have been called in its string, int overload, or that someproperty is set.
This would help big time in a compiled language as no compile would be necessary to catch oversights. It would also help with code genereation as a developer could simply select the precondition they want to fill out and have it show up in the code nicely.
This would also have a nice side effect of developers having incentive to write comments something that are often too few and too far between.
I was reading a brief article over on Lifehack.org about Confirmation bias. Essentially it boils down to the fact that people are more likely to seek out confirmation that what they have done is correct. In doing so they may overlook tests that don’t fit the solution that they have in mind.
The article gives the example of sets of 3 numbers that satisfy an unknown set of conditions. When people are presented with one known correct answer of [2,4,6] they assume that the pattern is [2x, 2(x+1), 2(x+2)] and don’t bother to supply sets of numbers that fall outside this assumption. Through doing this they may miss a key aspect of the unknown set of conditions and assume that what they have derived is correct. If the pattern that gives a correct solution is any even number, all of the tests that are derived around the initial incorrect assumption will pass, but the true nature of the conditions that yield a correct set is still not properly explored. In this situation only a small subset of correct responses are assumed to be correct.
In software testing this type of bias can lead to test cases that only test the obvious output and input. Most bugs appear when input outside the norm is passed in and A good tester will not only test for a correct result from well formed data, but a correct result for garbage data as well.
Another form of bias that the article talks about is clustering bias. When a person is presented with a number and then asked to answer a numerical related question such as how many countries are there that end is stan, they will cluster their responses around the number they were given previously.
In software testing this type of bias can lead to test cases that are similar enough that they don’t test anything else of real value. All of the test cases need a very specific aspect of the code that they should test. If your tests for different functions are cut and paste jobs from other functions chances are you’re going to miss something.
The testing mindset is one of assume the code is wrong, what would prove with reasonable certainty (we’re not writing proofs for shuttle navigation software here) that your own assumption is incorrect. Falling into one of these biases when writing test code will render your tests next to useless as the likelihood that something important gets missed will increase dramatically.
I’ve been using leopard since launch and I have to say that spaces is fantastic. I find with a multi monitor setup spaces truly shines. With only one monitor I find there isn’t enough real estate to display applications that are related to a specific task, but with 2 or more, spaces shines.
Currently I have Parallels running on one monitor and a web browser in the other. Spaces was made for parallels, running a virtual OS full screen lets me easily switch to my other applications running in another space, without having to pop out of the full-screen mode of parallels. The other benefit of this setup is that your dock is visible in one monitor while parallels is full-screen in the other.
Once all of your applications are set up in their appropriate space, switching between tasks is simple. ctrl 1 brings up my email and iTunes, ctrl-2 my IM, ctrl-3 is reserved for random applications that I don’t have a space for, and ctrl-4 is my Parallels work space.
I’ve found I’ve been able to stay focused on a task without being distracted as much which is a great additional boost in productivity.
If you’re running Parallels I suggest highly that you upgrade to Leopard, spaces makes it well worth it.
I haven’t been playing World of Warcraft in 8 months or so but the organization that I started Horde To The Core is going strong. Comprised of people from many guilds across the Durotan server it is one entity that has survived through the worst a low pop server can throw at it.
i
I think part of the reason it is still so successful is that from day one I was actively ensuring that each role could be covered by multiple people. Yes, I could have let my ego get in the way and ensure that I was the “Main Tank” all the time but this does little to grow the survivability of the organization.
By encouraging others to try their hand at leading the raids, I was never in a situation where a raid could not go on because one or two key people weren’t there.
The major thing I have learned from this is that it is essential that you let the natural leaders that are a part of your team have a chance to shine. They are incredibly valuable but if I didn’t leave my ego at the door they would have never been able to carry on leading raids and making HTTC even better after I stopped playing.
The sense of community that HTTC creates is like no other. Without fostering that community HTTC would have crashed and burned. By balancing praise and constructive criticism everyone feels like they are having fun but also contributing and learning at the same time.
All of these angles have come together to make HTTC one of the most successful raiding organizations on Durotan.
Whether in a game or managing a software team, These lessons apply to all as they are about keeping people happy and productive.