Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Insight into the art of writing C code

Status
Not open for further replies.

btbass

Advanced Member level 5
Joined
Jul 20, 2001
Messages
1,896
Helped
438
Reputation
880
Reaction score
288
Trophy points
1,363
Location
Oberon
Activity points
12,887
Writing C code is an art, it's not something you can just do off the cuff!

C is a beautiful and elegant language that should be crafted with immaculate formatting and precise punctuation.

This allows you to see the flow and rhythm of the code.

Yet you sully it with double slash comments, //, which are C++ constructs, a horrible and convoluted contamination of C's purity.

Your punctuation would make the hardest of English language teachers weep in despair.

Writing C code is crafting poetry, a well written program is like a classical novel, a Dickens or a Shakespeare sonnet, something wondrous to behold. A story with a beginning, a plot and an end.

An elegant program can make a grown man shed tears of joy to understand the beauty before him.
You are at one with the algorithms and the hardware they control.

And yet, we are in a world when all an sundris dip their toes into the world of programming.
Some of the code I see on these pages make me weep in despair. Such ugliness, so much disrespect. No understanding that we are talking to sand and asking it to do our bidding.
Only when we ask politely, with well formated code, will it respond to our requests.

No wonder half the gadgets is this world don't work!
 

Rant about C

Looks like somebody had inherited a few thousand lines of code from an amateur.

By the way, using C++ constructs in C is often called "C+" (yes, with one +). While it may violate C calligraphy, it's a readable and understandable approach.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top