Thought for the Dazed

I've had to give up that Distance Learning course as I was having trouble seeing the teacher.

Flickr
www.flickr.com
RobMiles' items Go to RobMiles' photostream
Twitter
C# Yellow Book

Search entire site
Sunday
Apr142013

My Lego City Secret

image

I’m working my way through Lego City Undercover on the Wii U and thoroughly enjoying it. I still don’t like the loading times, but I’ve got used to the cranky car handling and I’m now ploughing my way through the missions. With the help of the above text. Yes, I’ve now reached the stage in my life where I’m using a cheat guide for a game which was created for eight year olds to play…

In my defence I’m only using it for when I get really stuck, in fact I’ve asked number one wife to look things up for me, so that I don’t get tempted to “cheat in advance”.

Saturday
Apr132013

Last Applicant Day for 2012-2013

DSCF1565-Edit.jpg
These are the people who laughed at the “Polar Bear” joke. Thanks for that.

Today we had our last open day of this academic year. Pretty busy too. Thanks to all of you for coming along, particularly the intrepid bunch that came all the way from the Isle of White. Great fun was had. I love an excuse to get out some gadgets and show them off….

Friday
Apr122013

Spring is starting to spring

IMG_6528_29_30.jpg

After a lot of trying, and frosts all over the place at the wrong time, we are finally starting to see signs of spring. The daffodils have actually been flowering.

Which is rather nice.

Thursday
Apr112013

Class Design for Shops

IMG_6213_4_5.jpg

At the moment lots of our students are working on their first year coursework. This year they can make either a game, which I’ve called “Space Killers” or a management system for a record shop, which I’ve called “Vinyl Destination” (turns out that there actually is a shop with that name – which only goes to show that great minds think alike sometimes). By the way, a record is what very old people used to buy music on. They are pressed out of plastic, usually 7 or 12 inches in diameter, easy to scratch and becoming fashionable again, which is nice.

Anyhoo, one of the central design decisions that has to be made is just how to store information about the records that the shop has in stock. We have been discussing this in the lectures, and it is interesting to reflect how the business needs of the customer affect the organisation of their data. Lots of shops have things to sell, but the way that you would hold their stock information varies from one business to another. I’ve broken these down to three broad categories which I’ve called “Art Gallery”, “Car Showroom” and “Supermarket”.

Art Gallery: In an art gallery each item of stock is unique. Or at least it better had be. Turning up with a second copy of the “Mona Lisa” would probably raise one or two eyebrows. Every item in the gallery has properties such as the artist or artists that made it, the date, the description and the price, but this information would be held for each individual piece in stock. To store the data for this application we would design a class, perhaps called “StockItem”, and then create an instance of this class for each of the pieces that is held in stock.

Car Showroom: This situation is slightly different. The showroom will hold a large number of cars, but they will be of particular models. They will hold a large number of “Ford Fiestas”, but each of them will have different trim levels, colours, ages and prices. If we held the data about our cars in the same way as we hold the data in the art gallery we would store a lot of the same data multiple times. Every individual StockItem would hold its own copy of the name, the manufacturer and lots of other information common to all Ford Fiesta models. A better way to design the system might be to have a class, perhaps called “CarModel”, which holds all the information about the type of car (all the “Ford Fiesta” parts) and then have the “CarModel” class hold a list of all “StockItems”. The StockItem class would hold all the information about a particular car, including things like colour, mileage and price. The CarModel class could hold a list of the StockItems of that particular model. For example, if the garage had a red Ford Fiesta and a blue Ford Fiesta there would be a CarModel object for Ford Fiesta which holds a list containing two items, a StockItem for the red one and a StockItem for the blue one.

Supermarket: In the case of a supermarket which is selling cans of beans, all the cans of beans of a particular type are identical. In this case we don’t need to store information about any individual can, instead we just want to know how many we have in stock. So for the supermarket we just need an object that holds a description of the item and also contains a counter that tells the system how many of that item are in stock.

If you are building a system for a customer, it is worth considering which of the three arrangements makes most sense. In terms of Vinyl Destination I reckon that because the you can get records of different quality it is more like a garage or an art gallery. The shop may have several copies of “Abbey Road” by The Beatles, but some will be in pristine condition (and therefore worth more) than others.

Wednesday
Apr102013

Addicted to 3D Printing

IMG_6505.jpg

You know you are an experienced 3D printer when:

  • Strangely shaped bits of coloured plastic from failed print jobs are no longer fascinating to you.
  • Your bedroom carpet is covered in strangely shaped bits of coloured plastic.
  • You can get hold of strands of plastic at 200 degrees centigrade and think "Ooops" rather than dancing round the room holding your hand and swearing.
  • Your hands acquire some funny looking scars and blisters as a result of this.
  • You start to make up tunes inspired by the noises your printer makes when it is working.
  • Whenever something works you instantly try to print out a bigger one. Or a smaller one. Or a red one.
  • You start to like the smell of molten plastic.
  • You feel that you are at the cutting edge of technology, even when your wife asks "What's that meant to be?"
  • You think a little plastic bust of yourself would make an ideal wedding present for someone.
  • You begin to plan your social life around eight hour print jobs.
  • You don't know what PLA stands for, but you know exactly the temperature it melts in your machine. In five different colours.
  • The word "plug" becomes a swear word.
  • People start giving you designs they’d like to have printed out.
  • You start to wonder if there might be a business model in this…..