testing tangible assets

What do I mean by tangible assests?

Well, in the case of a web app, one of the most distinctive tangible assets is your domain name. How often have you heard of a company having trouble because their domain name didn’t get renewed in time, taken over by someone nasty or their registrar messed up?

One suggestion I saw recently was to add a test to your testsuite to make check the status of your domains along with other information such as which IP address it was pointed at, etc.

In the perl world, you can use Net::Whois::Raw to get information about the domain and check for renewal date. At some point I’d like to get a module up onto CPAN that will let me just ask for domain_ok('foobar.com'); but it will have to wait for a different day.

What other tangible assets do you test for?

(Slight advert)… Cloudtone Studios is an OpenSRS reseller and you can register domains through us with free privacy support and free DNS available at http://domains.cloudtone.ca/

test plan numbers

So I’m briefly going to talk about test plan numbers here, mainly in response to mst’s blog post, where he expresses his opinion that test plan numbers are bad. I happen to disagree with him in some respects and agree with him in others (we’ve also discussed on IRC briefly).

Matt’s verdict is that test plan counts don’t gain you anything as we don’t need to worry about arbitrary

`exit 0;`

showing up in CPAN code and the like. However, I think there’s a deeper problem with not using test plans as there is code that can happen in tests at runtime that wouldn’t show up as a failure in a test run.

Imagine the following scenario:

While this looks like it’ll run just fine, imagine that there was a bug in $obj->gain_results() that caused it to either return early, or something like an off-by-one error. Your test would run through, but you wouldn’t see the failure and ship buggy code to production. Now, the actual solution to this is to use the right tool for the job and use a test function like is_deeply() or something from Test::Deep or the like; but I’ve seen code like this in multitudes of test suites.

Using a test plan with your expected number of results would have thrown this test up as a failure, with perhaps some diving in to investigate the cause, but you’d at least know there was a regression. Personally I’ll use the right tool for the job and test plans as they give me something to fall back on.

Matt makes a very good point regarding merging of branches and test counts, but I think I’d rather take the hit at merge time, since I’d be dealing with merging issues anyway than have the prospect of a not-easily traceable regression on my hands. When I’m reviewing code changes, I also find it handy to see if tests have been added or removed to double check that I’m not re-covering the same code with the tests I’ve added.

Opinions?

Making perl tests more readable

How many times have you gone through a test script from an outside project, or an older project and read through the source and found that you couldn’t discern the meaning of the test? For me it’s been plenty of times and especially so with test automation using things like selenium. This is part of the reason that Test::A8N exists, to make test automation understandable, even over time and with changing implementations.

One of the simplest things to do to help improve the readability (and therefore maintainability) of your test code is this little tip that I picked up while working with my friend Luke Closs (thanks Luke!).

When writing your test code, simply wrap your related test code in a named block which describes what this part of your test script is testing. Here’s an example from the Net::API::RPX distribution I have on CPAN:

As you can see it’s a pretty simple thing to do and might not indicate much value. However, when your test script gets into the hundreds to over a thousand lines of code, it becomes quite easy to lose the meaning of the test in all that source code, especially when you start re-using variables and the like. As well as being more readable, the named block gives you a lexical scope so that you can be more strict about which variables are re-used between test cases.

I certainly found that writing my tests in this fashion have helped improve my tests and ability to maintain my tests many many times over. Hopefully you’ll find it useful too.

Testing and all things QA

I’ve been a longtime proponent of testing software products and have built up a lot of ideas and methodologies over time. When I’ve been consulting with clients, it’s been difficult to express these ideas and methodologies to people in a succinct and easy to digest way.

I’m going to start writing some articles on testing in a hope to help line these things up into a more digestible format and help firm up some of these ideas in my mind to make them easier to communicate to people, especially those who haven’t come from a testing background.

I’m sure that this will be a useful exercise for myself and also provide some interesting reading material for people. First post in the series later.

earning an easy $100

I’m currently in an odd sort of place with the business. I have enough work from clients to keep me busy, but I don’t want to get too comfortable in that scenario. It’s usually when you do that, that things will tend to fall through for you.

I’ve only lived in Vancouver for about 3 years now and while I’ve met a bunch of people, I don’t really know too many people outside of the tech sector. When I’m talking to techies, they’re not generally too interested in talking business and a lot of them aren’t in a position to do recommendations about consultants/contractors. It’s also difficult to get your face and name known in a local market, when all your clients aren’t in the same country.

Since leaving the UK, I’ve also lost the majority of business ties and leads that I’ve had which means that I’d have had difficulties on top of the time zone difference to garner business from there. So since I don’t have the same large local acquaintance pool that some of my friends have, I thought I’d try an experiment.

I will pay anyone who provides a referral to Cloudtone that leads to an actual business transaction, $100. You can use the form on the Cloudtone website, forward my e-mail address to a prospective while letting me know or even just introducing someone in person.

What do you think of this idea? Should I provide more information? Are people confused as to what Cloudtone offers?

internet meme no. 1

I haven’t really been tagged for any of these internet memes, but Jen had an open challenge on her recent one, so I thought why not. The answers below are about Jo and I.

What are your middle names?

Mine is David and Johanna’s is Elizabeth. The whole “two middle names” thing seems pretty popular here in Canada, but it’s uncommon to have more than one back home.

How long have you been together?

We’ll have been together for 10 years in June and married for 4 in September.

How long did you know each other before you started dating?

We had met at my church about a year prior briefly, but it was a chance meeting at a mall in the centre of Belfast and a mutual friend that got us hooked up.

Who asked whom out?

I’m not entirely sure, I think I probably asked Johanna out as the traditional man thing to do.

How old are each of you?

We’re both 25 and Johanna’s the older (by a couple of months… that cradle snatcher!)

Whose siblings do you see the most?

In terms of “see”, probably Johanna’s as my sister refuses to get in front of cameras. In terms of “in person”, neither really, as any visit to see them is kind of a big deal for us and we’ll try to get to see all of them in a trip.

Which situation is the hardest on you as a couple?

Probably our tidiness or lack thereof, it can be a real source of strain. I think we also find not having our families close by is tough on us generally, though I now keep in far better contact with my family now than when I was living in the UK (phone call at least once a week, skype once a month or so).

Did you go to the same school?

Nope, Johanna went to school in her hometown and Edinburgh and I went to school in Belfast, Holywood and briefly in Johanna’s hometown.

Are you from the same home town?

No, but it’s close enough. I grew up in Belfast and Jo grew up in Bangor which is only a 20 minute drive or so.

Who is smarter?

I’m not keen on this question, but it’s totally me. I’m the more math-ey, science-ey of the pair of us, however Johanna’s the academic one, loves learning and reads pretty much non-stop. Actually I’ll change my answer… I think it’s Johanna, mainly because I want to be more like her in this regard.

Who is the most sensitive?

Johanna I think. I’m a bit more of a realist and it can definitely come across as a bit harsh.

Where do you eat out most as a couple?

Since starting the business we’ve generally stopped spending on ourselves and when we do go out it’s usually with friends so I can’t think of anywhere specific. Having a variable income really makes you sit down and take a more active role in monitoring your spending habits.

Where is the furthest you two have traveled together as a couple?

Canada/UK (depending on which direction you look at it from). Other than the emigration and obligitory trips back to the UK, the furthest we’ve been together, is the south of france where we went for our honeymoon. However we’re off to Europe this summer and we’ve got plans to get out to Japan for a big trip at some point in the next year or two.

Who has the craziest exes?

I was actually Johanna’s first boyfriend and I didn’t really “date” too much before I started going out with Johanna. So since I’m the only one with exes I suppose I’m the one with the craziest ones.

Who has the worst temper?

I think it’s probably Johanna, but I can be pretty bad at times. We don’t get into barneys that often but we can definitely rub each other up the wrong way in how we respond during one.

Who does the cooking?

Johanna… I can and do cook pretty well, but I don’t have the patience for it. I think because my mum cooked all day and then did an awesome job when she came home, I ended up as my own worst critic when it comes to cooking. However Johanna’s cooking has definitely improved a lot and I promised I’d cook more to give her a break.

Who is the neat-freak?

I am. Both Johanna and her sister, when they stay anywhere for long enough will “explode” all over a room; it’s a sight to behold. I tend to want everything to be super tidy, but I eventually give in and become messy too. When I decide everything is too messy I’ll go through a 3-4 day phase of just cleaning and it’ll be spotless… that tends to last for about a fortnight and then it’s back to messy. Ah, the circle of life.

Who is more stubborn?

Me. Once I’ve made my mind up about something, it’s pretty hard to change my mind, though I’ve been working on changing that a bit more.

Who hogs the bed?

Johanna. I tend to sleep on my stomach at the side of the bed so she just has more room available to her.

Who wakes up earlier?

We both have a hard time getting out of bed in the mornings, but when I do wake up naturally well slept, I’m the one who’ll jump out of bed at 6am or whatever, Jo’ll tend to want to just keep sleeping.

Where was your first date?

We went for a walk along the seafront in Bangor and then had food at her parents house. Nothing really able to do much fancy stuff at the age of 16.

Who is more jealous?

We’re not really the jealous type. While Johanna was at university there was one of her guy friends that I was pretty jealous of, but it was more about the amount of time he got to spend with her, while I was stuck down in England. I think Johanna tends to get jealous of people “checking me out”, which apparently I’m totally oblivious to.

How long did it take to get serious?

Probably about 2 years or so, which made the whole long distance thing so much more painful.

Who eats more?

I do. I used to not eat a lot, regularly skipping breakfast and often lunch (most that know me, would say I was pretty scrawny). However since taking some stress elements out of my life, I’ve started eating more regularly and have put a bunch of weight on (I’m estimating about 10 kilograms). Now I just need to get active and do some martial arts or the like.

Who does the laundry?

Johanna. Generally Johanna will do the cooking, laundry and the like and I’ll do the cleaning.

Who’s better with the computer

Me, though I’ve been trying to convince Johanna to learn some programming. Generally, this ploy isn’t working… though she has promised to read the new edition of Learning Perl that I bought recently.

Who drives when you are together?

I do. Johanna can’t drive, but we’re hoping to get her taught by the same guy who gave me a few lessons here. I once let Johanna drive the car in a car park and she can’t work a manual to save her life, so I’ll still need to teach her to drive a manual if she wants to drive in the UK (automatics aren’t common there).

ousting the home secretary

In the UK the “Misuse of Drugs Act” is based  on a series of drug “classes” ranging from Class A to Class C. Very hard drugs like heroine, cocaine and methamphetamine are all classed as “A”, whereas Class C generally covers prescription drugs and the like.

These classes are defined based on the advice of a long standing research group known as the “Advisory Council on the Misuse of Drugs”. The council is made up of scientists, doctors, statisticians and their job is to work out how dangerous a drug is both to individuals and to the cost to British society as a whole. The group has been in existence since 1971 (the same time the Misuse of Drugs Act was instated).

Since the existence of the ACMD, the home secretary has always taken the advice of the council and the the drug classes have always been defined as such. However recently Jacqui Smith has decided to not only ignore the advice of the AMCD, but also to reverse previous decisions based on their advice.

In 2006 the British government downgraded Cannabis to a Class C drug from a Class B based on the advice of ACMD. I was happy with this decision as I had always thought that the punishment for cannabis possession was always too extreme for what it was.

Jacqui Smith and her staff in all their wisdom, decided to reverse the downgrade and put Cannabis back to a Class B drug. They have also stated recently that they are going to ignore the advice of the ACMD, who are suggesting that Ecstasy be downgraded from a Class A to a Class B drug.

The home secretary has all the facts available to her as to the dangers of the drugs and their impact (hell, it’s what the ACMD was setup to do). Since that is what the “Misuse of Drugs Act” is supposed to reflect, I can only assume that all Jacqui Smith is doing is bringing her own personal politics in on the matter.

As an MP, the home secretary is supposed to do what is in the best interests of the country and the electorate. As far as I’m concerned, she’s attempting to rule the UK as her own little country and not really listen to any reason. I wish that there was more power (or the populous was made more aware of a way) for the general public to oust a member of parliment and especially one from office in a more immediate fashion than waiting for a general election.

Politics in the UK seem to have really degenerated and I think it’s by time we had a change, so hopefully we’ll get an election soon. Need to register as a non-resident voter soon too.

starting a business in british columbia

This morning I have some construction guys in fixing our floor boards, it’s loud and noisy. Since I can’t concentrate fully on work stuff, I thought I’d blog about how to set up a Sole Proprietorship in British Columbia. I’ve been asked a few times now and there’s not too much “sane” information on the interwebs about it.

When going out to start a business I had done a bunch of research and there were several reasons I chose to go down the Sole Proprietorship route:

  1. Setting up shop as a Incorporated business is expensive. The fees by themselves are several hundred dollars and most people I talked to about it recommended talking to a lawyer in terms of structure, articles of incorporation, etc.
  2. Running an Incorporated business requires lots of paperwork and procedural overhead. While there’s many tax advantages and related benefits to running an corporation, since I’m mainly service/consulting based, I’m not able to really take too much advantage of these benefits.
  3. If my situation changes, I can always convert to a corporation.
  4. Doing business under my own name, while not requiring any paperwork just didn’t seem as professional to me and since I’d have a turnover of over $30,000 a year I would have to register  for a BN (GST registration) anyway (which I believe you need a sole prop for at a minimum).
  5. It’s early days yet, after a year I’ll have a better understanding of my situation and what options I have available to me.

Starting a Sole Proprietorship

Finding a name

The first part of the equation is to find a name. In British Columbia (perhaps Canada) you can’t just call yourself “Widgetilizer” or “Socialflies”. You need to have a “distinctive” element and a “descriptive” element in your name. In my case the distinctive element was “Cloudtone” and the descriptive element was “Studios”. Thinking back on it now I probably should have used a different descriptive element, but it’s sane enough for the industry I’m in.

Once you have come up with a name, you then need to register it with BC Registry Services. I walked into the Small Business BC centre at Waterfront station, got a name request form, filled it out and paid $40 or so to have that validated. After several phone calls and waits due to user error at the waterfront centre I finally got my name approved. The process took me about 2-3 days to get confirmation in the end once the error had been fixed. Once you have received approval for that name you have about 2 months to apply for either a Sole Proprietorship or Corporation using that name.

One important note is that this approval is just permission to trade under that name, it doesn’t supply you with protection over that name at say for example, a federal level. While I did the name request in person, I have found that it’s possible to do it from the comfort of your living room at BC Registry Services.

Registering a Sole Proprietorship

This process is entirely doable online again via BC Registry Services. You can setup an account on the “OneStop” site which will help guide you through the process, with nessecary paperwork and will ask you to fill out more information as and where required (for example, If you were to have employees, you also need to fill out several other registrations). For me I ended up only filling out a few more forms than the registration requirements, however I’ll need to go back into my profile to register for some things around BN and CPP things.

The registration online take about 30-40 minutes, is instant (you can print off your registration) and costs $40 to do online.

Wrapup

While the process is pretty simple, the problem I had was tht there is very little advice available as to how best to decide wether you want to go the sole proprietorship or incorporation route. I’d advise anyone thinking the same thing to talk to other business owners as all that Small Business BC will do is refer you to a lawyer.

While I have some issues with Small Business BC, I’ve found that the services they provide are pretty good and they also do several talks and workshops at their Waterfront branch on a range of topics from financials to technology to marketing. I think I’ll probably attend some of these at some point.

The OneStop service was delightful to work even if it looks and navigates like crap. I’ve had the experience before of being a limited company director before in the UK and it was a real pain to get even the registration through. By comparison, the abilty to do everything instantly was a major boon in the tight timelines that I had.

Hopefully I’ll have more small business stuff to write up at some point, but for now, it’s back to the grindstone.

linkedin blog linking

The LinkedIn blog link application requires an entry tagged with “LinkedIn” to allow me to add my blog. So here it is!

disposing of the wallet

It wasn’t too long ago that I was using just a general normal fabric wallet. I had had it for years, some black Airwalk one and it was tatty as get back and I needed to get a new one.

I had been finding that I would tend to collect receipts, cards, business cards, ticket stubs, loose change and other random stuff. I’d have to empty it every so often (usually once it was thicker than an inch and I was having a hard time getting it in and out of my pocket) and take some time to sort through the contents. I decided that I was going to try something different and went about hunting on the internets.

Lifehacker had had a series of articles on nice wallet replacements, but generally they were rather expensive, available only in the US or I’d end up looking like a complete tit using them. So it went on the back burner for a while. I was then randomly in Grand & Toy a while back getting some office supplies for Cloudtone and I came across a lovely little thing for about $9 which has since functioned as my wallet.

The Capsul Case is a Canadian made product, it’s not fancy, it’s not featureful, it’s just a design that’s simple and works.

Image of a green Capsul Case

I’ve been using mine for nearly 6 months now and I love it. It’s small so it fits in my pocket with ease, it limits the cards I have on me to the ones that I really need (Visa, ATM, Starbucks card, Business account cards, BC Care Card and my BC drivers licence). I also fold cash bills into it and the odd time I’ll stick a key to one of the inside panels if I need it.

Image of Scotts capsul and cards

The first thing I noticed once using it is that I now tend to empty my pockets of receipts once I get home since they’re much more noticable in pockets. This has helped a lot in the time needed to sort through all of these things. I also tend to empty my pockets of change and have even setup some money ‘bins’ on our ‘landing strip’ at home.

The capsul case is really tough, so I have no qualms about just throwing it into my bag or into the bowl on our ‘landing strip’ along with my keys and the like.

Has anyone else recently moved from using the general fabric wallet or purse?