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?
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?
Indentation and comments.
Stopping for a moment to ask yourself if you NEED to load a 50 MB library for two lines of code.
-=This sig has nothing to do with my comment. Move along now=-
Imho grammar is at least a important as math. If a person speaks like an illiterate rube, chances are he'll program like one too.
The basic summary is: you don't know how to code or you would know it takes a decade of trial and error to get good, even after learning the basics. It's sure as shit not going to happen in a half-day workshop and teaching "best practices" will at most create a zealot who doesn't know what the Hell they are doing and is adamant about not learning. Code workshops don't work, best case scenario you're a lazy low-or-moderate-ability programmer, worst case you're a marketing hack.
TL;DR: Stop tricking idiots into giving you money, you parasite.
Logic is a branch of mathematics.
There is no problem finding good mathematicians that knows jack shit about logic
Name one.
Programming includes some logic, but it's only a small part.
Programming is about understanding the effects of decisions from many angles. How a choice will affect correctness, maintainability, and performance.
These topics are too subjective to be tied to logic. Sadly, this is why programming is still an art.
Software engineering is an attempt to improve on this, but even those few who are good at engineering are still making their compromises based on their beliefs.
It's all very fuzzy compared to logic, and using the two in the same sentence is disrespectful to logic.
Always break down the problem into small parts that are easy to manage and test.
If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.