Latest Posts
-
Book of the Week: The Alchemist
I never heard of The Alchemist, but my coworker was reading it, so I thought I’d also give it a read. The Alchemist was originally published in Brazil and subsequently translated from Portuguese into English. It is hard to write about this book without revealing spoilers. It is short enough that you can read it in a sitting or two. Personal Legend The book is about pursuing your Personal Legend, what you have always wanted to accomplish. -
Book of the Week: Modern Romance
This week I read Modern Romance by Aziz Ansari, the comedian, with Eric Klinenberg, the sociologist. In the past people married people who were local to them through arranged marriages. Times have changed with the smartphone age, which leaves current singles puzzled trying to figure out what the heck is going on. People are left to navigate two worlds: the real world and the phone world. -
Book of the Week: How to Make Mistakes in Python
After you’ve learned a new programming language, it is important that you get caught up with best practices. This week, I read How to Make Mistakes in Python, because it was free. Most of the content you can read online, but it is nice to have a starting point in once place. The book is written from the point of view of a python web developer. Quick read and good reminder. Environment I can sometimes be difficult to know where each package is installed and the environment matching between your development environment and production environment. You can use virtualenv to setup a self-contained environment to install your python packages. As you development, you tend to collect packages. Jupyter and ipython provide a better REPL than the standard python REPL. You should use them to be more productive. Tab completing is very nice. Best Practices Optimize and check for errors with pylint. Follow a style guide such as pep8 or Google’s python style guide. Add logging. Use nose to run unittest. I also like doctest. Tips Try using strategy pattern instead of if else blocks. Don’t put list as default argument unless you know what you’re doing, because that list will be persistent through all the function calls. You’re not going to get an empty list every time you call the function. [sourcecode language=”python” wraplines=”false” collapse=”false”] def bad(arg=[]): pass def good(arg=None): if not arg: arg = [] [/sourcecode]
-
Book of the Week: Simple Rules
I didn’t really like Simple Rules. One thing that bugged me was when the authors said simple rules outperform complex models, because of overfitting problems. Anybody who builds complex models for a living, should know how to handle overfitting. That’s a bad argument to make. Machine learning algorithms outperform most heuristics now. The book is fairly recent, so some of the things it references feels like it happened yesterday. I tend to think of simple rules are for people who don’t understand what’s happening. In chemistry they teach you rules about how bonds work, but you always encounter exceptions that run contrary to your rules. If you knew quantum physics, you would know why certain things happen contrary to the rules. It’s probably not worth the time to teach all chemistry students quantum mechanics, so you give them a simple rule to follow, which is good enough to get them through med school. Complex Problems Warren Weaver, a director at the Rockefeller Foundation described science progressing through three types of problems: simple, uncertain and complex. For those familiar with material science, you can think of it as the microscopic (simple), macroscopic (uncertain) and mesoscopic (complex). The microscope deals with understanding individual particles. The macroscopic deals with distributions and collective probabilistic behavior. The mesoscopic deals with the middle ground, where theories from the other two don’t work well. Most of my academic research is in the complex region, because the other two are solved problems. Physics can describe a single hydrogen atom well. We can also calculate the properties of a periodic material. What we can’t do well is describe what happens when you have an atom next to an infinite structure. This taxes the limits of current computers. Simple rules are designed to handle the complex problems. Simple Rules Simple rules do 3 things well. -
The 4 Types of Software Developers
A machine learning expert remarked that they are 4 types of software developers and proceeded to describe them all. Here is my fuzzy recollection of the conversation.
-
Book of the Week: An Astronaut's Guide to Life on Earth
This week, I read retired Canadian astronaut Chris Hadfield’s An Astronaut’s Guide to Life on Earth: What Going to Space Taught Me About Ingenuity, Determination and Being Prepared for Anything. You may recognize Chris from his public outreach efforts when he was on the International Space Station (ISS). If you ever wanted to know how it feels like to be an astronaut (enemas before launch), this book is for you. I’ve read plenty of books about success and happiness, but Chris Hadfield is a person who has lived it. He speaks from personal experience instead of scientific studies. Somehow it seems more real coming from him. Space Oddity Music Video [youtube https://www.youtube.com/watch?v=KaOC9danxNo&w;=560&h;=315] Space Burrito with Chef Traci Des Jardins w/ The MythBusters [youtube https://www.youtube.com/watch?v=f8-UKqGZ_hs&w;=560&h;=315] Astronaut -
Book of the Week: Succeed
Succeed is about how people can reach their goals. The book goes over goals in the context of relationships, parenting, business, health and sports. It breaks down different aspects of goals to compare and contrast them. But the answer to which direction you should lean to is unclear, because it always depends on the situation. This isn’t that helpful if you’re looking for some rule of thumb to follow. The book has bits and pieces, but other books have gone more in depth into each topic. I think this book is probably more accessible if you want to dip your toes into goals and happiness. If you want to be effective, you need to set specific difficult, but realistic goals. Effort versus Talent -
Book of the Week: Misbehaving
I’m reading Misbehaving: The Making of Behavioral Economics this week, because Thaler is a buddy of Robert Schiller, the author of Irrational Exuberance. The book is a chronological journal of Thaler’s adventures in behavioral economics. The book doesn’t linger too long on a subject. It feels like you’re taking a nice stroll with a friend. Supposedly Irrelevant Factors Thaler abbreviates supposedly irrelevant factors as SIFs throughout the book. Traditional economist based their work on the assumption that there is type of person who behaves completely rational,homo economicus. They call this person an Econ for short. SIFs are things that are not supposed to affect decisions an Econ would make. This book is about all of those SIFs and how they do affect how real people make decisions. Real people don’t behave like Econs. The Endowment Effect People value things they already have more than things they could have. This leads to irrational decisions. AcquisitionUtility vs TransactionUtility Acquisition utility is the traditional utility gained minus the opportunity cost. Transactional utility is the perceived quality of the deal, which is is different between price paid and a reference price. It something looks like it is on sale, it will provide utility in addition to the acquisition utility. This leads to people buying stuff they don’t need, because it is on sale. Sunk Cost Money you already spent shouldn’t affect your future decisions. Your gym membership and Amazon Prime membership are sunk costs. They should not factor into whether or not you should go to the gym or buy stuff from Amazon. House Money Effect -
Book of the Week: Mindset
Mindset: The New Psychology of Success by Carol Dweck talks about how there are two mindsets, the fixed mindset and the growth mindset. These mindsets tint how people perceive the world in all aspects of life leading to success or failure in their endeavors. I’ve read about a study saying that you should praise kids for effort rather than being intelligent if you want them to succeed in life. Carol Dweck did that study. The book describes how the growth mindset is better than a fixed mindset and how these differences play out in business, relationships, sports, school, etc. The fixed mindset resulted in Enron. Fixed Mindset versus Growth Mindset
This graphic (available for purchase) by Nigel Holmes provides a good summary. The Praised Generation -
Book of the Week: Elon Musk
This week I read Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future. I know most of the events and facts (divorce, asking friends for money, etc.) surrounding Elon since bought Tesla stock (TSLA), but this book fills in a little bit more about the person. How his upbringing shaped his risk tolerance and his personality. If anybody makes me feel like I’m not doing enough with my life, it’s Elon Musk. Africa Some stuff happened that he won’t talk about. Also had a messed up childhood which toughened him up. Paypal -
Book of the Week: The Future For Investors
In Siegel’s previous book, Stocks for the Long Run, he laid out that nothing beats stocks in terms of long term returns. My problem with this is that past performance is not a guaranteed of future gains. There was a 30 year period where stocks did not have any real gains when adjusted for inflation. This book, The Future for Investors, is about which stocks you should buy. Indexes are okay, but Siegel’s analysis shows that you can do better. Growth ≠ Returns -
Book of the Week: The Effective Engineer
This week, I read Edmond Lau’s The Effective Engineer since one of my coworkers had a copy of the book and suggested I read it. It’s a book about how to be a more effective engineer. By giving me this book to read, my coworker is implying I’m not effective. What a jerk. As I read the book, I’ve noticed that the author references a lot of other books that I have read. If you’re in silicon valley, there is an implicit school of thought and body of knowledge that comes from books and practices being spread around. You don’t really get this by staying at a company. Edmond migrated around a few companies and interviewed a bunch of people to acquire this body of knowledge. This makes this book a good starting point for a new engineer coming into silicon valley, but seems kind of pedestrian to veterans. But it is still good to be reminded of best practices. If you don’t follow best practices, you wind up with something like burning $292 million for healthcare.gov. Although that also was due to consulting firms milking the government for money. Alternatively, you could have gotten a few unicorns from a venture fund with that money. Leverage The book is about leverage and creating as much value as you can as an engineer. Leverage = Impact Produced / Time Invested. You can increase value you product per unit time by: