How to write code

I'm on Stack Overflow a lot.

A lot.

So I often see people ask questions along the lines of:

I have [problem], how do I write code to solve [problem].

And then they proceed to not show any relevant code or even attempt to help themselves.

Writing code is a lot like drawing an owl:

How to draw an owl: 1. draw some circles 2. draw the rest of the fucking owl

There's no trick to writing code, it's two simple steps.

  1. Write some functions
  2. Write the rest of the fucking code