Scratch

A few of the books I got for Anya are introductions to programming — Python, C++, and this GUI block-based system called Scratch. She likes using Python because Scott and I use it, but she absolutely adores Scratch. She has A Beginner’s Guide To Coding (Marc Scott) that I picked up from Book Outlet (I get a bonus 10$ when someone uses my referral link) for a couple of bucks. We’ve got a studio of our games online, and she’s excited to share the games with family members.

Tricks we’ve leaned so far:

  • The UI will not match a book written a few years ago 🙂 This reminded me a bit of the “Internet Directory” book I had in 1994 … an obviously silly concept today, but a completely reasonable thing in 1994 when a decent bit of the content was still modem numbers. A book about a UI … it’s a good base — providing great first projects. But it took Anya a little while to accept that, while the book quite clearly told her to click an icon that looked like this … in the intervening 18-24 months, the UI had changed. How did I know this is what you click now? I mean, other than the fact it goes into the thing that has the same function as the one your book describes? A good guess!
  • You can create variables with the same name. I am certain they are assigned some underlying UID that you never see, but if you have two variables named ‘score’ and the score doesn’t seem to be incrementing … look at your variable list.
  • Variable scope of “this sprite” and “all sprites” is straight-forward until you create clones. “This sprite” means “this clone of a sprite”. We had a “all sprites” variable for speed and all of the clones will change speed each time a new clone pops in. This is cool if it’s what you want to do. I’ve also created variables scoped to “this sprite” to build clones that move at different speeds.
  • You cannot, unfortunately, change a variable’s scope after you create it. You need to make a new one.
  • The “glide” motion isn’t good for sensing collision. While the glide is in progress, that’s the block that is executing. Anya has a game where a crab collects crystals while avoiding divers which uses the fact you cannot check if Thing1 is touching Thing2. The grab can move through gliding divers with impunity. If you want to detect collisions, use a loop where the X and Y coordinates are changed in small increments instead of glide. Technically, there’s no collision detection while my X coordinate is changing, but that’s such a brief time interval that you cannot effectively avoid bumping into the other sprite while it moves.

  • You can avoid the sprite being moved off of the screen to avoid collision by adding a bounce when the sprite is on the edge.

  • You need to zero out your variables when the green flag is pressed, otherwise replaying the game by clicking the green flag again produces really strange behavior (you’ve already won or lost)
  • Fractions can be used in places where they have integer examples. Specifically, you can pause for fractional seconds.
  • When using clones, hide the “base” sprite that exists in the ‘when green flag clicked’ instantiation; use a ‘show’ in the ‘when I start as a clone’ block. Otherwise you have one sprite sitting at the edge of the screen

  • “My Blocks” is used to build functions. In Anya’s Simon Says… game, we use the pseudorandom number generator to select “Simon’s” instructions and call a block based on the generated number.

Ignoring Distal Factors

I’m glad to see that all of the officers involved in Mr. Floyd’s death last week have been charged, but there are proximal and distal factors prompting the protests. While this might address the proximal factor, what does it do for the distal ones? How many instances of police brutality have still been ignored? How much police brutality have we seen during the protests? There was a clip on the ABC news a few nights ago where two cops were arresting someone. The one cop threw his leg over the individual and dropped a knee on his neck. Now the other cop quickly shoved the first cop’s leg away, but how in the world could a cop think “hey, knee on the neck is a good idea”?

In the mid-90’s, I worked on a project to bring local law enforcement data together and use rudimentary AI to identify offenders who spanned jurisdictions. Why wouldn’t we demand a similar database for police offenses? Identify behavioral patterns that might be addressed through training, identify practices that frequently endanger civilian lives, avoid a violent officer moving around to maintain employment, and incorporate individual’s information in performance reviews.

I’ve been wondering about changes to the internal affairs processes — intentionally including people from civil rights organizations and community groups in a review board. Police tase some guy that was running at them brandishing a knife? IA clears it as justified. Tase some dude who wanted to hand off his baby before getting on his knees with his hands behind her head? There are disciplinary actions and possible criminal charges.
Also having IA boards from larger areas provide review for jurisdictions that are so small that “immediate supervisor” serves as a review board. I live in a small town with a handful of officers. They have an agreement with a neighboring town to roll their phone number to that station after-hours. Why couldn’t the larger town provide review services too? I mean, I get not wanting someone else second-guessing your actions, but my tax money is paying to keep the community safe. And if taxpayers consider having some non-partisan external entity review use of force to be an essential part of “keep the community safe” … it is.
I also get that a non-trivial portion of the country doesn’t see top-level legislation as the answer to, well, anything beyond military spending. But I don’t see any way to enact this kind of reform from the bottom up. I could probably talk my community into an external review board instead of using the Chief of Police, but use of force is quite rare here (thus my change is basically feel-good theater). Could the Cleveland City Council force such a change? It seems like a state law or some federal requirement where funding is withheld for non-compliance (think the 1984 National Minimum Drinking Age Act — we cannot tell you to make your drinking age 21, but we can withhold federal highway funding if it’s not 21) would be needed to effect change.
ETA — I love Bernie Sanders:

Oracle – Adding Fixed String To Column Data

I had a request to drop data from a SQL query into an Excel spreadsheet — the initial request had a column that included different text depending on row data. Since Box::Spout deals well with huge volumes of data (I write millions of rows in some reports), I use it pretty exclusively. Writing data to each column individually means I’ve got to retain a list of column names, and I would rather not do that. I can dump the column names into a header row then dump the entire database row into the next spreadsheet row. This works since a 1:1 correlation between database rows and Excel rows. I’ll go through after the fact and update a specific cell based on data in other cells, but I don’t want to insert a column.

Luckily, there’s an easy way to add a placeholder column to my database output:

SELECT DISTINCT MAX(DLR1.ISSUE_NBR) MAX_ISSUE_NBR, DLR.ISSUE_NBR, ‘MatchIndicator’ as “MatchIndicator”, DLR.EQUIPMENT_ID, EQ.EQUIPMENT_ID, C.CIRCUIT_DESIGN_ID, C.EXCHANGE_CARRIER_CIRCUIT_ID, C.STATUS, C.RATE_CODE, C.SERVICE_TYPE_CATEGORY, C.SERVICE_TYPE_CODE, NL.LOCATION_ID, NL.CLLI_CODE, DLR.LOCATION, DLR.BLOCK_IND

Monolithic Extremism

From The Nation:

‘The report did warn that individuals from a far-right social media group had “called for far-right provocateurs to attack federal agents, use automatic weapons against protesters.” (The Nation is withholding the name of the group in order to not disrupt any potential law enforcement investigations.) ‘
 
The report basically says they’ve not found any evidence that Antifa is involved in the rioting. I guess we have the monolithic communism theory applied to extremist organizations. Monolithic extremism? Other non-entities are equally not involved — alt-right is a loosely defined association of a bunch of different groups to … it itself probably doesn’t have coordinated involvement in anything.
While they cannot link Antifa to the riots, the FBI did find a far-right group promoting violence. That is a logical extension of ‘Bernie Bros” — it’s not like a protest verifies the identity and online history of every participant to ensure they’re legitimately concerned about racial equality and/or police practices. But someone within a couple blocks of your protest loots Macy’s & you’ve become Antifa rioters to the MAGA crowd.

CowPots

I purchased CowPots to start seeds — a giant box of 330 tall #4 pots was 60$ in 2017, and I have enough for next year still. Four years of seed starting comes to around 15$ a year (it looks like the giant box is now 80$, so more like 20$ a year). I love the things because they’re made of compost – no peat, no paper. And they claim that roots grow through th pot walls and the entire thing breaks down incredibly quickly once in soil.

I can attest that roots grow easily through the pots — I’ve started seeds and seen the roots break through (yeah, I should have gotten those things out to the garden sooner!). But I’ve always been curious how quickly the pots decompose in soil. Hard to tell, since it’s in soil. I’ve had some pots sit outside for over a year, so I suspected the “quick” decomposition wasn’t so speedy. The pots that had been sitting outside in the weather for over a year? I turned them into my compost pile. They’ve been there for about a week now. Which substantiates my suspicion that they don’t fully decompose in a few short weeks. Doesn’t really matter, since the plant roots are readily growing right through the pots … but we’ll see how long these things remain visible in the middle of a hot compost pile.

Garlic Yogurt Salad Dressing

Garlic Yogurt Salad Dressing

Recipe by LisaCourse: SaladsCuisine: AmericanDifficulty: Easy
Servings

4

servings
Prep time

15

minutes

Ingredients

  • 2 cups Greek yogurt

  • Juice from 1/2 lemon

  • 2 Tbsp olive oil

  • 1 clove garlic, finely minced

  • 1/2 tsp fresh ground pepper

  • 1-2 tsp salt

Method

  • Combine all ingredients and mix well – adding salt to taste.

Notes

  • Served over a combination of romaine lettuce, onions, and cucumbers.

Non-shared Experience

Arnold Schwarzenegger published an article in The Atlantic today that includes the following passage that vividly demonstrates the different experience people have in America:

    “My friend Erroll Southers, who has spent his career in law enforcement and served in my administration’s homeland-security department, wrote today: “I still get nervous when I receive the unexpected phone call at an odd hour, hoping my son, brother or relative has not become the next hashtag.”
    Think about that. Erroll Southers is a professor at USC, a former FBI agent, an upstanding man in every sense of the word, and because of the color of his skin, when his phone rings in the middle of the night, his first thought is that his son or brother might be the reason for the next march.
    I can’t even fathom that experience. If my kids FaceTime me late at night, it brings me joy, or maybe if they’ve been at a party, a laugh. It is completely unjust that for much of our population, those family calls bring anxiety.”

Even if a late night call brings anxiety, it’s not the same thing. My family had a “don’t call after 9PM unless it is an emergency” policy, but my thoughts when the phone rings at 10PM run toward natural causes, accidents … years ago, there was the possibly of a friend picked up on drunk and disorderly needing bail.

Update: Garden Expansion

We had a few extra large blocks left over, so we expanded the first bed — now there are a few extra feet of growing space.

We used the smaller blocks to build a second bed to the south of the first one.

And filled both the new bed and the extra space in the first bed with dirt.

Today, we finished assembling the third bed. We’ll get the fourth bed together and fill them both with dirt.