betabug... Sascha Welter

home english | home deutsch | Site Map | Sascha | Kontakt | Pro | Weblog | Wiki

Entries : Category [ digital ]
Things having to do with digital world items go in here.
[digital]  [language]  [life]  [security]  [media]  [zope]  [tourism]  [limnos]  [mac]  [athens]  [travel]  [montage]  [food]  [fire]  [zwiki]  [schnipsel]  [music]  [culture]  [shellfun]  [photography]  [hiking]  [pyramid]  [politics]  [bicycle]  [naxos]  [swim] 

07 October 2015

Begone Mail... Not!!

There she goes

Yesterday evening I was writing a lengthy mail, explaining a nice little idea. The mail was written in English and Greek, spellchecked, re-read, corrected a bit, and then... the battery on the laptop suddenly ran out of steam and the laptop shut down unexpectedly. I didn't feel a single moment of anxiousness. I'm using mutt to handle my mails, and mutt hands off to vim to actually write my stuff. As I know quite well, vim saves temporary copies of my files, so in case of a crash, I'm often asked to recover files. Works quite well.

mutt saves unfinished mails in a "folder" called postponed. Since I had closed and re-opened the draft mail a couple of time, I expected find the unfinished mail there. But it wasn't. Lesson learned: mutt saves those mails there only when you close the message and postpone it. OK, so far, but no problem, since definitely vim had saved my message.

But I couldn't find it. It was gone. It started to take the wind out of my sails, since I had spend some time to make a beautiful little piece of mail, and the thought to do it all again demotivated me. I started going through my disk with a fine comb. I found the path where my files had been. I checked where vim is supposed to save temporary files (the "dir" setting directive), and the documentation gave me a strong hint to what had happened, for that setting the documentation suggested:

"Using "/tmp" on Unix is discouraged: When the system crashes
you lose the swap file"

Explanation: If you save your "swap" backup files in the /tmp directory, when you restart after your crash, the OS will go through /tmp and throw your carefully saved backup file away. This is what had happened to my mail. But why?

In my .vimrc, I hadn't changed the dir setting, and the default is to store files in a list of directories that are reasonably safe: ".,~/tmp,/var/tmp,/tmp". For a moment I was pointing fingers at vim, but it just doesn't make sense.

In fact the culprit is mutt: The mail program tells vim to "edit this file" and to store the needed temporary swap file in /tmp. There is a settings directive to change the place, but the default is the very unsafe /tmp directory. So my suggestion: if you use mutt, check your config to set the "tmpdir" directive to something safe, something where your OS will not clean up at restart time, e.g. on OpenBSD /tmp/vi.recover is spared from the knife.

Posted by betabug at 10:57 | Comments (0) | Trackbacks (0)
28 January 2016

Reading Conflict Markers in Darcs

Doctor, it's an urgent case of RTFM!

Here I had to merge a substancial feature branch in our main development tree, with some complicated conflicts coming up. Since even with a small team of developers it's still rare to get conflicts working with darcs, when it's finally happening, enough time has passed for me to forgot details, and I usually have to look up what to do again.

I found the FAQ page on conflicts in darcs to be a good starting point, but quite often in the past I have gotten stuck on the darn conflict markers themselves. I mean, it's clear enough that here there be conflicts, but which point of the marker is which state?

It's not mentioned in the FAQ page. But that's ok for the FAQ page, since the answer is clearly a case of RTFM. Typing darcs help mark-conflicts into a friendly shell near you gets you:

v v v v v v v
Initial state.
First choice.
Second choice.
^ ^ ^ ^ ^ ^ ^

... which is nice and clear. With multiple conflicts in the same file, the "First choice" and "Second choice" are not always referring to the same patch, but usually things are clear enough for me once I figure out things this far. The hint to run darcs help on mark-conflicts came from the output darcs gives me when I try to apply a patch with conflicts.

Posted by betabug at 10:00 | Comments (1) | Trackbacks (0)
08 February 2016

Am I Lazy?

Let me lay under a tree for a couple of hours and ponder the question
Lying under a tree

In a discussion with a friend over lunch, he told me: "The way you describe your work, one could get the idea that you are lazy!" Indeed I am. Being lazy is a key ingredient to a good programmer. It's what makes us automate tedious, repetitive tasks.

On a further scale, I like things like riding my bike and then sitting somewhere under a tree, pondering all and nothing... and then churr churr my subconscious starts working on those work problems that keep holding the work up.

Being lazy makes me write automated tests for my program code, because a couple of hours writing those tests will save me many, many hours of searching when a problem in that program code appears in a few months. There are many more practical things like that.

Posted by betabug at 22:30 | Comments (1) | Trackbacks (0)
09 February 2016

Is Technical Diversity a Good Thing?

Not everything is equal
Not all gummibears are equal

Speaking to someone who is interested to work for our team, he was surprised that we don't have a standard virtual machine image with all the tools and setup ready. Well... we don't have that. We have a couple of README.txt files, and a setup that each time it's attempted causes a few scratched heads and curses.

But what it also does is ferret out a bunch of problems and bugs each time it happens. "Oh, this library was updated." Usually this is not nice stuff. Stuff that should have been taken care of. Stuff that should have been documented, or even automated. Probably with a bigger team, you'd assign someone to look after this stuff, but we're not a big team. So yes, the procedure to install a new environment can be tedious and time consuming.

But the other reason I like our diversity is that it's basically following the philosophy of what OpenBSD does in developing for a bunch of obscure, strange, and old platforms. It brings out to the light the kind of thing that "works on this platform", but in reality it's just an ugly hack or an -ism of that platform. Making your environment work on a couple of platforms will make things more robust.

(At one point we even tried to go as far as having someone being able to develop on Windows. That simply didn't work out, that "platform" is simply too complicated and needs too many special fixes.)

Posted by betabug at 10:59 | Comments (0) | Trackbacks (0)
30 April 2016

Flower Power Sprint

Working and having fun on Naxos again
The official sprint tshirt artwork

The team I'm working with on one of my projects has this tradition of meeting roughly 2x per year and working all together for about a week. We call that a "sprint" (despite that some software process terminologies call something different "a sprint", we're not bothered). The last one was last November in Galicia, Spain. This time we were on Naxos again (for the 3rd time now, April 6-16).

Our program consisted of 3 days of intensive work, then 1 day off, then another 3 days of "sprinting", followed by 2 days for "social stuff". We were quite productive on the work days, which resulted in us enjoying the "social" days together even more. We also had lunch and dinner together mostly, which resultet in way too much food being eaten. In early April, not all naxian restaurants are open, but there is still a good selection.

Borja and me spent much of the "social" time out on a bike. We explored many of the less cycled roads of Naxos together, and the number of climbs was almost dwarfed by the number of sheep and goats we met out on the road. We also met The Pig (which is another story for this weblog, but since The Pig has a no-photo shield around it, maybe better for another time). In the process, Borja managed to pass the magical "100km in one ride" mark, of which he has written a nice ride report. Oscar and Panos went looking for sheep and goats on a couple of motorbikes, but they missed The Pig.

One perfect fit is that we got a new team member from Naxos, joining the team just a few days before the sprint. This fit perfectly, as he could meet all the team members, and also get a working start on the code base.

Oscar has another sprint report online, with tons of picture.

Posted by betabug at 21:31 | Comments (2) | Trackbacks (0)
20 August 2016

Time for a new phone

It's been some years

It was January 2009 when I got a new work phone from my then employer. It was the brand spanking new Nokia e71 smartphone. It did it all and it proved to be a longtime companion. I've used - and loved - that phone ever since. I'm on my 3rd battery. Lately though, more and more things stopped working. The VoIP client and the VPN didn't hold up with the software cycles in their fields. Lately the email-client stopped working too. Those are software problems, there might even be solutions. More and more keys stopped working or fell out. And then the USB connector started to break.

In the end I bit the bullet and decided on a new phone. Given the current selection of phones, this is like "choosing the least sucky of all those sucky phones out there". There's nothing with a physical keyboard. The phone ecosystem seems to think that as a customer, you're just an expendable that never really "owns" the hardware. The security problems are a nightmare. Providers don't bother to update software. Everybody thinks that it's ok if a phone breaks apart and is broken if it ever falls down (typical e71-owners wouldn't even check the phone for damage when it fell down).

So I got myself a "Samsung Galaxy XCover 3 VE" (instead of "VE" it might also be described as "(2016)". It came with Android 6.0.1, which means it will be up-to-date for a little while. I'm trying not to think about all the security holes that are already announced for that platform and duly ignored by providers and handset makers. It's a phone that is slightly waterproof (IP67 IIRC), dustproof, and "should" even survive a little bit of falling down. Only experience can tell on that side.

First impressions: It works. The cameras is better than the one from the e71, but not by a huge margin. Good enough for pics to put on the web when out cycling. Using it is ok. Response time in the UI are really ok. The screen resolution is not great, but good enough for the current state of my eyes (I wouldn't see more on an ultra high resolution screen). Battery time is not in the same league as the e71, but I guess good enough. I'm very stringent about shutting things like bluetooth down and dow't use much (same as on the old phone). The e71 clearly was a phone where "phone things" were much easier accessible.

There is this saying about war, that says it makes difficult things easy, and simple things complicated (or something like that). That's the impression I have about Android. Install a VoIP client? Easy peasy. Open the phone to make a simple phone call to someone in your address book? Takes about 10 steps more than on the Nokia. Put pictures from the camera straight into Strava using the client, childs play. Get your pictures from your phone to the computer that sits 30cm next to it? Ah well, you could do it this way but..., and you could do it that way, but... but in the end it was designed to just hand over your stuff to Google or some other "cloud" thing. Which I obviously don't do.

And there is an app for everything(TM). But that app is quite likely trying to display annoying ads or is crippled in some other way. On the Symbian platform there was none of the ad bullshit really, but there were the crippled apps too. The symbian app selection was smaller, that just meant that you had less "sifting through all the garbage" to do.

Verdict: For now, it will do. It won't last as long as the last one, and it makes some simple stuff complicated. The rest, time will tell.

Posted by betabug at 17:47 | Comments (6) | Trackbacks (0)
30 January 2018

Portrait Monitor... and tablets

No, this is not about framing a photo, neither is it a tablet
Web designer stupidity in spanish

Since my computer work consists mostly of writing code, I find it very convenient to use a monitor that is "upright", or in portrait mode. That way I can see more code in the file that I'm editing. Typically the width of the code is limited to a few under 80 characters wide (and it's common to use a fixed width font). In my case I use a monitor that can rotate. I guess there was some "driver" software that came with it to automatically tell the operating system on your computer in which orientation you have it rotated. I don't use anything of that sorts, I simply tell my operating system how I want my external monitor to be configured.

So much for the navel gazing at my work habits. What is more fun is what happens when I browse on the World Wide Web with this monitor. Because nowadays, many websites seem to "sniff" somehow the screen dimensions, and when they see it's portrait, they assume I'm browsing on a tablet.

So I tend to get huge font sizes, menus hidden behind the "hamburger menu", and sometimes really minimalist pages. Quite often I can fix things by playing with the zoom level or slightly resizing the browser window. Most of the times I can live with this latest trend in web designer stupidity.

An award for extra stupidity goes to the designers of the website of spanish bicycle brand Berria though (or maybe to whatever framework they use) at Going to their site, I'm informed to please turn my tablet into landscape mode. With no choice to override this, with no way around it or a button "give me the desktop site". (See picture.) Somebody wasn't thinking this through. Well, actually I can override it, by using only part of my screen and reducing the browser window to a landscape-shaped slice, but that's very unconvenient. Interesting enough, when you have a deep link to one of their pages, it works anyway, so why put in this stupid blocker? Facepalm.

Posted by betabug at 20:23 | Comments (0) | Trackbacks (0)
Prev  ...  6   7   8   9   10   11   12   13   [14]   15