{"id":336,"date":"2017-02-20T16:34:49","date_gmt":"2017-02-20T15:34:49","guid":{"rendered":"https:\/\/rosetta.vn\/short\/?p=336"},"modified":"2017-02-20T16:34:49","modified_gmt":"2017-02-20T15:34:49","slug":"how-not-to-go-about-a-programming-assignment","status":"publish","type":"post","link":"https:\/\/rosetta.vn\/short\/2017\/02\/20\/how-not-to-go-about-a-programming-assignment\/","title":{"rendered":"How NOT to go about a programming assignment"},"content":{"rendered":"<blockquote>\n<ul>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_2_IDAWMCR\">All about programming, in the strictest sense of the word<\/a>\n<ul>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_3_IDAZMCR\">Ignore messages<\/a><\/li>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_3_IDABNCR\">Don\u2019t stop to think<\/a><\/li>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_3_IDANNCR\">I don&#8217;t want any trouble<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_2_IDA0NCR\">If only I could find the words<\/a>\n<ul>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_3_IDA3NCR\">Reading<\/a><\/li>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_3_IDAFOCR\">Writing<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_2_IDA2OCR\">Your relationship with your lecturer<\/a>\n<ul>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_3_IDA5OCR\">Don&#8217;t ask for help<\/a><\/li>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_3_IDAQPCR\">Challenge your lecturer<\/a><\/li>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_3_IDAMQCR\">Be clever using electronic mail<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_2_IDAXQCR\">And, of course&#8230;<\/a>\n<ul>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_3_IDA0QCR\">Leave it all for the last minute<\/a><\/li>\n<li><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html#ref_titulo_3_IDAMRCR\">Cheat with your assignment<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div class=\"apartado_par\">\n<h2><a name=\"ref_titulo_2_IDAWMCR\"><\/a>All about programming, in the strictest sense of the word<\/h2>\n<h3><a name=\"ref_titulo_3_IDAZMCR\"><\/a>Ignore messages<\/h3>\n<p>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 \u2026 writing code, of course! Error messages make us less productive. Don\u2019t fall into the trap. Ignore them.<\/p>\n<p>As for warning messages, ignoring them makes you feel like a professional programmer who\u2019s not scared of computers. What better way of showing one\u2019s 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 you\u2019re an experienced, laid-back programmer who is too busy to waste time on drivel.<\/p>\n<h3><a name=\"ref_titulo_3_IDABNCR\"><\/a>Don\u2019t stop to think<\/h3>\n<p>Let\u2019s 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 don\u2019t make a fool of yourself writing time-consuming syllables, right? Then, stop messing around thinking about nothing when there\u2019s so much code to write.<\/p>\n<p>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.<\/p>\n<p>You can try making some random change to the source code. You never know, you might pull the wool over the compiler\u2019s eyes. But if this doesn\u2019t work, don\u2019t waste any more time. NO, don\u2019t be tempted by trying to read the message or understanding it. Just keep churning out code &#8211; that\u2019s the only way of finishing off this horrendous assignment. You\u2019ll get to sort the error out later on. And as we all know, errors tend to disappear by themselves if they\u2019re ignored. At the end of the day you\u2019ll compile, you\u2019ll run, and even if you had tested (not that you needed to) you\u2019d have seen that everything was OK.<\/p>\n<p>If the code compiles but does something wrong, it doesn\u2019t really matter; sort it out later, when it\u2019s finished. Anyway, you might get lucky and find out that the lecturers have changed the assignment outline and that it fits in with your program after all. So don\u2019t take the risk of fixing programs that seem to be off track \u2013 you might be wasting your time.<\/p>\n<h3><a name=\"ref_titulo_3_IDANNCR\"><\/a>I don&#8217;t want any trouble<\/h3>\n<p>If your program contains a bug that crops up every now and again, it will be difficult to find and it won\u2019t probably show up during the exam demo. Maybe it will disappear by itself. Don\u2019t worry. But if the bug comes up again and again, change things at random until it disappears. We\u2019ve already said that pausing for thought is not an option. If you decide to get rid of the bug &#8211; simply because the urge takes you &#8211; just write the same code in different ways. Maybe the problem will disappear; something you\u2019ll have achieved without 1) understanding what caused it, and 2) having to stop writing code. Clearly, this is the most professional approach.<\/p>\n<p>Don\u2019t compile on a regular basis, don\u2019t tiptoe your way forward. You\u2019re 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.<\/p>\n<p>The same rule applies for runtime errors. If you try to keep your program correct as it grows, it will be too easy to pinpoint a new bug. Only cowards do that. A real programmer writes the entire program and then digests it whole like a boa constrictor. Looking for a bug hidden in the last 10,000 lines is exciting but if there are only 10 or 20 lines, well, what fun is there in that?<\/p>\n<p>And\u2026 why use debuggers? It\u2019s up to the lecturer to look for your bugs. Programming errors are the exception, not the norm, and when you become a pro you won\u2019t have to face them. Why waste time then or expend your energy learning to deal with them as part of your education?<\/p>\n<\/div>\n<div class=\"apartado_impar\">\n<h2><a name=\"ref_titulo_2_IDA0NCR\"><\/a>If only I could find the words<\/h2>\n<h3><a name=\"ref_titulo_3_IDA3NCR\"><\/a>Reading<\/h3>\n<p>Outlines and specifications are a real drag. These tedious and long-winded tracts refer to irrelevant problems and are nothing more than an opportunity for lecturers to display their narcissistic traits. You only need to take a quick look at them and get the gist of what they are after. Reading them for a second time only gets in the way of our real mission, which is nothing other than\u2026 writing code. So once you\u2019ve got a rough idea of what\u2019s expected from you just stick the assignment outline at the bottom of the biggest heap of paper on your table.<\/p>\n<p>On the other hand, coding and presentation rules show how arrogant our lecturers are. They like controlling us, forcing us to do pointless exercises &#8211; that\u2018s why they write rules in the first place. Don\u2018t play their game. Reading or applying rules won\u2019t make our work any better or worse. And as for making our exercises easier to handle, well, they get paid to correct them, don\u2019t they? Don\u2018t even bother to put your name or your class on them. Lecturers will have little trouble remembering your face and your unmistakable programming style so they\u2019ll know it\u2019s yours anyway.<\/p>\n<h3><a name=\"ref_titulo_3_IDAFOCR\"><\/a>Writing<\/h3>\n<p>Don\u2019t write comments. We\u2019ve said it before and we\u2019ll say it again: what\u2019s the point of all this? To create a program, i.e. code. Non-executable stuff is unnecessary and explanations are an insult to a programmer\u2019s intelligence &#8211; after all, he or she can read the source, right?<\/p>\n<p>If there are mandatory comments to write (function descriptions and stuff like that) then write them, even if you have nothing interesting to say. Lecturers like this drivel and you\u2019ll get higher marks.<\/p>\n<p>As for the docs, write them at the end. How can you write a document describing a program that doesn\u2019t exist yet? What\u2019s the point in writing documents for yourself about what you\u2019ve just done? The only reason for writing documentation for a program is that the lecturers ask for it. It\u2019s something you can sort out the day before the deadline. What\u2019s more, there\u2019s no chance of you forgetting anything as it will all be fresh in your mind.<\/p>\n<p>Also, use abbvns \u2018n strange konsonants when u write. Lecturers are old fogeys. You are a member of the SMS generation. Try to write messages that are difficult to read. Although he might not notice it, the lecturer will have to make an extra effort, after a long day stuck in front of a computer screen. All of which should help raise the old concentration levels and put him or her in a really good mood.<\/p>\n<p>What about spelling? Spelling is a drag. Even Juan Ram\u00f3n Jim\u00e9nez put his letter j\u2019s wherever he wanted and Gabriel Garc\u00eda M\u00e1rquez once called for spelling to done away with for good. Obviously, you\u2019re just as good as them and so you\u2019ve just as much right to write however you want.<\/p>\n<p>Let\u2019s face it, who doesn\u2019t make spelling mistakes? It\u2019s all too easy. And there\u2019s a brutal poetry in abrupt contractions and semantic hijackings that fling treacherous letters at the reader. Ever wanted to give your lecturer a slap in the face but never had the guts to do it? Drop him a line such as:<\/p>\n<p>I\u2019m trying to do you\u2019re exercise. I think its two difficult.<\/p>\n<p>It\u2019ll have the same effect, don\u2019t worry.<\/p>\n<p class=\"textoPequeno\">NOTE: Juan Ram\u00f3n Jim\u00e9nez: Spanish poet who won the Nobel Prize for Literature in 1956. He liked to flout spelling rules by writing almost phonetically (in Spanish the change involves only a handful of letters, g\/j among them).<\/p>\n<\/div>\n<div class=\"apartado_par\">\n<h2><a name=\"ref_titulo_2_IDA2OCR\"><\/a>Your relationship with your lecturer<\/h2>\n<h3><a name=\"ref_titulo_3_IDA5OCR\"><\/a>Don&#8217;t ask for help<\/h3>\n<p>If there\u2019s something you can\u2019t do, if you have a query or if you\u2019re lost, don\u2019t look for help, don\u2019t ask questions during the lecture and don\u2019t go to your tutorials. There are thousands of reasons why you shouldn\u2019t but here\u2019s just a few of them:<\/p>\n<ul>\n<li>Going to a tutorial and asking questions is tantamount to admitting you\u2019re stupid.<\/li>\n<li>Better to be ignorant than to run the risk of revealing that you don\u2019t know something you should.<\/li>\n<li>Ask a question during the lecture and your fellow students will think you\u2019re stupid. You don\u2019t think that of them when they ask a question, but they will about you. This argument holds true for each and every student in a lecture room at any given moment; that\u2019s why none of them ask any questions.<\/li>\n<\/ul>\n<p>Conclusion: never ask for help or go to a tutorial. There is, however, an exception to this rule; you are allowed to turn to the lecturer in the last few days before a deadline. There may well be a long queue, he will dedicate his time to helping students while neglecting other duties but don\u2019t worry, he won\u2019t be able to resist helping you in those dark, gloomy hours of need.<\/p>\n<h3><a name=\"ref_titulo_3_IDAQPCR\"><\/a>Challenge your lecturer<\/h3>\n<p>If, despite everything we&#8217;ve said, you decide to ask for help, always remember a golden rule that\u2019ll also help you in your professional career &#8211; after all a whole host of pros and computer users follow it too. NEVER give a detailed description of a problem.<\/p>\n<p>Here\u2019s an example. If something untoward happens while you\u2019re building a program, go and see the lecturer and tell him: \u201cSomething strange happened with my program yesterday.\u201d He\u2019ll look at you expecting more details but don\u2019t give in, don\u2019t say anything else. Don\u2019t even think of going into details such as:<\/p>\n<ul>\n<li>Whether the strange event happened while compiling the program or while running it.<\/li>\n<li>Whether the strange event caused the program to end suddenly or to keep running indefinitely, or simply, the program didn\u2019t do what you expected.<\/li>\n<\/ul>\n<p>Here\u2019s another one. If the strange event happened while you were compiling, don\u2019t tell the lecturer what the error message said or the line of code where it appeared. Just say something like: \u201cIt gave some error message, or something.\u201d<\/p>\n<p>Here\u2019s yet another example. If the strange event happened during runtime and caused the program to terminate suddenly, never write down the error message or tell the lecturer what it said. Just say: \u201cIt gave some error message, or something.\u201d<\/p>\n<p>Of course, if the strange event involved the program not doing what you expected it to do, don\u2019t even think of telling the lecturer the exact circumstances of how it happened. Avoid descriptions like: \u201cThis error comes up whenever I load a second file and the first one was empty.\u201d Just say the magic words: \u201cIt gave some error message, or something.\u201d Have you got that?<\/p>\n<p>Let\u2019s suppose that you\u2019re a stubborn ingrate who goes see the lecturer to ask about a specific problem. That\u2019s two mistakes rolled into one but you can at least get something right &#8211; take the wrong source code with you. If you have a bug and the things you try out only make the situation worse, take the most recent code to your tutorial but ask about the original problem. That way the lecturer will embark on a fruitless search for an error when, in actual fact, another one will show up. When it does, just say something like: \u201cOh yeah, I tried something out. Delete that line there &#8230;\u201d Perfect this art and you\u2019ll be able to do a whole coding session in the tutorial. I know &#8211; I\u2019ve seen it done.<\/p>\n<p>If you insist on being irresponsible and asking for help in tutorials, don\u2019t even think of pinpointing the problem before you go. If there is an error in a 1-MB input file, don\u2019t try smaller files until you identify the cause of the error. Don\u2019t try to create a mini-program with that selfsame error. If you do, the lecturer will probably find the problem straightaway. What kind of challenge is that for him? Better to make him read thousands of lines of code and make traces with hundreds of steps. That\u2019ll give him a chance to practice his clairvoyance skills and you\u2019ll be able to check out his powers of deduction.<\/p>\n<h3><a name=\"ref_titulo_3_IDAMQCR\"><\/a>Be clever using electronic mail<\/h3>\n<p>Some questions are almost impossible to answer by e-mail, if you put them in the right way. Nurture this skill and make your questions completely vague. Here\u2019s an example: \u201cIt gave some error message, or something. I\u2019ve attached the source code\u201d. You can go the other way as well, if you want, by asking a more specific question but forgetting to send the code. \u201cThe constructor in my TDevice class gave some error message, or something.\u201d<\/p>\n<p>It goes without saying that you should write your message straightaway and send it. Never reread messages.<\/p>\n<p>There\u2019s another reason why email is so much fun. You can sound off without the guy knowing which group you\u2019re from or your name. Everything will be OK if you take the informal approach \u2013 it makes it all so much cosier, making your name an irrelevant detail.<\/p>\n<\/div>\n<div class=\"apartado_impar\">\n<h2><a name=\"ref_titulo_2_IDAXQCR\"><\/a>And, of course&#8230;<\/h2>\n<h3><a name=\"ref_titulo_3_IDA0QCR\"><\/a>Leave it all for the last minute<\/h3>\n<p>Right from day one your lecturers will tell you to hand your work in the following week. They\u2019ll tell you to work at a steady, constant pace from the off.<\/p>\n<p>Don\u2019t listen to them.<\/p>\n<p>Although it might be a relatively new discipline, computer programming has already built up a number of sacred traditions, one of which is the last-minute rush to get your work in on time. Subjecting yourself to this stress is an essential part of preparing yourself for the world of work. Relax. Let your work pile up gradually and blithely ignore all the warnings and telltale signs that you\u2019re behind schedule. Don\u2019t let studying get in the way of your life. Don\u2019t duck out of that skiing trip in a vain attempt to make up for lost time. And just when you\u2019re on the edge of the precipice, just when you\u2019ve only got two weeks to hand in a program that you\u2019ve had four months to do, then the code\u2019ll start to flow like there\u2019s no tomorrow.<\/p>\n<p>What attraction would computer programming have if we didn\u2019t put together programs in a breathless, last-minute dash? What would become of the image of the long-haired, bearded, smelly (there\u2019s no time to shave, trim your beard or have a shower, you see), Megadeth-T-shirt-wearing programmer (remember that stains show up less on dark Heavy Metal T-shirts with their elaborate designs) tapping away at a keyboard for 48 hours non-stop? Would you have the stamina to go to the local LAN Party, park your bum down on a plastic chair and spend three days cooped up in a marquee in 35-degree heat gunning down monsters on a screen? What right would we have to call ourselves heroes if we had a kip every day just because we felt a bit tired? Just think about it. What would happen to Coca Cola and all its factories? What would happen to Juan Vald\u00e9s ? And what would happen to all the coffee factories that dedicate half of their production to computer programmers? When Sandra Bullock and Robert Redford became hackers, did they put their notes down by the side of the computer, sit and think for a while and then methodically tap away on the keyboard for an hour or two before heading off to the gym or the bar on the corner, day after day for four months? And what about that bloke in Operation Swordfish? Would he have cracked the Pentagon password if one of Travolta\u2019s hitmen hadn\u2019t been pointing a pistol at his head while another Travolta hitwoman was trying to distract him?<\/p>\n<p>The answer, my friend, is no. You want an easy life? Go and take another course.<\/p>\n<p>Being up to date with your work and understanding what\u2019s going on in the lecture room is for swots and wimps. You know what to do &#8211; leave it all for the last minute.<\/p>\n<p class=\"textoPequeno\">NOTE: Juan Vald\u00e9s is the name of the coffee grower in Caf\u00e9 de Colombia\u2019s TV adverts.<\/p>\n<h3><a name=\"ref_titulo_3_IDAMRCR\"><\/a>Cheat with your assignment<\/h3>\n<p>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\u2019t easy to prove. Appeal against your mark and take it to the High Court if necessary. That will take much more money and effort than writing the programs, but the goal is to prove that you&#8217;re smarter than the lecturer and never, ever give way.<\/p>\n<\/div>\n<\/blockquote>\n<p>Source: <em><a href=\"https:\/\/web.archive.org\/web\/20150607222648\/http:\/\/di002.edv.uniovi.es\/~cernuda\/noprog_ENG.html\">How NOT to go about a programming assignment<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>All about programming, in the strictest sense of the word Ignore messages Don\u2019t stop to think I don&#8217;t want any trouble If only I could find the words Reading Writing Your relationship with your lecturer Don&#8217;t ask for help Challenge<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[30],"tags":[47],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p8jhJx-5q","_links":{"self":[{"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/posts\/336"}],"collection":[{"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/comments?post=336"}],"version-history":[{"count":0,"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/posts\/336\/revisions"}],"wp:attachment":[{"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/media?parent=336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/categories?post=336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rosetta.vn\/short\/wp-json\/wp\/v2\/tags?post=336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}