onsdag 6 januari 2016

A solution to the Fermi paradox and the missing 96%

96 % of the universe mass is missing. At the same time we have the problem of the Fermi paradox. Combine them, and what do you get? Lots of type II and II civilizations.

söndag 3 januari 2016

I just learned about the dining philosophers problem...

The dining philosophers problem is an interesting one, invented by Dijkstra, and important in multi-threaded programming. I read the Wikipedia article and some others on the subject, and noted that the problem is very similar to what is faced in a wireless communication scenario where several clients needs a way to share the channel.
In communication the problem seem to have been solved in some other ways that in programming. E.g. Cellular systems usually employ a scheduler. 802.11 instead uses CSMA/CA. It is interesting to note that the communication system problem description actually is closes to the original problem formulation by Dijkstra where he considered shared access to a tape recorder system.
It would be very interesting to investigate how the computer science solutions perform in a wireless scenario, and vice versa, how would the wireless (and wired, e.g. Ethernet) solutions perform in concurrent programming scenarios.
I will have to get back on that.

On language and communication

I like philosophy. Especially philosophy of language. Recently I wrote an essay on the subject employing a, at least to my knowledge, new view on communication as transport, not of data which is the classical view I would say, but rather as transport of programs. The essay is attached. It is a draft with ideas sketched and not finalized. Mathematical notation in the text should be viewed in a lose kind of informal way. I am not trying to derive any mathematical theorems in this text.

onsdag 30 december 2015

Why I hate everything Windows

These are just some issues that I simply can not understand how they can be allowed to stick around?!
  • When I mount a USB stick, I get a note about that my monitor does not have the optimal resolution set.
  • Then I compile a program using VS2010, or VS2015, domain name look-up does not work.
  • Adding a network drive with other authentication forgets the authentication if it failed to connect one time (which of course it will since I have connected network drives from many local networks).
  • The default (which I do not know how to sensibly change) timeout when trying to connect to a network drive is something like 30s. Now, the OS is stupid enough to verify these connections every time a file access is attempted by any software. And if the connection fails (after having being active, a not very unlikely scenario if I move my laptop) it will still try to connect EVERY time a file access is attempted. And this continues until the system is rebooted?!
  • If I want to save a word-file using save as, I have to activate editing of the document - ridiculous!
The list will be extended as I find more craziness.

Update 2016-01

I should probably actually generalize this to Microsoft products in general. How about this one:
I have to use two Office 365 mail accounts on the web belonging to two different companies. But the system can not handle that, so I have to log in and out every time I need to do something on the "other" account...

onsdag 2 december 2015

A suggestion for a C++1z feature

This is probably quite a controversial proposal. And I am by no standards a very skilled programmer. But anyway, I think this feature could be rather nice to have.

The idea is to have some kind of Post-constructor automatically generated and executed member function. A suggested name for this function would be initializer. It is not entirely clear to me how it should be run, but maybe in reverse compared to constructors, so that derived classes initializers are run before base classes.

The rationale for this proposal is; How many times have you seen code like:

class A{...};
class B : private A{...};
B m(param p);
m.Init();

Or something like that. The reason for this construction (that is, why the code that goes into init does not go into the constructor) is that Init calls some interface function from a member of the base class A to the derived class B. Now this interface function for sure will need stuff created when B was constructed, and hence it can not go into A's constructor. It can also not go into B's constructor since, B does not know about all stuff in A.

For this, a really nice solution would be if all classes run Init-functions in reverse automatically. Then if this function is not user created, it does not have to be run. However, if the user created it, it should be run automatically at the end of the constructor. Maybe it could be done in a fashion similar to the init list in the constructor, but appearing at the end of the function declaration instead? Something like:
B::B(param p) : ...{
...
} : !A()
Where I named the function !A.

måndag 16 november 2015

Infrasturktur igen

Jag har tidigare skrivit om att vi borde ha ett nationellt mobilnät. Jag har också skrivit och varnat för bankernas (då) nya betaltjänst Swish. Tack och lov har denna tjänst haft svårt att få fotfäste, men användningen växer tyvärr och det börjar märkas nu att det ibland är krångligt att inte använde detta. Så, snart kommer det börja kosta.

Men min uppmaning som en förening av tidigare blog-inlägg är då: Varför ska det inte finnas ett nationellt infrastruktursystem för digitala betalningar? Detta borde ligga på myntverket, nu när människor i allt mindre grad väljer att använda analoga betalmedel, borde man anpassa de nationella systemen för att serva dagens människor. Det är helt absurt att man lämnar över denna typ av kontroll till privata aktörer!

söndag 15 november 2015

How on Earth could it hapend...

... that the Microsoft software sphere became so popular?!

Seriously, me nerves can not take working with this stuff! And the list of all faults is too long to repeat. After using this retarded software, I am now so exhausted I can not manage to write down a single thing as an example here. as they all require more than one sentence and I am just too tired! I just had to spell this out somewhere. It seriously is jeopardizing my health!