Things college professors say

Pages: 12345
@computerquip
Idk if this will help now but MonoDevelop can read and write VC++ project files on Windows and Linux. It's mostly used for C# but it supports C/C++ as well.
closed account (S6k9GNh0)
Actually, I tried this. It did not work. VC++ couldn't open the files I had created.
closed account (o1vk4iN6)
I agree with rapidcoder, coding conventions aren't right or wrong it just depends on the person's preference.
I agree with xerzi.
I agree with big stupidy.
Name calling. How classy.

the answer is neither, because coding conventions are preference and preference IS SUBJECTIVE. FFS.
closed account (o1vk4iN6)
@vlad

Please use [ code ] tags, thank you !

What you posted is wrong as you are using semi colons in place of colons (probably a few other things as well), it probably won't even compile, but still not wrong because of the coding convention.

Last edited on
I may be one of Vlads idiots, but I don't care, I like opening bracket on same line; putting it on the next wastes a line IMO. I don't think readability is an issue; either way is very easy to read. The decision of which to use is trivial IMO.

@Vlad
You're going to get banned continuing to insult people. It would be a shame because I know you're active in helping people on the other sections. Maybe you need to beat the stuff out of a pillow and take some deep breaths :)
Last edited on
I have never understood what it means to "waste a line"...
closed account (o1vk4iN6)
^

Exactly, there's a scroll bar for a reason and I'll be damned if I ever see this:

http://i.imgur.com/7aSRQCX.png
Last edited on
@htirwin
I hope he does get banned.

@LB
Yeah, I don't get it either, they're not exactly in short supply...
closed account (S6k9GNh0)
wth vlad?
I tend to do functions with a leading blank line like this, and no blank line after control's.

1
2
3
4
5
6
7
8
9
10
void funct() {

    linex;
    liney;

    if (x) {
        akdh();
        kdsj();
    }
}


1
2
3
4
5
6
7
8
9
10
11
void funct() 
{
    linex;
    liney;

    if (x) 
    {
        akdh();
        kdsd();
    }
}


The first one is more compact and to me it looks prettier too. It's also easier to type. That's just my opinion. The only really objective difference that I can think of is that the second one takes more space (wastes a line).
Last edited on
It's a personal preference thing. I if you have a very long for-loop I find the new line a little easier, because when you scroll up, you just look for the {.

I do however enjoy saving some of that vertical white space. Sure, I have a scroll bar. But I like to see as much of the code as possible on one screen. When I read code with excessive white-space I feel like I'm reading a book with 1 word per page. It makes it easy to read an individual statement, but harder to get the whole picture and recognize design patterns.

But this thread looks like it's taken a bit of a tangent away from the original posting with Java vs C++.
I thought that the thread is about what "college professors" say, but this last page looks more about what a forum member said. The apparent contradiction disappears, if the member turns out to be a professor.

I don't care what professors say. Never have. They are fallible.
You guys are just getting your panties in a bunch, seriously just take it. It's not like he's threatening to walk up to your door and shoot you or anything.

@htirwin

The problem with most people on with the line and then brackets is they waste too much whitespace with the parenthesis. IMO that makes it harder to read.
closed account (S6k9GNh0)
keskiverto, true but they still very heavily influence the people they teach. They should be taking the due time to solidify their teaching methods to be correct and efficient.

I personally paid good money for a class I was taught nothing out of and even tried to teach me that undefined behaviors in C++ were defined. Anyone new or hell, anyone not paying attention, would not even know what they're being taught.
Last edited on
closed account (o1vk4iN6)
But I like to see as much of the code as possible on one screen.


If you really want to read as much code on one screen I'd suggest getting a second monitor that can pivot and turn it so that you have the most vertical space you can. That'll get you like 20x as many lines than not using a new line for a bracket.
closed account (S6k9GNh0)
I have two monitors... it's not as great as most people say. But I'll use one monitor for text editor/console and another for documentation.

But note that the way my monitors are placed also force me to pivot my head a lot which kinda discourages its use. If you get multiple monitors, get a monitor stand and place them as close to each other as possible.
Actually, if I do the math, wouldn't you get 2 times as many lines?
Pages: 12345