Moral hazard…

…that occurs when people don’t have skin in the game.

If you’re able to place a bet and you get the wins but you won’t bear the losses why don’t you go all in every time?
We should look for people that have skin in the game, they can still err but at least they will suffer the consequences. It’s very easy to bet on other people’s money and walk away when things don’t look good.

It’s not only us that should check we have skin in the game but check the others as well to identify and ignore charlatans. Words are easy and titles do not provide skin in the game. Do the hard work results will come.

Theodore Roosevelt “The Strenuous Life” (1899)

Following my Theodore Roosevelt stack of quotes here you can find some segments of “The Strenuous Life” speech he gave in 1899. Each of the following paragraphs represents a segment.

I wish to preach, not the doctrine of ignoble ease, but the doctrine of the strenuous life, the life of toil and effort, of labor and strife; to preach that highest form of success which comes, not to the man who desires mere easy peace, but to the man who does not shrink from danger, from hardship, or from bitter toil, and who out of these wins the splendid ultimate triumph.

Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the gray twilight that knows not victory nor defeat.

If we are to be a really great people, we must strive in good faith to play a great part in the world. We cannot avoid meeting great issues. All that we can determine for ourselves is whether we shall meet them well or ill.

No country can long endure if its foundations are not laid deep in the material prosperity which comes from thrift, from business energy and enterprise, from hard, unsparing effort in the fields of industrial activity; but neither was any nation ever yet truly great if it relied upon material prosperity alone.

The work must be done; we cannot escape our responsibility; and if we are worth our salt, we shall be glad of the chance to do the work—glad of the chance to show ourselves equal to one of the great tasks set modern civilization. But let us not deceive ourselves as to the importance of the task. Let us not be misled by vainglory into underestimating the strain it will put on our powers. Above all, let us, as we value our own self-respect, face the responsibilities with proper seriousness, courage, and high resolve. We must demand the highest order of integrity and ability in our public men who are to grapple with these new problems. We must hold to a rigid accountability those public servants who show unfaithfulness to the interests of the nation or inability to rise to the high level of the new demands upon our strength and our resources.

Of course we are bound to handle the affairs of our own household well. We must see that there is civic honesty, civic cleanliness, civic good sense in our home administration of city, State, and nation. We must strive for honesty in office, for honesty toward the creditors of the nation and of the individual; for the widest freedom of individual initiative where possible, and for the wisest control of individual initiative where it is hostile to the welfare of the many. But because we set our own household in order we are not thereby excused from playing our part in the great affairs of the world. A man’s first duty is to his own home, but he is not thereby excused from doing his duty to the State; for if he fails in this second duty it is under the penalty of ceasing to be a freeman. In the same way, while a nation’s first duty is within its own borders, it is not thereby absolved from facing its duties in the world as a whole; and if it refuses to do so, it merely forfeits its right to struggle for a place among the peoples that shape the destiny of mankind.

I preach to you, then, my countrymen, that our country calls not for the life of ease but for the life of strenuous endeavor. The twentieth century looms before us big with the fate of many nations. If we stand idly by, if we seek merely swollen, slothful ease and ignoble peace, if we shrink from the hard contests where men must win at hazard of their lives and at the risk of all they hold dear, then the bolder and stronger peoples will pass us by, and will win for themselves the domination of the world. Let us therefore boldly face the life of strife, resolute to do our duty well and manfully; resolute to uphold righteousness by deed and by word; resolute to be both honest and brave, to serve high ideals, yet to use practical methods. Above all, let us shrink from no strife, moral or physical, within or without the nation, provided we are certain that the strife is justified, for it is only through strife, through hard and dangerous endeavor, that we shall ultimately win the goal of true national greatness.

Citizenship in a Republic By Theodore Roosevelt (1910)

Here there are some quotes from the Citizenship in a Republic By Theodore Roosevelt that I found were worth keeping and reflecting upon. Each of the following paragraphs represents a segment.

It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood; who strives valiantly; 10 who errs, who comes short again and again, because there is no effort without error and shortcoming; but who does actually strive to do the deeds; who knows great enthusiasms, the great devotions; who spends himself in a worthy cause; who at the best knows in the end the triumph of high achievement, and who at the worst, if he fails, at least fails while daring greatly, so that his place shall never be with those cold and timid souls who neither know victory nor 15 defeat. Shame on the man of cultivated taste who permits refinement to develop into fastidiousness that unfits him for doing the rough work of a workaday world. Among the free peoples who govern themselves there is but a small field of usefulness open for the men of cloistered life who shrink from contact with their fellows. Still less room is there for those who deride of slight what is done by those who actually bear the brunt of the day; nor yet for those 20 others who always profess that they would like to take action, if only the conditions of life were not exactly what they actually are. The man who does nothing cuts the same sordid figure in the pages of history, whether he be a cynic, or fop, or voluptuary. There is little use for the being whose tepid soul knows nothing of great and generous emotion, of the high pride, the stern belief, the lofty enthusiasm, of the men who quell the storm and ride the thunder. Well for these 25 men if they succeed; well also, though not so well, if they fail, given only that they have nobly ventured, and have put forth all their heart and strength. It is war-worn Hotspur, spent with hard fighting, he of the many errors and valiant end, over whose memory we love to linger, not over the memory of the young lord who “but for the vile guns would have been a valiant soldier.”

He must pull his own weight first, and only after this can his surplus 35 strength be of use to the general public. It is not good to excite that bitter laughter which expresses contempt; and contempt is what we feel for the being whose enthusiasm to benefit mankind is such that he is a burden to those nearest him; who wishes to do great things for humanity in the abstract, but who cannot keep his wife in comfort or educate his children.

That is why I decline to recognize the mere 45 multimillionaire, the man of mere wealth, as an asset of value to any country; and especially as not an asset to my own country. If he has earned or uses his wealth in a way that makes him a real benefit, of real use- and such is often the case- why, then he does become an asset of real worth. But it is the way in which it has been earned or used, and not the mere fact of wealth, that entitles him to the credit. There is need in business, as in most other forms of human activity, of the great guiding intelligences. Their places cannot be supplied by any number of lesser 5 intelligences. It is a good thing that they should have ample recognition, ample reward. But we must not transfer our admiration to the reward instead of to the deed rewarded; and if what should be the reward exists without the service having been rendered, then admiration will only come from those who are mean of soul. The truth is that, after a certain measure of tangible material success or reward has been achieved, the question of increasing it becomes of constantly 10 less importance compared to the other things that can be done in life. It is a bad thing for a nation to raise and to admire a false standard of success; and there can be no falser standard than that set by the deification of material well-being in and for itself. But the man who, having far surpassed the limits of providing for the wants; both of the body and mind, of himself and of those depending upon him, then piles up a great fortune, for the acquisition or retention of which he 15 returns no corresponding benefit to the nation as a whole, should himself be made to feel that, so far from being desirable, he is an unworthy, citizen of the community: that he is to be neither admired nor envied; that his right-thinking fellow countrymen put him low in the scale of citizenship, and leave him to be consoled by the admiration of those whose level of purpose is even lower than his own.

My position as regards the moneyed interests can be put in a few words. In every civilized society property rights must be carefully safeguarded; ordinarily, and in the great majority of cases, human rights and property rights are fundamentally and in the long run identical; but when it clearly appears that there is a real conflict between them, human rights must have the upper hand, for property belongs to man and not man to property.

The citizen must have high ideals, and yet he must be able to achieve them in practical fashion. No permanent good comes from aspirations so lofty that they have grown fantastic and have become impossible and indeed undesirable to realize. The impractical visionary is far less often the guide and precursor than he is the embittered foe of the real reformer, of the man who, 5 with stumblings and shortcoming, yet does in some shape, in practical fashion, give effect to the hopes and desires of those who strive for better things. Woe to the empty phrase-maker, to the empty idealist, who, instead of making ready the ground for the man of action, turns against him when he appears and hampers him when he does work! Moreover, the preacher of ideals must remember how sorry and contemptible is the figure which he will cut, how great the damage that 10 he will do, if he does not himself, in his own life, strive measurably to realize the ideals that he preaches for others.

Conspicuous consumption

Conspicuous: Attracting notice or attention.
Consumption: The action of using up a resource.
The fusion of both words, conspicuous consumption, is a term coined by Thorstein Veblen in 1899 but it is easily applicable to modern society. It is an economic theory that does not shine optimism. Based on the meaning of the words separately Conspicuous: Attracting notice or attention.Consumption: The action of using up a resource. Put together, conspicuous consumption refers to buying expensive goods to display wealth rather than covering the real consumer needs.

This economic theory criticizes the industrialized societies where the individuals buy their items based on the status that would provide rather than the utility of them. This, in consequence, leads to a waste of time and resources with the sole purpose of emulating the pertinence of a given social class. If we look into it, we’ll see that recent economic catastrophes have been caused by people trying to be. In 2008 the market crashed because lots of people were over-leveraged to buy bigger houses while trying to keep up with the Joneses. People buy things because their neighbors or acquaintances bought something rather than the utility and profit they can extract from the purchase.

If we look at it critically, conspicuous consumption is the cause of the current health crises where most of American adults are obese. Humans only need a certain amount of food per day, if we overdo it regularly it can lead to health problems. Overeating can cause obesity at the start, but it can also lead to diabetes and coronary diseases. That simply because we are eating more than we should.

Overbuying food has also environmental implications. We live in a society that trows away more food than ever. With proper management of the resources, the world would be more balanced on caloric intake. Low-income countries would have enough to feed their inhabitants; thus giving equal opportunities to many people. But this goes further than our day to day activities. It is not about objects. It can refer to non-material elements. It is not cool anymore to go to the beach one week in summer, this vicious circle expands. Now people have to go regularly to different European capitals and during summer one should visit exotic sunny places. Chilling at home does not display enough wealth.

Leisure is also affected by conspicuous consumption. Conspicuous leisure is about taking part in leisure activities with the sole purpose of displaying status. The activities should be displayed in order to demonstrate idle time as a sign of wealth where the worker would have little time for non-productive endeavors whereas wealthy people would have plenty of time to pursue non-productive activities.

All of which leads to Veblen goods. Those are goods where their demand increases with price. Traditionally it is assumed by economists that demand decreases proportionally to the price increase (and the other way around). But Veblen goods have a complete opposite demand curve. When the price increases the demand increases as well, going against all common sense.

Do we still think that growth is the way to go?

The new software: Advantages and disadvantages

Recently I published a post about the new software paradigm. The new paradigm of software is the one that the coder does not directly program each of the cases for any of the given inputs. The new paradigm uses training data to let the computer learn the outputs for each input. The computer programs itself while the coder and the software developer’s job is to prepare the data and set the target. The new paradigm seems to bring new challenges that need balancing. It has, like everything, some advantages and disadvantages.

On the advantage side, deep learning requires easier hardware. Even though deep learning is more complex than traditional software, neural networks only consists of two basic operations: matrix multiplication and thresholding. Traditional software has many more basic operations like conditionals, loops, etc. Because of that traditional CPUs are required to be able to run many more distinct operations increasing the overall complexity of the hardware. Where traditional software uses CPUs, deep learning uses GPUs. GPUs are developed to perform matrix multiplications making them ideal for neural networks.

Since deep learning is inherently less complex on hardware, one could easily embed already trained models into chips to perform certain tasks. This will make chips low power and specifically designed for defined tasks. If the task at hand is better defined and specific, hardware can be developed so that it is more efficient making it prone as well to scale economies. Imagine a manufacturing chip that performs speech analysis. In a way, this is more portable than code. The code often needs to be recompiled on the system to ensure that works and has optimal performance. A chip would have everything integrated from the microphone to the model.

Once the neural network is trained. Execution time and memory use are constant. Deep learning prediction only requires one forward pass which always requires the same amount of operations and memory. Traditional software different branches of the code require different amounts of resources which leads to a wide range of execution times and resource consumption (i.e. memory allocation). At the same time with traditional software, the branching adds complexity for the developer to not forget any case open, untreated, or even an infinite loop. An infinite loop of the traditional software would render the program unresponsive for eternity. This specific bug does never happen in neural networks.

Contrary to the traditional software that remains untouched for most of their life, deep learning models have the ability to evolve, mutate, and mature to reach and maintain the global optimum. In traditional software calls, APIs, and modules are created alone and die alone. Unless changed software stays the same forever. In this new paradigm, your call helps the model to find a better solution, and be faster and therefore adapt and improve. The more use the better the whole system becomes. You browsing through the internet would help to build a better internet. This software would learn from usage.

Even though there are instances where certain coders would be able to write better code than deep learning, in general, neural networks are better pieces of code. The same holds for high- and low-level languages. Even though most coders do a good job programming high-level languages and let the compiler do their magic, there is an extremely small fraction of people that are able to tune assembly instructions to improve the performance. Small local improvements do not reflect global gains.

But not everything that glitters is gold. Neural networks may be able to achieve 99% accuracy but it may be impossible to understand how this is reached. In some cases, a 90% accuracy that humans comprehend may be preferable. This is a tradeoff that should be assessed case by case. Would you rather get a treatment 99% certain without knowing what is it, or 95% certain but a doctor can explain to you?

Maybe humans don’t trust machine learning models because they may be picking up biases. If it’s true it is on everyone’s best interest to prevent that. It’s in humanity’s best interest that technology remains neutral. But this may be harder than we thought. Microsoft trained a twitter bot on twitter and it turned out to be racist, the reason is that some data cleaning is required, not everything has value. And amazon built a misogynist HR algorithm because they have biased data to start with. So it turns out that machines reflect what’s there without the power to argue against it.

In a way we want the machines to judge the outputs. For everyone’s comfort maybe we should be supervising all algorithms. Deep learning will provide an answer to the data. It may not always be the right answer, but sometimes it may be so wrong that a person will easily pick up. Models do not tell you when they don’t know, if it was not properly trained on specific regions of the data it will provide an embarrassingly wrong result.

Malicious people may use this lack of judgment to benefit from AI. This new software will require new security measures. Attacks against neural networks are different in nature than the attacks that can be done on traditional software. Misleading is as easy as finding a way to mislead the algorithm. If they are somehow public it’s a matter of time until somebody realizes that some tweaks produce vastly different results.

This new paradigm will require new tools. The old software needed debuggers, profilers, and IDEs. The new paradigm is done by accumulating, cleaning, and processing datasets. The new debugging will be done by adding new data with the labels the model fails to recognize. The IDEs may show the model architecture, the training data, and labels but it may also show which data points may be relevant to include so that the model gains certainty on the prediction. Maybe the new era Github is about datasets and trained models.

The new software: Less coding more data

Software like everything is evolving but it is evolving differently than I thought. When I was studying computer science at the university I thought that the future was parallelism. We were taught only one class in parallel programming. Multi-core computers were on the rise and it seemed to be the thing to learn. Since then my opinion has changed. There is indeed the need for parallel programmers but it is not as big as I had foreseen. Most of the libraries and already implemented code that needs parallel programming are already implemented. Some basic notions are required and every now and then.

They also teach “sequential” (regular) programming at the university. Regular programming until now is about giving specific instructions on what actions the program should take. Each line of code contains a specific instruction with a defined goal. The programmer wrote code indicating at each step which actions the computer had to perform without leaving room for the computer to improvise. All cases are defined in a way or another. If not, the program breaks. This is also true for parallel programming where the code defines the actions to be performed, and in which order. The difference between single-core and multi-core is that single-core executes all the instructions in a sequential manner whereas the multi-core can have multiple executions of different parts of the code that do not necessarily follow the same paths.

On the new paradigm, the one that Andrej Karpathy made me notice, and I agree with, software is abstract. Software becomes the weights of neural networks and as humans, we cannot interpret nor program it directly. Therefore the goal in these instances is to define the desired behavior. The software developer should then define that for these sets of inputs we want this other set of outputs. For the program to follow the right behavior, we need to write the neural network architecture to extract the information from the domain and then train it so that the program searches the space for the best solution. We will no longer address the complex problems using explicit code; instead, the machine will figure out by itself.

Software is certainly changing in a new direction. There are many instances where it may be easier to gather more training data than actually hard coding an algorithm to perform a specific task. In the new software era, the coders’ tasks are to curate the datasets and monitor the system. The system is optimized to perform the task in the most accurate manner. “Old school” programmers will be sill in need in the same way there are still people who code for a living on low-level languages. Old school programmers will develop labeling interfaces, create and maintain infrastructure, perform analysis, etc.

Nowadays it is clear that neural networks are the clear winner over hardcoded instructions in many different domains. With the current software, McKinsy states that 30% of companies’ activities can be automated. Machine translation, image recognition, text analysis, and games like chess or even ‘League of Legends’, which requires an advanced understanding of the universe, can be automatized by computers. Google reduced 500 000 lines of code to only 500 from the translate program thanks to TensorFlow and neural networks. These are the classic examples where deep learning is straight forward and can shine but there are other less intuitive (and less sexy) domains where huge improvements can occur like data structures and databases. In this example of not sexy publications, the deep learning software was up to 70% faster and used an order of magnitude less memory than the traditional software. As the last example, I would like to bring this article where researchers brought this idea to the extreme. They created software that does not even require to define the model to be used and instead finds it for the user.

In conclusion, traditional software, the one that we have been using until now, will remain. There are some instances like law and medicine where black-boxes cannot be accepted and won’t be tolerated. Other times it will be more cost-efficient and easy to hard code the features instead of preparing training data and letting the model figure out. The new software era will be the one where coders will not explicitly write the course of action for each case, instead the neural network will find the best solution for a given input. The software will find out the best solution for a given problem without the explicit instructions of a human. The new paradigm software will become more prevalent and along with these lines new software tools will be developed.

Want to reduce the plastic usage? Try the wellness approach

We’ve been facing the problem of plastic usage wrong.
Plastics cannot be recycled [1] and when they can be recycled it is not an easy straight forward process. Yet, everyone is using them out of convenience. They are cheap and nobody cares about the environment when it comes into conflict with their pocket.
The solution? Studies should be found to find if plastics are nocive to human health.
If people worry that they or their kids will get cancer, they may rethink the usage of this material. If something shortens your life expectancy and provides you with a long and awful death people may reconsider buying products that are wrapped with multiple plastic layers.
There is probably going to be part of the population that won’t mind and will immolate themselves. But if consumers have the perception that all that plastic wrapping around food is bad for them it may change more things than telling them to try to reduce plastic consumption.

[1] Hopewell, J., Dvorak, R., & Kosior, E. (2009). Plastics recycling: challenges and opportunities. Philosophical Transactions of the Royal Society B: Biological Sciences, 364(1526), 2115-2126.

Networking

Go to the bottom of your SMS and text people regularly something like:
Hi Joe,
It’s Roc here, we haven’t spoken in ages!! I hope you’re fine. What’s the latest with you? No rush on the reply

Don’t skip people
The same for emails. But search for random letters and see what the autocomplete in the “to” field shows.
Look at Linkedin (and other social media) and prise people through a private channel for something they did recently. No likes or comments on the post.
Don’t get discouraged if people take a while to reply or don’t reply at all.
For conferences prepare dossiers about the people you wanna meet so you know their professional side but also the personal one. If you talk hobbies it feels less boring and people may be more engaging and happy to interact.
Always keep a good posture. A trick is to straighten your back every time you go through a doorway.
Ask for help. Ask for introductions for your projects. People can’t read your mind but don’t be pushy.
Tornado technique is an elevator pitch where you say what you can do for others/them. Instead of using the proper definition say what is the goal. I do protein synthesis. It makes no sense for most. Say you create proteins as medicine.
The reverse tornado technique asks what they do for others.
Ask for facts, then emotion and then why as a way to build conversations with people.
If something is obvious maybe ask for some specifics.
Last but not least reduce noise. Look at your calendar the people you met and think if they are high quality or not. And if not limit your interaction.

Convert a mask into a Polygon for images using shapely and rasterio

Sometimes it is necessary to transform masks into polygons to use polygon operations. The way to transform a raster or a binary mask into a polygon is pretty easy. Most of the solutions I found online were the other way (from polygon to a mask). But for my project I needed to convert the mask to a polygon.