Archive for the ‘Testing’ Category


Sunday, September 23rd, 2012

Patent / Copyright madness

Automated copyright enforcement really seems to work well… NOT!

And Apple is up to no good as usual…

Patent trolls trolling around, but it would seem not without a fight :)

Oh, and if you were thinking of setting up a service which required a login, and you thought you’d protect people’s accounts well, then that might be patented…


Through this reddit thread (referencing it both for source and because the comments in there are relevant) I was lead to this post sometime this week or last.

And this weekend, while doing the weekly write-up, I re-read the post, and started thinking, because I kindof feel that my own hobby projects very easily fall victim to this. They get shot down because I start thinking of how much stuff I would have to rewrite (things I’ve already solved in previous projects, but never put down the time to make generic enough to reuse) or figure out, and it just takes my edge off wanting to sit down and do it.

But then it struck me, what help me get reinvigorated, what helps me come over at least that hurdle: A moderately quiet place, time enough for a conversation, a good (programmer) friend, and optionally a beer.

Broken gets fixed. Shoddy lasts forever — I wonder, does this mean that, if something is shoddy and you want it fixed, the correct action is to break it? ;)


I found myself wanting a way to have a central repository react to pushes based on what branch was pushed (I am working on a script at work, which some of my colleagues are beta-testing for me).

Whilst I develop a new feature I need a way to push that potentially buggy version of the script to a path where the testers can find it, while using a completely different path for the stable version which everyone else could use without any big risk of it messing anything up.

What I ended up with was this:


read _from _to _branchPath
_branch=`basename $_branchPath`

if [ "$_branch" == "develop" ];
    cd /path/to/local/repository/on/server
    unset GIT_DIR
    git pull
    git checkout develop
    cp -f ./scriptname /path/to/beta/test/directory/

Two questions on Stack Overflow helped me out tremendously: This and this (and as always, pesa was a big help too)

And since I agree with this post (namely that vimdiff would be a great diff viewer for git) I went ahead and followed the instructions of that post :)


Using vimwiki to track time sounds brilliant. It’s almost enticing enough for me to look into vimscripting to help out. Yet another project I’d like to spend time on :S

Being that paranoid soul I am, and now that I can also call myself a tester, I realize I’ve become even more aware of how many different entry points there are which needs to secured, such as vim’s modelines (protip: use secure modelines

From this post I learnt about license-loader, which I need to look into.


I found this post to be an excellent intro to awk, I am going to spread this around whenever I need to show anyone the basics :)


This post about 52Hz made me kindof sad :/

On the other hand, this post filled me with some hope.

I think it could be beneficial if this site was more widely distributed, so here’s me doing my part.

Finally, this post was pretty cool, and I immediately thought of at least two people I know who would get a kick out of reading this. :)



Sunday, April 22nd, 2012

I ought to dedicate this blog post to git and rsync: The hard drive on my netbook died this week. I haven’t attempted to recover anything from the disk yet, but of that which is most important I figure I haven’t lost anything at all. And that’s due in no small part to git and rsync.

All of my configuration files, at least those I care about, had been added to a git repository. And most of the binaries I wanted to preserve had been rsynced to my server.
Not all of it though, which is a shame, but it shouldn’t be hard to replace what I’ve lost. Especially if I can get the old hard drive to function just one more time, just long enough to at least make a list of what it is I’m missing. The rest of the disk, well, it’s spring, perhaps a spring cleaning was in order.

So all is not lost, and looking beyond this setback, I did learn some other things this week (except for the fact that I need to become better at performing backups) such as:

Also, quite some time ago, I went around thinking about how to automatically track my working time, and while this isn’t exactly like what I had in mind (I would probably just have created a daemon which somehow fetched the window title of the currently active window from X, and did so randomly 6 times per hour (not deterministically enough to be able to cheat the system).

And some assorted links which may or may not be of any particular use for anyone:



Sunday, April 8th, 2012

Not a whole lot to say this week, it has mostly been work, sleep, work, sleep, … well you get the picture.

Some noteworthy things however:

Just how, in their infinite wisdom, does the EU expect to test the security of their own servers and services if they are going to outlaw so-called “cyber-attack tools”. For that matter, how do they propose ANY manufacturer of ANY type of digital system perform ANY type of actual security testing worth a damn?

Social AND Private? Well… not quite yet, but if they get the p2p and encryption stuff working, then we’re in business :)


And it wouldn’t be one of my hallmark blagposts if it didn’t have some random links which may or may not be of any value, no would it?

Dunno just what it might be useful for, but creating 3D graphics procedurally using Lua, like with Fugu seems like just the right approach for me. If I were to do 3D models that is.

Now this promises to be an interesting game.

And a rather interesting programming language.



Sunday, October 16th, 2011

There’s not been a whole lot going on this past week, except for work and more work, but at least I am beginning to feel somewhat productive :-)


FSCONS is now less than a month away, YAY!


And I have started looking into learning Perl. Don’t know how long that will take, don’t really care either, it’s just for fun anyway :-)

Bash webservers (for simple testing)

This if of course nothing for live deployment, but if you don’t want to spend a whole lot of time installing and configuring an entire webserver just for some quick and dirty tests, and then there are some fairly neat-looking scripts. They are untested but doesn’t look like especially sinister constructions.

Random thoughts

I am getting a fair deal of SEO spam in my comments (thank you Akismet for dealing with it) and the only thing that comes to mind is:

IF SEO really works so well, then why do spammers feel the need to… well spam about it?

And especially when they try to link back to their own sites, increasing traffic to… their own sites. Iunno, just seems like a big scam to me.

But then again, my objective for blogging isn’t to get the maximum amount of visitors I can, but to share stuff I find neat, in the hope that it will be useful for someone more than me.



Sunday, July 3rd, 2011

How silly of me… I totally forgot to publish last weeks summary yesterday. So without further ado, only one day late:


I don’t know how I get myself into these things… all of a sudden I found myself needing a, reproducible, way of setting up a photo gallery, complete with thumbnails and affixing a content license to the images.

When it comes to creating a batch of thumbnails, imagemagick is the tool to use. Accept no substitutes!

I am also going through a little crush on markdown.

Getting rid of UTM variables

I am not all that fond of those UTM variables that some “services” tack onto their links in order to better track where people are coming from (I understand why they’d do it, but I have no interest in being tracked, even if all they want to know is whether or not their push to be visible on $SOCIAL_MEDIA_SITE_OF_THE_MONTH is successful.
I know that I by accident stumbled upon a blog post outlining how to get rid of them programmatically, and I also know that I for some reason or other couldn’t find it, but without being too paranoid, I can understand why Google might not want to help people find the knowledge to do that ;)
In any case, I stumbled upon two resources for doing just that, but I think that was more due to dumb luck than any concentrated effort on my part, actually, it was quite by accident while looking for something else.

Bash is so cool!

I already knew about echo {A,B,C,D} (great in conjunction with mkdir -p, but I have realized that bash is cooler than that.
echo {A..D} delivers the same result, without the need to explicitly specify all of the chars I want expanded. Nice!

makefile blogging :: comments

psquid had a rather interesting solution to blog comments. I’ll have to think more about this. I don’t know how I feel about letting some other party (even if it is as nice a party as host “my” comments, but it is totally worth considering.


All in all a pretty good day. Got to assist razor with both vim and LaTeX skills (the student has become the master, yay!), got some writing out of my head, and ended up doing a little Test-Driven Python hacking.

And although I was a bit sceptical about OlofB‘s pyTDDmon, especially about it blinking continuously, which could get really old really fast, at first, I have to say that it has kindof grown on me since.

Sharpening “the edge” through blogs

Sunday, February 1st, 2009

Tonight I had a talk with a classmate from ITU, and that conversation left me with a thought. Although I struck up the conversation on a rather positive note, about the fact that it has now been quite some time since he pinged me with a programming problem, which could only mean that he had in fact gotten much better, he still had some worries about being a little inadequate.

As I said, this left me with a thought. Web 2.0 gave the world blogs, and thus the ability for everyone to share their experiences, knowledge, ideas and opinions. That’s a good thing. However, that’s also a bad thing. Information overload anyone?

So you’re a fledgling developer, eager to learn, to consume knowledge. There are some good books which should probably be in every developers bookshelf, but I am left wondering, although blogs probably have a shorter expiration date, could it be that there are some blogs that every developer should read as well? I think so. Certainly not to blindly follow their every word as law, but to get different points of view, opinions or the rare “aha” moment.

With the plethora of blogs now available, how would a beginner know where to begin, what to take to heart and what to ignore? I am NOT claiming any seniority on what to read or anything, but it seems that some of my classmates respect my skills, and most, if not all of them I have acquired through reading, so it would stand to reason that what I read could be interesting to others as well. Likewise, it would certainly be interesting to know what other people read as well *hint hint*.

Without further delay, the blogs I routinely read:

Joel on Software – Although some of the posts which end up in the rss feed are short and some of them are more PR-oriented, every now and again he posts some real pearls. I can’t say I agree with everything he writes, but different opinions and views are a good thing for the mind.

Coding Horror – The blog with the highest post frequency. Again, I don’t agree with Jeff, the author, in everything he writes, but his posts are enlightening nonetheless.

Basildon Coder – I started following this read because of just one post. It probably has the lowest post frequency in this list, but most posts are insightful and worth the read.

Object Mentor Blog – A collection of authors blogging “under the same roof”. It makes for varying subjects and insights, which can be a mixed blessing, but I have yet to regret adding that feed to my rss-reader.

Last on my list is The B-List – This is a blog oriented mainly around Django, a (and in my opinion THE) Python web-framework. Much more narrow scope than the other blogs on this list, so might not fit all.

The disclaimer: There is no inherent order of the list, no ranking or any of the sort. It would have been just as likely that the list would have come out reversed or in another random combination.

Now I have just one little request, I would really like to look more into TDD/BDD and also Haskell, so if anyone knows a blog which was helpful to them in gaining some better understanding in either topic, please share :)


Naturally I forgot to mention what I believe to be one of the most important points about blogs, namely that however good a blogpost is, the real gold is most often found in the comments. This is not always true, and in a popular blog you have to wade through a rather large flood of crappy comments, but wading through it pays off most of the time.

[Edit 2]

Changed an url to point at the actual blog post, instead of pointing to the post through an aggregator.

Lessons learnt: Python and importing

Friday, November 21st, 2008

This will probably not be something you will do every day, but some day you might need to import a module from an altogether different directory not on the python path. Let’s for instance say that you have a script in your home folder:


This script needs to import another module, and, as in my case, you are only given the file system path to the directory in which you can find said module. What to do?


The solution is rather simple. will need to import sys, in order to get a hold of the sys.path variable, to which we can append the path.

import sys
import some_module

Tah-dah. Once the script has been executed and dies, the sys.path is restored, so no extra fiddling needed. The one gotcha I encountered, which made this problem take way much longer than it should have:

I was wrapping this code up in a function, and that made the import local to that function, and not visible in the rest of the script, so binding functions/variables from the imported module to local ditos is advised, and then moving these around instead.

What kind of ugly beast of a script I needed something as convoluted as this for? A script which tries to verify that a piece of installed software has been installed correctly, and at the correct place with respect to other software, which I from the onset cannot know where it exists (this is for Vox Anonymus, and I simply needed to check that the Django site specific settings file had been correctly updated and could find Vox Anon.