Menu

body, html { width: 100%; height: 100%; } body{ padding-top:100px; } body, h1, h2, h3, h4, h5, h6 { font-family: "Lato","Helvetica Neue",Helvetica,Arial,sans-serif; font-weight: 700; } #content{ min-height: 600px; } #banner_image { padding-bottom: 50px; text-align: center; color: #f8f8f8; background: url(../img/intro-bg_1.jpg) no-repeat center center; background-size: cover; } #banner_content { position: relative; padding-top: 6%; padding-bottom: 6%; margin-top: 12%; margin-bottom: 12%; background-color: rgba(0, 0, 0, 0.7); max-width: 660px; } #item_list { padding-top: 50px; } /*This code ensures that when we navigate to a particular section of a page, the section does not get lost behind the header*/ #cameras:before, #watches:before, #shirts:before{ display: block; content: " "; margin-top: -85px; height: 85px; visibility: hidden; } #login-panel .panel-footer{ font-weight:normal; } footer { padding: 10px 0; background-color: #101010; color:#9d9d9d; bottom: 0; width: 100%; } .red{ color:red; } #settings-container{ margin-bottom:10px; } .navbar-brand{ font-size:20px; } @media(max-width:768px) { #banner_content { padding-bottom: 15%; } footer{ text-align:left; } } .remove_item_link{ color:#0000ff; }

What is Computer Programming

Programming a computer to solve a problem always requires defining data to represent the things in your problem; this is called modeling. It also requires explaining unambiguously what process to follow in order to solve the problem. This process of explaining is where different paradigms of programming come in:
  • In imperative programming, we tell the computer what to do to the data. The computer starts out with its memory containing stuff, we tell it how to change that stuff, and it makes those changes.
  • In functional programming, we tell the computer how to build output data from input data. We use functions, which are rules that say how to combine or transform things; they consume inputs and produce outputs.
  • In logic programming, we specify a set of constraints -- rules that say how things are related -- and then ask a question; the computer runs a program that examines all those constraints and finds all valid answers to the question.
For decades, imperative programming was the dominant (or even the only) option, because at its heart, a digital computer is a bunch of switches and rules for how to switch them on and off. Functional and logic programming existed, more or less, only as language spoken by mathematicians. By now, though, programmers have written a vast menagerie of interpreters and compilers -- programs that run or translate other programs, respectively -- that allow us to communicate in whatever kind of language seems most suitable to the problem we're solving. We even have domain-specific languages that are fine-tuned for specific classes of problems: statistics, physical simulations, music, and typesetting are just a few that come to mind.

And why does all this matter? Because, again, the aim of programming is to explain solutions. Sure, computing the solution automatically is great -- after all, without that ability computers would be useless -- but good programs are meant for other people to read and understand, not just for them to use.

Programming is about :
  • Evaluation and substitution. These are the basic algebra skills that programs are built on, and that programmers mentally fall back on when trying to figure out why a program isn't behaving as expected.
  • Modeling. Information is complex; solving problems with the computer (or with math) always somehow involves defining and using data to represent information from the problem.
  • Managing complexity: Breaking problems and solutions down into chunks that can be understood easily. Abstraction (as Tikhon Jelvis mentioned) is the main tool for this.
  • Communication. In at least two ways, this is important: (1) Determining what your clients want, so you are solving the right problems. (2) Organizing and documenting your work so that you (or the next programmer to touch it) will be able to understand it, months or years later.
  • Patience and perseveration. When things aren't working right, there's usually something you haven't noticed. Learning what that something is often requires mentally retracing your steps, and manually re-running code on different inputs, until you see what you've been missing. This may take a while.
  • Discipline. Writing tests and specifying what work must be done are both decidedly unsexy tasks, but they both make your work easier and give you confidence that you've done your work correctly.
Post a Comment

Amazing Facts about Programming

Amazing Facts about programming  The first programmer was a lady named Ada Lovelac . She was a writer and gifted mathematician...

Popular Tutorials