Sunday, 20 October 2013

Problems computers (still) don't solve for us

This is a rant. Be warned.

I'm constantly using computers for professional and leisure purposes, and spread over several technologies. And it strikes me so often nowadays, that they have all come to suffer from the same troubles.

In more cases than not, computers are taking up our time by requiring us, their lords and masters (aka human beings), to do a lot of different things, that we really shouldn't be bothered with. We have enslaved ourselves so deeply in the need for computing services that we accept doing this!

One thing that bothers me mostly these days is the insatiable need to organise files and folders. I am old enough to remember a time without folders. No need since the storage was limited to a 5,25 inch floppy. The floppy itself was a folder. With added storage room came the "folder". 

Of course, some people older than me, or more pedantic, may now turn their attention to telling me off, since there was in fact folders before then. Sure, this is just how I remember it on early, sort-of-publicly-accessible computers in the beginning of the 1980'ies. The question to ponder though, is - why do we still have folders ?

Let me ask you: aren't computers getting better at searching ? (yes, google and bing are very good examples). Aren't computers having enough cpu cycles per second to be able to organise our relatively few files (I'm talking about the files we humans produce, not the files f.ex. a compiler produces) ? (yes, they ought to). So - why should a human being even bother to name files and place them in a folder structure ? Why can't the computer take care of that ? 
(But - how could we fnd the files again?) - well, from content, circumstances, date and time, ownership, lists or tree structures produced, presented and maintained by the computer in it's plentiful spare, idle cpu cycles..  We're so hung up on the ANCIENT concpet that a file can have for instance only one name - often with a postfix "surname", denoting it's "type". Why can't a file have more names ? Tags ? Even my ("#€)(€ - sorry) samsung blueray cannot cope with recordings of tv programs, if they span more than 1 tv program. It only has a huge 1 TB hd space.. should be possible to store more than 40 chars per recording, right ? It's a terrible piece of machinery... but I digress.
The entire concept of a file system lacks updating to the 21st century. We are sort of stuck in the way we had to do things 30-40 years ago. 

Why does this bother me ? Well, I had my eyes opened a couple of years back, when I decided I wanted to invest a few bucks in my writing. I like writing, but I needed a good tool to help me. I found a gem called PageFour. It's cheap enough for anyone serious about writing to invest in, and IT HAS A MAGNIFICENT TAKE ON DOCUMENTS! First, they made the program in a way that you will never loose what you type in. You could just type and close down the program. It would have saved your text (actually they added a save button because human beings, their users, mistrusted computers so much, they felt better having a save button... that's so sad ...)
Secondly they decided to put the folder and file problem out of the world. Instead the user can organise their writing in "notebooks" and "pages". Not too different you think ? Well, the words are different and much more human understandable. Their users are writers, not techies. 
But the beautiful thing is, to write something you pick a notebook - maybe the nearest one - fling open a new page and start writing. Yes - that sounds like something you do without a computer, but in PageFour, this is what you do - click on a notebook, click on the +page button, start writing. No hassle of navigating through a file structure, and then ponder what the filename should be. 
(Yes! that actually takes up a lot of my brain cycles and they should be busy doing the writing...)

PageFour is a bless to use. It's low in features, yes, by frigging design! It's about writing, not styling. 

Another big thing (with me at least) is that computers still take up like 1-2 minutes to start up. My pc's have grown in capacity, cpu cycles, memory, hd size and all over the years, but since the 1990'ies, they have consistently taken minutes out of my life for starting up. Why ? 
Well, luckily, I got pushed into buying a Mac. Wow. Problem solved. 
Only, now I can't use PageFour anymore. 

Yes, I know this is more ranting than any other thing, but what I really want YOU to think of, is - why do we put up with all this crap that computers (and the humans behind the OS's and user interfaces) still don't solve for us ? They are still supposed to be our tools, right ? We shouldn't let them demand things from us that they are perfectly capable of solving themselves!

Tuesday, 1 October 2013

Problem patterns

I had a puzzling problem. I had noted for some time that one particular automated scenario often failed and yesterday it was time to dig deeper into that. The scenario was very simple: it searched for and displayed a persons name and address, then it checked that the persons name matched the search criteria. Not a revolutionary or even finished scenario, which is why it had been ignored earlier on. We are still building this thing up.

When it failed it could be confirmed from the screen dumps, that were automatically saved whenever a scenario failed, that another persons name in fact was shown on the screen - not just name, but a totally different person had been found instead.

Debugging I created a special command to take a screen dump whenever I wanted, which I thought would come in handy anyway, and then plastered it all over the scenario so I could follow each step.

I was baffled that the next test run showed that the right person was found and displayed. Aha, I thought, this was probably like following a link. An internet posting suggested to give the web page focus before activating a link. I guessed that taking a screen dump could have that effect.
Quickly I disabled all the screen dump commands, and ran it again. Theory confirmed, the scenario found the wrong person this time.

Back to the code: I enabled the screen dump right before the search thinking that that would focus the page and make it catch the search criteria correctly - and ran the whole thing again. I was confirmed - it really did find the right person now.
But - saving a screen dump unnecessarily was not really what I wanted, so instead I used the set-focus command, and checked that it worked.. It failed dramatically - a quick inspection showed that I had screwed up with my simple copy-pasting ruining the scenario. Dammit. After fixing this the right person was found and happily I leaned back, victory!

All I needed to do now was simply to build the whole thing and I was ready to finish up. My mandatory test run came out as a surprise. It failed again. Flabbergasted I decided to run it again, just for the heck of it and to give me time to think it over once again. I lost my breath... it passed.

Suddenly it dawned on me. I had not bothered to investigate the pattern for the bug. I could possible have guessed that something funny was going on since I knew that it didn't fail all the time. But I just didn't follow that thread.

After running the scenario 20 times in a row without changing anything, the pattern was clear. Failure happened every second time, exactly. Reviewing my efforts, fleshed out above, it was clear to me that actually I had matched this pattern exactly in my efforts, and drawn false conclusions on that basis. In fact, none of my efforts had probably had any effect. Shoot.

I thought it was a valuable lesson to learn about making a few more investigations before trying to fix a bug. I mean, had I bothered to run the scenario just two or three times in a row, I had seen it right away.. Probably..

And the bug ? It evaporated with the next Get Latest... another funny day in automation land, eh?