Thanks for constructive feedback!
I study in computer engeneering and I don't expect good education the
university
, in this field practical experience makes big difference
and not education IMO.
Hold on, the person teaching "Intro to C++" doesn't know C++? What
'university' is this where the people teaching a subject don't know the
subject?
it's unbelivable, but it's my conclusion after viewing solutions
posted by the course maintainer. Aside from ugly style the code is full
of
bool some_func(...){
....
int * a=new int[XXX];
if(a==0){
cout << "Unable to allocate memory" << endl;
return false;
} //this part seems to be copy-pasted everywhere
....
}
end then in every place code checks for return from some_func to be
true.
I short, it looks as though the course maintainer comes from old c
background, but I doubt that in such case she/he didn't know about
pointers/pointer arithmetics.
when in a medterm I needed to sort array of StudentInfo by GPA I wrote
struct StudentInfo{ ...; float GPA; ...;};
struct compareStudInfo{ bool operator()(stud1,stud2){return
gpa1<gpa2;}}
and then std::sort(arrayOfStudents, arrayOfStudents+numOfStudents,
compareStudInfo());
I got zero for the question because it seemed too short (my solution
was more compact than here) than they expected and they told me I
didn't solve the question, I tried to explain how it works, by the
teacher really had hard time understanding this code!!!
I personally believe intro to cpp for beginners should not teach
pointers etc. but rather start from stl containters (just as we were
taught std::string). Like when I studied java in college we started
right from oop
....About 16 pages of code... I was really afraid that I made a mistake
somewhere. For almost all the 3 hours I was writting (because this dumb
idiot wants for every class separate declaration and implementation, or
they're going to deduct marks). Imagine - they ask to write some class
with 3-4 members and 6-8 methods. All the methods have strange naming
convention (better say they don't have any naming conventions) and then
I needed to flip pages back and forth in order to copy the lines for
declaration to implementation... even int size()const{return _size;}
must be defined in *.h and implemented in *.cpp! In one place they
asked to write a few functions and to write a test program, one of the
functions was really difficult - I spent a big amount of time to
implement it and then I find out that at the bottom they say to assume
that this function is already implemented!!!
I asked the teacher why
this function was mentioned then in the section asking what we need to
write - he found it strange himself
)
Hold on, the person teaching "Intro to C++" doesn't know C++? What
'university' is this where the people teaching a subject don't know the
subject?
A friend of mine who took the class a semester before asked me to help
him to prepare for his final. Even at that time I told him that many
questions look like they were made by someone who also need to take
this course
, and my friend told me that the professor told the class
that he knows programming but doesn't know cpp and before he teaches
some subject in class he reads the book at home to learn it
))
I'm paying tuition. I really wanted to get exemption from the course (I
was ready to write a final exam on the first day of the class) but it's
so complicated to get exemption - I already repeat math, calculus,
molecular phisics, chemistry
(in total 13 classes). It was difficult
to proove that I already studied this material, since it was ~5 years
ago in school and of course I cannot write exam for many of the courses
cause I forgot this useless crap long time ago...
It's easy to say "sue them"
I'm not that reach
- only to fill out
peace of paper to the court costs 50$ or so (I live in canada). There's
also a funny thing - in "intro to computers" our university decided to
teach vb6! Course description says that it's kind of for thouse who
don't know what computers are
(is vb6 for those who don't know what
computers are?), on the first day (and the last when I attended this
class) I recall teacher started to explaint something about bits and
bytes, then he said "one byte is ... aa--mmm, let me check, it's on xxx
page ... [he's looking in the book] ... I think it's 4 or 8 bits ...
oh, yes, here it is - one byte is 8 bit". I couldn't believe my ears!
At least the teacher himself said that vb6 is quite obsolete and by the
time when we finish university it will be of no use ...
And yes, I new about placement new (I programmed for a while before
entering university
), but it's not related to the original question
IMO. I also had in one case to call destructor myself
in a fastcgi
app written in c++ I needed to handle signals and I didn't see a better
way to cleanup than directly calling the destructor