Venting - College Coding

Pages: 123
Just to be clear: https://en.wikipedia.org/wiki/Myth_of_the_flat_Earth

The compiler we use at university is running C++98.... A variable I declared like this "double t{};" gave an error.. I want to blow up everyone who was in involved in making this compiler and chose to never update it.
Surely you're not suggesting that the developers keep releasing new versions and not updating their language implementation. It's much more likely that your school is not keeping their systems up to date.
> The compiler we use at university is running C++98
Hey, at least it isn't TurboC++.

If you want a proper education, then you have to do it yourself. Most courses are just meat grinders (fresh students in one end, graduates out the other). It won't be tailored to your specific interests or needs.

It won't get any better in the world of work either. Not every company immediately rushes to update their entire code base every three years that ISO pushes out a new standard.

If you find yourself at the start of a new cutting edge project using the latest toys, then good for you.

But chances are, you'll be working on some existing product stuck at some prior standard. You need to learn to be flexible.

Ultimately, the piece of paper you get from your university or college is only good for one thing(*) - and that's to get you through the door to your first job. After that, new job prospect only cares about old job achievements.

(*) Unless you're studying Law or something similar, in which case the "OBN" counts, and it's who you know rather than what you know (or perhaps it's what you know about who you know ;) ).
Surely you're not suggesting that the developers keep releasing new versions and not updating their language implementation. It's much more likely that your school is not keeping their systems up to date.

That wasn't I meant. It's just that the school went through the trouble of creating their own compiler, and they call it "Bobby". I want to stab the people who aren't keeping it up to date. Surely there is someone who is in charge of this? Even the free tutorial I used (learncpp.com) has an author who goes back to revise the tutorial to include the newest C++ features! Yet a university that literally gets thousands of dollars per student every semester can't keep an up to date compiler?

Hey, at least it isn't TurboC++.

I'm glad there's a bright side!

I know what university is like, which is why I come here to type furiously on my keyboard! Thanks for the advice though, I'll keep in mind that I should also learn on my own.

Really? Wow, that's impressive, if misguided. Either don't force others to use your unmaintained mess, or put some effort to maintain it.
What? The school wrote and maintains their own compiler!!??

    I  HAZ
  
    /' _
  (°.o /
   |  `.
   || ( `.
   cc C_,)~~  
   
   COMPILER


Seriously, I'd go to the CS Dean and say, “Um, how come we aren't learning C++ on a universally standard compiler, like Clang or MSVC or GNU C++? ’Cause I’ve noticed the one at school is a little out-of-date...”

After the spiel about how it’s good for students and the university and world peace and whatever, say, “Yeah, that’s great, but... I’m here to learn modern, standard C++, not, uh, maintain some in-house version of C++, no matter how cool. Honestly, Clang++ and GNU C++ are free and easy to manage...”

If he gives you grief about standards, say, “Well, yeah, the reason I’m here asking is because I tried to compile a piece of code written using C++ that was standard almost ten years ago, and it failed... y’see...”

If that doesn’t get you anywhere, say, “Okay, well, I’m a little concerned that my education is more focused on maintaining an in-house compiler than the standard that everyone else on the planet uses... But, okay, I’ll do my best to work with it, even though I’m not sure how this is supposed to translate into real-world value.”

WARNING: Do not try any of this at Wuppertal. They’ll politely show you the door.
You’re in the UK, though, right? 
Because if you are at Wuppertal you should know better than to complain about building and maintaining compilers...


Hey, at least it isn't TurboC++.

Sadly, many of the forum posts we get here are from people trying to get their programs to work on their university-mandated TurboC++ compilers. Which are being used because their universities are too cheap to buy an actual license or too un-tech-savvy to install the GCC, sadly.

Peace!
Seriously, I'd go to the CS Dean and say, “Um, how come we aren't learning C++ on a universally standard compiler, like Clang or MSVC or GNU C++? ’Cause I’ve noticed the one at school is a little out-of-date...”
Really? Wow, that's impressive, if misguided. Either don't force others to use your unmaintained mess, or put some effort to maintain it.

It's actually pretty sad. The professor I was talking about is still taking classes himself at the university. When he was teaching if statements today, he went over "else" and then stopped. He showed an overly complex way of making it so that once one if statement is evaluated as true, the computer doesn't have to evaluate the rest. I told him why not just use "else if"? He said that it wasn't a C++ function.. I assume it might be because else if wasn't available in C++98 and he learned coding from university.

EDIT: Just tested "else if" on the compiler, it worked fine. I guess he just didn't know for some reason.
Last edited on
Technically else if is nothing but an if inside an else. There's no separate keyword for else if. It's just that we indent else if as if it were a separate conditional keyword for the sake of readability but the compiler still thinks else if are two different keywords.

So if your teacher told you that there isn't such a keyword (though I think you are exaggerating some parts) then he is a reaaaaallly good teacher. I would love to have a teacher that went to such depths!
He showed an overly complex way of making it so that once one if statement is evaluated as true, the computer doesn't have to evaluate the rest.
Could you explain what you mean?
The professor I was talking about is still taking classes himself at the university.

It is quite normal for a graduate student to teach entry to mid-level classes. Just because the "professor" is still taking classes doesn't necessarily mean he or she doesn't know the material.

He showed an overly complex way of making it so that once one if statement is evaluated as true, the computer doesn't have to evaluate the rest.

Are you sure that he didn't say "false" instead of "true"?
> Which are being used because their universities are too cheap to buy an actual license or too un-tech-savvy to install the GCC, sadly.
It's down to the "centralised bureaucracy" which mandates the curriculum, and where nobody ever gets fired for maintaining the status quo.
Changing it means someone has to go out on a limb and risk failure.
Technically else if is nothing but an if inside an else. There's no separate keyword for else if. It's just that we indent else if as if it were a separate conditional keyword for the sake of readability but the compiler still thinks else if are two different keywords.

I assumed that was how that worked at first, but when he said that it doesn't work in C++ it made me think it was a function of its own.

So if your teacher told you that there isn't such a keyword (though I think you are exaggerating some parts) then he is a reaaaaallly good teacher. I would love to have a teacher that went to such depths!

As long as we dive into the right depths. He literally said "else if only works on languages like Python..."

Could you explain what you mean?


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
int main()
{
	int a = 10;
	
	if (a < 10)
		std::cout << "Less Than 10";
	else
	{
		if (a > 10)
			std::cout << "Greater Than 10";
		else
		{
			if (a == 10)
				std::cout << "Equal To 10";
		}
	}
}


^ That is what he did. This was when I said he could have simply used "else if" but he said that only works on Python. I was pretty baffled since I had used it on C++ several times and never presented me any issues. I never thought of "else if" as its own function, but I didn't have many thoughts on that to begin with. I started thinking it was its own function when he said it doesn't work in C++.

It is quite normal for a graduate student to teach entry to mid-level classes. Just because the "professor" is still taking classes doesn't necessarily mean he or she doesn't know the material.

That wasn't what I was alluding to. He knows how to code and all, but I've had to fix his code several times. I see him struggling a bit to write elementary code even on software. Also today he forget what he had to type in front of "getline". I'm not saying he doesn't know how to code, and I am certainly guilty of forgetting little things like that, but his teaching is mediocre at best and no one that I've talked to in that class has had any idea how to code anything without going to get extra help from else where.

Are you sure that he didn't say "false" instead of "true"?

If the if statement is false, then you want to check against the other conditions. But if the statement is true then you don't want to check against the other conditions since you've already found the correct condition - which is why you'd use "else" to begin with, to skip that particular line if the original if statement is evaluated to true.
Last edited on
Perhaps he wanted to introduce to you how else if statements actually worked. Maybe eventually, later on, he would introduce the convention for indenting else if statements.

It is true that Python has a separate keyword called 'elif' unlike C++. So I think he misinterpreted your question thinking that you wanted to know whether C++ has a separate keyword for 'else if'.

But I will agree that how he put it (if that's the way he put it), was very misleading.
And if it were that you phrased your question right, then it's about the teacher's incompetence. But if you're convinced that he speaks by guessing then you seriously need to do something. Because teachers cannot 'speak by guessing', they must 'speak by fact'.

And if you're having to correct his code then that's also equally absolutely not right. You need to speak up about this issue.

How? I'm not one to say.
But I will agree that how he put it (if that's the way he put it), was very misleading... And if you're having to correct his code then that's also equally absolutely not right. You need to speak up about this issue.

I try to be as unbiased as possible when reiterating experiences. I didn't say "elif" but "else if", he may simply have never seen "else" being used in that fashion before. And if I spoke up I doubt anything would change. In the end the professor can do whatever he wants and I doubt my university cares about student's education enough to do anything about it.

To add to the story, we had a lab that made us use strings and the professor never covered strings. So I ended up showing several people how to use strings and gave them a brief explanation of how they worked and why they needed cin.ignore(). Told the professor about it and he had no idea the lab wanted us to use strings and the TA in the lab had no idea strings weren't covered.

I don't know what messy CS department I'm in but everyone without prior coding experience is going through hell here. Though it is partly their fault for not speaking up to the TA sooner about not covering strings. But the TA probably wasn't gonna miraculously teach strings in 20 minutes for the assignment.

EDIT: Understand that this professor isn't some genius in what he does. He's a nice guy but not really good at teaching and doesn't seem to understand the concepts as well as he should. He's not a seasoned veteran or a professor who's brilliant to the point where I miss understand his intellectual wisdom.

When I correct his code the situation is usually like this. His code isn't doing what he wants but he doesn't know why. He stares at his code for up to 20 seconds. I finally just tell him what he needs to do, then he goes "Oh" or "You're right".

I find this funny because the university claimed to be trying to become a top tier school (whatever that means).
Last edited on
I was emailing the CS department and ended up getting angry as I was typing. I sent this to the email for fixing compiler problems (which I guess they had enough of to warrant having the email posted on the terminal of the compiler):

Hello,

I'm emailing as a student of CS135. I've been using Bobby obviously as required by the CS department, but Bobby is a horribly outdated compiler running C++98, which, you may have guessed, was the standard during 1998. The latest version is C++17 and I would expect a compiler that's used to teach students and test their code to be up to date. I don't like having my code break because I couldn't initialize using "{}" or because the key word "auto" doesn't function.

Thousands of students in this university, at least one thousand students in the CS department (underestimate). One CS class is around (224*3) $670 roughly. Multiply that by a thousand for every student and you get $670,000. That's how much money the university makes on average for a SINGLE semester from CS students. Now, take a few hundred dollars from that and use it to buy a licensed up-to-date compiler.

Thanks.
That last paragraph though.. yes you did get excited lmao.

If it helps you, we use Turbo C++ (and this is not something that can be changed with an email unfortunately) in my school ;)
But frankly I don't mind.

But on the other hand if you're a university student then it's really important to use a modern compiler conforming with modern standards.
^ That is what he did.
I wouldn't really call that "overly complex", but what I don't understand is that you say that he "showed" it. What is there to show? It's just an if inside the else block of another if.
http://phdcomics.com/comics/archive.php?comicid=2012

xD

I wouldn't really call that "overly complex", but what I don't understand is that you say that he "showed" it. What is there to show? It's just an if inside the else block of another if.

Well, let me explain it better. I see other people coding in this class and I watch my friend take notes and try to code. They don't understand anything from the professor. First off, my friend is fairly intelligent and after sitting in that class, he couldn't even use "cin" correctly until I showed him. The professor (writing on the board) showed that loop of nested if statements within "else". It was long and tedious and I saw students watching blankly.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
int main()
{
	int a = 10;
	
	if (a < 10)
		std::cout << "Less Than 10";
	else
	{
		if (a > 10)
			std::cout << "Greater Than 10";
		else
		{
			if (a == 10)
				std::cout << "Equal To 10";
		}
	}
}

VS
1
2
3
4
5
6
7
8
9
10
11
int main()
{
	int a = 10;
	
	if (a < 10)
		std::cout << "Less Than 10";
	else if (a > 10)
		std::cout << "Greater Than 10";
	else if (a == 10)
		std::cout << "Equal To 10";
}


You can see what would be an easier pill to swallow for students who have really no idea what they're looking at it. If he was trying to show the first example as to say that these two pieces of code are exactly the same, that would be great. But he showed it like that was the only way. What will happen once they get an assignment with several if statement conditions to run through? They'll end up writing pointlessly, not to mention the students that will stare blankly at their monitor with no idea of what to do (which I've seen plenty of).

Understand that I'm not dissing the code because it was wrong or anything, I'm saying he isn't very student friendly when teaching.
Well you could always return him something like
1
2
3
4
5
6
#include <iostream>
int main()
{
	int a = 10;
	std::cout << ( a < 10 ? "Less Than " : a > 10 ? "Greater Than " : "Equal To " ) << 10;
}
Well, I'm slightly baffled. After sending the email and getting a reply, apparently there are two compilers. Bobby is the server and not the actual compiler. The TA wrongly explained that Bobby was the university's compiler. Through Bobby, you connect to the ancient C++98 compiler which I was told is for "stability concerns". The other compiler you connect to through a different server name Sally, and that one runs the latest C++17. However, that's not the compiler used to teach nor the one the professors will run your code through...

EDIT:
Well you could always return him something like

True, it's a faster and simpler implement, but I don't think that would be simpler for people just starting to code xD.
Last edited on
Pages: 123