Skip to main content

Losing energy & time with Python

No variable declaration

Python does not know variables declaration. Nice for starting programmers. But it comes at a cost.

Python (under the hood) needs to find out what type of variable it deals with. This is done in a smart way, but also at a calculation-time and energy cost.

Is it worth the effort?

I don't think so. Computing always is about modeling the real world in one or the other way. And also in the real world, it is essential to know the type of variable one is dealing with. And most of the time the unit of measurement is loosely interpreted in programming. Sometimes causing real disasters.

Why then making programmers neglecting the real nature of what they are programming and stay in tough with the real world at the cost of the program speed (time and energy)?

The better way

It would be better to have a variable declaration including the applied unit of measure. That way, the program stays in touch with the real physical environment it is used for. And the program does not need to waste time and energy finding out how to deal with a popping up variable. On top of it, the programmer makes fewer errors towards the real use of the program.

Comments

Popular posts from this blog

De EU en de crypto war! Overheid zie toch eens de kansen!!

  Naar aanleiding van het uitstekende artikel van Fred Hage in de Computable van  27 november 2020. Overheden worstelen met End-to-end encryptie en ‘lawful interception’. Met andere woorden privacy op internet aan de ene kant en de mogelijkheid criminaliteit te onderzoeken aan de andere kant. Het blijft me verbazen dat overheden blind zijn voor de kansen die dit dilemma biedt! Stel "ik kan bij de NL-overheid mijn encryptie regelen" (met de wetenschap dat ze mee kunnen kijken). Dan doe ik dat toch zolang ik niets te verbergen heb! Dus: Overheid wordt eens wakker en bied zelf encryptie services aan! Ga met de betrokken internet diensten zoals Google, Amazon, Facebook, Microsoft .. etc. om de tafel zitten en ontwikkel encryptiediensten en standaards voor (vertrouwde) burgers waar ze gebruik van kunnen maken. De diensten kunnen dan vertrouwd verkeer van onvertrouwd verkeer onderscheiden. Ze kunnen vertrouwd verkeer direct, eventueel automatisch, onderzoeken. En me...

Localization is not one class, they are four

It is rather stupid that localization and language in web-apps are the same. They are not one, but separate classes. While US English is the dominant language in science, the old Roman Imperial measurement system is not. One should be able to use en-US for spelling etc. While using metric measure; ISO date format and in numbers the ‘,’ for thousand separator and the ‘.’ for decimal separator. So there is not 1 class, there are four: language; measure-system; dating-system and number-notation system.

Salary scale-up percentage under pressure

 In my earning norm model , I have lowered the scale-up to adapt to the crisis. What is the scale-up? The scale-up is the gross salary multiplier from the scale below. So from the bottom salary every next scale salary is multiply with the scale-up from the lower scale. This scale-up was 1.45 (thus + 45%). But this figure will come down the coming time because of the economic insecure times we are about to experience. Depending on the economic developments it probably has to be lowered in the coming months. I will follow the developments and adapt the model accordingly. Scale up It is now 1.3 (+30%)