The Flow principe in programming

Who am I to speak such term ?

My name is Kevin Nadin - @kevinjhappy

I work at Darkmira, a company full of good guys like you, and you, and.... hum not you...
I'm a PHP developer, and my dream is to rule the world, and so should be yours

  • Small ESN that promote industrialization and security
  • Sponsor in PHP ecosystems
  • Organize the Darkmira Tour in Brazil, biggest PHP community event in this country
  • We are looking for new talents ;)

What is this thing called "Flow" ?

It is a positive psychological term

  • The Flow (also called "the Zone") is a state of mind
  • In this state you are completely focused on your task
  • This concept has been created by
    Mihaly Csikszentmihalyi in his book
    "Flow: The Psychology of Optimal Experience"

What does it bring you ?

  • The Flow is a complete focus on your task, the place you are the more efficient on development
  • The notion of time and space are altered
  • The tools you are using (Keyboard, IDE, etc...) are part of you
  • The ideas, project, solutions and success come easily

Why in programming ?

  • The Flow can appears everywhere in many activities, but you don't enable it willingly
  • When you are focused on your task, you want it to keep the flow up unconsciously because this state brings you happiness and satisfaction

Picture it !

  • It's like opening a door that's floating in the middle of nowhere, you can't particularly force yourself through it, you have to let go and float into code, the only pull is the outside world.
  • It's a program that click in your head, everything is went right and felt good, like a rush, and it's going so well, it's like you are coding on automatic pilote

Let's take anoter subject to understand

Videos game !

  • I guess everyone already played videos games
  • The Flow is very present in them
  • When you are at ease with how to play the game (move, attack, jump, etc...) the controller is now a part of you

When are we playing while being in the Flow ?

  • The Video game you are playing needs a good balance
  • If the game is too hard, you will be stressed
  • If the game is too easy, you will be bored

Flow Chart

The state of Flow

  • It is very difficult for a game to apply this principle to any players, the balance needs to be adequate
  • You face it yourself when you start a new game with a choosen difficulty
    • You are afraid to get bored if you select easy
    • You are afraid to get stressed if you select hard

Evolution of the experience

Rhythm games are 100% based on Flow

  • At first when you play Guitar Hero, you have trouble to play with the guitar controller
  • Once done, you are completely focused on getting the notes without thinking or blinking, you are in Flow
  • When the song is cleared, you have a satisfaction of success
  • Then you try naturally a harder song to retrieve that feeling

Learning more about this ?

Now let's get back to programming

When you are in Flow

  • You become one with your task, the keyboard, mouse and IDE are now a part of you
  • Your only goal is to achieve the task you want to program, you are losing track of time and space
  • You get a great satisfaction about ending the task, after the last commit you summitted, like a poet of the Web

 Consequences of the Flow

  • It bring you order in conciousness / clear mind
  • You don't think of your daily life problems
  • You even forget to eat or go to the bathroom
  • You loose track of time, hours pass like minutes
  • Increase happiness
  • Increase learning
  • Increase productivity, you have your best ideas in this state

Variables needed to enter into the Flow

  1. Initial and quick feedback
    take a broken source code and make it work
  2. Long term feedback, aka a goal
    see your project's progress and be finished
  3. Just challenging enough
    If it is too easy you get bored & if it's too hard you get stressed => easy enough & hard enough
    => This will lead to continious learning

I was in Flow while creating these slides

  • Using the tool slides.com to create slides was not a challenge
  • However, the challenge was that I already knew the concept of Flow and had to make deep researchs
  • I saw the presentation construct step by step
  • I learned a lot during the process
  • Finishing all the slides brought me great satisfaction

Avoiding Distractions

To let go and be in Flow, distraction is the enemy

Using web app that blacklist no-working website :

  • Forest that plant a virtual tree for an amount of time, if you want to go an a blacklisted website, you have to tear out the tree :'(
  • StayFocused, that will print the clock and nature picture instead of the blacklisted website

Distractions made by coworkers

  • Make google agenda meeting with yourself to notify coworkers when you are available
  • If you have a hangout/slack question, you probably need to answer it, the person is certainly blocked. But if it takes you more than 30 secondes to answer, says you will see this later with him/her

Use an indicator object

  • smiling : you are available to be disturbed
  • angry : you are not :)

Beware !!
You need to play the game !

If the octopus is always angry, coworkers will stop noticing it and disrupt you anyway

The Pomodoro Technique

  • Split time into 25 minutes parts of intense work (no distractions) and take a break.
  • After 4 parts, take a longer break.
  • Break: Stand up, move, take a coffee, this will indicate your coworkers you are available
  • Split your task in number of pomodoro needed.
  • Into one pomodoro, begin with recap / end with review
  • Tool to program splited time: Tomighty

Beware! Not every task can produce Flow

If you can't make it challenging enough, this will not bring you happiness through Flow

Increase your chance of getting the Flow

  • Reduce distractions, you know that it is awful to get distracted while in programming task
  • Having some curiosity, this will lead to challenges at your reach and learning new stuffs
  • Be passionate about your work, this will push you away from a well paid job but with bad experience

A chart from Mihaly's book

The state of Apathy

  • This state is the most common in our daily life
  • Watching TV, browsing Facebook, etc...
  • We think those actions will lead us to great happiness, but they cannot produce a state of Flow
  • Be careful not to be sinked in apathy state, this can lead to indifference and depression

To conclude

  • It make a lot of sense if you want challenge in your professionnal life, it brings you meaning, and also happiness
  • Don't be scared of the unknown
  • Always want to learn new stuff through your passion, this will be the challenge you are looking for

Why are we here, at this Meetup ?

  • "The only thing that never changes is change itself"
  • There will be always things to learn, this knowledge will lead us again into programming Flow
  • The human side in your company is important, to be pushed the right and healthy way to the top give you a constant challenge :
    • This is one condition required to enter the Flow
    • It is not with a great salary, a game console and a baby-foot that you will like your job

 By the way, if you like my beautiful voice ;)

Please add a Youtube view at my talk :D

La génération de dates en PHP -
Kevin Nadin - Forum PHP 2017

The Flow principle in programming

By Kevin JHappy

The Flow principle in programming

For meetup use

  • 454