Alan Freedman -- The Computer Language Company - Computer Desktop Encyclopedia
Computer Desktop Encyclopedia
Longest-Running Tech Reference on the Planet

A CDE Definition

You'll love The Computer Desktop Encyclopedia (CDE) for Tech Term of the Day (TTOD)



(1) Electronic circuitry that is designed to perform a specific task. See hard coded.

(2) Devices that are closely or tightly coupled. For example, a hardwired terminal is directly connected to a computer without going through a switched network.

(3) Fixed placement; for example, text and graphics that never change their location on a page. A "hardwired banner" is a banner ad that never changes.

hard coded

Programming code that solves a problem, but offers little flexibility for future modifications. Hard coding could be thought of as "brute force" programming: it gets the job done. However, the degree to which a program is hard coded determines how difficult it is to change with each new type of data that is introduced or each new function that is added.

Because It Is Easier
Very often, the processing is hard coded in the first release of an application and generalized later. The reason is simple. It is always easier to hard code a solution than to write a generalized routine that handles a variety of possibilities.

Hard Coding Vs. Hand Coding
While hard coding and "hand coding" sound somewhat similar, they are not. Hard coding refers to writing a fixed solution rather than a generalized one. Hand coding refers to writing the program in a programming language rather than a high-level GUI-based tool. See hardwired, hand coding, generalized program and data independence.

Fixed Vs. Variable Example
In the following very simple pseudocode example, it takes half as many lines of code to write a program that bounces a ball 10 times (fixed task) rather than a variable number of times:

   Hard Coded (10 times)

  1    ballCount = 0
  2    bounce ball
  3    add 1 to ballCount
  4    if ballCount = 10
  5       stop
  6    goto loop

   Flexible Code (variable number)

  1    display "Enter Bounce Count"
  2    input to maxCount
  3    if maxCount not an integer
  4       display "Not a valid number."
  5       goto start
  6       ballCount = 0
  7    if ballCount not = maxCount
  8       bounce ball
  9       add 1 to ballCount
 10       goto loop
 11    else
 12       stop

Personal Use Only

Before/After Your Search Term
hardware platformharmful radiation
hardware profileharmonic
hardware renderingharmonic adapter
hardware RIPharmonic distortion
hardware scalingHARQ
hardware T&LHART
hardware virtual machineHarvard Graphics
hardware virtual memoryhash
hardware virtualizationhash buster
hardware wallethash function

Terms By Topic
Click any of the following categories for a list of fundamental terms.
Computer Words You Gotta KnowSystem design
Job categoriesUnix/Linux
Interesting stuffPersonal computers
InternetIndustrial Automation/Process Control
Communications & networkingAssociations/Standards organizations
HistoryDesktop publishing
ProgrammingHealthcare IT
System design