C programming: working with pointers

In summary, when you subtract two pointers, you are telling the compiler how many houses are between the two addresses.
  • #36
chroot said:
Math Is Hard,

Remember the three qualities of a good programmer:

1) Laziness. No one should have to do much work, so a good programmer should strive to make the user's life utterly push-button easy.

2) Impatience. No one should ever have to wait for a computer to do anything, so programmers should be careful with their algorithm designs to make sure their users never have to wait for anything.

3) Hubris. Programmers should take excessive pride in their work, and should strive to make every program they write complete, totally functional, and elegant.
Wow - who knew?? I promise to try my best to acquire these ..uh.. virtues! :biggrin:
 
Physics news on Phys.org
  • #37
chroot said:
Normally, I associate the ++ operator with the word "incrementing," but it may just be a semantic issue.

That's good enough for me. I'll take your advice on that and use ++ in my final version.
 
  • #38
Thanks, again!
 
  • #39
chroot said:
Math Is Hard,

Remember the three qualities of a good programmer:

1) Laziness. No one should have to do much work, so a good programmer should strive to make the user's life utterly push-button easy.

2) Impatience. No one should ever have to wait for a computer to do anything, so programmers should be careful with their algorithm designs to make sure their users never have to wait for anything.

3) Hubris. Programmers should take excessive pride in their work, and should strive to make every program they write complete, totally functional, and elegant.

The PHP tags are really an example of some programmer on the vBulletin team demonstrating quality number one.

- Warren

You forgot 4)

4) Once you land a job as a programmer learn to obfuscate as much as possible so that you are the only programmer able to maintain certain chuncks of code thus ensuring job security.
 
  • #40
faust9 said:
You forgot 4)

4) Once you land a job as a programmer learn to obfuscate as much as possible so that you are the only programmer able to maintain certain chuncks of code thus ensuring job security.

OMG! I had a job once where ALL the programmers lived religiously by that guideline. Not even the tiniest cryptic comment was ever written. My job? To go around to the programmers and produce documentation on what they were coding. Since they all refused to document or comment my boss thought I should be the one to do it. He wanted to farm out some of the work overseas so he wanted to create a guidebook for these contracted developers who would write new modules of the app.
It was horrible. :yuck: The programmers were really protective and defensive about showing anyone their code or explaining to anyone what it did.
And what a mess. By the time I came to work their the application was three fourths done and there was no formal spec - just shoe boxes full of meeting notes and emails from the client.
 
  • #42
robphy said:
For more qualities, consult this enlightening article on good :tongue2: programming techniques:
How To Write Unmaintainable Code

LOL! That's hilarious! :rofl:

I love the quotes at the beginning of each section, especially thie one:

Quidquid latine dictum sit, altum sonatur.
Whatever is said in Latin sounds profound.
 

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
17
Views
1K
  • Programming and Computer Science
Replies
17
Views
1K
  • Programming and Computer Science
Replies
12
Views
1K
  • Programming and Computer Science
Replies
7
Views
3K
  • Introductory Physics Homework Help
Replies
4
Views
882
  • Programming and Computer Science
Replies
5
Views
872
  • Engineering and Comp Sci Homework Help
Replies
3
Views
661
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
19
Views
2K
  • Programming and Computer Science
Replies
5
Views
806
Back
Top