Log in

entries friends calendar profile Elf Sternberg's Pendorwright Projects Previous Previous
Elf M. Sternberg
Last night, I attended a school board "conversation" for my district. The topics on the table were the current budget crunch and the district policy regarding suspension. About a dozen citizens showed up.

The suspension issue caught my attention. The district has a "NO SUSPENSIONS EVER*" policy, and in tiny letters on the policy description page has a qualification, "* except in cases where the student presents violence or the threat of violence." A number of the parents present had never seen the qualification, and even when it was explained to them carefully by the board executive in charge of student relations, protested that the qualification was so tiny that it seemed teachers and principals only heard the first three words.

The conversation rambled, but didn't get nasty. Two parents describes incidents involving their own children being threatened, and then others asked the question of who sets boundaries and who determines when the line has been crossed.

As I sat there, I realized something important: the feral parents of feral children do not go to school board meetings. I've dealt with feral parents; they literally don't know what is right, they only know what is wrong, and usually what is wrong is what interferes with their pleasure. They don't have the inclination to go to school board meetings. The fate of their child is left to the community, and I have to tell you, the community is trying damned hard to re-integrate those students into the community.

Civic-minded citizens don't make that goal any easier. It's the citizens who show up who get their voices heard, the ones with the time and the inclination who get the privilege of being listened to. What the citizens want more than anything else is to know their own children are safe being sent to school. They don't really care about the feral kids except in the abstract sense of "keep them away from my kid." That's the only message the school board hears.

I don't have any sympathy for feral parents. We want to blame our own civic society for having failed them, but look: the message for "how to be a good human being" has been around for *centuries*. Their parents and their grand parents should have passed it to them. Yet some people just can't be, or won't be, reached.

To understand why school boards overreact sometimes to violent and disruptive students, understand the pressure the board is under. They only hear the voices of citizens with actual civic virtues. Those voices want swift and comprehensive action. That action creates pressure that may drive even those kids capable of salvaging their futures instead farther along the downward spiral.

Tags: , ,
Current Mood: thoughtful thoughtful
Current Music: David and Steve Gordon, Increase Without Fail v3

Leave a comment
So National Coming Out Day and Bisexuality Visibility Day both passed by without my chiming in much of anything. I don't know why. My own sexual proclivities are so out there on the Internet that I don't even understand why someone is talking about some poor civilian's opinion of porn films from 2004, but apparently we are. C'mon, it's not like he groped someone.

Yes, I'm bisexual.

Part of my reluctance is because of something I've started to call the Bisexuality Miranda Warning, because everyone who writes "I'm bisexual" always follows up with some variant of this:
A bisexual isn't confused, in denial, or changing from one sexual orientation into another. A bisexual does not need to be with someone of each sex regularly in order to be happy. A bisexual is not greedy or oversexed.
I cringe every time I read that because, dammit, I am greedy. I like sex. And from my college years onward, I more or less made it clear that I wasn't going to be constrained by anything more than the consent of others and a common decency for the health and well-being of all involved.

And yet, the Bisexual Miranda Warning's ubiquity makes me feel like I'm a bit of a criminal. That i'm not like you bisexuals who have put your names out there into the press. Because I'm not just pro-sex, I like it, and with a lot of other different people. It's one of my favorite hobbies, and I want to share it with other hobbyists.

I don't think I ever "came out"; I just was. I started at the height of the AIDS crisis, and I've managed to get this far disease-free by being a bit paranoid, being a bit loud, and being a lot straightforward about what I want.

This push to emphasize "bisexuals can be monogamous" has felt suspiciously like those who claim that what gays really wanted all along was the wedding, the house, the two-point-four children and the dog, trying to push those gays that don't embrace the married lifestyle into a closet. "Hush, you. For the sake of The Cause, you have the responsibility to stay silent."

No, I don't.

Tags: , ,
Current Mood: annoyed annoyed
Current Music: Borderlands 2 OST, The Fridge

3 comments or Leave a comment

So, Spectrum IEEE has a “The sky is falling! The sky is falling!” article claiming that in 2016 tech layoffs have been nasty and that in 2017 it’s going to get even nastier. This is one of many articles on this theme, but it’s a little disheartening to see it in Spectrum. Worse, none of the articles I’ve read on this theme list the skills are going to be out-of-date. Which skills? What disciplines?

In 2008, I was laid off after 8 years at a large company, and I’d been using the same tools for those 8 years. As a front-end developer for dev-ops shops, my skills were woefully out-of-date: We’d been using Sencha (JS) and Webware (PY), with some Python 2 Python-to-C libraries. I knew nothing about what the cool kids were doing. I sat down and in a few days taught myself Django and jQuery; I rebooted by SQL knowledge from my 90s-era experience with Oracle and taught myself the ins and outs of Postgresql.

And then, in the bottom of the recession, I took shit contracts that paid very little (in one mistake, nothing) but promised to teach me something. I worked for a Netflix clone startup; I traded my knowledge of video transcoding for the promise of learning AWS. I worked for a genetic engineering startup, trading my knowledge of C++ for the promise of learning Node, Backbone, SMS messaging, and credit card processing; a textbook startup, trading my knowledge of LaTeX for the promise of learning Java; an advertising startup trading my basic Django skills to learn modern unit testing; a security training startup, trading my knowledge of assembly language in order to learn Websockets.

The market improved. I never stopped learning. I gave speeches at Javascript and Python meet-ups. Recruiters sought me out. I’ve been at another big company for four years now.

Will things go to hell in March? I don’t care. I have the one skill that matters.

1 comment or Leave a comment

The other day, I was reading through the course syllabus for a second-year AI class, as one does, when I noticed that the assignment for the sixth week was to turn in a working version of PacMan. Which is kind of weird, because the actual algorithm for PacMan involves more or less zero AI. It involves something else, and one of my favorite words: stigmergy.

Alright, so, here’s the algorithm in a nutshell: PacMan is played on a 29-by-26 square grid of cells. Everything else is special effects. There is a clock cycle: every cycle, the characters move from one square of the grid to another. If PacMan and a ghost share the same cell in a cycle, PacMan loses a life. There’s an animation engine running to make it look smoother than it is, but that’s the basic game.

The grid is actually three different grids layered together: One grid constrains movement by providing the walls. One grid tracks the dots that have been eaten. (The actual end-of-round tracking is done with a counter.)

The last grid is the stigmergy grid: every clock cycle, PacMan moves forward in a direction. The grid he just left is given a number: 255. Every clock cycle, the stigmergy grid is scanned for these numbers, and they’re reduced according to some formula until they reach zero. A ghost wandering the maze has a few rules: when it reaches a cell that has more than one neigbor, it chooses a direction based on a formula, and part of that formula includes adding in the stigmergy number of the neighboring cells. Blue ghosts use a reverse strategy; “dead” ghosts use a simple vector-weight strategy to go back to the center room.

In short, the ghosts are following PacMan’s scent, in much the same way ants follow a trail laid down by other ants.

There’s also a clock-cycle counter that causes the ghosts to reverse themselves from time to time, but that’s the basic gist of it. Unfortunately, the random number generator is seeded with the same number every level, so it became possible to master the game and play infinitely long. As smooth as the game looks, you actually have half a second of leeway time between moves, which is well within the average video gamer’s skill to master. Ms. PacMan fixed the seeding issue, and the game is significantly harder to play for a long time.

That’s it. You could implement PacMan in a few hundred lines of Javascript and HTML. Some animate CSS using the FLIP trick would be awesome. There’s no magic, and certainly no AI about it.

3 comments or Leave a comment
Can you name:

Five things you're likely to find under the hood of a car?

Five plays in football.

Five components of a pistol?

Five members of the X-Men?

Five kinds of dice used in D&D?

Five brands of beer.

Five items found in a toolbox.

Five movies where lots of stuff gets blow up.

Five electronic gadgets you wish you owned.

Five parts of a woman's vulva.

If the last one was hard, tell me again how much you like sex.
2 comments or Leave a comment
So Donald Trump said some horrible things about women today. A couple of my friends suggested that Trump's sexist talk is loud to cover up something deeper; perhaps Trump is secretly gay, one suggested.

I don't think so.

As I've mentioned before, I have this idea that there are a lot of men who don't like sex, and a recent re-reading of the Marquis de Sade led me to finally understand why. It's pretty simple: Needing is confusing to men trying to "act like a man." In de Sade's universe, the only thing the men need is to feel that life is orderly and organized, and that when you have sex what you get in the end isn't pleasure, it's just that short measure when the need is temporarily gorged into silence. Since sex isn't so much pleasure as a cure for the pain of this unmanly needing, it's only real value is its utility as an expression of power.

"Act like a man" is a borderline; it's a checklist of things men do in order to keep their man card. The most important thing within that border, though, is that a man never needs anything. He wants, sure, but a real man never needs. Yet it's clear that when some men talk about sex, they feel a need, a sharp, painful desire for something... and they hate it.

They've been taught to hate it. "Needing" isn't manly. "Needing" something you can only get from women isn't manly. The only way to make it manly is make it about power, to make it an expression of power over weakness, and emphasize the conquest as an expression of superiority, a rung in the ladder of the heirarchy of men.

Even when men like Donald Trump get sex, it's not pleasurable. They resent it, they get angry at the woman for it not being what they'd hoped it would be. Over time, it becomes an expression not of pleasure or joy, not of adventure and exploration. At best, it's relief, a momentary quieting soothing of the need. It'll come back, and that frustrates men even more. They can't get away from this thing that's really not all that great.

Tags: , ,
Current Mood: thoughtful thoughtful

Leave a comment
A woman today said,
But I like Donald Trump. I do! Listen, I have worked around a lot of men, and... listen, this was a man talking to a man. This is the way men talk. And I miss the days when a man talked like a man. I don't think the press should make too much of this. I like him. He makes mistakes, but I like him because he's better than the kind of talker who never makes mistakes.
And then I really, really had to turn off the right wing radio because that was just too much bullshit for me to handle.

Current Mood: disgusted

1 comment or Leave a comment
In the latest Missive From the Brooks Cave, David Brooks complains that Hillary Clinton's campaign lacks any idealism, that it isn't connecting with voters, and that where a visionary might have two or three great ideas, Hillary "piles on an arid hodgepodge of 8 or 9 programs."

Brooks calls this "pure interest group liberalism-- buying votes with federal money." Brooks wants the American people to be "free," but his freedom is never very clear. Free to do what? With what? Free to explore what the state's offer? The states have never been very good guarantors of human flourishing; civil rights have come in fits and starts from cities, only to be adopted nationally as a good idea or, more often, as a necessity imposed by the idea that all men are created equal. State laws traditionally have done more to enshrine inequality.

When we look out over the vast world of nations and states and what they've tried, we know what works. We've seen it. We have a pattern language of polities and projects that make them work. The only thing preventing their implementation is power plays and the special interests of those in power. If Hillary can keep a few of those alive, and make a few more viable, good luck to her then.

Brooks is here to comfort the comfortable. Again.

(And really, Rod Dreher? Rod Dreher? The guy whose policy ideas amount to "Democracy and Christianity are incompatible; we should 'go Amish' on the United States to keep ourselves away from the world?" I like Rod mostly as a bellweather of how not to think about what God wants from us. Because, you see, when given a choice between loving humanity and loving "the rules", Rod will always go with the rules.)

Current Music: Pure Reason Revolution, Voices in Winter

1 comment or Leave a comment

My latest contribution to the world is Git Lint, a plug-in for git that allows you to pre-configure your linters and syntax checkers, and then run them all at once on only the things you’ve changed. About half of us still live in the command line, and I like being able to set-and-forget tools that make me a better developer.

Here are a few things I’ve learned along the way about Python projects.

1. Use A Project Template

Project templates provide a means to magically produce a lot of the boilerplate you’re going to be producing anyway. I’m fond of Cookiecutter. While Git Lint started life as a single Bash script (later, a Hy script, and now a Python module), at some point I needed much more than just that: I needed documentation and testing. Up-to-date templates provide you with up-to-date tools: Tox, Travis, Sphinx, PyTest, Flake8, Twine, and a Makefile come pre-packaged with Cookiecutter’s base template, and that’s more than enough to launch most projects.

2. Setup.py is a beast

Getting setup.py to conform to my needs was a serious pain in the neck. It still doesn’t work correctly when installing to Mac OSX because the Python libraries and the manual (man pages) are in two different locations. If I’m building a command line tool, I always try to provide man pages. It’s usually the first place I look.

The manual pages also didn’t show up reliably in the build process; I had to force it by adding it explicitly to the manifest, even though it included the docs tree by default.

Setup.py and man pages are NOT friends.

Getting the build to include man pages, which I require for any command-line utility, was truly a pain in the neck, and now every upload to pypi has a manual step where I figure out if I have a man page to deliver or not. It’s truly painful.

3. Sphinx is a pain in the neck — but it’s worth it for Github Pages

Sphinx, the documentation tool for Python, uses RST (reStructured Text), which has just about the worst imaginable syntax for external links I’ve ever wrestled with. Inconsistencies about mixing links and styles drove me out of my mind.

On the other hand, I now have what I consider to be a solid idiom for generating Github Pages (gh-pages) from Sphinx documentation. A branch named “gh-pages” that contains your documentation will automatically be converted into a documentation tree on Github Pages (github.io), and you can see the results for Git Lint. This tree looks completely different from your development trees, so don’t get them confused, merge, or rebase them!

Simple generation of gh-pages

If you check out the Makefile, you’ll see the idiom clearly: it checks out a complete copy of itself into a sub directory, builds the documentation, copies it back to the parent directory, and then fixes all the links (because Github Pages really doesn’t like underscores in file and directory names). There’s irony in that it uses Perl to do the fixing– it’s just what I knew, it was fast, and I always have both Python and Perl installed.

This, by the way, points to another issue: always use the same virtual environment wherever you work. My Macbook and my Linux box had different versions of Sphinx on them, and the resulting generated pages were different on both boxes, making git report “everything’s changed!” when I went to fix a single typo in a link somewhere (I told you I hated those links).

It might be worth it to bag sphinx as a docker feature, or ensure that the version is locked down in your virtual environment.

4. Tox is amazing

Working with tox allowed me to be reassured that my code ran correctly every time, the first time. It did not catch other critical issues with installation, like the man page issue mentioned above, and that was painful to manage, but it did everything else.

5. Git Porcelain Zero is ridiculous

If you’re not familiar with git --porcelain, it’s an argument that many of the status-oriented git commands have that changes the output to a stable, machine-readable form meant to be consumed by other tools. Git Lint uses it a lot.

But the git --porcelain command doesn’t have any other guarantees: it doesn’t guarantee filename sanity, or unicode compatibility. For that, there’s git --porcelain -z, which produces a report in which everything is null-terminated so weird filenames can be consumed. This would be fine if the output were columnar, but it’s not always. The most egregious example I found was git status --porcelain -z, which is usually three columns, but if there’s an ‘R’ in the first column, then it’s four columns– ‘R’ means the operation is ‘rename,’ and the fourth column is the original name.

Since the -z argument makes both the cell and the line terminators null, you have to parse positionally. And if you’re parsing positionally and the number of positions can change, well, that’s context-sensitive parsing. And it’s ridiculous to have to put a context-sensitive parser into a small project like this. There was only one exceptional case here, so it’s a small issue, but inconsistencies like this really bother me.

6. Git lint is amazing

Now that I’ve actually used my little beastie, I can’t tell you how happy I am with it. As a full-stack developer with Python, C++, XML, HTML, CSS, Javascript, and some in-house stuff I can’t discuss, being able to check the entire toolchain without caring about what I’m checking, just set and forget, makes me extremely happy.

All in all, this was one of those projects where I learned a lot about everything: git, python, unit testing, documentation, github, jekyll, reStructuredText, Cookiecutter, PyPi. All this knowledge poured into one small project.

1 comment or Leave a comment
For sixteen years, Omaha and I have been blessed with amazing neighbors to the west. We were initially skeptical, as they were one of those families with their church and seven children, with one more obviously on the way even as we moved in. They're the sort of people that subscribe to one of those video managing services that pre-reads a commercial DVD and cuts out all the "bad" parts. (Raen reports that the nudist colony scene from Zootopia completely disappeared.)

But they were awesome people. Helpful, friendly, and always willing to split the difference when our fence needed mending or the drainage was becoming an issue. They and we had a great working relationship about making sure the trash cans were out on the curb on Thursday nights, and worked together to deal with ants, wasps, and racoons that were harassing the neighborhood.

They're moving. The patriarch has a job in St. Louis waiting, and this Friday the house is closed up, and next week new people start looking at their beautiful split-level with bedrooms. At least three of the children are now old enough to stay behind in Seattle with their own jobs and their own lives but they won't be coming around the old neighborhood anymore. The two young women with whom Raen and Storm grew up will be going to St. Louis.

The house to the east has been a mixed bag: five families in all those years, starting with the gay couple and their stereotypically beautiful landscape, then the Polish immigrants with their hard work ethic and politically incorrect views, the Ferals, the Rastas, and now a nice family with too many big cars and one small toddler. I'm hoping the new residents to the west have a little more stability, and a little less craziness, than that.

And while I like our house, I'm not in love with it. It was a great tool for bringing up daughters, but it's far from the city, it's still automobile territory, and it's a lot of house to keep up. Maybe when Raen reaches majority and post high-school, we'll try to find something closer to the city. The gods know we have the equity now.

Current Mood: sad sad
Current Music: Cage the Elephant, Ain't No Rest For The Wicked

Leave a comment