CodeNewbie Community

loading...
Cover image for Working the Problem

Working the Problem

Jeff Mitchell
I'm an IT generalist and junkie, who's dusting off 25 year old coding skills and entering the modern age
・2 min read

It's important to develop a systematic method when tackling problems and creating a program to solve them. I'm currently reading "Exercises for Programmers: 57 Challenges to Develop Your Coding Skills" by Brian P. Hogan.

Immediately, he identifies the key areas to think about when working the problem to develop a piece of software:

  • understanding
  • inputs
  • processes
  • outputs
  • testing
  • pseudo code

Understanding

Asking questions at this step is important, to capture as many of the requirements as possible to solve the problem. Distilling the problem at hand into a statement that captures the relevant details is one of the most important things to do. Try to work it down to a couple of sentences. If the problem has multiple parts, break them down into a series of interconnected statements.

Inputs

Every piece of software takes inputs from something, the user, another program, a file, whatever. The first step is to figure out what the inputs are (or need to be).

Processes

Processes are the steps that are needed to act on the input, in order to turn it into the output. There may be more than one of them, and they might be nested.

Outputs

Outputs are what is produced from the processes acting on the input.

Testing

Test Driven Development (TDD) is a methodology where you develop expected outputs, based on the different inputs, and construct scenarios against which your program can be tested. You test as you develop, rather than only when you're finished. Testing incrementally as you go is valuable because it can expose flaws in logic which may be difficult to pinpoint later.

Pseudo Code

Once you have a clear picture of the problem and have rearranged it into a concise statement (or statements) take the time to formulate a solution in plain natural language, rather than give into trying to code it straight into a computer language.

Moving Forward: A Framework

A systematic methodology of developing software will help you develop quality work that will stand the test of time. Carefully constructing a problem statement, identifying the inputs, processes, and outputs, combined with testing as you develop, will only make you stronger as developer and more desirable to those big companies you dream of working for.

Discussion (0)