I eat a reasonable amount of salad because I spend quite a lot of time looking at pictures of salad on the internet

Here are some of my favourite salad-orientated Instagram accounts.

A photo posted by Amanda Meixner (@meowmeix) on

...

Minecraft Pocket Edition - now with carrot cake.

Since discovering that you can play Minecraft on your phone, one thing has been bothering me. You can take flour, eggs, milk, and sugar to make a cake, or flour and cocoa beans to make chocolate chip cookies, or even pumpkin, egg, and sugar to make a pumpkin pie, and yet despite having a perpetual surfeit of carrots, there is no way for me to craft a carrot cake - the best cake that there is.

Delightfully, even though this is a phone app, there are various ways to add your own items and patches. On Android, I used BlockLauncher Pro (£2.54, or the identical free version, which has ads). This allows you to add custom texture packs and little scripts in ModPE. It was difficult to find a comprehensive tutorial or documentation, so I used other people's scripts, this useful function list, and trial and error to work out how to create my cake.

I started by making an icon for the cake. It needs to be a 16 x 16 PNG.

Large pixel art carrot cake

This is the image that will be shown in the inventory, and will be held in the player's hand.

To tell Minecraft PE to use it, you need to zip it up in the correct folder structure. The path to the image is 'images/items-opaque/carrot_cake_0.png'. In the root of the folder is a meta-data file called 'pack.mcmeta'. This contains the description of your image pack:

{
  "pack": {
    "pack_format": 1,
    "description": "Carrot cake!"
  }
}

I put these all together into Carrot Cake Texture.zip. To install this, download the file, then open up BlockLauncher and click on the spanner at the top of the screen. Then go to 'Texture Pack', 'Select', and pick the file out of your Downloads folder. This step doesn't do anything particularly exciting, but it comes into its own when we add some javascript.

In a new file, called 'carrot_cake.js', we can define the new item.

ModPE.setFoodItem(501,"carrot_cake","carrot_cake",6,"Carrot Cake");

ModPE.setFoodItem is the command to add a new edible object. Each item in Minecraft has a unique ID. I picked 501 for the carrot cake, because it hasn't been used yet. "carrot_cake" is the name of the picture to use from the texture pack - this is defined by taking 'carrot_cake_0.png' and removing '_0.png'. 6 is the number of half hunger points you gain by eating the carrot cake. Finally we define the name that is shown to the user, 'Carrot Cake'.

Next, we want to make the cake available in the inventory in Creative Mode, by using its ID of 501:

Player.addItemCreativeInv(501,1,0);

Next, I wanted to be able to make a cake out of carrots, wheat, egg, and sugar. You can look up the item IDs of items in Minecraft to do this step. Carrot is 391, sugar is 353, egg is 344, and wheat is 296.
Item.addCraftRecipe(501, 1, 0, [391, 2, 0, 353, 1, 0, 344, 1, 0, 296, 1, 0]);

To use this, download carrot_cake.js and open up BlockLauncher, then click on the spanner and go to 'Manage ModPE Scripts'. Press 'import' and find the file in your Downloads folder. Now if you go back to the main menu and open up your game, you should be able to make yourself a lovely cake!

...

Ada Lovelace Hackathon


Image courtesy of Sydney Padua

Ada Augusta Byron was born on December 10th, 1815, daughter of Lord and Lady Byron (yes, that Lord Byron). After her parents' separation, her mother, determined that Ada stay as far away from poetry as possible, encouraged her interest in mathematics and logic.

During her childhood, Ada developed an interest in flying, and took to studying the mathematics of 'Flyology', creating wings based on the proportions of birds.

Through her tutor, Mary Somerville, Ada met the inventor Charles Babbage. Babbage was obsessed with building a calculating machine called the Analytical Engine, which, had it ever been built, would have been the first computer. Babbage and Lovelace became great friends and corresponded about the Engine and other mathematical topics.

An Italian mathematician, Luigi Menabrea, wrote a description of the workings of the Analytical Engine. Being an accomplished linguist, Ada set about translating this work into English. She added a few notes of her own to the translation – the notes ended up being longer than the original text, and contained what is commonly thought of as the first ever computer program.

Lovelace's legacy goes beyond her groundbreaking code – she also thought deeply about the scope for computation in everyday life, predicting mathematical music, and neuronal modelling.

Back in November, the folks at the Oxford Hackspace kindly hosted our hackathon to celebrate the life and works of Ada Lovelace.

Continue reading Ada Lovelace Hackathon

...