Slashdot Mirror


User: alder

alder's activity in the archive.

Stories
0
Comments
152
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 152

  1. Coding practices and naming conventions on Review:The Practice of Programming · · Score: 1

    At first I was thinking to write a reply to Joe Mucchiello comment, but then discovered this one and your "mistakes" (IMHO) looks more generic, so here is my view:

    Let's take a look at if(!strcmp(a,b)) {}. If we rewrite this example in some fictional pseudo-language it could be written as if not strings_are_comparable(a,b) then ...: which is opposite to the intent of the original C code, that branches into the if block when strings are equal.

    Well, that example illustrante some obvious misconception of the original intent. The case with boolean/bool maybe not so obvious, but carries the very same pitfall - what you write is not what others may read!

    I believe that programming languages are not only the means for a single programmer to convert his/her thoughts through some intermediate ("and it better be convenient for me!") presentation into a machine instructions. They should be (and they are, some are just better than others) like an ordinary languages be tools/means to convert you ideas into some tangible form, let you come back to these ideas later (understand what was there), improve them, and let others read and understand what is so great in your creation.

    Though usages of "restrictive" booleans, or some other language constructs (DBC for instance) may look painful ("I just want my thoughts to appear ASAP as a working beast"), they are invaluably helpful when you program lives through changes, versions, adaptations and additions that others do.

    C is an extremely great when you come from assembly programming camp. You are still able to "talk" to your machine in "almost" it's native language, and still accomplish much more and spend your time more productively. But when it comes to something more abstract, more distant from pure hardware then your ability to communicate ideas and design choises without misinterpretation becomes a matter of absolute priority.

    Well, those are some unorganized thoughts. I would like to hear your comments folks.

    Alex

  2. Interesting Trick on Linus will move to Moscow to work with Elbrus · · Score: 1

    Sendan posted almost exact translation of Computerra's article, though article itself was published 04/01 (or 01-04 as somebody mentioned somewhere else :-)

    I'm wondering, how many of today's stories should be ranked as "April, 1"?