Ask Slashdot: How Do You Make Novice Programmers More Professional?
Slashdot reader peetm describes himself as a software engineer, programmer, lecturer, and old man. But how can he teach the next generation how to code more professionally?
I have to put together a three-hour (maximum) workshop for novice programmers -- people with mostly no formal training and who are probably flying by the seat of their pants (and quite possibly dangerous in doing so). I want to encourage them to think more as a professional developer would. Ideally, I want to give them some sort of practicals to do to articulate and demonstrate this, rather than just "present" stuff on best practices... If you were putting this together, what would you say and include?
This raises the question of not only what you'd teach -- whether it's variable naming, modular programming, test-driven development, or the importance of commenting -- but also how you'd teach it. So leave your best answers in the comments. How do you make novice programmers more professional?
This raises the question of not only what you'd teach -- whether it's variable naming, modular programming, test-driven development, or the importance of commenting -- but also how you'd teach it. So leave your best answers in the comments. How do you make novice programmers more professional?
If they are new programmers, probably they need more than just programming skill, they need skill acting like a professional. The Clean Coder does a really good job with that.
For programming skill, I'm going to suggest Zero Bugs and Program Faster. That book tries to change the way people think about code.
On the practical side, there's no substitute for looking at good code. Assuming you're a good programmer, this would mean code review is one method. Have him review your code and find mistakes. He'll think he's trying to catch you, but he'll learn a lot doing it. Then you can review his code, too.
Another good mentoring technique is unit tests. They show you the kinds of things the programmer is thinking about when they test. So you can look over the tests in code review and say, "hey, you forgot to test this aspect." Ideally you'll want him/her to be thinking of every possible test case, even if he/she doesn't actually write out the test.
Another thing is to treat the younger person with respect. Sometimes if you say, "Oh you did that wrong" they will automatically assume, "he hates me" and put themselves in an adversarial stance, which is not helpful for anyone. Look for things that they do that you really respect, and point them out.
"First they came for the slanderers and i said nothing."
Could we get a full list of those books?
This is the list I currently use. I welcome additional recommendations. What CS books have you read recently that you really wished you had read 10 years ago?
Programming:
Clean Code
Code Complete
Programming Pearls
The Pragmatic Programmer
Regular Expressions
Algorithms by Robert Sedgewick
Introduction to Algorithms by Tom Cormen
Hacker's Delight by Henry Warren
Interface design:
Don't Make Me Think
The Design of Everyday Things
Microinteractions
Software Engineering:
The Mythical Man-Month
Joel on Software
Test Driven Development
Theory:
The Turing Omnibus
Deep Learning, by Goodfellow, Bengio, Courville
Concrete Mathematics by Donald Knuth
Physics for Game Developers
Computability, Complexity, and Languages
I've been a developer since I was a child. I became a software engineer after education. I have been a senior developer on at least 3 projects that have impacted a billion or more people for 5-10 years and have a list of "inventions" to my name that is quite long.
:
I am not properly educated. I couldn't afford to attend the university in America, so instead, I latched on to the head of science and engineering at a major university and traded work for books etc... but I received no paper. I was forced to know every book verbatim at all times for years because in order to work in generally Ph.D. level positions and be taken seriously, I had to be a walking reference at all times. It was a bumpy road, and I got my scars, but I made it.
I become a structure zealot. I became absolutely obsessed with Big-O, data structures in general, design patterns, etc... I rarely if ever wrote a piece of code without obsessing over its design extensively before doing it. I learned that all the best programming started on the backs of napkins at coffee shops. A local coffee shop even let me and a colleague use white board markers on their windows for an hour or two each day because we were costing them a fortune in napkins they said. We often had an audience, less professional developers wanting to learn how to plan and employ complex things.
Together my colleague and I reinvented methods of programming such as methods of decoding images using a push pipeline rather than simply a FIFO by designing state machines similar to VHDL coding that would decode and display pixel by pixel of an image (jpeg, png, gif) as soon as the data was available. We designed new methods of compiling lex and yacc grammars that would dispense of tables and handle contexts while also processing data as it arrives based on state machines and make corrections if new data changes the meaning of older data. We wrote memory allocators, just-in-time compilers (back before they were properly named).
None of these tasks could have been accomplished without
1) Education
2) Reading to further education
3) A thorough understanding of computers (we were both demo coders when that meant something)
4) Math
5) Patience
6) Respect for each other instead of competition.
Now, I've gotten old and I decided I liked money a lot, so I left my job as a programmer after nearly 20 years and moved onto being an network instructor. First of all, networking people are all very similar to informally trained programmers. They're typically more talk and less real knowledge. They spout off things they don't fully understand and they often find them to be mysterious and amazing. They learn a new acronym like HSM and even learn it means Hierarchical State Machine and before you know it, your code is littered with chaotic amounts of junk because every problem they try to solve, they employ their new toy to solve. Sadly, it's not magical and they make coding changes that will permanently impede your ability to work professionally since training new programmers on the project will now take 3 times as long.
Let's start with a few bullet points
1) New languages can bring new methods, but new languages come and go
PERL, PHP, Ruby, Python, what's next?
Due to children making decisions all the time, there are companies with millions of likes of bad PERL, PHP, Ruby and Python code out there. Each time there's a new "hot language" we end up rewriting absolutely everything over and over and get it wrong over and over. Those languages are great for some reasons, but while I use Python once in a while, I generally limit how much I use it since I expect support to slowly taper off within 3-5 years. I may be wrong, but it's a "language of the week" and I don't believe in investing in languages of the week.
2) Communication is the absolutely most important thing
Algorithms, Desi
Two of the essentials, anyway. Not enough by themselves, but necessary.
make everyone use git or similar, and have all merge requests reviewed by coders who are both willing and capable of explaining what's wrong with the submitted code AND offer pertinent, targeted suggestions for fixes and improvements.
a code review without learnable critique is next to useless. it's not an opportunity to say "fuck off, your code is shit", it's an opportunity to teach and encourage improvement in your colleagues.
This helps the more experienced coders to improve too - explaining something to someone else is a great way to enhance your own understanding.