Ask Slashdot: How Do You Make Novice Programmers More Professional? 347
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?
Very simple (Score:5, Funny)
Let them accumulate experience and wisdom, and when they achieve it then tell them they're too old to work in this field.
Re: (Score:2)
Re: (Score:2)
They only have three hours in which to do this.
Personally, I'd suggest beating them over the heads with printed copies of man pages whilst trying to emphasize the importance of commenting their goddammed code.
But that's just me.
Re: (Score:3)
I'd rather teach them to keep their functions short and their function titles descriptive, so that the code comments itself. Nothing annoys me more than comments like:
for (i = 0; i < 3; i++) // Loop three times
{
some_fn();
}
Comments should be about why, not what. What should be easily visible in your code on its own.
Re: (Score:2)
"Comments should be about why, not what. What should be easily visible in your code on its own."
Think of it as comments needing to be one level above the code. Function and section header descriptions should be two levels above.
Re: (Score:3)
They only have three hours in which to do this.
Personally, I'd suggest beating them over the heads with printed copies of man pages whilst trying to emphasize the importance of commenting their goddammed code.
But that's just me.
If code needs comments your probably doing it wrong. Code should instead be broken down into small units with meaningful method names and tests.
There are certain edge cases where you need to include a comment because you might be doing something strange then the comment can explain why you doing, for the most part though the code should be easy to follow just by reading through the method names.
Oh, and while we are on the subject, as soon as you use And in a method name really try and split it into two sepe
Re: (Score:3)
Breaking code into small units results in excessive call / return pairs and consequent poor performance.
Replacing comments with descriptive method names causes hard-to-read long lines.
Comments have several audiences, including the original programmer, people familiar with the project who have to support or modify the code, and complete strangers who have to figure out what everything does. Descriptive names alone don't do the job, and having to read tests to understand the code means having to double the n
Re: (Score:3)
> First of all, I have an issue in using the concept of "professional programmer"
Professional programmer, noun, someone who has made programming their primary CAREER and has a recognized formal education.
In contradistinction to Amateur, noun, someone who has no formal training, and may, or may not do the job better. Programming is NOT their primary career.
Re: (Score:2)
Professional programmer, noun, someone who has made programming their primary CAREER and has a recognized formal education.
There is no need to have a recognised formal education to be a good developer (although it sometimes helps you get your first graduate junior developer job). Far more useful is a few years spent contributing to open source projects and getting used to getting your code reviewed.
Once you have been programming professionally for a few years it is all about your previous roles, nobody gives two hoots about your academic background if you ace the interviews, do well on the technical tests and have at least 2 o
Re: (Score:2)
I... I could laugh... or cry... been there done that... did you stay in development or start selling shoes?
Re: Very simple (Score:4, Insightful)
Object oriented is a good idea, so long as they have experience doing so (at least in school or at home). If not, just tell them to try to keep all of their functions down to less than X lines. Each with a very explicit name, to the point that the function name itself is practically a comment.
I'd also print out the following and have it near their desk:
----------
RULES FOR OPTIMIZATION:
1) Don't.
2) (Experts Only) Don't yet.
----------
I remember when I was starting out, being able to right "fast" code felt like the mark of a good programmer, and often rendered code unreadable and bug-prone by optimizing sections that had no business being optimized in the first place. It took time to learn that good programming is clear, easy to understand programming, with optimization done by first identifying a problem, profiling the code to see what's actually consuming cycles, and focusing on the low-hanging fruit therein.
Part of it also was that a lot of the "optimizations" aren't actually optimizations. For example, loop unrolling, and very often loop checks, the compiler does that for you, so I was just uglifying my code for no good reason and getting full of myself for "optimizing" when I was doing no such thing. My interest in people writing "fast" code however led to me reading Carmack and Abrash, which led to getting a better understanding of what actually helps vs. what's a waste of time, and where to focus your efforts.
Re: (Score:2)
+1 Painfully True.
3-hour seminar (Score:2)
No. You can learn them whelps good programmin' praktice with a 3-hour corporate seminar. None of this Malcolm Gladwell ten-thousand hours of practice "stuff."
Programmin' talent comes in a can!
Focus on a few key things (Score:3)
Re:Focus on a few key things (Score:5, Insightful)
My company hires many young non-degreed self-taught programmers (because that is all we can find). We give them a reading list, and require them to spend about four hours per week doing professional reading and studying on their own time. The books include "Clean Code", "Programming Pearls", "The Pragmatic Programmer", several books on algorithms, code complexity, and books on software engineering such as "The Mythical Man-Month" and "Joel on Software". A lot of it is stuff that they would have learned if they had a CS degree. They can substitute books of their own choosing with pre-approval.
Many of these younglings have matured into great programmers. I hired one guy while he was a junior in high school. He worked for several years, and then decided to go to college, and ended up getting a PhD from Stanford.
Re:Focus on a few key things (Score:4, Insightful)
. We give them a reading list, and require them to spend about four hours per week doing professional reading and studying on their own time. The books include "Clean Code", "Programming Pearls", "The Pragmatic Programmer", several books on algorithms, code complexity, and books on software engineering such as "The Mythical Man-Month" and "Joel on Software".
So, question........how do you ensure that they actually read them?
Re: (Score:2)
The reading list is obviously chosen from a select set of things that outline skills they're expected to know to do their jobs. If you're someone who has already read these books and understood them then it's pretty easy to see who finished and understood the reading assignments just by reviewing their code.
Re:Focus on a few key things (Score:5, Insightful)
So, question........how do you ensure that they actually read them?
I ask them what they thought of the book, what they learned from it, and what questions they have that the book didn't answer.
These are self-taught people that passed a rigorous interview process consisting mostly of coding. They want to learn. I have never caught any of them faking their professional development.
Re: (Score:3)
These are self-taught people that passed a rigorous interview process consisting mostly of coding. They want to learn.
Good point.
Re: (Score:2)
If they say the book was good, they didn't actually read it.
Okay, I only read one of those books and while it was informative I didn't like it.
Re:Focus on a few key things (Score:5, Insightful)
because that is all we can find
Is there an implicit "for cheap" at the end there? Because lots of old guys are frequently bellyaching here about how after age 40/50 they can't get any work (and one presumes they know the ropes by then).
Re: (Score:3, Interesting)
Is there an implicit "for cheap" at the end there?
No. When we make an offer, it is almost never rejected as being "too low". In fact, it is seldom rejected at all. We just don't get enough qualified applicants (CS degrees AND actually able to write code (the first does not imply the second)). This is in San Jose, California.
Because lots of old guys are frequently bellyaching here about how after age 40/50 they can't get any work
By the time someone is 40-50, they should have a broad skillset, and a deep network of former colleagues. The old guys whining about being unable to find a job are mostly turds that have serially rejected and their former co-worker
Re: (Score:2, Interesting)
By the time someone is 40-50, they should have a broad skillset, and a deep network of former colleagues. The old guys whining about being unable to find a job are mostly turds that have serially rejected and their former co-workers are glad to be rid of them. There are a LOT of people like that out there. These are the guys you remember from college who wanted to copy your assignment an hour before it was due, because they had no idea how to do it themselves, the dead weight on your programming team, and now they are old.
Condescending asshole, you're forgetting about the entire generation of socially awkward nerds whose childhood coincided with the personal computer revolution, who grew up interacting with machines instead of people, who never learned social skills, and who never accumulated a professional network because they'd rather not interact with people like you. Those were the technically inclined kids who were doing all your programming assignments while you dead weight bastard cheated your way through college. T
Re:Focus on a few key things (Score:5, Interesting)
until social scum like you forced the socially awkward out of the industry which they built for you
I'd say that the industry has evolved beyond the basement dwelling coder; social skills are more important in IT these days, and the industry is better for it. But now that there are fewer job openings, employers get to be more picky, and they don't always select on the right criteria. A strong emphasis on social skills where they aren't needed, for example. Or just hiring the most likable of qualifying candidates. Add to that the widespread notion that programming is a young man's game, that good programmers always move on to do other stuff at some point, that you're a loser dinosaur if you're still coding past your 30s. I recently had a chat with some ex-colleagues about hiring practices, and I got the impression that their companies are looking for people who are either college graduates, or experienced programmers who at the very least have developed and launched a wildly successful new OS or social media service. But a middle aged coder who is "merely" very good is suspect: why isn't he an architect or a project manager?
Re: (Score:3)
But a middle aged coder who is "merely" very good is suspect: why isn't he an architect or a project manager?
For me, I started out in small companies where I was doing a bit of everything, so the title didn't include architect etc, but I had projects that were challenging and fun, and I just got in there and did them. Later on when I started looking round for another job, I had piss all to prove what I had done or what I knew, and had a bunch of young quiz masters trying determine if I knew something, but I couldn't tell what it was they were looking for, it certainly didn't relate to the decades of experience I
Re: (Score:2)
By the time someone is 40-50, they should have a broad skillset, and a deep network of former colleagues. The old guys whining about being unable to find a job are mostly turds that have serially rejected and their former co-workers are glad to be rid of them. There are a LOT of people like that out there. These are the guys you remember from college who wanted to copy your assignment an hour before it was due, because they had no idea how to do it themselves, the dead weight on your programming team, and now they are old.
Condescending asshole, you're forgetting about the entire generation of socially awkward nerds whose childhood coincided with the personal computer revolution, who grew up interacting with machines instead of people, who never learned social skills, and who never accumulated a professional network because they'd rather not interact with people like you. Those were the technically inclined kids who were doing all your programming assignments while you dead weight bastard cheated your way through college. Those nerd kids grew up, and they're literally 40-year-old virgins now. Until recently they were able to make a decent living using only their technical skills, until social scum like you forced the socially awkward out of the industry which they built for you.
I agree with most of that, tho also I have the problem that most of my network of former colleagues have retired or died. Guess I could have moved on to managing other developers but I didn't enjoy that, and stuck with doing what does give me reward.
Re:Focus on a few key things (Score:5, Insightful)
Project Euler is a test of math skills, not programming skills. The two are often conflated, but in reality overlap only rarely. In many branches of programming you can function very well while knowing nothing more than what +, -, *, and / do.
Moreover, the problems are arranged in chains that lead up from basic understanding to advanced understanding. Simply dumping one at random into the lap of an unprepared person is very likely to weed out all the excellent programmers, leaving only math students - who I'm guessing aren't responding to your ads to begin with. So that's your problem right there: you ask for one skillset, and then you are surprised that your test for another skillset isn't working out. It isn't the quality of your candidates. It's you.
If this wasn't clear enough: I've been programming since the eighties, I have my masters degree, and somehow they trust the software I write controlling (which literally means "deciding life and death of") spacecraft costing 300 million euro and up. If I ever fuck up I guarantee you _will_ read about it here on slashdot. Yet somehow I have _never_ needed to determine if a number is prime, or indeed any of the other circus tricks at Project Euler.
Re: (Score:2)
Project Euler is a test of math skills, not programming skills.
Junior high school math. I haven't seen any that require any trig or calculus. My daughter is in 9th grade, and has taken algebra and geometry, and learned Python last year. She hasn't had any trouble with the first 100 problems.
I agree that they require little programming skill. That is why they are a good test of minimal ability.
Here is a sample problem:
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the lar
Re: (Score:2)
Questions not relevant to the actual job done are not a good indicator of future success. These types of questions are great for recent students or people who enjoy riddles problems though. There is a whole field of study about learning and testing. There has been numerous studies done showing that these types of things don't correlate. Interviewers use them because they are a cheap and fast way to weed people out.
Colleges should add a pedagogy classes to help interviewers understand how to test people more
Re:Focus on a few key things (Score:4, Interesting)
I blame the puzzle-question job interviews for the rich variety of clever code out there that is hidden behind horrible user interfaces.
Re: (Score:3)
I blame the puzzle-question job interviews for the rich variety of clever code out there
This is not a "puzzle-question". It is a simple and clear problem with an obvious solution: A nested loop with a comparison, that can be done with either strings or mathematically digit by digit. The only question is whether you have the coding skills to turn a one sentence spec into 10 lines of code. Most programmers can. A surprising number cannot.
Would I hire someone who can solve this problem? Maybe. Maybe not.
Would I hire someone who cannot solve this problem? Absolutely not.
Re: (Score:2)
"spacecraft costing 300 million euro and up. If I ever fuck up I guarantee you _will_ read about it here on slashdot. "
And if your EUR 300M spacecraft reaches its goal, and accomplishes wondrous things there, but you happen to be wearing the wrong shirt at the press conference, you will be hearing from Huffington Post forever.
Re: (Score:2)
Re: (Score:2)
Let me guess. You only try to hire people who are looking for a job. Am I right?
Re: (Score:2)
Re:Focus on a few key things (Score:5, Informative)
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
Re: (Score:2)
Great list! However you missed the one quintessential CS book.
Godel, Escher, Bach: An Eternal Golden Braid [amazon.com]
-- /. STILL can't properly display Unicode?! GÃdel *sigh*
It's 2017, and
Re: (Score:2)
Great list! However you missed the one quintessential CS book.
Godel, Escher, Bach: An Eternal Golden Braid [amazon.com]
Actually, I didn't miss it. GEB used to be on my list. But I removed it. To really appreciate the book, you need to already have a foundational knowledge of completeness, recursion, complexity, emergent phenomena, etc. But it isn't such a good book for learning those topics in the first place. Non-tech people can enjoy reading the book while not even realizing how much is whoosing over their head.
Re: (Score:2)
But one thing I often find lacking in both amateur programmers and coders with a formal education is the skills to do OO properly. These days most of them know the basics: class vs instance, abstract classes, inheritance and overloading etc, but what's missing is the knowledge and skill to design a good object model. In an OOP course I did years ago, students were given t
Re: (Score:3)
I gather the notion of design patterns came from an architect (buildings) who visited Italian towns to try to find out why they "worked". In other words, he was trying to learn from established experience. And the film director Ridley Scott said that the voice of experience is what he calls intuition. In a way it is the opposite of math puzzles. It's having enough experience in organising things that you start to intuitively foresee that some arrangements will turn out more simple and elegant and maintainab
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
My company hires many young non-degreed self-taught programmers (because that is all we can find). We give them a reading list, and require them to spend about four hours per week doing professional reading and studying on their own time.
While your approach has merit it would seem your company is setting itself up for a lawsuit over unpaid wages, unless the new hires are truly exempt employees.
Re: (Score:2)
Just having a suggested reading list sounds amazing to me! I've unfortunately never worked for a company I thought put continuous effort into training their employees to be more effective. It seems like the only employee benefit I've never had from a job... Are you hiring now?
I'm self taught but went back to school after a ten year absence and got my CS degree. I recently left my current employer because they were too willing to hire under-qualified candidates (myself included) without having a good support
Re: (Score:3)
I take exception to the expectation that they're supposed to complete a company assignment on their own time. Where I work now they tend to run a "book club" where once a week the current group gets together and discusses the latest chapter or so, asks or answers question, and a moderator/mentor is often present to explain why we do what was discussed.
(Or why, after consideration, we decided NOT to do that...)
Re:Focus on a few key things (Score:4, Insightful)
It's good that early on, you're weening them away from the fiction that their time doesn't belong to the company.
You don't do professional development for "the company". You do it for yourself.
Re: (Score:3)
spend more time reading code than writing (Score:2, Insightful)
Find some good source code for them to study
Re: (Score:2)
Then give them a part to work on and tell them to break it down into pieces no larger than about 40 to 50 rows, let them also write code that tests their code so that they can explain what each piece do.
Today the tools for maintaining code are a lot better than what many of us suffered in the 80's. If we were lucky it was 'vi', not 'vim'. Or on other platforms like OpenVMS it was "EDIT /EDT". A few here may remember EDLIN from DOS. Then realize that in the beginning programmers coded on punch cards that had
Re: (Score:2)
Darn the person who dropped the box of cards and had to sort them out in the right order.
For thar you have a card sorter, later computers sorted the cards first anyway, and depending on your punch card system, you can easily sort them with a knitting needle.
Poor (Score:5, Insightful)
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...
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.
I think this is already going down the wrong path. Those are just technical skills and practices that will be picked up over time, and some kind of workshop isn't really the place to learn them imo.
The important differences between a new guy and someone with a decent bit of professional experience under their belt isn't so much in technical skills or adherence to best practices, but it's more of a mindset and general direction thing. Once you've seen a few projects from start to completion, you start to recognize certain patterns and points where things can go really well or really bad. Once you've worked on a bunch of different teams, you start to recognize how different people contribute to a team dynamic and the various ways in which a team functions. You start to understand how your job integrates with the rest of our department and the rest of the business, how the whole management structure works, and what really drives most technical decisions (hint: technical merit is often the last thing driving a decision).
The problem is, you can't really teach that. So I guess my answer would really be very generic "how to be a good employee" type stuff: Take ownership of your problems, check your ego, play well with others, etc. Being a more professional programmer has little imo to do with being a better programmer and more to do with being a better professional. You become a more professional programmer by learning how to have a productive meeting with management about your project, not by learning the magic of continuous integration.
Re: (Score:3)
I think the question is more like: What rubber chickens do I throw at the new people to make the snobby people feel better about letting in the barbarians?
Re: (Score:2)
What I want is the experienced programmers to actually act like experienced programmers! Too many self taught people with EE or physics background with absolutely atrocious coding skills, no concept of algorithms, and an attitude that quick and dirty is the proper way to do things. I can't believe how some people manage to get an advanced degree without possessing any analytical skills.
At least novices can be trained.
Re: (Score:2)
I think this partly falls on the people leading a technical project. Yes, programmers should take initiative to produce the best code they can, and many do, but people have a tendency to the path of least resistance, and even when they are legitimately trying, they may lack the experience to intuitively know that what they are producing is sub-par.
Good technical leadership sets _and enforces_ standards. This should happen at every level, with the quality of the standards increasing as the experience of the
Re: (Score:2)
Some of these people ARE the leaders. They become leaders because they have work experience, or because because they've been at the company the longest, or because they're the only person working on a key piece of the project that no one else knows. (ie, someone understands radio so they get put in charge of doing the radio code, or they were the person who wrote all the unintelligible code back when the company was a startup and now they're senior lead in charge of screwing it up)
Re: (Score:2)
These are management problems and are way deeper than programmers producing shitty code. Unfortunately they arn't that uncommon.
Re: (Score:2)
The most important thing is to make them realise that there are techniques and patterns to learn and that they are what separate the professionals from the amateurs.
To that end some introductory stuff about things like variable naming and code organisation could be really helpful. Give them a starting point and enough to see the value in studying it further.
Invert it (Score:2)
Start with some practical code/app samples that demonstrate clear trouble. Ask them to participate -- see if they can solve the trouble. Then show how the original dev got themselves into that trouble, and the "professional" thing you would have applied to avoid it.
Bonus points for going comedic with examples that are ridiculous to the extreme [destroyallsoftware.com].
Re:Invert it (Score:5, Insightful)
I taught a class for some new programmers fairly recently out of school. They knew PHP and a few other languages, so they could do basic coding. However, we needed them to know Perl and our app.
I taught 5 classes of 1 hour each, 2 every week. There was about 20 minutes of lecture up front to explain ideas beyond the basics, and they were encouraged to ask questions during that. I also gave them a problem to solve at end of the lessons to complete for next time. The homework at the beginning was solvable in 10-20 lines; the ones at the end took nearly 50 lines. The last ~40 minutes of a session was spent going over the homework and discussing it. Each person presented their answer for everyone to look at and were asked what they found hard to do and why and we talked about solutions with emphasis on the why.
Part of the reason it worked well was because I stressed there was not 1 definitive answer, not even mine
The discussion of the homework allowed them to see how others did it, I also showed my answer though I always went last. We also talked about ways to do it better with a large emphasis on why something was better, trade-offs, etc. I also did my best to point them in the direction of good habits: comments, testing, modularization, maintainability, etc. I also mentioned useful books, most of which have been mentioned by others.
If I ever had to teach something like this again, I believe I'd do it the same way. All of the class members gave me good feedback and said they liked the format.
Make them read these books... (Score:3)
Let them see lots of good code (Score:5, Informative)
For programming skill, I'm going to suggest Zero Bugs and Program Faster [amazon.com]. 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.
Re: (Score:2)
Most coders will read more than they write, especially if they forget their own code.
I learned a lot from MESS/MAME code, and I do almost 0 C today. But I remember how to write. Write, read someone else, and give feedback.
Clever one liners are neat, but almost always compile the same as using intermediate variables. One is easier to read and debug.
Re:Let them see lots of good code (Score:4, Insightful)
Positive examples are good. So are negative ones. I'd recommend giving a novice ownership of a large, ugly, very messy, but heavily used hunk of software and have them "clean it up". The ones that don't kill themselves will become professional programmers.
Zero Bugs and Program Faster, 10 minutes in bathro (Score:2)
> For programming skill, I'm going to suggest Zero Bugs and Program Faster
I second that, good book. Specifically it's a collection of good ideas, each of which takes about ten minutes to read. Zero Bugs and Program Faster would be an excellent choice if you want to spend just a few minutes each day, to have continuous slow improvement. It was my bathroom reading for a while and it was perfect for that.
(If you assembled the top 50 best forum posts related to creating robust software, you'd end up with s
Re: (Score:2)
>> For programming skill, I'm going to suggest Zero Bugs and Program Faster
> I second that, good book.
I'll third that book. Great book !
What worked for me (Score:4, Insightful)
Quickly learned how to write good code that I could understand a year after release.
Re: (Score:2)
Re: (Score:2)
Memories... I wrote a Z80 emulator as well for my job. We were doing development for the Litton Briefcase Terminal (AN/PYC-1) and Digital Communications Terminal (AN/PSC-2).
We were developing on a Unix host (originally ZILOG ZEUS for Z8000, then SysV68K for MC68030). We had Z80's as slave I/O processors. I wrote an emulator (that also emulated some of our custom hardware (such as hardware swap segments).
The good old days...
Re: (Score:3)
If you meant more easier understand assembly....bah maybe easier for us, old timers that grew up with it.
The thing is, assembler isn't hard. Whats "hard" is knowing the architecture so that your code is efficient, which is a different thing entirely. Back in the day it was all about instruction cycle counts (latency.) These days its about instruction throughput, which execution units will be used, knowing what memory will still be in the caches, and so forth. Know your architecture.
The real problem is that "you dont need to know assembler" because "compilers are better than assembler programmers" is just a
Professional or Competent (Score:3)
If a programmer has a willing attitude, and puts in a good effort, the competence will come with time.
No matter how competent, a programmer whose attitude is lacking, or whose effort is lacking will hinder whatever project they're a part of.
As for building competence, I really liked "Code Complete"
Re: (Score:2)
I would have brought up the distinction between "professional" and "competent" but someone beat me to it.
However, neither of these labels have a specific meaning. How do you know if a programmer is "competent"? It is easier to tell if a programmer is incompetent, but the line between the two states is fuzzy, particularly since the competency criteria depend on context such as specific languages, specific hardware, and purpose of the software. An assembly language programmer may be perfectly competent or eve
Indentation (Score:2)
How can he teach the next generation how to code? (Score:2)
Good hardware, good software, great teachers, a good environment to learn, help with computer tasks that build on many years of quality math and science education.
Private schools build on math, art, CS classes over years. The student is then full prepared for quality private higher education.
Once graduated such people are fully ready for the work force and have the connections to find work they enjoy.
Thats years of quality math and science
Re: (Score:2)
Its also showing the world a person can study outdated or any new programming concepts.
Slashdot is for retards (Score:4)
How about paying proper experienced people, and put them orienting your newbies?
Re: (Score:2)
More like trying to make a monkey walk like a human. Education is overrated. There are lots of dummies who get degrees, especially bachelors degrees. Find an intelligent person and they can learn whatever they need in a matter of days or weeks. Writing good code isn't really that hard. It's just machine building--an exercise in simple logic. Be smart enough to recognize other smart people to hire. Unfortunately this requires that you are intelligent yourself. Intelligence and a willingness to work hard are
Re: (Score:3)
Money is also a problem. As in the OP, they recruit unexperienced people because they do not want to pay a fair ongoing market rate.
People are also there a couple of years in that sweat shops and then move on to greener pastures.
Writing code is not really that hard, writing good code is hard. It has to be simple logic hardwired to people with good
Re: (Score:2)
Maybe you work there for posting that.
A more apt question would be: my nephew just had the driving permit, what do I have to do for her to drive my taxi?
Two Links (Score:2)
First, read this: http://kotaku.com/5975610/the-... [kotaku.com]
That is an analysis of the coding style used in the Doom 3 source code
Next, read this: ftp://ftp.idsoftware.com/idstu... [idsoftware.com]
It is linked within the first article, but it is important enough to directly reference. It is id Software's official programming guidelines. Seriously, just having clean, clear, consistent guidelines for source code makes a world of difference in quality.
The very first thing to teach young'ns is this:
"Programs must be written for people t
This is a continuous process, not one-time trainin (Score:2)
Accept that this isn't a single tutorial, but a continuous process of teaching and learning. And failing! Here's some tips I recommend:
1. Don't dump every best practice you can on them at once.
2. As you see individuals demonstrate these skills, have them present it to the group.
3. Use code reviews so that they are motivated to catch each others mistakes during reviews, then are motivated to not make those mistakes themselves.
4. Have senior members of the team demonstrate these practices and participate in
rigor (Score:3)
Professional developer turned trainer (Score:4, Informative)
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
What are you thinking? (Score:2)
Send them on a Computer Science degree course. ... or maybe you're one of those people that would be happy if your surgeon turns out to actually be a plumber that just felt like having a go at surgery after watching a youtube video.
Its clueless to think that programming to a professional level is something you can learn in a few hours.
Pair Programming (Score:2)
Recommend some books. (Score:2)
case examples (Score:2)
Demonstrate the value of good practice. The difference between inexperience and experience is the experienced have made the mistakes and seen the consequences of other mistakes. The point of all those software approaches is that they improve end software quality,and medium to longer term improve maintainability and extensiblility of the code. (If they don't achieve any of those, you probably should get rid of the process).
The real problem with inexperienced programmers is they haven't seen the result on a l
We worship at the altar of youth here. (Score:5, Insightful)
The problem is that our industry, unlike every other single industry except acting and modeling (and note neither are known for "intelligence") worship at the altar of youth. I don't know the number of people I've encountered who tell me that by being older, my experience is worthless since all the stuff I've learned has become obsolete.
This, despite the fact that the dominant operating systems used in most systems is based on an operating system that is nearly 50 years old, [wikipedia.org] the "new" features being added to many "modern" languages are really concepts from languages that are between 50 [wikipedia.org] and 60 years old or older, [wikipedia.org] and most of the concepts we bandy about as cutting edge were developed from 20 [wikipedia.org] to 50 years ago. [wikipedia.org]
It also doesn't help that the youth whose accomplishments we worship usually get concepts wrong. I don't know the number of times I've seen someone claim code was refactored along some new-fangled "improvement" [www.objc.io] over an "outdated" design pattern who wrote objects that bare no resemblance to the pattern they claim to be following. (In the case above, the classes they used included "modules" and "models", neither which are part of the VIPER backronym.) And when I indicate that the "massive view controller" problem often represents a misunderstanding as to what constitutes a model and what constitutes a view, I'm told that I have no idea what I'm talking about--despite having more experience than the critic has been alive, and despite graduating from Caltech--meaning I'm probably not a complete idiot.)
Our industry is rife with arrogance, and often the arrogance of the young and inexperienced. Our industry seems to value "cowboys" despite doing everything it can (with the management technique "flavor of the month" [techrepublic.com]) to stop "cowboys." Our industry is agist, [businessinsider.com] sexist, [cbsnews.com] one where the blind leads the blind, and seminal works attempting to understand the problem of development [wikipedia.org] go ignored.
How many of you have seen code which seems developed using "design pattern" roulette? Don't know what you're doing? Spin the wheel!
Ours is also one of the fewest industries based on scientific research which blatantly ignores the research, unless it is popularized in shallow books which rarely explore anything in depth. We have a constant churn [cleancoder.com] of technologies which are often pointless, introducing new languages using extreme hype [apple.com] which is often unwarranted as those languages seldom expand beyond a basic domain representing a subset of LISP. [paulgraham.com] I can't think of a single developer I've met professionally who belong to the ACM [paulgraham.com] or to IEEE, [ieee.org] and when they run into an interesting problem tend to search Github or Stack Overflow, [techcrunch.com] even when it is a basic algorithm problem. (I've met programmers with years of experience who couldn't write code to maintain a linked list.)
So what do we do?
Beats the hell out of me. You cannot teach if your audience revels in its ignorance and doesn't
revision control and code reviews are essential (Score:4, Informative)
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.
That's good. How to learn, and why to learn (Score:3)
> Teach them to have pride in their work, and do things well or not do them
With just three hours, if it's not three hours every month, I think this is on the right track. In limited time, you may get the best bang for the buck teaching them how (and why!) to learn rather than teaching technical details.
You can present things like code review (peer review) and automated tools that look for code smells. The dangers of stackoverflow.com and how to know which answers are good.
First, however, you need the W
Lol. A thing that pages people (by email/phone) (Score:2)
That's funny; as I wrote that it didn't occur to me we used to have physical devices called pagers, though they were actually pagees (they got paged). I was thinking of thr monitoring systems that page people.
What he's really aasking... (Score:2)
What he's really asking is "How do I make a millenial not".
Once you find the answer to that, my friend, please come back and tell the rest of us.
Re: (Score:2)
Teach them to have pride in their work, and do things well or not do them at all.
One important aspect of coding that gets too little attention these days is, imagine if you were employed by the same company for many years, and had to go back and revisit your code from a year or more back, to make enhancements or whatever. Did you make code that you yourself could understand quickly, 12 months after you wrote it?
You may work in a team who have set some basic rules and standards for code, but even within those boundaries you can make code easy or hard to understand. Think of your future
Re: (Score:3)
Fixing someone else's code is a great way to learn how to write code. Not the algorithm, but the commenting and readability and maintainability.
Other things to make novices more professional:
1) Try and stick to "best practices". Things like "DRY" - don't repeat yourself (don't copy code). Helps maintainability dramatically.
2) Get an idea of patterns.
3) Joining groups like the Linux Foundation or ACM or other professional groups.
4) Reading some of the books called out in other posts in this thread.
Being pr
Re: (Score:2)
Also, focusing on writing modular and generic code. Modular meaning minimal dependencies, and generic meaning it can handle multiple situations, not just the one initially envisioned. Being able to write modular and generic code is definitely professional IMO.
Re: (Score:2)
Nono, sucking cock is how your bosses GET HEAD, not get AHEAD.
Re: (Score:2)
Agree.
Also kinda said it above somewhere, but I think it's really important to set a standard early on. If you accept shitty work from them, they'll keep submitting shitty work (either because it's the path of least effort, or they just don't know it's shitty).
Do code reviews, enforce them, require their work to meet a certain level of quality (and kick it back when it doesn't), and most people people will rise to that standard. If you enforce that all public methods must have good comments, and consistentl
Re: (Score:2)
Why would anyone want to be a professional programmer if that is what it is all about? It doesn't sound particularly fun or challenging. It sounds like more like something out of 1984 or Brazil. I like to code because it is fun to build a machine--a sort of intricate wind up toy--that you actually get to run eventually. What you describe sounds more like being a slave. I guess I can see why they have to pay so much or go to India. That's not how I would want to live my life. Do these 'professional' programm
Meeting requirements 40 years in the future (Score:5, Interesting)
As you said, the common way of getting software requirements doesn't work too well, and certainly doesn't work *reliably*.
I have a book from the 1970s that describes many of the programs I use every week. They still serve the requirements 40 years later. I'll come back to that set of programs, and how they predicted requirements 40 years down the road, at the end of my post.
Before getting to the 40 year old programs that are still used daily around the world, this topic reminds me of one of the best software design tips that I've been taught. In retrospect it seems obvious, but many programmers haven't thought to do it, and most don't insist on doing it.
90% of the time, you're writing software to better do something that's currently being done some other way. Perhaps you're replacing legacy software, perhaps it's currently being done "manually", people entering data one item at a time. Perhaps you're replacing a paper-based system. Most of the time, you're replacing *some* method of doing the same task.
It logically follows, then, that to fully understand the process, it's requirements and idiosyncrasies, you can watch the people actually doing it. Even better, have them show you how they do it, then try to do the job yourself while they watch and correct you or point out things to be careful of. Take notes during this. Most likely, the way they are using the old system is NOT how it was designed to be used, because the designers of the old system weren't clear on the requirements. But users find a way of meeting their requirements. Watching how they do that shows you what they actually need to get their job done.
Already just by watching them do the task you'll understand the requirements far better than you would by having a meeting with their boss's boss (the common, bad, way to get requirements). After watching them do the task, next ask them two questions:
What about the current process or tools is frustrating for you, or slows you down?
Pretending *anything* is possible, what would your impossible wishes be for this?
The second question often elicits ideas that allow the programmer to say "I can do that, that's easy". Then you begin to glow with heavenly lights because they thought their wish couldn't possibly be granted. Truly, I've done EASY programming tasks that have garnered me a reputation for being able to do the impossible, simply by asking the users what impossible features they wish I could provide. Their conception of what's easy and what's impossible is totally unrelated to what a good programmer can actually do. (You've probably noticed users often think it should be easy for us to do something that's actually nearly impossible. The flip side of that same ignorance is that they think we can't do stuff that we can actually do pretty easily.)
I didn't come up with any of this myself, these aren't my genius ideas and I wouldn't expect anyone else to think of these things. These are things I've been taught along the way, and I wouldn't expect another programmer to think of them, until they are also taught these ideas.
One more thought, or set of thoughts about foreseeing requirements. I was also taught that you can, fairly easily, plan for and program for future requirements without knowing what those future requirements will be. There are two major ways of doing that, both closely related. One is to avoid hardcoding unnecessary limitations. As an example, configuration for my software never has the user provide a configuration value. Instead, each configuration item is a LIST. If my software can send email notifications, it isn't configured with an email address to send to, it's configured with a list of email addreses. If it can read from a data file, it can read from a list of data files, etc. In the code, the added flexibility requires just this additional code:
foreach {
}
That's it. Just "foreach" whenever a configured value is used makes the whole system far more flexible. This is an example of not ar
Re: (Score:2)
^not
Re: (Score:2)
NO.
Tell them to go into Web Development.
Then be hired by Slashdot. Then create with a Slashdot site that doesn't jump up and down like a God Damned Fucking spastic French Poodle when you are trying to read/post/moderate the fucking articles.
Based on how Slashdot pages are behaving, they don't even have trained monkeys working for them, but rather drooling, hydrocephalic, brain damaged shit heads that delight in ruining any web page they can smear their feces on.
HOLY FUCKING SHIT Slashdot!!!!
WHAT THEY FUCK??