Monday, April 17, 2017

I just love JSON ;-)

I'm keeping "diary", so place where I put some thoughts and things I'm thankful.
I have my own program to keep it, but earlier I used to use Narrate.

And this was only cause to keep Narrate still on my phone*. 
So yesterday in night I exported all notes from Narrate to Google Drive.
I exported also file in which I keep diary items for my current program..

And thanks to this that this is JSON I was able to add those old notes from Narrate to my Diary ;-)

I needed just to add in my Python program this lines:


import json
diary = json.load(open("diary.json"))

and I had access to my file :-)
Latter I needed only to add new items to diary, sort it, and save it with:



json.dump(diary,open("new_diary.json","w+"))

With some binary format it would be also possible but more complicated.

With JSON it was easy :-)

As I wrote, I just love JSON ;-)

* - it is Nexus 6, and is becoming very, very slow, and I still hope that uninstalling not needed apps will make it faster ;-)



Similar postsbeta
Which language is fastest? ;-)
Throw out 1 thing each day
My road to automation ;-)
Why it isn't working???
Python yet another hero of SF book Seveneves

Sunday, April 9, 2017

Twitter should die

Twitter should die. The same short posts on Facebook or Google+ or any other social platform.

People are in general stupid. They are clever, inventive, but stupid.

This is caused by fact that on average human brain in given moment is able to grasp up to 7 pieces of information, and tries to make all mental work as cheap as possible. And they have build in brain a lot of heuristics.

Twitter bases on this. Limit of 140 characters lets you only to pass about 20 words.. often with link included, so 18 words. Some of those words will be things like "the", "and", "a" and similar.

Those up to 18 words is great to pass some inspirational quota, give short description of mood, or basic opinion about movie.
But doesn't work for passing any useful information about controversial topic, or any more complex topic.

"A lot of snow today" works, but "According to scientists this year cold winter is caused by North Atlantic Oscillation which is unstable because of increase of temperature in polar regions" will not fit 140 characters, so it may be changed to "Scientists says that current cold winter is caused by global warming". 

Because of this if you want to put any meaningful information you need to compress meaning, and use less detailed, and more general words. 
"Lighter shade of crimson" becomes pink, information is lost, context is lost. 

And when people are reading those "compressed" messages they "uncompress" those, and add meaning. 
Because shorter texts are using more "opinionated" words this decompression adds rather more negative information.

And at the end we have short messages, which are misinterpreted, and loose most of context.

And this is even without doing this for purpose, for creating clickbaits or fake news.

So, Twitter should die.



Similar postsbeta
2016...
How to detect clickbaits?
Calculation of SSD life time in EEE PC
Coursera courses - worth of doing?
OOo2GD 1.5.1 Birthday Edition ;-)

Sunday, April 2, 2017

Programming languages uncanny valley ;-)

A lot of Java developers tries to learn Scala or Kotlin.
One problem in this is that some of them really fast hit a barier of uncanny valley ;-)

Both those languages are compiled to bytecode and run on JVM, and are able to use Java types...

When you start from Java, you know how to do stuff.
You starting to write in one of JVM languages, everything goes smooth... and suddenly you find out that in given language they decided to do it in different way.
What is even worse they decided to do it in some strange way (for you as Java developer).
Each time you find such situation you are more, and more frustrated and you start to hate those changes, and by extension whole language.

So, to avoid it, from Java start to use Python or Go. Those are so different that it is almost like learning programming for the first time.
Soon you will gain speed by making in your head some good abstractions.

Learning completely different language is like building bridge over uncanny valley ;-)


Similar postsbeta
Coursera courses - worth of doing?
Python yet another hero of SF book Seveneves
What sux in G1?
My road to automation ;-)
4 steps of evolution of programmer ;-)

Sunday, March 26, 2017

Borders, immigrants and so on

I have big problem with borders.

Maybe not exactly with borders but whole idea of "protecting" access to countries.

I can understand that country may don't want to get new people who were criminals, I'm OK with situation when country don't want to get new people with too low education, I'm even OK with stopping people which are too old, or too young.
I can understand that countries may don't want to increase spendings.

But I don't understand why people with university diploma, who are paying taxes, but was born outside country need to get special permissions.

In Poland we have now some people from Ukraine, and from this what I heard all of them need special permissions to work.
Those I know works in IT, and in IT we need a lot of people. More important than country of origin is this if given person have good technical level.

It strange. I always thought that the best will be to open borders to let all people in, or out if they like.
Yes, some local folks may have problems because people outside country will be better suited to work, but I'm not sure if it is OK to prefer some people to work only because they are from here...
Of course, if those are taxi drivers it may make sense ;-) or if they are teachers teaching Polish, but factory workers, programmers and so on... If they are better qualified to do work, why not to let them work?

OK, there may be problems with this that they are ready to work for less, and here I don't have idea how to resolve it, but those permissions and similar things are for all kinds of workers.
As far as I know people outside Poland in IT have similar/the same salaries like Poles.

If there are immigrants who like to live here, they should be able to do it.
One, important thing, they need to play with our rules. So they need to respect our law.


Similar postsbeta
2016...
Vacation in progress ;-)
OOo2GD - surveys results
It's alive... still ;-)
How to detect clickbaits?

Wednesday, March 22, 2017

Tech debts collectors in action ;-)

In one of companies* I used to work I shared with management this letter:


When I was sharing it with management, I said that I found this on my desk and winked in the same time.

They didn't listen.
So some time latter I eliminated first dev - me.
Now from gossips I know that at least 2 additional devs were eliminated.... and technical debt still exists ;-)

* - company should be nameless, to be honest in other companies the same problems were visible, only difference was I didn't created such letter ;-)


Similar postsbeta
Portable code smells list ;-)
Asus EEE 900
Watch to watch... ;-)
Python yet another hero of SF book Seveneves
2016...

Tuesday, March 21, 2017

Why people are so afraid of terrorists?

I don't get this. Why people are so afraid of terrorists?

Chances to be near terrorist in Europe, USA or whole Western world is practically equals to zero.

Terrorists kills up to 300 people in Europe yearly. In whole world it may be up to 35 thousand.
It is a lot of deaths but in comparison to deaths by obesity or flu it almost doesn't exist.

You have 80 times bigger chances to die by eating too much than be killed by terrorists...
80 frickin times...

And still people are scared to deaths by terrorists, and still eat too much..

As a species we have some fundamental problem with analytical skills....

posted from Bloggeroid




Similar postsbeta
2016...
Borders, immigrants and so on
Twitter should die
What's your choice?
Really first snow ;-)

Sunday, March 19, 2017

Watch to watch... ;-)

I love to talk with other people... I love it so much, that usually I'm talking too much ;-)

And today, being in train I found out possible solution.... app for watch to watch me ;-)

Smartwatches have usually microphones inside... why not to listen with microphone and check in some intervals if somebody is talking, and if this person is me?

First it may produce reports like:
"You talked by 167 minutes, I heard another people talking only 15 minutes.... Do you love sound of your voice so much?"

Latter it may start to vibrate watch when it will find that ration of talking is too much skewed.

Good, this is 3rd idea for app I have in last 48 hours ;-)


Similar postsbeta
Amazon Prime Video suxx
Correlation between traffic and time spent at work ;-)
Buffy and Angel on DVD in Poland :-)
Borders, immigrants and so on
How to detect clickbaits?