The Pragmatic Programmer's Dice Bag
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A pragmatic programmer's guide to making simple, beautiful bags

Hi! My name is Russell and I'm a programmer! I'm not very artisticaly inclided but occasionally I've been taken by a fey mood and compelled be creative. Recently I decided to try my hand at making a dice bag for my friend's birthday.

The below pattern was meant to be for people (like me) who were interested in trying something new but are able to admit they are rubbish with needles and scissors. I found several patterns online but none that I was entirely happy with.

This two-toned pattern had rounded bottom corners, a nice little spout, and a drawstring cord on a single side. There are many possible variations or tweaks you can apply to make it your own. I've been very happy with the results and I'd be happy to hear/see your results in following this guide.

Are you ready? I'm so excited! Let's get started!

![Nice dice bag!](images/nice bag.gif)

Difficulty Level: Beginner (It's ok to make mistakes!)


Sewing machine

  • Although you could probably hand-sew this, I'd reccomend using a sewing machine. If you don't have one, ask your mom, aunt, or grannie. They may still have one in their basement or attic.

Cutting board and fabric pizza-cutter thing

  • I could have used scissors instead but found this very nice to use to get straight lines

Measuring stick

  • Used as a guide when cutting the fabric. Make sure this and the board are longer than the fabric you'll be cutting


  • For cutting thread, trimming edges that you did a poor job on, and more

Fabric pins

  • Ok, so I hate using pins but these little buggers make several of the steps MUCH easier. Trust me, they're worth it.



Fabric (two types)

  • In the pictures of this guide, I've used like a fake leather for the outer layer and a red velvet-y for the inner lining.
  • Visit you local JoAnne's or fabric store. Don't be afraid to ask the nice ladys at the cutting counter if they have sugestions.
  • You can cheat and get half your cutting done here by buying a length of fabric equal to one dimension of your bag
  • Pick whatever kind of material you'd like to use but know that you don't want anything too thick since you'll be sewing two layers together. Make sure your sewing machine can handle it.
  • After making my first few bags I went back for more fabric and found some absolutely amazingly soft fabric in the furniture section. Walk around and touch everything!


  • Make sure this matches the color of your outer fabric.


  • Just some normal chalk. I found it worked nicely when marking the fabric for how far I should cut.


  • I had a hard time finding a cord that I liked. This will be a very personal decision

Plastic drawstring fastner

  • (Optional) I tried this after my first set of bags and was pleasd with the results

Ok, have you got everything? It's ok, you can go back to the store for the things you forgot. I'll wait...

##STEP 1##

  • Cut a section of your outer cloth and your inner cloth
  • The bag in this guide was 12 inches x 12 inches (about 30cm x 30cm) but I think slightly smaller, like 16 inches x 10 inches felt the best to me. Make a few bags and find out the size you like best!
  • Remember that you'll be losing a decent amount of the size due to sewing
  • Lay one on top of the other to make sure they the same size

![Cut cloth](images/1-cut cloth.gif)

##STEP 2##

  • Fold your outer layer fabric in half length-wise so that the nice side (that will eventually be facing outside) is facing inward.
  • If you are using a right-handed sewing machine, fold it so that the folded edge is on your right
  • Mark the upper-left corner with chalk. This will be the spout of your bag. I reccomend 2 inches down and 1 inch in.

DIAGRAM 1 ![Fold fabric](images/2-fold fabric and mark with chalk.gif)

##STEP 3##

  • Rotate your bag 90 degrees anticlockwise and start sewing from the fold and go all the way around until you reach the chalk mark you made in step 2
  • Try to get close to the edge without going over.
  • Tear out the stitches if you go over your mark. There's no simple undo in sewing. Whooo.... breathe in. This is just the first mistake and it's easily redone.

![Start sewing](images/3-start sewing on corner.gif)

  • Run your fingers through the inner bag to check for holes.
  • You went over the edge didn't you? Now you've got a hole in the bottom of the bag. Go back over that area and resew it. It won't matter; this part is going to be unseen on the inside anyway.

##STEP 4 (Optional)##

  • Fold the bottom edges of the bag into a triangle and pin them. Marking the edges with chalk before folding helps
  • Sew as close to the edges as you can and cut off the extra fabric
  • I recommend either 1 or 2 inches for the corners. Remember to measure from the seams and not from the edge of the fabric

DIAGRAM 2 ![Pin and sew edges](images/4-pin and sew edges.gif)

##STEP 5##

  • Repeat steps 1-4 using the inner, liner material.
  • Flip your outer pocket inside out (so that the outer face is now facing outside) and insert it into your finished inner pocket.
  • At this point, both pockets should have their outer faces touching on the inside and their spouts should be on the same side.
  • Uh oh... they're not fitting right? One seems too big. Or is the other too small? It's ok, nobody will notice when they're turned inside out. I hope.

![Insert outer pocket](images/5-flip outer pocket and put it in liner pocket.gif)

##STEP 6##

  • Pin the edges of each layers spout back. Hrm... one spout is a little longer. That's ok, we'll fudge it a bit.
  • Pin the tops of each layer to each other all around the top. I didn't do this once and ended up with the liner getting smooshed too much to one side

##STEP 7##

  • Sew all around the top in a circle, sewing the liner and outer layer together.
  • Gosh, you ran off course here, too? Ok, go back and resew the parts you munged up.
  • Sew over the pinned-back parts. This will end up making your bag look extra nice.
  • Do NOT sew through all four layers at once. After all, your bag does need an opening.


##STEP 8##

  • Sew a second circle around the top of your bag. This is your cord channel.
  • Make sure that there enough space between the top seam and the second one for your cord to travel through. If this is too small, you're going to have a bad time of it.
  • Go slow and you'll have no problem

![Sew cord channel](images/6-sew two lines around the top of the bag.gif)


  • You could sew a third channel here to give you bag a popped top look. You'd need to make your spout larger, though.
  • I haven't tried this yet but think I might some time.

##STEP 9##

  • Run your cord or drawstring through the top channel you just created.
  • I found it easier to run the cord before you flip the bag.
  • This can take quite a while; I found it quite frustrating. Stiff cord helps.

![Run cord through channel](images/7-run cord through the channel.gif)

##STEP 10##

  • Flip the entire bag inside out through the spout
  • Wow! Magic! This looks pretty amazing now! You can't even see any of the terrible stitching I just did!

![Flip bag inside out](images/8-flip bag inside out.gif)

##STEP 11##

  • Sew the outer layer and liner together on each side of the spout.
  • If you folded back the spout correctly in the earlier steps, this should be fairly easy.
  • These stitches should be the only visible stitches in the entire project.
  • Give it a few good goes back and forth. You don't want it coming loose.

##STEP 12##

  • Admire your homemade dice bag!
  • Congratulations, you did it! I knew you could!

![Final product](images/9-final product.gif)

##STEP 13##

  • Improve and iterate!
  • Do it again, but this time with the experience from before.
  • After about 3 or 4 bags you should start feeling a bit more confidence. I'm sure your friends will love presents!