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
rule one: do not post vulnerable servers on slashdot without a mirror
"goodbye and hello, as always" ~Prince Corwin, from Zelazny's Amber series
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.
Not cheating would be a good important one.
OBVIOUS, but always missed. If you need to cheat, change majors.
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
Get your site linked from slashdot.
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
I was hoping for something educational and instead I found a collection of jokes that I don't find very amusing. I mean sure I'm smirking, but shouldn't something that took that many bytes at least make me chuckle?
I found that if you googled most of the CS lecture notes, most of them were plagiarized from some other school....
eat shiat and bark at the moon
Anyone want to see it? If you can get the page to load, click on the chart icon which leads you here...
12:32 EST 20 octubre 2004 1223... Took 300 hits since 2 minutes ago.. Neat
Irony - look it up.
I highly (so to speak) advise avoiding coding under the influence of daytime cold medicine. The nighttime ones are not so bad, as they make me go to sleep and stay away from my keyboard. Dayquil on the other hand...
Well, the code was 100% accurate and fast, but when I went to refactor it, the logic was so bizarre that it was easier to rewrite it from scratch. It didn't run any faster [insert snide comment about my lack of skill here], but at least some random person could sit down and figure out what was going on afterwords.
Do not, under any circumstances, code under the influence of alcohol.
This was actually a rule at a company for which I worked. We'd occasionally have beer or wine at company parties and such, and writing code after drinking was verboten. You could go back to your desk and work on design, documentation, etc. But no programming after drinking.
It's a damn good rule.
Quick guide to programming languages
I go to the ETS, (Superior Technology school) in Montréal, and currently strudying CS. The part : "Copy the programs. Lecturers will probably have to mark dozens of them, making it difficult to spot similarities between them. And even if they do, it sure as hell ain't easy to prove..." don't really apply to us.
... at least with respect to CS assignment handling...
You see, they have a kind of program, which they use to compare all the assignement that are handed in. Not only does it compare it with everyone in your class, it compares your code with the code of all the students from the last four year.
Try and copy anything now... good luck!
This is how you run a school
Any other school has a similar setup?
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
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.
Nearly every assignment I received was modified between assignment and due date when earlybirds ran into difficult or unsolvable snags. These were the only classes I found in which waiting to start was really did help.
:-). But maybe a more appropriate title for this comment would have been "Finer points of living on a diverse planet for ethnocentric Americans". In the rest of the English speaking world, we have no problems with Celsius.
Thanks, but I have my very definitive programming guide already. Mwaahahha
The proliferation of 'happy-clicky' programming environments has led to sloppy inefficent coders who have limited understanding of how to write clean code.
The result? Word Processors which ship on 5 CDs and do little more than similar products from a decade ago.
More RAM, bigger hard-drives, faster processors, and for what? A new version of software that doesn't do a whole lot more to justify the upgrade?
Meanwhile, a lack of formal coding education also means we still see buffer overflows and other security nasties that should never have happened in the first place.
The good news, is devices like the Palm have forced people to operate in the limited hardware/memory environments of years ago. The result, clean efficient code in just a few kilobytes.
Time to go back to school people...
Indy Media Watch-Proctologist of the Internet
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.
Dont compile on a regular basis, dont tiptoe your way forward. Youre a professional and professionals take giant steps. Write thousands of lines of code first and leave the compiling for later; it will be far more entertaining and worthwhile to look for compiling errors.
Actually that's uncalled for. Compiling frequently is not good because you should not be thinking about such details as syntax and var name spelling until the very end.
For most of the time you're writing code, what you have should not be compileable. Well, doesn't need to be. Since you (hopefully) are doing things top-down, at first you're going to have a lot of empty functions and comments.
Then you're going to fill in code. During coding, why bother compiling? Who cares if you get a 100 compiler errors at the end when you compile once, vs. getting 1 error each time, but having to compile 100 times?
Don't bother. Focus on the higher picture. Implement your vision. Only once you've done that, fix what the compiler is bitching about. Doing the same things along the way can sidetrack you from your higher-level view of the program.
Besides, it's a lot less annoying. Say, you're done coding. All you have to do is go make tiny changes to shut up the errors. Probably won't have to think too hard how to fix them. And then you're DONE!
The other way, you go fix your errors, and you still got mad code to write. And now you're annoyed and distracted so it won't even come out as good.
Also, sometimes I actually shock myself by writing code for an entire day and then having it compile w/o errors the first time! I really don't expect that, and it's a "wow" thing when it happens.
Ecce Europa - Web Design for Business
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
Yeah, I mean I once had a girl in a programming class say she'd do *ANYTHING* to pass the class, so I had her buy me dinner in exchange for helping her study, then never saw her again!
Sad part is this is all true.
Here's a VERY GOOD hint for those of you who are starting to program:
.h header file or UML diagram on paper.
THINK UML.
THINK OBJECTS.
THINK MULTI-TIER.
THINK BOTTOM-UP.
USE A NOTEBOOK.
If you start designing on paper the functions/object/interfaces/etc for your program, then start coding. As you begin to code, you'll start realizing that you'll need auxiliary functions (like an array searcher or something - most of the time lazy guys like you or me want to do everything in one function or method. Don't fall in the trap. If a series of steps is going to be very difficult, thing bottom-up and put it in a separate function or method. But before you start coding it, add it to a "to-do" list in your notebook.
That way you can keep coding your current function, by calling the not-yet written function that only exists as a declaration on paper. But the idea is there.
In the end, you'll end up with practically a completed
That helps a lot when programming (specially for low-termed memory guys like me). When you're finished designing the code, all you got to do is start typing and see which functions need to be coded, or which details . Why? Because you've already solved the problems in your code.
In one day i could design an OOP SQL wrapper (business tier) for my database project, and i only had to adjust minor details (i.e. bugs) when finished coding.
So, believe it or not, paper SAVES TIME. Trust me.
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.
Or, perhaps not read this...
Okay, I know that there are a lot of professional developers out there who follow some of the "rules" in the article, especially those involving ignoring warnings. I've been in professional programming environments, and I've seen this sort of thing excused all too often (personally, my code isn't done until it compiles 100% cleanly). However, for good or bad, this is typically hidden in closed-source projects -- how many compilation warnings does Microsoft get in its nightly Windows builds? I have no idea.
Unfortunately, in Open Source Software everyone gets to see where the developers ignore warnings, and IMO there isn't much excuse for it. Honestly, there are far too many Open Source projects which seem to do the things this article "advocates". And everyone gets to see it.
I remember all of the warning messages I get when building the Linux 2.4 series kernels. And I recently looked into forking the recently cancelled JPluck, but its near complete lack of code commenting makes the effort exceedingly difficult.
This has long bothered me. If you're going to release your code as Open Source so others can work with it, it should at least have some comments in it (even just simple things like the expected input.output values for procedures, functions, or methods, expected use for variables/fields, etc.), and it should generally build without a single warning [1], in order to make it easier for others to work with the code, and to ensure them that there aren't going to be any unexpected results due to ignored warnings.
Yaz.
------------
[1] Okay, I know someone is going to call me a hipocrite when they go and grab the sources for the Open Source project I administer (the jSyncManager), build it, and find well over 100 warnings. I just want to preempt this by stating that these deprecation warnings occur because I've specified parts of the jSyncManager API to be deprecated to ensure developers currently using these deprecated classes move their code over to their replacements.
http://mindprod.com/unmain.html/
My favorite:
Mathematics is made of 50 percent formulas, 50 percent proofs, and 50 percent imagination.
Use clear, meaningful, variable names.
I was playing with obfuscated Perl code, and got about 300 lines out. It was a script to go through my gaim logfiles, and generate stats for how much I talked to each person, how verbose they were, and so forth. It mostly just shelled various shell commands like wc, and my PIDs jumped by about 1,000 at the end (meaning that it was spawning about 1,000 processes from start-to-finish.) It wasn't well-written or anything, but it was kind of cool. And writing obfuscated, hack-job code is kind of fun. It ended up producing an HTML file.
I finally decided that it'd be cool to have the program read its own source and output it to the HTML file. It was pretty easy, and, as with anything else done just for fun that isn't too challenging, I just assigned stuff to random variable names. $hats and $fog were the most commonly-used.
I simply opened the source as $hats, and opened $fog for write, and then wrote $fog to $hats. No errors or anything!
The output file was blank. So I went back to edit the source code. Umm, it's blank too. And, of course, I was just messing around, so I had no backups.
Then one day it suddenly occured to me: I probably screwed up the variable names for the input and output, reading the blank output file and writing it over the program's source code.
So, remember, kids, use meaningful variable names. Using $hats instead of $fog could be the end of your program.
________________________________________________
suwain_2
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 don't know, I've had some lengthy coding sessions inspired by alcohol. Usually wake up in the morning, stare at the code, realize it works, wonder how that is even possible, rename some stuff for clarity and redo the comments (drunk comments can be amusing, but not the kind of stuff you want to turn in).
That's a pretty pretensions comment. Many people don't have access, either through finance or friends, etc to get interested in CS things like programming at an early age. Granted, while in it you ought to be interested and enthused about, else you should probably be doing something else that does. But, that's the whole point of college; to discover what interests you if you haven't already and experiment with things. Many of these "majority of CS students" are taking a Java class to see if they enjoy it, thus it is the first time they have touched a command line. Many of them will find it's not for them and drop. Some will stick around for some reason.
Besides, if you knew anything of CS you would know Java and command lines have as much to do with it as telescopes do to astronomy, to paraphrase Dijkstra. In fact, I had professors who could care less about Java or command lines because their interests are in theoretical computer science, algorithms, math, theory, etc.
Perhaps you are in the wrong major. Maybe you belong in a traade school for programming?
"If you are a dreamer, a wisher, a liar, A hope-er, a pray-er, a magic bean buyer
Re-use is ok after you graduate so the professors are OK, copyright assumed not to be an issue. While you are learning you need to do things yourself.
When I was in university I would spend 90% of the time putting together a "framework" to solve the actual problem (much more general and thus useful for future classe). Then I would spend 7% of the time debugging it. Then I would spend the remaining 3% desperately trying to figure out how to use the framework to solve the assigned problem.
Well I was under the impression that they join the program to learn CS and not the otherway round. I have seen smart students who have never used a computer before do really well in my course. Also CS is not just about programming, its like other engineering branches
I was hoping for something educational and instead I found a collection of jokes that I don't find very amusing.
This is intended to be educational. Rather, it is intended (at least in part) to be yet another thing to point first-year (and later!) students to, in the hopes that they decide to absorb it for a change. Give the advice in enough forms, and maybe one of them will take.
That, and it reads a bit like it was written to vent frustration. I know I can sympathize with a lot of what was expressed there (I've had to TA programming courses many times).
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).
Many a programmer will give you tons of insights on what not to do, but everyone and their great-granduncle seem to forget that the use of FONTS is of great important on eye-balling bugs.
Your example of the ";" could have easily caught if you use a font that makes stuffs like ";" "." "," "`" and so on FAT and OBVIOUS.
And on more thing - ENLARGE the size of the font to a comfortable degree, instead of squiming your eyes to look for ridiculously faint dot.
For programmers, although our brains are important, it's our eyes that have often been over-strained.
Muchas Gracias, Señor Edward Snowden !
If the class is not a early class in the CS flow, don't place the focus of the course on simple documentation. Also, on a scripting class like Javascript, enforce what would be asked for on your job. Inline comments. Block diagrams or system flows are more used in industry then nitty gritty flowcharts and pseudo code. As most CS projects are too small to go beyond building just a flow, I can see why they don't use block diagrams.
Classes should try to focus on teaching as much of the subject as possible in the time alotted especially if it's further down the prereq list. The subject should not be if you got your flowchart right! it should be if you got the program right AND knowing how you did it. Require the documentation, but don't let it weigh in heavy on the grade.
In my current class, there are also group projects (in a web class no less). While a little hard to deal with, it's not too bad as that is the way alot of developers are meeting.....just in e-mail or IRC or what have you.
In any case, as far as supporting others work, comments in the code and decent end user documents is all I ask.
Also, alot of languages don't lend themselves to flowcharting...so why require it?
Sorry, just venting on how far back in the times some instructors are! I spent the first 3 weeks of class learning basics....basics I learned 15 years ago.
Gorkman
As a TA, I've often felt that students who ignore errors should should get points marked off for reasons they can't understand. After all, if they're going to make me do more work because they can't be bothered with simple comprehension, shouldn't I give them the same?
Old comments:
-1 Missing ";"
-1 Changed case of variable; not recognized by the compiler.
-2 Need a closing bracket "}"
-3 Trying to write from an unassigned pointer.
New comments:
-1 Missing weasels exception error.
-1 I just felt like taking a point off here.
-2 For great justice
-3 Disco Inferno at this point in the code.
I never got up enough nerve to actually do it. Plus, I don't really want to risk any students suing the school.
Mod me down and I will become more powerful than you can possibly imagine!
I'm a CIS student, about ready to graduate. I'd already been programming for several years before I started school (and never allowed my school to interfere with my education), and I've spent a lot of time helping my fellow students, and here is some advice based on what i've seen.
Learn to love whitespaces. I don't know how many times i've seen people try to cram their code down as small as possible by removing every possible whitespace. A few extra spaces can really help you catch mistakes when your using a lot of nested parenthesies. ( ( (th) ( (i)(s) ) ) is much easier to read than (((th)(i)(s))) if your trying to make sure you don't screw up your parenthesies.
DO NOT comment every line. Seriously. Comments are a good thing, but when you comment every single cin and cout, every single bracee and function call, then it can make it a lot harder to find what you are looking for. A good rule of thumb I tell people is to comment every line you have to think about for more than 30 seconds, comment every function and class, and comment every block of code that you have to spend more than 2 minutes pondering over.
Learn to use your editor. Whatever IDE or editor you decide to use, learn to use it well. Learn to use the debugger specifically, but also get used to the environment. I don't know how many people I've helped who's problem was not with their code, but with an improperly configured IDE.
READ Error messages. This sounds obvious, but I swear people don't read them, or don't think about what they could mean. I think a lot of this comes from programmign classes that teach people to memorize syntax, without giving them an understanding of what's going on at the machine level, or what the compiler is actually doing.
If you miracously fix something, understand why. Students seem like they can not resist randomly moving code around, and sometimes this does fix things. If this happens, take some time to understand what you moved and why it might have fixed the problem
Take Breaks. This one applies to everyone. I've seen a lot of good programmers go crazy over simple problems simply because they are too stressed out to think clearly. If you start to feel stressed, tired, or your mind starts to wander, then step away from the computer, have a cigarette or a cup of coffee, take a walk, and get your mind away from the problem for a bit. Even if you have a deadline, a 15 minute break can often save an hour of frustration at the computer.
Famous Last Words: "hmm...wikipedia says it's edible"
When borrowing someone else's code to finish an assignment that totally stumps you... don't forget to change the variable names.
-Bullseye
Yeah, I mean I once had a girl in a programming class say she'd do *ANYTHING* to pass the class, so I had her buy me dinner in exchange for helping her study, then never saw her again!
A woman says she'll do anything for your help and the best you can think of is dinner? She said ANYTHING! Are you a man or what!?! Think bigger my friend!
Have her buy you two dinners!
My profs insisted that we should diagram the process algorythym before coding.
..ramble on...
They recommended strict diagramming techniques like Warnier-Orr. They said use a white board with big erasures and little markers because large sections are going to be junk.
Strict and systematic Warnier-Orr diagramming can be a real discipline.
I've gone back to it in order to code very tight , time-dependent 50 nanosecond mulitple interrupt routines in assembler for microcontrollers and embedded systems. I've even placed the white board on the flatbed scanner to copy it when I've gotten that finally works in a walk-through (take the hinged cover off- it goes much easier.)
Even after doing this..and then assembling and burning the code into the chip..and having the device actually function correctly..I still get the feeling that there is something stange and magical happening that I'm not aware of.
One just sits down and tells oneself that, no, there's no magic here. You designed a complicated machine, you throughly tested a precise simulation, you built it, and it worked exactly like it supposed to because there wasn't any possiblity that it could not work like it was supposed to. It's just going through hundreds of precisely defined steps many millions of times a second...and gives the illusion of magic and sentinite intelligence.
I've been coding for some time very extensively using PHP. It, along with GTK is a good, high-level language that lets me get lots done, very quickly.
In many cases, it will accomodate common errors, such as strings not being quoted, etc seemingly without complaint.
However, I recently changed my strategy to one of "zero tolerance", which entailed me reducing the error reporting threshold to 0 (all errors) as well as defining a standardized error handler callback function. I spent about a month just going thru the existing codebase to quote all the strings, etc.
However, now having done paid that price, I'm quite surprised at how often bugs that would have previously gone un-noticed pop out in clear view.
Undefined variables previously translated to equal false now stand out as a mis-spelling. Database errors previously un-noticed suddenly highlighted and shown to me. Hiccups in the code previously shown to users now archived and hidden away so that I see them instead.
It's made a HUGE difference - I'm more productive despite the appearance of having more to look out for!
I also have a generic error() function defined that's really a wrapper for the error handler - so the error logging system now in place works for language errors and logic errors alike.
It's awesome!
I have no problem with your religion until you decide it's reason to deprive others of the truth.
A friend of mine once had a large windowing class he needed to write. He was late on a project and basically needed it done Now. Or sooner. So he resigned himself to an all-nighter and got crunching.
Round about 8pm, he realized he was getting overly stressed, and he still had about half the code left to write. So he decided to take an hour break, smoke some pot, and come back to the project after he was a little unwound.
The next thing he remembers is waking up the next day. He had that dawning moment of realization that I'm sure all of us have experienced at one point in our lives - "Oh CRAP I screwed up" - and ran to his computer to finish the code as fast as he could.
The code was finished.
Several thousand lines, all commented, all readable even without comments. The interface was clean. The implementation was clean. It was finished.
To this day, he has never remembered writing even a single line post-toke. He has also never found a single bug, and he's used that code quite often. Now, I don't recommend relying on this technique - but once in a while, it seems to work.
Breaking Into the Industry - A development log about starting a game studio.
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.
Rudolf Diesel, the inventor of the engine, graduated from University and then went and trained as a skilled mechanic. Isaac Newton could use a lathe by the time he got to Cambridge. And Alan Turing could machine his own relays. Apart from the career options, acquiring both academic and practical skills makes you a more rounded person, and thus more employable generally.
Panurge has posted for the last time. Thanks for the positive moderations.
As far as I can tell, especially with people from an academic background (PhDs! argh!), this guide is way too advanced -- something like this might be more useful to start with:
-- Do not keep the entire project in
-- Use source control
-- Run the code before delivering it
-- NOT JUST ON YOUR OWN WORKSTATION, BUDDY!
Then, from that one could work up to 'try and ensure it is possible to install the software by some deterministic process', and only then would it be worth actually starting with actual code...
Well, they learn eventually I guess, in most cases.
Whence? Hence. Whither? Thither.
There is actually a better way of getting rid of these rather than contaminating your code with unecessary #includes. Check this out. Basically add the same pragma command to YVALS.H which is in the include dir for the Visual studio installation.
In case you are wondering whether you are really going to break something, the error message relates to the debugger not being able to handle >255 chars.
The problem with this warning message is that it can obscure real error & warning messages.
meh
Every /. story about programming seems to bring this tired meme out of the woodwork yet again. There never was a time when people wrote apps that do almost as much as current software in a tiny fraction of the disk and memory space.
What people forget is that old games and GUIs only had 1/50th of the pixels (and 2 of the 16 million colors) a modern display has to contend with, that their old 100KB "word processor" was really a stripped-down text editor with 3 fonts and no spelling check, DOS could fit on one floppy because it was really just a program loader and a half-hearted attempt at a shell, and "searching your filesystem" meant rummaging through desk drawers for a floppy disk! Programmers could fit apps of the time into tiny memory spaces because their programs didn't *do* much of anything, not because they had some magic ability to "code properly" that's lost on programmers of today.
0 1 - just my two bits
Don't provide solution sheets that contain code that will actually compile. After the frustration of working unsuccessfully for days (nights) to get her assigned programming project to compile and run correctly, what the student really wants is the character building exercise of debugging the instructor's solution to the exercise. When the students see that their instructor also has problems writing bug-free code, it will help to buttress their self-confidence.
Bureaucracy loves company.
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
Why use boring old For and While loops when recursion is so much more fun? Next time you start typing 'for (i=0;'... ^H^H^H^H a few times and do it with a recursive function call instead. It's a lot more exciting, and just think of the fun somebody else is going to have in a few years when they try to update your code!
That'll teach those dirty corporate &%*@!s. Lay me off will you? I hope the Indians like puzzles!
Besides, nothing's cooler than that which has the rule "Just have faith it [recursion] will work."
"What do you despise? By this are you truly known." --Princess Irulan, Manual of Muad'Dib
/)
(Posted in "Code" so as to get the formatting right).
/All/ of your sources are using this. Someone comes along and uses an editor which inserts a tab character instead of spaces, with a 3-character tab stop. They work on a file, and check it back in.
/multiples of eights/! If developer number 2 didn't just add new functions/methods/etc. to the end of the file, and they added lines inside existing blocks, the code readability is now totally fubar.
/noise/ provides structure, and allows you to determine which close braces go with what statements. It is due to this sort of potential confusion that many non-C derived languages actually use specific close statements for each different type of open statement (ie: Pascal, Modula-2/3, Ada83/95, shell script (although for a somewhat different reason).
...
...
...
... // Oops -- not supposed to be inside the for statement
"Since modern code editors force tabs or spacing in these scenarios, I find comments like "// end if" to create more noise overall."
It's additional meta-information. And if you're working in a group where each developer gets to choose their own editor (such as in virtually any Open Source project on the web), if one user sets their tabstops to something different from the rest of the group, and/or someone starts using spaces instead of tabs (or vice-versa), you wind up with indentation problems.
For example, you're using tabstops every 3 characters, insterted as tab characters. Some guy working with your file is using 4-space tabs, inserted as spaces. They need to add a line of code below an existing line starting at column 12 on their display (ie: three tab stops in your editor). So they hit tab three times. Looks correct to them, and the editor permits it, so they save the file and fire it back to you.
/You/ look at the newly added line, and see that where the previous line starts at column 9 on your display, their newly added line starts at column 12, one whole tab-stop extra.
Or how about if you're always working with only spaces (ie: tab is set to insert three spaces, and not a tab character).
Developer number 3 checks out the file, and for whatever reason always uses the space bar instead of the tab button for indentation. Because of this, they never bothered to change their editors default tab stop of 8. They load up the file, and suddenly it's a mess: the space-stopped lines are still indented in multiples of threes, but the lines containing tab characters as inserted by developer number 2 are now indented in
And yes, I see this happen all the time, both inside and outside commercial development. You can mitigate this through education and enforcement, but anyone who does any real development work has seen this happen.
Adding what you call
And in some environment, it can be exceedingly important if you're nesting a large number of blocks. Take this simple Java example, for example:
// A fragment of Java
class MyClass {
method someMethod() {
for(int i=0;i<100;i++) {
if(i<50) {
synchronized(this) {
try {
} catch (Exception e) {
}
}
}
}
}
}
Here there are six closing tags in sequence, in short, concise, and valid code. It doesn't take much to scroll the top few lines off the top of the screen (I'll get to why your refactoring comment is invalid in a second). It is exceedingly easy to introduce errors here, such as inserting code in the wrong place, such as:
class MyClass {
method someMethod() {
for(int i=0;i<100;i++) {
if(i<50) {
synchronized(this) {
try {
} catch (Exception e) {
}
}
}
doSomethingElse();
}
}
}
This is very easily mitigated through the mechanism I've already demonstrated:
class MyC
You only catch bad cheaters, by definition.
paintball
... to be the microsoft way. did you copy it from them?
".Sig Stealer" was here
Don't waste valuable coding time checking for various error conditions and handling them. Most of the time the return code from various functions is just fine. If it isn't, then there is something really wrong with the system, or the user is a complete jackass who deserves to spend hours scratching their head trying to figure out why your program doesn't work.
Time wasted coding error handlers is better spent implementing more features in your program. You can always wait for version 2 to implement real error handling where it is needed based on user reports.
cat
Take a program done by 3-4 people , pick the best parts, integrate
Macros from one, sortings from another, recursion from yet-another...
It's a lot less hard than writing it yourself and the result is often better than the originals .. Most of all, you actually learn from other people's mistakes .
Even after getting a job, I find that this is a much more stable way of programming newish things -"find a lot of similar things, pick the best strategies & adapt".
Btw, these days - that's called "Research" :)
Quidquid latine dictum sit, altum videtur
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
Every response to the parent has been negative.... "That's horrible advice" etc etc. However, I find myself agreeing with the parent, as long as you have atleast one year experience programming.
:P
For most of the time you're writing code, what you have should not be compileable. Well, doesn't need to be. Since you (hopefully) are doing things top-down, at first you're going to have a lot of empty functions and comments.
How could you disagree with this statement? This is basically writing pseudo code, which is how most things should be done. It's just an OO approach. Write code that utilizes functions / class methods that dont yet exist, this lets you create your logic. Then go in and write the actual methods, which eventually will make your logic work. OO approach lets you focus on logic and fiddle with technicalities later. This is how it should be done.
Joseph?
Of course, I'd very very thoroughly stepped through every code path by hand.
So where is the, not testing, part? Dry testing is testing as well. And not the worst way of testing, imho.
TFA may be ironic but it might help more if it was sarcastic. The number of sites at which I've worked where Warning messages are set to Ignore is ridiculous.
At one place, so many warning messages were being generated that when I eventually got a decent developer on board, after writing some scripts and working hard to reduce the number of messages, he got the overall compile time to go down significantly. Of course, despite my 'petty Hitler' rantings, most of the team decided not to fix the cause of these errors and the compile time started creeping up again. The arrogance of these guys was palpable, they had no intention of improving, they were, after all, the A-team (or so they said). I eventually moved on to running another team in another part of the company - who were prepared to listen (or were more afraid of me maybe) and, with other processes, productivity shot up over the course of a few months.
Did he inhale?
On the other hand, with his code layout, it's clearer where the if starts and ends, and it's clearer to what the else is associated.
It's clearer for you, because that's how you got used to coding. The other way is clearer to me, because that's how I got used to it.
With regards to the vertical space wastage, this is just my personal opinion, but there is always code that is self-contained but doesn't fit on the screen in one go, and the more of it you can fit, the easier debugging becomes. There's a reason we don't use line-by-line editors anymore, it's because seeing more of your code at once actually helps you code.
Regardless though, this is a matter of personal preference. It's my personal opinion that those using the newline before brace style are making life harder on themselves, but I'll respect them if they respectfully disagree with me, and let them be.
Meanwhile, let me state that any project where more than one person is working on the code needs a coding style guide, including how to name things. I'd code the other way if the style guide told me to, because it's better to have code all in the same style than to protect your own personal opinion fiefdom.
Yeah, because, as we all know, weed causes you to totally blackout for HOURS on end with no recollection of the evening *rolls eyes*
BS.
AMEN BROTHER!!!
Better yet, take a software engineering course if it is offered. Granted, it was back in the early 90's when I was in college, but my software engineering course was what got me my first job out of college with a big company. I took my senior project with me on my interview and showed it to the first person I talked to - she said "show this to every person that interviews you today". There was ZERO code for this project. What it did have was requirements, design, budget, test plans, mock-ups, documentation outlines, etc. All the stuff that is done outside of actual coding. This is how things work in the real world. It was the most important class that I took in CS. I probably won't be coding in Pascal any time soon, but I still use the principles I learned in that Software Engineering class.
I will admit that it has been a while since I did any hardcore coding, but if you are doing any kind of project, design it first. Draw pictures. You'd be surprised how much easier it can be. I am still amazed after working in the industry after 10+ years how little software engineering education a lot of coders have. And there is a HUGE difference between a coder and a software engineer. Learn the concepts early and try to use them as much as possible. I couldn't write requirements to save my ass in college, but just the fact that I tried, and knew where they fit in the process made a huge difference. Do you know what a testing organization does and why? Where I work, we just got a set of issues out of a "lessons learned" session for our release that just went out. Many of the questions that came out of our development group were along the lines of "What does our QA group do, and why?" Some of these people have been coding for 10 years or more, and they don't understand why we have a QA group (QA and testing, which aren't the same thing)
My beliefs do not require that you agree with them.
If you like this approach, you might want to take a look at Knuth's "Literate Programming." One place to start is http://www.literateprogramming.com/
In either case, one needs to remember that too much can be as bad (or worse!) than too little. In real life, you may not always be the one to edit the code, and if someone edits the code but doesn't update the commentary, you can get into real trouble.
-Hil
Hahah, I know exactly how you feel. I wasted 2 hours on what should have been an extremely simple C assignment in university one day. Back then, we did our C/C++ assignments on a shared Solaris server, working on dumb terminals in a lab. I was getting some kind of strange exception with my C macros. So, I created a "test" program and copied over the guts of the logic of my app, so I could re-add the functionality piece-by-piece until my test app broke. This would allow me to isolate the code that was causing the problem.
/usr/bin is at the beginning of the $PATH, and how one can use ./test to make sure that one is actually running the program in the current directory, rather than the system utility with the same name!
Only one problem: my "test" app didn't appear to be doing anything. It would run fine, with no error messages, and then exit quietly. In fact, it was producing no output at all. I began removing code, and adding printf()'s, desperately trying to get my app to say something, anything. After a couple of hours, I had stripped my "test" app down to little more than a "Hello, world" app, but it still wasn't producing any output! I would just type
dragon:/home/kombat/> gcc test.c
dragon:/home/kombat/> test
dragon:/home/kombat/>
Can anyone spot the problem? Anyone?
It turns out that "test" is actually a built-in system utility for regular expressions, used in scripts. That was the day I learned what my $PATH means, why
That day ranks as one of my most stressful, and yet most educational, at university.
Like woodworking? Build your own picture frames.
THE MOST IMPORTANT THING FOR YOUNG PROGRAMMERS TO LEARN IS READABILITY.
Yes, code must work, it must error check and be stable. Good design is an obvious requirement. But, too many young programmers don't know the true value to business of code readability. I'm a 15-year veteran primarily in C, C++, Perl, Java, and alas, Cobol. I've seen crappy code for years as a contractor, coming in to fix problems or add features.
The statistics on business costs bear me out. Nearly 50% of the cost of a program is incurred during the long in-use / maintenance phase. There are definite rules for making code readable and they should be taught early.
Practice during programming classes should include:
* Code reviews - other people looking at your code;
* Code reviews - reviewing other people's code and asking lots of questions;
* Style guides - rules re: what coding style (where to put curly braces, for one) to use on a project are common, be prepared for them;
* Simplification paradigms - stuff like avoid do_while loops since they're seldom used and often just confuse people;
* Reliability lessons - lessons like don't use while(1) loops with breaks, rather for(1..n) with an overlarge n and subsequent test if N got big to know if things failed;
* Max Subroutine sizes - too often violated but a bigger deal than you think;
* Global variable minimization - sometimes it does make it simpler to use a global variable, just keep it to a minimum;
Lots of these rules apply. SIMPLIFY! SIMPLIFY!
It speeds up everyone's life.
--Kevin
Unitarian Church: Freethinkers Congregate!
In an algorithms class (about 60 students) at my school there was a big challenging programming assignment mid-semester. The prof and the TAs caught a couple of people cheating, like 3 or so. Now this was a cool prof who didn't want to get kids kicked out of school so he decided to give them a second chance. On the final, there was a question worth 1 point stating "We found some cheating last month. If you did it, confess and you only fail the course. If you don't confess, we'll get you kicked out. Did you cheat? (1)"
Half the class confessed.
Tsunami -- You can't bring a good wave down!
It happened that this time, the professor had been appointed as "Director de la Escuela", and, as an official of the Uni bureaucracy and not just "a professor", he was bound to apply the rules to the letter. So we had to (I was TA) hand out a sheet of paper during the first test and I told them "people, we're onto you. We have tens of cheaters (from a 100-people class) indentified in assignment #1, and this time, you are S.O.L. because the prof is ALSO the director, so he's bound to send you straight to the rectory, instead of marking you with the customary 1.0. In this paper, you can write your name if you admit to copying the first assignment. You'll get an 1.0 score on that, and at the end of the course you'll have to do a "live assignment" in the computer lab with the prof perched at your shoulder to prove that you learned something in this class.".
Almost all the identified cheaters turned in, and a hefty quantity of unidentified cheaters turned themselves in, and even some people turned themselves in for the #2 assignment!
Another funny one, at the final examn of a course, when I (I was TA) said "ID will be requested while the test is in course, please place your University Card in your table next to you". I had just finished saying this when I saw one of the students jump out the window (it was a 2 meter drop to the grass outside). Never figured out who he was subbing for. (Whoever he was, he failed the class, since we customarily let the students who have an average such that an 1.0 in the final will still give them a passing grade keep their average and skip the final)
Computer Science is a good major to be in. It is useful, hard and interesting at the same time. However, given the fact that IT job cuts are on the rise, students should learn more things than just coding.
I am a recent CS grad. I work in the field and yet I am thinking of getting a second degree that is not related to computer science because I realized that in several years developers who know only one thing -- that is coding -- will become extinct. What you need to teach CS students is how to develop valid and correct solutions that can be used by real people and businesses. These solutions must be well designed first; then developed. If I got a cent for every piss poor designed program that I have seen in my life, I'd be Bill Gates :)
Developers solve problems with code; however, just because you have an ability to write a program does not make this program a valid solution! I have noticed that there are too many people with excellent software engineering skills that are simply out of touch with reality and its business side. If your "cool" program does not solve a problem it is absolutely useless in the real business world (the world where you get a pay check for what you do).
Despite being relatively young, I have been employed in the field during all downturns. I managed to survive using only one rule: you must come up with solutions that are valuable for customers who are willing to pay for it. Unfortunately, many of the recent comp. sci. grads do not understand this rule. Instead of focusing on real life and its business needs, they spend their time learning languages without even knowing what these languages are good for. Then they use wrong tools for wrong tasks. My favorite example is my friend who used J2EE to build a site that could have been (and should have been!) done in PHP. He spent half a year on the fucking thing just to realize that a simpler solution could do everything that he wanted!
Then there are people who run into terrible coding problems because their design is flawed. For some odd fucking reason people never think before they start implementing. I use one great rule: software engineering does not provide efficient solutions for some of the problems. Period. Too many people jump into coding without even thinking about the problem. They waste their time on something that can either be done manually with lower cost OR cannot be done at all. The worst thing is that most of these people are afraid of throwing their initial design away and starting from scratch...
With this in mind, here is what I think every comp. sci. student should know:
How to meet business needs with software engineering. How to "read" requirements and come up with solutions that meet them.
How to realize that your design leads to implementation problems and when to throw such a design away.
A well-written program is good. A well-written program that meets customers' needs is better.
How to use a right tool for the right task.
How to become employed and stay employed.
How to use computer science in various aspects of real life. When I am talking about real life, I am talking about something useful that can be actually used by people. I found out that this can be achieved by taking a second minor or getting a second major that is not related to technology.
Yeah, well if the college actually followed through and expelled plagiarists maybe people would think twice before doing it?
Over half of my networked operating systems class was caught cheating on a machine problem (write a UNIX shell with job control and I/O redirection). The professor announced this during class and said whomever came forward wouldn't face any punishment. The college handbook clearly says that this is an offense that may result in explusion from the University. What happened? Not only did the University not expell any of these students, the professor wouldn't point them out in class so the rest of us knew who they were.
During an exam for a linear algebra class, I saw students pulling crib sheets out of their backpacks and placing them between their feet during the exam. Surely the proctor saw this (~35 students in the class), but nothing was done.
If colleges want to cut down on cheating, they need to start enforcing their own policies.
Coding Style
//increment i
One thing I've noticed, well at least the university I went to (Arizona State - ok I've heard all the jibes), is that there is not as much emphasis on coding style as there is in just getting the assignment done. This article is essentially talking about the bad habits that students develop, and mostly this is due to insufficient emphasis on good coding style. I had been writing code for almost five or six years before I started college, so it was second nature to me. However, some of the people I met hadn't written a single line of code in their life. They were genuinely interested in CS (but there were some who were in it just because "CS people make a lot of money"). Most first year programming classes that I know of, just give you to tools to the language without telling you how to use it well. It's like you know English, but does that mean you can write a really good Story, or an Essay that is grammatically correct all the way? No, it takes training - and that is what I think some of these first year classes fail to provide. Sure, later on in your CS/CSE degree you may come across a professor/class that emphasizes good coding style, but by then some of these bad habits may be so ingrained. Like for example, I have seen C programs without ANY indentation. How terrible is that? Whitespace is awesome - use it liberally.
I was lucky enough to have a good professor my first year in college. I rememember that he eschewed the use of "goto's" (ok I have heard enough debates on this). His reason was that many students simply did not know how to use them right, leading to the inevitable spaghetti code. Also since we were using Java, it wasn't possible anyway.
Anyway, my point on Coding Style is that first year classes should emphasize that point so that students can learn to write programs that are easy to debug and document.
Proper Specs, Writing Algorithms, Documentation, and Knowing what your code does
I can't even begin to say how important this is. The major problems (some) Engineers have is that they write terrible comments, or none at all, or cryptic ones. I have come back to code that I wrote months ago and I have had a hard time deciphering what it is that I wrote. Documentation may seem like a pain, but in reality it makes the maintenance of your code more effective. Also, in an industry setting if someone else has to come along and look at your code, it makes it easier for them. How many times have you had to go over someone else's code and found no comments, or terribly obvious ones like:
i++;
I took an assembly language class in my sophomore year, and another one in my junior year - they were required courses. The prof in the first class was a former student of the prof in the second class, so they had the exact same methods. They had three main emphasis points:
1) Algorithm
2) Program Size
3) Documentation
Both these professors gave our excellent specs on our assignment (something more professors should do). They were extremely detailed and they exactly told us what was expected. In addition to this, they graded on program size and execution time. This prompted (most of) us to create efficient algorithms. I have to say that usually I'd just jump into the code and start coding, with a hazy algorithm in my mind. This time, I really had to sit down and come up with an algorithm. I discovered that it made my coding process much easier. It's better looking at your algorithm in paper and the comparing it to your code than doing it in your head. Their final emphasis was on documentation. 20% of the points for a lab assignment was for documentation. We had to provide an introduction/user's guide for the program. By reading it, any person should know WHAT the program does. Secondly, we had to provide an internal overview. This is esesentially the description of the algorithm that we use. Any person, by reading the internal overview, should have a good idea o
Vivin Suresh Paliath
http://vivin.net
I like
OK, this article pushed a couple of my hot buttons since I get to see the results of the "good" schools during interviews almost every week (and if you're willing to live in San Antonio and know Hibernate, go ahead and email me).
First, because of all the concern about "cheating" I often spend weeks getting recent graduates to work on teams. The idea that sharing and collaborating on code is "OK" is so foreign to them, that I get people who won't show their work to anyone.
Next, because they have learned that the instructor "has the answer", they will come up to me and ask me how to solve the problem I asked them to work on several days ago. I work at a research institute, and if I knew the answers I wouldn't have bothered asking in the first place. I can help you figure out ways to find the answers, and suggest sites to look for examples of code that might solve similar problems to use as a guide (oh, but there's that cheating problem again), but if I have to figure out the answer for you, then why am I paying you a salary in the first place?
Finally, and I think I've seen this a few times in this discussion already, there's people skills. No program seems to bother to teach folks how to talk in front of a group, and if they do it's to tell them how to cover their Powerpoint slides. Folks, if I can read (and I wouldn't be where I was otherwise), I don't need you to recite your slides. I need you to tell me what you couldn't put on them, or to expand upon the couple bullets you have on each.
Sorry, but when I see how what people learn in school makes them start out on the wrong foot in the "real" world, it does get a little upsetting.
Most plumbers, electricians and carpenters are not capable of running a business because they lack the organisational and IT skills that are needed nowadays.
Nice subtle dig at manual laborers. Most carpenters, etc., run their own businesses, and do quite well, so I'm not sure where your observation comes from. You don't need IT to run a carpentry shop or install some pipes.
If you are capable of doing comp sci and becoming a plumber, you could end up running Kohler...well, I exaggerate a bit
You exaggerate a lot. Big companies no longer use people familiar with the market for management. They use managers with MBAs. The days of coming up from the mail room to the board room are gone.