Slashdot Mirror


Ask Slashdot: How Would You Teach 'Best Practices' For Programmers?

An anonymous reader writes: I've been asked to put together a half-day workshop whose title is "Thinking Like a Programmer." The idea behind this is that within my institution (a university), we have a vast number of self-taught programmers who have never been taught "best practices" or anything about software engineering. This workshop's intention is to address this lack of formal training.

The question is, what should be covered in this workshop? If you have an idea -- that also has an example of best practice -- please share!

It's really two questions -- what "thinking like a programmer" topics should be covered, but also what examples should be used to illustrate best practices for the material. So leave your best thoughts in the comments.

How would you teach best practices for programmers?

3 of 220 comments (clear)

  1. Learn math by Master5000 · · Score: 5, Interesting

    There is no way around it. Never seen a great developer without strong analytical skills.

  2. There is a huge problem with math though ... by Anonymous Coward · · Score: 0, Interesting

    The culture is just wrong for most people and goes directly against software development principes.

    * Th Paul Lockhart argument: True math is the skill of solving very abstract problems by finding very abstract patterns/principes.
    But the math we learn is merely the memorization of some of those patterns without understanding them and without the ability to come up with new ones. Missing the entire point.

    * The 3Blue1Brown argument: Math is unfortunately taught like a written language. But most people do not think of patterns that way. They fail at math, not because they are bad, but because the form of communicating it only serves a small elite (who somehow always act like they want to keep it that way).
    Then they notice that when it is taught in a geometric way ... like 3Blue1Brown does so well ... suddenly the most complex topics become natural and easily approachable.

    * The programming principles argument: That mathematical language goes directly against principles like using descriptive identifiers, and makes Perl not even hold a cande against how write-only it is.
    Generally, mathematicians think that because it is so abstract, they get to not only use useless one-letter identifiers, but preferably ones that you can't even enter on a computer, and that, even if Google would not ignore one-letter things, would be completely ungoogleable. Preferably with them secretly being not just variables, but substituton conventions using multi-parameter higher-order functions in a way way that even finding the structure of the expression by looking at it becomes impossible. (But if you transate it from Snobist to Human, suddenly it is quite easy to read. And if you explain it in a geometric way, it becomes almost obvious!)
    I'd say this is deliberate harmful obfuscation for the pure sake of exclusive elite snobbery.

    * The scientific method / incompleteness theorem argument: Many mathematicians seem to not bother caring if the thing they do have any relation to reality or usefulness, don't plan on getting there, or even actively reject it. But the problem is: Math is just a set of patterns/hypotheses, that only become scientific theories, once they are actually backed by (statistically reliable) observations from reality, and only become useful, when they allow predicitons in reality!
    But instead, many believe that math can stand on its own, and is the best science because it has perfect "proof"! Nevermind that those axioms can never be proven with math themselves, and the true scientific method rejects the concept of absolute "proof" anyway, since the best we can do is statistically reliable patterns in our observations, backed by peers that have also been shown to be ststistically reliable (by us).
    Many even suggest that reality is based on math!
    I'm sorry, but like religion, thst is literally (nkt even figuratively) the definition of full-on schizophrenia! At that point, they are not scientists anymore, but a cult/religion.
    And that poisons the useful math too.
    The same problems exists in philosophy, which also shares with math that it predates proper scientific concepts, and is halfway between religion and science.

    Because of this bullshit, it took me three decades to find out that I actually love math, and just hate the above madness.
    Now I can even get the girliest of "I hate math" girls to see and love the beauty and usefulness of true math. By speaking in human language and using real-world cases that they can actually use.

    So: Learn *proper* math. The right way! Yes, I *fully* agree with you there.

  3. Humilty, but you can't teach that by petes_PoV · · Score: 3, Interesting

    we have a vast number of self-taught programmers who have never been taught "best practices"

    Arrrrgh! The worst sort.

    These people tend to be rank amateurs. But with the "experience" that makes them think they are actually professionals. Almost none of them are. And most never will be.

    Most people, even people who make a living from programming, are much worse at it than they think they are. They are impatient, they are hit-and-miss, most can't think clearly and an unfortunate number share in the twin misconceptions that "if it compiles cleanly, it works" and that testing is merely a stage that comes between coding and release to production (and is not there to fix problems, merely to tick boxes).

    Personally I would focus this workshop on the cost of the errors made - and target it at the senior people there. Drum it home that "good" software - best practices is not about how many million lines of code you can write in a day, nor about how complex you can make an algorithm. It is about being able to hand your work off to others and the ease with which they can understand what it does.

    --
    politicians are like babies' nappies: they should both be changed regularly and for the same reasons