The Wrath of Kon

Dispatches, thoughts, and miscellanea from writer Jon Konrath

Tag: technology-hates-me

Dropping computers

My Mac is back in the shop.  It has TS4088.  When it switches GPUs to save power, if the computer is hot enough, it crashes.  It’s common on this specific make and vintage, and it’s the problem with buying a computer on the first day of a major revision.  I complained to the right person, and Apple agreed to swap out the entire logic board for free.  Now I just have to wait.  I’m using S’s computer in the meantime, which is much faster than my 2007 MacBook, but I only have my most vital of files on it, like my new book I’m writing.  Maybe this will make me get more done.

My computer is now just shy of three years old.  Once it is back, I am swapping in an SSD drive, which is currently sitting on my desk.  It’s still a good computer, fast and light and well-constructed and all of that.  The logic board thing is unfortunate.  I hope that when it’s replaced, I can get another year or two out of it, although three years is about the right timespan for upgrading.  The only thing I miss having is that the newer models can mirror their entire screen to the Apple TV, and mine can’t.  I don’t know what I’d use that for, especially since it’s easy enough for me to mirror any movies on my computer to the TV.

I went to the Apple store to drop it off.  I drive down this ghetto back road that is barely paved, like an Indiana road.  I hit a pothole and one of my wheel covers came off.  It rolled like a Tron deadly disc and went right under a moving semi truck.  Now my car looks weird, with three silver wheels and one black.  I went online and the official Toyota wheel cover is $80 each, or I can get a set of four generic ones with no Toyota logo for $30.  I ordered the generic ones.

As I was walking down from the second floor above me, there was a woman walking in front of me.  She looked sort of like that woman from Cagney and Lacey who was later on Nip/Tuck, the kind of woman that still wears 80s pantsuits with the giant padded shoulders.  She was trying to carry an airline roller bag down the stairs and somehow became discombobulated and fell dramatically, half-flinging the bag, which slammed into the metal hand rail, then bounced and hit the stairs hard, falling down a dozen steps to the landing.  The fall was so stupid and awkward, I was certain she triggered it from some kind of brain aneurysm.  I stopped and asked her if she was okay, and she said she was, but papers from the bag were everywhere.

I’ve been noticing more weird episodes like this every time I leave the house.  Like almost every time I go to a store, someone is in a shouting match with a clerk.  I went to the drug store last week, and this woman was screaming at the pharmacist.  HIPPA rules probably prevent the public disclosure of prescription information, but this woman was screaming the entire episode over and over, so I know what it was.  The pharmacist called her doctor to check on something, and it turns out they could not fill her vicodin prescription for two weeks because she just filled her methadone prescription.  It seems like everyone around is on massive amounts of oxycontin, and can’t sleep at night without valium, and takes a dozen of those five-hour energy drinks every day.  And then when they go to a store, and a clerk is just doing their job, they scream at them like the CIA just called in a drone strike on them because someone misspelled their last name.

The last time I picked up a computer at the Apple store, this happened.  The system is simple: you make an appointment, they help you with your computer.  So they brought my computer out, and set it down in front of a cashier, and all I needed to do was show her my ID, and she would hand it to me, and say “have a nice day” or something.  But in that heartbeat between the guy handing it to her and me showing her the ID, a guy comes up, no appointment, broken phone, “I DROVE TWENTY MINUTES YOU NEED TO HELP ME WHERE IS YOUR FUCKING MANAGER.”  I just needed to flash my driver’s license, take the computer 18 inches from my hands, put it in my bag, and he doesn’t even give her a chance to speak, just continuing over and over “I DON’T UNDERSTAND I DROVE ALL THE WAY HERE FROM WALNUT CREEK AND YOU GUYS CANT JUST LOOK AT MY PHONE I DONT WANT AN APPOINTMENT NEXT TUESDAY I JUST DROVE TWENTY MINUTES.”  And so on.

I used to work in retail.  We’d have customers like this.  It wasn’t every day, maybe once or twice a week.  Is it worse?  Is my timing just bad?  Does everyone think they are the center of the universe?  Has the internet made us hate big companies?  Is the quality of everything so shitty now, with everything outsourced and nickel-and-dimed to the point of nothingness, that everything always breaks, with no recourse?  Are we all just cynics because we can’t believe anything anymore?

I’m trying not to let things like this bother me anymore, trying to give people the benefit of the doubt, trying not to lose my cool when it takes someone too long to do something.  I was at the post office the other day, and they were training a new cashier, and I had to mail a book to New Zealand.  The 2-minute transaction took about 7 minutes.  I think 80% of the people in Oakland would have fucking ended that trainee right there, cut off his head with his own chained-down pen and fucked his windpipe as the blood gushed out of his severed arteries.  I just smiled, and let him learn.  He’s a trainee.  It’s a post office job, and if he doesn’t lose it six weeks from now, it’s a good job and he’ll have a pension that hopefully won’t vanish soon.  He could be out stripping the wiring out of houses and selling it for meth, but he’s learning to work at a vital position so he can feed his kids and pay taxes that might someday repave that fucking road that ate my wheel cover.  I’ll give him the five minutes.

So I sit down at the Genius Bar, show the guy my paperwork, he starts to run tests on my MacBook.  Right next to me sits down the Cagney and Lacey woman.  She pulls out her MacBook Air that just fell down two flights of metal stairs.  It has a cracked screen.  “I have no idea what happened.  It must be defective.”

No patience for technical support

I had to go to Target at 8

last night and buy a new wireless router.  Okay, “had” is a strong word, but I got to the end of my patience, and was fortunate enough to recognize that and throw this stupid Netgear piece of shit I just bought a few months ago into the garbage and start fresh with new gear from a different vendor.  This is typical behavior, and the reason why I don’t spend any free time screwing with Windows machines, because I simply don’t have the patience to fuck around with reconfiguring IRQ interrupts and re-flashing BIOSes every time I want to print double-sided pages.

My own tech support flowchart typically goes like this:

  1. Power it off and then on.
  2. Unplug everything but the bare minimum of what needs to be plugged in.
  3. Check the power supply and that I didn’t plug it into one of the god damned outlets that are connected to a wall switch and/or start flipping wall switches that don’t do anything.
  4. Do whatever you have to do to reset the whole fucking thing to the default factory configuration.
  5. Throw it in the garbage and buy a new one.

And this is the point when half of you start in with the “huh huh, I have a perfectly good router I found in the garbage,” and other various comments about how I’m a dumbass for paying someone else to change the oil in my car blah blah blah.  That’s not the point.  The point is, I used to change my own oil and spend way too much time screwing around with my /etc/modules.conf file to get it so my soundblaster card wouldn’t crap out every time I triple-clicked my mouse button, and now I don’t.  Even more, I used to answer the phone for people who would call me because they couldn’t find the “any” key on their keyboard, and spend hours trying to walk them through how to use the vi editor over the phone.

How the hell did I ever do that?  I mean, I remember first getting a job as a computer consultant, and it wasn’t because I had an innate desire to help people.  It was because I knew some amount about computers, and it beat my previous campus job, which involved scraping uneaten food off of cafeteria trays and wearing a hairnet and a stupid smock probably manufactured by inmates at an insane asylum somewhere north of Indianapolis.  Making fries at McDonald’s paid $4.25 an hour, and answering people’s questions about WordPerfect 5.1 paid $6.10 an hour, so it was a no-brainer.  And once I got my foot in the door, the goal was always to get better at it, or at least good enough that I could take another baby step up the ladder and find another position inside the UCS system that involved more computer and less people.

But in between my departure for Seattle in 1995 and my very first consulting gig in 1990, I must have burned through several lifetimes full of patience.  I mean, at IUSB, we had these stupid piece of shit Leading Edge Model D PC clones, which even in 1990 were so behind the curve, I think the main campus had sold them for scrap and the South Bend campus quickly put them back into service.  We’re talking a Daewoo-manufactured machine that originally came out in ‘85 as a low-end clone, with a 4.77 MHz 8088, 256K of RAM, and a built-in video card that pushed out 640x200 video.  Our units didn’t even have hard drives; they came with a set of two 5 1/4” floppy disks, which lead to many stupendous problems as a consultant.

First, a machine with no hard drive can’t boot, unless you put a bootable floppy in the A: drive.  We had a vague system of letting people check out bootable WordPerfect disks to people. Or when you took C101 or whatever, your instructor would probably format one of your disks (or most likely, your only disk) so it would boot.  These were the days before Windows, or at least before this campus would see it, so re-formatting a disk wasn’t a matter of right-clicking or just inserting a blank and clicking OK when it asks you if you want to format it.  It involved booting into DOS and doing a FORMAT /S.  More importantly, it involved every third question out of people being something like “I PUT A BRAND NEW DISK TAPE IN THIS MACHINE AND TURNED ON THE POWER AND IT WON’T START.”

Anyway, nobody at IUSB knew anything about viruses.  When I was at the IUB campus, they ran Norton or whatever, and when you booted from the hard drive and put in your floppy, it got scanned.  Here, you had everyone booting from their own floppy, or booting from one of the lab’s boot disks with WordPerfect on it.  So one genius brings in a floppy with whatever virus was new in 1990, and it’s suddenly spreading across every damn person’s boot floppy like HPV in a Thailand whorehouse.  I printed up a bunch of signs telling people to stop booting from their own disks and let me scan them on the consultant’s computer, and when that didn’t work, I called someone at the student newspaper (this 8-page free thing they handed out in the cafeteria) and dictated to them verbatim this diatribe about how viruses were all over the god damned place, and if you didn’t stop booting from your floppy, a computer like the one from WarGames was going to swoop in and launch every nuke at our own cities and blame the whole thing on your good buddy George HW Bush.  (I think the reporter misspelled or misquoted every seventh word, so I’d love to see this piece of journalism today.)  This eventually slowed down the spread of the virus, but it also meant that instead of spending my four-hour shifts telnetting into different BBSes trying to pick up chicks (that were probably morbidly obese dudes) in Iowa, I had to sit around and scan everyone’s floppy disks on the consulting machine, and it wasn’t like I could just minimize my telnet window and email window, because this was DOS which didn’t have windows, and you’re talking about a machine with so little memory, loading the text of a shopping list would cause a meltdown.

Here’s another funny floppy thing that happened that demonstrates that at one point in time I had way more patience than I do now.  I’m helping a real professor teach one of those intro to business computing classes, where you learn how to run the spellcheck in WordPerfect and how to print a spreadsheet in Lotus 1-2-3, and some middle-aged housewife on the forever plan came up and told me she put her disks in the computer and they vanished.  (The forever plan: when someone takes one class a year with hopes of finishing their bachelor’s degree about two years before the sun supernovas, which I think is going to happen six billion years from now.)  So I go to investigate, and there are no floppies in the machine.  You can’t just put floppies in the machine and have them get “eaten” in the back, because the back of the drive is sealed or something.  And then I take another look and see the problem:

She had crammed two floppy disks into the narrow crack between the top and bottom floppy drive, turned on the power, and then sat there for 45 minutes, wondering why the hell her spreadsheet didn’t load.

I’m not typing this from prison, which shows you I had an infinite amount more patience back then.  I think I even managed to somehow MacGyver a couple of paperclips into the narrow gap and pull out her disks, because of course the machines were all security cabled down and I didn’t have an awesome tool set like Jeff Spiccoli’s TV repairman dad.  And something like this happened pretty much every day I consulted, so five years of that shit is infinitely more trying than a piece of garbage Netgear router that inexplicably refuses to acquire an IP address anymore on day 91 of a 90 day warranty.

The new router’s nice.  It says “best in class” on the box, so I’m hoping it lasts me at least until Christmas.

The Death of Emacs

P8310015

I’ve been too busy to do anything over here, too busy and slightly sick for a few days.  I’m trying to get caught up on 19 things today, and of course it’s a beautiful, sunny day out, and I think I’ve left the house once all week, so that’s beckoning me.  But I thought I’d take a second to brain dump on a few things before then, as I listen to some Black Sabbath (Master of Reality) and sit on the couch with my recently-returned MacBook Pro.

Ever since I started writing in 1993, I pretty much used emacs for everything.  Emacs is a text editor that originally gained fame on unix systems, although that’s misleading, because it’s a million things in addition to just a text editor, and it runs on pretty much every system you could thing of, aside from just unix.  It is infinitely extensible, using its own dialect of the lisp language, and I used a bunch of extensions in it to read my mail, read usenet news, write code, write books, write the earlier version of this site, keep a dream journal, and catalog all of my CDs.  I wrote all of my books in emacs, using it as a text editor and keeping track of various outlines and fragments and notes in a bunch of text files.  Right before publication, I’d usually move the files over to Word or FrameMaker, but the bulk of the work was in emacs.  I’d also use unix tools like wc and grep and find and sed to do all of my various slicing and dicing and counting and finding.  It wasn’t the best system in the world, but it worked.

I even made some money on emacs, tech editing a book for Sams on emacs.  So my brick-and-mortar book store debut on the printed page was actually back in 1999, although I wasn’t a primary author, and reading about how to write elisp config files is probably less entertaining than any of my more recent work.

But as cool as emacs was, it also sucked.  Every time some idiot in Norway suddenly had a great idea on how they thought tabs should work in a document, they would change the whole thing and I’d spend 22 hours straight poring over source code diffs trying to figure out how the hell to write a shim or workaround to duct tape to the side of the thing so it would work again.  Long lines and line breaks were also a huge pain in the ass, which takes some explaining, so hang on.

When you write a paragraph in Word or any other modern word processor, you generally don’t type return at the end of a line; you just type and type and when you hit the edge of the window, the word gets pulled to the beginning of the next line, and you keep going.  The only special character is a paragraph break, which comes when you hit return once or twice at the end of a block of the text.  In emacs, what happens is that when you reach about the 72-character mark in a buffer, it drops in a carriage return and goes to the next line.

That means when you type a file in emacs and bring it into Word (or WordPress, or FrameMaker, or an email message, or anything else not designed in like 1974) you have all of these extra carriage returns, and you have to do something stupid like write a script or do some search-and-replace to replace all of the single carriage returns with spaces and all of the double carriage returns with paragraph breaks, and hope you didn’t do any weird indented text or source code snippets that will be monumentally fucked by your search and replace.

And yes, there are some workarounds in emacs, like some long-line mode, which is totally not documented, or at least not documented well, and would involve me taking two weeks off of work to completely re-engineer the whole fucking universe and probably reinstall emacs 19 times and recompile it from source and install 2834 different libraries and twelve different versions of XCode.  And the second I would get it working, some college freshman in Sweden or Germany would add a fix that would completely break my system.

I should also mention that emacs has slowly been losing favor here, as far as alternative uses.  I got the Mac in 2005, and at some point switched to using Mail.app full-time.  That also meant ditching BBDB, the emacs address book thing, and going to the Mac address book.  CDs are a distant memory, thanks to iTunes.  I gave up on my own blog system and moved to WordPress.  Usenet is deader than dead.  So it pretty much just came down to daily writing for emacs.

Another big issue for me is keeping track of stuff, especially in bigger writing projects.  I’ve used two different approaches to books.  When I wrote Summer Rain, each chapter was in a text file, and there was a sea of text files for notes and pieces and outlines and whatever else.  This book took a huge amount of research and planning over the course of five years, and by the end of the book, I worked off of a paper outline that summarized the main points in each chapter.  I made heavy use of grep to search for things within each chapter.  When I needed to do a global search and replace, I would use emacs and dired, which worked, sort of.  Dired-mode is powerful, but good luck remembering all of the key combinations if you don’t use it on a daily basis.  Printing out the book for review was murder, not only because of the length, but because it typically involved catting all of the files together, dropping it in Word, and doing the carriage return/paragraph break shuffle.

When I wrote Rumored to Exist, I put the entire thing in one file.  That made it easier, but it also meant a hell of a lot of scrolling around.  It also made it absolutely impossible to do stuff like move around chunks and keep track of what was where unless I printed out every damn page and spread them across every surface of my apartment like I was on some William S. Burroughs kick and about to shoot my wife in the head and write some Serious Nonlinear Fiction.  (My apartment did have a lot of bugs, which was a plus.)  Around the time I moved to New York, I decided I needed to start over, and put the entire book in a file called rumored-seattle.txt, then opened a blank file and started copying over only the good chunks.

Thinking back on it, writing Rumored was such a fucking disaster.  I had all of the content done in a couple of years, but then it took a couple more years of rewriting and moving things around and adjusting things.  I printed out every page, then cut everything up and glued it to index cards that I tried to rearrange and sort and move around.  I tried writing outlines; I tried putting everything in excel one time, with thoughts of color-coding or sorting it.  I thought about writing a PHP/MySQL app to manage everything.  I tried using the emacs outline-mode.  Nothing fucking worked.

I eventually kicked my way through it, and got everything in one file, then sat in the Kiev restaurant with a red pen and a bunch of pierogies and went through the whole god damned thing and marked up every mistake and typo, and had a total and complete draft that if I got in those corrections, would be ready for the press.  Then I walked home and got caught in a god damned typhoon, and when I got home, I had a ruined pair of dress shoes, and a clipboard of pulp and pink pages, everything completely ruined.  I was pissed as fuck. That was on September 10th, 2001, and let’s just say things got put into perspective the next morning.

So I’ve been looking for new system.  Someone has figured this out, right?

I have tried a bunch of systems and software packages, and I think I have one that works.  I also realize that I’ve written for 1300 words, and haven’t even gotten into it yet.  So I should probably make this a two-parter and tell you about the software itself next time.  And I should probably wrap this up so I can actually go write with the damn thing and work on this book.

XEmacs annoyances on the road

Every time I rely on something on a new computer and take it on the road, said computer/system throws a pain-in-the-ass problem at me.  And the difficulty of said problem is inversely proportional to the availability of either time or internet access.

Case in point: I do a lot of my writing on my home computer, which is a Macbook, but which I did not want to bring on my current trip because of size, and mostly because it’s my main computer, thus is not as easily replaceable in case of theft or damage.  Instead, I transferred over my current book project and installed a copy of XEmacs onto my netbook, which runs Windows XP and doesn’t include such niceties as a functional emacs, or pretty much anything else.

I get to my destination, and suddenly find a neat problem: the M-q command, which fills the current paragraph, does not work.  “Filling” a paragraph, to you non-emacs types, takes a paragraph that has a bunch of uneven lines, like say a first line with two words, a second line with 100 words, and so on, and rejustifies it so it more or less fits in a standard page width, which is I think 72 characters by default.  But when I would do this in a paragraph that began with a tab, it would indent the entire paragraph one tab.

There is no clear documentation on how to fix this, or even how to explain why it happens.  I remember that ten or twelve years ago, this inexplicably started in GNU Emacs, and after a lot of head-versus-wall bashing action, I found some magic elisp to fix it.  But that was ten or twelve years ago, and more importantly, the same code did not fix XEmacs.  Was this a Win32 issue?

I don’t know, but I found another oddity: XEmacs insisted on creating a ~/.xemacs/init.el file when I picked the Options > Edit Init File menu option.  And it could not create that directory.  And if you’re in file explorer in Windows, you can’t create a file that starts with a dot.

Tip #1 and the long way around:  go to where you installed XEmacs (probably c:\Program Files\XEmacs), go into site-packages\lisp, and add your code to site-start.el

Tip #2 which didn’t dawn on me until days later: go to a dos prompt (sorry, “command shell”) and simply do a mkdir .xemacs, and it works.

Back to the initial problem.  I can’t entirely explain why this worked and why the thousand other things I tried did not work, but here’s my solution.  Add this to whatever .el file you can get to start up with XEmacs: (setq auto-mode-alist (append '(("\\.txt$"  .  paragraph-indent-text-mode) ("\\.html$" .  html-mode)) auto-mode-alist)) (setq text-mode-hook '(lambda () (turn-on-font-lock) (auto-fill-mode 1) (setq adaptive-fill-mode nil) (local-set-key "     " 'tab-to-tab-stop) ))

The space between the two quotes in the second-to-last line is an actual tab character and not five spaces.

Worked for me after that.  Next lesson, if I ever figure it out, is either how to get ispell to work right on Windows machines, or how to install a hacked copy of OSX on my netbook and forget all of this nonsense.

Shell scripting will eventually kill me

I spent two hours the other night trying to hack out a shell script to import the archives into this thing. Wordpress doesn’t have a simple way to just suck in a bunch of text files; you need to assemble them into something that resembles an RSS feed, and then import that. This brought up two problems:

  1. All of the posts had to be on a single line in the element. This involved a bit of dicking around with awk and then sed before I finally gave up and realized I could do it faster with tr.

  2. The pubdate element had to be in RFC-822 time format, and the only thing I had to work with was the filename, which was in YYYYMMDD format. It took most of the two hours to figure out the god damned /bin/date program that ships with OS X is fundamentally broken, and ALL date commands in unixes are broken, because instead of curing cancer or stopping wars, about 80% of our world’s brainpower goes to stupid pursuits like “oh, I have philosophical issues with the 87 flags offered in BSD’s date program, so I’m going to write a completely incompatible one with 73 flags of its own, but still fail to address the two or three things people need to do with a time program.”

Case in point, this DOES NOT work in OS X:

date -j -f "%Y%m%d" "20090930" +"%+"

This DOES work:

date -j -f "%Y %m%d" "2009 0930" +"%+"

But my filenames are 20090930.html and not 2009 0930.html. That extra fucking space killed me.

AND YES, I am sure I am just an idiot, and if I sat around all day writing shell scripts, I would KNOW that blah blah blah hidden flag blah blah blah run it through a perl script blah blah blah. But truth of the matter is, I write maybe a half-dozen lines of shell script every three months, and then promptly forget everything. I’m sure if I sat around all day slicing onions into cubes, I would be a god damned onion slicing master, but the truth of it is, I only need to cut up maybe one onion a week tops, and I’m not about to quit my day job just to sit around slicing up onions.

Here’s the script:

for f in ~/website-mirror/oldjournal/html/1997*.html; do
    echo "<item>"
    OLDDATE=`basename -s .html $f`
    THEYEAR=`echo $OLDDATE | cut -c1-4`
    THEREST=`echo $OLDDATE | cut -c5-8`
    SHIT=`echo $THEYEAR $THEREST`
    pubdate=$(    date -j -f "%Y %m%d" "`echo $SHIT`" +"%+")
    echo -n "<pubDate>"
    echo -n $pubdate
    echo "</pubDate>"
    echo "<category></category>"
    echo "<title></title>"
    echo "<content:encoded>`tr '\n' ' ' < $f`</content:encoded>"
    echo "</item>"
done