Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Doctor, I Cannot Stop to Code: Anatomy of a Madness

Doctor, I Cannot Stop to Code: Anatomy of a Madness

Developers love code. But this passion can lead us sometimes to be blind. Without being careful, we can produce more code than really needed. An additional amount of code that does not necessarily bring any value. But why do we tend to do that at all? To avoid this pitfall, it is necessary to step back, and try to understand the roots of this coding madness. By this way, we will be able to see how it affects not only our daily work, the one of our co-workers, but also our personal life. And eventually, we will identify solutions to produce less code and have more free time.

[Talk given at PyConDE 2016]

Alexandre Figura

October 29, 2016
Tweet

More Decks by Alexandre Figura

Other Decks in Programming

Transcript

  1. Who Am I? Use Python with since 2014. Live in

    Berlin since June 2016. Work in a Machine Learning team at CeleraOne. Have also experience in Web Development.
  2. def do_something(): if weather == 'sunny': if not planning(today).events: if

    friend.is_available(): try: take_my_bicycle() except BikeNotFound: try: take_neighbor_bicycle()
  3. def do_something(): if weather == 'sunny': if not planning(today).events: if

    friend.is_available(): try: take_my_bicycle() except BikeNotFound: try: take_neighbor_bicycle() except BikeLocked: try: ask_to_neighbor()
  4. def do_something(): if weather == 'sunny': if not planning(today).events: if

    friend.is_available(): try: take_my_bicycle() except BikeNotFound: try: take_neighbor_bicycle() except BikeLocked: try: ask_to_neighbor() except NeighborAbsent: if plan_b is None: log.error("Damned!")
  5. def do_something(): if weather == 'sunny': if not planning(today).events: if

    friend.is_available(): try: take_my_bicycle() except BikeNotFound: try: take_neighbor_bicycle() except BikeLocked: try: ask_to_neighbor() except NeighborAbsent: if plan_b is None: log.error("Damned!") else: try: run(plan_b)
  6. def do_something(): if weather == 'sunny': if not planning(today).events: if

    friend.is_available(): try: take_my_bicycle() except BikeNotFound: try: take_neighbor_bicycle() except BikeLocked: try: ask_to_neighbor() except NeighborAbsent: if plan_b is None: log.error("Damned!") else: try: run(plan_b) except Cursed: go_to_cinema_with(girlfriend)
  7. O

  8. OV

  9. OVE

  10. What is the purpose of our job? A programmer creates

    something from nothing*. Antoine Lavoisier Rien ne se perd, rien ne se crée, tout se transforme. “ “
  11. Creative Thinking 1. We get an idea 2. We stretch

    the idea. 3. The idea continues to grow... 4. And comes Eureka! 5. Then the implementation can start...* * Sometimes, it's better to implement by trying and experiment at step 2.
  12. Remember when you started programming? You discovered a new world.

    You could create absolutely everything... ...without any limit!
  13. You became an adult You now have a job. With

    a boss. And even a project manager! You must follow the vision of anyone else. You have to write tests. Even worse: documentation! And to maintain code of other people...
  14. 1. Your time is limited*, so use the right tools

    * The amount of cash of your boss is limited