How to Be Creative

Jared Nielsen
13 min readMar 15, 2021

There are two types of problems we solve as developers:

  • algorithmic
  • heuristic

What type of programmer do you want to be?

We can map these to the two types of problems outlined by Csikszentmihalyi in Creativity:

  • presented
  • discovered

To solve algorithmic, or presented, problems, it’s simply a matter of recognizing a pattern and implementing a tried-and-true solution. A lot of technical interview questions are these ‘classics’ disguised as story problems, used to test both the breadth and depth of your knowledge. The list is long, but a few examples are:

  • dynamic programming
  • divide and conquer
  • decrease and conquer
  • swapping
  • sorting
  • …etc

I say simply, but it takes practice to build a library of patterns and the ability to recognize them.

Heuristic, or discovered problems, on the other hand, are not only new to us, but new to the field. We can’t use an off-the-shelf solution. We need to invent one!

📝 It’s important to distinguish between heuristic algorithms and heuristic in general: “Heuristics can be mental shortcuts that ease the cognitive load of making a decision”, whereas, in computer science specifically, a heuristic is “a technique designed for solving a problem more quickly when classic methods are too slow, or for finding an approximate solution when classic methods fail to find any exact solution.”

If we’re content pushing pixels, all we need is Google. It will do the thinking for us. Just copy/paste those answers from StackOverflow.

But if we want to design or discover something new, we need to improve our ability to be creative.

Easier said than done?

How do We Become or Improve Our Ability to Be Creative?

Maybe the real question is, ‘Can creativity be taught?’

The answer depends on who you ask.

According to Richard Hamming in The Art of Doing Science and Engineering: Learning to Learn, when it comes to learning creativity, we must be our own teachers:

It cannot be done with simple tricks and easy methods; what must be done is you must change yourself to be more creative.

How do we change ourselves?

In Creativity, Csziksenmihalyi divides this problem into two categories:

  • the acquisition of creative energy
  • the application of creative energy

How do we get more creative energy? And once we get it, what do we do with it?

I like to think of these two categories in terms of luck. There are two things we need to do:

  • prepare to be lucky
  • get lucky

Twyla Tharp makes the case for luck and preparation for it in The Creative Habit:

You don’t get lucky without preparation, and there’s no sense in being prepared if you’re not open to the possibility of a glorious accident… Some people resent the idea of luck. Accepting the role of chance in our lives suggests that our creations and triumphs are not entirely our own, and that in some way we’re undeserving of our success. I say, ‘Get over it.’ This is how the world works. In creative endeavors luck is a skill.

Prepare to Be Lucky: The Acquisition of Creative Energy

Csziksenmihalyi outlines four approaches to aid us in the acquisition of creative energy:

  • Overcoming limits
  • Cultivating curiosity and interest
  • Cultivating flow in everyday Life
  • Building habits of strength

Overcoming Limts of Creative Energy

According to Csziksenmihalyi, there are two limits that prevent us from reaching our full creative potential:

  • external
  • internal

External Limitations to Creative Energy

External limitations to our creativity are all the things(!) we must do to survive each day: commute and report to work; attend to the needs of our family; purchase, prepare, and eat food; basic hygiene; advanced hygiene (whatever that is); house cleaning; bill paying; and, oh yeah, sleeping…

Somehow we are suppoed to find time to build X, learn Y, and stay sharp on Z. There aren’t enough hours in the day!

According to Csziksenmihalyi, “…the fact is that there are real limits to how many things a person can attend to at the same time, and when survival needs require all of one’s attention, none is left over for being creative.” He continues…

…the most fundamental difference between people consists in how much uncommitted attention they have left over to deal with novelty.

For some of us, the obligations of work and family are too demanding to allow attention to be devoted to novelty. The rest of us need to get over ourselves.

Internal Limitations to Creative Energy

Csziksenmihalyi identifies two primary pitfalls that prevent us from achieving our creative potential:

  • paranoia
  • selfishness

The paranoiac “usually cannot afford to become interested in the world from an objective, impartial viewpoint, and therefore is unable to learn much that is new,”, whereas “when everything a person sees, thinks, or does must serve self-interest, there is not attention left over to learn about anything else.”

But there’s a paradox here. In order to overcome external limitations (and keep the internal limitations in check), we need to be protective of our attention. According to Csziksenmihalyi, “it is practically impossible to learn a domain deeploy enough to make a change in it without dedicating all of one’s attention to it and thereby appearing to be arrogant, selfish, and ruthless to those who believe they have a right to the creative person’s attention.”

Cultivating Curiosity and Interest

Once we overcome our internal and external limitations, we can focus on “the allocation of attention to things for their own sake” or, in other words, curiosity and interest.

How can interest and curiosity be cultivated? Practice spontaneity. Sound paradoxical? Csziksenmihalyi offers four suggestions for being spontaneous:

  • try to be surprised by something every day
  • try to surprise at least one person every day
  • write down each day what surprised you and how you surprised others
  • when somethihng strikes a spark of interest, follow it

In Creativity, John Cleese counsels us on “keeping going”. To do so we need to nurture and trust our unconscious. How do we do that? Play. According to Cleese, “Playing… keeps you ‘fresh’.”

Cultivating Flow in Everyday Life

What drives creative people?

The opportunity to do the work that they enjoy doing and to design and discover something new.

How can we relearn to enjoy curiosity so that the pursuit of new experiences and new knowledge becomes self-sustaining? First, we need to get good at it. If you do anything well, it becomes enjoyable. But! To keep enjoying something, you need to increase its complexity.

What do we mean by ‘enjoyment’? Athletes, artists, and scientists all describe the experience of working as “…an effortless, yet highly focused state of consciousness.” This is also known as a flow state. Csziksenmihalyi identifies nine conditions that describe flow:

  1. There are clear goals every step of the way.
  2. There is immediate feedback to one’s actions.
  3. There is a balance between challenges and skills.
  4. Action and awareness are merged.
  5. Distractions are excluded from consciousness.
  6. There is no worry of failure.
  7. Self-consciousness disappears.
  8. The sense of time becomes distorted. We lose track of time.
  9. The activity becomes autotelic. Do it for its own sake!

Building Habits of Strength

In thermodynamics, entropy is “the state of disorder, randomness, or uncertainty” in a system. To acquire creative energy, we need to fight entropy. According to Csziksenmihalyi, “what is important is not to relinquish control over creative energy so that it dissipates without direction.” He continues:

We must erect barriers agains distractions, dig channels so that energy can flow more freely, find ways to escape outside temptations and interruprtions.

How do we fight entropy? How do we erect barriers and dig channels?

We build strength.

How do we do that?


You’re not going to like this answer…

Hard work.

In addition to hard work, there are specific actions we can take to protect our creative attention:

  • Take charge of your schedule.
  • Make time for reflection and relaxation.
  • Shape your space
  • Find out what you like and what you hate about life.
  • Start doing more of what you love, less of what you hate.

The last two points are subjective and up to you. Let’s look at some strategies for the first three.

Take Charge Of Your Schedule

As we saw above, there are external limits that prevent us from making the most of our attention. These are generally demands on our time, but that demands mean we don’t have a say in when we apply our attention to these things. Make your schedule work for you.

Csziksenmihalyi’s first piece of advice? “Wake up with a specific goal in mind. Set that goal the night before.” This is why ‘productivity gurus’ counsel us to do our most important work first thing in the morning. Our attention, not to mention our will power, dissipates over the course of the day.

Keep in mind that timing is everything.

Are you an introvert? You are also likely a morning person. Aim to do your creative work then.

Are you an extrovert? You are also likely an evening person, maybe even a night owl, so burn that midnight oil!

We know that preparation and incubation are essential for insight, so allow time for those processes. In The Owner’s Manual for the Brain, Pierce J. Howard counsels us to “always take a break between preparing for your creative act and executing it” to allow insight to incubate and to approach the work with fresh eyes.

Don’t forget your “feeding schedule”. When you eat is as important as what you eat. Don’t sabotage your creative attention with a gut bomb. According to Howard in The Owner’s Manual for the Brain, “…consumption of high-glycemic carbohydrates and fats tends to interfere with creativity by reducing arousal, whereas consumption of proteins and low-glycemic carbohydrates, unless it is excessive, has no apparent negative impact on arousal.”

Make Time for Reflection and Relaxation

In The Owner’s Manual for the Brain, Pierce J. Howard recommends making time for reflection and relaxation, suggesting two opposite activities to do so:

  • Meditation
  • Exercise

Maybe neither of these are your jam, so find something in the middle. Keep in mind that “creative episodes are most productive when they are preceded by some form of meditation or aerobic exertion.”

The goal is to create attentional mental space. Let your brain stretch its legs.

🧠 🦵🦵

Shape Your Space

We all became acutely aware of the importance of our work environments in 2020. Everything changed, whether we still needed to report on-site, switched to telecommuting, or found that our remote life became just that… remote.

We can divide our space into two categories:

  • macroenvironment
  • microenvironment

The macroenvironment is the social, cultural, and institutional contexts we live in. The microenvironment is the immediate surroundings. Like external and internal limits discussed above, we need to adapt, whether that is to our environment or environment to us.

According to Csziksenmihalyi:

Most of us cannot do a great deal about the macroenvironment. There is not that much we can do about the wealth of the society we live in, or even about the institutions in which we work. We can, however, gain control over the immediate environment and transform it so that it enhances personal creativity.

This might be easier said than done. Not everyone has the luxury of free space to devote to creative work. So commandeer it! Take over a space temporarily. Make your own pop-up! Legend has it Einstein worked out his early theories on the kitchen table in the tiny apartment shared with his wife and child. Our devices allow us to take our “office” with us. If you are reading this, you likely own a laptop, at the very least, a smartphone. Just put on your headphones and get to work. Don’t forget to turn off notifications! It’s not just a matter of shaping your space, it’s also a carving out of space. According to Csziksenmihalyi, this is what sets creative individuals apart:

…whether the conditions in which they find themselves are luxurious or miserable, they manage to give their surroundings a personal pattern that echoes the rhythm of their thoughts and habits of action. Within this environment of their own making, they can forget the rest of the world and concentrate on pursuing the Muse.

All this said, sometimes we need the outside world. Richard W. Hamming offers a counterpoint in The Art of Doing Science and Engineering: Learning to Learn:

… I often suspect… that what the individual regards as ideal conditions for creativity is not what is needed, but rather the constant impinging of reality is often a great help. In the past I have deliberately managed myself in this matter by promising a result by a given date, and then, like a cornered rat, having at the last minute to find something!

Building Habits of Strength

We are, in a very real sense, the sum total of our habits, and nothing more; hency by changing our habits, once we understand which ones we should change and in what directions, and understand our limitations in changing ourselves, then we are on the path along which we want to go.

Richard W. Hamming offers some additional final advice:

…do not try heroic reformations which are almost certain to fail. Practice on small ones until you gradually build up your ability to change yourself in the larger things. You must learn to walk before you run in this matter of being creative, but I believe it can be done. Furthermore, if you are to succeed (to the extent you secretly wish to), you must become creative in the face of the rapidly changing technology which will dominate your career. Society will not stand still for you; it will evolve more and more rapidly as technology plays an increasing role at all levels of the organization.

Get Lucky: The Application of Creative Energy

Now that we know how to acquire creative energy, what do we do with it? We need to find (or create) problems in which to apply it. There are three steps we can take towards applying our creative energy:

  • Problem finding
  • Divergent thinking
  • Choosing a special domain

Problem Finding

Csziksenmihalyi outlines four strategies for finding problems.

  • Find a way to express what moves you
  • Look at problems from as many viewpoints as possible
  • Figure out the implications of the problem
  • Implement solutions

Find a Way to Express What Moves You

For most of us, problems needing solutions will emerge from the patterns of everyday life. It’s easy to miss these opportunities due to (the wrong) habits or inertia. Pay close and careful attention; it’s these day-to-day problems that “move you”.

In Creativity, John Cleese counsels us to “write about what you know,” because:

… you are most likely to be creative in an area that you already know and care about.

Look at Problems From As Many Viewpoints as Possible

In The Art of Doing Science and Engineering: Learning to Learn, Hamming recommends the use of analogy, stating that it is probably “the most important tool in creativity”. He describes analogy as a process in which “something seems like something else which we knew in the past.”

How do we develop our ability to analogize?

According to Hamming:

Wide acquaintance with various fields of knowledge is thus a help — provided you have the knowledge filed away so it is available when needed, rather than to be found only when led directly to it. This flexible access to pieces of knowledge seems to come from looking at knowledge while you are acquiring it from many different angles, turning over any new idea to see its many sides before filing it away. This implies efort on your part not to take the easy, immediately useful “memorizing the material” path, but to prepare your mind for the future.

Figure Out the Implications of the Problem

If you identify a problem in your day-to-day, think through how others are affected (or not) by the issue. What are the side effects? What are the problems that create this problem?

Richard W. Hamming offers advice on making this a habit:

…when you learn something new, think of other applications of it, ones which have not arisen in your past but which might in your future.

Implementing Solutions

This one’s all you. The important thing to keep in mind is to experiment and iterate. Implementing a solution doesn’t mean you’re done finding the problem. It might mean you just created more problems to solve! Win-win!

Divergent thinking

In Creativity, Cleese encourages us to “make an imaginative leap”, but warns us that “the bigger the leap, the longer the creative period is likely to be.” These leaps are divergent thinking. The goal(s) of divergent thinking are to:

  • Produce as many ideas as possible
  • Have as many different ideas as possible
  • Try to produce unlikely ideas

Richard W. Hamming reminds us that this, and creativity in general, is an iterative process:

The false starts and false solutions often sharpen the next approach you try. You now know how not to do it! You have a smaller number of approaches left to explore. You have a better idea of what will not work and possibly why it will not work.

But, he also counsels us to “know when to fold ‘em:”

If you cannot drop a wrong problem, then the first time you meet one you will be stuck with it for the rest of your career.

Choosing a Special Domain

The final, and perhaps most important application of creative energy, is to find your domain and make a singular commitment to it.

To do this, Csziksenmihalyi counsels us to specialize, because…

As culture evolves, it becomes increasingly difficult to master more than one domain of knowledge. Therefore, it follows, as culture evolves, specialized knowledge will be favored over generalized knowledge.

In some domains, this is also a matter of being in the right place at the right time. According to Csziksenmihalyi:

The right milieu is important in more ways than one. It can affect the production of novelty as well as its acceptance; therefore, it is not surprising that creative individuals tend to gravitate toward centers of vital activity, where their work has the chance of succeeding.

The place where one lives is important for three reasons:

  • “one must be in a position to acss the domain in which one plans to work”
  • “novel stimulation is not evenly distributed”
  • “access to the field is not evenly distributed in space”

So where is the right place to be?

According to Csziksenmihalyi, there is no single answer. He continues:

Creativity is not determined by outside factors but by the person’s hard resolution to do what must be done. Which place is best depends on the total configuration of a person’s characteristics and those of the task he or she is involved in.

How to Be Creative

If we want to become, or improve our ability to be, creative, we need to first acquire creative energy and then apply it. It’s a matter of preparing ourselves to be lucky, because, as Csziksenmihalyi reminds us, “insights tend to come to prepared minds, that is, to those who have thought long and hard about a given set of problematic issues.”

A parting thought from Richard W. Hamming:

If you want to do significant things, now is the time to start thinking (if you have not already done so) and not wait until it is the proper moment — which may never arrive!

Want to level up your problem solving skills? I write a weekly newsletter about programming, problem solving and lifelong learning. Join now