I demonstrate for one of Prof Richard Bowden's modules on C programming for first year Electronic Engineering students. Recently one of the tasks given to students was read in a matrix, multiply and write it out. To start with they did 3x3 then 7x7 then were instructed to make it variable size.
So when going round to help I showed a few of them how to allocate deallocate dynamic memory then asked the question had they been taught this. Apparently at they hadnt by this point, later finding out it comes up after Christmas.
My ramblings today are not about the module content or structure but actually the gcc compiler. When learning to program in C++ I learnt on a fairly sensible compiler inside Visual Studio. Then hit the gcc compiler and got annoyed by stupid things, for example
Visual Studio interprets this fine
std::vector<std::vector<int>>
g++
Error, required:
std::vector<std::vector<int> >
To note the space between the last two angle brackets.
While walking round I saw some students code and got a little scare by it they performed operations such as:
int size = 0;
scanf("%i",size);
int myArray[size];
for (int i = 0 ; i < size ; i++)
scanf("%f",myArray[i]);
for (int i = 0 ; i < size ; i++)
printf("%f",myArray[i]);
To my horror this compiled without warning or error and even worse it worked. I later while chatting to friends found that this was normal for the gcc compiler, and apparently the g++. So therefore we had some guesses about how this would work and the common answer was:
myArray is initialised to length 0, then since taken of the stack when read and written to you corrupted the stack.
The message to take away from this horror story of teaching C, is two things use a compiler that may not follow the letter of the standard but actually is intelligent and knows what you mean; always use -wall when compiling on gcc otherwise you will end up in a pile of mess later on!
We have been trying Office365 with the company I work for, specifically interesting was the opportunity to use there subscription model to handle Office installs at ~£160 for a retail licence per PC, paying for per user becomes very tempting.
Unfortunatly it may not be as simple as planned. I turned on my laptop today to get the wonderfully helpful and annoying error message telling me to reinstall office... having only installed it a month ago and wanting to try giving this service to novice computer users this message would scare them.
My list of problems with Office 365 seem to be growing, Microsoft could of hit something amazing with this concept but am appalled at the quality of the product is very uncharacteristic of Microsoft.
As I am living in Surrey, London is very easy to get too therefore this weekend I did a trip upto London with my family that were visiting after some food with them I explored some of London to see what Christmas decorations I could find.
Natural Habitat
Shameless Advertising
Balls!
See my Gallery for more images...