- 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'm not sure what language you're alluding to, but in Java this works if otherProblems() has a return value that's assignment compatible with 2 (e.g. Integer, int or Object). There are other languages that allow the ternary operator for functions that don't have a return value as well (although I don't remember which ones - could be JavaScript).
That a joke compiles doesn't mean that it's any good, though.
Admin
If said assignment was for a "Data Structures" course, well, its expected that you actually do the implementation from the ground-up. This is so you can learn how the whole thing actually works, rather than "just doing it". Of course, you could get away with it, because the exam didn't actually say "do your own implementation". ;)
Admin
Well, not if they are doing something like entering in a blog comment, or a letter to mom. In thoes cases, the word wrap should work just fine for all of their formatting needs.
Admin
Why didn't you need typing at night? Does your religion forbid night typing?
Admin
In my elementary school we had a typing program that used an average word length value to calculate WPM. We soon figured out that you could go into the settings menu and change that value to 1, so every character typed was counted as a word.
Admin
I got a typing certificate once while job searching. 360 days later I showed it to a temp agency, who said "Good you came in this week, it's almost expired".
I opened my mouth to point out the stupidity of a typing certificate expiring, but shut it again. I needed the job.
Admin
I think it's the positive feedback people get when they hammer on elevator and crosswalk buttons. They keep hammering, and eventually it changes. I've always wanted to tell them that if they can hit it 100 times before the light changes/elevator arrives, they'll win a prize.
But them I'm a dick.
Admin
If you were assigned to write, say, a program to send and receive emails, could you just download a copy of Eudora and turn it in?
Admin
When my kids were young I told them that you could make the traffic lights turn green by just chanting "green ... green ... green". They tried it and, sure enough, if you just keep it up long enough, it works!
Admin
In my junior-high typing class (which, looking back, I do consider to have been worthwhile), we'd do the exercises on some bit of software that didn't allow backspacing, and that printed out the result afterward for review by the instructor.
Trouble was, I had a certain tendency to swear upon making a typo... and not out loud.
Admin
I have a similar story from high school.
I was required to take the typing class and used specialized software to do so.
I found that I could get up to 65 wpm - fastest in the class, if I simply skipped the last line of the test. Because the errors, measured by percentage of characters, were fewer than the threshold, I basically gained a huge boost of speed.
I type at 95wpm now, legitimately.
Admin
Admin
Actually, nothing in the C++ standard says that std::list is a doubly-linked list, while its complexity guarantees prevent it from being anything else.
Citing some documentation of the SGI documentation doesn't help, especially since you probably weren't using the SGI implementation anyway.
Admin
I always get annoyed with tests that don't really test knowledge of the subject but rather one's ability to outguess or outsmart the test-writer.
My daughter once took an economics class where the tests consisted almost entirely of multiple-choice questions where the choices were all true, but to be marked correct you had to pick the one that was in the textbook. Like -- not an exact quote, I'm not going to search through old school papers just to get the exact words for a blog comment -- one question asked what the value of tools was, and the choices were things like, "(a) Increases worker productivity; (b) Enables workers to produce more with the same effort; or (c) Makes workers more efficient." Not only were all the choices true, they were all the same idea in different words. The "right" answer was the one that was a direct quote from the textbook. We quickly figured out that the way to get a good grade was to memorize likely sentences from the textbook -- sentences that appeared in bold or italics or at the beginning of main sections.
It seemed to me that this was the exact opposite of a good test. Surely what we really want is for the student to master the IDEA, not memorize the textbook. I would think a good test would deliberately use different wording from the text to tell if the student really understands the idea and didn't just memorize the section headings.
Admin
Apparently Napoleon used to say of his subordinates that he didn't want lazy people, he didn't want clever people, he wanted clever lazy people because they'd always find the shortest way to do something.
Admin
No, the problem with a lot of those buttons is that there IS no immediate feedback. I want to make sure that my button press has been registered so I often push a crosswalk button 2 or 3 times, so as not to have missed my chance at interrupting the normal cycle just because I didn't push it all the way down or something(I also just happen to like pushing buttons).
Some elevator buttons light up when the press has been registered thus eliminating the need to press it again. You already know that your input has been accepted and can commence patiently awaiting the result.
Admin
No, because eudora is not open source. yOu need to give t3h source codes.
Admin
Dangit, Alex, I can't believe there wasn't a single "aa"!
But seriously, typing tests? WTF?
Admin
Heaven help me if I ever need to take a typing test again in my life. My first question would be, "can I type in Dvorak"? And I'm certain that the answer I'd get is "What's Dvorak?"
Admin
Hah, interesting. There's a chance the TA was used to grading a lower-level course, too: I've had to take off points in introductory Java CS courses (ack) because the students used the List class instead of implementing their own linked list, as the lab instructions explicitly said.
Admin
20wpm? I can't really touch type and I can type a lot faster than that. Granted I also disturb people given how faster I can type with just two fingers (granted this is without looking at the keyboard half the time).
Admin
"insitutions"? Was that word in the actual test?
Admin
This reminds me of a "science" competition that I went to in High School. Amongst the various egg drop, airplane toss, etc. competitions there was a touch typing competition. Easy I thought -- I've been touch typing since the 3rd grade, and I was doing around 120 wpm at the time of this event.
So I get to the competition and I discover that while it may be touch typing, there's no way I'm going to do well. In fact, I don't think I finished the first paragraph.
To this day I still don't know the proper way to setup an IBM Selectric Typewriter for specific margins, feed paper into it quickly, or how to quickly do a proper carriage return, etc.
In the nearly two decades since then I think I've seen an electric typewriter all of twice -- if you exclude junk/repair shops, yard sales, etc. Once was a dust covered one in the University library. The other was when my wife and I went to get our marriage license.
Admin
Fail. Students that implemented the program in Java with the LinkedList class were given full credit. The course was Data Structures, a senior level class. We'd all demonstrated years earlier that we could built a linked list type in Computer Science 2.
He didn't, and she didn't So it didn't occur to me that I should have to. The standard does specify that <list> be implemented as a doubly-linked list. If an implementor ignores this requirement, that's not under my control. Regardless, the implementation we used came from SGI, and its documentation clearly stated that the <list> type was a doubly-linked list. I think it's a given that linked list references in C++ would be pointers. If you wish to argue that, I'd remind you that Java's LinkedList class doesn't mention use of pointers in implementation, nor does Java itself implement actual pointers; so I'm on fair ground with regard to implementation semantics.Admin
how faster indeed.
Admin
No, as I explain in another response the purpose of the assignment was not to create a list type, but to demonstrate an understanding of hashing. The STL <list> type is just as valid as Java's LinkedList type, and those who implemented their hash with LinkedList were not penalized. Just because it's an assignment for data structures doesn't mean we had to re-invent the wheel. Hell, should we have designed the processor instruction set, defined our own language, and written our own compiler too? I mean, it's cheating if you use a compiler someone else made for a language that implements int, long, double, float, char, and references, arrays, and pointers - right?
Admin
Power corrupts.
That's why you should make sure you get it.
Admin
This is pretty low on the stubbornness scale. I still have memories burned into my brain of my high school chemistry course. The first assignment of the class was a unit conversion worksheet (1cm = __ km, etc). One of the questions on this worksheet was something like "1M = __cm". Students all assumed that it was a typo, and answered 100. Turns out it was a trick question, and the correct response, despite it being a fill-in-the-blank worksheet, was to squeeze an explanation of how 1M isn't a valid SI unit of measurement into a margin somewhere. Lesson: The teacher NEVER makes a mistake.
Later in the year, we had an exam which had a question along the lines of "What is the pH of vinegar?" with a multiple choice answer. Some of you might already be thinking "What a ridiculous, useless question to have on a chemistry exam". You would, of course, be correct. It is pure memorization and not useful information in the slightest. But it was there, and through some miracle of guesswork and logic I picked an answer.
We get our exams back, and I got the question wrong, losing one point. Oh well. But I was slightly peeved that the question was asked in the first place. We never had to memorize any pH charts or anything, so how would anyone in the class know the answer? Further, vinegar doesn't even have a definite pH level- it would depend on the concentration of acid present in the vinegar, which could vary.
As fate would have it, though, that night my parents had a friend over for dinner who was a professional chemist. I complained about the many faults of my chemistry professor, including this absurd exam question. Amazingly, this guy knew the pH of vinegar, and informed me that I had, in fact, selected the right answer after all!
The next day at the end of class I went to the trusty Merck Index in the back of the classroom and looked through it until I found some table showing the pH level of vinegar. Sure enough, the chemist was right. It's a miracle! So I brought my exam and the Merck Index to the teacher, thinking this would be a pretty simple affair:
"I picked 2.4 and it was marked wrong, but the Merck Index says that 2.4 is the correct answer."
"Oh, ok, let me fix that."
problem solved!
Except it wasn't like that at all. The argument over whether I answered the question correctly extended for at least 15 minutes. She stood there floundering around for an argument, but never could come up with one. It was literally just 15 minutes of started, but never finished, sentences.
"Well, you see..." "But, it can't, because..." "No, because you see here..."
I just stood there patiently until the sputtering stopped, occasionally reiterating the point that the correct answer was right here on page 873 and that I had, in fact, selected it. Even then, I couldn't get her to admit fault (it would violate her primary cyborg directive, or something). The best I could get out of her after those 15 minutes was "Well, it's just 1 point, so it's not worth arguing over". Still, it was a very satisfying day. When you're in a class where you spend 3 weeks learning that 1 mol = 6.02 + 10^23, you take victories where you can.
Admin
However, the requirements that the standard does impose on a list<> (bi-directional iterators, constant time insert/erase) pretty much forces the issue. But, you wouldn't want the standard to tie the hands of whoever implements the STL on those newfangled quantum computers.
Admin
I thought it was <ctrl+alt+del><ctrl+alt+del><ctrl+alt+del><ctrl+alt+del> <ctrl+alt+del><ctrl+alt+del><ctrl+alt+del><ctrl+alt+del> ad infinitum. Oh, wait - I use a Windows box...
Admin
Reminds me of the Kevin James stand-up routine about his girl friend opening the car door: "Now? Now? how about now? Now? can I open it now? how about now? what about now? will it open now?"
Admin
As for typewriters, when I was doing some work at Apple, I needed to use a typewriter to fill out an IRS form 1099 (it was the money I paid my ex). None in sight at all. I eventually had to ask, and there WAS one inside a locked closet. Who needs typewriters (in a computer company!)??
Of course, using a real MANUAL typewriter (time warp back to the 60's) will humble all but the true typist!
Admin
In a work environment, it's awesome to save time. In a classroom environment, you are being tested for your skills. Most of my lab assignments came with explicit instructions that we had to implement our data structures ourselves, since the point of the assignment was to prove we understood them.
Admin
So the real WTF is that the test taker couldn't follow directions?
If I was given a test like that I would type it exactly as it was on the paper including pressing enter at the end of the line as it was on the paper.
I think the test taker SHOULD have been required to take a typing class if he didn't know that in a timed typing test you type it exactly the way it appears.
I really don't see how this is a WTF. The test taker obviously doesn't know anything about typing and should be required to take the typing class.
Admin
You win this round. The mention of doubly-linked list was in the documentation for the implementation, but not in the specification as I thought I recalled. Fail for me =(
Admin
No. I am surprised at how many responses I'm getting in this tone. In retrospect I forgot to mention also that I directly asked the question "do we have to implement our own linked list type?", to which the response was "No." We had already been through enough lectures about linked lists years before in CS2, and created our own linked list types as an assignment then. It was a moot point by this time. We were focusing on concepts being introduced in the curriculum, not re-re-re-doing things we'd already done.
Admin
For those of you who can type, you might apply for this position at my alma mater: http://www.tru.ca/careers/08-119.html
They have rather inflated the degree requirements for positions there since attaining university status. The above position (teaching typing) requires a bachelor's degree, and they would prefer a master's degree.
Sincerely,
Gene Wirchenko
Admin
<Space> <Hold CTRL> <C> <V> <V> <C> <V> <V> ...
(select all, copy, paste, paste)
I can fill notepad's 67,107,840 character buffer with 33,553,920 words in less than 10 seconds. I can type over a 4 billion wpm (run out of memory on 32-bit windows in about 20-30 seconds)
Admin
However, sometimes we were allowed to use our previous code, so if X assignment required, say, a doubly-linked list, I was allowed to bring in my previously implemented linked list for the assignment. This is also the main reason all my stuff from back then was written into a class... so I would have my data structure implemented inside an object, and just call it from another program, say:
Stack *s = new Stack(); s->push('f'); s->push('t'); s->push('w'); printf("%c%c%c\n", s->pop(), s->pop(), s->pop());
Thanks to that, I pretty much had my lightweight STL implemented by the time I actually started using STL. My best stuff from those days would be the AVL tree (balancing binary tree), which was incidentally the only working implementation when we delivered our projects back then. I used it as my symbol table storage engine later on, in the "Compilers" course, but that's another story. ;)
BTW, the ACM ICPC doesn't allow STL, so if you're going to that contest, you should take that in mind. =)
Admin
No, he did all the work that was required - what sort of fool does work that isn't needed? You can't read new requirements into instructions after the fact, only change them for the next group.
Admin
This sounds almost exactly like my first year Politics course. The exams were all multiple choice with two very obviously wrong answers and two answers that were so similar it was next to impossible to distinguish between them. In this case, none of the answers (or rather the wording of the answers) on the exam were even in the textbook or class instruction. The professor had re-written them all into his own "code" that he had neglected to share with us. You ended up with people in the exam room literally tossing quarters to pick the right answer out of the two obviously "possibly" correct ones.
The end result? Almost everybody failed the exams because nobody could read this guy's mind and to keep his job he had to assign the final grades on a curve. I got a 64% on the exam which was good enough for an A+ on the curve. My buddy got 35% and netted an A- on the curve. That was the worst class ever. The prof was drunk during most of his lectures too...we watched him tossing them back in the pub right before class one day. I had another buddy who witnessed this with me and after watching him for a while said "Man, I have to come to your class. This is going to be hilarious!"
Admin
Admin
Reminds me of when anyone of any age I ever drive anywhere does the same thing...
Admin
Admin
Admin
Hunt 'n Peck is not enough, I prefer Search and Destroy.
Admin
So the question here is, if you're doing hash tables, why does the professor care how you link the entries in each bucket? What if you wanted to implement it with an AVL tree or something like that? It wouldn't affect the fact that hashing begins the process.
Admin
That's bureaucratic thinking! The way you would do it is automatically the correct way, and of course you ignore the whole point of the class which is to make sure the students can type with proficiency to do their assignments, and instead make sure they can do exactly what must be "The Right Thing" because that's how you'd do it, whether it really helps them or not.
And asking the assistant for clarification should be an immediate fail.
Thanks for setting us straight
Admin
Oh my. This reminds me of when I decided, on a drunken whim, to attend DeVry. Since I had already been developing software professionally for 4 years (and writing code years before that), I thought I'd take the test to breeze through the basic, numb, boring, "Here's how to type a paragraph with Microsoft Office" class. So I took the test.
And failed it.
The test had numerous questions that nobody would, or should, know - like, "How many clipart images are included with Microsoft Office 97?"
Since somebody else was paying for the class, I said the hell with it and took it. Funny thing, in that class, there were 4 other developers and 3 network administrators, as well as a handful of other folks who had a lot of experience with Office.
Of course, I used StarOffice throughout the whole class - didn't touch MS office once - and told the instructor this after I got my grades. But that experience demonstrated what a ripoff DeVry was, so I decided to go to a real school.
Admin
I once worked as a volunteer tutor / mentor in a high school algebra class. The gig had its ups and downs, the biggest downer of the bunch being the computerized quiz system. Partof the daily routine was that the students had to self-test on the day's material.
The software in use appeard to be a generic quiz system and the teacher had formulated the questions and answers. The answers were text, and the students' inputs were compared against "the" right answer by a case-insensitive string match.
That's right, an algebra quiz where algebraically equvalent answers are not gradeabraically equivalent. All I could do was to acknowledge to the brigher students that the test was wrong and "mentor" them all to learn the real life lesson of the day: whatever it takes to get your ticket punched is the right answer.