WWDC 2017

Just a few minutes to DubDubDeeCee!

Despite that I’m currently not working on any iOS or Mac-specific software, and it hasn’t been great since Steve died, I’m still always excited. Just a few years ago I was always in that keynote line, and then a week drinking from the session firehose, getting my apps problem areas looked at by engineers, and overdrinking at the parties and beer bash with usually shitty bands (but one year they had Barenaked Ladies!!!)

So this week I’ll be watching sessions when they have something that isn’t nonsense about IVE-1138’s white room, or Swift the walking dead CPU-burner of a language. And then get back to work on a modern platform.

Using Atom

“Have you tried Atom?” #RuinADateInFourWords



Have gone to the dark side temporarily: Atom handles my ES6 better than BBEdit currently. 😭

But it’s not quite right, so I fix. Atom configuration is a bit of a mess, but everything-is-a-plugin is a good philosophy.

  • One Dark UI & One Dark syntax themes are OK. But for crazy-go-nuts, install ubik-neon-syntax, and atom-material-ui. Goddamn this makes me want a bottle of Jolt Cola and an Information Society CD blasting on endless repeat.
  • install logo-file-icons, garish but the more popular file-icons is bland and ugly.
  • install symbols-list, because the default symbols tool doesn’t find new-style classes.
  • install eslint, because nobody writes JavaScript good, even me after 20 years of it.
  • install atom-mac-terminal, gives you an “Open in Terminal” right-click.

  • packages, linter, settings, turn off “Lint On Change”, because that slows down an already slow editor.

  • packages, autocomplete-plus, settings, turn off “Show Suggestions On Keystroke”. Ctrl-Space is fine. I learned to touch-type on an IBM Selectric, so I type faster than JS can autocomplete anything but a very long constant.

  • % atom ~/.atom/styles.less and add:

    /* scroll bars should be grabbable */
    .scrollbars-visible-always {
        /deep/ ::-webkit-scrollbar {
            width: 20px;
            height: 20px;
        }
    }
    
    /* turn off all that folding folderol */
    atom-text-editor.editor .icon-right {
        width: 0 !important;
    }
    
    /* make the gutters different from text so I can see indentation */
    atom-text-editor.editor .gutter {
        border-right: #222222 1px solid;
        background-color: #111111;
    }
    
    /* ubik-neon-syntax has overly dark functions, was #133460 */
    .theme-ubik-neon-syntax .syntax--entity.syntax--name.syntax--function, .theme-ubik-neon-syntax .syntax--support.syntax--function {
        color: #4f6db4;
        font-weight: bold;
    }
    /* ubik-neon-syntax recolors the semantic class of arguments to functions; I want types to be colored the same in or out of a function call. */
    .theme-ubik-neon-syntax .syntax--arguments, .theme-ubik-neon-syntax .syntax--meta.syntax--function-call {
        color: unset;
    }
    
  • (new 2017-06-10) % atom ~/.atom/keymap.cson (why is there no UI for keymapping?!) and add:
    # I hate editors & other long-term applications closing by instinctive Cmd-Q
    'body':
        'cmd-alt-ctrl-shift-q': 'application:quit'
        'cmd-q': 'pane:close'
    
  • (new 2017-06-10) % atom ~/.atom/snippets.cson (why is there no UI for snippets?!) and add:
    '.source.js':
        'module.exports':
            'prefix': 'me'
            'body': '''module.exports = {
                $1
            };
            '''
    

Open issues:

  • I can’t find a package to get rid of tabs and only badge/color open files in the tree view.
  • Regex field is unbearably small. I often copy over to BBEdit, do a big regex there, copy back.
  • To figure out any style element to customize, you have to open developer mode ⌘⌥I and pick the element and find the exact right style from a mess of styles. A lifetime writing HTML & CSS pays off in customizing a fucking editor; if you’re not me, you’re probably stuck with it. BBEdit lets you customize styles right there in Preferences. At least atom-material-ui has a couple choices for accent colors.
  • I wrote this post in BBEdit. Atom has a Markdown preview, but it’s awkward and far slower.

News Snark

OK, what’s going on in tech today?

  • Apple’s bragging about the fucking trees on their spaceship compound. link

  • Tech companies are powerless against coal/oil company politics. link

  • Google’s ad-blocking everyone except Google ads. link

  • Nintendo wants you to pay $20/year for online multiplayer, still no backup, and an NES emulator (back when their games were good). link

(I don’t expect to do this often, but my sarcasm levels are higher than my bullshit-tolerance this morning)

Levelling Up

Pseudo-Nerds who make the argument “exercise is like levelling up!” are not very good players. Not Meta.

After sleep, food, life bullshit, email, meetings, etc., you get at best 8 XP (hours) and more often just 4, per day to work on whatever skills you like.

If you spend 1-2 per day on PE, you’re wasting 12.5-25% of your potential just to multiclass as Nerd/Jock, rather than those who spend all of their XP levelling Nerd skills.

MP3 Considered Harmful

People bitching about “death of MP3” articles made me look:
NPR on MP3

Which is actually quite reasonable. I haven’t deliberately touched MP3 in a decade, because AAC sounds better in 2/3 the space (typically 256k AAC is better than 320k MP3). I keep some original rips or purchased music in FLAC, but that’s still unusably large on an iPod or iPhone.

MP3 was designed to encode “Tom’s Diner” and sounds worse the further you get from that.

The MP3 patents expired in April 2017 (maybe: with continuations and overlapping patents it’s hard to be sure), which means ideologues who don’t want to pay for software other people invented, can now use MP3 instead of the noxious OGG format which sounds like a backfiring car; they still won’t use AAC or anything else from this century. But for everyone else, it means we continue using better formats whenever possible.

Apps

It weirds me out that people say “apps” for anything except iOS or Mac programs, because their application bundles have a “.app” extension inherited from NeXTstep.

Windows programs are exes. Linux (as if anyone uses Linux) are bins or binaries. Web pages that do something are CGI or DHTML. None of those have application bundles, a coherent structure for binary and support files.

And until the iPhone got popular, only the nerdiest of Mac nerds ever said “app”. But most people can’t remember their language changing, because they have no introspection.

Swift

Swift amazes me. A beta language that breaks your code every 6 months, a type system so totalitarian and inescapable it makes BDSM Haskell look like a vacation (and apparently nobody’s read Gödel’s paper), the founder abandoned it to go work on cars, Apple won’t ship production code in it, compiling burns your fucking CPU to the ground for 10s of minutes for code C can do in seconds, and after 3 years Xcode still can’t refactor it.

And stupid motherfuckers write their production apps in it. 😦

I know Objective-C is hard. It’s C plus Smalltalk, both of which are subtle and take a year or two to learn. [brackets scare:theNoobs] && dot.syntax.isOverloaded;
But the tools fucking work. Dynamic code makes programmers efficient. A more elegant weapon for a more civilized age.

BBEdit

My editing weapon of choice is BBEdit: It Doesn’t Suck™. Why? I want you to read the typical release notes:
http://www.barebones.com/support/bbedit/notes-11.6.html
Attention to fucking detail. Best $100 I ever spent (it’s cheaper now).

On iPad I use Textastic (has regexp) or Editorial (has scripting filters), but they’re amateur hour in comparison.

If I have to shell in and can’t edit remotely & upload with BBEdit, I’ll use vi, which I used for ~20 years (actual vi, STeVIe, Elvis, & Vim).

Oh, and for iOS/Mac apps with a ton of UI/framework shit, I use AppCode. BBEdit for clean C/Obj-C and I can just xcodebuild from Terminal. As the avatar says, STOP Xcode!

It’s a hell of a thing. Apple had a reasonable but limited Project Builder/Interface Builder pair of apps from NeXT. PB could set an external editor (BBEdit) so I was happy. Then Xcode combined them and lost the external editors, and every version since has been worse, slower, crashier, renders ASCII text as Russian, less capable of even simple refactors. Now it just shoves fucking Swift (C++ for masochists) down your throat and shits 10k messages into Console so you can’t debug.