Why are most programming classes so dull?
Posted: Tue Oct 18, 2005 9:23 pm
Last year we had to do vB, and ask furball, the teacher was sooooo slowwww at showing us concepts. I did not know VB and I was learning faster at my own pace, but we would loose points if we used any concepts we did not learn, such as while loops, which we only learned on the SECOND semister... yeah, very sad.
Ex problem in the book: Create a program that lists all the items that are contained in a file
Most real programmers would do a loop and use !=eof() as the condition, that's the most efficient way of doing it as it does not matter how much lines there are to read.
Well guess what, we'd loose points, because we did not learn that yet.
To this day, I don't consider myself knowing VB, I just don't know enough of it, we hardly learned anything during those TWO semisters. heck, we never did anything more complicated then a dialog box with a button that displays some random text. Most of our programs could easily be replicated in a console.
Now this year we're doing C++, different teacher. So I figured "oh boy I can brush up on my C++ knowledge" Oh, how WRONG I was. Same gimick, we can't use stuff we did not learn. If I were to decide, conditional statements (if AND cases), Loops (While, do while and for), arrays, functions and basic user input/output would be all thought in the same week. They are fundamental concepts, and anyone in a computer science class that does not understand that, well I'm sorry but they should not be there. LOL That's assuming of course that we did VB last year, so even someone who never programmed before that's now in 2nd year will at least know those concepts, so all there is to learn is the syntax difference.
Here's a good example, we had to write a program today that takes 3 numbers in any order, then show the one that's in the middle. So if the user enters 10 30 20 the result would be 20. We were only allowed to use if statements (we finally "learned" those yesterday). Now that's not so bad for only 3 numbers, but still rather messy code. Then part B says to do it with 5 numbers.
Now without using efficient programming, you won't get too far using only if statements.
So stuborn as I am, I used the following illegal C++ features:
- arrays
- array sort function (I did not know that, until I took 2 minutes to research it)
- while loops
So now my program asks the user for a number from 1 to 512 (array goes up to 512, I doubt anyone would go that high anyway) and then it shows the median based on those numbers. To make things even more efficient, if the user enters a even number, it automaticly decrements it by 1, since medians can't really be calculated when there is an even amount of numbers.
All this in about 30 lines of code. My friends who are hard core on not using advanced programming had it working with 3 numbers and the program was using up more lines then mine. Mine works for any number up to 512. And it was easier to code on top of it!
I should get some kind of credit for making a program that's better then what they ask in the book, but instead, I'd loose points for that. Heck I'd probably fail the whole test.
Funny part is, that same teacher also teaches our Internet programming class, and we don't have a book, and man, not having a book gives so much freedom, we are actually allowed to research stuff and code using basically any info we find online, so functions, loops, etc.
I now know a decent amount of javascript because that class is actually going at a decent pace. Our first assigment was to make a basic calculator. I doubt we'll even get that complex in C++ class next semister...
It just pisses me off how a class that could be interesting is made really dull because we have to go exactly by the book.
Wow, I just transfered 17Gigs of data to my test server while writing this random rant. Now I need to transfer it to the external drive that acts as a backup to that server.
So As I was saying... J/K I'm done.
Archived topic from Iceteks, old topic ID:3865, old post ID:31494
Ex problem in the book: Create a program that lists all the items that are contained in a file
Most real programmers would do a loop and use !=eof() as the condition, that's the most efficient way of doing it as it does not matter how much lines there are to read.
Well guess what, we'd loose points, because we did not learn that yet.
To this day, I don't consider myself knowing VB, I just don't know enough of it, we hardly learned anything during those TWO semisters. heck, we never did anything more complicated then a dialog box with a button that displays some random text. Most of our programs could easily be replicated in a console.
Now this year we're doing C++, different teacher. So I figured "oh boy I can brush up on my C++ knowledge" Oh, how WRONG I was. Same gimick, we can't use stuff we did not learn. If I were to decide, conditional statements (if AND cases), Loops (While, do while and for), arrays, functions and basic user input/output would be all thought in the same week. They are fundamental concepts, and anyone in a computer science class that does not understand that, well I'm sorry but they should not be there. LOL That's assuming of course that we did VB last year, so even someone who never programmed before that's now in 2nd year will at least know those concepts, so all there is to learn is the syntax difference.
Here's a good example, we had to write a program today that takes 3 numbers in any order, then show the one that's in the middle. So if the user enters 10 30 20 the result would be 20. We were only allowed to use if statements (we finally "learned" those yesterday). Now that's not so bad for only 3 numbers, but still rather messy code. Then part B says to do it with 5 numbers.
Now without using efficient programming, you won't get too far using only if statements.
So stuborn as I am, I used the following illegal C++ features:
- arrays
- array sort function (I did not know that, until I took 2 minutes to research it)
- while loops
So now my program asks the user for a number from 1 to 512 (array goes up to 512, I doubt anyone would go that high anyway) and then it shows the median based on those numbers. To make things even more efficient, if the user enters a even number, it automaticly decrements it by 1, since medians can't really be calculated when there is an even amount of numbers.
All this in about 30 lines of code. My friends who are hard core on not using advanced programming had it working with 3 numbers and the program was using up more lines then mine. Mine works for any number up to 512. And it was easier to code on top of it!
I should get some kind of credit for making a program that's better then what they ask in the book, but instead, I'd loose points for that. Heck I'd probably fail the whole test.
Funny part is, that same teacher also teaches our Internet programming class, and we don't have a book, and man, not having a book gives so much freedom, we are actually allowed to research stuff and code using basically any info we find online, so functions, loops, etc.
I now know a decent amount of javascript because that class is actually going at a decent pace. Our first assigment was to make a basic calculator. I doubt we'll even get that complex in C++ class next semister...
It just pisses me off how a class that could be interesting is made really dull because we have to go exactly by the book.
Wow, I just transfered 17Gigs of data to my test server while writing this random rant. Now I need to transfer it to the external drive that acts as a backup to that server.
So As I was saying... J/K I'm done.
Archived topic from Iceteks, old topic ID:3865, old post ID:31494