Transportation 2.0

This post is on drafts now for about 2 years, it’s a concise summary of my Tesla investment thesis. My mental carburetor chocked at AI and autonomous driving… and guess what? I still have a shallow understanding of machine learning, neural nets, PyTorch, TPUs and all the technical stuff to deep dive into the AI stuff. And bear with me this stuff is crucial in my mind rational as Tesla’s business model is like a Trojan horse to deploy autonomous driving.

BUT no way that I could overcome my technical limitations… SO this post could stay in Drafts indefinitely, OR just like a IRL conversation with friends (congrats for the ones that actually invested) just wrap it up, and put out the general ideas to all my friends that unfortunately don’t have the opportunity to meet IRL so often.

Disclaimer: this is just my stream of consciousness, do not to take it as financial advise. DO YOUR OWN research and thinking. This can be the ramblings of a insane mind.

Humans, are quite an unsuccessful species about self conservation. We have a (declared) stockpile of nukes to destroy the total earth landmass SEVERAL times. The most important leader today doesn’t “believe” in climate change, and most of the others humans happily let the poison of the atmosphere, the water and the land to continue despite all the warnings.

Imagine a visitor from another world looking at this madness, probably we would be cataloged as “Technological savvy but totally schizophrenic species”. One must ask what legacy are we leaving to the next generations?

Anyway let’s be optimistic, continue the exercise and indulge into random thoughts and speculations about the future. Look and behold when one day the measure of computer RAM will be not in gigabytes, but in terabytes.

Transportation 2.0

There is a revolution about the way people and cargo move around, probably the Jetsons flying car is not coming around soon (or probably it is in the form of electric VTOLs), but billions and billions are being spent into electrification of vehicles.

And this an extremely good thing, because a big chunk of total world CO2 and pollution is generated by burning stuff inside ICE (internal combustion engines), and the BEV (battery electric vehicle) is so much more efficient that it’s operation is much cleaner. And as the power grid gets greener with more renewables in the mix, the overall gap just gets bigger and bigger.

There are two metrics about batteries that don’t lie, the energy density Wh/L and the cost USD/kWh, and the trend is simple for both, higher energy density and less cost every year. It’s nothing at all like Moore’s law, much slower, but even predicting a very conservative 5% increase in density and 5% decrease in price every year, around 2050 (perhaps much sooner considering the massive resources allocations) BEVs will have the equal energy density at a fraction of cost of ICE. Factoring in the difference in engine efficiency, supply chain, and environmental impact, probably much sooner than 2050 will be the end of the ICE age.

Perhaps in a far future there will be internal combustion engines in museums showing the exquisite materials and craftsmanship of a time that the world was powered by an ordered symphony of tiny explosions. I imagine like something like a starting up and revving up event with all the attendees in highly protective gear…

Sometimes i see this video (that as quietly been deleted from everywhere, but the Internet never forgets) of Jim Cramer on CNBC about Tesla IPO just for the comic entertainment value:

It’s so funny, this was June 2010, each TSLA share was selling at 17USD (1.13 USD August 2022 split adjusted…). Guess the market had different view… why was Jim Cramer so wrong?

Tip of IcebergBecause he couldn’t understand inside his primate brain that the real transportation revolution is not the transition from liquid fuel to electric. No, that is just tip of the iceberg, the real revolution that’s going to turn everything upside down, it’s autonomous driving.

Think of all business around moving people and cargo, think of all the payrolls for professional drivers, think of all social security for professional drivers, think of all the road fatalities, think ride sharing and no ownership, think of long distance truck hauling, think of your car leave you on the spot and then proceed to park itself, think about drinking a coffee and finishing that report on your boring morning stop and go commute, think about going home drunk with no problem at all, think about catching some sleep on that long journey, think about elderly or disabled people who want to continue to go places by themselves…. etc, etc, etc…. it’s going to be a beautiful new world.

How much does it worth to have a total autonomous car system that can drive better than the top human drivers? That can operate 24/7 and doesn’t get tired, sleepy, drunk, nervous, over optimistic or distracted? A lot, really a LOT.

The race for the jackpot is on, with billions and billions being invested now. And where there is strong competition there will be results, and here Moore’s law is king, so expect this future to be nearer than generally expected. The company in the pole position is Tesla, and if they can deliver first probably they will become one of the most valuable companies in the world, probably the most valuable company in the world as autonomous driving implies solving computer vision, and computer vision achieved unlocks much more than autonomous driving.

Pushing forward deep into the future. We can ask this question, when an autonomous vehicle will be say 10x, 20x, or 100x safer than an average human driving, will human driving in public roads should be even allowed? Guess not, so I bet a lunch in the best restaurant in town with everyone that accepts the bet, that in 100 years from now human driving in Sweden (or Norway) will only be allowed in closed circuits (lets us hope the Nurburgring is still up and running).

AI

1951 First AI program
1956 Los Alamos chess is the first program to play chess
1997 Deep Blue defeats Garry Kasparok
2007 Checkers is solved paper published
2015 Baidu Deep Image outperforms average human in image sorting and recognition
2017 AlphaZero learns chess self playing itself 24h and crushes the strongest chess AI
2017 AlphaGo beats Lee Seedol in the game of Go (10^170 valid board configurations)

as we can see with these few examples the machines are learning, and are learning more complex tasks and are learning faster. As of now machines are already at super human level at many  tasks.

Sure driving is a task that one must parse several complex inputs  (vision, sound, proper acceleration) and compute with context real time outputs (turning, accelerating, braking), but there is nothing magical or physical impossible for a machine to perform, and perform well better than an human.

Assuming hardware will keep improving offering better performance at lower price each year, and computer science AI and machine learning will also keep improving over time, there will be a point in time that these factors will compound and intersect to unlock autonomous driving, and Tesla with silicon valley tech know-how, best engineers in the world,  huge fleet collecting real world data for training the neural networks, own chip designed specifically for artificial intelligence, etc, etc… will be (in my mind) the one company to unlock it first.

According to Tesla 2021 2q safety report, they recorded one crash for every 4.41 million miles driven in which drivers were using Autopilot technology (Autosteer and active safety features). For drivers who were not using Autopilot technology (no Autosteer and active safety features), they recorded one crash for every 1.2 million miles driven. By comparison, NHTSA’s most recent data shows that in the United States there is an automobile crash every 484,000 miles.

Some of the typical questions i have been asked IRL about the thesis:

Won’t legacy auto crush Tesla by sheer volume?
Well if that was to happen, it should have happened many moons ago. Tesla is a big boy now, growing fast with probably the strongest balance sheet in the industry. Besides legacy auto strength is in metal casting and folding, it can’t even put up a decent infotainment system… much more develop an autonomous driving system.

Besides legacy auto is in a world of pain, declining sales, convert factories and human resources to electric powertrains, battery supply, huge debts…. they are giants on clay feet.

OK, but the actual stock value has already risen tremendously, didn’t I missed the boat?
It’s a fact, the stock price already skyrocketed. If you invested 1000 USD back in the IPO and hold it (Jim told you to sell… big shout out to Jim) you would have today around 200.000 USD…

You can make a solid case to justify the current valuation on current business alone, you can go trough profit margins, growth rates, CAGR, ROI and other financial indicators, you can value Elon Musk as the modern Edison, but for me the equation is really simple, if you can envision a near future with autonomous driving with Tesla leading, the valuation is cheap. If you can’t envision this, probably the valuation is more on the pricey side.

I’m not a big fan of reasoning by analogy, but I must also point that for disruptive companies, companies that change the world, with strong leadership and mission, companies that enter a positive loop feedback system it doesn’t make much sense to cap an upper limit.

“In the short run, the market is a voting machine but in the long run, it is a weighing machine.” – Benjamin Graham

PF firewall – Simple IP block

The easiest way to block IP addresses in a system with PF firewall is to create a persistent block table, and then just interact with the table.

In /etc/pf.conf

table <badhosts> persist

set skip on lo0
scrub in all

block in quick from <badhosts> to any
pass all

Each packet is evaluated against the filter ruleset from top to bottom. By default, the packet is marked for passage, which can be changed by any rule, and could be changed back and forth several times before the end of the filter rules. The last matching rule wins, but there is one exception to this: The quick option on a filtering rule has the effect of canceling any further rule processing and causes the specified action to be taken.

OpenBSD PF – Packet Filtering

Load ruleset

pfctl -f /etc/pf.conf

Add addresses

pfctl -t badhosts -T add 1.2.3.4
pfctl -t badhosts -T add 2.3.4.5

Show addresses

pfctl -t badhosts -T show

Delete an address

pfctl -t badhosts -T delete 1.2.3.4

Delete all adresses

pfctl -t badhosts -T flush

And remember boys and girls, 30 minutes poking with commands can save you 3 minutes of documentation reading….

Best 3 products

In the last couple of years the best 3 products that I bought (and I do buy some stuff…):

Xiaomi A1, Xiaomi Robot Vacuum, Xiami Band 3.

There is clearly a pattern here… and all of each are great products when compared to the best brands, not the usual chinese low quality crap. I guess this is a trend that will only grow bigger.

Go socialism (or communism, or new democracy, or savage capitalism, or what the fuck the chinese are running on) !

One week tour in Portugal

Welcome to Portugal, the western little old rectangle of Europe. Full of history, beautiful monuments and castles, good food (better wine), awesome beaches and much more. The good news is that the country itself is small, so the main cities and points of interest are near each other.

Street of Alfama
Alfama neighborhood

First in the tour, the capital Lisbon of course. I suggest to start with a walk, a walk 1000 years back in time, when the Arabs ruled the city. Explore the very old and very narrow and steep streets and stairs of Alfama the oldest neighborhood of town.

Castelo S. Jorge
St Jorge Castle viewpoint

Take your time (and take many photos) to go all the way up to St. Jorge castle. On the way up or down, route yourself to Miradouro de Santa Luzia for breathtaking sights, and to Sé Catedral the oldest church in town, and just 50 meters ahead? Another church! St. Anthony church marks the birthplace of the famous matchmaker saint, and he is always there (well his spirit anyway) just to help with every love problem of yours.

Lisbon downtown - Augusta Street
Augusta street

Leaving the old town follow the natural city expansion to downtown, this is the part of the city that was rebuilt after the 1755 earthquake, with straight and square streets, open spaces with lots of light, and beautiful architecture.

A Ginginha
A Ginginha

To give you a power boost, start in Rossio square just like a local drinking a shot of cherry liqueur called ginginha in the very small, yet historic, open-fronted bar A Ginginha. Just in front there is a small monument with the star of David, a tribute (and reminder) to the hundreds of people killed by the inquisition bonfire in the Lisbon massacre.

Cais do Sodré - Pink Street
Pink Street

Take Rua Augusta and enjoy the walk to Praça do Comércio square, one of the big beautiful squares of Europe framed by the Tagus river, the bridge, and the boats. Proceed with the river on your left to Cais do Sodré, a place full of bars and restaurants ready to satisfy your famine and thirst. You should check out Pensao Amor an old brothel converterted into a fancy bar that actually kept some charm.

Beware, Cais do Sodré is just one of those places lost to gentrification. Pink street has too many tourists, few locals. Lots of bars and restaurants with little to no soul. High prices alert!

Fernando Pessoa
Fernando Pessoa

Time to move up to Chiado the posh neighborhood and the adjacent Bairro Alto the classic nightlife quarter. In Chiado please do take a coffee at A Brasileira with Fernando Pessoa (a famous dead poet) or if it’s the end of the day a drink (and a haircut) at O Purista. Do some shopping, the finest shops in town are in Chiado (and also in Avenida da Liberdade), checkout Livraria Bertrand, the oldest book store in the world, selling knowledge stamped on dead trees since 1732!

S. Pedro Alcantara viewpoint
S. Pedro Alcantara viewpoint

Bairro Alto comes alive at night, packed with restaurants, bars and people happily roaming the streets. Close to S. Pedro de Alcantara viewpoint I strongly suggest a drink in Pavilhão Chinês, one of the most beautiful bars in Lisbon. Also in Bairro Alto you will find Tasca do Chico, one of the last strongholds of bummer fado music. You can come in sit down have a glass of red wine and enjoy. Also a very good option to seat down, have a drink, and listen to fado, is Mesa de Frades in Alfama.

Tasca do Chico

Fado nowadays is mostly served in an expensive tourist package sold by the hotels that includes the transportation, fado museum, fine dinner (this and that), and fado presentations. I’m pretty sure that you will eat good and enjoy your time if you choose this option but the bummer fado is way cheaper and perhaps more authentic.

Torre de Belém
Torre de Belém

Back to daytime you should visit Belém, still Lisbon just a bit off the city center, this is the district that best symbolizes the portuguese age of exploration and discovery. Easily reachable by train from Cais do Sodré heading to Cascais (just a couple of stops between), there you will find the iconic Belém Tower, a fortification dating back to the fifteen hundreds, the Jerónimos monastery dating back to the sixteen hundreds, also Padrão dos Descobrimentos a beautiful monument dating back to 1960 dedicated to prince Henry the navigator and the portuguese that discovered the roads of the sea.

Pastéis de Belém
Pastéis de Belém

And of course, for me the main highlight of Belém, and the reason of all the work and hassle of sending boats filled with men across the globe, the Pastéis de Belém factory. So remember and praise all the history behind the moment you dust with cinnamon the delicious egg tart pastry.

And you are done with Lisbon city highlights. But please reserve one more day in town and do the day trip do Sintra, Cabo da Roca and Cascais. You can get to Sintra from Rossio train station (about 1h), from Sintra do Cabo da Roca by bus (about 30m), Cabo da Roca to Cascais by bus (about 20m) and Cascais train back to Cais do Sodré station (about 1h). And I really suggest to do Sintra in daytime, Cabo da Roca end of the day, Cascais at sunset/night.

Pena Palace
Pena Palace

Sintra is all about palaces, beautiful nature, castles, legends, knights Templar, moors, elves, fairies, and BAD WEATHER, so try to choose a perfect sunshiny day.

Monserrate Palace
Monserrate Palace

Right in the center of the village you will find the Town Palace (the one with two distinctive chimneys) even though is the most visited would strongly advise a skip to this one… because climbing up up up the hill (there are buses available) you will find the much more beautiful Pena Palace, just like a fairy tale construction, sitting proudly on the top of he ridge with breathtaking views and mind blowing gardens. Also would strongly advise a visit to Quinta da Regaleira, and also to the “small” but exquisitely beautiful red domed Monserrate Palace with exotic gardens and strong Moorish influences.

Cascais Bay Night
Cascais Bay

If you have time go to Cabo da Roca, the western point of continental Europe for some cool photos. If you love motorbikes, you definitely should go because there are always lots of cool bikes there so it’s a plus. If you spent to much time in Sintra then proceed straight to Cascais. Once a small fisherman’s village, now the Portuguese riviera, the perfect place to eat, drink and have some fun before returning back to Lisbon (or maybe to stay a couple of days to enjoy the easy going life, party at night, and the sun, surf, and sandy beaches at day) . For more detailed information please refer to this post about the area.

28 tram
28 tram

One more thing, when you move around in Lisbon please take a bit of time and do the classic 28 tram line thru the 7 hills. Usually is very crowded, so try to go really soon or late at dinner time. Buy the tickets before in the subway (much cheaper), and pay attention to your wallet (some pickpockets work daily in the trams).

Lisbon Oceanarium
Lisbon Oceanarium

If you are travelling with kids, and / or never went to a massive aquarium, please consider going to Lisbon Oceanarium. Located in the posh neighborhood of Parque das Nações it’s the flagship from 1998 World Fair, is the largest indoor aquarium in Europe, and truth to be told, if you have some kind of affinity with the ocean, it’s just an awesome sight to contemplate the main tank.

Praia da Marinha

Decisions time… if you fell in love with Lisbon, just hang around for the rest of your stay, enjoy time slowing down, the city light and the city night, drink lots of coffee and wine, make friends, explore the less touristic spots. If it’s Summer, and it’s hot, and you are dreaming of a city break, go ahead and take the 3 hour bus to Algarve, beautiful sandy beaches with warm water wait you there, after all the city bustle it’s a well deserved rest.

But if you really want to know the true soul of Portugal you must head North, not just because of monuments and landmarks but mainly because of people, honest, straight forward, with strong values and traditions, are probably the best hosts in the world. Also the food up North… delicious.

Praia do Norte - Nazaré
Praia do Norte – Nazaré

Heading North, the best way to do it is with a rented car but you can also do it by bus. Start early in the day, first stop Óbidos a well preserved fortified medieval village with a castle. Several times during the year the village celebrates the middle Ages with parades, markets, and more, so definitively check it out. Next stop, Nazaré – Praia do Norte, home of giant waves and the spot with the world record of biggest wave ever surfed. When conditions are good and surfers are in the water the view from the lighthouse is amazing.

Batalha monastery
Batalha monastery

Next stop Batalha monastery, an heritage monument celebrating the 1385 battle of Aljubarrota victory over the Spanish. I invite you to continue in the religious trail and visit the nearby Sanctuary of Fátima, place of many miracles, apparitions, celebrations, and many pilgrims.

V. N. Gaia wine cellars
V. N. Gaia wine cellars

Eventually you will arrive at Oporto the second city of Portugal and the capital of the north. It’s not my hometown like Lisbon, so do some research about it. I can strongly suggest is a visit to Vila Nova de Gaia port wine cellars. There are many of them, and it’s a really fun afternoon to visit some of them and tasting the nectar of the gods. For the definitive port wine experience there are several tours up the river Douro into the vineyards with visits, fine dining, and overnight stays in the producers farms.

That’s it folks, my personal suggestions for a week in Portugal.

Seafood
Seafood

One more thing, the food… everywhere you can eat really good with reasonable to exceptionally good prices. So, don’t waste your time, money, and body in MacDs or BKs that taste the same shit everywhere.

Some places that you should try:
Verde Minho – Honest old fashion portuguese food. In the center of Lisbon and great prices.
Cervejaria Trindade – in Chiado, old monastery (different and beautiful architecture for a restaurant). Good steaks and “pregos”. Not cheap nor very expensive.
Novo Edmundo – Grilled meat and typical food. Outside the city center, good price quality quantity relation.
Tasca da Esquina – Portuguese fine dining. Gourmet experience. Expensive (for Portuguese standards). Put yourself in the hands of the chef.
Cervejaria Ramiro – if you are into seafood this is the place to go in Lisbon. Lots of tourists and queuing since the late Anthony Bourdain filmed No Reservations here . A bit expensive to very expensive (varies a lot with the seafood you order).
Viveiros do Atlântico – 30 minutes north of Lisbon, in the picturesque surf village of Ericeira the seafood is also great and not so expensive as Ramiro. If it’s full or closed, in 1 kilometer radius around it, there are many other good seafood places.
Nova Casa dos Leitões – Perhaps the best roasted suckling pig in your life… up north in Anadia.

2018

Thank you.

Thank you for being alive, thank you for understanding, science, and medicine. Thank you for my beautiful child, thank you for unconditional love, thank you for all the park mornings and afternoon beach sunsets, thank you for all the laughs, hugs, walks, slides and swings. Thank you for all the learning.

Thank you for all the people in my life that I love. Thank you for music being omnipresent. Thank you for my business, economic grow, and abundance. Thank you for the good food and better wine of this land. Thank you for the mesmerizing nature of this world . Thank you for the safe motorcycle rides. Thank you living my dreams.

Thank you for experiencing this magical universe.

Mandala