My point was the C++ runs close to the metal (so to speak) while in Java there's an extra step between java bytecode and the machine code (namely, the JVM). IMHO, game engines do better closer to the metal.
I wasn't trying to knock Java in particular, I was trying to point out a fundamental difference between C++ and interpreted languages that makes C++ more useful in some cases (like game engines).
My high school didn't even remotely prepare me for university-level education. I literally skimmed through high school (that is, minimal effort) and (based on my standardized test scores) I got a scholarship for my first year of university. Then I tried to skim through my first year of university. Needless to say, it didn't work - I had to retake three classes.
It wasn't a lack of funding in high school that caused the problem. It was because schools in the U.S. aim to teach the slowest student in the class - even in advanced placement classes. (Yes, I realize I'm arrogantly claiming I'm smarter than the rest of my class. Humor me.) The whole "no child left behind" idea is fundamentally flawed - if they teach at the slowest student's rate, then the smartest students are going to be extremely bored, and they're going to turn their attention to unimportant things like video games.
If high school had required me to actually exert effort to graduate, I would have been far better prepared for a university-level education.
Never a good fit for the real world? What about all those games written in C++? Do you really think Valve's Source engine would be as good if it were written in Java?
On the other hand, I agree with you that average to less-than-average programmers will never grasp the more advanced pieces of C++. I think the solution is to teach them better, the solution is not to dump C++ in favor of $other_language. (C++ isn't right for all situations, but I think all CS programs should at least teach it.)
What, me, read the articles? No, I just saw someone else who said they read the article and quoted from one saying she was hospitalized for organ transplants...
The problem in *this* case is that she was hospitalized for organ transplants, and therefore was actually unable to show up in court. Expecting her to show up was unreasonable.
I guess we'll have to settle on disagreement then - I really don't want my editor guessing what indentation I want out of pasted code. Say I paste a single line with six spaces in front. Should it convert it to eight spaces or twelve (or four or none)? The answer depends mostly on the source I'm copying from, and has little to do with the code I'm pasting into. No editor can possibly know, so any correct guess will be just that - a guess that was correct by blind luck.
Anyway my whole point is that this is a deficiency in Python itself. It's the only language I use that depends on whitespace, so it's the only language that has this portability issue (C, Java, PHP, etc don't care what indentation I use, so there are no compilation issues with different indentation styles). I would rather fix the language than have my editor try to be smarter than me.
There's a simple fix - just change the Python spec to mandate four spaces for indentation. Then this entire issue simply disappears.
You weren't listening. Python blows chunks if I use four-space indentation and I paste in some code with three-space indentation. That's the problem. It has nothing to do with my editor.
How would you suggest I tell an editor how to adapt the indentation of every single code snippet I paste in? I'm not going to go change some indentation conversion setting somewhere every time I paste a code snippet.
Do you really want your editor to ask you about indentation every time you paste in some text? I wouldn't want my editor to try and guess; it would be wrong half the time anyway.
It's not about "fixing" my professor's code. It's about his code working when I paste it into *my* code. If I didn't *have* to fix his code, I probably wouldn't, especially considering that it's a school assignment that will become completely irrelevant two weeks from now.
My complaint was that because Python has no enforced indentation standard, I simply *can't* copy and paste snippets from my professor's code into my code. The difference between that and your example is that with your example, I *can* copy brace-less if statements into my code, even though I use braces everywhere.
That is, the difference between my complaint and your example is that Python's lack of enforcement of this standard results in lower portability, while Java's does not.
I don't understand what you're getting at, dad. My editor is capable of inserting spaces instead of tabs, I just choose not to do that... but changing that doesn't solve the problem of my professor using a different number of spaces for indentation than I do.
I don't want my IDE to guess what indentation each code snippet uses. Inevitably it will be wrong half the time.
How is the editor supposed to know that code snippet X uses three-space-indentation, but code snippet Y uses two-space-indentation, while code snippet Z uses four-space indentation?
Sure, you could contrive cases where it's easy to tell which is which, but contrived cases rarely reflect real world usage.
The only reason I still use tables for the layouts I do (I'm not a web guy, so my sites are side projects) is that I have yet to find an easy way to get a footer to work correctly with a multi-column layout using CSS.
I found a tutorial on a site once but it required far more code than a simple table-based layout. Any hints, guys?
Yeah, I specifically choose to use tab characters instead of spaces. I don't know why; habit, I guess.
My search for a good editor goes on, though recently it has been delayed by my desire to switch entirely to Linux. In Windows I'm using Visual Studio for C++ and C# Windows programs, and EditPlus for other things. I haven't decided what to use in Linux yet; my search has been fruitless, so I just stick with gEdit...
We're in the days of 1900x1200 widescreen monitors. You can't spare a few lines of text for some extra braces for clean-looking code? You can't scroll your mouse wheel one extra time?
I put curly braces around my single-line if statements because I want them to look the same (I think it looks cleaner), and it's easier to put in braces before I fill in the code than it is to add them later.
I'm confident that my code is clean; I gladly let my coworkers and manager look over it. It's too bad that you appear to think your way is the only clean way.
I learned to code on Windows using an IDE with auto-complete. That doesn't make me a bad programmer, and it's sad that you think "bad programmers inevitably learned on Windows". I know my way around a makefile. I learned both ways of doing things on my own.
Oh, and by the way, even competent coders have brain farts once in a while.
Oh, I could configure my editor to auto-convert tabs to spaces, but that wouldn't fix the problem I was describing.
You see, I like using four-column tabs. That would make tabs turn into four spaces. My professor uses three-space tabs. When I copy his code into mine, Python will still blow chunks until I make it consistent.
Oh, and if you're this rude to me without knowing me, I don't want to work for you.
Of course by "interpreted" I mean "anything not compiled directly into machine code".
Like I said, C++ isn't right for all situations. There are a lot of things C++ is good at, and there are a lot of things C++ is not good at.
I thought your post was insightful; I don't understand why you were modded Troll.
My point was the C++ runs close to the metal (so to speak) while in Java there's an extra step between java bytecode and the machine code (namely, the JVM). IMHO, game engines do better closer to the metal.
I wasn't trying to knock Java in particular, I was trying to point out a fundamental difference between C++ and interpreted languages that makes C++ more useful in some cases (like game engines).
My high school didn't even remotely prepare me for university-level education. I literally skimmed through high school (that is, minimal effort) and (based on my standardized test scores) I got a scholarship for my first year of university. Then I tried to skim through my first year of university. Needless to say, it didn't work - I had to retake three classes.
It wasn't a lack of funding in high school that caused the problem. It was because schools in the U.S. aim to teach the slowest student in the class - even in advanced placement classes. (Yes, I realize I'm arrogantly claiming I'm smarter than the rest of my class. Humor me.) The whole "no child left behind" idea is fundamentally flawed - if they teach at the slowest student's rate, then the smartest students are going to be extremely bored, and they're going to turn their attention to unimportant things like video games.
If high school had required me to actually exert effort to graduate, I would have been far better prepared for a university-level education.
Never a good fit for the real world? What about all those games written in C++? Do you really think Valve's Source engine would be as good if it were written in Java?
On the other hand, I agree with you that average to less-than-average programmers will never grasp the more advanced pieces of C++. I think the solution is to teach them better, the solution is not to dump C++ in favor of $other_language. (C++ isn't right for all situations, but I think all CS programs should at least teach it.)
Yes, it's called Zenmap.
What, me, read the articles? No, I just saw someone else who said they read the article and quoted from one saying she was hospitalized for organ transplants...
The problem in *this* case is that she was hospitalized for organ transplants, and therefore was actually unable to show up in court. Expecting her to show up was unreasonable.
How is a person hospitalized for organ transplants reasonably expected to show up at court?
I guess we'll have to settle on disagreement then - I really don't want my editor guessing what indentation I want out of pasted code. Say I paste a single line with six spaces in front. Should it convert it to eight spaces or twelve (or four or none)? The answer depends mostly on the source I'm copying from, and has little to do with the code I'm pasting into. No editor can possibly know, so any correct guess will be just that - a guess that was correct by blind luck.
Anyway my whole point is that this is a deficiency in Python itself. It's the only language I use that depends on whitespace, so it's the only language that has this portability issue (C, Java, PHP, etc don't care what indentation I use, so there are no compilation issues with different indentation styles). I would rather fix the language than have my editor try to be smarter than me.
There's a simple fix - just change the Python spec to mandate four spaces for indentation. Then this entire issue simply disappears.
You weren't listening. Python blows chunks if I use four-space indentation and I paste in some code with three-space indentation. That's the problem. It has nothing to do with my editor.
How would you suggest I tell an editor how to adapt the indentation of every single code snippet I paste in? I'm not going to go change some indentation conversion setting somewhere every time I paste a code snippet.
Do you really want your editor to ask you about indentation every time you paste in some text? I wouldn't want my editor to try and guess; it would be wrong half the time anyway.
It's not about "fixing" my professor's code. It's about his code working when I paste it into *my* code. If I didn't *have* to fix his code, I probably wouldn't, especially considering that it's a school assignment that will become completely irrelevant two weeks from now.
My complaint was that because Python has no enforced indentation standard, I simply *can't* copy and paste snippets from my professor's code into my code. The difference between that and your example is that with your example, I *can* copy brace-less if statements into my code, even though I use braces everywhere.
That is, the difference between my complaint and your example is that Python's lack of enforcement of this standard results in lower portability, while Java's does not.
Nice, thanks :)
So Python has a recommendation but not an enforced standard. That's what bugs me.
I don't understand what you're getting at, dad. My editor is capable of inserting spaces instead of tabs, I just choose not to do that... but changing that doesn't solve the problem of my professor using a different number of spaces for indentation than I do.
I've gone over this before elsewhere...
I don't want my IDE to guess what indentation each code snippet uses. Inevitably it will be wrong half the time.
How is the editor supposed to know that code snippet X uses three-space-indentation, but code snippet Y uses two-space-indentation, while code snippet Z uses four-space indentation?
Sure, you could contrive cases where it's easy to tell which is which, but contrived cases rarely reflect real world usage.
Silly people.
What about with a third column on the right (e.g. an ad column or whatever to the right of the content)? Does it still work the same?
Quibbles: if he's that kind of independent worker, how come he has time to goof off at slashdot?
It's Sunday. Who really works on Sundays? ;)
The only reason I still use tables for the layouts I do (I'm not a web guy, so my sites are side projects) is that I have yet to find an easy way to get a footer to work correctly with a multi-column layout using CSS.
I found a tutorial on a site once but it required far more code than a simple table-based layout. Any hints, guys?
Yeah, I specifically choose to use tab characters instead of spaces. I don't know why; habit, I guess.
My search for a good editor goes on, though recently it has been delayed by my desire to switch entirely to Linux. In Windows I'm using Visual Studio for C++ and C# Windows programs, and EditPlus for other things. I haven't decided what to use in Linux yet; my search has been fruitless, so I just stick with gEdit...
We're in the days of 1900x1200 widescreen monitors. You can't spare a few lines of text for some extra braces for clean-looking code? You can't scroll your mouse wheel one extra time?
I put curly braces around my single-line if statements because I want them to look the same (I think it looks cleaner), and it's easier to put in braces before I fill in the code than it is to add them later.
I'm confident that my code is clean; I gladly let my coworkers and manager look over it. It's too bad that you appear to think your way is the only clean way.
I learned to code on Windows using an IDE with auto-complete. That doesn't make me a bad programmer, and it's sad that you think "bad programmers inevitably learned on Windows". I know my way around a makefile. I learned both ways of doing things on my own.
Oh, and by the way, even competent coders have brain farts once in a while.
Oh, I could configure my editor to auto-convert tabs to spaces, but that wouldn't fix the problem I was describing.
You see, I like using four-column tabs. That would make tabs turn into four spaces. My professor uses three-space tabs. When I copy his code into mine, Python will still blow chunks until I make it consistent.
Oh, and if you're this rude to me without knowing me, I don't want to work for you.
Yeah, I usually fix indentation too, but I usually like to see whether it works at all before I bother...
I don't like using spaces instead of tabs (random personal preference with little or no basis). I set the tab display width to four columns.
I end up using find/replace, but it's still time I wish I didn't have to waste.