Saturday 29 March 2014

TrafficControl: Background and Purpose


My main motivation of building this application is to learn all aspects of building software. Therefore, I'm building this software myself, instead of having it on collaboration sites such as SourceForge. Maybe, I'll use such sites in the future, but that is a decision that I will make later.

I want to build an application that can simulate an advanced train network, such as the trains in Skåne county, the metro of Stockholm or the train network that existed in the beginning of the twentieth century – what would the traffic look like if we would have kept those old railroad lines instead of removing them?

Skanesjarnvagsnat1910
The rail network in Skåne one hundred years ago.
The rail network in Skåne today.

My ambition is not to be very detailed on switch level for the train networks, that would be too complicated.

Instead, I want to simulate the train network from the commuters perspective. How many person-minutes will be lost waiting for trains, what bottle-necks will there be and can a more advanced traffic control system become adaptible?

Friday 28 March 2014

Lesotho, ZA/LS: Sani Pass

Up to 3 500 meters above the sea, landlocked and surrounded by South Africa, lies a small and peaceful kingdom named Lesotho.

Lesotho was protected by the UK and got its independence in 1966.

The people call themselves Basotho, one person is called Mosotho and the language is Sesotho.

As only four-wheel driven cars can handle the Sani Pass, we left our bus behind and went up with Land Rover cars.

The ascent from 1600 meters to the entrance of Lesotho took one hour and was very steep at the end. During the winter (may-august) it may snow om the road.
At the Lesotho border station, we saw some Basotho dancers.

Still, we had more than one hour drive to the village where we were to stay over night.











Saturday 22 March 2014

Human Rights: When (not) to Harass People

During a walk in central Malmö, during the second week-end of March, I passed a man who was begging for money. Some seconds later, I saw some senior citizens kicking the man's cup so that he had to collect the coins again.

After confronting them verbally, I gave the begging man some money.

In my mind, it is OK to give beggars money - and it is OK not to do so. After all, it is your money and your decision. However, it is never OK to harass people. That will not improve their situation, it will only kill your soul.

Some hours later, I heard that some people who are working for equality and tolerance were seriously stabbed and abused by fascists, who want to poison the world with hate and fear.

This makes it the second big attack within months in Sweden.

Even if the main focus of this blog will be computer programming, science, trains and other nerdy stuff, I will sporadically cover more serious issues.

Writing about such subjects will attract some trolls, who want to poison my blog. Anyone who want to spread hate is free to do so. But not on my blog.

Therefore, I will pre-moderate all incoming comments. Thy hate shalt not pass!

Thursday 20 March 2014

Cape Town, ZA: Climbing the Table Mountain

The mountains are dominating the sky line of Cape Town. The most remarkable mountain is the Table mountain (Taffel in Afrikaans), and the name is obvious when you see the mountain - it looks like a table. When there are clouds over the mountain, they form a table cloth, falling over the edge in a very beautiful way.

I and some co-travellers secided to climb the mountain from the lower cable car station to the top (from 350 meters up to 1050 meters at the top) 700 meters to climb!

It was a very exhaustive climb in the sunny and warm weather, and I drank some three liters of water during the two hour climb to the top.

That day, there were no cloth clouds so the view was spectacular, one kilometer up. We saw some dassies and some beautiful black birds with orange feathers at the back.

We waited for the sunset - and it was worth waiting for.

Saturday 15 March 2014

The Qt part of the blog

Qt is an cross-platform application framework that makes it easy to develop powerful applications with network support, SQL databases, apps (Android / iOS / Blackberry) and much more.

My programming projects StockReader and TrafficControl are based on C++ and Qt, and the cross-platform concept has made it quite easy to migrate between Linux/Ubuntu and Windows8. Of course, the cross-platform ability is an idealised dream, but it wasn't too hard to adapt my programs to the different operating systems.

I myself don't have the experience needed to give a full introduction in Qt. Bryan Cairns has some excellent video lectures on programming with Qt.





I can absolutely recommend Qt. Of course there are many other frameworks tools with their pros and cons. Discussions about the programs / frameworks that are best tend to be dogmatic but I'm open for discussions.

You can find more information at http://qt-project.org/

Thursday 13 March 2014

Cape Town, ZA: Township Projects - My Impressions

During the first day in Cape Town, we visited two different society projects in Khayleisha, one of the biggest townships in Cape Town, housing more than 1M residents.

Before the visit, I had some thoughts regarding my visit to that township:
Did I exploit the citizens of the township as a priviligied westener with one day of charity? How would the residents think about us, who are able to enter and escape poverty any time?

After the visit, I may not be wiser, but I have some more realistic perspectives. Yes - there is poverty and some serious social problems.

But my strongest impressions from that visit is hope, empowerment and ambition.

The first visit was to Iliso Care Centre in a township house. Lunga presented the child group, the computer training room and the soup kitchen. Gagela and Lunga were very proud of the centre - and they should be. They asked me to spread information about the centre. Their URL is www.iliso.org

The second centre, Philanti, has a clinic that visits and assists pregnant women and women with small children. We visited a class with small children and we bought some bags that women in the centre produced, singing a beautiful song for us. Stembile and Cynthia were operating the sewing machines.

In that huge township, I met strong, comitted and positive people with strong networks - neighbors helping each others.

When discussing societies and poverty, it is important trying not to be too biased by ones previous understandings.

I will post more pictures and thoughts later.

Saturday 8 March 2014

TrafficControl: My train project

I have a few software projects on a hobby level as a way to learn software development at a level beyond "Hello, world!".

Traffic Control is a program that will simulate an arbitrary train network. It is being developed in C++ using the Qt framework, which I will describe in more detail later.

Put simply, the train network consists of a number of objects that describe the trains, stations and path segments. They are listed in three different Qlists: one for all trains, one for all stations and one for all path segments. The parts are coordinated by a central object, trafficControl.



Currently, I will just post pictures of the program. When it is more stable, I will post executables. Finally, I need to decide how to share the source code with respect to license and intellectual property issues. That's why I won't use SourceForge - yet.

In future posts, I will describe the challenges I've met with my project. First, I'll have a long trip to South Africa / Mozambique / Zimbabwe / Botswana.

Saturday 1 March 2014

Föreläsningsanteckningar – Mikroekonomi

Under hösten 2013 tog jag en distanskurs i Nationalekonomi vid Lunds Universitet. Här är mina föreläsningsanteckningar som inspiration. Jag rekommenderar studenter att skriva egna anteckningar – att gallra ut det viktiga och bygga en egen struktur är väldigt lärorikt.

Kursen hjälpte mig att få ett sammanhang av de spillror av ekonomikunskaper som jag har sedan innan. Men note to self: heltidsstudier och heltidsarbete tar mycket tid.


Jag kan garantera att det finns flera luckor, motsägelser och rena felaktigheter i anteckningarna, men de hjälpte mig att få A på den kursen. Hittar ni fel får ni gärna kommentera dem.