- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I cut my programming teeth with GW-Basic. First year programming in high school was Pascal. The second year, we studied C++. That was my first time using that language.
The teacher kicked our asses all day long with pointers and complicated memory allocation assignments. I remember getting out of that class thinking that I never wanted to program again.
Fast forward to college. All college programming classes have been insanely easy because of that high school teacher that forced me to struggle with complicated C++ code. In fact, I think I'm a better programmer today because of that teacher. He's actually a teacher I would like to track down and personally thank for the job he did.
Some good teachers exist. They are rare though.
Admin
I went to college for Multimedia Design and spent most of my programming classes (ASP, PHP, Flash Actionscript, etc.) debugging my teachers' code right on the board.
"you've got a bug next to the equals sign" was a common remark.
captcha: tesla...Red Alert anyone?
Admin
FWIW, I took the AP test way back when it was in Pascal. My high school comp-sci teacher was great. We learned what a compiler and linker are; we learned about big O notation; we learned about debugging, which I never heard anything about in college! It was a really solid class. However, I hear the other guy who taught the same class was a complete dolt, sort of like the teacher in this example. So I guess I was really lucky.
Admin
One has to wonder how accurate Amro's rendition of the story is, given that by his own admission he wasn't paying attention in class.
Admin
You haxxor'd my boxxor!!
Admin
It also can be ignored by the compiler and nowadays rarely does anything at all (optimizing compilers prefer to make their own choices as to what put in registers).
As for the actual WTF, I used to collect such gems of knowledge but gave up some time ago. I now try to minimize the waste of time and teach myself what I might need in the future. Some of my friends think ignorant lecturers are a good thing, as it will reduce competition on the work market after we graduate. It is sad, however, that those who chose a CS major without any previous interest in the subject don't even realise they are being fed bollocks.
Admin
We had someone interview here and our lead developer had a new interview question. He was asked to use java to print out the numbers from 1 to 100. On lines divisible by 3, print "foo", and on lines divisible by 5, print "bar". On lines divisible by both, print "foobar".
Guy had no clue how to do it and the interview was basically spent teaching him what mod was. Obviously not hired.
Admin
Department Head: I'd like you to teach the introductory object oriented programming class this next semester.
Professor: Hmmm.... I'm not sure that's a good idea.
Department Head: But you have nearly 20 years of programming experience!
Professor: Most of which was spent in procedural languages that are no longer in use. Are you sure I can't stick with teaching Analysis of Algorithms?
Department Head: Not if you want to be tenured.
Professor: Object Oriented Analysis & Design 101 it is! Just one question, what's an "object"?
Admin
ROFL
This reminds me of my "C" college class back in 1992 (no, not C# or C++, just "C" per the book). The instructor had us write the code exactly as it was in the book for our labs so we can see and learn by example how coding works. In one particular instance in class, while going over the code that represented a circuit, I realized the circuit design couldn't possibly exist in real life - but the code would run. When trying to point this out to the professor (and class), I was told to "sit down and shut up". Stupid me for trying to apply code to real life! The horror!
I took the circuit design to my circuit analysis professor (he was one of those rare professors who knew what he was doing and students fought to get into his class), and he confirmed what I observed.
Fortunately, by that time I learned well enough that this was one of those times where it was better to swallow my pride than fight the issue, and I managed to ace the class. ;)
Admin
This just goes to show the old saying:
Those who can, do. Those who can't, teach.
Admin
Or that your friends can publish your privates!
Admin
Well, you had it made! In my high school computer math (FORTRAN) class, the administration was too cheap to buy a compiler. We turned in all of our assignments on coding paper (80 columns, landscape paper tablets) which were all hand graded by the teacher. I never ran a single program for the class.
Admin
On the subject of ridiculous CS classes/teachers, when I went back to grad school years after getting my BS I learned that a new class had been added to the schedule that all CS under grads were REQUIRED to take. It was called something like “computer ethics” and it was taught, of course, by the CS dean’s wife. One of the gems I was told she taught: using a spell checker was a form of plagiarism.
Admin
The rela questionis, how do I stopp hackaerz from steeling the HTML kode on my web siet?!?
Admin
Going to school in the UK in the 1980s, there were some good things - at middle school (i.e 9-13) we had a mix of BBC Micros and a couple of RM Nimbus 640K PC clones, and the good news was that nobody was seriously trying to teach us anything, so one of my friends nearly got expelled for inflicting a virus on one of the Nimbuses and we all learned a lot about BASIC(useful...right).
The bad news was of course that we didn't get past the point of "woo! BASIC!...let's go play football/nintendo/read a book"
At grammar school, post-13, there was a whole lab of Nimbuses of same vintage and...a LAN. Heavy! But at the time - 1993/4 - I was at the point where you imagine good computers are required to do anything interesting. Of course this is bunkum, but it put me off taking the CS courses. This didn't stop me from spending all my spare time on them, or trying to get time on either the Apple Mac in the design/tech department, or the Acorns in the science lab (RISC, baby, in 1994)..
Then, just having made this decision, the cs teacher (Mr Wright; really nice guy) managed to hack out some budget to get a bunch of 486/25s and then...in about 1996...TEH INTERWEBS! Not that there was more than one public machine with Internet access, but soon I was on it all the time...suddenly the lab wasn't so interesting, even with new pooters.
Upshot; I didn't learn anything useful, not even html. And I eventually ended up working in telecoms..(CAPTCHA: muhahaha. Appropriate, somehow..)
Admin
This is actually the FizzBuzz question. There was a big stink over it via some popular blogs, starting with the original article: http://tickletux.wordpress.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/
It descended fast into a coding competition - the shortest I've seen is 45 characters of Perl. (I've done it in 65 characters of dc.)
Admin
Ahhh.. in the 4th grade, we did LOGO on PETs. Teehee.
Admin
I assume the teacher's pause was due to a parsing error. "What is c anyway?" is ambiguous, and the context clues couldn't have helped.
I can just imagine what the teacher must have been thinking, "..well we are in a class based around programming in C, so he can't be asking about that can he? Maybe it is more of an existential questions.. No, probably not.. am I that bad of a teacher?! Surely this kid is joking.. but his tone is completely serious.. oooh I've been sitting here quiet a little too long.. quick think of something to say.."
"C is why you are here." (umm not so good, quick think of something to add...)
Admin
Gah!I interviewed with a company right after I graduated from college that gave me this same programming problem. They wrote web applications in ColdFusion. I informed them right off that I was comfortable working and learning in CF, but hadn't used the higher functionality. So they gave me this problem and some "screening questions". They used the terms "fizz" and "buzz". They called it the "FizzBuzz Problem". Now, as a problem to establish basic programming competence, it works well. But combine it with questions like "What does HTTP stand for?" and "What makes something 'Web2.0'?" and I started to wonder. Visiting their hole-in-the-wall office and seeing the offered salary, I decided that I would pursue other options.
Captcha: ewww (Yeah, that's what I thought.)
Admin
The first time a fellow technical person, especially an instructor, says "I don't know" in answer to a question, they immediately gain my respect and attention. Idiots think they know everything, or that they have to fake it; people confident in themselves and their knowledge realize that they can't know everything.
Admin
You're not Alex McDevvit are you? I went to school with a guy called Alex and your story sounds so remarkably like mine and his.
Admin
You didn't use the real STL, as defined by the standard. It wasn't fully compliant. Try using algorithms with generators, binary binds and compositors in VC 6.
Thinking STL is only about vector<> and list<> and iterators is a WTF in itself.
Admin
Oops, hit reply instead of quote in my post above.
You're not Alex McDevvit are you? I went to school with a guy called Alex and your story sounds so remarkably like mine and his.
Admin
I deny all the charges. You can't make me be McKevitt.
Admin
McDevvit, I mean. The effort of leading a double life is telling on me.
Admin
Sounds like a decent screening to me. The FizzBuzz problem eliminates just as many programmers as those other problems. Never underestimate the depths of programmer incompetence.
Admin
Let's hear it for "BASIC BASIC" and 8-hole paper tape.
Admin
Those who can't teach, teach PE.
Or, OOP.
How about "Big, blue wobbly thing that mermaids live in" (Blackadder)?Admin
Admin
You laugh, but I do remember hearing a tale of a senior coder at Bizarre Creations (a UK games company responsible for the PGR racing series) pulling a stunt very similar to this...
(I can't vouch for its truthfulness...)
Admin
My first C++ prof (university level) explained that if foo and bar were members of baz, where foo was a public member and bar was a private member, then to access foo you could just type "foo", but to access bar you had to type "baz.bar", because a private member could only be accessed via the object it belonged to.
Slightly right, but so, so wrong.
Admin
B% (0nv3r71n9 3v3r%7h1n9 70 #337$p34|{ 7h3n %05r 4r3 70 #337 70 b3 $70#3n r0m.
Thank you http://www.albinoblacksheep.com/text/leet
Addendum (2007-08-23 15:35): ok, for those that have trouble, here is the translation:
By converting everything to leetspeak then you are to leet to be stolen from.
Admin
I agree that is VERY frightening, but I wouldn't have left the class. Morbid curiosity would have forced me to stick around for a definition of obfuscation. Or $DEITY willing, internationalization.
Admin
hmm, would that $DIETY be an attempt at interdogmazation?
Admin
I took a BASIC class in high school. It only lasted through one quarter until the teacher had a heart attack and quit. We basically spent the rest of the year screwing off with one substitute after another.
Depending on how astute the substitutes were, we would have various schemes going on. Sometimes we would spend class playing network games of Doom or Quake. If the teacher asked us what were were doing we would explain that we had written the game earlier in the year, and we were testing it to work out all of the bugs. We all kept a notepad next to our computer and once in a while would furiously scribble some nonsense about a "bug". Of course, EVERYBODY knows that testing requires weeks and months of diligent effort.
At one point, we go a substitute who was there for a couple of months and had ambitions to actually make us do work. He started reading through the old teachers lesson plan for what we should have been doing at that point in time, and determined that we should all write a blackjack program. Most of us today would not have any problems doing a fairly good implementation in a few hours. However, this was 9th grade. We had only had about a month and a half of actual instruction. We never had textbooks or documentation other than the keyword reference in QBasic. Most of the class spun their wheels for a few days. I knew I didn't have enough knowledge to do it right, and I had no way to get much in the way of additional educational materials. I did notice that the teacher didn't know jack about computers. He didn't seem to care much about how well peoples' games worked. So I ended up writing a fake blackjack program that would make it look like I was playing by pressing various keys. In reality any keypress was just triggering the next part of the game. I at least had randomized cards so that it wouldn't look the same every time. I don't know why I bothered, I think everybody got an A for that class.
On to college, we had an instructor teaching Java, who while a decent teacher, was obviously a washed up hack. He was always bragging about how much programming he'd done for the school. He had most of the students thoroughly awed by his seemingly impressive prowess. One time when somebody complained about how "huge" the assignment was (~100 lines of code), he said "someday you will have to write much larger programs. Maybe even as large as the 5000 line program I wrote for the admissions department."
Most of the class was impressed, the rest...weren't. I suppose that 5000 might seem like a lot to somebody just starting out, but it's not so impressive today when code generation tools routinely write 5000 lines of code just based on the state of a single checkbox.
I agree with some of the others though. Poor instructors can play a large role in sorting out good future programmers from bad future programmers. Although, that isn't always an indicator of whether somebody will be allowed to write code. As evidence by the existence of this site.
Admin
Admin
Floppy's and hard drives are a form of RAM. Where do you think the name "DVD-RAM" comes from?
Memory chips can also be ROM (allthough it would be hard to have a functional computer using ROM only)
Admin
Just yesterday I was showing a budding developer how to make a set of fields on a form determine the accessibility of a button (in Delphi)... I told him he would need to use regular expressions but for now I would just check for null strings to illustrate what could be done; I created a simple procedure which is called on the on-change of any of the determining fields:
Yes, with the brackets, to make it clearer. Immediately the question came, "what do the two arrow symbols next to each other mean?"
Admin
Well, at least that teacher didn't tell you that Pentium II was called a Pentium "II" because it had... two processors. I'm not kidding, that was a logic circuits teacher speaking. And it was a CS course.
Admin
Friends are those that can access your private parts. :)
Admin
I almost believed it was valid Perl code :)
Admin
Be glad it wasn't C and you had to answer what was so surprising about an equals sign !=
Admin
Unless you end up working with one of those idiots who learned from a professor like that. He'll be the guy who does very little productive work while at work and shovel it all onto you.
Admin
Unless you end up working with one of those idiots who learned from a professor like that. He'll be the guy who does very little productive work while at work and shovel it all onto you.
Admin
This is some sort of joke, right?
Admin
The problem is that most of these kinds of stories are fabricated or exaggerated.d
Admin
I had a CS teacher who mostly knew his stuff, but used a method that is a WTF. He wrote code on the projector, from which the students were supposed to copy it to their computers. The code flowed to eyes and from there to the fingertips, never touching the brain on its way. I'm still not sure how the hell that was supposed to teach us anything, except that copy-paste may be a relevant coding method later when we land in a programmer position.
But he was a genius compared to this one lady who tried to teach us "dynamic webpages with ASP". She handed pages of awful code that might have worked in some specific environment, which we didn't have.
The studies required no preliminary knowledge, but the school started teaching Java programming straight away. That was quite devastating to the students who had no grasp of the basics. Of course, in addition to the normal human beings who would eventually learn something, there were a couple of "interesting" individuals who were in the wrong school, but couldn't realize that.
I remember a discussion with a older lady. This was C++ programming, and for some reason we were talking about display adapters. Suddenly I realized that she had no way to understand even the basic concept. I did about the same as the student in this story - just ran away. Three and a half years of studies, and she's probably no good in any kind of computer-related job. I feel bad for her.
Admin
5,000 lines is nothing to shake a stick at. Depends on context, of course. Like you say, code auto-generators could spit that out quickly, but if it was 5,000 lines of pure hand-bombed code, that's a fair chunk of work. Of course, I would expect it to be broken logically amongst several different classes. A single class that's 5,000 lines long is impressive in the not-so-positive sense. I program for a system that encompasses some 500,000 lines, but the classes I wrote are no longer than 1000-2000 lines of code each at most.
It also depends on his coding style. Easily 20-30% of the lines in my code files are due to comment blocks or whitespace for nice formatting.
Admin
Reminds me of my high school CS teacher. Gave us C++ code that he claimed he had just written and compiled and how lucky we were to have a teacher who could put together a C++ program capable of I/O in under an hour.
It was a .txt file (as evidenced by the printout listing the name), had no semicolons, and had lines like: cin << int x cout >> x.
Somehow I failed this class. It must've been for my frequent correcting of him, because I got a 5 on the AP exam (no help to him).
Admin
OK.. let me se if a got it..
Opensource are those softwares that have his classes declared as public so they can be freely edited.
Nice!