for(T i = 0; i < end; ++i) process(i); //traditional
for(T i = 1; i < end+1; ++i) process(i-1); //error prone
for(T i = 1; i <= end; ++i) process(i-1); //error prone
for(T i=N-1; i>=0; --i) process(i); //much easier to understand than:
for(T i=N-1; i>-1; --i) process(i); //or am I mistaken?
My teacher told our whole class that without java you would not be able to use the internet (at all). Now I understand that many things might use java on the web, but you do not need java to access the web. And after about a 15 min argument and me uninstalling java from my pc and opening a browser and doing several other test in front of him: he still disagreed and I promptly sat down and told him I was wrong and apologised.
One of my engineering professors (with focus on computer science) admitted that he doesn't remember much of the math he learned in college. <_< >_> So there is a chance one may never use math learned form school... *cough*
And have you uninstalled Java from servers of Facebook, Google, Amazon, Apple, eBay or your bank website?
Secondly, my point was not: "Java does nothing for the internet" it was "Java is not needed for the internet" i.e. if java was not invented (a sad thing) other languages could have done the same thing (yes, dev time, etc. would be altered). So do you agree or disagree with my point?
My teacher told us Delphi would be the next C++. At that time Java was in its 0.xx state.
I was on a Turbo Pascal trip at that time and was glad to hear that Delphi is about to take over the world.
Then I started coding C/C++, now I'm glad he was wrong. Not that I don't like Delphi, but ... well ... it's not C.
I despise Java, but mainly for its library. To me it feels like it's made to give a lot of theoretical computer scientists a boner.
My two cents about the indexing thing: I never thought about starting with 1 until I had to work with ABAP (it's the language SAP uses for its "programs"). There you have "internal tables" that are like database views and start with index 1. But if you transfer data from an internal table to an array the first index is 0. It's an awful language.
Bad programming professors are not uncommon. I took a C++ course and finished most of the assignments (using C++03 templates) and turned them in ahead of time. Well, I had to redo them because I was told it wasn't C++. Fine. Did them again, they were accepted, but some of them were lowly graded... looking back, the result, the math, the intended input were all correct... what happened? Well, I used functions where the lesson hadn't taught us that yet.
That and the test questions sometimes asked for a result of an equation that had undefined results, where undefined was not an answer. Some of the questions were actually WRONG (like really basic things too... like what int result = 0; would be after result = 3 + 4 * 2;. Answer is 11 (which was an option) but the correct answer on the test was 14.
This class single handedly demotivated me from continuing towards a career in computer science.
EDIT: And he wanted us to do assignments in Microsoft Word and turn in VC++ project files to him (which I couldn't do since I fucking used Linux but shouldn't matter anyways since C++ is a portable language).