Hi everyone,
This is my first post, so a brief introduction: I am a first year Engineering student in Trinity College Dublin. We have a fairly intensive workload including Maths, Physics, Chemistry, Mechanics, Logic, Graphics, and of-course Computer Science.
The CS part of the course is easily my favourite and it's also the one I'm best at. We are exclusively studying C++ for this year and next.
So with exams looming (two weeks time) I find myself in unfamiliar territory. From within an IDE I can write any program that isn't beyond the scope of our course. But on paper (as the exam will be) it often leaves me confused. The emphasis is more on algorithms, abstraction and concepts over code.
The student who can see a familiar pattern in an unfamiliar exam question is the one who will do best. Abstract techniques are very important. To be able to recall chunks of code that have different abstract names (e.g. the "head-tail" method for recursively reversing integers, the "fill-up" procedure for determining the usable size of an array, etc.) and to be able to apply them generically -- that's the real art of programming, isn't it?
I guess it comes with experience, but most of my success with C++ has come from trial and error.
I would like to know if there are any recommended resources of general algorithms that "any self-respecting programmer should know off the top of his head".. little tricks, little famous bits of code that work in certain situations.. priceless time-savers.. things like that..
Don't get me wrong, I'm not trying to find a shortcut past learning the hard way. I've done all the grindwork all year, and I know my stuff pretty well. Just looking for an edge before my exams basically.
(Our first-year course does not extend beyond: loops, functions, call-by-reference, 1-D and 2-D arrays, recursion, string manipulation.
Objects, classes, encapsulation, constructors, destructors, inheritance and custom header files will NOT be asked this year.)
And the goto statement is banned.. hehe..
Thanks in advance! Sorry if I'm being too vague.. it's late ;)