Any knitting pattern is a programming algorithm. Do this, that, and the other, and you should eventually end up with whatever it is. Sometimes there are bugs.
I am not a great knitter, but I am generally competent. And with some computer programming background I should be able to solve my current knitting problem – every time I repeat the pattern I end up with an extra stitch.
So first, to explain how lace is knitted. (There are lots of ways to make lace, knitting is only one of them.) Knitting lace is simply creating artfully placed holes in fabric. The simplest ‘hole’ is the yarn-over, which is when you accidentally or purposefully wrap the yarn over the needle rather than knitting a loop through an existing loop. Of course, this makes an extra stitch which did not exist previously in the fabric, so usually when doing this on purpose you combine a yarn-over (which is abbreviated either as YO or YF, the latter standing for “bring Yarn to Front”) with any of dozens of stitch reducing techniques such as knitting two stitches together with a single loop. How you choose to reduce will tend to make your ‘hole’ lean one way or another in the fabric, and can either partially hide it or draw attention to it, all part of the plan to make pretty holey fabric.
Sorry, bad pun.
Now, here is the pattern I am trying to knit (this is part two of a three-part little lap blanket.)
Row 1: *k3, k2tog, yf, rep from * to last 5 sts, k5.
Row 2 and every foll alt row: k4, p to end.
Row 3: k2, k2tog, yf, *k3, k2tog, yf, rep from * to last 6 sts, k6.
Row 5: k1, k2tog, yf, *k3, k2tog, yf, rep from * to last 7 sts, k7.
Row 7: k2tog, yf, *k3, k2tog, yf, rep from * to last 8 sts, k8.
Row 9: k1, *k3, k2tog, yf, rep from * to last 9 sts, k9.
Row 10: as row 2.
Most likely I am forgetting, at row 9, to not do a yarn-over after knitting that first stitch. So, the solution at this point is to rip out everything I have done and start over, because lace is notoriously difficult to pick up and these 20 rows were super quick to knit. Something to do whilst waiting at the airport I guess.