$fn=60; // set 50 facets to give us nice round holes that rendet fairly fast
module box(){

difference(){
translate([0,0,25])cube([100,100,50],center=true); // start with a block of wood - because it is centred in all 3 axis, we'll lift it 25mm with translate so that's at 0 on the z axis.
cylinder(d=20,h=55); // cylinders are always centred on 0,0,0 before youmove them. so we drill a 30mm hole through the centre of the block
// we'll cut another couple of holes
translate([35,30,-5]) cylinder(d=3,h=10);
translate([35,-30,-5]) cylinder(d=3,h=10);

translate([0,0,27]) cube([92,92,50],center=true); // we remove a chunk from center of the the box to leave a 2mm floor and 4mm walls all around.
translate([2,0,46.5]) cube([96,96,2.5],center=true); // creates a 2.5mm groove in three sides.
translate([48,0,51]) cube([10,92,10],center=true); // we then remove the excess wood to make it easier to print
} // end diff
} // end module
Now when you press f5 or f6, absolutely nothing happens - OH NO !
Ah but wait, we have isolated the script - but we haven't told openscad what to do with it.
so the generate the module box()

we need to tell openscad that's what we want to do:

$fn=60; // set 50 facets to give us nice round holes that rendet fairly fast
module box(){

difference(){
translate([0,0,25])cube([100,100,50],center=true); // start with a block of wood - because it is centred in all 3 axis, we'll lift it 25mm with translate so that's at 0 on the z axis.
cylinder(d=20,h=55); // cylinders are always centred on 0,0,0 before youmove them. so we drill a 30mm hole through the centre of the block
// we'll cut another couple of holes
translate([35,30,-5]) cylinder(d=3,h=10);
translate([35,-30,-5]) cylinder(d=3,h=10);

translate([0,0,27]) cube([92,92,50],center=true); // we remove a chunk from center of the the box to leave a 2mm floor and 4mm walls all around.
translate([2,0,46.5]) cube([96,96,2.5],center=true); // creates a 2.5mm groove in three sides.
translate([48,0,51]) cube([10,92,10],center=true); // we then remove the excess wood to make it easier to print
} // end diff
} // end module

box();
Now the f5 and f6 work again.

Now we need to make our sliding box lid. Essentiall just a basic cube.
We know how large the cube was that crated the groove - so we make the lid a little smaller in width and thickness so it slides in and out easily.
we create module lid() and comment out module box() - so that when we press f5 or f6 - we only generate the part we want to export as an stl file.

$fn=60; // set 50 facets to give us nice round holes that rendet fairly fast
module box(){

difference(){
translate([0,0,25])cube([100,100,50],center=true); // start with a block of wood - because it is centred in all 3 axis, we'll lift it 25mm with translate so that's at 0 on the z axis.
cylinder(d=20,h=55); // cylinders are always centred on 0,0,0 before youmove them. so we drill a 30mm hole through the centre of the block
// we'll cut another couple of holes
translate([35,30,-5]) cylinder(d=3,h=10);
translate([35,-30,-5]) cylinder(d=3,h=10);

translate([0,0,27]) cube([92,92,50],center=true); // we remove a chunk from center of the the box to leave a 2mm floor and 4mm walls all around.
translate([2,0,46.5]) cube([96,96,2.5],center=true); // creates a 2.5mm groove in three sides.
translate([48,0,51]) cube([10,92,10],center=true); // we then remove the excess wood to make it easier to print
} // end diff
} // end module

module lid(){
cube([95.5,96,2]);

} // end mod

//box();
lid();
And there you have a small bird box. With screw holes and a sliding lid.

Although on reflection it would be a total bastard to print. I was concentrating more on the openscad tutorial side than the actual box I'm afraid.

But yeah, thinking like a wood worker is how i tend to do it.
You are either removing bits of a shape or sticking other bits to it.

I'll have some lunch and make a better bird box lol

Finally the basic script - without all the waffle:
$fn=60;
module box(){

difference(){
translate([0,0,25])cube([100,100,50],center=true); axis.
cylinder(d=20,h=55);
// we'll cut another couple of holes
translate([35,30,-5]) cylinder(d=3,h=10);
translate([35,-30,-5]) cylinder(d=3,h=10);

translate([0,0,27]) cube([92,92,50],center=true);
translate([2,0,46.5]) cube([96,96,2.5],center=true); // creates a 2.5mm groove in three sides.
translate([48,0,51]) cube([10,92,10],center=true);
} // end diff
} // end module

module lid(){
cube([95.5,96,2]);

} // end mod

//box();
lid();