Thread: Portable code and Illiterate programmers.

  1. #1
    Registered User
    Join Date
    May 2021

    Portable code and Illiterate programmers.

    For the sake of portable code,
    using pointers and unsigned integers can make code hard to read for certain people,
    consequently an entire project becomes less portable, if delegated to the wrong person,
    in that case, a Java programmer who is "pointer-illiterate".

    But some people insists on these practices, this is quite absurd ?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    That's not usually what "portable" means.

    Anyway, if you're saying that certain constructs can be problematic when used in C because programmers coming from other programming languages that don't know these constructs wouldn't be able to use them correctly, then the right solution is to teach these programmers to use these constructs correctly, or if they prove unteachable, fire them and hire C programmers to work on your C code.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    May 2009
    Instead of "Portable" you likely mean easy to "maintain"; but, even that is not really a good thing to say about the use of pointers.

    You likely are talking about cheap to maintain using poor C programmers.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  4. #4
    Registered User
    Join Date
    May 2021
    I meant pointer arithmetic. In the case of maintainability, there are people who write bad code that they don't understand 6 months from now. Or is it bad people who write bad code, in the sense of bad people doing bad things ?

  5. #5
    TEIAM - problem solved
    Join Date
    Apr 2012
    Melbourne Australia
    This feels like a "post hoc ergo propter hoc" argument - You are saying that some programmer's had a problem with pointers and unsigned ints, therefore the problem is with pointers and unsigned ints.

    What you should be asking is whether the programmers were the right people for the job...

  6. #6
    Registered User
    Join Date
    May 2021
    Yes, what everyone else has said.

    Readable code, understandable code, is a Really Good Thing, an aim that we all should pursue. But not knowing how certain language features could/should be safely and correctly used - which seems to be what you're asking here - is a different matter. I once had a boss who forbade me to use linked-lists. He claimed they were intrinsically flawed, and that a safe implementation could not be programmed. Translation: he was never able to safely code a linked-list, and got into big trouble the first and only time he tried. Above all else, don't be like my old boss (who is now, unaccountably, a valued guru in the Raspberry Pi community...).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 10-12-2016, 06:39 AM
  2. Writing portable code
    By Swoorup in forum C++ Programming
    Replies: 4
    Last Post: 06-29-2013, 11:41 AM
  3. Is there a way to make the following code portable?
    By manasij7479 in forum Linux Programming
    Replies: 3
    Last Post: 07-03-2011, 02:08 AM
  4. Replies: 6
    Last Post: 05-29-2011, 08:27 PM
  5. Replies: 6
    Last Post: 01-03-2003, 05:40 PM

Tags for this Thread