A most useful algorithm

Recently I finished reading Elon Musk by Walter Isaacson . A definite must read for anybody who is even mildly interested in an extraordinary man . In my circles , he has lately been vilified ever since the takeover of Twitter now known as X .

In my opinion his work at Tesla and Spacex and even Neuralink is far more important for humanity and I sincerely doubt that anything that he pulls off at X can ever come close to the impact that he has with his other companies (though I am a firm believer in freedom of speech regardless of political beliefs).

The algorithm is as follows

Perhaps the most useful applicable knowledge that I took away was his algorithm that he uses at all of his companies . The more I think of it, I am astounded at the simplicity and the wide potential for applications . This was my interpretation as applied to programming

  1. Know who wrote the specification
    • In the programming world, this translates to understand the algorithm
  2. Delete anything that you can , you may have to add things back and unless you had to at least 10% , you did not delete enough.
    • Unless this is a standard algorithm which has been proved mathematically , delete anything that seems unnecessary and try to execute and add incremental changes until everything works to satisfaction
  3. Simplify and optimize . Order of steps matter a lot otherwise you could simplify something that should be deleted
    • Occam’s razor rings true here . Simplicity is truth . The simpler the code, the easier to understand and maintain
    • in Graph theory , this step would translate to the shortest path algorithm
  4. Make it fast
    • Benchmark and figure out which 20% of the code runs 80% of the time
  5. Automate
    • This is the purpose of programming so nothing need be said here

This also could be applied easily to various self improvement techniques , the only change would be that in the Automate step, you figure out how to make it a habit

Leave a comment