On HTML-based chess boards and a rant

The Institute where I work has recently revived its Chess club. Even though I'm not a good player by any measure, I'm in charge of making some sort of resource library for its members. With that goal in mind, I've been transcribing a few public domain chess books along with anthologies of the club's annotated games.

But I'm running into some problems. One problem. One that (I suspect) has plagued chess writers, librarians, archivists and amateurs of centuries past.

Getting the books is easy, thanks to Gutenberg Project, the Internet Archive and several other treasures of mankind. I've been able to procure a copy of José Raúl Capablanca's Chess Fundamentals that surely will serve its purpose here. Transcribing the games is easy as well. Our sanctioned games have to be transcribed down thrice: one copy per player and one for our official records.1

The problem is---as others have correctly pointed out---that following along with chess notation is difficult for beginners/amateurs like myself. That's one of the beauties of formats like PGN: it's possible to transmit chess moves that are both human-readable and machine-parseable, so one can choose to follow along with the movetext alone if you can do it, or have a machine create a semi-animated board of the game, step-by-step.

But alas, it's not so easy. One of the pillars of our library is to produce time-robust electronic materials that hopefully will be published on paper in the future. This means creating somewhat static content using as little external resources as possible. Or (in words of the Club's president) documents in as pure HTML as possible.

The good, I've seen this problem elsewhere (or should I say, I've seen it everywhere), and may be able to replicate the solution. I face similar restrictions here: no iframes, no embedded scripts, no user-defined CSS... It's possible to create chessboards using only <table> tags

The bad, it's incredibly time-consuming to get it right and readable.

For instance, there's this handy generator that takes a FEN position and outputs it as an HTML table. But it doesn't look good. For instance, the position

rn1qkbnr/pb3ppp/1p6/2pp4/3P1B2/2N2N2/PPP2PPP/R2QKB1R w KQkq - 0 7
is rendered like so:

 

Yeah, it's not pretty and it's not very readable. For starters, it would look better if the squares were properly colored2 It's also relatively small, I can't easily tell the white pieces apart. The first issue can be solved by cleverly replacing every second <td> tag with <th>. The second can be solved by wrapping every piece (and perhaps some non-breaking spaces) in several <big> tags.

But that doesn't solve the fundamental rant that gives birth to this daylog: the tools are there to be used! Now, E2 is almost exclusively text-based and it's foolish for me to expect it to support proper CSS classes or PGN rendering, that is not its purpose. But when you ask me to produce machine-commentated documents of 45 chess games and you expect them to be exclusively in HTML... well, it's madness. Lucas Chess can easily generate images from all board positions from a given game, extracting the comments can be done in a myriad of ways... heck, even with our shoestring budget I'm sure we could host a simple CSS file or script in our server for better game analysis. 

The (already small) promise of publishing these anthologies on dead trees should have no bearing on our record keeping. Even if we managed to get enough money for a small print, we have no physical space for all those books. Moreover, only a fraction of our members would even check out/buy them. No, let's use interactive media now that we have it. An anthology will take months to even prepare, a game can be imported and studied into suitable software in seconds. Let's focus on actually studying and discussing chess instead of turning ourselves into a failed vanity press.


1: I'm aware lots of management can be easily automated these days, but we have practically zero budget and our members are spread through 5 or so different internet chess platforms (lichess et al.), so unifying them is impractical. The best we've managed so far is to centralize all records in a somewhat agnostic database and have some volunteers mirror it to their respective platforms with the caveat that those are only mirrors and not the official records.

2: As in, alternating dark and light colors

My brother and his girlfriend of about 2 years broke up this week. At the risk of sounding callous, I'm relieved that he left her. I have nothing against her as a person. It's just that up until the past year, I've never seen my brother so chronically stressed out, angry, and generally unhappy. I became especially worried last month when he revealed more details about their relationship. She allows her son to hit him. At one point, she'd screamed a bunch of nasty things at him because she was off her meds. Yeah, I didn't know she's bipolar. Not that being bipolar is a dealbreaker, but it adds more complexity to the situation. I should know. I've dated a schizophrenic before. Why did my brother and I both date mentally ill people? It can't be a coincidence. I wonder if it's something we learned from our father growing up. My mother's own mental illness is questionable — something nobody else in my family ever talks about — and my father has stuck with her and dealt with it. I don't know how he deals with it. Perhaps my brother and I both learned to be loyal to a fault from watching our father stay with an unwell person.

The other news is my grandmother passed away. I'd mentioned in a previous log how sick she'd been. My brother and I ended up visiting her one more time after we learned she'd been put into palliative care. I'm glad we went. She recognized me this time and told me she was glad I was there. My bro and I reminisced about the time we'd spent at her home when we were kids. She lay in her in bed listening to us, covered with a crocheted blanket, surrounded by photos of her loved ones propped up on the dresser, the TV stand. She looked peaceful. I hope she felt peaceful when she later passed away. 

A friend at work gave me an update on an old friend of mine who I'm not close to anymore but who I still care about. She's in an abusive relationship. It has escalated to the point of physical abuse. He slammed her arm in a car door. He'd yelled obscenities at her after getting angry for reasons that made no sense. They keep breaking up and getting back together, a textbook example of the cycle of abuse. He's a seriously disturbed person, and I hope she leaves him for good.

What surprised me the most was my ability to empathize with her. My ex wasn't quite so blatantly abusive, but he played mind games with me and put me down a lot. And I put up with it. I kept trying to make it work. I wonder if she feels the same way I felt: understanding on an intellectual level that she doesn't deserve it, while feeling as if she does. Being quick to blame herself. Second guessing herself. Wondering if maybe he's right, even though she knows he isn't. I'm probably projecting right now. Still, I think she would understand exactly what I'm saying. And that's scary. I used to look down on women who stay in abusive relationships. Now I see how women (or men) could end up like that, regardless of how smart they are. Anyway, we're going to try and get her out next week for a girl's night. I want to reconnect with her and be helpful in whatever way I can.

As I do with my other depressing logs, I'll end on a lighter note. I'm doing a 5km Santa Shuffle this weekend with my friend and her husband. For those who haven't heard of a Santa Run, it's basically a fun run where the money is donated to charity, and the people in the race dress up in Christmas-themed costumes. My costume is going to be half Mr. Claus, half Mrs. Claus. I found a santa pajama onesie for adults, so that's what I'm working with. I've already cut off one arm and am fashioning it into a skin-tight arm sleeve for Mrs. Clause. Once that's done, I'll cut off one of the legs and sew a basic mini-skirt onto the one side, which I will then cover with glittery ribbon. I'll wear running tights underneath. If I have time, I'll do male drag on the one side of my face and apply lipstick/eyeshadow/typical "female" makeup on the other side of my face. I'm more excited about the outfit than I am about the actual run. I think it's really helping me to do more creative projects. It's one of the few things that makes me feel happy. 

On that note, I need to go get dinner ready. I'm making a beet salad to go with the pasta. I'm making my own marinara sauce, and I have plant-based "meat" balls in the fridge that I made two days ago. No, there's nothing weird in them. They're tasty. I'm hungry already just thinking about it. 

Thanks for reading.

Log in or register to write something here or to contact authors.