flak rss random

documentation is thoroughly hard

Documentation is good, so therefore more documentation must be better, right? A few examples where things may have gotten out of control.

more...

Posted 18 May 2017 20:24 by tedu Updated: 19 May 2017 02:48
Tagged: openbsd software

meaningful short names

Why don’t unix commands have any vowels in the name? cp and mv are obviously devoweled standins for copy and move. But they’re less intuitive for new users. The user wants to copy a file. Why shouldn’t the name of the command be exactly the operation the user wants to perform?

What exactly does the user want to do? Instead of copying files, maybe I want to link two files. What does that mean? In unix, we have hard links and symbolic links. If I replace the “original” file, do I want the link to refer to the original file or the replacement? Or maybe what I mean by link two files is to combine two object files into an executable. Do we call that loading instead? ln is the name of a command, but link is the name of a concept. And sometimes the concept evolves over time. The linker is called ld because it used to be the loader. (I think.)

grep is a remarkably useful tool, but with a most unintuitive name. Why not call it find like Windows does? I want to find some text, I run find. So obvious. But some users may want to find files in the filesystem, not strings in a file. What command do they run? Probably locate.

There may be a great deal of historical accident in the names of commands (what if the inventors of awk had different initials?), but that doesn’t mean we can’t recognize the value of unique and precise identifiers.

Posted 03 Mar 2017 02:31 by tedu Updated: 14 Jun 2017 22:55
Tagged: rants software

RC40 card cipher

The Solitaire cipher is perhaps the best known encryption algorithm implemented with a deck of cards. Ignoring security, it has a few drawbacks. It’s pretty complicated. I can never quite remember the rules. Sure, with practice it’s possible to memorize, but ideally we want something easy to teach. It’s also pretty slow. Even with practice, the shuffling and cutting manipulations take time.

more...

Posted 10 Feb 2017 14:27 by tedu Updated: 10 Feb 2017 14:27
Tagged: gadget security

to errno or to error

Unlike other languages which have one preferred means of signalling an error, C is a multi error paradigm language. Error handling styles in C can be organized into one of several distinct styles, such as popular or correct. Some examples of each.

more...

Posted 24 Jan 2017 20:52 by tedu Updated: 24 Jan 2017 20:52
Tagged: c programming

tweet compression

Sometimes you’ve got something really important to tweet, but it doesn’t quite fit in 140 characters. There’s several techniques that can help in this situation.

more...

Posted 27 Aug 2016 19:00 by tedu Updated: 19 Aug 2019 04:31
Tagged: javascript language web

top of the market puts

There have been a number of experts warning that the stock market is due for a crash. There’s always people saying that, but it seems to have picked up since the summer. I don’t know anything about this; my crystal ball was stolen by a dark elf. But the possibility of a sharp decline is what makes the rest of this post interesting.

more...

Posted 26 Aug 2016 05:52 by tedu Updated: 26 Aug 2016 07:32
Tagged: business

Lo and Behold

Werner Herzog reflects on the reveries of the connected world. There’s a lot of short sequences here, but not much tying it together.

more...

Posted 25 Aug 2016 01:00 by tedu Updated: 25 Aug 2016 18:04
Tagged: moviereview network web

charge this

The Times asks, Should you charge your phone overnight? The answer is obviously no. I mean, yes. Or, maybe.

As the Times points out, your phone won’t overcharge. No harm there.

But, but, but... all charging “harms” your phone. Which is both alarming and useless. What am I supposed to do? Not charge it? That’s not very useful. But apparently I can charge it if I’m replacing it in two years, which sounds like it has the cause and effect somewhat reversed. Nor does it provide me with a plan if I intend to keep it.

Finally, the article drops a hint that the real issue is that fast charging pushes a lot of current into the battery, which may shorten the lifespan. This makes some sense as I understand battery chemistry. Their suggestion to use a lower rated charger seems pretty weak however. It may work, but it’s haphazard.

Keep in mind that I am not an officially licensed li-ion whisperer.

Modern chargers switch between constant current (when the battery is low) and constant voltage (when the battery is nearing full). Refer to AnandTech charge graph.

If we want to avoid the damaging high current charging, then we should aim to charge our phones frequently, topping them up with low current charging. I believe the Times article misleadingly suggests minimizing the number of charges; i.e., letting it run down and then charging, which would actually result in the most exposure to high current charging.

Posted 24 Aug 2016 00:54 by tedu Updated: 24 Aug 2016 00:56
Tagged: gadget

New Yorker May 16

Another “Innovators Issue”. Fell a little behind in my reading, but this is a good issue with some great pieces.

more...

Posted 22 Aug 2016 04:04 by tedu Updated: 22 Aug 2016 14:33
Tagged: magreview

all that's not golden

Several stories and events recently that in some way relate to backdoors and golden keys and security. Or do they? In a couple cases, I think some of the facts were slightly colored to make for a more exciting narrative. Having decided that golden keys are shitty, that doesn’t imply that all that’s shit is golden. A few different perspectives here, because I think some of the initial hoopla obscured some lessons that even people who don’t like backdoors can learn from.

more...

Posted 18 Aug 2016 18:52 by tedu Updated: 08 Sep 2016 19:47
Tagged: security thoughts