Programming Assignment Guide For CS Students
kennelbound writes "For those students just getting started in a Computer Science degree or a career in software development, this guide has been written to help you understand what NOT to do when coding a project. Those with a little more experience should still read it to get a good chuckle (and hopefully the mistakes stated within will not seem too familiar!)"
Computer programming students invariably fall into more than one bad habit. It can be extremely difficult to eradicate them (and many lecturers and professional programmers keep succumbing to them time and again). I wrote this when, in the days leading up to an assignment deadline, I saw these things happening so often that I couldnt help but recall my classmates and I a decade earlier doing exactly the same things as my students.
This article is an attempt to show these irrational attitudes in an ironical way, intending to make our students aware of bad habits without admonishing them.
NOTE: This text was published by ACM's SIGCSE in the June 2004 issue of Inroads, the SIGCSE bulletin.
All about programming, in the strictest sense of the word Ignore messages
Compilers, operating systems, etc. generate error messages designed only to be read by their creators (maybe to justify their salaries). Precious time is wasted reading these messages; time that could be better spent writing code, of course! Error messages make us less productive. Dont fall into the trap. Ignore them.
As for warning messages, ignoring them makes you feel like a professional programmer whos not scared of computers. What better way of showing ones experience as a programmer than delivering a program that generates dozens, no, hundreds of warning messages when it compiles without its author feeling the slightest bit concerned? Everyone can see that youre an experienced, laid-back programmer who is too busy to waste time on drivel.
Dont stop to think
Lets not kid ourselves here. What are we building? A program. What is the only thing that really matters in a program? Code. What really works? Code. Why use outdated resources like pencils, pens or paper? You are a paid-up member of the SMS generation; you dont make a fool of yourself writing time-consuming syllables, right? Then, stop messing around thinking about nothing when theres so much code to write.
You should never stop coding. We all know that error messages are an unacceptable interruption, a pointless obstacle as we go about our work. So what do you do if you get a compiler error message? As you should know by now, reading and understanding it is just not an option.
You can try making some random change to the source code. You never know, you might pull the wool over the compilers eyes. But if this doesnt work, dont waste any more time. NO, dont be tempted by trying to read the message or understanding it. Just keep churning out code - thats the only way of finishing off this horrendous assignment. Youll get to sort the error out later on. And as we all know, errors tend to disappear by themselves if theyre ignored. At the end of the day youll compile, youll
but also mirrordotted :).
This may sound a bit odd, but I went back to my home country Iran for 2 years as a teenager. This is when I had my first insight into computer programming.
At the time I along with most students didnt have a computer, not did I have access to one properly.
I did my first BASIC coding on paper. Looking back, working that way worked extremely well.
Since then I always do some sort of rudimentary pseudo code on paper before implementing using a computer.
note: I never finished high school and I haven't been to university
This is stuff aimed at people without a whole lot of experience programming in first year CS courses.
1. Get a software engineering book, and study the concepts of software design. Even if you're just doing some small little "print a schedule" type assignment, thinking about how you would design a bigger project will help you.
2. Get a good book on algorithms. I'm partial to Introduction to Algorithms but there's lot's of good choices. So when your prof assigns you to do a project using a circular linked list, think about what might be better. But resist the temptation to smart off and try to do better, and complete the assignment the way (s)he says to. Perhaps ask the instructor what they wanted you to learn from the assignment if you feel that the algorithm is particularly inappropriate.
Don't just read the alogrithms, write them from scratch as well until you understand them. Be aware that some algorithms are completely different if you're using a language that starts arrays at [0] than at [1].
3. Take good technical writing courses. Many CS majors can't write well. Being able to clearly communicate is a great skill to have, regardless of what your position is, and it's a good way to differentiate yourself from the masses. Being able to write in American style English is something that many Indian/Chinese/etc. programmers won't be able to offer.
Take business courses, etc. Broaden your horizons in profitable ways.
4. Network, network, network. Not LANs and wireless, but people. They are the ones that will get you jobs in the future, who will provide you with sales leads and consulting. Mingle with people in the field. Mingle with business majors. Start it now, not in your senior year. Today's seniors may be the one's e-mailing you about a great position three years from now when you're about to graduate. I've seen very smart, very talented people sit for months without a job because they didn't start this process early.
5. Get out and enjoy yourself. You have the rest of your life for LAN parties and coding sessions. If you're in college and not working, you are likely never to have the same freedom that you do now. (Excepting unemployment...) Get out, go hiking, meet people of the appropriate sex, see concerts, learn to cook. Virtually no one dies wishing they'd spent more time in front of an LCD screen.
Thanks, but I have my very definitive programming guide already. Mwaahahha
I had a prof that did that, at the University of Waterloo, of all places.
It's one thing to use somebody else's lecture notes. But this guy clearly didn't even read them before coming to class. You'd ask him a question and he'd just say "Uh, I don't know, these aren't my notes." For crying out loud! And I was paying $700 or so for that course! The prof was Mavaddat in case you're curious. If you're ever scheduled to have a course with him, SWITCH as fast as you freaking can! You're better off Googling for stuff and reading other people's PowerPoint slides by yourself.
"Caffeine is not an option. Caffeine is a way of life."
Say things like: Ho! That computer in the computer lab is so crippled, I am sure that my code would run fine on a fresh Windows install.
Yahh, hiii haaaaa! -Major Kong, from Dr. Strangelove
E.g.could be rewrittenor simply(I just finished reading "C Traps and Pitfalls". It contained many amusing errors, but it was very sparse on defensive coding advice.
I wouldn't recommend the book. Read "Code Complete" instead, that's a gem!)
No sig to see here. Move along.