2015-08-07

I'm not a very good instrument

From time to time I end up trying to explain what it means that my attention span and concentration are impaired, so as an exercise in just that I'm going to try and explain it here.

First, let's take the sensation one has when coming out of the sauna, especially if one has stayed in there for a bit too long. Your head feels empty, and the thoughts just don't go anywhere. You cool off pretty fast and your mind comes back to more or less normal. I feel a bit like that every morning when I get up. It's not exactly the same but the lack of drive feels similar. It's also similar to how, with MS, one's body lacks the ability to move and act without conscious direction. I have to stay concentrated on almost every move I make. It's tiring and annoying, and perhaps most of all, it's slow.

Normally during the day, this effect gets gradually worse. Medication offsets it a little but nowhere near how much some things can worsen it, particularly temperature. In short, heat is bad for me. Drinking and other ways to cool down work but there is no way that I know of that is really practical in normal life.

The inability to stay on course without active guidance is the crux of the problem. As a developer my immediate reaction would be to say it seems like some sort of feedback loop is broken. I have no idea if that is what is actually happening, though my understanding of software models of neurology suggests to me that it might be at least partially true.

For those who aren't into engineering, think of it as a musical instrument that depends on resonance. Imagine your train of thought is like a chord that keeps on ringing out - remove the resonance that keeps the instrument ringing and the sound dies off very quickly. Some things can keep my thoughts on track by coupling back and keeping my mind moving in the same direction. Conversation is probably the most effective attention feedback.

The way I can't stay on topic is the main reason I have a lot of trouble completing the things I want do. I can't finish the line of thought as I'd like to. It's impossible to understand unless one experiences it first-hand, just trust me: it's impossible. I've come to realize this may be pretty close to what kids with attention disorders must experience - and the thought of that makes me cringe.

I was going to try and find a free-to-use picture of a guitar as an illustration but since we're on the topic of chords... well, somewhat on topic... let's have this instead.

I recall reading somewhere that The Chord is E major on four pianos simultaneously. I have no idea whether that is correct. It always bugged me a little that the song didn't keep going all the way into the inner groove. It should have but that final seconds of the record was a confused jarring mess of voices and noise - which did indeed continue into the inner groove. Sort of meta-wrong, which of course is entirely as it should.

2015-05-11

This keeps happening

One little encouraging thing keeps happening from time to time.

I'm out and about as much as I possibly can, a lot more than I would be if I had no excuse for it. Often I'm either going to or from work or to or from therapy or exercise, but above all else I'm probably playing Ingress. The result is that I'm out walking, a lot. I don't go anywhere without a cane and truth is I don't walk very well or very fast even with it, but most of the time I probably don't really look like I need help.

Occasionally I overdo it for some reason. I end up not being able to walk more than 20 meters before I need to rest, and rest generally means I need to sit down. I usually only need a minute of pause but unlike some negotiable desire of a functioning person, there's really no option for me other than to just sit down and wait. I imagine at these times I probably do look a bit of in need of assistance.

Now, I don't know exactly how miserable I look to a random passersby, and frankly I can't remember or imagine what I would have said or done if had come across someone in my state, but it's quite remarkable how often when I need to just stop and rest that someone stops and asks if I'm ok.

I get offered a seat on the bus and things like that almost daily but that's a little different, it's a predictable situation in which we're taught how to behave and what to expect. It's helpful and makes me glad but it's still on some level the expected thing to do. This stopping on the street to ask if I need help is more than that.

That this keeps happening makes me think that maybe people aren't really aware how nice and helpful the average person really is.

Random people on the street, you're often better than I expect.

2015-04-17

My favorite coding horror story!

Today's xkcd brought back the memory of my very first consulting job. It was a Pascal thingy, a graphical thingy to display icons and stuff on some maps, on DEC windows - I think that's what it was called, some flavor of X, running on whatever their unix of the time was called. This was in early alpha days, the hardware was cool and very expensive.

Pascal was not so cool, at least not in my eyes. I don't really remember such things now but unless memory deceives, Pascal used to be one-pass and all the code had to be in a single source file.

For those who haven't tried it: API level graphics programming is structurally speaking one of the more complicated and counter-intuitive types of programs. It requires the program to be laid out in a certain way, or chaos ensues. In case you haven't figured that out yet, in this program, chaos had taken over long ago. I've never seen an attempt to write a graphics program of the event loop era that didn't follow the same basic layout - except this one. It's really hard to explain how wrong this is. 

All of the above


Since it had to be contained in a single file, the file had grown to around thirty thousand lines. That's not a huge program, by any stretch, but for a single package of information it's a little too much. Good thing Pascal is a structured language, it could all be divided into separate procedures so there'd be some chance to find one's way around it, right? Well, there were procedures. Four of them. That thirty thousand line file was split into four procedures.

To be perfectly honest, it might have been six procedures, I forget. It really didn't save this program.

Have you ever written code? If you've had any formal training, you know that the most important thing to learn is how to structure program flow and control. Back before structured languages, programmers had to used a thing called goto - the code was one huge pile of instructions and flow was directed with these goto statements. In the late 60s, Dijkstra wrote "goto considered harmful", which must be considered one of the milestones in the history of computer programming. Over the next decade, using goto became increasingly taboo. Well, nobody had told the writer of the program I was looking at. It had gotos everywhere. Programmers often use the term spaghetti code for something that is convoluted and tangled up - like a pile of spaghetti. This was the worst case of spaghettification I had ever seen, and it still is. The code was littered with goto statements and the destination labels, the places where goto statements where directed from other places in the code, were just as many. It was one of those horror movie moments where the protagonists stare, wide eyed, into the camera and shout Oh my god, they're everywhere!

Have you ever written a Pascal program? The Pascal language is quite old, and it was defined in an era where compilers were a lot simpler so the coder had to follow a bunch of rules. The rules were sort of sensible if you think of it as if the language and compiler had been constructed from scratch, which while not entirely true still isn't a bad picture of the level where software existed at the time. One of the rules was that each procedure has to have all its variables declared in a special section at its top. Keeping that section nice and tidy usually isn't much of a problem since there are usually only a few variables to declare - call it a dozen or so. In Pascal, they will have to be on a few separate lines since different types of variables each require their own separate lines. It's rather unusual for that section to be more than, say, three or four lines.

Not so this program. In this program, each procedure had a variable declaration section that was a whole screenful of text. That, in itself, could have had a rational, sane explanation. All those variables might be needed for some reason - I doubt there'd be a good reason, but there might exist a reason, some sort of explanation. I do understand how all those dozens of dozens of variables got there but in this case, I refuse to call the explanation "a reason". It would be too flattering.

This programmer didn't believe in descriptive names for variables (or anything else - since there weren't many procedures enough to matter, that wasn't really the problem, but this was really just one fault hiding another). Programmers often find that they need a variable just for moment, they create a variable to store a value and almost immediately they retrieve the value and the variable is never used again. Such variables sometimes get names that don't do anything to explain their purpose. Programmer culture has a whole gamut of such names: foo, bar, baz, ble, gazonk, the list goes on. While code in Swedish settings is mostly written in English, sometimes it's in Swedish and there are a bunch of frequently used metavariables in Swedish too, though they tend to be real nouns instead of the nonsense of the English ones. I'd guess the most common ones are gurka and bulle. Of course, there was also no documentation and the code contained no comments.

So this code was written by someone who didn't know, or didn't care, how to write code that did a certain type of job, that was possible to maintain or improve, or that was was understandable. As this programmer needed a variable, guess what he called it? Of course, first he used the common metavaraibles. There would be a foo and a bar among the first variable names. Then there'd be foo2 and bar2 as he needed more. Eventually he'd run out of those names and resort to the math style variable names, i, j, k, l, r, s, m, and then he'd double those and then he'd number them. After using ii and mm2 and a couple dozen such names, he'd move on to Swedish words; gurka and bulle, and of course, gurka2 and bulle2 soon followed.

But that wasn't enough. So he resorted to four letter words. Any grown up person wouldn't use those words for variables but I guess he just got really, really tired of thinking up those name. I felt sorry for him and the program he made when I saw those variables declared. Anything that contains penis2 just didn't get a fair chance.

2015-02-12

So, this happy birthday stuff

In my family, there's a man who died many decades ago and whose name and memory is surrounded by this faint fairytale glow. That man was my grandfather, my mom's father, and his name was Seve. After an operation for a brain tumor (I think), he passed away abruptly. He was only in his forties. It was his wife's birthday, he was going to show off his new walking skills after the operation, and singing happy birthday and with gandma's present in his hands, he fell down in the hospital corridor with a blood clot in his thigh and a couple hours later he was dead.

Grandma wasn't alone at the hospital at least. My mom and dad where both there, because they had picked that day for their engagement, with a party and dinner at grandma's and grandpa's house in the evening.

That party sort of petered out as the news from the hopital arrived. I doubt anybody who was there or was going there forgot about that day.

I was not there, it was several years before I was born, but I am Seve's (and Bojan's) oldest grandchild.

And throughout my childhood, every aunt always remembered my birthday. It took many years until I figured out that that was because not only was I Seve's oldest grandson, but I was actually born on his birthday.

If the story wasn't John-Irvingesque enough by now, Bojan's second man passed away on christmas eve. Oh, and Seve was a wrestler. I think there's something about wrestling in some Irving books? But I digress...

Anyway. Shared birthday coincidences sometimes amuse me. Sometime in my youth I discovered that I shared not only my grandfather's birthday but also that of Abraham Lincoln. That was the person some lexicon of famous people's birthdays listed for my date - February 12. There have been others over the years as well of course - a classmate (Hi Patrik!), a gamer guildie friend (Hi Korak!), probably more.

The fact that another famous person shared not only Lincoln's birth day but was actually born on the exact same day never popped up and never stood out, not until many years later. Charles Darwin was well known, not hidden or buried, but I think the immensity of his discoveries just wasn't properly understood until the latest few decades. For me at this time, his discoveries stand out as one of the greatest is all of the history of mankind.

I really don't like the idea that one should expect celebrations on some date that has nothing to do with... well, anything. Better to try and remember everybody every day, in some sense? Not that I'm some sort of genius ninja when it comes to remembering people and showing my appreciation, but... anyway. It's a thought.

But with a story that starts with Seve and ends with claiming Darwin as my buddy, how could I not like my birthday?

Cheers eveyone, and thanks

2015-01-09

Barbarians

Right now, as a lot of people ponder whether it's defensible or responsible to "insult someone's faith", let's make a few things clear.

Denomination is a self proclaimed label. Nobody can question someone's earnest statement that they "belong to this or that religion".

This is not a valid basis for proclaiming that such a person's actions are made by some religious community as a collective.

Together with the actions of said person, it is however potentially a valid indication of prevailing currents and culture within such a community or context.

This is Raif Badawi.
In 2013, he was sentenced by a Saudi court to 10 years in jail and a 1 million riyal fine, and 1000 lashes. He is due to receive his first 50 lashes today. His crime consists of starting a web site "insulting islam" - that is, for promoting religious freedom and women's rights.

If you are offended by something you don't like, you don't get to whip or shoot that person. You get to call that offender distasteful, and if you are reasonable it might even make them shut up or change their point of view.

That's it. That's all you get. If you resort to violence or repression, what you get is disgust and loathing.

2014-11-24

Charades

From time to time I have an over-whelming sense of being in some sort of act, a charade.

I was going to write "still feel like" but I changed my mind. It sounded like this should have been something that a thinking intelligent person like me would have moved past by now - learn, accept and adapt. There isn't much of that I'm afraid.

I find myself suddenly thinking of dancing a little, like a Fred Astaire in the elevator, and then I remember that ... uhm, no, I won't be doing that.

What's weirdest about this is that the handicap is on my mind,  constantly. It's hard to not be reminded of it for every step one takes.

Especially in the mornings. I really hate the mornings, before the good pills have effect. And the evenings, when everything just wants to shut down, and the afternoon when I'm hoping to have some more time before it's lights out. And maybe around lunch, when I have to constantly remind myself to think about what I'm doing, that not all things one thinks of as normal are within reach now.

 Most of the time, not even a doctor House imitation. It's just a little too risky, trying to do anything beyond moving in the right direction without hitting someone or falling over. I'm aware that I speak more slowly nowadays, more carefully. It used to be that I held back the flow hoping to say slightly fewer stupid things, nowadays it's mostly to avoid sounding stupid when I say them.

Sometimes I wonder if I'm losing consciousness while I'm talking to people. I suddenly find myself looking at the one I'm talking to, and they're just staring at me like waiting for me to finish a sentence or a story. I of course have no idea what that story might be.

Writing really should work better for me now. Or even better, I should say. With the words in front of me I can at least just go back and see what I was writing a moment ago, even though it might be hard to figure out where I was going with it.

The strange silence that happens when someone expresses regrets about me being sick, is different. It took me months to realize that I'm probably being a complete jerk in those moments. The only answer I can think of is usually "Well, life is what it is and at least I'm not in pain". Which is true, but I finally realized that I should be saying "thanks".

2014-09-27

Anomaly

So I went ingressing again, more than just a detour or extra yard. Helios anomaly in Gothenburg. By now I'm back at "home" and indoors and relaxed with a glass of wine, not even frozen hands. Gothenburg was true to its reputation, not with rain but it was stormy enough to be pretty cold at the end as the sun stopped warming.

It's pretty nartural when you think about it but nevertheless annoying - the denser clusters of Ingress portals are always in the oldest part of town sp that's where most farming takes place and that's where the anomaly takes place. That means cobblestones and lots of slopes, so awful spots for me. Climbing around old fortifications isn't really my chosen passtime.

I did do it though, and it was fun and I felt great about it from the minute I arrived and heard the shouts and greetings from people I only met a few times before but who share this ... little interest. People who I know are on my side, in some sense. There's something pretty unique about that.

With the book fair taking place this weekend, Gothenburg is busy enough that us dorks with our phones didn't really stand out in the Saturday afternoon crowds. Outselves, we could easily spot the allies and enemies: stationary teams milling around the hot spots, bike runners and response teams on their way to a target.

Ingress is pretty darn cool and I feel great for having been part of today's event. Today ended up a very narrow defeat but I really don't give a damn about that.

I will sleep so well tonight.