Here is a useful toolkit for use in Survival mode.

http://pastebin.com/qxqdTqg8

I am a terrible coward, and do not like tackling mobs until I am suitably armoured, so I thought it would be useful to get a Crafty Mining Turtle made as soon as possible, then use it to continue mining all the minerals, and landscape my garden. It will even create, plant and harvest tree farms.

Obviously you need 3 diamonds to get started, so I use the technique of creating a single staircase down to level 6, then strip mining by hand until I get them. Once the first turtle is made, take it back down to level 6 and let it loose.

The code uses a turtle class, that allows you to do almost anything with minimum effort.

The Program starts as a menu, with 5 options:
1) Create mine
2) Create tree farm
3) Plant tree farm
4) Harvest tree farm
5) Clear Field

1) The diamond mine shown below is an area 35 x 35 blocks with passages you can walk through, and suitable lighting. The ceiling has been stripped of minerals, and repaired so there are no holes for water or lava to flow through. The lower layer has also been mined out, but not repaired, except for the passages you walk through.
Spoiler
If you start on level 6, which is just above bedrock, you usually get a good yield of the blue gems. Once complete, move up to level 9 and repeat, and possibly level 12 as well. This means nearly all of the diamond rich area has been inspected.

The turtle is given 64 cobble, 25 torches and 25 coal to get it going. It uses any coal it mines to refuel. Waste is dumped at frequent intervals at the edges, so you can go and collect it if needed.

The code that creates this mine is relatively simple:
Spoiler

function createMine()
T:clear()
T:go("m9m9m9m9")
T:dumpRefuse()
T:go("U1R2M9M9")
T:dumpRefuse()
T:go("D1R1m9m9U1R2M9M9")
T:dumpRefuse()
T:go("D1m9m9U1R2M9M9")
T:dumpRefuse()
T:go("L1M9M9R1D1")
T:dumpRefuse()
T:go("m9m9R1m9m9m9m9R1m9m9m9m9R1m9m9m9m9R1m9m9U1")
T:dumpRefuse()
T:go("M9M9R1M9M9M9M9R1M9M9M9M9R1M9M9M9M9R1M9M9F1R1")
T:dumpRefuse()
for i = 1, 9 do
  T:go("N9N9N9N9L1F1L1")
  T:dumpRefuse()
  T:go("N9N9N9N9R1F1R1")
  T:dumpRefuse()
end
T:go("R1F9F9F2L1")
for i = 1, 9 do
  T:go("N9N9N9N9R1F1R1")
  T:dumpRefuse()
  T:go("N9N9N9N9L1F1L1")
  T:dumpRefuse()
end
T:go("L1F9F9F1L1")
T:clear()
print("Mining operation complete")
end
This makes extensive use of a method called 'go()' which allows you to move in any direction, place blocks and torches, and plug holes in the ceiling etc.

2) There are 2 options for the treefarm, either a 4x4 square, or 8x8, each tree planted on a dirt block with single block spacing between them. Torches are placed in the spaces to promote growth. This option clears and flattens the area, and puts down the dirt and torches. It does not plant the saplings.
There is a 2 block wide margin round the farm to allow sapling collection
Spoiler
3) Choose the same size as the original farm, and put both birch and oak saplings in the turtle. It will plant an outer ring of Birch, with oak in the centre. This helps to reduce the overgrowth of oak trees over the farm edges.

4) When ready to farm, place the turtle in front of the first tree and it will harvest vertically, move diagonally and return, to try and gather all branches from the oak trees. It is not 100% efficient, but does a reasonable job.
Although some fuel is required to start it, logs are consumed to refuel.

5) Clear and level any area from 2x2 to 64x64. This will harvest all the trees and fill holes in the ground with dirt. This is used as the first part of creating a tree farm.

The class was written to enable less able coders to do a lot more with turtles than they could previously ( I run computer clubs in schools) and introduce the idea of OOP in a fun method.
In it's simplest form on a new project to build a 5x5 house foundation, add the whole of the class (function createTurtleObject()) and at the end of the code use:

T = createTurtleObject()
T:clear() -- clear the terminal
T:go("U1m4R1m4R1m4R1m4R1")
Throw in a stack of cobble and some fuel and fire it up.
The turtle will be named "Toolkit" if it has not already been labelled, so it will survive being broken by the player, even in creative mode.
If used on servers, you have to avoid the "Protected area" (chunk containing the spawn point) where the turtle will not operate. If you try it in this area, warnings will be issued.
To use:

pastebin get qxqdTqg8 toolkit