<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>jeremarc</title><description>Writing by Jean-Marc Alkazzi</description><link>https://blog.jeremarc.com/</link><item><title>Seek the Way, Not the Win</title><link>https://blog.jeremarc.com/posts/seek-the-way-not-the-win/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/seek-the-way-not-the-win/</guid><description>Some observations on Mastery</description><pubDate>Sat, 29 Nov 2025 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;&quot;Work and sports have many things in common. In Japan, competition is traditionally individual, as in sumo wrestling, kendō swordsmanship, and judo. In fact, in Japan we do not &quot;compete&quot; in these activities but rather we &quot;seek the way and study it&quot; devotedly. This approach has its analogy in the work arena, where the art of the individual craftsman is highly valued.&quot;  — Ōno Taiichi, Toyota Production System (1978)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This means that a kendō duel does not have the goal of defeating an opponent. This duel is a way for you to assess how far you have come on your journey to kendō mastery. &amp;lt;strong&amp;gt;The result of such a duel is feedback you need to take your next step&amp;lt;/strong&amp;gt;.&lt;/p&gt;
&lt;p&gt;Failure is therefore your inability to see the gap in your own skills by focusing instead on the event that brought light to this gap.&lt;/p&gt;
&lt;p&gt;You can only reach Mastery when Mastery is the goal, not the wins along the way, because let&apos;s face it, each small win or loss is only a point:&lt;/p&gt;
&lt;p&gt;&amp;lt;figure class=&quot;video-wrap&quot;&amp;gt;
&amp;lt;video src=&quot;/videos/2024_dartmouth.mov&quot; controls playsinline /&amp;gt;
&amp;lt;figcaption&amp;gt;Roger Federer holds court at Dartmouth Commencement, 2024&amp;lt;/figcaption&amp;gt;
&amp;lt;/figure&amp;gt;&lt;/p&gt;
</content:encoded></item><item><title>Stress is Good</title><link>https://blog.jeremarc.com/posts/stress-is-good/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/stress-is-good/</guid><description>Not all Stress is created equal</description><pubDate>Tue, 23 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Stress management is not about reducing all kinds of stress.&lt;/p&gt;
&lt;p&gt;There is a healthy amount of stress that gives you a sense of urgency towards specific outcomes.
It pushes you from that inert state to do something.&lt;/p&gt;
&lt;p&gt;People who deeply care don&apos;t solely rely on extrinsic motivators.&lt;/p&gt;
&lt;p&gt;So many people avoid stress to an extreme where any level of urgency is regarded as &quot;pushy&quot; or &quot;not sustainable&quot;.
Staying in bed all day is not sustainable, so is excessive daily workouts. You will only be a healthy individual through balance.&lt;/p&gt;
&lt;p&gt;Your first workout after getting out of bed won&apos;t feel good, and that&apos;s not feedback to stop working out, but an invitation to explore a new balance.&lt;/p&gt;
</content:encoded></item><item><title>PThD</title><link>https://blog.jeremarc.com/posts/pthd/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/pthd/</guid><pubDate>Thu, 04 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&amp;lt;div class=&quot;poem&quot;&amp;gt;
The panic hits at half past three&amp;lt;br /&amp;gt;
&quot;I&apos;m late! At home I should be!&quot;&amp;lt;br /&amp;gt;
I rush back home with racing heart,&amp;lt;br /&amp;gt;
Then freeze... there&apos;s no unfinished part.&amp;lt;br /&amp;gt;
Months have passed since my defence,&amp;lt;br /&amp;gt;
But still my body stays so tense.&amp;lt;br /&amp;gt;
These phantom deadlines haunt my brain&amp;lt;br /&amp;gt;
The PhD&apos;s lingering pain.
&amp;lt;/div&amp;gt;&lt;/p&gt;
</content:encoded></item><item><title>Retreat to Win</title><link>https://blog.jeremarc.com/posts/retreat-to-win/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/retreat-to-win/</guid><pubDate>Mon, 18 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;&quot;Without (leverage to change) policy, your tool is stepping back and allowing the brokenness to collapse under its own weight. A deeply flawed system can&apos;t be saved by Band-Aids, but it can easily absorb your happiness to slightly extend its viability.&quot;
– Will Larson, Systems of Engineering Management [Sec 5.6.4] (2019)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What&apos;s sad about it is people actively not caring about saving some systems.&lt;/p&gt;
&lt;p&gt;&quot;Not my circus, not my monkeys&quot; becomes the default motto.&lt;/p&gt;
&lt;p&gt;Sometimes it&apos;s a character. They just couldn&apos;t care less about anything that is &quot;not their job description&quot;.
Mostly, it&apos;s a bad environment.&lt;/p&gt;
&lt;p&gt;It&apos;s a signal of a deeply flawed reward system of the environment / management. Reward the superhero who saves the day after* shit happens.
The ones who work tirelessly to avoid shit from happening? Meh, they&apos;re doing their job anyways.
How to even prove it would have gone to shit?
It takes a certain amount of skill for managers to differentiate between those two situations.&lt;/p&gt;
&lt;p&gt;Very similar skills are required to hire people who care for the right reasons and not burn them out (See &lt;a href=&quot;/posts/cheesecake-hiring/&quot;&gt;my post about hiring&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;If you couldn&apos;t do the latter, you will fail at the former.&lt;/p&gt;
&lt;p&gt;A deeply flawed system can&apos;t be saved by Band-Aids.
That holds when you are convinced it&apos;s &quot;deeply flawed&quot;, and you don&apos;t have the right authority to change things.
You would be surprised how many times you will be given authority (if you ask for it) because no one knows what to do.
Take a chance once in a while to learn what it takes to recognize and fix such a system and the importance of everyday tasks to avoid it.&lt;/p&gt;
</content:encoded></item><item><title>Notes on How to get worse at programming (Andreas Kling)</title><link>https://blog.jeremarc.com/posts/how-to-get-worse-at-programming-kling/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/how-to-get-worse-at-programming-kling/</guid><pubDate>Mon, 21 Jul 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I just found a video by &lt;a href=&quot;https://x.com/awesomekling&quot;&gt;Andreas Kling&lt;/a&gt; from 6 years ago (2019.07.23): &quot;Commute talk: How to get worse at programming&quot;&lt;/p&gt;
&lt;p&gt;Funnily enough, the tips given are somehow what everyone is encouraged to do on a daily basis.&lt;/p&gt;
&lt;h2&gt;1. &quot;Always start with googling and finding existing solutions to your project / problem.&quot;&lt;/h2&gt;
&lt;p&gt;As if every project has to be created once only. That sounds stupid when you think about other fields. &quot;Shit someone already made a bottle of water, I guess I should find another idea now.&quot;&lt;/p&gt;
&lt;p&gt;If you want to be the first or only, doing that instantly kills your motivation. Work on the project because you personally enjoy it and want to be the person who can do it. Rule of thumb: A problem you really care about is one where someone else solving it still brings you joy. Mastery is &lt;a href=&quot;/posts/retreat-to-win&quot;&gt;not about competition&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The problem is that only &quot;novelty&quot; is rewarded (especially in research), pushing people to more hyped up topics without revisiting existing ones.&lt;/p&gt;
&lt;h2&gt;2. &quot;Always check sites like StackOverflow to find good/best-practice algorithms to use for your problem.&quot;&lt;/h2&gt;
&lt;p&gt;Of course someone thought about the best data structure to tackle your problem, right? Why waste time thinking about how to combine what you know to get a grasp on using your knowledge to solve problems.&lt;/p&gt;
&lt;p&gt;Remember, best practices (aka average practices) are a way for you to never practice.&lt;/p&gt;
&lt;h2&gt;3. &quot;Look for libraries that already solve what you need to solve yourself.&quot;&lt;/h2&gt;
&lt;p&gt;Never re-invent the wheel, we have a deadline, why write so many lines and not build on other frameworks?&lt;/p&gt;
&lt;p&gt;But if we use this library we benefit from free new features and fixes!&lt;/p&gt;
&lt;p&gt;Valid points, but assess them every time and don&apos;t blindly go in that direction. Don&apos;t be the person who only puts libraries together. You can be the one creating your own, but that requires depending on yourself only.&lt;/p&gt;
&lt;h2&gt;4. &quot;Never put your code on the internet.&quot;&lt;/h2&gt;
&lt;p&gt;Now that your baby is alive, never show it to anyone. What if someone says it&apos;s ugly?&lt;/p&gt;
&lt;p&gt;Build this resilience step by step. I am guilty of not doing that myself, but this is healthy to have within the team.
Healthy roasting sessions help in the right culture.&lt;/p&gt;
&lt;h2&gt;5. &quot;When something just works, leave it and consider the project done.&quot;&lt;/h2&gt;
&lt;p&gt;That&apos;s the &quot;what else can be done anyways? it works&quot;.&lt;/p&gt;
&lt;p&gt;If you depend on external libraries and other people&apos;s best practices, you will feel that you have limited amount of control over your creation. This pushes you to avoid diving into nice rabbit holes because it&apos;s too much friction to change anything now.
If you respect all the above, this becomes easier to avoid.&lt;/p&gt;
&lt;p&gt;Just watch &lt;a href=&quot;https://www.youtube.com/watch?v=rDGPau1SMvk&quot;&gt;the talk&lt;/a&gt;, it&apos;s fun. I have so much respect for this man.&lt;/p&gt;
</content:encoded></item><item><title>Sequence as Priority</title><link>https://blog.jeremarc.com/posts/sequence-as-priority/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/sequence-as-priority/</guid><pubDate>Tue, 15 Jul 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;import { Image } from &apos;astro:assets&apos;;
import topologicalSort from &apos;../assets/sequence-as-priority/topological-sort.jpeg&apos;;&lt;/p&gt;
&lt;p&gt;&amp;lt;blockquote class=&quot;twitter-tweet&quot;&amp;gt;&amp;lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&amp;gt;Labeling 900 things as P0 is 100% guaranteed to drive dysfunction.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;A human brain cannot handle the idea that a critical priority isn&apos;t being actively worked on or isn&apos;t already complete.&amp;lt;/p&amp;gt;— Evan LaPointe (@evanlapointe) &amp;lt;a href=&quot;https://twitter.com/evanlapointe/status/1944795302755447261?ref_src=twsrc%5Etfw&quot;&amp;gt;July 14, 2025&amp;lt;/a&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;/p&gt;
&lt;p&gt;Once you reflect a bit on your own experience, you realize that you &lt;strong&gt;need&lt;/strong&gt; to switch to what Evan is mentioning as &quot;sequence over priority&quot;.&lt;/p&gt;
&lt;p&gt;I find myself doing that using dependency graphs:&lt;/p&gt;
&lt;p&gt;Start by laying down all tasks as nodes.
I use Obsidian Canvas for that. After listing &quot;what should be done&quot;, now connect dependencies &quot;what must be done to unlock another task&quot;. This should be hard dependencies. (simple e.g., API Design must be done before API Implementation.)&lt;/p&gt;
&lt;p&gt;Once you have those, you need to topologically sort the graph you end up with. Here&apos;s a picture from the wikipedia page explaining topological sorting&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={topologicalSort} alt=&quot;Topological Sorting &lt;a href=&quot;https://en.wikipedia.org/wiki/Topological_sorting&quot;&gt;Wikipedia&lt;/a&gt;&quot; style=&quot;max-width: 50%;&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;You can see that many sequences are now possible.
Each sequence ensures that if done one element at a time, all dependencies are respected.
That means you would have 5, 7, 3 which could start in any order, and the rest can only appear in order of dependency.&lt;/p&gt;
&lt;p&gt;At that point, it&apos;s about resource management and second look at this sequence. I personally aim for leading dominoes. Considering all else equal (effort required, urgency of project, etc..)  7  &quot;unlocks more tasks downstream&quot; hence shows as a nice contender to start with.&lt;/p&gt;
&lt;p&gt;At this level it&apos;s a management decision on how to proceeed. That&apos;s what constitute your execution strategy. What is important, as Evan mentioned, is to be able to lay down a clear list.
The hardest aspect here is maintaining/updating this task graph as you go. Especially when blockers happen, you depend on some team that suddenly can&apos;t deliver/is late, you had bad effort estimation and you need to shuffle things around, etc. (you will be punched in the face)
Make sure to keep track of your failures and push yourself against the &quot;everything is important because all customers are important&quot; or anything similar. What&apos;s important is keeping your team going and having real impact. A million priorities are confusiing.&lt;/p&gt;
&lt;p&gt;Practice so you can always answer &quot;Now what?&quot; and keep a healthy momentum.&lt;/p&gt;
</content:encoded></item><item><title>TODO Streams</title><link>https://blog.jeremarc.com/posts/todo-streams/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/todo-streams/</guid><pubDate>Sat, 07 Jun 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;There is always more to do.&lt;/p&gt;
&lt;p&gt;Every waking hour is one tempting you to tackle your never-ending todo list.&lt;br /&gt;
You know that by spending just 1hr now you would finish this or that.&lt;br /&gt;
&quot;Finishing&quot; your todo list feels so close, yet never achievable.&lt;/p&gt;
&lt;p&gt;Aim for a todo stream instead.&lt;/p&gt;
&lt;p&gt;A &quot;list&quot; feels finite and is handled as such.&lt;br /&gt;
You try to push through it to &quot;be over, feel a sense of achievement, and relax&quot;.&lt;br /&gt;
A stream is seen as never-ending by nature.&lt;br /&gt;
Instead of finishing, you focus on handling the infinite stream without being overwhelmed.&lt;/p&gt;
&lt;p&gt;You go from&lt;br /&gt;
&quot;How can I finish everything I have to do?&quot;&lt;br /&gt;
to&lt;br /&gt;
&quot;What should I focus on today from this infinite stream?&quot;&lt;/p&gt;
&lt;p&gt;The stream being infinite is the norm, and you stop fighting it.&lt;/p&gt;
&lt;p&gt;I first saw the idea in this &quot;Rest in Motion&quot; &lt;a href=&quot;https://mindingourway.com/rest-in-motion/&quot;&gt;blog post&lt;/a&gt; referenced by
&lt;a href=&quot;https://x.com/benkuhn&quot;&gt;Ben Kuhn&lt;/a&gt; in his amazing &lt;a href=&quot;https://benkuhn.net/tmgr/&quot;&gt;time management post&lt;/a&gt;.&lt;/p&gt;
</content:encoded></item><item><title>What kind of Problem Solvers do you really need?</title><link>https://blog.jeremarc.com/posts/problem-solving/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/problem-solving/</guid><description>Discover + Formulate + Solve</description><pubDate>Tue, 03 Jun 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;import { Image } from &apos;astro:assets&apos;;
import xyProblem from &apos;../assets/problem-solving/XYProblem.jpeg&apos;;&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={xyProblem} alt=&quot;The XY Problem&quot; style=&quot;max-width: 50%;&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Discover + Formulate&lt;/code&gt; usually feels like a burden and a lot of work for minimal short-term reward.
The person trying to make an impact fast and maximize the use of their expertise will be irritated.
Field Experts sometimes prefer focusing on the &lt;code&gt;Solve&lt;/code&gt;, maybe with a touch of &lt;code&gt;Formulate&lt;/code&gt;, but not the &lt;code&gt;Discover&lt;/code&gt;.
I personally believe you need to/must be involved in all of &lt;code&gt;Discover, Formulate, and Solve&lt;/code&gt; stages regardless of your preferences.
The person who knows how to &lt;code&gt;Solve&lt;/code&gt; is best positioned to see the gaps in the &lt;code&gt;Discover&lt;/code&gt; phase and scope the &lt;code&gt;Formulate&lt;/code&gt; in such a way that &lt;code&gt;Solve&lt;/code&gt; can be tackled the right way.
This is especially true to avoid the &lt;a href=&quot;https://sketchplanations.com/the-xy-problem&quot;&gt;XY Problem&lt;/a&gt;.
At early stages in a startup or even team, you can&apos;t afford having someone who focuses only on one or the other part of this equation.&lt;/p&gt;
</content:encoded></item><item><title>Fight the Glue Engineer Within</title><link>https://blog.jeremarc.com/posts/fight-the-glue-engineer-within/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/fight-the-glue-engineer-within/</guid><pubDate>Tue, 22 Apr 2025 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Glue engineers know the tools. They know the frameworks. They know which package to install. But ask them to build the tool itself — the database, the compiler, the scheduler — and they’re lost.
They won’t build the next kernel. They won’t write the next compiler. They won’t create the next database. They won’t design the next OS. They won’t invent the next hypervisor. They won’t architect the next distributed system.
They’re great at using the tools. But they’re not the ones who will build them.
Glue Engineers usually work at an abtraction where they don’t have to think about the underlying systems.
They can’t debug a kernel panic. They can’t write a compiler from scratch. They can’t design a new protocol.
– Vipul Vaibhaw, &lt;a href=&quot;https://vaibhawvipul.github.io/2025/04/22/How-to-Hire-Engineers-Who-Ship-Kernels.html&quot;&gt;How to Hire Engineers Who Ship Kernels&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It&apos;s sadly so easy to end up working as a Glue Engineer.&lt;/p&gt;
&lt;p&gt;When everything you&apos;re building only requires this level of &quot;collage&quot; skills to &quot;bring shareholder value&quot;, you just find efficient ways to keep doing it.&lt;/p&gt;
&lt;p&gt;The more you do it, the more you think it&apos;s the kind of Skills you need to become better. Because of course bringing more shareholder value increases your value, right?&lt;/p&gt;
&lt;p&gt;Sometimes, and it depends which shareholders you want to make happy (career choice). You can keep solving similar problems your whole life and label yourself as a &quot;React Software Engineer&quot;, as if carpenters would say &quot;Red Hammer Carpenter&quot;, silly yet always used.&lt;/p&gt;
&lt;p&gt;Do specialize, but don&apos;t limit yourself to tools you could learn to build yourself.&lt;/p&gt;
&lt;p&gt;The best people I worked with are the ones who aren&apos;t afraid of building tools and have a VERY deep understanding of the fundamentals so they could build the blocks required to develop the solution.&lt;/p&gt;
&lt;p&gt;This is also required to act as a &quot;glue engineer&quot; when required because how else would you assess the tools available?&lt;/p&gt;
&lt;p&gt;I fight against slowly drifting to Glue Engineer every day, and put extra effort to push my team to think differently about how we tackle problems.&lt;/p&gt;
&lt;p&gt;That&apos;s not easy, and it gets harder the less time you have for technical deep dives, but it&apos;s the only fight worth fighting.&lt;/p&gt;
</content:encoded></item><item><title>Trust Your Gut in Hiring? Bake 10,000 Cheesecakes First</title><link>https://blog.jeremarc.com/posts/cheesecake-hiring/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/cheesecake-hiring/</guid><description>How would one assess people to be hired? What to ask yourself in the process?</description><pubDate>Sun, 29 Dec 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;import { Image } from &apos;astro:assets&apos;;
import cheesecake0 from &apos;../assets/cheesecake-hiring/cheesecake0.webp&apos;;
import cheesecake1 from &apos;../assets/cheesecake-hiring/cheesecake1.webp&apos;;
import cheesecake2 from &apos;../assets/cheesecake-hiring/cheesecake2.webp&apos;;
import cheesecake3 from &apos;../assets/cheesecake-hiring/cheesecake3.webp&apos;;&lt;/p&gt;
&lt;h2&gt;The Perfect Recipe?&lt;/h2&gt;
&lt;p&gt;Every pastry chef can spot a perfect cheesecake at a glance: the smoothness of the surface, the slight jiggle, the warm glow at the edges. Not because they read recipe books but because they have crafted thousands. They have seen every possible variation, every mistake, every near-miss, and every success. Expert chefs also know that the true test of a cheesecake isn&apos;t in how it looks but in that first bite. What I realized is that hiring expertise follows the exact same path. We&apos;re all just learning to taste the cheesecake and choose the best one.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;I chose the number 10,000 randomly as a big number, similar to the &lt;a href=&quot;https://www.6seconds.org/2022/06/20/10000-hour-rule/&quot;&gt;10,000hrs rule&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h2&gt;How Hard Can It Be?&lt;/h2&gt;
&lt;p&gt;A failed cheesecake costs you ingredients and time. A failed hire can cost you your entire company. While anyone can follow a basic cheesecake recipe and produce an edible result, hiring requires a level of judgment that goes far beyond following a simple checklist.&lt;/p&gt;
&lt;p&gt;Being at the core of what management does, it is a significant topic to get right.&lt;/p&gt;
&lt;p&gt;&amp;lt;blockquote class=&quot;twitter-tweet&quot;&amp;gt;&amp;lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&amp;gt;Management is mostly hiring well and firing quickly.&amp;lt;/p&amp;gt;— Naval (@naval) &amp;lt;a href=&quot;https://twitter.com/naval/status/1536403651857510400?ref_src=twsrc%5Etfw&quot;&amp;gt;June 13, 2022&amp;lt;/a&amp;gt;&amp;lt;/blockquote&amp;gt;
The complexity of hiring manifests in multiple ways, as highlighted by many in the field&lt;/p&gt;
&lt;p&gt;&amp;lt;blockquote class=&quot;twitter-tweet&quot;&amp;gt;&amp;lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&amp;gt;Hiring is hard. I asked a bunch of founders who are crushing it at hiring what they believe contributes most to their hiring success. Five consistent themes emerged:&amp;lt;br /&amp;gt;1. Captivating vision&amp;lt;br /&amp;gt;2. A++ early team&amp;lt;br /&amp;gt;3. Putting in the work&amp;lt;br /&amp;gt;4. Founder&apos;s network&amp;lt;br /&amp;gt;5. Pitching prowess&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;em&gt;Read on&lt;/em&gt;&amp;lt;/p&amp;gt;— Lenny Rachitsky (@lennysan) &amp;lt;a href=&quot;https://twitter.com/lennysan/status/1412437666965032961?ref_src=twsrc%5Etfw&quot;&amp;gt;July 6, 2021&amp;lt;/a&amp;gt;&amp;lt;/blockquote&amp;gt;
&amp;lt;blockquote class=&quot;twitter-tweet&quot;&amp;gt;&amp;lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&amp;gt;Almost all founder mistakes can be fixed. &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;What can&apos;t? Hiring. &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;And no, not just hiring the wrong person. &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;It&apos;s not hiring enough, hiring too much, hiring the wrong type of role, or the right person at the wrong time. &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;These are painful lessons. &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Learn them fast.&amp;lt;/p&amp;gt;— Kristen Anderson (@FintechKristen) &amp;lt;a href=&quot;https://twitter.com/FintechKristen/status/1413622543961952256?ref_src=twsrc%5Etfw&quot;&amp;gt;July 9, 2021&amp;lt;/a&amp;gt;&amp;lt;/blockquote&amp;gt;
With stakes this high, how do we develop the judgment to make better hiring decisions?&lt;/p&gt;
&lt;h2&gt;The Three Ways to Judge: Make, Taste, or Trust&lt;/h2&gt;
&lt;p&gt;When it comes to assessing quality — whether in cheesecakes or candidates — we have three fundamental approaches we can follow.
Consider yourself in front of the following 4 choices. Which one would you expect to taste better? Look carefully before answering.&lt;/p&gt;
&lt;p&gt;&amp;lt;div style=&quot;display: flex; gap: 2%;&quot;&amp;gt;
&amp;lt;div style=&quot;flex: 1; text-align: center;&quot;&amp;gt;
&amp;lt;Image src={cheesecake0} alt=&quot;Cheesecake 1&quot; style=&quot;max-width: 100%; height: auto;&quot; /&amp;gt;
&amp;lt;br /&amp;gt;
&amp;lt;span&amp;gt;Cheesecake 1&amp;lt;/span&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div style=&quot;flex: 1; text-align: center;&quot;&amp;gt;
&amp;lt;Image src={cheesecake1} alt=&quot;Cheesecake 2&quot; style=&quot;max-width: 100%; height: auto;&quot; /&amp;gt;
&amp;lt;br /&amp;gt;
&amp;lt;span&amp;gt;Cheesecake 2&amp;lt;/span&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div style=&quot;flex: 1; text-align: center;&quot;&amp;gt;
&amp;lt;Image src={cheesecake2} alt=&quot;Cheesecake 3&quot; style=&quot;max-width: 100%; height: auto;&quot; /&amp;gt;
&amp;lt;br /&amp;gt;
&amp;lt;span&amp;gt;Cheesecake 3&amp;lt;/span&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div style=&quot;flex: 1; text-align: center;&quot;&amp;gt;
&amp;lt;Image src={cheesecake3} alt=&quot;Cheesecake 4&quot; style=&quot;max-width: 100%; height: auto;&quot; /&amp;gt;
&amp;lt;br /&amp;gt;
&amp;lt;span&amp;gt;Cheesecake 4&amp;lt;/span&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;br /&amp;gt;
What are you even looking at when deciding?
As a non-expert chef, maybe style, resemblance to some nice cheesecake you tasted once, or even fanciness.
The features you look at are incomplete to make a reasonable final decision accordingly.&lt;/p&gt;
&lt;h3&gt;The Maker&apos;s Way: Mastery Through Practice&lt;/h3&gt;
&lt;p&gt;We all think we can spot talent when we see it, just like a good cheesecake.
You definitely heard someone ask to write down more details about what they are looking for in a candidate, and their answer was, &quot;I will know a good match when I see it.&quot;
The difference between you and a chef is that you don&apos;t even know what to look at, let alone be able to assess it correctly once you see it.&lt;/p&gt;
&lt;p&gt;The same goes for tasting it. You never trained your tastebuds, and after a specific point, everything tastes &quot;really good.&quot; What do you do then? You choose the cheapest in this pool of &quot;really good.&quot; This is one reason companies end up with slightly above-average teams. The quality you get is proportional to how well you trained your tastebuds.&lt;/p&gt;
&lt;p&gt;So, do you need to be an expert? Well, kind of.&lt;/p&gt;
&lt;p&gt;My theory is as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The Cheesecake Theory&lt;/strong&gt;: Authority in judgment is not given but earned through the deliberate baking and tasting of thousands of cheesecakes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A Chef who has baked 10,000 cheesecakes has seen every possible variation, mistake, near-miss, and success. This Chef knows exactly what to look for in the shape and taste. Of course, that&apos;s only possible if the Chef &lt;strong&gt;deliberately practiced&lt;/strong&gt; the process.
The &quot;deliberate&quot; part is essential here.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;You think deliberate practice has only marginal benefits?&lt;/p&gt;
&lt;p&gt;Next to my place, I observe a homeless man playing the same accordion tune he&apos;s played for years. Despite likely crossing the 10,000-hour mark of practice, his melody remains unchanged, his skill unimproved. Not through any fault of his own - life&apos;s circumstances have denied him proper guidance and feedback. His daily performance serves as a powerful reminder: time invested without deliberate improvement is just time passed. When developing hiring expertise, let&apos;s ensure we don&apos;t fall into the same pattern of aimless repetition.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h3&gt;The Taster&apos;s Way: Expertise Through Evaluation&lt;/h3&gt;
&lt;p&gt;Is it the only way of assessing? Do I have to be a Chef? Not necessarily, but there is a reason why judges in all cooking shows are renowned Chefs (apart from the marketing aspect).
Think about a &lt;a href=&quot;https://en.wikipedia.org/wiki/Sommelier&quot;&gt;Sommelier&lt;/a&gt;. They are the best at assessing the quality of wine but don&apos;t necessarily know all the tricks of the trade to make it. So, if you deliberately baked or even tasted a thousand cheesecakes, you earn the gut feeling that would help you assess one effectively.&lt;/p&gt;
&lt;p&gt;Does it mean you can explicitly explain why a specific option is better every time? Not necessarily, and this happens with a lot of experts. Maybe you look at some code and say, &quot;Well, this looks really nice,&quot; without being able to pinpoint precisely what makes something nice. Or maybe you look at chickens and can directly know their sex. I&apos;m actually not joking; this blog post about &lt;a href=&quot;https://commoncog.com/chicken-sexing-and-perceptual-learning-as-a-path-to-expertise/&quot;&gt;Chicken Sexing and Perceptual Learning as a Path to Expertise&lt;/a&gt; explains this phenomenon really well. The TL;DR of this article is that perceptual expertise - like instantly judging code quality or spotting the sex of a chicken - can&apos;t be taught through instruction but is learned through immediate feedback over thousands of examples. Through this &quot;perceptual exposure,&quot; our brains naturally detect patterns when shown many varied examples quickly, as proven when non-pilots matched experienced pilots&apos; instrument-reading abilities after just two hours of targeted practice. This explains why true expertise in any field requires extensive exposure to high-quality examples with feedback, creating knowledge that experts can use but often can&apos;t explain - they just know what &quot;feels right.&quot; It&apos;s also known as &quot;developing taste.&quot; Yes, you have to &lt;em&gt;earn&lt;/em&gt; the gut feeling, and you can actually train it.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Please do read the &lt;a href=&quot;https://commoncog.com/chicken-sexing-and-perceptual-learning-as-a-path-to-expertise/&quot;&gt;full article&lt;/a&gt;, it&apos;s amazing. One bad scenario I imagined is perceptual exposure with low-quality examples and how it could mess up your gut feeling, maybe permanently(?)&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h3&gt;The Trust Way: Wisdom Through Proxies&lt;/h3&gt;
&lt;p&gt;Now, there is actually a third way other than deliberate baking and tasting. Consider the following: You are presented with two cheesecakes, one by your neighbor Nina and the second by Gordon Ramsey. Which one do you expect to taste better?&lt;/p&gt;
&lt;p&gt;Without having them baked or even looking at them, you may say Gordon&apos;s because you know he&apos;s an expert. You know nothing about cheesecakes, how they are done, or how they should even taste. Yet, you were confident because someone somewhere gave the highest credit to that person. This is the third method which is assessment by proxy. You trust someone who graduated from MIT over a random local university in the Middle East because of their credibility, which is renowned worldwide. The same goes for referrals. If my super skilled friend referred you, you must be good. This only makes sense, although not always true.&lt;/p&gt;
&lt;p&gt;What you didn&apos;t realize is that Nina, your neighbor, turns out to be Nina Métayer, who just became the &lt;a href=&quot;https://www.theworlds50best.com/awards/best-pastry-chef&quot;&gt;best pastry chef in the world for 2024&lt;/a&gt;. Had you had an expert chef with you to help you decide, you would have quickly realized that her pastry is better. Now, you only know that because the title is there. Enjoy Gordon&apos;s &quot;bad&quot; cheesecake.&lt;/p&gt;
&lt;p&gt;Relying on external assessment increases the probability, but you will still get &quot;bad&quot; candidates because you will be biased by others&apos; assessments. More importantly, you will miss people who took a different route and can prove to be among the best.
This is always a possible risk, no matter how you approach the hiring process. Considering limited time and energy, it is not humanly possible to be 100% fair with every candidate applying. At one point, you may have 2000 candidates for one position and need to filter it out as fast as possible. You will refer to some heuristics (rules of thumb) to do so.&lt;br /&gt;
Let&apos;s not fool ourselves into thinking we are always in such a situation and try to take shortcuts while we can have more extensive assessments.&lt;br /&gt;
Don&apos;t always listen to Bob from CheesyCake. His advice is based on the context of a big company; your context may be different. Take your time.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;So the path forward is clear: become an expert, develop expert judgment, or consult experts. Simple, yet surprisingly controversial to many.&lt;/p&gt;
&lt;p&gt;A common saying is &quot;Game recognizes game,&quot; which points out how experts have the gut feeling to recognize other experts or even hidden potential.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Mastering the Craft&lt;/h2&gt;
&lt;p&gt;If you have read this far, my words have made some sense to you, which is a good sign. Now what?&lt;/p&gt;
&lt;p&gt;We mentioned choosing the cheesecake that would taste best, but what does that actually mean? &quot;Best&quot; is very subjective and should be treated as such. What makes a good candidate at one company may not make them good at another, even for the same role.&lt;/p&gt;
&lt;p&gt;The important part is not fighting about a universal definition of &quot;best,&quot; but being aware of a clear definition of &lt;strong&gt;your version of &quot;best.&quot;&lt;/strong&gt; This may seem like a trivial step, which is partly why it is usually overlooked with assumptions like &quot;I will know it when I see it.&quot; Well, maybe, but you won&apos;t attract it if you don&apos;t clearly advertise what you want, which means you may never actually get to see it.&lt;/p&gt;
&lt;h3&gt;About the Candidate&lt;/h3&gt;
&lt;p&gt;What makes a great candidate is what makes a great employee; they should&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tackle the right tasks (&lt;strong&gt;Effective&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Tackle tasks the right way (&lt;strong&gt;Efficient&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Deliver high-quality outcomes (&lt;strong&gt;Expert&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Learn and grow fast (&lt;strong&gt;Eager&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You may require different levels for each or even add more aspects you believe are important for you, but the above list shows the essential core traits I believe are necessary.&lt;/p&gt;
&lt;p&gt;Some argue that &lt;strong&gt;Eager&lt;/strong&gt; is not always required.
Would you rather choose the Chef who has consistently made a 3/5-star cheesecake for the past 20 years or a new chef who has only been self-taught for a few months, showing a 2/5-star cheesecake?&lt;br /&gt;
If all you ever care about is a 3/5 quality, your choice may be clear.&lt;br /&gt;
If you aim for a 5/5, this first Chef is a clear red flag.&lt;br /&gt;
You choose how to balance those dimensions based on your needs (yes, it is essential to have them clearly defined).&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-important&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;It goes without saying that not being an asshole is on top of the list.
Sadly, too many people still overlook this aspect and consider that Expertise would cover up for it.
There is a reason why &lt;strong&gt;&quot;One rotten apple spoils the barrel&quot;&lt;/strong&gt; is such a famous proverb.
Let&apos;s add one line to reflect that&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fit well in different environments (&lt;strong&gt;Adaptable&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h3&gt;About the Person hiring&lt;/h3&gt;
&lt;p&gt;While you could focus on everything during the assessment, at the end of the day, a human is doing the assessment, and humans are biased—not only biased but emotional and sometimes &lt;a href=&quot;https://amzn.eu/d/22Ob88p&quot;&gt;irrational&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As professional as you may be, the implicit clues you pick up can sometimes be based on your own personality, how attractive the person is, or how clear their voice is. The candidate may even remind you of someone you hate or love. Both positive and negative biases negatively affect an effective assessment.&lt;/p&gt;
&lt;p&gt;Some tips&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First, read books about decision-making so you can recognize your own biases. &lt;a href=&quot;https://amzn.eu/d/gcQwvOp&quot;&gt;&quot;Thinking in Bets&quot; by Annie Duke&lt;/a&gt; is a great start.&lt;/li&gt;
&lt;li&gt;Write down evaluation criteria &lt;em&gt;before&lt;/em&gt; meeting with the candidate. Knowing what you want, what you need, and how to clearly state that out are three different challenges at this stage.&lt;/li&gt;
&lt;li&gt;Document decisions immediately after each interview, not later. You may believe that you know an implicit definition of &quot;good,&quot; but challenge it by writing it out or explaining it out loud to someone to convince them. For instance, in many situations, you may find that what you consider good is affected by the &lt;a href=&quot;https://thedecisionlab.com/biases/recency-effect&quot;&gt;recency bias&lt;/a&gt;. &lt;em&gt;e.g., today&apos;s good candidate seems to you better than the other good candidate from 3 weeks ago. (no notes / clear metrics? you fell into the trap)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Make sure your filtering process takes into consideration the context of the candidates. Consider two candidates: one from a prestigious university, good grades, with no work experience, versus one from a good university who worked as a waiter throughout their studies to support their family. Which path tells you more about their potential? Take some time to reflect on your own hiring biases.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Questions to ask yourself&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If the candidate was of a different age/gender/background, would I feel the same way? Try to replace them with someone you know and like or someone you specifically don&apos;t.&lt;/li&gt;
&lt;li&gt;Can I point to specific examples that support each of my judgments?&lt;/li&gt;
&lt;li&gt;What makes me say they&apos;re a &apos;culture fit&apos; - am I confusing comfort/easygoing with competence?&lt;/li&gt;
&lt;li&gt;Which of my past hires succeeded/failed in unexpected ways, and what did I miss initially?&lt;/li&gt;
&lt;li&gt;Where have my instincts been right/wrong before?&lt;/li&gt;
&lt;li&gt;Have I given equal weight to similar strengths/weaknesses across all candidates?&lt;/li&gt;
&lt;li&gt;Am I rushing to judgment because I&apos;m under pressure to hire?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-warning&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Please don&apos;t read books before ordering a cheesecake, but at least do so before making decisions that can affect the lives and careers of candidates and your team/company when hiring.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Remember: Just like developing any expertise, reducing bias requires both structured systems and self-awareness of our judgment patterns. It&apos;s not about eliminating intuition but about calibrating it properly.&lt;/p&gt;
&lt;h2&gt;Personal Rules of Thumb&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&quot;Theory without practice is empty, and practice without theory is blind.&quot; - Kurt Lewin&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;No matter how much you read about hiring, you have to experience it firsthand and fail badly to learn.&lt;/li&gt;
&lt;li&gt;Suffering is a required part of the process.&lt;/li&gt;
&lt;li&gt;You can learn from the experience of your colleagues hiring in other teams. Learning from others&apos; mistakes is required when your samples are small over your career.&lt;/li&gt;
&lt;li&gt;Allow your process to detect exceptional talent. Your challenge should be hard enough for excellent people to pass it but still allow exceptional geniuses to stand out. An easy challenge would reach a &quot;saturated good solution,&quot; which is marginally different between candidates with dramatically different skill sets.&lt;/li&gt;
&lt;li&gt;Humans are not rational by default; if you think you are, read &lt;a href=&quot;https://amzn.eu/d/22Ob88p&quot;&gt;&quot;Predictably Irrational&quot; by Dan Ariely&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;No matter how much you read about decision-making and decision biases, you will still make mistakes. Make sure to actively try to be aware of them and calibrate accordingly.&lt;/li&gt;
&lt;li&gt;Great recruiters are worth their weight in gold. They have seen a lot of cheesecakes and a lot of Chefs in different teams, contexts, and industries. Their gut feeling is worth considering.&lt;/li&gt;
&lt;li&gt;Not every great employee can hire well, but most employees who hire well are great.&lt;/li&gt;
&lt;li&gt;Always reflect on your skills at assessing people and outcomes. You may be good at one and bad at the other.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The Cheesecake Theory&lt;/strong&gt;: Authority in judgment is not given but earned through the deliberate baking and tasting of thousands of cheesecakes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Your gut feeling is the dark matter of hiring. With time, it starts to make up 95% of our decisions. Make sure you train it with high-quality examples.&lt;/p&gt;
&lt;p&gt;Your first cheesecake won&apos;t be perfect. Neither will your first hire. But with each attempt, your judgment grows sharper. Start counting your cheesecakes.&lt;/p&gt;
&lt;p&gt;What&apos;s your approach to developing hiring expertise? How many &quot;cheesecakes&quot; have you baked so far?
Interested in your experience and feedback, let&apos;s connect on Twitter/X &lt;a href=&quot;https://twitter.com/jeanmarcalkazzi&quot;&gt;@jeanmarcalkazzi&lt;/a&gt;.&lt;/p&gt;
</content:encoded></item><item><title>Let&apos;s Talk Time Management</title><link>https://blog.jeremarc.com/posts/time-management/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/time-management/</guid><description>How to manage University with 2 part-time jobs? Or a PhD along a full-time job?</description><pubDate>Sun, 02 Apr 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;import { Image } from &apos;astro:assets&apos;;
import xkcd from &apos;../assets/time-management/xkcd_time_management.png&apos;;
import schedule00 from &apos;../assets/time-management/schedule_00.png&apos;;
import schedule01 from &apos;../assets/time-management/schedule_01.png&apos;;
import tasktable from &apos;../assets/time-management/tasktable.jpg&apos;;
import mindForNumbers from &apos;../assets/time-management/A-Mind-for-Numbers-Learning-Strategies.webp&apos;;
import cornellNotes from &apos;../assets/time-management/CornellNotes-Notepad2d-1024x1018.jpg&apos;;
import plannerInstructions from &apos;../assets/time-management/planner_instructions.png&apos;;
import plannerFilled from &apos;../assets/time-management/planner_filled.png&apos;;
import things3 from &apos;../assets/time-management/things3.png&apos;;
import obsidianCanvas from &apos;../assets/time-management/demo-help-vault.png&apos;;&lt;/p&gt;
&lt;h2&gt;Intro&lt;/h2&gt;
&lt;p&gt;First, what is time management?&lt;/p&gt;
&lt;p&gt;According to &lt;a href=&quot;https://en.wikipedia.org/wiki/Time_management&quot;&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Time management is the process of planning and exercising conscious control of time spent on specific activities, especially to increase effectiveness, efficiency, and productivity.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Well, fair enough.
As long as we don&apos;t end up like this by the end of this post, we should be fine.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={xkcd} alt=&quot;XKCD Time Management comic&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;Now how did I end up able to juggle a full-time job at a startup, an ongoing PhD, staying fit, keeping a social life, and staying (arguably) sane in the process?&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;If you are at school/university, I believe the story steps will be insightful. If you don&apos;t feel like knowing the story behind how I got to my current approach, just jump &lt;a href=&quot;#my-current-approach-&quot;&gt;to the end&lt;/a&gt; directly (no hard feelings).&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h2&gt;Mom: Where are you? When are you coming home?&lt;/h2&gt;
&lt;p&gt;For the first 2 years of university, I was working part-time giving private courses in Math and Physics for school students to be able to afford my studies.
I used to only take students who are of walking distance to my place, on the same days of the week. So my whereabouts were somehow clear.
At one point, life decided to make things a bit harder, and I needed to find a bigger source of income, which led me to taking a job as Lead Data Scientist at a startup as well as leading projects in our university research Lab. Things got way more complicated very fast and I needed a way to keep up.
Not only that, but having a random university schedule and 2 jobs made me jump around between multiple locations, and made my mom confused on what food to prepare for the day and when to expect me to be home for dinner.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Food was a main concern (I mean, it&apos;s mom), but it is worth noting that the situation in Lebanon was bad at the time, and random explosions used to happen everywhere throughout the country. So keeping my mom up to date on my location was necessary to make her feel better. All she cared about is knowing that I am safe, and have enough food to survive the day.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;To avoid answering multiple calls a day with the sole reason of knowing where I am physically, I created a simple schedule of the week showing where I am suposed to be at any point in time and hung it in the living room. The deal was: the schedule is true unless I inform you otherwise.&lt;/p&gt;
&lt;p&gt;One day of the week looked something like this:&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={schedule00} alt=&quot;Mom-Driven Schedule.&quot; style=&quot;max-width: 50%;&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;This turned out to be an amazing solution.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Safety&lt;/li&gt;
&lt;li&gt;Food&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Until we started talking about what I am doing at University, and how the courses are going. Mom wanted to know what is happening in general, Dad liked to go into more details on what I was learning.
The more complex the courses were, the harder it was to keep track of their names.&lt;/p&gt;
&lt;h2&gt;Dad: What is the name of this course again?...&lt;/h2&gt;
&lt;p&gt;I enjoyed our discussions a lot, and wanted us to stay in sync.
This was an easy fix here, right?
Just add the course names instead of &quot;University&quot;, and they will be there on the wall as a reminder.&lt;/p&gt;
&lt;p&gt;Which looked something like this:&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={schedule01} alt=&quot;Dad-Driven Schedule.&quot; style=&quot;max-width: 50%;&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;Now we have&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Safety&lt;/li&gt;
&lt;li&gt;Food&lt;/li&gt;
&lt;li&gt;Synced Discussions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is nice, but.... we still didn&apos;t solve the fact that I am working on a gazillion things at once and I need to keep my head straight.&lt;/p&gt;
&lt;h2&gt;The Enlightment&lt;/h2&gt;
&lt;p&gt;As I was doing this last detailed schedule, I realized that I was more often than not checking it to know what I should be doing next, and which course to attend.
I slowly started adding the course location (building+room), and accounting more accurately for the commute times, while adding some &quot;Relax&quot; slots in the process.&lt;/p&gt;
&lt;p&gt;There was also this nice side-effect of feeling less overwhelmed because I know for a fact that a some point in the day I will tackle problem &lt;code&gt;X&lt;/code&gt; for 3 hours, so I can offload overthinking about problem &lt;code&gt;X&lt;/code&gt; until I reach this time-slot.&lt;/p&gt;
&lt;h3&gt;Schedule Management&lt;/h3&gt;
&lt;p&gt;At this point, and maybe through some searches about time management, I landed on a blog post which was freshly posted: &lt;a href=&quot;https://azeria-labs.com/the-importance-of-deep-work-the-30-hour-method-for-learning-a-new-skill/&quot;&gt;&quot;The Importance of Deep Work &amp;amp; The 30-Hour Method for Learning a New Skill&quot;&lt;/a&gt; by &lt;a href=&quot;https://twitter.com/fox0x01&quot;&gt;Azeria&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Which I not only highly recommend you to read, but would even give you a cookie if you do.&lt;/p&gt;
&lt;p&gt;This was the first time I heard about &quot;Deep Work&quot;, which convinced me to try it out as I had a similar experience which randomly ended up like a time-blocking strategy.&lt;/p&gt;
&lt;p&gt;This is when I got the Cal Newport&apos;s Book &lt;a href=&quot;https://amzn.eu/d/cjKkhyY&quot;&gt;Deep Work&lt;/a&gt;, and dove into it.&lt;/p&gt;
&lt;p&gt;Reading the book, one of the main ideas was about Time-Blocking, which looked something like this:&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={tasktable} alt=&quot;Time Blocking image from Deep Work.&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;Looks familiar, right?&lt;/p&gt;
&lt;p&gt;I only reached such a point from personal experience, but Cal Newport was explaining scientifically why this is a great approach to plan your day and it was beautiful to read.&lt;/p&gt;
&lt;p&gt;The main idea explained simply is:
The fact of planning your day in blocks of time will help you&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Stay more focused on the current task at hand.&lt;/li&gt;
&lt;li&gt;Improve your effort estimation on tasks.&lt;/li&gt;
&lt;li&gt;Have clear expectations from yourself by end of day.&lt;/li&gt;
&lt;li&gt;Be more efficient overall but still adapting to different things life throws at you throughout the day.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Get the &lt;a href=&quot;https://amzn.eu/d/cjKkhyY&quot;&gt;book&lt;/a&gt;, and block 30min a day to read it. You will thank me later.&lt;/p&gt;
&lt;h3&gt;Maximizing Efficiency&lt;/h3&gt;
&lt;p&gt;Now that I know when I am working and on what, I needed to maximize my efficiency in each one of them, namely:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Research Lab Work&lt;/li&gt;
&lt;li&gt;University Courses (Class + Lab + Exams)&lt;/li&gt;
&lt;li&gt;Startup&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All of which had 1 thing in common: &lt;strong&gt;Robust and Fast Learning&lt;/strong&gt;.&lt;/p&gt;
&lt;h4&gt;Learning&lt;/h4&gt;
&lt;p&gt;To learn this skill, I decided to take the &lt;a href=&quot;https://www.coursera.org/learn/learning-how-to-learn&quot;&gt;&quot;Learning how to Learn&quot;&lt;/a&gt; course offered by &lt;a href=&quot;https://en.wikipedia.org/wiki/Barbara_Oakley&quot;&gt;Barbara Oakley&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Terry_Sejnowski&quot;&gt;Terrence Sejnowski&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The 15hours course was great, but I craved more details. So I got the book on which this course was based, &lt;a href=&quot;https://amzn.eu/d/6Bng3Xn&quot;&gt;&quot;A Mind for Numbers&quot;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This book helped me understand how learning and memorization work (from a neuroscientist&apos; perspective) so I could leverage the approaches proposed in a practical way.&lt;/p&gt;
&lt;p&gt;Simply put, here are some of the main points mentioned.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={mindForNumbers} alt=&quot;A Mind for Numbers - Learning Strategies summary&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;Do you know why starting with the hardest problem in your exam is actually more beneficial than starting with the easy one? You&apos;ll find the answer in the book, and I used this trick a lot.&lt;/p&gt;
&lt;h4&gt;Note-Taking&lt;/h4&gt;
&lt;p&gt;To learn something effectively, you need to have it well represented for efficient learning. This means you need to take good notes in class. After searching for a while, I ended up with the &lt;a href=&quot;https://lsc.cornell.edu/how-to-study/taking-notes/cornell-note-taking-system/&quot;&gt;Cornell Note Taking System&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={cornellNotes} alt=&quot;Cornell Note-Taking Example Page.&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;You simply split the page in 3 sections: main notes, cue questions, and summary.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;During class, you write in the &lt;strong&gt;main notes&lt;/strong&gt; section.&lt;/li&gt;
&lt;li&gt;You then re-read it while revising and &lt;strong&gt;summarize the main notes&lt;/strong&gt; in the &lt;strong&gt;summary&lt;/strong&gt; section.&lt;/li&gt;
&lt;li&gt;While reviewing, you write down &lt;strong&gt;important details/questions&lt;/strong&gt; in the &lt;strong&gt;cue questions&lt;/strong&gt; section.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The Cornell note-taking system is based on research that shows that actively engaging with information improves retention and recall of information. By dividing information into different sections, the Cornell method enables you to process information at different levels, leading to better comprehension and memory retention. Additionally, the summary section provides a quick review of the main points, making it easier to recall information when needed.&lt;/p&gt;
&lt;p&gt;This ended up complimenting a lot of the ideas mentioned in &lt;a href=&quot;https://amzn.eu/d/6Bng3Xn&quot;&gt;&quot;A Mind for Numbers&quot;&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;My Current Approach&lt;/h2&gt;
&lt;p&gt;Fast Forward few years...&lt;/p&gt;
&lt;p&gt;&amp;lt;blockquote class=&quot;twitter-tweet&quot; data-theme=&quot;dark&quot;&amp;gt;&amp;lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&amp;gt;I may be taking &amp;lt;a href=&quot;https://twitter.com/ProfCalNewport?ref_src=twsrc%5Etfw&quot;&amp;gt;@ProfCalNewport&amp;lt;/a&amp;gt; &apos;s Deep Work approach too seriously&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Been doing so since ~2018, just recently started using his Time-Block Planner.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Actually it&apos;s been amazing.&amp;lt;br /&amp;gt;This peace of mind of knowing that &quot;I can focus only on X now because Y is planned for later today&quot;. &amp;lt;a href=&quot;https://t.co/Erl9bnTn9C&quot;&amp;gt;pic.twitter.com/Erl9bnTn9C&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;— Jean-Marc (@jeanmarcalkazzi) &amp;lt;a href=&quot;https://twitter.com/jeanmarcalkazzi/status/1612198960260694018?ref_src=twsrc%5Etfw&quot;&amp;gt;January 8, 2023&amp;lt;/a&amp;gt;&amp;lt;/blockquote&amp;gt;
Now, how does it work practically?&lt;/p&gt;
&lt;p&gt;There are multiple aspects involved, of which I will cover the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Schedule Management&lt;/li&gt;
&lt;li&gt;Task Management&lt;/li&gt;
&lt;li&gt;Note-Taking&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Schedule Management&lt;/h3&gt;
&lt;p&gt;The tweet is pretty clear I believe, Deep Work all the way.
The empty planner looks as follows.
Each day consists of 2 pages: one for tasks, ideas and metrics, the other for the detailed schedule.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={plannerInstructions} alt=&quot;Time-Block Planner Labelled.&quot; /&amp;gt;&lt;/p&gt;
&lt;h4&gt;The Work Week&lt;/h4&gt;
&lt;p&gt;After experimenting for a while with such an approach, I ended up with a version that fits my own schedule, which you can see here.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={plannerFilled} alt=&quot;Time-Block Planner Filled.&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;On the left side, I nearly followed the same approach mentioned in Cal Newport&apos;s book, while color coding the &quot;Important Ideas&quot; in red. This helps me whenever I am doing my weekly retrospective.&lt;/p&gt;
&lt;p&gt;On the right side, you can see my schedule crosses till night, including personal aspect (outside of my daily job) which I saw to be convenient to see in one place.
Red here shows blockers I should not try to change on the same day (either involves other people in a meeting, or involves food [very important]).
All other blockers are &apos;equal&apos; in a sense.
I try to add a &quot;Slack Time&quot; blocker, maybe more on other days, because regardless how well you plan, you need to adapt when faced with the real world.
This is where I cross out blocks I thought I would do, when something urgent comes up.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-important&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;You can&apos;t have a company incident you need to react to and say &quot;well, I had something planned at this time, maybe come back tomorrow?&quot;.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;The idea of crossing out instead of erasing is very important.
Once you do the retrospective, &lt;strong&gt;you need to know where you miscalculated in your planning and adjust accordingly for the week after!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Try to always &lt;strong&gt;add in a margin for errors.&lt;/strong&gt;
The worst that could happen is finding yourself trying to keep up with the time blocks which start leaking into the next ones and you end your day frustrated.
Priorities changed throughout the day? &lt;strong&gt;Adapt accordingly.&lt;/strong&gt;
The goal of the planner is not to be written in stone, &lt;strong&gt;it&apos;s about giving you visibility of what you are set out to achieve today while helping you improve your planning skills and keep track of what you are achieving.&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;The Weekend&lt;/h4&gt;
&lt;p&gt;So, do you do the same on a weekend?
The answer is, yes and no.
I use &lt;strong&gt;Saturdays&lt;/strong&gt; as a &quot;no screen, no work, just relax&quot; days.
This is also a day I try to spend outside with my girlfriend, exploring new places and activities.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sundays&lt;/strong&gt; are &quot;structuring, planning, learning&quot; days.
This helps me keep up with house chores, missed tasks, and learning new things to feed my curiosity and be ready to tackle harder and harder challenges.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-important&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Take breaks as much as &lt;strong&gt;you&lt;/strong&gt; need. No amount of work or success is worth sacrificing your mental health, no matter how much you try to convince yourself that it makes sense.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h3&gt;Task Management&lt;/h3&gt;
&lt;p&gt;Do I plan tasks only by writing them down on the planner? But what about tasks that should be done &quot;someday&quot; but maybe not this week? How to keep track of a plethora of things to do?&lt;/p&gt;
&lt;p&gt;I use &lt;a href=&quot;https://culturedcode.com/things/&quot;&gt;Things&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={things3} alt=&quot;Things 3 example UI.&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;You have your:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&quot;Inbox&quot;, where you add tasks before deciding when/what to do with them.&lt;/li&gt;
&lt;li&gt;&quot;Today&quot;, where you can have all tasks due today.&lt;/li&gt;
&lt;li&gt;&quot;Upcoming&quot;, where you can see future events (if calendar sync on), and tasks.&lt;/li&gt;
&lt;li&gt;&quot;Anytime&quot;, do it anytime you want?&lt;/li&gt;
&lt;li&gt;&quot;Someday&quot;, do it someday, maybe?&lt;/li&gt;
&lt;li&gt;&quot;Logbook&quot;, where you can see the history of completed tasks.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I also use what Things calls &quot;Area&quot; and &quot;Project&quot;, where I have 2 areas &quot;Personal&quot; and &quot;Work&quot;. In each I have different projects, each of which can have its own tasks. This turned out to be very similar to the PARA Method explained by &lt;a href=&quot;https://twitter.com/fortelabs&quot;&gt;Tiago Forte&lt;/a&gt; in his book &lt;a href=&quot;https://amzn.eu/d/ehfNA9D&quot;&gt;&quot;Building a Second Brain&quot;&lt;/a&gt; which I recently read and helped me fine-tune my process (I use a similar approach for Note-Taking on Notion and for ToDos on Things3).&lt;/p&gt;
&lt;p&gt;I like this structure for multiple reasons, but 1 in particular: I can keep track of the balance of number of tasks spread out across projects, and I can literally &quot;see&quot; procrastination, which triggers me to act on it.&lt;/p&gt;
&lt;p&gt;You will see more about the steps of creating and planning ToDos in the Workflow section.&lt;/p&gt;
&lt;h3&gt;Note-Taking&lt;/h3&gt;
&lt;p&gt;Now that I am no longer taking classes at university, the Cornell Note-Taking System does not really fit my needs.
This is where I switched to a somehow custom &lt;a href=&quot;https://bulletjournal.com/&quot;&gt;Bullet Journal&lt;/a&gt; approach which I had started during University when it was just a way to track what I was doing during my work at the startup and the univeristy&apos;s research Lab.
This is now the &lt;strong&gt;&quot;Ideas&quot;&lt;/strong&gt; section of my planner, where it is more of a freeform section, open for thoughts and reflections.&lt;/p&gt;
&lt;p&gt;Notes written and not retrieved are slightly better than notes never written, but not really much more useful.
That&apos;s why I have a private GitHub repository where I copy all my notes each week, and try to augment them with some insights from having a global picture over what happened.
The interesting bit about the planner being only 13 weeks long gives you a bounded scope for covering only 1 quarter, helping you do a retrospective once done, and gives you the opportunity to &quot;strart fresh&quot; with the next quarter, helping you stay more and more consistent.&lt;/p&gt;
&lt;p&gt;I also recently started using &lt;a href=&quot;https://obsidian.md/&quot;&gt;Obsidian&lt;/a&gt; for brainstorming with their new &lt;a href=&quot;https://obsidian.md/canvas&quot;&gt;Canvas&lt;/a&gt; feature. I love global visual overview of all notes and how they relate to each other, and it turned out to be very helpful while writing my thesis now. Maybe worth another blog post for a deep dive in this one? We&apos;ll see.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={obsidianCanvas} alt=&quot;Example of Obsidian Canvas&quot; /&amp;gt;&lt;/p&gt;
&lt;h3&gt;The Workflow&lt;/h3&gt;
&lt;p&gt;Whatever you read next, the most important aspect is consistency.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-important&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;No amount of &quot;10 things to boost your productivity&quot; blogs will improve your life if you don&apos;t stay consistent in the execution of your plan and flexible in its creation. This should have its own blog post, but for interested readers, you can check out &lt;a href=&quot;https://amzn.eu/d/f4ieG4X&quot;&gt;this book&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Let&apos;s go through a scenario to get a glimpse of the workflow.
It&apos;s Sunday, you read this blog post, and decided to act on it.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Write the top 3-5 big goals to achieve over the week.&lt;/li&gt;
&lt;li&gt;For each of the goals, split it into relevant tasks spread out through the week. You can skip to day X and write the relevant ToDos before reaching the day.&lt;/li&gt;
&lt;li&gt;Draw Monday&apos;s schedule in details, based on your hobbies, work schedule, and personal events. Add relevant tasks to complete the weekly goals.&lt;/li&gt;
&lt;li&gt;Each day, at night, go through the tasks of the day, re-schedule what is not done, and plan the next day by drawing the schedule in details, including the tasks from your ToDo app. Copy the daily notes to your digital app of choice (in my case a GitHub repo, everything written in Markdown).&lt;/li&gt;
&lt;li&gt;Next Sunday, do your weekly goals&apos; retrospective, as well as writing notes of what you learned from the previous week.&lt;/li&gt;
&lt;li&gt;Repeat steps 1 to 5 for the next week, incorportating what you learned about the dynamics of your days and what works for you.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;More planning usually happens at the start of each year + each quarter, as well as needed retrospectives, but they usually follow similar approaches to how weeks are planned, just on a bigger scope.&lt;/p&gt;
&lt;p&gt;You want to improve? You need to understand your current level to realize how you can be pushed to/above your limits. This is what my workflow is about, and how I keep refining it.&lt;/p&gt;
&lt;h2&gt;Final Thoughts&lt;/h2&gt;
&lt;p&gt;Did I add every single detail? Probably missed some of which I do very intuitively now. The goal of this post is not only the resulting workflow, but the path taken to reach the final result.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-important&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;The whole point of showing the path from where I was to where I ended up is to prove once more that you can figure things out. My 2 golden questions in life: How hard can it be? What could possibly go wrong? push me to take action sooner rather than later.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;You don&apos;t need to wait for the perfect timing, book, course, or mentor to teach you anything.
Just start tackling your problems with what you have now.
Whatever new insights you can learn along the way will enrich your current approach.&lt;/p&gt;
&lt;p&gt;Is this the final best possible version of planning my life? Surely not.
Does every week look the same? Also not.
Should I feel depressed knowing that I will never reach a perfect strategy? This assumes there is a perfect strategy.
By the time you read it, I may have modified my approach. The point is to adapt and focus on improving, never reaching a stale state.&lt;/p&gt;
&lt;p&gt;Different people will have different preferences on how to manage their time and life. There is no one-solution-fit-all approach. Take away what you need from every reference you consume and build your own personalized approach.&lt;/p&gt;
</content:encoded></item><item><title>Understand Python Environment management through a hiking trip.</title><link>https://blog.jeremarc.com/posts/python-env/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/python-env/</guid><description>Let&apos;s learn about Python Environments as an adventure, shall we?</description><pubDate>Mon, 20 Feb 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;import { Image } from &apos;astro:assets&apos;;
import theImportantField from &apos;../assets/python-env/the_important_field.png&apos;;
import textual from &apos;../assets/python-env/textual.png&apos;;
import sandwich from &apos;../assets/python-env/sandwich.png&apos;;
import multiplePythonVersions from &apos;../assets/python-env/multiple-python-versions.png&apos;;
import pythonEnvironment from &apos;../assets/python-env/python_environment_2x.png&apos;;
import realProgrammers from &apos;../assets/python-env/real_programmers.png&apos;;&lt;/p&gt;
&lt;p&gt;Let&apos;s learn about Python Environments as an &lt;em&gt;adventure&lt;/em&gt;, shall we?&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;You can find a lightning talk version of this blog post given at PyData London 2022 &lt;a href=&quot;https://youtu.be/NtypFPaMGD0?list=PLGVZCDnMOq0qT0MXnci7VBSF-U-0WaQ-w&amp;amp;t=1666&quot;&gt;here&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;You like going on adventures.&lt;/p&gt;
&lt;h3&gt;An Adventurer&apos;s Life&lt;/h3&gt;
&lt;p&gt;For every adventure you need different kinds of tools.
Every trip, it takes you hours to correctly prepare your backpack.
Later on you decide to buy one backpack per type of adventure.
A backpack for hikes, another one for rock climbing, and a third one for canoeing.
You soon find out how easy it is to only care about planning the adventure itself when your tools are ready.
One day you find yourself interested in kayaking, camping, mountaineering, and skydiving, which made managing too many backpacks a hassle.
You then decide to hire someone to take care of preparing your backpacks and tools for each trip.
You tell them what tools you need for your trip, they prepare the backpack and tools needed, and you care about planning your adventure.  Some special tools can be found in (few) places, so you try to specify where to buy them from (we don&apos;t want our assistant to search all possible shops!).
This sounds more manageable, scalable with your neverending interests, and easily maintainable.
What a beautiful relaxing adventurer life!&lt;/p&gt;
&lt;p&gt;You may say&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Wait, what on Earth does is have to do with Python Environments?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;A Programmer&apos;s Life&lt;/h3&gt;
&lt;p&gt;Well, Python programmers (and programmers in general) face very similar problems.
They start by (maybe) being interested in Statistics, Graphical User Interfaces (GUI), and some REST APIs.
Every one of which needs different libraries [&lt;strong&gt;tools&lt;/strong&gt;] to get the job done.
Installing [&lt;strong&gt;packing&lt;/strong&gt;] all those libraries [&lt;strong&gt;tools&lt;/strong&gt;] on your system and carrying all of them around for every project [&lt;strong&gt;adventure&lt;/strong&gt;] could be confusing.  What if this Statistics project only works with the old &lt;em&gt;awesome-lib version &lt;strong&gt;2&lt;/strong&gt;&lt;/em&gt;, but the new REST APIs project needs the newer &lt;em&gt;awesome-lib version &lt;strong&gt;3&lt;/strong&gt;&lt;/em&gt;?  What if I need to run my Statistics project somewhere else, do I install &lt;em&gt;&lt;strong&gt;all&lt;/strong&gt;&lt;/em&gt; libraries [tools] I ever used for all of my projects?  If not, how can I find out which tools are for which project?&lt;/p&gt;
&lt;p&gt;Luckily there&apos;s a solution.&lt;/p&gt;
&lt;p&gt;You may ask&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Can we just hire someone to prepare my &quot;backpack&quot; for every project?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The answer is yes!
You can hire &lt;strong&gt;conda&lt;/strong&gt;, &lt;strong&gt;pipenv&lt;/strong&gt;, &lt;strong&gt;poetry&lt;/strong&gt;, &lt;strong&gt;virtualenv&lt;/strong&gt; and that&apos;s their job!  Best part?  They do it for free and you can specify different locations to get your special tools (libraries) from.&lt;/p&gt;
&lt;p&gt;You can even hire someone like &lt;strong&gt;pyenv&lt;/strong&gt; to buy the backpacks you need.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Those are possible to be done for free thanks to amazing communities and open source contributors spending time and money to make it happen.  Always consider contributing back to the community with your time, money, helping others, or any way that fits you.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h2&gt;The Analogy&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Adventurer&lt;/th&gt;
&lt;th&gt;Python Programmer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Trip&lt;/td&gt;
&lt;td&gt;Project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backpack&lt;/td&gt;
&lt;td&gt;Python Environment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backpack Type&lt;/td&gt;
&lt;td&gt;Python Version&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tools&lt;/td&gt;
&lt;td&gt;Python Libraries&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Assistant&lt;/td&gt;
&lt;td&gt;Python Env and Package Manager&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tools Shop&lt;/td&gt;
&lt;td&gt;Repositories&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Now how does it work in practice?
Do you need to learn about all of them?
What do they have in common?
How can they pack my backpack?
How to use and manage this backpack?&lt;/p&gt;
&lt;p&gt;This blog post will walk you through how to prepare and manage your backpack for a small dummy project.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;How hard can it be?&lt;/h2&gt;
&lt;p&gt;Let&apos;s get back to our Analogy&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Adventurer&lt;/th&gt;
&lt;th&gt;Python Programmer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Have a Trip goal&lt;/td&gt;
&lt;td&gt;Have a Project type&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prepare a new empty backpack&lt;/td&gt;
&lt;td&gt;Create a new empty Python Environment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Decide on the tools needed for the specified trip&lt;/td&gt;
&lt;td&gt;Decide on the libraries needed for this project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;List down the shops from which the tools will be bought&lt;/td&gt;
&lt;td&gt;List down repositories to download libraries from&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hire an assistant for the job&lt;/td&gt;
&lt;td&gt;Install a Python Environment and Package Manager&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;The One Backpack Approach&lt;/h2&gt;
&lt;p&gt;If you were to use one backpack for all your trips, the only thing you need to care about is preparing your tools.&lt;/p&gt;
&lt;p&gt;Let&apos;s start with this scenario, and then move on to learning about preparing multiples backpacks.&lt;/p&gt;
&lt;p&gt;In Python, we have a standard way of installing packages (libraries) using a tool called &lt;code&gt;pip&lt;/code&gt;.
&lt;code&gt;pip&lt;/code&gt; is a &lt;a href=&quot;https://en.wikipedia.org/wiki/Recursive_acronym&quot;&gt;recursive acronym&lt;/a&gt; and stands for &lt;code&gt;p&lt;/code&gt;ip &lt;code&gt;i&lt;/code&gt;nstalls &lt;code&gt;p&lt;/code&gt;ackages.
Sometimes &lt;code&gt;pip&lt;/code&gt; does not come with Python, so we have to install it ourselves.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-warning&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Whenever you need to install anything, check if you have it first.
After installation, check if it was correctly installed.
Developers, more often than not, skip the &lt;em&gt;&apos;checking&apos;&lt;/em&gt; phase and only follow tutorials blindly then spend their time debugging bugs they could have avoided by simple sanity checks!&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Just make sure to double check the &lt;strong&gt;correct things&lt;/strong&gt;...&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={theImportantField} alt=&quot;The important field&quot; /&amp;gt;&lt;/p&gt;
&lt;h3&gt;Finding Python&lt;/h3&gt;
&lt;p&gt;On Mac and Linux, you usually have two Python distributions already installed on your system: &lt;strong&gt;Python 2&lt;/strong&gt; and &lt;strong&gt;Python 3&lt;/strong&gt; (Although Python2 &lt;a href=&quot;https://www.python.org/doc/sunset-python-2/&quot;&gt;reached end of life&lt;/a&gt; and won&apos;t ship with newer OS versions anymore).
Those specific Python distributions are &lt;strong&gt;used by internal components in the Operating System&lt;/strong&gt; (macOS and Ubuntu), which makes them less favorable to be messed up with for other projects.
&lt;strong&gt;Let us leave them in peace&lt;/strong&gt;, and use our own different Python distributions for development, so we don&apos;t mess up anything being used by our system.&lt;/p&gt;
&lt;p&gt;You can check your current versions of Python2 and Python3&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python --version
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Output&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Python 2.7.17
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;By default, &lt;code&gt;python&lt;/code&gt; is linked to Python 2 on your system.  For Python 3, you will use very similar commands to Python 2, but adding the &lt;code&gt;3&lt;/code&gt; to it: &lt;code&gt;python3&lt;/code&gt;.  Newer systems however have &lt;code&gt;python&lt;/code&gt; linked to Python 3, so just make sure to check.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python3 --version
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Output&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Python 3.6.9
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;What if we install our own Python 3.6.9, how can I know if I am using the default one on the system or my own?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre&gt;&lt;code&gt;which python3.6
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Will return the path to the binary executed when running &lt;code&gt;python3.6&lt;/code&gt;, in our case:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/usr/bin/python3.6
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;You can safely consider that anything under &lt;code&gt;/usr/bin&lt;/code&gt; is used by your system by default and should not be messed up with.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;For the rest of this tutorial, we will be using Python 3.11.
&lt;a href=&quot;https://www.python.org/doc/sunset-python-2/&quot;&gt;Python 2 reached end of life on January 1st 2020&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If we don&apos;t want to use the system python, how can we install our own?&lt;/p&gt;
&lt;h3&gt;A New Backpack&lt;/h3&gt;
&lt;p&gt;There are several ways to install a new Python version alongside the others:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install it directly on the system.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;pyenv&lt;/code&gt; to manage python installations on your system.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;conda&lt;/code&gt; to install relevant python version on environment creation.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If we go for &lt;code&gt;Option 1&lt;/code&gt;, we can technically install any Python version either from pre-built binaries or from source.  Either ways will end up with the system having multiple python versions installed with no single point to manage all of them.&lt;/p&gt;
&lt;p&gt;If we go for &lt;code&gt;Option 2&lt;/code&gt;, &lt;a href=&quot;https://github.com/pyenv/pyenv&quot;&gt;pyenv&lt;/a&gt; will manage multiple Python Versions on your system and save you the hassle of the manual work.&lt;/p&gt;
&lt;p&gt;If we go for &lt;code&gt;Option 3&lt;/code&gt;, we will hand everything to &lt;code&gt;conda&lt;/code&gt; from python version management to environment management.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Option 2&lt;/code&gt; looks like &lt;code&gt;Option 1&lt;/code&gt; but without the hassle.
&lt;code&gt;Option 3&lt;/code&gt; looks easier than &lt;code&gt;Option 2&lt;/code&gt; and will be left as an exercise to the reader.&lt;/p&gt;
&lt;h4&gt;Using PyEnv&lt;/h4&gt;
&lt;p&gt;Quoting the authors of the library:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;pyenv lets you easily switch between multiple versions of Python. It&apos;s simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We said that, by default on Ubuntu 18.04, we had Python 2.7.7 and Python 3.6.9 installed.
We also said that we will proceed with Python 3.11 for Textual.
How can we download/setup/install/whatever has to happen to have Python3.11 ready using pyenv?&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-important&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Please follow the &lt;a href=&quot;https://github.com/pyenv/pyenv#installation&quot;&gt;Installation Instructions&lt;/a&gt; before proceeding.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PyEnv Concepts&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Global Python Version&lt;/em&gt;: The default version we want our system to be using at all times.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Local Python Version&lt;/em&gt;: A specific Python version we want to be used when we invoke &lt;code&gt;python&lt;/code&gt; in a specific directory.&lt;/li&gt;
&lt;li&gt;Python Installation: A specific python version installed in the root directory of &lt;code&gt;pyenv&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We need &lt;code&gt;Python3.11&lt;/code&gt;, so we will install it on our system using pyenv&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pyenv install 3.11
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will install the latest available version of &lt;code&gt;3.11&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.11.1.tar.xz...
-&amp;gt; https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tar.xz
Installing Python-3.11.1...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.11.1 to /Users/jeanmarcalkazzi/.pyenv/versions/3.11.1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will download and install Python-3.11.1 on the system.
To make sure it worked:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;pyenv versions
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;* system
  3.6.9
  3.9.4
  3.11.1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We see that &lt;code&gt;3.11.1&lt;/code&gt; is listed in the available versions.
Being listed is one thing, and being usable is another.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;As far as Pyenv is concerned, version names are simply directories under $(pyenv root)/versions.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which means that our python executable should be under &lt;code&gt;$(pyenv root)/versions&lt;/code&gt; and will invoke the Python Interpreter.&lt;/p&gt;
&lt;p&gt;Input&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$(pyenv root)/versions/3.11.1/bin/python
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Output&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Python 3.11.1 (main, Feb 20 2023, 22:23:32) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&amp;gt;&amp;gt;&amp;gt; print(&quot;Well, I guess it works&quot;)
Well, I guess it works
&amp;gt;&amp;gt;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now that we have our backpack, we need to get the tools.&lt;/p&gt;
&lt;p&gt;Let&apos;s try to install numpy&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python3.11 -m pip install numpy
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-important&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Why use &lt;code&gt;python3.11 -m pip install X&lt;/code&gt; instead of just &lt;code&gt;pip install X&lt;/code&gt;?
First option will ensure that we are putting the right tool in the right backpack, in our case, 3.11.  For more details check out &lt;a href=&quot;https://snarky.ca/deconstructing-xkcd-com-1987/&quot;&gt;this great post&lt;/a&gt; by Brett Cannon who is a Python Core Developer and amazing writer!&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Now we have &lt;code&gt;numpy-1.24.2&lt;/code&gt; installed in the pyenv&apos;s &lt;code&gt;python3.11.1&lt;/code&gt; installation.
This is great, until you have another project which also uses &lt;code&gt;python3.11.1&lt;/code&gt; but needs an &lt;strong&gt;older version&lt;/strong&gt; of numpy.  How can you achieve that?  Having only &lt;em&gt;one backpack&lt;/em&gt; won&apos;t help, and given that the backpack is virtual here and we can have as many copy as we need, why not use it as a blueprint and just clone it for each new project with such a needed version?&lt;/p&gt;
&lt;h2&gt;The Multi-Backpack Approach&lt;/h2&gt;
&lt;p&gt;Our goal is to manage different Python environments for different projects.
A Python environment is just a separate Python backpack on your system where you will install any library you need.
To do so, we will:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hire a Python Environment Manager&lt;/li&gt;
&lt;li&gt;Ask it to create a new environment&lt;/li&gt;
&lt;li&gt;Tell it about the libraries we will need to use in this environment&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once our backpack (environment) and tools (libraries) are ready for our next adventure, we will start using them.&lt;/p&gt;
&lt;p&gt;So what we need is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A Python Environment Manager to use.&lt;/li&gt;
&lt;li&gt;Creating a new Python Environment (Backpack) based on the versions we are managing (with tools like &lt;code&gt;pyenv&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Have a list of tools (libraries) to prepare for the adventure.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One possible env manager is &lt;code&gt;poetry&lt;/code&gt;.  You may find a lot more, and by the time you read this post you could have multiple other tools released, but just focus on what you need to be done, then choose a tool which can do it for you.&lt;/p&gt;
&lt;h3&gt;The Trip Goal&lt;/h3&gt;
&lt;p&gt;We want to create a small project to test out an amazing new library called &lt;a href=&quot;https://github.com/willmcgugan/textual&quot;&gt;Textual&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I mean, just look at what it can do!&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={textual} alt=&quot;Textual demo output&quot; /&amp;gt;&lt;/p&gt;
&lt;h3&gt;Preparing a new Backpack&lt;/h3&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-warning&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;At the time of writing, the below commands are up to date.
Those could change and things could break, so take away the essence of what needs to be done, and execute it given the new version of the tools you choose!&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;To prepare your new empty Python Environment, you need to know which &lt;strong&gt;Python version&lt;/strong&gt; is &lt;strong&gt;required by your library&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Checking &lt;a href=&quot;https://github.com/willmcgugan/textual&quot;&gt;Textual&lt;/a&gt;&apos;s GitHub Repo, we find&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Textual runs on Linux, macOS, and Windows. Textual requires Python 3.7 or above.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We will go for Python 3.11 in this case.
Given this Python version, what to do with it?&lt;/p&gt;
&lt;p&gt;We previously mentioned:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;A Python Environment Manager to use.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;So we will follow the &lt;a href=&quot;https://python-poetry.org/docs/#installing-with-the-official-installer&quot;&gt;docs&lt;/a&gt; to install it first.&lt;/p&gt;
&lt;p&gt;Running&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;poetry --version
Poetry (version 1.3.2)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Shows that the installation was successful.&lt;/p&gt;
&lt;p&gt;Now we create a new &quot;backpack&quot; by running&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;poetry new textual-demo
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Switching to the newly created directly, we find the following structure&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.
├── README.md
├── pyproject.toml
├── tests
│   └── __init__.py
└── textual_demo
    └── __init__.py

3 directories, 4 files
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We also mentioned&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Creating a new Python Environment (Backpack) based on the versions we are managing (with tools like &lt;code&gt;pyenv&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;To ensure that the python version you need is used, run the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;poetry env use $(pyenv root)/versions/3.11.1/bin/python
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Using virtualenv: /Users/jeanmarcalkazzi/Library/Caches/pypoetry/virtualenvs/textual-demo-WRrLXqmL-py3.11
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will make sure that the version installed by &lt;code&gt;pyenv&lt;/code&gt; previously is cloned into its own directory for this project.&lt;/p&gt;
&lt;p&gt;You can check that by opening the &lt;code&gt;pyproject.toml&lt;/code&gt; file and checking&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python=&quot;^3.11.1&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We still have the last point in our list&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Have a list of tools (libraries) to prepare for the adventure.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is the important one, deciding on what will be installed specifically for this project&apos;s python version which was cloned into its own directory.&lt;/p&gt;
&lt;p&gt;Given that we need textual, we run&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;poetry add textual
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Using version ^0.11.1 for textual

Updating dependencies
Resolving dependencies... (2.3s)

Writing lock file

Package operations: 25 installs, 0 updates, 0 removals

  • Installing six (1.16.0)
  • Installing markupsafe (2.1.2)
  • Installing mdurl (0.1.2)
  • Installing python-dateutil (2.8.2)
  • Installing pyyaml (6.0)
  • Installing click (8.1.3)
  • Installing ghp-import (2.1.0)
  • Installing jinja2 (3.1.2)
  • Installing markdown (3.3.7)
  • Installing markdown-it-py (2.1.0)
  • Installing mergedeep (1.3.4)
  • Installing packaging (23.0)
  • Installing pyyaml-env-tag (0.1)
  • Installing uc-micro-py (1.0.1)
  • Installing watchdog (2.2.1)
  • Installing linkify-it-py (1.0.3)
  • Installing mdit-py-plugins (0.3.4)
  • Installing mkdocs (1.4.2)
  • Installing pygments (2.14.0)
  • Installing zipp (3.14.0)
  • Installing importlib-metadata (4.13.0)
  • Installing mkdocs-exclude (1.0.2)
  • Installing rich (13.3.1)
  • Installing typing-extensions (4.5.0)
  • Installing textual (0.11.1)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After that, you should be able to use &lt;code&gt;textual&lt;/code&gt; in your own isolated environment, with a &lt;code&gt;pyproject.toml&lt;/code&gt; file describing the environment, making it reproducible and avoiding arguments like &lt;strong&gt;&quot;It works on my machine&quot;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Looking at the &lt;code&gt;pyproject.toml&lt;/code&gt; file, we can see the following&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[tool.poetry]
name = &quot;textual-demo&quot;
version = &quot;0.1.0&quot;
description = &quot;&quot;
authors = [&quot;Jean-Marc Alkazzi &amp;lt;...&amp;gt;&quot;]
readme = &quot;README.md&quot;
packages = [{include = &quot;textual_demo&quot;}]

[tool.poetry.dependencies]
python = &quot;^3.11.1&quot;
textual = &quot;^0.11.1&quot;


[build-system]
requires = [&quot;poetry-core&quot;]
build-backend = &quot;poetry.core.masonry.api&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-important&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Whenever you are faced with an adventure now, you know how to choose your backpack, how to buy your backpacks, how to manage them, how to clone them for each adventure, and how to get the tools you need without messing up the rest of your adventures!&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h3&gt;What could possibly go wrong?&lt;/h3&gt;
&lt;p&gt;sudo is short for &lt;code&gt;s&lt;/code&gt;uper &lt;code&gt;u&lt;/code&gt;ser do.  Which tells your system to do something with elevated priviledges.  Don&apos;t use this super power on everything by forcing your system to execute every command this way.  The only time you would need such power is to install system-related packages.  If you find yourself using &lt;code&gt;sudo&lt;/code&gt; to force every command to just run, you should probably take a deep breath.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={sandwich} alt=&quot;Sudo make me a sandwich&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;If you mess up your Python installations, you could get too many python versions on your system&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={multiplePythonVersions} alt=&quot;Multiple Python versions&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;Hiring multiple assistants to take care of all your backpacks, and ending up with 8 different &quot;hiking&quot; backpacks with different tools.  Now this will be a confusing situation.&lt;/p&gt;
&lt;p&gt;This xkcd post shows what we want to try with the above approach.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={pythonEnvironment} alt=&quot;XKCD Python Environment&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;One more tip, just make sure you don&apos;t go into the vim/emacs battle and end up using butterflies&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={realProgrammers} alt=&quot;XKCD Real Programmers&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;Just use the tools you like, as long as you are fulfilling the required behaviors.&lt;/p&gt;
&lt;p&gt;Until next adventure!&lt;/p&gt;
</content:encoded></item><item><title>Setting up your NVIDIA environment without suffering.</title><link>https://blog.jeremarc.com/posts/nvidia-env-setup/</link><guid isPermaLink="true">https://blog.jeremarc.com/posts/nvidia-env-setup/</guid><description>Reduce your suffering setting up your NVIDIA drivers on Linux.</description><pubDate>Sat, 19 Sep 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;import { Image } from &apos;astro:assets&apos;;
import unluckyBrian from &apos;../assets/nvidia-env-setup/unluckybrian-learn-pytorch.png&apos;;
import cudaToolkit from &apos;../assets/nvidia-env-setup/cuda-10.2-toolkit.png&apos;;
import cudaChoice from &apos;../assets/nvidia-env-setup/cuda-toolkit-choice.png&apos;;
import nvidiaSmi from &apos;../assets/nvidia-env-setup/nvidia-smi-102.png&apos;;
import nvsciError from &apos;../assets/nvidia-env-setup/nvsci-error.png&apos;;
import cudnn803 from &apos;../assets/nvidia-env-setup/cudnn803.png&apos;;
import tensorrt7Download from &apos;../assets/nvidia-env-setup/tensorrt7-download.png&apos;;
import tensorrtInstallCheck from &apos;../assets/nvidia-env-setup/tensorrt-install-check.png&apos;;&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Updated on 02.09.2022 due to a change of NVIDIA&apos;s public key.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Updated on 09.03.2021 to include warning about &apos;Secure Boot&apos;.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Updated on 02.02.2021 for ISAAC 2020.2&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h2&gt;Your NVIDIA Environment&lt;/h2&gt;
&lt;p&gt;Let&apos;s say you just heard about &lt;a href=&quot;https://developer.nvidia.com/isaac-sdk&quot;&gt;NVIDIA Isaac&lt;/a&gt; and you are excited to test it out.  You went to the &lt;a href=&quot;https://docs.nvidia.com/isaac/isaac/doc/setup.html&quot;&gt;setup documentation&lt;/a&gt; first and found:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To avoid potential issues caused by mismatching library versions, we recommend using CUDA 10.2, CUDNN 8.0.3, and TensorRT 7.1.3, which are the versions available in Jetpack.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is a very important step to take whenever you need to use any tool: check the recommended environment setup.  &lt;strong&gt;Do not assume that the latest version of everything is the go-to solution.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now we know that we need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CUDA 10.2&lt;/li&gt;
&lt;li&gt;cudNN 8.0.3&lt;/li&gt;
&lt;li&gt;TensorRT 7.1.3&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is for Isaac, but even for Deep Learning you would need to have CUDA, cudNN, and TensorRT.  We will explain why those tools are needed in this post.&lt;/p&gt;
&lt;p&gt;The setup is done on an &lt;a href=&quot;https://de.msi.com/Laptop/GS66-Stealth-10SX&quot;&gt;MSI GS66 Stealth&lt;/a&gt; with an &lt;a href=&quot;https://www.notebookcheck.net/NVIDIA-GeForce-RTX-2070-Max-Q-Graphics-Card.386281.0.html&quot;&gt;NVIDIA RTX 2070&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The updated setup (ISAAC 2020.2) uses an MSI GS66 with an NVIDIA RTX 2080.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ubuntu 18.04&lt;/li&gt;
&lt;li&gt;A good internet connection (We will download ~5GB)&lt;/li&gt;
&lt;li&gt;Patience&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At some point in time, we were all like Brian.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={unluckyBrian} alt=&quot;Unlucky Brian - Learn PyTorch&quot; style=&quot;max-width: 50%;&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;This blog post will ease out the burden of setting up your environment and show you clear steps to take.
Let&apos;s dive directly into it.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-important&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Before going into copy pasting commands and hoping for things to work out, we need to understand why we are installing those &quot;tools&quot; on our system.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-warning&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Before proceeding, you may have to disable &apos;Secure Boot&apos; in your BIOS to avoid issues with installed drivers.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h3&gt;CUDA&lt;/h3&gt;
&lt;h4&gt;What is CUDA&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;&quot;CUDA is a parallel computing platform and programming model that makes using a GPU for general purpose computing simple and elegant.&quot; -&lt;a href=&quot;https://blogs.nvidia.com/blog/2012/09/10/what-is-cuda-2/&quot;&gt;NVIDIA Blog&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What does that even mean?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It means that having CUDA on your PC will allow you to &lt;strong&gt;use the CUDA extensions and libraries&lt;/strong&gt; (which is part of the CUDA toolkit) for the programming language you are using (ex: C++), &lt;strong&gt;to specify which parts of your code should be parallelized and how&lt;/strong&gt;.  This parallelization is possible thanks to the GPU&apos;s architecture.  You can check out &lt;a href=&quot;https://www.youtube.com/watch?v=-P28LKWTzrI&quot;&gt;this fun experiment&lt;/a&gt; by Mythbusters painting the Mona Lisa in milliseconds in a &quot;GPU way&quot;.&lt;/p&gt;
&lt;p&gt;If, in our case, we need CUDA to take advantage of this parallelization on the GPU, &lt;strong&gt;why not any other parallel computing platform&lt;/strong&gt;?  CUDA is the &lt;strong&gt;official platform provided by NVIDIA&lt;/strong&gt; for NVIDIA GPUs and &lt;a href=&quot;https://developer.nvidia.com/language-solutions&quot;&gt;supports&lt;/a&gt; other low-level APIs like &lt;a href=&quot;https://www.khronos.org/opencl/&quot;&gt;OpenCL&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;Installation&lt;/h4&gt;
&lt;p&gt;In our case we need &lt;strong&gt;CUDA version 10.2&lt;/strong&gt;, but what if later on we want to use this same tutorial to install &lt;strong&gt;CUDA 11&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You should be able to find out where to get CUDA from&lt;/strong&gt; instead of copying commands which will work for the current needed versions.&lt;/p&gt;
&lt;p&gt;This blog will show you &lt;strong&gt;where to look&lt;/strong&gt; for the tools we will be installing.&lt;/p&gt;
&lt;p&gt;You can find &lt;strong&gt;all CUDA releases&lt;/strong&gt; by checking the &lt;a href=&quot;https://developer.nvidia.com/cuda-toolkit-archive&quot;&gt;CUDA Toolkit Archive&lt;/a&gt;
In our case, we click on the link for &lt;strong&gt;CUDA 10.2 (November 2019)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={cudaToolkit} alt=&quot;CUDA Toolkit Archive&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;We are redirected to a page where we can choose the OS, our PC&apos;s architecture, the OS distribution, OS version, and installer type.&lt;/p&gt;
&lt;p&gt;We will choose &lt;strong&gt;Linux&lt;/strong&gt;, &lt;strong&gt;x86_64&lt;/strong&gt;, &lt;strong&gt;Ubuntu, 18.04&lt;/strong&gt;, &lt;strong&gt;deb(network)&lt;/strong&gt; as shown in this image.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={cudaChoice} alt=&quot;Choosing CUDA 10.2 installer&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;deb&lt;/strong&gt; means &lt;a href=&quot;https://wiki.debian.org/deb&quot;&gt;debian package&lt;/a&gt;. &lt;a href=&quot;https://ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt; is built on top of &lt;a href=&quot;https://www.debian.org/&quot;&gt;Debian GNU/Linux&lt;/a&gt;.  A debian package is the installer file used by Debian Linux and all its derivatives (Including Ubuntu).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(network)&lt;/strong&gt; means that we will let the package download all additional data through the network (internet connection).  This explains why the file is ~3KB only.&lt;/p&gt;
&lt;p&gt;Run the following commands to download relevant files and start the installation&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;sudo add-apt-repository &quot;deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get update
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get install cuda-10.2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Notice that the last command includes the version we want to install &lt;strong&gt;10.2&lt;/strong&gt;.  If we were to install &lt;strong&gt;version 11.0&lt;/strong&gt; we would download the relevant files and on this last step install &lt;strong&gt;cuda-11.0&lt;/strong&gt;.  Choosing &lt;strong&gt;cuda-10.2&lt;/strong&gt; will download &lt;strong&gt;both the cuda-toolkit and the relevant drivers.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To point your system to where cuda is installed&lt;/strong&gt;, we will add the relevant &lt;strong&gt;environment variables&lt;/strong&gt; to the end of our &lt;strong&gt;.bashrc&lt;/strong&gt; file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Just as a good practice, &lt;strong&gt;reboot your PC&lt;/strong&gt; after installing/upgrading new drivers.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;h4&gt;Verify Installation&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;After rebooting&lt;/strong&gt;, we need to check that &lt;strong&gt;CUDA 10.2&lt;/strong&gt; was actually installed.
This is done by running &lt;strong&gt;nvcc -V&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nvcc -V
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We see that CUDA release 10.2 is installed, with an &lt;strong&gt;exact version V10.2.89&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-warning&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Having the installed packages/drivers is one thing, having usable installed packages/drivers is another.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;Usually the code samples are disregarded when installing new software.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I personally always download them for 2 main reasons:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Check that the installation&lt;/strong&gt; is successful by running the samples.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Learn&lt;/strong&gt; about multiple ways the &lt;strong&gt;library&lt;/strong&gt; can be used.  It helps in being a playground for the first experiments.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Samples are directly downloaded by following the previous steps.&lt;/p&gt;
&lt;p&gt;To compile and use them:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cp -r /usr/local/cuda/samples/ ~/cuda-10_samples
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;cd ~/cuda-10_samples
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;make
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Finished building CUDA samples
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You may get an error like the following:&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={nvsciError} alt=&quot;NvSCI build error&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;This can be &lt;a href=&quot;https://forums.developer.nvidia.com/t/where-is-nvscibuf-h/107802&quot;&gt;safely skipped&lt;/a&gt; by running:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;make -k
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is a know issue in CUDA 10.2 which was not yet solved.&lt;/p&gt;
&lt;p&gt;Once built, we try to run one of the examples:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd ~/cuda-10_samples/bin/x86_64/linux/release
./BlackScholes
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;...
Test passed
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If your tests also passed (hopefully), you can keep going.&lt;/p&gt;
&lt;p&gt;If the drivers are installed, the system &lt;strong&gt;should be able to see our GPUs&lt;/strong&gt;, right?&lt;/p&gt;
&lt;p&gt;We can call the &lt;strong&gt;NVIDIA System Management Interface (nvidia-smi)&lt;/strong&gt; to check for the available NVIDIA interfaces.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nvidia-smi
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;Image src={nvidiaSmi} alt=&quot;nvidia-smi output showing driver version and CUDA version&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;There is one weird info here.  We installed &lt;strong&gt;CUDA 10.2&lt;/strong&gt;, but nvidia-smi is showing &lt;strong&gt;CUDA 11.2&lt;/strong&gt;, why?&lt;/p&gt;
&lt;p&gt;Even when we check the installation location&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;jean-marc@MSI-GS66:~$ ll /usr/local/
total 44
drwxr-xr-x 11 root root 4096 Jan 29 15:21 ./
drwxr-xr-x 12 root root 4096 Jan 29 17:18 ../
drwxr-xr-x  2 root root 4096 Jan 29 17:24 bin/
lrwxrwxrwx  1 root root    9 Jan 29 15:21 cuda -&amp;gt; cuda-10.2/
drwxr-xr-x 16 root root 4096 Jan 29 14:30 cuda-10.2/
drwxr-xr-x  2 root root 4096 Aug  7 00:34 etc/
drwxr-xr-x  2 root root 4096 Aug  7 00:34 games/
drwxr-xr-x  2 root root 4096 Aug  7 00:34 include/
drwxr-xr-x  5 root root 4096 Jan 29 17:24 lib/
lrwxrwxrwx  1 root root    9 Nov 23 06:04 man -&amp;gt; share/man/
drwxr-xr-x  2 root root 4096 Aug  7 00:34 sbin/
drwxr-xr-x  7 root root 4096 Jan 29 17:19 share/
drwxr-xr-x  2 root root 4096 Aug  7 00:34 src/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We see that only &lt;strong&gt;cuda-10.2&lt;/strong&gt; is installed, and &lt;strong&gt;cuda&lt;/strong&gt; is a symlink (shortcut) for the cuda-10.2 folder.&lt;/p&gt;
&lt;p&gt;It turns out &lt;strong&gt;there is a difference&lt;/strong&gt; between the &lt;strong&gt;&quot;GPU CUDA&quot;&lt;/strong&gt; and the &lt;strong&gt;&quot;runtime CUDA&quot;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The CUDA driver API&lt;/strong&gt; is a low-level API.
&lt;strong&gt;The CUDA runtime API&lt;/strong&gt; is a higher-level API that is implemented on top of the CUDA driver API.&lt;/p&gt;
&lt;p&gt;You usually use the CUDA runtime API in your code.&lt;/p&gt;
&lt;p&gt;The CUDA driver API is installed during the installation of CUDA drivers.
The CUDA runtime API is installed during the installation of the CUDA Toolkit.&lt;/p&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;As long as your CUDA driver API has a version equal to or higher than the CUDA runtime API, you should be good to go with no expected conflicts.&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;You can check this &lt;a href=&quot;https://stackoverflow.com/questions/53422407/different-cuda-versions-shown-by-nvcc-and-nvidia-smi&quot;&gt;great answer on stackoverflow&lt;/a&gt; by &lt;a href=&quot;https://stackoverflow.com/users/1695960/robert-crovella&quot;&gt;Robert Crovella&lt;/a&gt;, an NVIDIA employee, explaining the difference.&lt;/p&gt;
&lt;p&gt;Some details can also be found &lt;a href=&quot;https://docs.nvidia.com/cuda/cuda-runtime-api/driver-vs-runtime-api.html&quot;&gt;in the CUDA docs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once CUDA Toolkit and CUDA Drivers are installed by following the previous steps, we can see our GPUs and the installation seems OK, &lt;strong&gt;we can move on to installaing cudNN&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;cudNN&lt;/h3&gt;
&lt;h4&gt;What is cudNN&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;&quot;The NVIDIA CUDA Deep Neural Network library (cuDNN) is a GPU-accelerated library of primitives for deep neural networks. cuDNN provides highly tuned implementations for standard routines such as forward and backward convolution, pooling, normalization, and activation layers.&quot; - &lt;a href=&quot;https://developer.nvidia.com/cudnn#:~:text=The%20NVIDIA%20CUDA%C2%AE%20Deep,%2C%20normalization%2C%20and%20activation%20layers.&quot;&gt;NVIDIA cudNN page&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This means that cudNN has &lt;strong&gt;highly optimized implementations for common operations&lt;/strong&gt; used in your applications.  We said that the CUDA runtime API can help you leverage GPU parallelization.  cudNN can help you use pre-defined functions which are already optimized and using the CUDA runtime API &lt;strong&gt;so you don&apos;t have to implement them from scratch&lt;/strong&gt;.&lt;/p&gt;
&lt;h4&gt;Installation&lt;/h4&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-note&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;You need an NVIDIA Developer account for this stage&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;As we did for CUDA, we will access the &lt;a href=&quot;https://developer.nvidia.com/rdp/cudnn-archive&quot;&gt;cudNN Archive&lt;/a&gt; to select the version we need.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={cudnn803} alt=&quot;cudNN 8.0.3 download page&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;We will download &lt;strong&gt;cudNN Library for Linux&lt;/strong&gt;, and the &lt;strong&gt;Code Samples&lt;/strong&gt; to test our installation.
The &lt;strong&gt;cudnn-runtime&lt;/strong&gt; and &lt;strong&gt;cudnn-dev&lt;/strong&gt; packages are also needed.&lt;/p&gt;
&lt;p&gt;Once the cudNN tar file and samples are downloaded, &lt;strong&gt;navigate to the download directory&lt;/strong&gt; and follow the subsequent steps:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To install cudNN:&lt;/strong&gt;
Unzip the cuDNN package. &lt;code&gt;x&lt;/code&gt; is just a placeholder, choose the correct file downloaded.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tar -xzvf cudnn-x.x-linux-x64-v8.x.x.x.tgz
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Copy the following files into the CUDA Toolkit directory, and change the file permissions.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo cp cuda/include/cudnn*.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Install the cudnn-runtime and cudnn-dev &lt;strong&gt;deb&lt;/strong&gt; packages&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo dpkg -i libcudnn8_8.0.3.33-1+cuda10.2_amd64.deb
sudo dpkg -i libcudnn8-dev_8.0.3.33-1+cuda10.2_amd64.deb
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;To install the samples:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo dpkg -i libcudnn8-samples_8.0.3.33-1+cuda10.2_amd64.deb
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Verify Installation&lt;/h4&gt;
&lt;p&gt;We can check the installed version of cudNN&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cat /usr/include/cudnn_version.h | grep CUDNN_MAJOR -A 2
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;#define CUDNN_MAJOR 8
#define CUDNN_MINOR 0
#define CUDNN_PATCHLEVEL 3
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

#endif /* CUDNN_VERSION_H */
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This shows that we have cudNN major version 8, minor version 0, patch version 3, which is the cudNN 8.0.3.&lt;/p&gt;
&lt;p&gt;To verify that cuDNN is installed and running properly, compile the &lt;strong&gt;mnistCUDNN sample&lt;/strong&gt; located in the &lt;code&gt;/usr/src/cudnn_samples_v8&lt;/code&gt; directory.&lt;/p&gt;
&lt;p&gt;Copy the cuDNN sample to a writable path.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cp -r /usr/src/cudnn_samples_v8/ $HOME
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Go to the writable path.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd  $HOME/cudnn_samples_v8/mnistCUDNN
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Compile the mnistCUDNN sample.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;make clean &amp;amp;&amp;amp; make
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Run the mnistCUDNN sample.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;./mnistCUDNN
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;...
Test passed!
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If cuDNN is properly installed and running on your Linux system, you will see a message similar to the following:
Test passed!&lt;/p&gt;
&lt;p&gt;With CUDA and cudNN installed, &lt;strong&gt;we still have TensorRT&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;TensorRT&lt;/h3&gt;
&lt;h4&gt;What is TensorRT&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;&quot;The core of NVIDIA TensorRT is a C++ library that facilitates high performance inference on NVIDIA graphics processing units (GPUs). TensorRT takes a trained network, which consists of a network definition and a set of trained parameters, and produces a highly optimized runtime engine which performs inference for that network.
TensorRT provides API&apos;s via C++ and Python that help to express deep learning models via the Network Definition API or load a pre-defined model via the parsers that allows TensorRT to optimize and run them on an NVIDIA GPU. TensorRT applies graph optimizations, layer fusion, among other optimizations, while also finding the fastest implementation of that model leveraging a diverse collection of highly optimized kernels. TensorRT also supplies a runtime that you can use to execute this network on all of NVIDIA&apos;s GPU&apos;s from the Kepler generation onwards.
TensorRT also includes optional high speed mixed precision capabilities introduced in the Tegra X1, and extended with the Pascal, Volta, and Turing architectures.&quot; -&lt;a href=&quot;https://docs.nvidia.com/deeplearning/tensorrt/archives/tensorrt-713/install-guide/index.html&quot;&gt;NVIDIA Docs&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What does that even mean?&lt;/p&gt;
&lt;p&gt;Well, this means that TensorRT &lt;strong&gt;helps inference of your trained neural networks be much faster&lt;/strong&gt;.  TensorRT will use &lt;strong&gt;highly optimized cudNN functions&lt;/strong&gt; with some &lt;strong&gt;additional tricks&lt;/strong&gt; given your network, to allow a faster inference on NVIDIA GPUs &lt;strong&gt;while also using Tensor cores&lt;/strong&gt;.&lt;/p&gt;
&lt;h4&gt;Installation&lt;/h4&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-warning&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;You need an NVIDIA Developer account for this stage&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;We can choose the TensorRT version we need by following &lt;a href=&quot;https://developer.nvidia.com/nvidia-tensorrt-download&quot;&gt;this link&lt;/a&gt;, in our case &lt;strong&gt;TensorRT 7&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Then we choose the correct TensorRT version for our &lt;strong&gt;CUDA version 10.2&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={tensorrt7Download} alt=&quot;TensorRT 7 for CUDA 10.2&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To install TensorRT:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo dpkg -i nv-tensorrt-repo-ubuntu1x04-cudax.x-trt7.x.x.x-ga-yyyymmdd_1-1_amd64.deb
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-key add /var/nv-tensorrt-repo-cudax.x-trt7.x.x.x-ga-yyyymmdd/7fa2af80.pub
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get update
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get install tensorrt
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We will consider that you may use TensorRT from python2.7 and python3, just in case you face applications still using older versions of Python.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To install additional packages:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For Python2.7&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get install python-libnvinfer-dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For Python3&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get install python3-libnvinfer-dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For additional TensorFlow support&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt-get install uff-converter-tf
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Verify Installation&lt;/h4&gt;
&lt;p&gt;We can check if the packages are correctly installed&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;dpkg -l | grep nvinfer
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Your output should be similar (not necessarly the same) as this&lt;/p&gt;
&lt;p&gt;&amp;lt;Image src={tensorrtInstallCheck} alt=&quot;Check TensorRT packages&quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;Let&apos;s run the TensorRT samples to make sure our installation is successful and usable.&lt;/p&gt;
&lt;p&gt;Copy the TensorRT sample to a writable path. (Missing this step would give you a permission error)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cp -r /usr/src/tensorrt/ $HOME/tensorrt-samples
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Go to the sampleMNIST example.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd  $HOME/tensorrt-samples/samples/sampleMNIST
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Compile it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;make
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Before running our MNIST example, let&apos;s download some data for inference.
The provided &lt;strong&gt;download_pgms.py&lt;/strong&gt; script uses &lt;strong&gt;python3&lt;/strong&gt; and the libraries &lt;strong&gt;pillow&lt;/strong&gt; and &lt;strong&gt;numpy&lt;/strong&gt;
First we install the libraries and needed tools.&lt;/p&gt;
&lt;p&gt;To install python packages, you need &lt;a href=&quot;https://github.com/pypa/pip&quot;&gt;Package Installer for Python&lt;/a&gt; (pip) to be installed.
To install pip for python3&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt install python3-pip python3-dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To install the packages using pip&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python3 -m pip install numpy pillow
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We need to install &lt;a href=&quot;https://curl.haxx.se/&quot;&gt;&lt;strong&gt;curl&lt;/strong&gt;&lt;/a&gt;, a very powerful tool to transfer data using various network protocols, to download the sample dataset.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt install curl
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Second, we download and extract the data needed from &lt;a href=&quot;http://yann.lecun.com/exdb/mnist/&quot;&gt;Yann LeCun&apos;s website&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd $HOME/tensorrt-samples/data/mnist
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;curl http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz -o train-images-idx3-ubyte.gz
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;gunzip train-images-idx3-ubyte.gz
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;curl http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz -o train-labels-idx1-ubyte.gz
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;gunzip train-labels-idx1-ubyte.gz
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Third, we run the data download script&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python3 download_pgms.py
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Finally, we run the MNIST sample.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd $HOME/tensorrt-samples/bin &amp;amp;&amp;amp; ./sample_mnist
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&amp;amp;&amp;amp;&amp;amp;&amp;amp; RUNNING TensorRT.sample_mnist # ./sample_mnist
[08/21/2020-10:51:14] [I] Building and running a GPU inference engine for MNIST
[08/21/2020-10:51:15] [I] [TRT] Detected 1 inputs and 1 output network tensors.
[08/21/2020-10:51:15] [I] Input:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@#=.  +*=#@@@@@@@
@@@@@@@@@@@*   :.   -@@@@@@@
@@@@@@@@@@#  :#@@:  +@@@@@@@
@@@@@@@@@*  :@@@*  .@@@@@@@@
@@@@@@@@=  =@@@@.  *@@@@@@@@
@@@@@@@=  -@@@@*  =@@@@@@@@@
@@@@@@@  -@@@%:  -@@@@@@@@@@
@@@@@@%  %%+:    *@@@@@@@@@@
@@@@@@@      ..  @@@@@@@@@@@
@@@@@@@#  .=%%: =@@@@@@@@@@@
@@@@@@@@@@@@@#  +@@@@@@@@@@@
@@@@@@@@@@@@@#  @@@@@@@@@@@@
@@@@@@@@@@@@@@  @@@@@@@@@@@@
@@@@@@@@@@@@@#  @@@@@@@@@@@@
@@@@@@@@@@@@@+  @@@@@@@@@@@@
@@@@@@@@@@@@@%  @@@@@@@@@@@@
@@@@@@@@@@@@@@. #@@@@@@@@@@@
@@@@@@@@@@@@@@* :%@@@@@@@@@@
@@@@@@@@@@@@@@@: -@@@@@@@@@@
@@@@@@@@@@@@@@@@= %@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@

[08/21/2020-10:51:15] [I] Output:
0:
1:
2:
3:
4:
5:
6:
7:
8:
9: **********

&amp;amp;&amp;amp;&amp;amp;&amp;amp; PASSED TensorRT.sample_mnist # ./sample_mnist
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It is alive!  Given a picture of a 9, we were able to predict that it is the actual digit 9 (** next to the 9).
&lt;strong&gt;You may have different numbers&lt;/strong&gt;, the &lt;strong&gt;important part is seeing &quot;PASSED&quot;&lt;/strong&gt; with a similar output to this one.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Congratulations!  Your system is now ready to be used for many applications which leverage your NVIDIA GPU.
If you are interested in CUDA, cudNN, and TensorRT, you have the samples ready to use!&lt;/p&gt;
&lt;h3&gt;References&lt;/h3&gt;
&lt;p&gt;&amp;lt;div class=&quot;callout callout-important&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Make sure to check the version of the documentation.  Sometimes it points to the latest version only and it may not be compatible with the version you need!&lt;/p&gt;
&lt;p&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html&quot;&gt;NVIDIA CUDA Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html&quot;&gt;NVIDIA cudNN Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html&quot;&gt;NVIDIA TensorRT Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content:encoded></item></channel></rss>