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!)"
I'm sure many people will say this, but you learn much more from making mistakes and working out the problems than by reading a book on common mistakes.
a HUGE thing is not to plagarize code. I was a TA for CS101 at my school, and plagarism is not only rampant, but really really easily detectable. besides, you don't learn anything; although, as one of my professors said, "if you can copy someone else's code and alter it so I can't tell, you may as well have actually done the assignment."
Use the minimum number of keywords in the language as possible. For example, all loops (for, while, do) can all be handled by a simple if and goto statement.
Rhymes that keep their secrets will unfold behind the clouds.There upon the rainbow is the answer to a neverending story
Comment removed based on user account deletion
but also mirrordotted :).
I spent 2 days looking for a one character bug the other day, I hate these!
.. of course when I found it I felt stupid .. and well I should have :) hey wait, maybe I should have posted this Anonymously ...
if (condition);
{
myvar = 1;
}
The block was a lot bigger than myvar = 1, and my eyes kept skipping over the ;
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
For those students just getting started in a Computer Science degree or a career in software development.....
Quit now and take up a skilled trade. The odds that you will be employed in the future are marginal at best. While most here might think that as trolling or flame-bait it's the cold reality. I have several friends who are tradesmen who say in the next 5-10 years there will be a significant shortage of highly qualified tradesmen. Where as everyday more software jobs are going off shore, it's pretty hard to send manual labor off shore and be competitive.
My $0.02
So let me get this straight, you didn't get that the article was a work of satire, yet this is the only part of it you felt needed to be challenged?
Mathematics is made of 50 percent formulas, 50 percent proofs, and 50 percent imagination.
I heartily disagree. Personally, being buzzed (but not hammered) provides my otherwise erratic brain the opportunity to focus intently.
My motto: code drunk, debug sober
bash: rtfm: command not found
Yes, seriously...
.
your code should read like a novel.
After finishing the program, compiling, and debugging it, get out your microphone and one of those speech-to-text programs. Train it if you haven't done so already by reading the presented text for twenty minutes or so. Do the training twice: once when sober and properly intoxicated. (Myself, I grew up in the 1970's and consider alcoholic beverages déclassé, but everyone has their own favorite intoxicant).
Get a picture of your favorite dreamboat celebrity and put it next to the screen. Load your source code on the editor and start the speech-to-text converter in the background.
Take a deep breath and gaze adoringly in eyes of the person in the photo. Pretend that they are hopelessly infatuated with everything that you say and just love to hear you talk about your programming.
Then start talking. Talk about your code. Start at the beginning. Talk about every line and what it does. How it works. How it fits. How totally cool it is. Just go on and on.
When you're done, turn off the speech-to-text generator running in the background and save the hopefully rather large text file.
Go back and cut and paste lines from the source file into the spoken description text file. (Use the speech-to-text engine to make this step go fast.)
Hopefully you will now have about a half a page or more of rambling, but technically dense and accurate, speech text for every line of source code.
This is the proper amount of commentary that every line of code needs.
Put comment markers around your spoken text and lots of white space above and below the actual source lines.
Your program is still good: it compiles and runs. But it now looks like a novel.
This is good! The single line coding format that we all use is an obsolete product from the 1950's when a byte of computer RAM memory cost more than a good restaurant dinner. Those days are gone.
Now you want to be able to read and understand the code quickly. It's far easier to glance and read through pages of rambling dictation describing the code than it is to try to understand 'normal' code with little pissant comments pasted randomly through it.
You're a professional now. Anything that makes your job easier is good
If your CS professor disagrees, give them a copy of your speech-to-text software and a picture of Lindsey Lohan to place next to their screen and have them try it themselves.
Do not slack at your math. You will repeat it. It often takes time. It is very important. Learn to utilize math and make it one of your more powerful tools.
Do not cheat on code assignments. Once again, it may take time but you need it. Messing up and looking through code more than writing it is what really makes you good.
Take hard CS classes. Take advantage of rare courses your school may offer in CS. Take tough classes like compilers or computational geometry. Make sure you take some diverse classes but also try and focus on something a bit that you enjoy.
Take more math. This is a skill that can really differentiate you from other programmers in the industry, If you have good math skills, you can get good paying, secure jobs in fields like computer graphics, physics, medical and other science fields that demand proficient math skills. It will also change the way you think if you really take it seriously and understand that much of the early math is indeed lame, but necessary to understand useful math that you will eventually learn.
Take other classes, like art. You can learn a lot from these things and apply them to what you are doing. Knowing about various things will come in handy at some point.
Learn more than what your school will teach you. It is up to you to read about things in the field, both theory and practical. Learn languages not needed in your school. Play around with things. Put together a cheap Linux computer at home and play around in it if you haven't already. You are interested in this anyways, so this shouldn't be something you have to do.
Maybe CS is not for you. The future is not guaranteed in this field as far as job security is concerned. You may spend a lot of time taking hard classes only to have to end up doing something else. You may not even make it through the program. Personally, I think there will always be a need for well educated, creative, smart people. The analytic skills you can learn will do more for you than anything else. Pay attention.
If you love it and are good at it and really spend the time in school to really learn this art, you could enjoy a career working in an industry you love. If you are ambitious, there will be many trails to be blazed in the future in this young, ever changing field. It's not about "computers". It's about computation, a modern subset of math that we can abstract in electronics. The possibilities are endless and you may invent the next big thing.
"If you are a dreamer, a wisher, a liar, A hope-er, a pray-er, a magic bean buyer
I've got to disagree - for beginning CS students, compiling frequently is an excellent thing to do. I'm a CS TA, and most of the panicky emails I get from students the night before a project is due revolve around small, simple problems that get blown way out of proportion. A single misplaced semicolon can make the compiler spit out dozens of errors for lines of code below it, none of which will make any sense. Errors propogated through code are terribly difficult to detect; your program's output might be incorrect due to something that you wrote two class files ago and have already forgotten about. And then there's the problem of poor program planning combined with infrequent test compilations - namely, the design sucks donkey balls and you just spent three hours laying down the foundation for a code base that is completely useless. I wrote code like this until I because a grad student, and it shows - I spend way less time designing and write far better programs due to multiple test compilations.
As for compile errors, one that ususally scares newer programmers is making a mistake in a header file that in return causes a whole lot of other errors. This happens when you forget to put a ";" in a class definition in a header file, then in the source file, you include "someheader.h" and then include "" below it, I've noticed a lot of compilers spew out odd errors that can very confusing.
Another common compile error deals with mismatched curly brackets, editors like vim will point this out, but I know some 2nd year students here in Computer Engineering that still want to use Notepad and refuse to try anything else.
Anyone know of any others?
While some thought is, of course, necessary I have definitely seen the problem with new programming students of thinking too much.
Basically, they try to understand the whole problem fully before writing the first line of java or C. My feeling is that this is not possible for a new student. There is just too much. Rather you just have to write code at some point. Forcing yourself to try things in code is often the only way to really get started in your first programming language. (After the first one, you should be able to think as much as you want because you should have enough background not to get lost).
I have actually noticed this problem more in girl then guys. Guys tend to rush right in and try to hack it while girls try to understand it fully first. Sometimes the hacking approach is just the necessary one. (Of course this then flips in the second or third CS course where NOT fully thinking through the problem hurts more).
Yeah. Thats what the college of business is there for.
As of tomorrow I will have done 5 assignments in C++ this year. For 4 of those assignments I didn't have a compiler at my home (our program had to compile in Turbo C++, you could tell who used different compilers at home). Instead I had to go to school to debug my programs, so what I did was I'd write out my code at home in a day, go to school and then spend a few days debugging it. For 1 of my assignments (my last one) I had a compiler at home so I could debug as I go. Guess which assignment I actually enjoyed. That's right, the last one. Not knowing if my code will work makes coding unfulfilling. Spending days debugging is tedious and stressful. This just sounds plain lazy. Your code should (with as minimal effort as possible) always be compilable. If you've got a menu that calls 5 modules, write stubs for the modules. Utilise flags. This allows you to compile as you go along. Actually it's closer to "create 100 errors get 10000 error messages, try to sieve through all the messages to find the correct 100." Whereas it's much easier to go through 10 error messages to find the correct 1. You'll notice you tend to get the same 9 error messages each time, whereas having 1000 makes it a lot more difficult. And this is just syntax errors. We're not even talking about logical errors (and yes, there will be some, no-one's perfect). Actually you won't be implementing anything. You haven't implemented it until it's working. And focusing on the higher picture should be done in the PLANNING STAGE. NOT the CODING STAGE. Ideally you shouldn't even be on a computer when writing the algorithm (which is where you focus on the higher picture). You should have a pencil, a rubber and lots of pieces of paper. But even if you are on the computer it should be done in Pseudocode. I bow before your intelligence, for you can write code without debugging it at all and only have "a couple of errors." You must truly be a coding genius. That or you're talking out you're ass. I haven't met anyone who can do what you just described. Not any students and not any teachers. Either you write simple code or you're a liar and/or a troll. Because the chances of that being true is (IMO) very small.
I've gone back to school, and have noticed that I have something that makes me a much better programmer than my peers.
Over the years, I've developed a little voice at the back of my head that speaks up every time I am having problems with code I've written.
It asks me, "Is the problem you're having a result of a broken implementation, or is it the result of a design that lends itself to a broken implementation?"
With a good design, the code is not only easy to bang out, but the good design will tend to prevent you from making errors in the implementation. With a poor design, the code is hard to bang out, and it actually tends to cause you to make errors.
Develop this programming conscience. Constantly ask yourself, "Is my bone-headedness in the code itself, or the design?".
This will make your life easier.
mavaddat prefer people not post on slashdot using mavaddat name
mavaddat work very long time downloading lecture notes for ungrateful kids paying only $700!
mavaddat remind you 30" lcd monitor needing to purchase but cost much more!!!!
MAVADDAT THE PROFESSOR!!!!! MAVADDAT BREAK HEAD WITH PLAGIARIZED CD!!!!!
10 PRINT CHR$(205.5+RND(1)); : GOTO 10