Class test news

When Mood Music
2011-10-20 12:50:00 mellow random student background chatter

We sat our class test for Software Development 1 yesterday. This was worth 10% of the module, so approximately 1·111 of my final mark. Assuming I’ve passed, I have now achieved just under 5% of my MSc.

The test was an open-book ‘write a piece of code to solve a problem’ question, to be done in 90 minutes. You can see my code here.

  1. The bright blue text is the actual question. I copied it into my program to avoid needing to swap from IDE to the question document. This was partly for simple efficiency, partly for good practice and partly because Windows 7 makes swapping between apps using alt-tab annoying because it flickers up ghost images of things you might be tabbing to and displays options as mini-windows at the bottom of the screen, rather than as a row of icons in the centre of the screen.
  2. I then decided my strategy – that’s the bit in teal.
  3. I then wrote my pseudocode – that’s the comments in red in the main part of the program – and set about translating that into actual code. (The comments in the methods/subroutines were added in as I wrote the code.) Fortunately, this was an open-book exam and I’d already written bits to check and validate user-entry, then put it into an array, so I just needed to copy it into my program and change the variables’ names to ones more suited to this problem. Despite this short-cut, I had only half an hour left by the time I’d finished writing the data-entry code.

    It took a further 20 minutes to write the data analysis and output code. I spent about 5 minutes testing and fixing the program – It didn’t work perfectly first time.

  4. I just had time to write a few comments on extra validation I’d like to include and that I’d achieved a couple of things in methods/subroutines which I’d originally thought would be in the main program. (These are in yellow).

I’m pretty confident I’ve passed – the code has structure, using methods/subroutines; it’s full of comments so you can see how it works and has ideas for improvements. OK, it solves a trivial problem but I finished and tested it in the time allowed while others didn’t and it includes a check that temperatures entered are greater than absolute zero – I don’t think anyone else will have done that. (BAH – I’ve just realised that I omitted that test from the minimum temperature data-entry method!!!)

I’d have liked to test it a bit more. Feel free to download the compiled code and let me know if you find any faults in it.

Mark to be reported as soon as I know it.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.