2016. március 7., hétfő

Tisztelgés egy hős előtt



A fukusimai atomerőmű katasztrófája arra figyelmezteti a nukleáris beruházást folytató országokat, hogy egy súlyos baleset teljes társadalmi és pénzügyi összeomlással járhat. Japán hajszál híján megsemmisült öt évvel ezelőtt, az adófizetőknek körülbelül egyévi magyar GDP-nek megfelelő összegébe került eddig a kárelhárítás, és nagyon messze van még a vége.


Annyira vicces, hogy megpróbáljuk az "istenadta nép" számára legalább forintosítani a kockázatokat, amelyeket sajátméretükben felfogni képtelen...

Mondok egy másikat.
Programozó vagyok, a dátumoknál az évszámot 4 jegyen kezeljük, ez ugye nyolcezer év múlva jelent legközelebb problémát. Az általunk most fűtőanyagként használt Pu239 felezési ideje 24100 év. Vagyis, 26111. márciusában a most kiszabadult plutónium sugárzása már csak fele lesz a mainak. Ezért is tény, hogy az ilyen anyagok tárolásáról hivatalosan is 100000, mondom, százezer évig kell gondoskodni. Vagyis csinálok egy dobozt, beleteszem ezt a valamit, és 100000. január elsejéig kell rá nagyon vigyázni.
Mai gondolkodásunkhoz méltó örökség.

Attól tartok, ez sem felfogható, mondok még egyet.
A városi állatkertbe behoznak egy irgalmatlan nagy ketrecet. Méteres vasbeton falak, embervastag rudakból álló rácsok. A nép tódul oda, hogy ez aztán mekkora siker, hű, de megnézném azt az állatot, mekkora kunszt, hogy egy ekkora dögöt rácsok mögött tudunk tartani. Mert a szerencsétlenek önmagukhoz mérik azokat a falakat.
Csak egy fazon rohan az ellenkező irányba. Ő úgy számol, hogy ha a profitra vágyó állatkertészek ennyit költöttek a ketrecre, akkor nem akar a közelben lenni, ha valami nem pontosan úgy alakul, ahogy (ismétlés: a költségeket mindig farigcsáló) építők elképzelték. Arra ugyanis, hogy ezek a falak nem bírnak valamit, nincs forgatókönyv.
Ismétlem: nincs forgatókönyv.
Csak azok az emberek, akik ott állnak a fronton, mint a fukushimai erőmű azóta tüdőrákban meghalt vezetője, aki halála előtt nyilatkozott, hogy a dohányzás miatt volt rákos. Mert ahhoz semmi köze, hogy egy radioaktív xenonfelhőben vezényelte az elhárítást, és (közvetlen utasítások ellenére) szó szerint mindannyiunkat megmentett egy akkor nem is esélytelen, sokkal rosszabb kimeneteltől. 


Ha az áldozatát felfogni nem is vagyunk képesek, legalább ISMERHETNÉNK egy igazi hős, Masao Yoshida nevét, ha nem is olyan híres ma, mint Anakin Skywalker, Kirk kapitány vagy Elon Musk.


De ha ez se megy át, és ragaszkodunk a forintokhoz, érdemes végiggondolni, hogy mekkora költség lesz kezelni és lebontani a mai erőműveket, amelyek már nem adnak semmit, de tele vannak iszonyú nehezen kezelhető sugárzó hulladékkal. Az egyébként híresen precíz japánoknak se megy nagyon, ajánlott olvasmány Monju története.

Ezen a téren csak az óriásplakátok segítenek, mert azt mondják, amit a kedves polgár hallani szeretne a valóság helyett.

2016. február 15., hétfő

Writing Source Code is Evil

The aim of our industry is to produce software. That is: listen to our clients' requests and create a system that can does what they wanted, on their hardware (be it a global company IT infrastructure, a smart watch or a thermostat).

This sentence is a typical mission statement:
sounds nice, easy to repeat, and totally useless.

What they “wanted” is mostly unclear, we only know what they have told us. No, we only know what we have understood from what they have told us. “Does it or not?” is a yes/no question. In practice, we can only have a measurement that gives a hopefully objective ratio “how much” our system meets the requirements. We don't just want to create working, but good software. We want to compare different approaches and solutions objectively.

So, we need to measure the goodness, or fitness of our software.

Measurement theory

Fortunately, we do have a sound scientific methodology that can reliably guide us towards a better understanding and judgment, can estimate the “goodness” of our current understanding, and help us further refining it. To explain the title, we will only need the fundamental definitions.

System

In very rough terms, system can be any part of the world that 1: we separated from the rest, 2: interacts with its environment, and 3: changes during this interaction.

Naturally, any software is a system by this definition. However, the actual form of our software is thousands, sometimes millions of lines of source code, configuration, database content, collection of external libraries: gigantic amount of “content” in unclear, but existing relation to goodness. We need to simplify it.

Modeling

We never know “the truth”, but we don't even have to.

Drinking a glass of water is possible only by having the molecules, their atoms and their subatomic particles of my body, the glass and the water in it to follow a proper arrangement for the action; and “the truth” may even be under those levels. However, we have a good enough model of our body, the glass and the water, and we are able to control the process adequately.

Good models give us reliable control – bad models increase uncertainty.

If we know how good our models are, we can estimate the precision of our actions, or add safety mechanisms to our process and achieve a reliable operation in a less reliable environment. Standing is different in a room, in a moving bus or after some drinks, but we can manage such scenarios in a quite wide range by adaptation.

Black box models

These models describe the system from the external perspective only: we can see the environment, the input given to the system and its response. With enough tests, we can say that we know what the system does in certain conditions, and we can build reliable operation on it. However, the same system can give us surprise in untested conditions. The cooling system of our cars works normally, but can also cripple the complete engine in case the coolant freezes. Our black box model can only tell that it works now, but it is safer to look into the box.

White box models

White or glass box models are those that we see through: we know all the internal components and their interaction, so above knowing what it does, we exactly know how and why it does so. Of course, the “absolute white box” is the complete truth itself, which we don't know. The elements inside our white box models are also models, but we assume knowing enough about them to calculate their behavior. We do know about the constant subatomic buzz, but it will statistically never affect the behavior of our car engine. Unlike the fluid levels that we must check regularly.

Analysis

In practice, our models are not completely black or white, but this short introduction to modeling gives a clear statement: the “darker” our models, the less we should rely on their findings.

With a complete black box we can only have a checklist, we can grow them and repeat testing many times. But without peeking into the box, we can't even know what critical checks we have forgotten about. With a complete white box, we only have to check that the required elements, their parameters and connections are there, because if they are, then the system should work as expected. If it does not, the model gives us clues what parts can cause the problem and what checks are needed to locate it. It can also point at the critical elements that should be regularly checked to make sure the model is adequate.

The consequences are clear: it is definitely worth creating whiter models, and the opposite: constant struggle of otherwise motivated and adequately trained participants is likely caused by black box models somewhere in the way.

The development process

Negotiation

To simplify the scenario, our clients asks a question (“can you do what I want?”), and we give them an answer.

In general, we are in competition with others and need the money to continue the operation, so we want to offer more and/or ask for less than the others; while the clients want a working system in the long run but also want to pay less now. Furthermore, adequately refining the question and giving a reliable, honest answer needs a lot of effort and contains serious risk, especially if the competitors' offers are more “optimistic”.

Perhaps it would be too hard to say that within natural business environment our answer will always be the words the clients want to hear, but connected smartly enough to give us backdoors to extend the deadline and price in case we really have to do the job (in short: a lie, or a bit longer: professional sales material). But it would also be too optimistic to assume having a thorough requirement and architectural analysis before making the deal.

Design

Of course, there are programmers and companies who win a contract because they are ahead of all others by far. They start coding using agile methods, their solution will evolve to perfection naturally and don't need any more philosophy around it. May the Force be with them, but the rest of the world is not so sure of that, so they need objective measurement of goodness, and consequentially, some modeling.

Initially, we receive a requirement specification. That is, by definition, a black box model: we don't know the internal structures, don't even know what we don't know about the clients' problems or how to solve it. In order to get a better view, we need to make our models whiter.

But what should we model: the problem or the solution? We have to deal with both, and the two seems to be important alone. Especially, if we want to prepare for later changes from the clients, it is important to clearly see the interaction between the new requirements and our solution. By creating separate task and solution model, the connection must have a clean interface, thus the effects of changes will also be more transparent. Fortunately, we have separate roles for these tasks.

The system analyst deals with the problem model, talks the language of the clients, is an expert in the problem domain. Together with the clients, they refine the requirements, make a white box model of business domain entities, their responsibilities, interaction, and finally, check if the specified data model can behave as it was required. The software architect works with the solution model: software components, tools, databases, deployment environment. Together with the clients' IT experts, they design the actual system components, data tables, connections to the external systems. This is an iterative process, the actual environment may set needs or limitations to the original requirement, which can be improved and adapted to them.

Finally, we have two "enough white" boxes that show how we solve the task, can be objectively evaluated against the requirements, or adapted to later changes.

Implementation

And now...

we take our white box models and wrap them into black boxes again!

We write source codes on various languages, and create configurations to components that were written in various languages again. The source code has no defined connection to the structures that we have designed (coding standards and design patterns don't help much), there is no straightforward way to validate the result.

Each measurement is as good as its worst segment. Returning to a black box model means the complete, so far controlled development process is almost as bad as doing it all with no planning. In practice, the expensive design phase seems to be a waste of money and resources in meaningless discussions and brainstorming. Some of the lucky startups may overtake the highly organized companies even in the quality of their products (perhaps because they do the job at their desks that the big ones outsourced to cheaper but less motivated guys).

Houston, we've had a problem...

Solution

If this problem is so obvious, why don't we have a solution already? In fact, we do, on many levels.

Sedatives

Of course, we have tons of static and dynamic code analyzers, unit testing, integration testing, continuous deployment tools, etc. This does not help in the fundamental problem: we put our solution into a black box, and all quality measurements are just external checklists without understanding the internal structure.

The tools that peek into the program structures by detecting the graphs show useless complexity, gaining useful information from such a report is on the same magnitude as asking a professional to write it again.

Those that try to enforce connection between design and implementation like UML tools are very rarely used because they limit the freedom of both the designers and programmers without providing a clean process model for the transformation.

Considering all this, the current failure / delay rate should not be a surprise. Even if we gracefully forget about the 99% of startups that die without notice.

The Good Old Days

Decades ago, when there were much less programmers and much weaker hardware, we could not afford wasting so much resource on writing code, so for example, user interfaces were created by resource editors. There were much less hype around user experience, but those systems were quite usable.

Today

We have a renaissance of declarative user interfaces (Apple never left it, Microsoft, Google, Mozilla and many other vendors create their own user interface configuration tools). Application structure is also going out to configuration, these are the cloud based solutions, Inversion of Control Containers, etc.

There are also many systems that allow their users or admins to configure their operations. Security systems are configurable in many environments; we have workflow engines, task and project management tools, etc. All they can do can also be done by typing some lines of source code, but that is unsafe, it is better to have some visual editor to click and drag together the process in a guarded and validated environment.

What is common in these tools? They all bring the white box model back to the implementation level!

Is it a problem to solve at all?

Our economy is moved by the needs.

Education system is happy that we “need” legions of programmers who should type source codes to the always changing and ever newest platforms, “solving” the same problems again and again. This looks good in marketing campaign and political slogans, keeps the business running. Solving this issue would change the IT world, and is not compatible with any of our current business models.

Even if we could create the technology, we are not ready for its consequences.

Summary

  1. Software became fundamental element of the human civilization, its quality is critical;
  2. We can check and improve quality only if we can measure it;
  3. Measuring depends on the models that we create;
  4. Reliable checking, efficient problem finding, estimating the side effects of changes only available with white/glass box models, while black box models only allow guessing by experience;
  5. The requirements are black box models, that we can make white by expert problem and solution modeling, but traditional implementation puts it back to a black box again;
  6. Advanced computing technologies have one thing in common: they allow white box modeling in implementation.

So...

If you want to build a reliable system, write less code!

And use libraries that also follow this approach, because the quality and flexibility of your system is related to the same attributes of your weakest component.

2016. január 17., vasárnap

Én már nem muzsikálok...

Nos, elmúlt a 42, és sok szempontból ez volt a legjobb év eddig, megérte várni rá.

Úgy érzem sok mindennek megéreztem a mélységét, tartalmát. Végre mertem kérni, és nagy segítséget kaptam értékes emberektől ahhoz, hogy tovább tudjak haladni a belém égetett úton. Végre megértettem a különbséget: a ti gondolkodásotok célja az, hogy a komfortzónátokon belül maradjatok - az enyém meg az, hogy azon kívül hatékony legyek. Ezért beszélek hiába főként azoknak, akik magukat "dobozon kívül gondolkodónak tartják".

"Kint" nem változott semmi. Én viszont egyre könnyebben látom, hogy a körülvevő végtelen magány tekinthető szabadságnak, mozgástérnek is. Csak le kell mondani arról, hogy meg tudom oldani mások problémáit. A fejlődés útja, hogy a gyengét eltapossák, és én nagyon sokat töltöttem saját véges időmből azzal, hogy elveimet követve próbáltam elrángatni a porban játszó gyerekeket az autó elől.

Hálás vagyok, hogy a jelenben élek, egy olyan civilizációban, amely már minden kérdésemet és problémámat, de a választ is megfogalmazta már, sokkal szebben, mint én tudnám. Ezek az én ajándékaim, ezek a szövegek, ezek a hangok nekem szólnak. Hála érte!





2015. december 3., csütörtök

"Big ideas"...

3 Habits to Help You Get Big Ideas

So my advice to you to become more innovative is: don't accept the status quo, defer your judgment and stop thinking. I am sure great innovative big ideas will pop up sooner or later. Is it that simple? Yes, it's that simple. Just, try it!

I think the best guys do this in the kindergarten, and I guess this is a good recipe to share and get many "likes" from your pals. But to do something for real,

That. Is. HARD.

Simply, because you do not live in a world with complete idiots around you, and you are not a superhero from your favorite movies. So, you can't overtake "all the others" by being bold only. You MUST be really smarter than them, and that is a long and hard way, and maybe not for you because you are not... "the" chosen even if you are one of the very best. And those who finally win (in the real world) are the ones who know and ACCEPT this fact AND keep pushing! Got it? Real numbers and probability.

I like a story (I don't know the origin) about a Chinese Microsoft(?) office with a tag saying something like: "If you are smarter than a million of us, then you are perhaps one of the 1500 guys we want to choose from" ;-)

Or listen to the guy who does not only talk about success, or "manage ideas", but like or not, achieved something.

2015. november 27., péntek

An ode to NASA



Dear NASA, good message, but next time please consider physics when making a video campaign (R2 landing and leaving the ISS). ;-) Or is it only my eyes glitching again? [edit: the guys working for you today grew up with Fred Hoyle, Asimov, Lem, ... The reality can be disappointing for someone looking for a laser sabre or space jump button]


But there are those of us who enjoyed the old FLASH GORDON serials, Jack Williamson`s THE LEGION OF SPACE, and many other great swashbuckling Space adventure stories, not all of us are into the "nuts and bolts" type of Science-Fiction...Space Opera had always, and will always have a special place among the masses, no matter what some elitist sci-fi snobs spew negatively abouth it


I have not criticised the spacey-tale worshipping mob. Yet. But come on,

NASA is REAL. 

I highly respect their job that those masses have no idea of, and would think boring and "elitist" at the same time. I prefer watching decades old NASA footages to 3D IMAX bullshit. To see how they really MUST check every single nut and bolt with absolute passion and humility several times - otherwise great men will burn like a torch.

 This mob is yelling "you can't make a mirror" when Hubble fails - because of a 1.3mm error in a test device; "bastards" when NASA was forced to underestimate the known risks and did not dare to delay the launch again, etc, etc. I know this rant has no meaning to the people you refer to, and will not be popular either, but if there is one sentence to be taken home, it should be this one:

Real space is not for toddlers. 

 Even if they have big plasma TVs and "opinion", because a single one of them can ruin all the efforts of thousands of dedicated NASA people. So NASA should not look for, but be scared of them. This was my problem with this campaign, and I guess I have right to talk about it - and anyway, this will also sink in the guano of this current "internet communication". Take care! :-)



Oh, sorry if I dont bow to your "mighty" sapient, but certainly NONE of these things would be accomplished with at least a bit of imagination, a bit of child like wonder, HECK! even people like Glenn or Armstrong enjoyed so much things like BUCK ROGERS, or JOHN CARTER when they were kids...I have in great regard what NASA and the Russian Space programs have done, what I dont condone is the petty biased elitistic nonesense against certain type of fiction. It is what famous sci-fi author Brian Aldiss criticized in his anthology series "Galactic Empires", the "literalism" which sacrificed style for form, resulting into a grey and lifeless storytelling compared to the classics from the so called golden age of Science-Fiction, like Stanley G. Weibaum or Poul Anderson ...Even if this is not accurate a true intelligent person would UNDERSTAND the purpose for which it was made off, if I want something accurate I watch Discovery channel, or open a book on physics...Bye!



Strange, I don't see your last message under the video, but it worth an answer anyway.

First, I don't care where you bow or what image you have about me. I could use a bit of respect, if you knew what that word originally meant (when opinion and discussion also had meaning). Then, I should not remind you that I agree with you about the importance of imagination: it was there in my first message to which you "answered".
https://www.youtube.com/watch?v=fo78gb4EZ6Y

By the way, that is also not new, see for example: "... if a man were permitted to make all the ballads he need not care who should make the laws of a nation..." (Andrew Fletcher, 1703, and yes, that more famous statement about money is only a derivate ;-) ). I think I know quite a lot about how and why "ballads", from the ancient Greeks, through Jesus and REAL sci-fi (where sci is for science and not for "tech voodoo you can't understand but solves everything for a happy end") formed the path of our civilization.

It all depends on the quality, which is not the CGI, popularity, dramaturgy or the shallow "message". A good ballad is a tool for head fake learning, it makes you look up physics and philosophy, makes you think, makes you feel bad about what we do today. A bad one makes you accept what you see, gives you not criticism but rotten clichés. I respect Armstrong, but he would be a race car driver without guys like those who imagined the LOR, the first was Kondratyuk in 1916. I repeat: in 1916! That IS science fiction that brings us forward. Compare it to movies, and their budgets that NASA could also use for something, I guess. Even if space cowboy fans would not understand a single word of it, and even if many of those experiments would fail at the end.

About head fake learning, my favorite expert is Randy Pausch
https://www.youtube.com/watch?v=ji5_MqicxSo

All the best!


To show you the importance of that quality with a real example.

You surely know, together with hundreds of millions(!) of human beings today, that captain Kirk was able to fix a broken reactor on starship Enterprise with some random kicks. He was heroic. Had nice flashing lights, great music. And even, he survived for the next episode! Yippieee...
https://www.youtube.com/watch?v=yESWsgJ__dY

I wonder how many of them watched the story of K19, where a submarine reactor failed. There was no magic kicks, just the damned facts. And true death. OK, it was Russian, but if you think errors belong to "others" you can go to the Three Mile Island story, or recall that the crippled Fukushima reactors were designed by General Electric. (And if you are interested in the true fate of Kirky boy, it already happened in Idaho, 1960: https://en.wikipedia.org/wiki/SL-1 )

Millions of people have the magic in their minds when think (or to be precise: FORGET) about Chernobyl, which results in Fukushima, and the upcoming disasters. (Why am I sure about that? Because while the causes are not fixed, the evidence and the consequences are straightforward. This is called "reasoning".) They have "opinion" and "vote", and blame anyone for "local failures" but think that "future" and "nuclear" can appear in the same sentence.

Thinking is harder than most people... "think". And ballads of today lead away from it.

[Fun fact: NASA removed this conversation from the YouTube channel. I guess the guy who pressed the "remove comment" button never thought about the amount of time and effort written into these comments on both sides. Lack of respect, I would say...]

2015. november 18., szerda

Dust state

https://www.linkedin.com/pulse/critical-new-role-system-simplification-specialist-roger-sessions

Roger, I could not agree more, with one note: the definition of "mathematically". I have not the best feeling about that term, ending in complex expressions with weird characters. It is quite easy to frighten away programmers like me with that, even though I know that with proper handling, that is the best way to express something. And even though at one of my workplaces, they always told me "this is not university, it has to work!" But they gave me time to make it work, and used it. Good old days.

I think the situation is similar to where we were before John von Neumann.

At that time, reacting machines were made as custom logical circuits, and they had to fight for every second with the slow and thirsty hardware. Then he came with his brilliant essay saying "don't solve the problem as a whole, but separate the components that are required for a reliable IT solution, make hardware for that, and instruct them to solve the problem."

That must have looked stupid for all engineers: make it even slower and more complicated? But their actual designs simply could NOT be verified, optimized, not to mention being built into chips, they had to build everything with their hardware tools, and their knowledge was buried in the metal. Solving real problems with direct building was so complex itself that higher level constructs were simply over the horizon. Simply put: the complete approach was not industrial.

Replace the "hardware" with "big software components, toolkits, platforms", and you have the IT world today.

Everyone hacks together big "systems" from big and custom components, there is nothing that you could rely on because all is done individually by someone, upon (and locked to) constantly moving tools, chasing constantly moving targets. There is no reusable terminology and actually working toolchain that you can use to express your needs on a higher level, above being locked to your tooling.

That part should encapsulate the complexity of atomic segments of problem solving, and offer the solution in a global, uniform, usable and efficient way. Nonsense. Unless you spend 20 years on learning to see the structures instead of the solutions, and for example, separate the needed code from configurations and repetitions. Like me. Unfortunately but naturally, this separates me from "the rest of the world".

I can show you a prototype of a system that contains its own definition, and much of my knowledge about programming. It can generate its own Java sources and projects, but is "theoretically" independent from the language itself. I had to create it because its design is so complex that the only way to make it work is to let it actually execute its own configuration.

Of course, it is not different from the Wright brothers' "thing". It is just a bunch of hacks compared to the super-sophisticated trains that we use to "solve problems" today. Okay, okay, it can fly, but who cares? Or who would waste time to understand its weirdness? How does it carry anything? This must only be a toy, huh?

The first "real" question is: how do you sell it? Well, if you understand what it means, all big names would die to have it and lock it in a box, because it simply changes the IT business. The next is: does this ever solve a "real" problem? Come on, your "real problems" are BORING, and exist mostly because of short vision, unforced design errors and mindless cult-coding... ("... you are so rude, Sherlock" ;-) )

So, regardless of the trust I received recently, it's on the waiting list. I now write a frontend to a webshop for the monthly wages and watch "transit gloria mundi".

2015. október 23., péntek

Future talks



I have a more philosophical reason to think that this is ridiculous.

You ask people successful in the PRESENT, about the FUTURE. :-D
And what is even more ridiculous: you guys think you would understand or accept any correct answer! :-D :-D :-D

Just an example:
A guy escaped from the fascist Germany with the last train to England, just before the borders were closed. He had an idea in his mind that literally everyone thought was lunatic, not just ordinary people, but most of his scientist colleagues. He tried to patent it (in 1934 and 36) but it was refused. But the idea had military potential, so under the pressure of the war, a gigantic organization was created around it. This technology actually created our present, which is based on one thing: "cheap" energy.

The guy was Leo Szilard, the idea was the nuclear chain reaction. You smartly agree today (and blame the interviewer) because you have heard something about this at school and seen on films. But the important changes that future brings, are the ones that NOBODY EVER talked about at school, and they look just as ridiculous as a hump of metal bricks warm up by themselves. If those bricks were created by the best minds on the planet, and spending countless amount of money, called the Manhattan Project. Excluding any profit hunting and business reasons, but WASTING fortunes on a ridiculous idea.

Got it? This is how future is made in the real world.

If this currently hopeless human race has a future at all, it's not about big dreams and profit in any means (in which these guys are good at); but to merely survive the collapse (mental, social, cultural, ecological, population, ... - and finally, political and financial) to which we are heading, full throttle and afterburner. With Marvel heroes in our minds. This is also a recipe of future, but don't ask about the quality or smell... ;-)

If you dare to think about that for a second, you know the answer. This is why you turn back to dreaming after that second, or (perhaps) after reading this text. If anyone got this far at all.

... and yes. With merely seconds of real thinking, we have no chance.
But hey! This race got to space from farming in around 20 generations! :-)

Despite of all the facts, I still have a strong faith that we can do better than just falling off the cliff blinded by fairy tales.
Dare to take my red pill?