Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Elements of Programming" real world examples?

Tags:

c++

I'm eager to learn about Stepanov's approach to programming described in the book Elements of Programming. Does anyone here have experience with these methods, or can point me to some online resource where this topic matter is discussed?

I've seen the Adobe's Google Tech Talk on A Possible future of software development.

like image 863
StackedCrooked Avatar asked Oct 22 '09 21:10

StackedCrooked


People also ask

How is programming used in real life?

Programming is everywhere in the modern world and meets you in the street, your workplace, and the local grocery store. You interact with bar-code scanners regularly, and you almost certainly use lots of code while working, whether you're using a word processor to write a letter or an email platform to send messages.

What are the elements of programming?

Lesson Summary input: getting data and commands into the computer. output: getting your results out of the computer. arithmetic: performing mathematical calculations on your data. conditional and looping: testing to see if a condition is true or false, and cycling through a set of instructions until some condition is ...

What is programming explain with examples?

Programming is defined as the act of writing computer code, to the act of scheduling television or radio programs, or behavior that has been instilled. An example of programming is the act a person is doing when he is writing computer source code.


2 Answers

I was a proofreader for the book, and my feedback to Alex greatly influenced the style of presentation. I am happy to call myself one of his disciples. I find the material fascinating, and it has totally changed the way I write code, even Java code.

Some of Alex's "methods" are radical despite the vague wording I am providing:

  • Progamming is about two things: algorithms and data structures.
  • Think very hard about every line of code you write.
  • Understand the structure of the problem you are trying to solve.
  • Good code is often rewritten to be better.
  • The goal is to write code that is both as general and as fast as possible.
  • Naming things correctly is very important.
  • Often the core of an algorithm is already a well-understood idea.
  • If your function computes something interesting, return it.

How does that turn into source code? My posts on StackOverflow were done after this improvement in my understanding, so you can read those if you want. Otherwise, I'm not sure how to answer your question to your satisfaction.

like image 131
Mark Ruzon Avatar answered Oct 22 '22 15:10

Mark Ruzon


At the end of video, Sean Parent mentions http://opensource.adobe.com/

You can check out Adobe STLab

(BTW, I've ordered Elements of Programming and I'll receive it tomorrow ;-)

like image 32
Nick Dandoulakis Avatar answered Oct 22 '22 14:10

Nick Dandoulakis