According to our Help Center (emphasis mine),

Programming Puzzles & Code Golf is for programming contests and challenges.

Sounds simple enough, and 99 times out of 100 it is. But there are certain challenges which don't really require writing code, at least in the most traditional sense. Here are a few examples:

Given that all challenges here must be programming challenges, how do we define programming? This is an important distinction for drawing a line between on- and off-topic challenges.

  • 2
    \$\begingroup\$ Related, now-deleted meta question. \$\endgroup\$
    – Doorknob
    Commented Jan 23, 2016 at 4:11
  • \$\begingroup\$ From googling "define programming": instructions for the automatic performance of a task into a computer or other machine. seems to fit well enough \$\endgroup\$
    – Downgoat
    Commented Jan 23, 2016 at 4:15
  • \$\begingroup\$ @Doᴡɴɢᴏᴀᴛ Sure, but consider the challenges I linked. Does writing writing a series of logic gates fit that description? \$\endgroup\$
    – Alex A.
    Commented Jan 23, 2016 at 4:21
  • \$\begingroup\$ @AlexA. a control mechanism to complete a task? I'd consider a series of logic gates a "control mechanism" \$\endgroup\$
    – Downgoat
    Commented Jan 23, 2016 at 4:52

2 Answers 2


Making a circuit is programming

Brainfuck is definitely programming, and it's a bunch of register move commands. So is bit hacking and other kinds of atomic code golf. Think of logic gates the same way -- a low-level Turing-tarpit "esolang".

All the examples in question are about circuits, so I'll just leave it at that.

  • \$\begingroup\$ This is pretty much what I was wondering, despite the question being phrased in more general terms. \$\endgroup\$
    – Alex A.
    Commented Jan 23, 2016 at 22:28
  • 1
    \$\begingroup\$ Hit the nail on the head here; great answer. It's also worth mentioning that NAND (and NOR) gates are functionally complete, and if you can have an unlimited number of them, that's enough for Turing completeness (related SO question). \$\endgroup\$
    – user45941
    Commented Jan 24, 2016 at 21:46

Anything that is acceptable by our rules

@xnor's answer does a good job of addressing the specific questions asked, but I want to create a more general answer.

The hard and fast rule is, if the system can do all the things listed in the consensus answer, it's valid. The system doesn't have to be code; it could be digital logic, or a logical system encoded using Gödel numbering. So long as the system is consistent (always gives the same output for the same input(s)) and can perform all of the tasks listed in the linked answer, it's kosher.

Digital logic using any functionally complete set of logic gates is programming, since digital logic is a Turing-complete system with unlimited gates.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .