Seitan is Back, And He Looks Like Crap

So I’ve been experimenting with making my own seitan, not from vital wheat gluten as one might purchase from Bob’s Red Mill for a goshdarn mint, but from whole wheat flour. Boy howdy has this been an adventure! This week, I soaked a bunch of flour, which went great except that I hadn’t made it into dough first.

D'oh | Simpsons Wiki | Fandom

In the hours of sieving and rinsing that followed, it became abundantly clear to me that one must first make the flour into a dough, then rinse and knead such that the carbs on the outermost layers consistently wash away, leaving you with a ball that gently shrinks into gluteny goodness instead of a whitish soup that you then have to pass through a strainer and mush with your fingers.

Anyway, I did get seitan out of this, but it was grainy (bran!) and needed to be cooked. Brilliantly, I thought I’d stir-fry it. Halfway through this process it became clear that the seitan either wasn’t rinsed as thoroughly as I’d thought or it needed to be boiled first, because it was falling the heck apart. So I decided to boil it in situ – did I mention I’d marinated it for a while before all this went down? Well I did – and dumped a bunch of water on it. Then I went back to work, because most of this was happening on my lunch break, and essentially forgot about it.

I came back and the water had all boiled away. I had on my hands a massively unappealing mound of brown goo, not quite solid and not quite sauce. It tasted like smoked steak, except to such an extent that it hurts your mouth, and looked exactly like shit.

Red Devil from Scream Queens is sad - Drawception

Luckily, I have a backup plan. You see, this, my friends, is Friday. That means that I am prepared with that most beautiful of culinary treats: a 1-lb packet of Beyond Beef. I’m also possessed of bread, which I threw together this morning on the off chance that seitan stir-fry would somehow, in a twist of fate nigh inconceivable to my mortal mind, not happen.

So I’m going to fry up a few burgers and use my overmarinated brown goo seitan squelch as a condiment. I bet it’ll be awesome. If it’s not, we’re going to eat it anyway because it’s still nutrition gosh darn it and for this seitan I spent an hour of my precious, finite life with a sieve. (I’ll mix it with rice. It’ll be fine.)

But there is time before I must hie unto my hot stove, friends. My wife works until well after 7 and I have had such a day that I have not really run through my coding exercises yet. Obviously I had to run and breathlessly report my seitan adventures because IT’S SEITAN, but now I will return to my regularly coded practice.

I’ll leave you with this: yesterday was a good day because I learned that, in Python, you don’t necessarily have to make a whole if statement if you want to return a True or False. You can just stuff your parameters into a return. Behold in awe as this clugey nonsense, which used to be my mode:

code1

…becomes this sleek, gorgeous nonsense, which is my mode au courant!

code2

Maybe not a killer app, but I was pleased.


Today’s thrilling Python romp: Pet Picking

So I’ve been running through the Python exercises on CodingBat for the last several days, and they’re fly as hell. This amazing site is proof that you don’t need a lot of flashy fancy gifs and pretty colors to make a sweet learning site. (Looking at you, Codecademy.)

Anyway, I started to run into warmup exercises (!!) that I couldn’t crack. Some of these were legit hard for me, but some of them were simply outside of my current range, so to speak. So I added a nice -1 to that len(experience) and looped back to my trusty NoStarch Python Crash Course to figure out what I’d missed.

The first thing I made was a nice list of animals that would make good pets, as per an exercise on page 60 in chapter 4.

|pets = [‘dog’,’cat’,’rabbit’,’snail’,’tortoise’,’mongolian death |worm’,’bigfoot’,’plesiosaur’,’mothman’,’jersey devil’]

Then I printed them all with a for loop. Still no biggie, still nothing I don’t know how to do. This was the extent of the exercise as the book outlined it.

|pets = [‘dog’, ‘cat’, ‘rabbit’, ‘snail’, ‘tortoise’, ‘mongolian death worm’, ‘bigfoot’, |’plesiosaur’, ‘mothman’, ‘jersey devil’]
|     for pet in pets:
|          print(‘A ‘+ pet + ‘ would make a great pet!’)
|     print(‘\nAll of these would make great pets!’)

The output was not unexpected.

|A dog would make a great pet!
|A cat would make a great pet!
|A rabbit would make a great pet!
|A snail would make a great pet!
|A tortoise would make a great pet!
|A mongolian death worm would make a great pet!
|A bigfoot would make a great pet!
|A plesiosaur would make a great pet!
|A mothman would make a great pet!
|A jersey devil would make a great pet!

|All of these would make great pets!

But then I thought, what if my user wanted to check and see if their preferred pet was on the list? I need them to understand that a bearded dragon does not count as a good companion animal, but that they ought to consider a plesiosaur.

My first step was to add another variable and make it an input. Here my sins began, because the book isn’t even through for loops yet and I’m not supposed to know about input. (By the way, I should have mentioned before that I’m working in Python 3.)

|want=input(‘What kind of pet would you want to get? ‘)

Yay, I have a new variable! Now I need to run through the list and check to see if the user’s pet request is an option.

Right away I ran into a problem because I can never for the life of me remember that you need two equals (==) to define a loop. After all those CodingBat exercises where I forgot this rule every single relevant time, you’d think I’d have broken this godawful habit. Someday.

So I added me an if inside my for, correct equals and all.

|pets = [‘dog’,’cat’,’rabbit’,’snail’,’tortoise’,’mongolian death |worm’,’bigfoot’,’plesiosaur’,’mothman’,’jersey devil’]
|want=input(‘What kind of pet would you want to get? ‘)
|     for pet in pets:
|          if want == pets[pet]:
|          print(‘A ‘+ pet + ‘ would make a great pet!’)
|#print(‘\nAll of these would make great pets!’)

I kept the last statement because apparently I hoard code like I hoard everything else in my life: for no reason.

Problems abounded! first of all, the search stopped at the first index. Second, Python threw a tantrum because strings aren’t integers and integers aren’t strings, and list item indices are DEFINITELY not strings. (Try counting to “banana.”) Finally, there was no way to deal with requests for pets that weren’t on the approved list. If my user can’t settle for a bigfoot, my user isn’t isn’t getting an animal, period!

Here’s what I figured out.

|pets = [‘dog’, ‘cat’, ‘rabbit’, ‘snail’, ‘tortoise’, ‘mongolian death worm’, ‘bigfoot’, |’plesiosaur’, ‘mothman’, ‘jersey devil’]
|want=input(‘What kind of pet would you want to get? ‘)
|x=0
|     for pet in range(len(pets)):
|        if want == pets[x]:
|           print(‘A ‘+ want + ‘ would make a great pet!’)
|           break
|        if want != pets[x]:
|            x=x+1
|        if x == len(pets):
|            print(‘A ‘+ want + ‘ would just eat your homework.’)

I admit that I was continuing to cheat here, since I’m not supposed to know about break yet. However, I needed it and this was an urgent pressing question that had to be answered one way or the other, plus I didn’t want to sound like a manic robot screaming “A CAT WOULD MAKE A GREAT PET!” over and over again. There’s probably another, better way to do it. When I’m a more capable coder I’ll look back at this post and have a hearty laugh before deleting it in embarrassment.

For now, the first if looks to see if the input matches the index we’re on. If it doesn’t, it triggers the next if, which just pushes the index count variable to the next integer and keeps us marching onward to the end of the list. Finally, when x is as long as the length of the list, (which is to say we’re past the last actual list item because indicies are magic -1,) then Python can let the user down easy.

BUT WAIT.

|What kind of pet would you want to get? a cat
|A a cat would just eat your homework.

Curses. Any deviation from “cat” or “dog” or “plesiosaur” as input resulted in pet denial and sometimes ridiculous output, even if it were a logical answer that otherwise fit the parameters of the list’s intent. This would not do!

The easiest step was to make sure that the user didn’t get denied based on capitalization. I .lowered() that boom and then applied a nice .strip(‘a ‘).

|pets = [‘dog’, ‘cat’, ‘rabbit’, ‘snail’, ‘tortoise’, ‘mongolian death worm’, ‘bigfoot’, |’plesiosaur’, ‘mothman’, ‘jersey devil’]
|want=input(‘What kind of pet would you want to get? ‘)
|x=0
|want=want.lower()
|if want[0:2] == ‘a ‘:
|    want=want.strip(‘a ‘)
|for pet in range(len(pets)):
|    if want == pets[x]:
|        print(‘A ‘+ want + ‘ would make a great pet!’)
|        break
|    if want != pets[x]:
|        x=x+1
|    if x == len(pets):
|        print(‘A ‘+ want + ‘ would just eat your homework.’)

Yahtzee!

|What kind of pet would you want to get? A Mothman
|A mothman would make a great pet!

This, of course, is fine. However, it would be nice to allow users to define their own lists of appropriate pets so that parents can be superusers who make sure that their kids, as regular users, are ordering proper domestic skinks and bonobos and golden hinds and whatnot. I could do this by simply asking the superuser for input and appending each input item to the pets list for the users, but I think I’d rather avoid having the user type out the various animals they want their kids to own. Instead, I want them to be able to enter an admin mode with a password and select pet options from a menu. That’s probably going to be my next modification. After that, I want to…

  • Create a returning user function for the kid
  • Allow the parent to modify a responsibility index based on how well they feel the kid has been taking care of the pet
  • Use calendar functions to determine how much keeping the pet has cost since last login
  • Use these factors to create a dashboard for the parent so that they can figure out if the kid should be allowed to get another animal.

It would be nice to make a fully fleshed-out pet keeping game out of this, but right now I have absolutely no idea how to make graphics. Maybe I could create a Rogue-style adventure. No game has really done it for me since Nethack and come to think of it, pet ownership is a significant part of that too. Maybe I’ll just code my own Nethack, but make it all about the pets.

Pokemon. I just came up with Rogue-style Pokemon. Fuck me. I’m going to go code some more.

Eventually I’ll get back to the book.


Python Python hiss hiss

One thing that I like to do when I’m feeling sick is practice Python. I’m what you might call a promising beginner coder. It’s something that I want to get good at – really good, if possible. I enjoy it almost as much as I enjoy writing. Unlike writing, coding might actually pay someday – not that writing has done me bad, but let’s face it, its not going to cover my monthly barrel of bats, nor my bespoke acne cream, nor my shipment of Pakistani mangoes.

During the Bad Year, I resolved to work until my daily financial goals were met every day. I calculated what I made at my part-time library job(s) minus gas and daily extravagances like food. Whatever else needed to be spent that day, whether that was a portion of the rent or a medical bill, was what I had to make before I collapsed from exhaustion. I had fractions upon fractions going – I needed to make approximately $50 every day just to cover rent – but no matter how I cut it, I was putting in 16-hour days, working literally from the moment I opened my eyes until I passed out. I’d go to sleep with my computer on my lap, wake up, and start typing again right away. I was a writing fiend, and as we all know, fiends live in Hell.

Previously, professional writing had been a fun jaunt on the wild side, a little wooliness for my otherwise orderly career progression. I’d gotten there slowly after writing school destroyed my initial desire to write fiction – it wasn’t until years later that I published stories again. And I’ll always have listicles to thank for getting me there! Thanks, listicles!

But once you monetize something, it becomes a millstone. It doesn’t matter how much you like it. Suddenly it’s not who you are, but what you do. Who you are is about identity, love, joy, and probably chakras or something. What you do is about money. It’s nice to think that you can mix those two brews and end up doing something you love for money and get paid for living your best life, but in my experience, the money wins just because it makes more demands.

God I hate money. I don’t hate achievement, I don’t hate fame or recognition or success or work, but I hate that money is how we measure personal value. Specifically, I hate that money is also what we need to spend to survive – the main societal measure of our individual success and self-worth going on the budget sheet to cover rice and beans for this month. Do I have an alternative? Nope! I just think that the current system is harmful.

I have digressed. Back story: I’ve been sick for like four days, maybe longer. No, it’s not Covid. Yes, I am loopy and distracted. This is why now is the perfect time to practice Python. Also to stay up late and finish a blog post.

I have a love-hate relationship with coding. I’m naturally pretty good at it, but when I take a class, I seem to draw a jerky professor who believes, at best, that a woman trying to code is just so ineffectual and pointless that it’s cute. I am not cute and despite my best efforts to be sweet and nice and gentle I am naturally very direct. It is also hard to brush me off on account of the fact that I am unfortunately me, so any given professorial-stand-in-stereotype has tended to try and break down my ego instead. This strategy is actually pretty effective, and I am now plagued by self-doubt and the thought of taking a coding boot camp or another coding class ever makes me wince. I know that not all professors or whatever. I have had some evil luck and have heard reports that much of the coding world is just like this. At my age I don’t have time for nonsense. Sue me if you don’t like it.

So because my relationship with coding is a tetch uncomfortable, coding is an ideal candidate for future money-maker. I can learn it myself (I am in fact making good progress) and scootch into the profession by demoing my skills. I can sacrifice it on the alter of the money gods without too much regret and even with some relief. At the same time, it can be done online on a freelance basis for a decent return. (Eventually. I’ll need to glom onto a bunch of freebie open source projects first to prove that I know my stuff.)

The fact is that times are strange. I want to believe that my current job, which I like, is stable, but who knows? Libraries are suffering financially along with everyone else, and if enough economic dominoes were to fall, my safety would by no means be guaranteed. In a worst-case scenario, I wouldn’t feel confident using writing as a parachute again – a year ago I still harbored fantasies of going full-time as a writer, but we have a mortgage now and everyone who can work online will – and the jobs are likely about to go poof. My resume already looks funky enough due to the Bad Year that I suspect I’ll always have some trouble job searching in libraries. I need a new backup skill, and it’s got to be solid.

So cry havoc and hunch over a keyboard! Time to set aside a little coding practice every day after work, to struggle with modules and indices, and to remember that an array cannot bite me harder than I can bite it. And if worst comes to worst, there’s still the bookstore/vegan deli concept. Perhaps grammaries and seitan will save me in the end after all.


Saturday Fast Rec: Python For Kids

It’s Saturday! That means I recommend a book that I think you’ll like. (Yes, you!)

Today, I’m recommending Python for Kids: A Playful Introduction to Programming by Jason Briggs from No Starch Press. And I’m recommending it…for adults!

That’s right! If you (yes, you!) want to learn how to code, Python is a great place to start. It’s versatile, easy to learn (relatively speaking,) and professional coders do use it in actual applications. Kids can absolutely learn to make basic programs using the fun and surprisingly practical projects in this book, but I’m not ashamed to admit that this is where I started my own coding journey…at the age of 30. Remember that Jeopardy! champ who taught himself everything using children’s books? It’s not a bad way to introduce yourself to something new. Personally, I’ve not only learned to love Python thanks to Python for Kids, but found myself well prepared for the infamously difficult Java classes at my college because I’d already learned a similar programming language.

This book is fun, hands-on, and wonderful for all ages. There are some knockoff programming for kids books from other publishing houses, but don’t settle for them. No Starch Press is the best. This book is exactly where to start for kids or adults, and there are follow-up books that will rocket your skills to the upper atmosphere, if not to the moon. I recommend!