The Wrath of Kon

Dispatches, thoughts, and miscellanea from writer Jon Konrath

I would rather read my old LiveJournal than look at code I wrote in 1999

I’ve been digging around my machine trying to find any fun old projects I could throw on my GitHub page. What I’m mostly finding is how I get grandiose ideas for programming projects and then abandon them in a week. Some of the programming I did in college is absolutely laughable, but it’s also amazing how many things I’ve started that I’ve completely forgotten about.

I wrote a while ago about Nuke ‘Em, which is a dumb idea for a turn-based strategy game that I’ve chased every time I’ve moved to a new language or platform. I think the closest I’ve gotten to something running is a Ruby on Rails attempt I played with in 2008. But last night, I was digging through some C source code I wrote in 1999, trying to get a web based version of this going, and it was… interesting reading.

Looking at the code, it’s amazing how many ways I was reinventing the wheel, or painting myself into a corner. A few observations:

  • The project was a bunch of C source that would compile into a half-dozen CGI files that would then go onto a web server. When a user went to /user/login or whatever, that would run the login CGI binary. Why didn’t I just write a bunch of Perl scripts or some PHP for this? Well, I guess I already knew C, no use in learning something new and relevant.
  • Actually, some of the pages were generated by shell scripts which had forms where the action was to hit one of the binaries.
  • I doubt anyone would try to do something like use cURL to download the actual login binary, open it in a binary editor, and mess with it, right?
  • There was no templating system for generating web pages in 1999  (that I knew of; there probably was) so I had a routine to glue a head.html and tail.html template at the start and end of each generated page.
  • Part of the decision to do things this way was based on the limitations of my hosting provider, and part of it was price. I’m sure MS FrontPage would have made this all easier, but I think I was unemployed when I was doing this.
  • There is what I think is my first attempt ever at writing a Makefile from scratch. It shows.
  • The whole thing used a series of ndbm databases to store everything, including users, passwords, the map, and pending user turns. This databases were created in the /tmp directory and were world-writeable files. Nobody would think of looking around the /tmp directory of a public web server, so this was totally secure.
  • ndbm (or its predecessor NDBM) was basically like the first NoSQL database ever, sort of. (I would think a garage full of punchcards in random order would be the actual first NoSQL database, but whatever.) Anyway, it wasn’t relational, and didn’t have tables, so each “table” was just another file in the /tmp directory.
  • When you set up the world by creating initial users and making a terrain map and such, you would just run another binary which spat out the configured db files. Only an administrator could do this, because the files were different executables not installed in the hosted web directory. It didn’t check in any way if an admin was running the scripts, but it’s not like someone other than the admin would compile and run the source themselves and overwrite the world-writable files in the /tmp directory, would they?
  • There is a whole science to map-building, how to algorithmically scallop out water and land edges and mountains in some pseudo-random way to make a cool map of a world on the fly. This randomly generated a single-digit number for every square on the map and put that terrain in place.
  • For everything, and especially in the login, parameters like username and password are passed in the URL, because nobody would screw around and pass a bunch of garbage in URL parameters. And there probably weren’t search engines crawling and permanently storing parameterized URLs to do things like delete all users.
  • Oh, that password parameter is sent plaintext. It’s got to match the password in the publicly-readable database in the /tmp directory, which is also plaintext.
  • Players each have money they spend to build armies and buy missiles and stuff. Guess where that number is stored.
  • There is a separate library file (a .c and .h) that is chock full of dumb stuff that isn’t in the standard library, but I’m sure there are 863 different public libraries that do it, and if this was NodeJS or Ruby or Python, it would either be a built-in or it would be an npm/gem/library away. Like why did I write a routine to convert encoded URL parameters into arrays? Why did I write my own routine to convert ASCII strings into integers? Why didn’t I write something to encapsulate database calls, instead of pasting the same dozen lines across multiple files?
  • I don’t know why I did this, but the maximum length of a URL is malloc’ed to a size determined by reading an environment label, and I have no idea where that was set. (!?)
  • Not sure what C unit testing framework existed in 1999, but mine consisted of a file called test.c that ran a bunch of code and printf’ed the results to the console.
  • I never got to the point of putting in the turn-based logic, but my loose notes showed that I wanted to have a cron job that would fire every ten minutes (or whatever) and run a program that evaluated all of the turn moves and calculated out the combat losses and money spent and all that stuff.
  • No source control, of course. Lots of ~ and # emacs files, and lots of files copied with a .backup extension.

Sigh. Okay, a few bits of advice to myself twenty-some years ago:

  • The first is to learn PHP (ugh) or wait a few years and do it all in Ruby on Rails. I know Rails isn’t cool anymore, but it would have been so much easier to build models for all of the basic data types, then scaffold the whole thing, implement controllers for the bits of logic, and take the scaffold views and make them pretty. Of course I still can’t deploy Rails apps on my hosting provider, so that’s another issue.
  • Find public libraries to do the nasty stuff. It wasn’t as much of an option then, but it is now. The rub here is it never feels like I’m building things anymore; I’m just connecting together things that other people have built, and then trying to keep up with when libraries change or break. Having a solid ORM library, a templating engine, and something to deal with session persistence would have saved me a ton of time. (See also using Rails for this.)
  • Break things up into smaller tasks, like as MVPs for each piece. I sort of did this, looking at my notes, but I probably would have went deeper if I had really planned this a bit. I usually do it all seat-of-the-pants, and then get overwhelmed when I have nine different problems going on at once.
  • Think about security first. I know my thought was to have it all use no passwords or plaintext, and I’d lock it down after I got it running. I should have thought about that earlier, so I didn’t paint myself into a corner.
  • Source control, dummy. RCS was a thing then, and I was already using it for my writing. Check in often. It’s free.

(PS, I’ll probably start writing this same dumb game as an Electron app the next time I get bored.)

A Tale of Two Keyboards

kinesis

About ten years ago, I had this keyboard obsession going on (see The Cult of Keyboards) mostly because everything started falling apart health-wise when I hit 40, especially all things chiropractic. After a few false starts, I decided to go whole hog and upgrade to a Kinesis split keyboard. Because it’s about time, I went ahead and upgraded to the newest iteration, the Kinesis Advantage 2.

The original Kinesis has been pretty decent, after a brief learning curve. Typing with my fingers in the two “bowls” and using my thumbs for a bunch of the modifier keys was an interesting transition, but it means I can type away without ever lifting my hands from the home row. There are some issues, though. In the top row of the thumb keys, there are only two switches, when there really should be three, for cmd/alt/ctrl (or whatever your OS calls them.) It’s also a bit more confusing, because I used to switch between a work PC running Windows, and my home computer, which is a Mac.

I mapped things so that in Windows, the modifier keys were Ctrl/Alt and Win/Ctrl. And then on the Mac, they were Cmd/Opt and Ctrl/Cmd. That means that on the Mac, Ctrl loses, and since I type modifiers with my left hand more, it makes emacs almost impossible to use. I also had to train myself to remember that when I switched to the Mac, my Ctrl key was really the Win key. Luckily, things like copy and paste would use the same key in both places. Also, when I switched jobs, the work computer switched to Mac, so this problem gets a bit more simple.

Another complaint about the original Advantage is that it had function keys that were those little rubber chicklet keys like the Mattel Aquarius or a bad 80s calculator. They’re also very narrow. And the Esc key is one of those, which really makes emacs bad. When I was heavy into FrameMaker at the job, I remapped the Home key in the left thumb cluster as a modifier so a Home-5 was F8, and a Home-6 was F9. (5 is right under F8, and 6 under F9.) I also mapped the End key to Esc, because FrameMaker had a ton of frequently-used shortcuts that nobody knows about anymore that begin with Esc, a leftover from its days on unix systems. I would map those only on the Windows system with AutoHotKey. I gave up on that a few work laptops ago, when Frame fell by the wayside.

Also, I had minor occasional problems with the USB firmware. It was designed probably right when USB 2.0 came out, and would sometimes freak out and require a reset. Also if you typed too fast with a modifier, the modifier would get stuck. (Hint: tap the shift key three or four times, and it unsticks.) I also had the usual wear and tear, a few keys losing their printing, and ten years of food and cat hair in the crevices.

The new Advantage 2 fixes a few things. First, the function keys are actual Cherry mechanical switches. They are, unfortunately, the same small size. The circuitry has also changed, and is allegedly better than the old controller. It now has two ways to remap keys: the old way, or you can mount the keyboard as a hard drive with a special key combo, and there will be an app to do complicated remappings, or a text file you can edit. You lose the two built-in USB jacks on the underside of the keyboard, but I never used those.

I wasn’t entirely happy with the upgrade. Although the keyboard uses the same key switches (MX Cherry Brown), typing on it feels very… cheap. The keys are not as glossy and seem to be made of a slightly different plastic. And the case feels a lot more hollow. There’s more of an echo-ey plastic feeling when typing. It feels like the unit was “cost-engineered” with cheaper materials or a more efficient mold to save a few pennies. It’s possible I’m imagining all of this, or the keyboard needs to break in or age a bit. But I’ve also seen a few people on the internet that felt the same, and have messed with putting DynaMat inside their keyboard to deaden it a bit. Maybe I should try that.

I also had a giant exercise to get the modifiers to work. You can swap them around at multiple levels: the keyboard has a Mac/Win setting; there’s an OS setting; and I think my KVM might be flipping the mapping, too. Plus you can physically swap the keycaps to get the labels right. I ended up putting the keycaps on as Cmd/Option and Ctrl/Cmd, swapping Cmd and Ctrl in the Mac system preferences, and setting the keyboard to Windows mode. That seems to mostly work. I also mapped the Home key to Ctrl. Maybe I’ll map End to Esc later.

So, we’ll see if I can put a few million more keystrokes through this one. I also need to avoid reading anything else about modifications, because there are people who burn serious time swapping out controllers, doing complex remapping, and changing keycaps and whatnot. I don’t have that much skill or energy, so I’ll stick to typing.

KQED Article, other photo appearances

IMG_6726

I had some pictures used in an article on KQED on Hilltop Mall. Check it out here. It’s a great overview of the mall, from someone who was actually around for the mall’s heyday, which I unfortunately missed. (See my last post on that.)

The reason these pictures got used is because I have everything on my Flickr account under a Creative Commons license. That means anyone can use my photos, as long as they give me credit. (It’s nice, but not required, for them to drop me a line, because then I’ll gladly link to their stuff, like I am here.)

I’ve mentioned this before, but if you ever need an image for a book cover, feel free to dig through my Flickr account. If you find something and ping me, I’ll even give you a high-res original if you need one. All I ask is that you credit me. (I did this for Ben Ditmars and his book Haiku in the Night. Who knew that me playing on my phone while waiting on my breakfast order in a Berlin hotel would be immortalized on the cover of a book.)

One weird result of this is that my photography pops up in weird places and I never find out about it unless I google my name, which I never like to do. Here’s a short list of some other oddball places where I have a photo credit:

Anyway, there’s more, but I’m bored of searching.

Death of the Hilltop Mall

Hilltop mall

Not a shocker by any means, but it appears that Hilltop Mall in Richmond has finally met its fate. It was just announced that logistics giant Prologis purchased the mall, which has been more or less closed since last year (although anchors Walmart and Macy’s were mostly open during the pandemic.)

Hilltop’s a weird one for me. I wrote about my first visit there in 2017, and covered the basics: built by Taubman in 1976; four anchors; a million square feet. Bought by Mills, it ended up in Simon’s hands in 2007, who completely ignored the property, and defaulted on their loans in 2012. It had a Walmart as an anchor, which is bizarre because it used to be a Macy’s, and it looks like Walmart spent fifteen minutes remodeling this mid-70s Macy’s into a Walmart by slapping on a set of signs they printed at Kinko’s and painting various trim blue.

Since I wrote that last post, the mall was purchased by a group that was going to do a full renovation and go with an Asian theme: stark white and chrome interiors, a Ranch 99 grocery store, a food court with various sushi restaurants and boba tea places and poke bowl vendors, etc etc. There were lots of fancy renderings with stock art pictures of white people walking around shopping, and lots of pretty landscaping and this futuristic space village look to it. They put up a ton of white-painted plywood with stickers and banners of the big planned reopening in 2018 2019 2020 late 2020. There were no signs of progress, except a constant hemorrhaging of stores. JCP closed, then almost every national chain (except Foot Locker) closed, and then the mom and pop places started quickly vanishing. I think when the pandemic hit, they were at something like 16% occupancy. I don’t know if they ever got money for this big remodel, and I think every store they said was going in never materialized. And then the pandemic hit.

I never knew Hilltop when it was alive and thriving, in the 80s/90s. It once had all the big national stores, and two movie theaters inside the mall, an ice skating rink, three toy stores, and lots of places to eat. All the various posts I’ve been seeing this week are filled with memories about this era, and I’m a bit jealous to never have seen this place in its full splendor.

I went to Hilltop maybe a couple times a month in the last few years. It was the closest indoor mall to my house, and I’m an old man mallwalker, so that’s what drew me. I had a fond relationship with the place because I love empty malls, love going walking in them in the middle of the day when nobody is around, and Hilltop was perfect for that. It also had that weird Taubman Logan’s Run-looking architecture I love, futurist-in-1976. It was like my secret spot, the place I could retreat when it was rainy out or the December weather went south and I wanted to hear loud holiday Muzak echo through a large, empty building.

There’s a nostalgia reverberation point for me with Hilltop that I can’t fully explain. It is a Taubman mall and has the same look as old Taubman malls like Woodfield in Schaumberg, Illinois, so it reminds me of the few times I visited in the late 80s and saw that astounding place. I remember going there with my friend Larry in 1989 and walking a lap around that place, which is double the size of Hilltop, and I think the biggest mall in the world back in that pre-Mall of America timeframe, and wondering when it would ever end. Hilltop looks exactly like Woodfield’s baby sibling, minus the stores and remodel.

But the thing Hilltop really reminds me of is Scottsdale Mall in South Bend, Indiana, the pre-remodel Scottsdale of the 80s. First, it’s a two-story mall, which was rare in Indiana, and had a second story with a balcony walkway that overlooked the courtyard on the ground floor. And before they redid Scottsdale in 1993 with bright whites and garish neon vaporwave colors, it still had this 1972 color scheme of brick and wood and hexagonal burnt umber floor tiles and a general dreariness, like a bad regional campus of a commuter college or an office park complex you went to make a car insurance payment or take a urinalysis test.

The 1990-1991 school year is a bad nostalgia point for me, because I attended and worked at a commuter college (IUSB) and only had a couple of friends there and really missed the main campus I went to the year before in Bloomington. Every payday, I would pick up my check at 9 AM, not have to be to work until noon, and would shuffle off to the largely empty Scottsdale to walk around, buy stuff I didn’t need at Target, and play Tetris at the Aladdin’s Castle. (I had a Tetris problem back then. Still do.) It had the same vapid, bleak feeling that Hilltop had, and I loved it, because it perfectly matched my emotional state. I had a lot of problems that school year, with money and dating and where I was going in life, and of course my brain goes back to those points in life more than those boring years when I didn’t have struggle. Since Hilltop was never changed, and still had that time machine back to 1990, that’s what I took from it.

(Scottsdale is long gone, demalled in 2004. I recently did some research on it, and I probably need to do a much longer article on it. Someday. These write-ups are getting more frequent and more redundant as the retail world implode. Maybe I need to stop writing this stuff.)

So, Prologis. They redeveloped the old Oakland Army Base a few thousand feet to my west, making it into logistics warehouses for the Port of Oakland. It was sort of amazing, because they tore down these old World War II-looking barracks buildings, and almost instantly, these large white and green warehouse buildings suddenly appeared. They would truck in giant concrete panels and put them together like Lego bricks. Seriously, it looked like a million square feet of brand new, modern warehouse would be teleported into place in like a week.

I know there’s a lot of talk about them redeveloping Hilltop with all the latest buzzwords people want to hear, and that they’ll have low-income vegan housing and live-work space and dog parks and a farmer’s market and whatever the hell else they can put in their fake renderings. I fully expect them to either completely demolish the mall and put in two million feet of generic warehouse space that looks exactly like every other Prologis warehouse. (Go do a google image search on “Prologis warehouse” and you’ll see hundreds of absolutely identical white buildings with green trim. It’s almost creepy.) If the building is structurally sound (it probably isn’t) maybe they will just paint the outside white, shut the entrances, gut the interior, and use that for storage. Or they’ll spend years in arguments with the Richmond city government, and end up bowing out in three years with nothing done.

Anyway. Fun while it lasted. I should probably buy a treadmill so I can walk during the rainy season. Here’s a Flickr album with a dump of my 2017-2020 photos: https://flic.kr/s/aHskQsQ4P1

Fight club, family trees, newspapers, bass

DJI_0409-HDR

Christ, it’s been a month since I updated. So much for the “blog more” thing. I started the new job, but first rule of fight club. Things have been much more sane, but the pessimist in me is always waiting for the other shoe to drop. And I still have these weird bureaucratic nightmares (usually when I take Benadryl, which is too much this allergy season) where I’m like endlessly trying to sort a giant spreadsheet or I have some problem where I ask person A what to do and they say “ask B” and B says “ask C” and C says “ask A or B” and repeat. This was much worse when this was my actual work environment for twelve hours. After I was free and clear from the last job, I thought about starting a thread about all of the stupid stuff that went down over the last ten years, and then I (coincidentally) got a boilerplate letter from their legal that they send to all former employees, reminding me of the employee agreement I signed in 2010 and how I can’t disclose trade secrets. So, next topic.

I’ve fallen down the genealogy k-hole again, which is largely John’s fault, but it’s also something I do every few years. It’s ironic because it is something that obsesses me, even though I pretty much don’t talk to most of my family anymore. I debated using Ancestry versus MyHeritage and heard the latter was better for European records, so I signed up and then found out that it isn’t. I found out some rudimentary things that were wrong, like incorrect years and an incorrect last name that was throwing off all previous attempts to go back more than three generations. So it’s interesting, but it’s gotten boring, and like I said, it’s not like I’m going to suddenly find long-lost seventh cousins fourteen times removed that I’m really interested in talking to.

The other thing I did which I am obsessed with but probably need to quit is I got a full-on subscription to Newspapers dot com. (They have a variety of tiers: useless, mostly useless, and expensive.) I know I’ve bitched constantly about the bait-and-switch with newspaper archives: you used to be able to hit everything on Google, and then in the media landscape consolidation/race-to-the-bottom, everything went paywall. Well, I didn’t know this, but if you get the full-blown Newspapers account, there is a ton of old information on there.

What’s problematic with my family research is that the Elkhart Truth (sic) does not participate in this program. But the South Bend Tribune does. When I grew up, the SBT was a “real” newspaper, and the Truth was sort of half-ass, but way more local information. Anyway, most obituaries and so on are covered there. My dad’s side of the family lived in Edwardsburg, which is covered well under the Herald-Palladium paper (and its four pre-merger papers) so there’s a lot there. The other side of the family is in Chicago, and the Tribune has an extensive archive, but that family has an extremely common last name, and apparently some genetic predisposition for not even knowing how to spell their own kids’ names, according to census papers I found. Anyway.

The family stuff - I won’t go into it, but I found a lot there. And then I started plugging in various dead malls, and holy shit.

I wrote this big thing about Pierre Moran Mall recently, and really had to scrape to find even the most basic dates. I plugged this into the search for the South Bend Tribune, and found a ton of stuff, including pictures, store open and close dates, articles about events at the mall, the expansion and enclosing of the mall, the failed attempt to turn the old Target into a Christian event hall… way too much to process.

I want to someday write an article on the Scottsdale Mall in South Bend like the one I wrote on PMM. I didn’t spend as much time there as a kid, but I spent a lot of time there in 1990-1991 when I went to IUSB. Anyway, I started searching, and the South Bend Tribune did an entire section on the grand opening of the mall, with an article per store, and in most cases an ad from the same store (probably why they did this, to gin up future ad sales) and of course a ton of pictures. When I mean every store, they even did a piece on the local pretzel stand in the mall.

On to Concord Mall: I found articles going back to years before the mall opened, when they planned on plowing up the farmland in Dunlap and putting some bridges across the Yellow River to get things started. They also did a similar send-up with plenty of articles about the stores moving from downtown to the new shopping center. It looked like the article about Wards was largely boilerplate - I think corporate sent the same copy to the paper for both the South Bend and Elkhart stores, which both opened the same year.

Other interesting things I found out: one is that the original plan for Concord was to include 200 apartments on the property. That would have been a fun little futuristic utopia, living and working in the same building, eating Karmelkorn for dinner every night, going on dates in the JC Penney.

Another weird one was there was a study and a plan done on building yet another mall in Goshen. That area was over-malled with four malls in the seventies already. Goshen was decimated by Concord going in, because almost all of their downtown shops fled, and that place was a ghost town for decades. Building a fifth mall in a city of maybe 15,000 back then was a real hail mary to try to keep shopping dollars in the city, and someone probably ran the numbers and decided it wasn’t worth giving the developer a fat tax break on it. So nothing happened, and then of course Wal-Mart came in and built two super-stores and completely finished off the downtown. (The good news is that it’s become somewhat hipster-gentrified, which is good to see, actually.)

The newspaper thing was a real problem, scraping up the serotonin and eating up my time. It was like when Google first came out and I spent weeks searching on everything I could think of, wasting way too much time reading dumb articles about abandoned military bases or ghost towns in Colorado or whatever I was into at that point. It is amazing, and totally hit the nostalgia nerve, and I should probably cancel my subscription soon. Luckily, there aren’t any Bloomington newspapers on there.

The Panera by my house closed. Like I think I ate there a week ago, and on Friday, it was completely stripped down, all the signs and lights and awnings gone. I’m currently in food jail, so that’s probably a good thing; I got into a bad habit of ordering from there every week or so. You can probably eat healthy there, but the bread part kills me. Anyway, it’s become this dumb inside joke/meme, and like all of my dumb inside joke/memes, I’m hopelessly sick of it, but the same three people that make the same dumb jokes on every single thing I post on Facebook won’t let it go. I really need to delete my Facebook.

No progress whatsoever on writing these days. After the overwhelming non-success of the last book, I think maybe I should buy the next PlayStation and just work on that for the next ten years, like I did from 2001-2010. Good thing I can’t actually find one. I’m trying to get back into playing bass again, so that’s good. I bought a Palmer Bass Pocket Amp which is a great piece of kit for practicing with headphones. Now I just need to get back up to speed on it.