LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-03-2006, 11:55 AM   #16
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,610
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905

A lot of folks still try to write "clever" code, "terse" code, as though compilers had made no progress at all in the last forty years. Maybe it used to be the case that the compiler's output would closely resemble the source input, such that if you wrote the code differently you'd get a different (better) output, but those days are long gone... and good riddance to them.

... and "at 1 gigaHertz, nobody can hear you scream."

Nowadays, what you want to be sure of is, that your code is absolutely clear. It should be clear to the compiler but most of all it should be clear to you and your co-workers. It should be easy to maintain and well-documented. And that, basically, means "no 'clever' code."

If you can find Kernighan* & Plauger's The Elements of Programming Style, even the original edition written for FORTRAN, buy it and read it many times. Great things come in thin books. They say everything that Code Complete does, in a fifth the number of pages.

{* yes, that Kernighan ...)
 
Old 01-03-2006, 02:06 PM   #17
dmail
Member
 
Registered: Oct 2005
Posts: 970

Rep: Reputation: Disabled
Quote:
Originally Posted by duffmckagan
Thanks a lot dmail.
I think I was in a bit of a hurry when I posted my last post.
You have been of great help here and I appreciate that. You have not been rude or anything like that, and I agree that your point is absolutely correct.

I can't really challenge you on such things, cuz I am just a beginner at C Programming. The only thing that I can do is learn from you guys.

paulsm4 & sundialsvcs..I agree with what both of you've said.

No more doubts here. I think I got your point.
I think I made a mistake while posting about the Visual Studio Compiler.
I will take a detailed look at the code, and this time, I am in no hurry.

Dmail, thanks again, you have been of great help.
np
I'm just glad that you now understand the reason for the error and not just how to fix it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cross platform C or C++ API for linux and Win32 tcma Linux - Software 1 12-09-2004 11:05 PM
How to program under Linux/Unix platform Igor007 Programming 2 08-19-2004 04:54 PM
How to program under Linux/Unix platform Igor007 Linux - Newbie 3 08-19-2004 02:18 PM
How to program under Linux/Unix platform Igor007 Solaris / OpenSolaris 2 08-19-2004 02:17 PM
How to program under Linux/Unix platform Igor007 *BSD 1 08-19-2004 02:14 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration