15.04.2018 Views

programming-for-dummies

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2: Different Methods<br />

<strong>for</strong> Writing Programs<br />

In This Chapter<br />

Spaghetti <strong>programming</strong><br />

Structured <strong>programming</strong><br />

Event-driven <strong>programming</strong><br />

Object-oriented <strong>programming</strong><br />

The goal of computer science is to find the best ways to write a program.<br />

The reality of computer science is that nobody really knows what they’re<br />

doing, so they’re making up stuff as they go along and pretending that there’s<br />

a scientific basis <strong>for</strong> everything they do. The fact that multimillion dollar <strong>programming</strong><br />

projects routinely fall behind schedule and sometimes never work<br />

at all pretty much shows that computer <strong>programming</strong> is still less a science<br />

than an art.<br />

Despite these problems, computer scientists are always searching <strong>for</strong> ways to<br />

make <strong>programming</strong> easier, faster, and more reliable by constantly developing<br />

✦ Better tools<br />

✦ Better <strong>programming</strong> languages<br />

✦ Better techniques <strong>for</strong> writing programs<br />

Just as a carpenter doesn’t build a house with rusty saws and a broken hammer,<br />

computer scientists are always developing better tools to help them write, fix,<br />

and create programs. One of the first improvements computer scientists made<br />

was in developing faster compilers. Instead of waiting overnight to see if a program<br />

worked, programmers could use a fast compiler that could show them the<br />

results in seconds. Other tool improvements included editors that would show<br />

programmers the specific line where an error occurred and special programs<br />

(known as debuggers) <strong>for</strong> making sure that every part of a program worked<br />

correctly.<br />

Another way to improve programmer efficiency involves creating better <strong>programming</strong><br />

languages. Assembly language was easier to write and modify<br />

than machine language, and high-level languages are easier to write and<br />

modify than assembly language.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!