Saturday, October 1, 2022

best you may not need jquery - document ready

 I have long appreciated the site You might not need jQuery - it does a great job of bridging the gap from jQuery to vanilla.js. (The two are really quite similar... for my money the biggest similarity is "You don't need a build system".) 

One thing I look up a lot: document.ready

$(document).ready(function () {});

which can become

function ready(fn) {
  if (document.readyState !== 'loading') {
    fn();
  } else {
    document.addEventListener('DOMContentLoaded', fn);
  }
}

More as I end up using it...

Monday, September 19, 2022

happy 40th birthday of the smiley

Happy 40th Birthday of the Smiley!!!

 


Of course the classic punctuation smiley has been supplanted by cartoon-ish emoji. I admit the cartoons are more expressive and flexible (though sometimes you have to brace yourself for how they will have a different vibe on different devices) but I miss the old visual puns.

These are said to be the Top Five Favorite Emoji in the United States

But...bleh, I kind of hate both of the "laugh crying" emoji. It's just... I don't know, too much, it overdoes the thing. I use plenty 😃 to round off the edges of my casual writing, but the laugh-crying ones are trying to hard, like they seem dishonest, the LOL of the emoji world...

More on the history of the smiley at Lunduke

Friday, September 16, 2022

blue letter-y thing on white icons are so tired!

I saw this on the "this date" feature of my blog with the caption "Oh Shazam, you too?"


I was startled to see that was six years ago. And also, the one that causes me the most havoc in terms of quick recognition is "VS Code" on my Mac:

Though Outlook doesn't help:


Blue letter-y thing on white is so tired!

It's worse on Mac, actually... I see all the icons lined up on my switcher app, but the order is variable, unlike on the iPhone where I tend to develop muscle memory about where icons live.

Sunday, September 11, 2022

chilling out on the iceberg of languages

Great video about the languages out there...

After watching it, and it's reference to "Jr" programmers, I feel a little better as a senior, seeing just how many of these I've used. (BASIC, JS, SQL, Java, C... even ASM for my Atari 2600 project.) 

A few personal historical notes from the 90s (and from the 80s):

  • They missed out on Logo, huge in the 80s, which was lowkey a (kid friendly!) version of Lisp and featured turtle graphics, helping kids think about geometry via a drawing "turtle"
  • I feel like Java hit me at my peak learnability so I'm always surprised when it's considered so daunting. (Admittedly I kept using it in its friendly "Processing" form, and ducked out when the syntax started getting weird and Template-y)
  • It took a weirdly long time for C++ to standardize its libraries for even basic input and output.
  • I think they skipped over Perl? Probably its obliquely referenced in the "Historically Important Row" with the O'Reilly Camel. For me it was critical for learning things like maps and regexes when all I had had was BASIC and C... then it became my goto for dynamic stuff on websites I made, til PHP came around. (And I was started to learn that Perl was actually a wrapper script for all this Unix-C stuff... really weird given how smoothly it handled memory and strings and how its hodge podge syntax was the only hint to its frankenstein nature...)

Still, I don't have a love of learning a language for its own sake, like for keeping the brain flexible about syntax, say. I just want to build interactions and so there are more important problems at hand!