Fighting Complexity of a Simple Calculator App

Encouraged by Dmitry aka Senior Software Vlogger recently I read an interesting paper called “Out of the Tar Pit” by Ben Moseley and Peter Marks. Good 50% of the article is way over my head.

According to the paper the two most important ways of how complexity comes to our apps are State and Control. Control is order in which things happen inside app. State is variables that change what and in which order program does. Both of them make an app hard to understand hence to modify.

The less State and Control a computer program has the better. The simplest program “Hello world!” does not have State and has only one thing to do (console output of a hard-coded string).

That’s all right but the authors say that OOP (which I like a lot) does not help fighting complexity. And this conclusion surprised me because… it really does! I wanted to check the authors conclusion by practice.

Continue reading “Fighting Complexity of a Simple Calculator App”

How could I improve AI choosing adds for me?

Recently I watched a TED talk about AI spying on us. Apparently governments and big corporations collect a lot personal statistics.

That’s true. My cell phone’s GPS module lets them know were I go. Free emails app gives away my contacts etc.

What can I do about this? Probably not so much. I’m not gonna use Tor until it become as comfortable in use as Chrome. Or paper maps? LOL

No. I’m not gonna worry about businesses and politics keen to know what music I prefer. 

Just one thing is really annoying for me: stupid AI struggling to choose “right” adds for me when I watch YouTube. 

I was told that it’s a quite complicated task. I absolutely disagree. Let me show how I would solve this problem.

Simple! Google, please, feel free to use it.

Would you like write your own code choosing adds for you?