Author Topic: C++ Questions & Opinions  (Read 1157 times)

rtgwbmsr

  • VIP
  • Member
  • ***
  • Posts: 1,257
  • Kudos: 0
    • http://www.akgames.net
C++ Questions & Opinions
« on: 1 November 2002, 01:17 »
I am having (lots of) arguments with my C++ "Professor". This guy knows VERY little and is teaching out of a book. It's obvious. I have no clue how he got the job, cuz he sure in hell isn't qualified. The class is relatively small, and combined, we know twice as much as this guy will ever know. This is the reason we have arguments: he insists I know nothing, and he knows everything (I have a lot of prior experience with C++).

Our current argument:

In a relatively small program with a menu, he wants us to make a different function to print out the options of the menu instead of putting the code in Main(). The code in question is 7 lines long. He doesn't want the switch statement for the menu in the function that displays the option.

My Side:
1) Adding 4 lines of code to modularize 7 lines of  code is pointless and bloating.
2) Putting all of the code pertaining to the menu in 1 function makes more sense, rather than having half of it in main and the other half in a different function.

His rebuttal:
1) Too bad. This is how it's done in the "real world". When you get a job you are going to get fired because you want to do things this way.
2) No. One of the purposes of Main() is to do things pertaining to the menu, so you should keep the switch statement there.

Any thoughts? Take sides...comment. I want something good to kick his ass with tomorrow   :D

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
C++ Questions & Opinions
« Reply #1 on: 1 November 2002, 01:27 »
I wouldn't get too worked up over it. Classes are to teach you the different elements of programming (functions/subroutines, looping, branching, etc). Often times things that you do in a class will not be how you do them in the real world but it does serve a purpose. It is good to learn how to write modular code, even if it doesn't make sense in a tiny example application.

How you do it in the real world will depend on a lot of factors. Modularization isn't often thought of as important when you first start a program. But as it grows you are going to want to rewrite it as modular as possible. If it is a project that is well planned this modularization will be designed in from the beginning and save time down the road.

So my advice would be to not argue too much over these minor things. Write the code how the instructor requests and get the credits. Even if it seems meaningless and wrong. It's not worth arguing over example code that really doesn't serve any purpose other than to teach concepts (even if the concepts seem wrong for the particular example).

In the real world 95% of your programming knowlege will not come from a class. Chances are the only reason he is teaching is because he couldn't make it as a real world programmer.

[ October 31, 2002: Message edited by: void main ]

Someone please remove this account. Thanks...

rtgwbmsr

  • VIP
  • Member
  • ***
  • Posts: 1,257
  • Kudos: 0
    • http://www.akgames.net
C++ Questions & Opinions
« Reply #2 on: 1 November 2002, 01:58 »
quote:
Originally posted by void main:
I wouldn't get too worked up over it. Classes are to teach you the different elements of programming (functions/subroutines, looping, branching, etc). Often times things that you do in a class will not be how you do them in the real world but it does serve a purpose. It is good to learn how to write modular code, even if it doesn't make sense in a tiny example application.

How you do it in the real world will depend on a lot of factors. Modularization isn't often thought of as important when you first start a program. But as it grows you are going to want to rewrite it as modular as possible. If it is a project that is well planned this modularization will be designed in from the beginning and save time down the road.

So my advice would be to not argue too much over these minor things. Write the code how the instructor requests and get the credits. Even if it seems meaningless and wrong. It's not worth arguing over example code that really doesn't serve any purpose other than to teach concepts (even if the concepts seem wrong for the particular example).

In the real world 95% of your programming knowlege will not come from a class. Chances are the only reason he is teaching is because he couldn't make it as a real world programmer.

[ October 31, 2002: Message edited by: void main ]




1) This program isn't exactly a tiny example program. It's quite large, in fact.

2) I'm trying not to argue. He's a cocky asshole and I can't stand him, not to mention the class isn't even neccessary.

I would like to buy a book on it, and take the exam without taking the class and get credit for it (it's possible). I'm buying the book tonight so i'll see how it works for me.

Thanks for your opinions.

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
C++ Questions & Opinions
« Reply #3 on: 1 November 2002, 02:27 »
quote:
Originally posted by The_Muffin_Man/B0b:
1) This program isn't exactly a tiny example program. It's quite large, in fact.

2) I'm trying not to argue. He's a cocky asshole and I can't stand him, not to mention the class isn't even neccessary.



In that case tell him that the only reason he's teaching the class is because he "couldn't make it in the real world". That ought to get you an A for sure.  
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
C++ Questions & Opinions
« Reply #4 on: 1 November 2002, 07:44 »
quote:
Originally posted by The_Muffin_Man/B0b:



1) This program isn't exactly a tiny example program. It's quite large, in fact.

2) I'm trying not to argue. He's a cocky asshole and I can't stand him, not to mention the class isn't even neccessary.

I would like to buy a book on it, and take the exam without taking the class and get credit for it (it's possible). I'm buying the book tonight so i'll see how it works for me.

Thanks for your opinions.



what book?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

rtgwbmsr

  • VIP
  • Member
  • ***
  • Posts: 1,257
  • Kudos: 0
    • http://www.akgames.net
C++ Questions & Opinions
« Reply #5 on: 1 November 2002, 07:47 »
quote:
Originally posted by The Master of Reality / B0B:


what book?



Would you like to recommend one?