Reading epub in terminal

Quick hack for reading epub files in terminal. I was considering making something fancier to have possibility to hop chapters back and forth, but couldn't be bothered yet. Let's see if I feel like doing it later, but for now I will just keep the book open in one tab in screen. Anything else than plain text will probably look awful. Using some text mode browser would be the other alternative as epub is just a zip file of bunch of html files.

FILELIST=`zipinfo -1 "${1}" | grep "\.html" |sort`
    TEXT="${TEXT} `unzip -caa "${1}" "${FILE}" | html2text -width 70`"
echo "${TEXT}" |less

The output can be futher formatted by giving instructions to html2text. I have in my ~/.html2textrc the following:

P.vspace.before = 1
P.indent.left = 2

Best aspects of exploratory testing

I've been thinking why exploratory testing feels more natural working technique for me compared to various ways of scripted testing and maybe got it nailed now. This is probably something others have been thinking all the time but I haven't found earlier the correct words for it.

I don't want to attack a straw man so let's compare testing with set steps and expected results that still allows user to use their head and vary their test execution (spelled in future as scripted) and testing where tester is given an area or idea that should be covered with the tests (in future exploratory).

The bad thing in scripted approach is that it allows tester to take the specified steps and then feel comfortable and happy with the results (independent of whether the tests pass or fail). Scripted approach doesn't encourage tester to question the test itself. Is it meaningful? Is it enough? Best testers of course still do this, at least when they are not too tired, but for others the standard for acceptable has been set already when the test was written, without knowing the possible complications seen during the testing.

In exploratory testing the tester has to ask why this part needs to be tested and what is important in it. Tester needs to be able to justify what has been done and why it is enough. The bar for acceptable is set by the tester and the reviewer (there is hopefully one). Often there are no given correct answers and the tester needs to think in wider context to validate everything is as it should be.

Things are not black and white. It is fully possible to do awful exploratory testing and also possible to achieve good results with scripted approach, especially if things learned during earlier runs are used for writing new test cases. However, exploratory testing emphasizes the responsibility of the tester and also provokes tester to find interesting and important things by giving a lot of freedom to do it. It also allows to focus just now on what is important for the product just now.

Share knowledge like you would be leaving

One of my co-workers is leaving our company and had an info session on things that he's been doing so that others can continue the work after him. I won't be doing his stuff, but there were all kinds of little things that will probably be useful and also the overall picture got again little more clear. Many things were not essential for my work or have no immediate use, but knowing more about the system and people helps when you consider what and how it should be tested (and developed).

It might be good to have this kind of slightly formalised information sharing more often also from people who are not leaving. If everyone in the team would give this kind of brief once a year, others would be more up-to-date and could for example more easily act as replacement during holidays. Wide, but voluntarily coming audience would probably work best so that people don't feel they are wasting time by listening things they already know or that are not useful for them.

Concentrating on what you do

Concentrating really well on things you do, not suprisingly, helps a lot in succeeding. It is not the only factor that makes or breaks things but for example in sports you can often try something many times mediocrely, then concentrate once well, and get much better results. A lot of training is needed to learn things but you can get better faster if you pay attention.

This applies also to really simple every day tasks. Until I was 25 years old I thought that cutting fingernails from my right hand was hard. Then, for once, I analyzed what I did with scissors in right hand and compared it to what I did with scissors on left hand. It turned out that when I was cutting my left hand nails I turned the finger and kept the scissors stationary. When cutting my right hand nails I was trying to turn the scissors. After that I have always kept the scissors stationary and got equally good results on both hands. Pay attention to what you are doing.

Story of my coffee grinder

We decided to buy an espresso machine and following advice from Internet forums, I also bought a coffee grinder. One of the few things that everyone seems to agree is that having a good grinder is one of the most important things after having quality coffee beans.

As often happens, I read recommendations and reviews for some days or weeks and finally decided which grinder I wanted: Baratza Virtuoso Preciso. It has conical burrs which should be quieter than disk burrs, give good and even distribution of grounds, and reduce frictional heating of the coffee (I have no clue how much this affects the taste). It has 400 step adjustment system for selecting how fine or coarse the grounds are. You can adjust this in many grinders, but often the systems are stepless so that it is not easy to jump back and forth between espresso and drip coffee settings. Preciso was also said to be faster than many other grinders in the same price range.

I was planning to standardize the coffee preparation process by having a grinder with timer for getting always same amount of grounds and also a expresso machine with timer to get always the same amount of water. However, it seems that I won't be using the timer of Preciso for espresso as it is not precise enough. It is easier to just use the pulse button and fill the portafolder manually. I may use the timer for getting grounds for a full pot of drip coffee, though. Baratza/Mahlkonig Varioapparently could have provided the wanted exact amounts of coffee and also three user-configurable presets, but the cost would have been again higher.

Of course Preciso was not available in the local stores, that would have been too easy. This is also story of my life. I look for something specific, finally find that there exists such product in the world, but it is not available anywhere near me. The Preciso is mostly sold in the US, but it is also available in couple stores in the UK and Ireland. I got very prompt response from Kyra in Baratza that I should be contacting Marco to get a grinder with correct electric plug. However, in the end I ordered the grinder from Coffee Angel as their total price was better (even though shipping cost more) and they were helpful and communicated very efficiently. The model I got also had correct kind of plug.

It took some time for the grinder to arrive as the shipping company didn't call on the first time they tried to deliver the packet, because they didn't have my phone number. Then they asked for the number from the sender, but their request never reached the sender. This was sorted out when I called the shipping company and asked for the package status.

I opened the very well packed packet and plugged the grinder in. It didn't start at all. I couldn't make it run in any way. The Baratza website has some troubleshooting tips and I decided to try them even though there was no separate guide for Preciso that at the time. In the process of opening the case a plastic part got broken (the adjustment ring). I checked all the parts inside I could but didn't find any problem. I put the case back on and suddenly the grinder started to work. However, I couldn't get really fine grind needed for espresso, apparently because the adjustment ring was broken. I asked for help from Baratza and Coffee Angel and they were able to provide me with a new adjustment ring as well as instructions for opening the case and changing the ring. I got impression that they did the instructions overnight for me to use. They are now available on Baratza website.

I got the adjustment ring changed but the grind was still to coarse. It seems that there is now a guide also for changing the calibration, but I didn't try this as the original problem of grinder not running came back. It would start for a while and then suddenly stop. Unscrewing the bean hopper so that safety switch clicked and then re-attaching the hopper helped for a little while, but then the grinder would again stop.

This was not good so I asked for a replacement from Coffee Angel. They promised to soon provide me with information on how the change will be done. After a week I asked for the info again and they were suprised to hear that this issue had not been taken care of already. They had asked for European representatives of Baratza at Marco to send the replacement. After another email the grinder got on it's way next day and now I finally have a working machine in the kitchen. It seems that the new piece is also quieter than the previous one and seems to work well. And the coffee luckily tastes good.

Requirements compared to laws

There are some things concerning laws that would be good to keep in mind when writing and implementing software requirements. The first one is that laws try to specify what will happen if everything doesn't go according to the rules. It would be good to specify also how software should work in erronous situations.

Another point would be specifying what rules will be followed if there are contradictions in different sources. But most importantly there is always judge or jury who will interpret the rules in real life situation and has authority to do so. Even when strict rules are set there is always ambiguities and exceptions. Someone needs to decide how they are then applied, and it helps enormously if there are high level guide lines and reasoning and rationalizations why things are to be done.

Lost in G+

I got my account activated and have had my first look at G+. I have never used Facebook so everything is new to me. In the beginning the layout was little confusing but is quite easy. Let's see if I'll be using it. I mostly signed up to get in contact with people I don't meet so often. Facebook would be currently much better for that but I don't like their attitude on privacy at all. Hopefully G+ will catch on.

G+ doesn't seem to work well with Nokia N900 default browser. I can see posts, but posting them doesn't seem to work. Neither does drag&drop on touch screen and adding people to circles is hard otherwise. Pop-ups open but are shown blank.

Unfortunately Opera mobile is not supported. I have to check if some other browser solution works better (Iceweasel using EasyDebian?) or if browser identifier of Opera mobile can be changed to cheat G+.

Update: It seems that Macuco browser works somewhat better. It's not perfect but writing and drag&drop are possible and it is available easily from Maemo extras repository.

Stating obvious

Sometimes people write on things that seem really obvious and I wouldn't think them worth a post. On the otherhand they often refer to some real conversations they have had about the subject, and apparently they are not so clear to everyone and some people could benefit on these posts. Examples could be Catherine Powell on What is work (It is very clear to me that there are a lot of tasks normally only implicitly or not at all included in time estimates) or Eric Jacobson on Testers, Let's get our bug language correct (It's nearly always clear from context what is meant even with sloppy language). These aren't even the simplest examples.

The same writers also write texts that are in my opinion interesting and insightful. I wonder how many thinks those things are self-evident. Even when everyone agrees something is really interesting, it is often quite simple idea once you think about it. The hard part is to know which of the obvious things are not obvious to others and of course getting those ideas in the first place. Now, that sounded quite obvious...

Good ISP rocks

I've time to time got calls from telemarketers trying to sell Internet connections. This is one of the few services I might be interested in buying from a telemarketer and therefore I have some standard questions to ask from them. I ask for what I already have from my current provider. Telemarketers have improved recently. They are no more baffled by my requests but only state no, they don't have it.

I'm really happy with my current ISP, Nebula. They offer reasonably priced 24/3 ADSL connection where you are allowed to keep a server. One static IP address is included and more can be bought with single payment of 25 euros. This is quite fair as the only real expense for them is the time that someone has to use to assign the address to my connection. Also some other stuff is of course included (disc space, email addresses...), but I haven't been interested in them.

Nebula has a nice policy on what you can do with your connection: They don't care as long as you don't send unsolicited bulk email or otherwise break laws or do anything else really stupid.

But the best part has been their customer service. Whenever I have called them, the first person to answer has always understood my problem, listened carefully what I have already done to solve it, and then provided helpful answers withouttrying to read some manual aloud. When I sent an email to them on sunday after eleven at night asking for reverse dns entry in their records, I got reply fifteen minutes later that it had been done. That's something I'm ready to pay for.

Filtering news and feeds

I've been for a while considering a web service where user could select from a list the news services (or other feeds) she wants to use and they would be aggregated to a single list. The catch is that they would be piped through a bayesian spam filter that would categorize them as ham, spam, and unsure (and spam wouldn't be shown). User could then teach their own filter to show only relevant content. This hopefully would scale quite well as the content could be fetched and saved once and only status information would be saved for the users. Categorizations could be done just in time or maybe as a back process to even the load. The aggregated list could be available as a feed as well as a web page.

This is not a new and original idea so I tried to search for this kind of service or program, but what I found seemed to be only in proof-of-concept level. If I would like to read the feeds as emails this wouldn't be any problem and it may be that I will opt for that solution. There also seems to be readers/aggregators that support this kind of filtering, but not so many services that provide the results as a feed. I want to be able to read the results using system of my choice.

It's of course possible that I failed my Google-fu. Please tell if you know something about this kind of services already or have ideas for better scoring algorithms or such.

In the end I will probably implement this just for me with small effort. Easiest would be probably a combination of rss2email, spam filter and some email to rss program. It would be nice to have links added to the posts for easily marking unsure posts as spam or ham and correcting false negatives, though. The newest version of SpamBayes, by favorite spam filter, has XML-RPC interface which might make it rather easy to implement this. I'll tell if I get anything done, but don't hold your breath.

I do not like mindmaps

I really don't like creating mindmaps and working with them. I think I can draw decent mindmaps that could be useful for someone, but not for me. I have couple times tried drawing them and then later returning to them and redrawing them as suggested in many sources, but haven't found any new ideas developing from this. I maybe should try for a longer time before giving up, but it seems so hard.

My understanding is that mindmaps help people to remember and create things through the links and find connections between separate parts of the construct, but I don't seem to find connections that are not self-evident without the drawing. I think of connections as I write the items and visualizing them is not giving any extra information. I can make a list of important aspects of some thing, that could be visualized as a mindmap, but drawing doesn't seem to bring any additional benefit for me and it actually hinders my productivity.

Maybe I should try to add more information to the maps. Colors for different kind of items or connections is quite obvious idea, but maybe there could be so me other ways to find information not apparent in the first place.

What is interesting, I like structuring things and visualizing data. Some kind of Concept maps are much nicer and often help getting grasp of some system or idea. Best data visualizations are really brilliant and help grasping concepts and understanding things. Maybe that's the thing. I don't want to use graphical presentation for note keeping or developing ideas but for understanding existing ideas and statistics.

This all came to my mind as I saw some mind maps today and then remembered really good TED talk by Hans Rosling on development of global health and economy. He has interesting points in his talk and the way he presents it is just great.

Testing dojo and what to test

I participated in the latest Testing Dojo in Helsinki and had a lot of fun. Dojo was organized by Petteri Lyytinen and you can read description of the session from his blog. The main point this time was collaboration in the group and focusing more on the planning part of the testing. I liked this a lot, but based on the feedback the structure could be even more organized as expectations and background of the people vary quite a lot.

One thing I could complain about is that when testers gather to learn more about testing, often the example software is buggy and testing is started from the point where we assume that the program has not been tested ever (this time we used famous example of Gerald R. Ford International Airport parking calculator). This is ok if the point is trying out some new way of doing things or some test tool or such. Otherwise I would be interested in more focused approach and we could then test software that is already in quite good condition.

One way would be considering only some aspect of the program/testing (for example usability, security, performance, testability, negative tests, gray box testing, decision trees, oracles used, documentation) with some introduction to the topic. Of course also new ideas and approaches could be tested with more mature software.

People in TestausOSY - FAST (Finnish association of software testing) have been talking about organizing some presentations on topics people find interesting or maybe testing dojos with lightning talks in the beginning. I'm looking forward to those.

Apple iMessages

Apple has announced a concept called iMessage (via TechCrunch). It will probably be very handy for Apple users as it is integrated well with the existing messaging system, but apparently it works only between Apple devices. With others you can get the same services and maybe more with Skype. And you could already use Skype with other Apple users. This of course means that you need some kind of data plan, but how many iPhone owners there are with no data plan? If there are some, what they are doing with it?

I can certainly see why companies are producing platform dependent services, but it's still frustrating and one of the main reasons why I don't have any Apple products.

From analog to digital and back again

I have bought very few hardcover books in my life, not just because paperpacks are cheaper,but because I like paperpack format so much more. I often carry books with me for reading and hardcovers don't work for that. Carrying just an ebook reader (in my case a mobile phone) is very nice indeed. I don't even seem to have problem reading backlit screen.

Lately I've been buying almost exclusively ebooks. Fortunately some places sell interesting DRM free content:

The only books I have bought on paper are comic books. That form can't be shown very well in a reader that still fits to my pocket. But most of what i have bought are based on webcomics and I can still really recommend buying them:

If they would just now sell these as ebooks. It's funny old world. :-)

New blog based on IkiWiki

I've been considering starting a blog for a while now, but building one takes some time. Of course it is possible just to edit static html pages, but if I had started that way, I probably wouldn't have put this one up ever. I knew quite well what I wanted but checking different possibilities is time-consuming.

I had been looking for wikis also and finally decided to use IkiWiki. It seemed simple, but provided most features I wanted, and was easily available as Debian package. IkiWiki also provided blog features out-of-the-box and that was enough to give it a try. I also like the idea of writing posts with an editor and then just dropping them to a directory to get them posted. IkiWiki sit on top of a version control system (which you can choose) and makes it also possible to add posts for example with a git push.

It took some time to get familiar with the structure of the wiki (and certainly I don't know it very well still). IkiWiki is a compiler that creates static html pages using directives which order what templates are used where and with what parameters. Many of the features are implemented as plugins that can be controlled with a setup file. When contents of the source change, the wiki is rebuilt and changed pages updated.

In the templates the content is handled using variables like <TMPL_VAR TITLE>. I had troubles knowing what variables are available in each context. For example I wanted to move the search form from main content to the sidebar, but just moving <TMPL_VAR SEARCHFORM> was not enough. I finally actually just included the contents of the variable to the sidebar. As far as I know there is no list of variables and contexts anywhere but in the templates (and code).

Another problematic case was having conditional content depending on active page (frontpage vs. other pages). I found a solution from Jason Blevins' plugin site (path plugin) which is not linked from the site for some reason. It adds some template variables which can be queried to check where in the blog the current page is.

Other modification that I did were throwing a lot of default content out, moving bits around, adding of course a lot of css, adding some <h#> tags for headers, changing calendar date presentations, and playing a lot with different plugins, Hopefully things more or less work now. Feel free to tell if not or if you would rather have something differently.