All you programmers, have a good laugh at my education


In fact, he didn't even recognize the ternary operator (that is, condition ? if_true : if_false) when I used it on an assignment. What does that tell you?

That the conditional operator is not very syntactically intuitive. Even your annotation seems to suggest it's shorthand for an if/then/else block.
 
Last edited by a moderator:
When I went to school there was no such thing as Computer Studies. We had a couple of BBC Model Bs but nobody ever used them.
 
That the conditional operator is not very syntactically intuitive.

If you mean the ternary operator, I agree with that statement. ;) The non-intuitiveness of the way it's layed out in C made me scratch my head quite a bit before I understood it (and take a couple of refreshers before I memorized it). Python's "true_value if condition else false_value" is much better in that department. Ah, well.
 
Last edited by a moderator:
In fact, he didn't even recognize the ternary operator (that is, condition ? if_true : if_false) when I used it on an assignment. What does that tell you?

That the conditional operator is not very syntactically intuitive. Even your annotation seems to suggest it's shorthand for an if/then/else block.

I just tried to keep my annotation short. I know that it's more like condition ? return_this_if_condition_true : return_this_if_condition_false. The point is, he hadn't even heard of it.
 
Yeah there wasn't any formal CS class in my High School.. The "Computer Lab" was a joke. There used to be a teacher that taught BASIC, but left several years before I went there and those TRS-80's were left over,they were currently just being used by the typing instructor( Yes we had a Typing class). The computers we had through out the school were IBM PS/2s that were locked down as dumb terminals, they couldn't do anything but run the IBM 5250 terminal emulator, which only gave us a text based email system(Internal to the school only) and we could check our grades on it. My senior year we finally got a few Windows 3.1 386's in the Library that could get on the internet via dial-up.
 
Last edited by a moderator:
If you mean the ternary operator, I agree with that statement. ;) The non-intuitiveness of the way it's layed out in C made me scratch my head quite a bit before I understood it (and take a couple of refreshers before I memorized it). Python's "true_value if condition else false_value" is much better in that department. Ah, well.

Yeah, and while we're on the topic I don't like that it's usually called that. It's A ternary operator, although that's obscured by the fact that it's composed of two characters. Just because it happens to be the only ternary operator in the language doesn't mean it should be called THE ternary operator. Almost feels like they're trying to make its function even more obfuscated by naming it based on one of its more nondescript properties. If I'm going to go that route I think I'd prefer "that ternary operator" :D


Really don't understand why they didn't just make if/then/else clauses have r-values, taking the value of the last thing in the block. This seems pretty straightforward:



Code:
x = if(condition) y else z;


Blue Protoman said:
I just tried to keep my annotation short. I know that it's more like condition ? return_this_if_condition_true : return_this_if_condition_false. The point is, he hadn't even heard of it.

I know you know what it means, just making the point that it's because you learned it and not because it was obvious. I don't know when this guy went to college but if he was never taught C, C++, or Java when he went to school then he'd probably never see the operator.. in which case I wouldn't be surprised if you didn't know the weird syntax idioms in Fortran or Pascal. One of the first things to understand about programming is that being a good programmer doesn't mean knowing some language and not knowing some language doesn't necessarily make you a bad programmer, no matter how popular the language is.
 
Last edited by a moderator:
Yeah, and while we're on the topic I don't like that it's usually called that. It's A ternary operator, although that's obscured by the fact that it's composed of two characters. Just because it happens to be the only ternary operator in the language doesn't mean it should be called THE ternary operator. Almost feels like they're trying to make its function even more obfuscated by naming it based on one of its more nondescript properties. If I'm going to go that route I think I'd prefer "that ternary operator" :D

Wow, I didn't even know "ternary" was more broad than that. :lol: Thanks for that! Now I'm a little less ignorant. :)
 
Back when I was eleven, I was interviewed for a computer science course at secondary school - but as I already had experience in programming (Sinclair BASIC followed by Z80 assembler) they declined the course to me as they felt that I couldn't be taught.


From there I couldn't do any other qualifications in programming or computers in general - as I didn't study it at school. I ended up as a programmer for the local council in DBase/Clipper and SmartwareII, and ended my career in computers as a manager in their IT department but as the job didn't suit me I left after a year or two and never went back.


Now I work as a Registered Nurse as a career, and code for fun in my spare time (or when it's quiet at night - having PandaBAS on the pandora makes the night shifts so much more fun).


D.
 
BP -- most CS classes are run by mathies; theres a good divide.. schools with a CS department, and schools with a CS section in the Math department. Some of the very best schools fall into both categories, so don't count him out.


Also, the trinary operator is in some of the Algol-descended languages like C, but it is not in all languages; C is one of the best to know, but what about functional languages like Scheme or Lisp; most peopel count them out, as being old, but Common Lisp is still one of the most important and powerful languages around.. it just hurts your brain. If someone knows Lisp, and doesnt' know the trinary operator, you woudl be a fool to turn your back on them :)


BPman .. you have a lot ot learn, but you have the key point -- you want to learn. You're already shoulders higher than your peers, and will do the better for it. But don't put up blinders :)


jeff
 
Thanks for the encouragement. It's just frustrating being one of the most experienced people in a classroom about a subject you're supposed to be learning.


Still, when I get the AP CS test over with (tomorrow; wish me luck!), I'm going to burn my Quick Reference in celebration.
 
But this holds a special symbolism to me. :(
 
Last edited by a moderator:
Run it though a shredder, then sprinkle bits on a compost heap...?
 
I promise to recycle the rest of my class notes (for ALL of my classes), but this one I have to burn.
 
If someone knows Lisp, and doesnt' know the trinary operator, you woudl be a fool to turn your back on them
Except that in lisp if they don't know the lisp ternary compare then they don't know one of the common ways of doing conditional code. Lisp's "if" works the same way as C++'s "?:".

I promise to recycle the rest of my class notes (for ALL of my classes), but this one I have to burn.
A student taking notes? It's been years since I've seen that. I'm lucky if I can get my students to turn up to a written math exam with a pen (I have to bring spares). :)
 
Well, more like handouts and old homeworks. All the notes I took in that class during the year could fit on an index card.
 
Last edited by a moderator:
My high school has a "basic computer" class. Optionally, students can take a test to skip the otherwise-required class. The class itself is rather disappointing, it isn't computers at all. The class is limited entirely to language related things: how to format a semi-block letter (or something like that), how to write an MLA paper, how to write a business letter... but, they call it a "computer" class because it's all in Microsoft Word 2003.


Anyways, I almost had to take the class in "basic computers" despite my work last year as an instructor at a robotics camp.


My school doesn't have an AP/Advanced CS class though, which is good. I'm teaching myself "AP CS" and I'll take the test next year.


Edit: I remember now, the official title of the class is "Intro to Computers". The test is the "Computer Literacy" test. Since I passed the test without taking the class, I'm certified "computer literate" by my school.


Also, it's a private school.
 
Last edited by a moderator:
The university I'm going to next fall has a requirement for "computer literacy competency" to graduate, either a test or a stupid class, which is also a prerequisite to Computer Science classes. The so-called "computer literacy competency exam" consisted of some general knowledge (including arranging floppy disks, USB drives, CDs, and hard drives by general storage capacity) and knowledge specifically on how to use a few miscellaneous features in a small collection of proprietary programs: Microsoft Office, Windows Explorer, Internet Explorer, and Notepad. The worst part of it was Microsoft Office since it has a bizarre layout compared to e.g. LibreOffice, combined with the fact that any wrong click, even going into the wrong menu, counted as "incorrect", with 3 attempts permitted before the answer was marked as "wrong".


Even worse, when I inquired the testing office about a "Computer Science placement exam" I had read about but didn't see on the testing site, the person who answered told me that it is the exact same exam as the "computer literacy competency exam".


What's funny to me is the high school I went to is actually pretty good with this. It has the stupid class that teaches you about Microsoft Office, but it's actually appropriately titled as "MS user", rather than being called "computer literacy" or "general computing" or some bullshit like that. It also has a proper programming class, though it's only a semester of Visual Basic due to lack of interest from students in anything more advanced (the last semester they had C++, there were three students there).
 
Last edited by a moderator:
Back
Top