In practice, we have problems with authentication and authorization. Some issues are mitigated by n-factor authentication, more and more popular for web-applications. Additionally many web-applications know how to deal with different levels of “probablity of identity”, and explicitly ask for the password again before allowing access to more sensitive operations. I think that an extended approach might work well for mobile devices, and also for classic workstations.
Different tasks, performed on different data, require different security-levels: making a phone-call with your smartphone might require almost none, wheras accessing your Google Authenticator app should require some additional protection (it currently doesn’t).
Some thoughts are so strongly automated, so seemingly separated from what we usually mean with personal volition, that I categorize them into perceptions; perceptions of thoughts, similar to perceptions of emotions, and perceptions of our senses. The passive, automated nature of those disguises the possibility to effect changes; and the subtle distinction between automated and “voluntary” thoughts sometimes masks changed perceptions as personal actions.
The disguise as “unalterable reaction” is a dangerous part when I fall into a depressive episode, and the illusion of personal agency in other situations has often led me into over-optimism. My mind is still able to pull that trick on me.
I think the mechanics of this is, in part, simple, and being aware of that might explain how I came to some of my less-widely shared opinions on the value of life.
Yesterday I held a one-hour presentation of property-based testing, using the F# library FsCheck at realraum. It more or less covers the introductory documentation of FsCheck, just with fewer details and in a different order.
“Living in misery is marginally better than dying in it.” In the TV series Dr. House this was, as far as I understood, meant as a hopeful outlook; representing that even a (superficially) misanthropic, and clearly non-religious person as portrayed in the starring character sees the inalienable value of life. When not stretched too far I even agree with it, especially because I know I will stop existing.
But it sweeps under the rug of just how bad life can feel. And also that about 2% of all people that die each year disagree with this statement.
The numbing B-movie mode of my existence did not achieve everything by its own. “I fucking hate myself. I hate it. I hate life. I hate my life. I hate these assholes. I hate this world.” Now let’s fill this highly-sophisticated sentence with anger, let’s repeat it, sounding like a broken record, spice it up with self-reflective meta-hate for repeating it. Let’s do this several times a day. For some weeks in a row.
I do not remember whether this hate-depression was before, after, or intermixed with the zombie-depression.
There are several ways how to experience depression. One of those that I experienced was my relegation to a mere observer of my own life. I do not speak of highly vivid mindful observation that people seek to practice with meditation. Nor do I speak of the sudden artistic flashes, when you sit in a bus, daydreaming, and suddenly talk and noise and colors and movement and time mix together in such a way that I could think myself set in a Tarantino movie.
That would be great. It’s not that kind of observation.
Writing about depression is harder than it seemed to me. My respect for people who have written well about the subject rises by the minute. What makes it difficult is not a prevalent social stigma; I’m lucky enough to live in one of the saner places on Earth. To write an appropriate text seems nearly insurmountable, as everything I wrote so far seemed either too personal, too abstract, too simplified, too emotional, not emotional enough, missing key pieces… Inadequate.
As I am nothing but a dilettante in F#, I still get surprised on the simplest of cases. This week’s glorious “get-it-compiling” issue was about initializing a new instance of a class.
Given a class with a few fields…
type R() =
member val A = 0 with get, set
member val B = 0 with get, set
…one might try to conditionally initialize them with some values…
let s = R(A = if 1 < 0 then 0 else 1,
B = if 0 < 1 then 0 else 1)
…and then get this nice compiler output (which really says it all, but I am not yet up to speed on that either):
let s = R(A = if 1 < 0 then 0 else 1,
stdin(41,36): error FS0001: This expression was expected
to have type
but here has type
'a * 'b
Here it says it: I want an
int, I get a tuple. The reason is that the comma operator separates tuple elements, and it seems that in this case the compiler prefers to interpret it as the appending a tuple element to the result of the
else-branch, rather than separating the
field initializers. After recognizing this:
let s = R( A = if 1 < 0 then 0 else 1
, B = if 0 < 1 then 0 else 1)
Just a few days ago, 27th of February, I gave a presentation introducing F#, and like a few years ago this was held at realraum. In case you are interested, view the slides.
Although the announcement mentioned “one hour” and “teaser on the F# highlights”, I totally screwed up those parts and it took nearly 2.5 hours, and only talked about the basics of the basics. I talked about the
- minimum necessary syntax
- functional-programming ideas like higher-order functions, currying, composition, tail-recursion, immutability
- that OO and imperative style exists
- a little bit on monads, especially
- pattern-matching, type deduction
Type providers only existed as a teaser, and many other things where not covered at all. I don’t know what took me so long. At least, the mood of the participants seemed quite OK, and I was told that one liked my enthusiasm. (I hope that was meant as a good thing.)
Now, I have not further edited the slides, as this would probably lead to them never being finished. However, I took some lessons from my part-screw-up:
- I should have taken a step back, and asked myself more strictly: What is the goal of this? At the end of the presentation, what can the audience take with them?
- But even then I must take limited time into account: I must choose a topic so narrow that a meaningful exhibit is possible.
- Not knowing something is OK, but not knowing something, telling people that, and then going on speculating for another five minutes does not add to the conversation. Just, stop. Better to talk about things that I know.
- I really don’t understand why I was falling for this stupid comparison trap: it’s about F#, and not some problems of the Ruby VM. So don’t talk about the Ruby VM. Damn it.
But after all that complaining: at the end, it did not run worse than expected. It’s an acceptable base level. And also, I got to know remark and highlight.js.
Last year I held a short presentation featuring an introduction to C++ Template Metaprogramming in realraum. I just added a few comments to the slides and code examples, as I promised to put them online.
The documents provide an overview what meta-programming means, how it is done in C++ using templates, and what kind of programming language C++ templates constitute. Then it continues with an introduction into conditionals and recursion, and finally provides a code example how to use simple template techniques to create a
restricted<> type, which will produce a compile-time error if a given operation cannot possibly result in any acceptable value.
At first I wanted to go into much deeper territory, but I both lack the experience with that kind of stuff, and at the time also did not have that much time for preparation. Still, feel free to comment on whatever you deem worth to comment on.