Monday, June 13, 2022

Git Scenarios #3: OS-X Case Sensitivity (or lack thereof)

Git Scenarios #3: OS-X Case Sensitivity
Git Scenarios is a recurring LabKitty feature wherein we examine weird / badly-documented git behaviors that may vex the git n00b (and the not-so n00b).

The OS-X filesystem is not case sensitive. That means, for example, it cannot tell the difference between a file named foobar.txt and FOOBAR.txt. You can easily verify this. Open Terminal and do:

  $ touch foobar
  $ ls foobar
  $ rm FOOBAR
  $ ls foobar

The first ls will list the file and the second will not.

Unfortunately, this can create git weirdness. Read on.

Saturday, November 6, 2021

LabKitty Recommends: CORTEX: Statistics and Geometry of Neuronal Connectivity

Braitenberg cover image
Anatomy is the handmaid of physiology. From aardvarks to zyzzyva, if you seek to understand how something works, you must first tally its parts. Those who would take on physiology of the neural kind face a particularly uphill battle. First, brains are not built from the kind of detailed bauplan that applies to the body writ large. The shinbone may be connected to the knee-bone, but no such explicit instruction set exists for placing billions of neurons and trillions of synapses amongst them. There simply isn't enough information in the genome. Instead, we make do with statistics. Nature sketched some rules -- more what you call guidelines than actual rules -- threw us into the stew, and then washed her hands. The statistics clearly work (else you not reading this would be) but that does not mean sussing them is an easy task.

Second, even though we desire statistics writ large, it must be arduously written from the small. Neurons = tiny. You can't even see the pesky things without a microscope and even then not without preparation. Leeuwenhoek would have to wait a hundred years for the histological stains that make neurons appear in his invention, and a further hundred years for the electron microscope necessary to visualize synapses. Functional neuroanatomy is a Herculean census not of citizens but of invisible specks. No wonder protoscientists settled on the various lumps and gobbets as the fundamental units. Had you informed Descartes that it is not the pineal itself but a vast winking population of invisible animalcules within that comprise the soul you would have blown his mind.

Monday, September 13, 2021

Git Scenarios #2: Personal Access Tokens

Our scenario today is less a scenario and more a cautionary tale, for it contains no objective and brokers no recourse. Today, we are wholly at the mercy of GitHub (...it will hurt less if you don't struggle, the voice behind you whispers).

If you have been using GitHub for any time, you probably recall the Big Announcement that passwords -- those stalwart digital sentinels generations of coders have relied upon -- would no longer be accepted as the lingua franca for transmitting fingerbarfings to and fro the site. Beginning in August, a new mandatory security widget would go into effect: the Personal Access Token.

Now, instead of typing a password to do any git-dangerous op, you have to type an entirely different password.

A new password. A better password.

A password GitHub creates for you.

Tuesday, August 31, 2021

Introducing: Git Scenarios (also Git Scenarios #1: Revert one file)

Working with git is an infinite loop of small victories followed by crushing defeats. Just when you think you understand the tool's design philosophy, just when you think you get git, just when you let your guard down and attempt the smallest operation outside your comfort zone, disaster strikes. Git-fu simply doesn't extrapolate. The command with the obvious name isn't the one you want, and the command you want doesn't do what you want without including some cryptic option. At best, your attempt does nothing. At worst, it leaves you with a corrupt repo and a missed deadline.

Git is so horrid one can't help but suspect Torvalds released it as a joke. The bad design, the obtuse syntax, the nonsensical command modifiers. I'm here reminded of Richard Feynman lashing out during an interview when a reporter insisted on using buzzwords and machinations to explain QED. You're taking something simple and beautiful and making it ugly and complicated! Once git escaped the lab, rational Software Version Control was forever put out of reach. Programming was no longer about solving problems, it was about sitting at the cool kids table.

What's that, young pup? You disagree? You say git is a paragon of SVC, an exemplar of UX, and if someone doesn't see that, well, they're, like, stupid.

Fine, simple test: Would you be using GitHub if it wasn't free?

Yeah, that's what I thought.

Saturday, May 8, 2021

Dot Product Matrix Transpose Browlf

So it's Saturday night and I'm watching Brad Osgood's lectures on Fourier analysis when he writes something on the blackboard that should be familiar:

  <Ax,y> = <x,ATy>

(the angle brackets indicate dot product). The point being, the matrix picks up a transpose when shifted to the other vector.

By "should be familiar," I mean should be familiar to me (maybe to you too, but I'm not judging). However, it wasn't. This ostensibly basic fact of linear algebra had suddenly arrived in my life without warning, like a stray kitten or a subpoena.

I prolly would have felt bad were it not for a gutfull of cheap vodka (what part of "Saturday night" did you not understand?). Because this looks like the kind of identity that should have been tattooed on my psyche somewhere in my undergraduate travels. Circle Pines U being what it is, I assumed here was simply yet another basic mathegonical factoid that had eluded me (or I it).

But, alas, for once my shortcomings could not be blamed on a $7/credit hour education.

Come morning, once the black mist had lifted and the voices stopped calling, I scoured my favorite resources for an explanation of the identity only to discover that, too, wasn't there. Greenberg. Mangel. Caswell. Rencher. CRC. My Schaum's library. All failed me. This apparently simple trick of the linear algebra light appeared in none.

It would seem I had to figure it out myself.

That's just rude.

Saturday, March 27, 2021

Famous First Words #15: The Fast Fourier Transform -- Cooley and Tukey

Famous First Words is a recurring LabKitty feature wherein we have a look at the opening line of a legendary scientific article.

LabKitty has gushed about the FFT to anybody who will listen and to many who will not. Second only to eigenvalues in sphere, reach, and influence, the FFT remade the world. It was at once better mousetrap and longer-lasting lightbulb. Tastes great and less filling. Potato stuffing. The FFT is so celebration worthy it has even appeared on a t-shirt. And leggings! And a t-shirt!

Albeit kicking around in various forms since Gauss, the FFT didn't really get on the wish list until nerds got computers. I imagine Ada Lovelace whiled away many a frigid Nottinghamshire night dreaming of putting fewer cranks into her Babbage Engine to whack out a power spectrum. But the FFT we know and love was only announced in 1965. In perhaps the one instance of WW II failing to invent everything, the FFT slept right though the war years until necessity bumped it from slumber. Alas, the inspiration was still killeachother because of course it was. As WillyPete informs us "...Tukey came up with the idea during a meeting of President Kennedy's Science Advisory Committee where a discussion topic involved detecting nuclear tests by the Soviet Union."

Kee-ripes. Can't humans ever invent something inspired by -- I dunno -- Bob Ross. Or sporks?

This is why we can't have nice things. Or maybe why we can.

But I digress.