forty-nine things tagged “computers”

The Bieber of Comic Sans

From an interview with Vincent Connare, creator of Comic Sans:

Q. What do you think of comic sans’ detractors?

A. I think most of them secretly like Comic Sans — or at least wish they had made it. Interesting fact: the main designer at Twitter tweeted that the most server space is used by complaints about: first, airlines; second, Comic Sans; and third, Justin Bieber. So not even The Bieber can beat Comic Sans!

Here’s the tweet he’s talking about (it’s from 2010.) Also:

Regular people who are not typographers or graphic designers choose Comic Sans because they like it, it’s as simple as that. Comic Sans isn’t complicated, it isn’t sophisticated, it isn’t the same old text typeface like in a newspaper. It’s just fun — and that ‘s why people like it.

I tend to ignore gatekeeping bullshit when it comes my typographical loves 😛 And from that NYTimes article, emphasis mine:

“It’s like, ‘Not only am I going to refuse to submit these documents, but I’m going to use a typeface that doesn’t submit to the solemnity of the law, and Congress and public institutions,” said Michael Bierut, a partner at the design firm Pentagram. “Or maybe he just likes Comic Sans. It’s hard to say. Few typefaces are this freighted with public opinion.”

I think these are the final words on the matter from the creator himself:

If you love Comic Sans you don’t know much about typography. And if you hate Comic Sans you need a new hobby.

The Scunthorpe Problem

The Scunthorpe problem (or the Clbuttic Mistake) is the unintentional blocking of websites, e-mails, forum posts or search results by a spam filter or search engine because their text contains a string of letters that appear to have an obscene or otherwise unacceptable meaning.

Wikipedia

Examples would be: shitake mushrooms, Herman I. Libshitz, magna cum laude, Arun Dikshit.

Highly Informed Outrage

A lovely Techbro aside from the ongoing #shitkraken.

Greg Stenstrom, another poll watcher, said that in Delaware County, 47 USB cards were missing.

As a computer scientist, an American and a patriot, it doesn’t matter who those votes were for. It was shocking to me that that could even happen,” he said.

“There is no cure for this, no remedy for this. I don’t believe as a citizen and an observer to this, anyone can certify this with a good conscience.”

Harriet Alexander, “‘Your election is a sham’: Giuliani tells Pennsylvania ‘I know crooks really well’ as he appears in Gettysburg”, The Independent

(Emphasis mine.) Indeed, Gregory. When USB cards go missing, one needs formal training in Algorithms, Data Structures, the Theories of Computation and Complexity, Formal Logic (of course), and more, to express appropriate outrage at an election that’s fraudulent only in your head and only because your guy didn’t win.

Disposable Software

The software industry is currently going through the “disposable plastic” crisis the physical world went through in the mid-20th century (and is still paying down the debt for). You can run software from 1980 or 2005 on a modern desktop without too much hassle, but anything between there and 2-3 years ago? Black hole of fad frameworks and brittle dependencies. Computer Archaeology is going to become a full-time job.

Source

The AppleTV Remote Sucks

Dec 9 It’s so bad a Swiss company made a much saner substitute that sells for ~$20.

The Salt Remove


Nov 16 Looks like you can use the old remote with the new AppleTV.


I’m annoyed every time I have to use the infernal thing.

  • It tries (poorly) to be something other than a damn TV remote1.
  • There’s no way to tell which end is up.
  • There’s no accidental tap detection when you pick it up.
  • It’s way too small.
  • It’s way too slippery.
  • I use Siri to skip forward and backward because the edge clicks are unmemorable and dysfunctional.

I use the iPhone app when I can and, while I can’t stand the terribly implemented inertial scroll, still find it better than the hardware.

Inertial scrolling does in fact exist on the Siri remote, but the effect is muted. The on-screen movement doesn’t accurately reflect your swiping — scrolling is staggered and it often stops abruptly, when you don’t intend to stop. This makes aspects of navigation, like manual search or entering your email address or password, extremely cumbersome.

– Dave Smith, “My biggest problem with the new Apple TV remote

See also: Steve Brykman of ArsTechnica’s thoughts on “the nightmare horrorshow” that’s the remote.

  1. “You’re basically getting a giant iPad game that you have to play with a tiny remote” ↩︎

Data, Data, Data

Linus Torvalds on git

I’d also like to point out that unlike every single horror I’ve ever witnessed when looking closer at SCM products, git actually has a simple design, with stable and reasonably well-documented data structures. In fact, I’m a huge proponent of designing your code around the data, rather than the other way around, and I think it’s one of the reasons git has been fairly successful

[. . .]

I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships.

Computers Are Fast

A nice little quiz meant to illustrate how much your typical Python and Bash code can accomplish in one second.

If the answer is 38,000, both 10,000 and 100,000 are considered correct answers. The goal is to not be wrong by more than 10x :)

and

A newer computer won’t make your code run 1000x faster :)

Two Levels of Not Giving a Fuck

No Code is the best way to write secure and reliable applications. Write nothing; deploy nowhere.

Start by not writing any code.

Brilliant. I love both the presence and contents of the Dockerfile in that repo. As is always the case with such projects, the issues and pull requests are 💯

And if one is tempted to go against the tenets of No Code, there’s always my beloved fuckitpy, a (strangely well-thought-out) “Python error steamroller”1:

@fuckit
def buggy_function():
    problem_solved

@fuckit
class BuggyClass(object):
    def __init__(self):
        everything_works_now

And:

This module is like violence: if it doesn’t work, you just need more of it.

  1. Inspired by FuckitJS. ↩︎

The Korn Shell

Good talk by Siteshwar Vashisht at FOSDEM 2019 on maintaining the Korn shell and old codebases in general. I came by his work while reading up on the fish shell. Featured this nugget

He talks about how they removed dead/inapplicable code and micro-optimizations, refactored a lot of legacy code, improved tests, switched to a new build and CI system, and so on.

Began with this baffling one-liner that won the International Obfuscated C Contest in 1987

main() { printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}

And reminded me of this Aaron Sorkin-esque story about David Korn which I heard via BLN

Greg Sullivan, a MicroSoft product manager (henceforth MPM), was holding forth on a forthcoming product that will provide Unix style scripting and shell services on NT for compatibility and to leverage UNIX expertise that moves to the NT platform. The product suite includes the MKS (Mortise Kern Systems) windowing Korn shell, a windowing Perl, and lots of goodies like awk, sed and grep. It actually fills a nice niche for which other products (like the MKS suite) have either been too highly priced or not well enough integrated.
An older man, probably mid-50s, stands up in the back of the room and asserts that Microsoft could have done better with their choice of Korn shell. He asks if they had considered others that are more compatible with existing UNIX versions of KSH.

The MPM said that the MKS shell was pretty compatible and should be able to run all UNIX scripts.

The questioner again asserted that the MKS shell was not very compatible and didn’t do a lot of things right that are defined in the KSH language spec. The MPM asserted again that the shell was pretty compatible and should work quite well.

This assertion and counter assertion went back and forth for a bit, when another fellow member of the audience announced to the MPM that the questioner was, in fact David Korn of AT&T (now Lucent) Bell Labs. (DavidKorn is the author of the KornShell).

Uproarious laughter burst forth from the audience, and it was one of the only times that I have seen a (by then pink cheeked) MPM lost for words or momentarily lacking the usual unflappable confidence. So, what’s a body to do when Microsoft reality collides with everyone else’s?

JavaScript Delenda Est

Back in the second century BC, Cato the Elder ended his speeches with the phrase ‘Carthago delenda est,’ which is to say, ‘Carthage must be destroyed.’ It didn’t matter what the ostensible topic of the speech was: above all, Carthage must be destroyed.

My opinion towards JavaScript is much like Cato’s towards Carthage: it must be rooted out, eliminated and destroyed entirely. I don’t know if I’d go quite so far as to say that the fundamental challenge of mass computing is the final destruction of JavaScript — but I want to say it, even though it’s false.

JavaScript is a pox, a disaster, a shame. It is the most embarrassingly bad thing to become popular in computing since Windows 3.1. Its one virtue (that it’s on every client device) is outshone by its plethora of flaws in much the same way that a matchstick is outshone by the sun, the stars and the primordial energy of the Big Bang added together.

JavaScript is the XML, the Yugo, the Therac-25 of programming languages. The sheer amount of human effort which has been expended working around its fundamental flaws instead of advancing the development of mankind is astounding. The fact that people would take this paragon of wasted opportunity and use it on the server side, where there are so many better alternatives (to a first approximation, every other programming language ever used), is utterly appalling.

JavaScript delenda est.

I don’t know what my newfound affection for it says about me. Via HackerNews.

Gandhi the Annihilator

At least in Civilization:

[. . .] Gandhi tends to be the first to use nuclear weapons, and spares no expense on wiping your civilization off the map. You probably always thought you were crazy — how could a series that prides itself on historical accuracy portray Gandhi so wrong? Well, you’ll be happy to know that both your sanity and Civilization’s historical integrity aren’t at fault. Instead, a bug’s to blame.

In the earlier Civs, leaders are given a set of attributes that dictate their behavior. One such attribute is a number scale associated with aggressiveness. Gandhi was given the lowest number possible, a rating of 1. However, when a civilization adopted democracy, it granted a civilization -2 to opponent aggression levels. This sent Gandhi’s rating of 1 into the negative, which swung it back around to 255 — the highest possible rating available, and thus, the infamous warmonger Gandhi was born.

Geek.com, What caused Gandhi’s insatiable bloodlust in Civilization

And they just left it in there as an homage:

This cyclical aggression scale was fixed in later versions of the game, but Gandhi wasn’t totally cured of his bloodlust. The team fixed Gandhi’s aggression rating, but as an Easter egg paying homage to the earlier aggressive versions of Gandhi, ramped his nuke rating through the roof. So, while it may be difficult to push Gandhi over the edge, he goes from zero to nuclear option once you do.

Via MS.

Alan Kay on OOP

OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I’m not aware of them.

Dr. Alan Kay on the Meaning of “Object-Oriented Programming”

So… Erlang? (RIP Joe Armstrong 🙏) And that was before this

(I’m not against types, but I don’t know of any type systems that aren’t a complete pain, so I still like dynamic typing.)

Indeed, Dr. Kay.

Hugo Migration

Gave Hugo a try and was quite impressed by the ease and speed. The official documentation kinda sucks at introducing key ideas (like taxonomies) in a gradual way that’s helpful to newcomers, but is great for variable and function references. Found these two posts very helpful. Here’s another that explains template variable scope well. And another that goes over theme development step-by-step.

Sticking to Jekyll for now since

  • I don’t post that often and can wait a minute for recompilation if/when I have that many posts
  • Hugo does not compile SASS like Jekyll; don’t want to make an asset pipeline or turn to readymade solutions like this
  • It doesn’t do archives like Jekyll. Approaches like these might be creative but… 🤷‍♂️

Hugo is as insanely fast as advertized. I love the section and taxonomy abstractions, myriad content types, and I18n support. I’d use it to build any static website that’s not a blog. For now, Viva Jekyll.

Letters to a Computer

The Des Moines Register on how to send them email in (I’m guessing) the late 80s/early 90s.

An article on how Baud Rate isn’t the same as Bit Rate

Baud rate refers to the number of signal or symbol changes that occur per second. A symbol is one of several voltage, frequency, or phase changes. NRZ binary has two symbols, one for each bit 0 or 1, that represent voltage levels. In this case, the baud or symbol rate is the same as the bit rate.

– Lou Frenzel, Electronic Design, “What’s The Difference Between Bit Rate And Baud Rate?

Via /r/bitcoin

UI Pedantry

Can’t Unsee is “Spot the difference” for UI nerds. 6530. On the “hard” sections, wondered how much the minutiae matter if a user is unable to discern the difference between two comps after a few seconds.

Via Deepu

A Love Letter to the Internet of Old

In an age where we interact primarily with branded and marketed web content, Cameron’s World is a tribute to the lost days of unrefined self-expression on the Internet. This project recalls the visual aesthetics from an era when it was expected that personal spaces would always be under construction.

Numbering from Zero

Dijkstra on why numbering should start from zero.

Numbering is done with natural numbers. Let’s take zero to be the smallest natural number1. For the sequence (2, 3, 4, … ,12), using the convention (2 ≤ n < 13) is appropriate because

  • For a sequence starting with zero, like (0, 1, 2, 3), the left hand condition leaks into unnatural numbers if you use “less than”: (-1 < n).
  • For an empty sequence, the right hand also leaks into the unnatural if you use “less than or equal to”: (n ≤ 0)

And minorly, because these are the true of another convention (1 < n ≤ 12)

  • Difference between bounds (13 - 2 = 11) is the length of the sequence
  • I know that these two sequences are adjacent: (2 ≤ n < 13) and (13 ≤ n < 24)

All that’s prep for:

When dealing with a sequence of length N, the elements of which we wish to distinguish by subscript, the next vexing question is what subscript value to assign to its starting element. Adhering to convention a) yields, when starting with subscript 1, the subscript range 1 ≤ i < N+1; starting with 0, however, gives the nicer range 0 ≤ i < N. So let us let our ordinals start at zero: an element’s ordinal (subscript) equals the number of elements preceding it in the sequence. And the moral of the story is that we had better regard – after all those centuries!2 – zero as a most natural number.

There’s also this little nugget

I think Antony Jay is right when he states: “In corporate religions as in others, the heretic must be cast out not because of the probability that he is wrong but because of the possibility that he is right.”

  1. TIL that this can be so. ↩︎

  2. Don’t know what he means here… ↩︎

Node Modules

For a single project I made the mistake of working on in my Dropbox folder:

Wonder what the downsides are to hardlinking by default. And, fundamentally, why creating an amazing, Python-like standard library is such an intractable problem in the first place.

[. . .] core-js is also utils library, quite a big one honestly! It has so many functions inside I bet a lot of other packages will be using it!

Not really. Only babel-runtime has it in its deps. Oopsie.
And returning to the starting point, cli uses only 3 (trivial) methods from common-tags — stripIndents, stripIndent, oneLine. Oopsie daisy.

In order to use these 3 methods node_modules needs 1826 files. And that’s just 4 of mentioned 976 installed packages.

– Mateusz Morszczyzna, What’s really wrong with node_modules and why this is your fault

🤦‍♂️ The portion of the article that listed functionally similar packages and is-* packages was particularly dismaying. As he points out, there’s a good reason why jQuery and lodash are as immensely popular as they are1.

  1. Was wondering if we’ll ever get back to the magic of hand-crafted web pages and found this article which led me to this modern Geocities clone 💖 ↩︎

It’s what they do at Google

In addition, engineers have commoditized many technical solutions that used to be challenging in the past 15 years. Scaling used to be a tough challenge, not any more for many companies. In fact, part of my daily job is to prevent passionate engineers from reinventing wheels in the name of achieving scalability. It’s not because we don’t need to solve scalability problems, but because the infrastructure is good enough for most of companies. Building and operating so called “big data platform” used to be hard, not that hard any more. Building machine learning pipeline used to be hard, not that hard any more for many companies. Of course, it’s still challenging to build a highly flexible and automated machine learning pipeline with full support of closed feedback loop, but many companies can get by without that level of maturity.

– via Hacker News (emphasis mine)

Linux and Switching

The problem isn’t CPU power. The CPU on any modern PC is going to blow away the processing power of any sort of network switch you’d care to buy except the really high-end ones. (Really high end. So high end that unless you already know them by name you are not going to want to buy them)

Offloading to the GPU would make things worse, not better.

The problem is latency. It takes time for the PC to take the buffer from the NIC, copy it to the to the main memory, process it on the CPU, copy it back down into a buffer, and then push it out to the network. All this copying around takes time. You could have a 30000 GHZ processor and it’s not going to help you out any.

No amount of programming or GPU offloading is going to make your I/O faster or have less latency. This needs to be done in the hardware. PCs are not designed to handle this. They are designed to have huge cache’s were you take a huge amount of data and process it through loops. This is exactly the sort of thing you do NOT want on a switch.

With a switch you want small buffers. You want small buffers optimized to the speed of the networks they are connected to and have the ability to shuffle information from one port to another. You want to get the information in and out as quickly as possible.

That being said I have no doubt that a Linux switch based on commodity hardware would have no problem keeping up with a 1Gb/s or even 10Gb/s network and having performance similar to any typical corporate switch.

The problem then is one of cost, energy, and space. A network switch takes up almost no room on a rack. It uses little electricity and creates little heat compared to a PC-style corporate Linux server. It has lots and lots of ports.

To create a Linux commodity-based switch with 20 or 40 ports the thing is going to be huge, expensive, and hot.

So yes while it can be done it’s not practical.

On using a Linux box as a switch.