HNHacker News
TopNewBestAskShowJobs

combatentropy

3,647 karma · joined April 23, 2016

combat@combatentropy.com
submissionscomments
combatentropy··on A Brief History of ClarisWorks (2003)
I used ClarisWorks for school too. It struck me as well made, even though at the time I was uninterested in programming. My friends had Windows, and Microsoft Word struck me as a bloated mess. I suppose my impression was from the speed, orderliness of the menus, and cleanliness of the graphic design.

Also remember when it was replaced by AppleWorks. I didn't like it as much as ClarisWorks, but I still liked it more than Word. The problem with the world is that it just has no taste.

combatentropy··on Mutt email client 25 years old
I've only been running it for about a year, but I simply don't get spam --- perhaps partially because it isn't my main email address.

I went by this article, https://www.c0ffee.net/blog/mail-server-guide/ but I only set up Postfix and the various DNS records (MX, DKIM, etc.). I didn't set up Dovecot because I just use Mutt on the same server. And I haven't bothered to set up any kind of spam filter.

combatentropy··on Mutt email client 25 years old
I sometimes daydream that everyone at work uses Linux in general and a text-based email program in particular. It isn't too farfetched. When email took off, I was in college, and we all used Pine.

Anyway, if you email me, it will arrive on my virtual private server, and I will read it with Mutt.

combatentropy··on Paul Rand's NeXT Logo (2010)
I thought the same thing until I saw it on a Next computer. The colorful little square brings a glint of playful personality to an otherwise-serious-looking black cube.
combatentropy··on Entropy explained, with sheep (2016)
> Survival is the battle against entropy

See my username ;) But my inspiration was from trying to make a difference within corporate culture, not raw survival.

> controlling the chaos that surrounds us, and shaping it into something useful

i.e., work

> In the long run, life will lose.

Unless there is a transcendent being beyond our universe, an explanation believed by many people for why, a long time ago, entropy was microscopic. The article admits it can't come up with a materialistic explanation and ends by calling it a "mystery".

combatentropy··on What's new in PHP 8?
Should a string, when converted to an integer, become 1, not 0? (Unless it is a string of only digits, like "567". Then it should become 567.)

  (bool) 'x'  //  true
  (int) true  //  1
If a string is truthy in a boolean situation, shouldn't it also be truthy in a numeric one?

The types form a hierarchy in my mind, from simple to complex: from boolean to integer, to float, to string, to compound types like arrays and objects. It seems like values should cast up and down the chain uniformly.

combatentropy··on Rob Pike's Rules of Programming (1989)
There is no Rule 6 --- http://doc.cat-v.org/bell_labs/pikestyle
combatentropy··on Rob Pike's Rules of Programming (1989)
PostgreSQL stores it as UTC if the data type is "timestamp with time zone" --- https://www.postgresql.org/docs/current/datatype-datetime.ht...
combatentropy··on Rob Pike's Rules of Programming (1989)
A quote that combines the rules about optimization with the rules about data structures: "NoSQL databases that only have weak consistency are enforcing a broadly applied premature optimization on the entire system." --- Alexander Lloyd, Google

Also in support of Rule 5, see Eric Raymond's treatment of Data-Driven Programming:

"Even the simplest procedural logic is hard for humans to verify, but quite complex data structures are fairly easy to model and reason about. To see this, compare the expressiveness and explanatory power of a diagram of (say) a fifty-node pointer tree with a flowchart of a fifty-line program. Or, compare an array initializer expressing a conversion table with an equivalent switch statement. The difference in transparency and clarity is dramatic. See Rob Pike's Rule 5.

"Data is more tractable than program logic. It follows that where you see a choice between complexity in data structures and complexity in code, choose the former. More: in evolving a design, you should actively seek ways to shift complexity from code to data."

http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id...

http://www.catb.org/~esr/writings/taoup/html/generationchapt...

combatentropy··on Rob Pike's Rules of Programming (1989)
We all start out this way, don't we? I think what drove it out of me was having to maintain. Okay, you wrote this thing, now you need to change the way a few features work and add some others. Especially effective is if you take turns being on call, getting paged in the middle of the night when your multilayer architecture has a hiccup and now you have to troubleshoot it.

I wish there was a quick remedy for such people. But usually they are new, based on what I said. So they should be Junior Developer, not Architect. Sure, you can suggest things, but the answer is nope.

A lot of people, though, may never get much experience supporting their own architectures, because they swoop in, then swoop out, never staying at a job long enough. Or support gets assigned to another group. One thing I like about Agile is that the team that creates the code is the one that supports it.

combatentropy··on In Search of God’s Perfect Proofs
I think the relationship of programmer to program is a good analogy.
combatentropy··on Netflix Seeks Its Own Star Wars, Harry Potter-Esque Movie Franchise
1998-99, there were at least 5 movies about simulations: Dark City, The Truman Show, The Matrix, Existenz, and The Thirteenth Floor.
combatentropy··on Netflix Seeks Its Own Star Wars, Harry Potter-Esque Movie Franchise
> George Lucas created Star Wars [...] we feel like we're the place to take the chance on those types of innovative ideas and filmmakers.

I'm glad he acknowledged this. Great stories don't arise from committees. All of the great ones I can think of came from one or two people. Even so, I did not expect the final trilogy of Star Wars, groupthought up by Disney, to be that incoherent!

combatentropy··on Artificial brains may need sleep too
> The best results came when they used waves of so-called Gaussian noise, which includes a wide range of frequencies and amplitudes.

Yesterday I was listening again to some videos of rain, to help me relax. I know very little about what happens when we sleep or why we dream. But if it is sort of like exposing our brains to soft noise, then that helps me understand why rain relaxes me.

combatentropy··on Cloudflare outage on July 17, 2020
It's seems these major infrastructure outages always are from a configuration change. I remember Google had a catastrophic outage a few years ago, and the postmortem said it all began as a benign configuration update that snowballed worldwide. In fact I tried googling for it and found the postmortem of a more recent outage, also from a configuration change.

Some seasoned sysadmin will say to me, "Of course it's always from a configuration change. What else could it be?" I don't know, it seems like there are other possible causes. But in today's superautomated infrastructures, maybe config files are the last soft spot.

combatentropy··on Space Jam's 1996 website is still alive
Wow, every paragraph has a great story!
combatentropy··on Milton Glaser, designer of ‘I ♥ NY’ logo, has died
I'm curious why so many people say it like this, even out loud. I also hear it with other objects of love, like "I heart pizza", or "I heart walks in the park".

"I heart something" is so awkward it's like you have to deliberately ignore the obvious reading ("I love") and choose "I heart", maybe to be playful. Meanwhile, "I love something" is as old as English. I saw the logo when I was a child and immediately read it as "I love New York".

If it sounds like I'm criticizing you, it's more that I am deeply curious! I feel in the minority, because I hear people pronounce it "heart" more often than "love".

combatentropy··on A little bit of plain JavaScript can do a lot
> I remember way back (when XHTML was still on the table) that innerHTML was effectively deprecated

I had heard that document.write is discouraged but not innerHTML. In fact, browsers have doubled down, by adding insertAdjacentHTML (originally only in Internet Explorer).

> Instead, you were supposed to use the DOM APIs

I tried that in an app. It turned out that IE 6 was faster with innerHTML, like literally 1,000 times faster. This was surprising because I assumed the DOM APIs were closer to the metal. Not so, at least with Internet Explorer. (With Chrome, the DOM APIs and innerHTML were about the same speed).

> standard compliance and future support

It will be supported forever, because browsers refuse to break the web. You can see them saying so when they discuss syntax for new features.

Mozilla's documentation tells you when a feature is deprecated (again, usually for a feature that was experimental and never widespread). It carries no such notice on its page for innerHTML. It does, however, carry a warning: "Warning: If your project is one that will undergo any form of security review, using innerHTML most likely will result in your code being rejected." --- https://developer.mozilla.org/en-US/docs/Web/API/Element/inn...

To me, innerHTML is sometimes useful and no more dangerous than server-side rendering. Rather than deprecating it, I wonder why browser vendors have not added a native escapeHTML function (or even better, a very short syntax) to make innerHTML safer.

combatentropy··on Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming
When people talk about Rust's advantage in safety, is it just the compile-time checks about Ownership? Could not the C compiler be given the same thing, with a flag like "strict mode"?

Sorry if my question is really stupid. My experience has been with scripting languages, not systems programming. But I read the chapter in the Rust Book about Ownership, and I think I get it. In a sense, is not the compiler simply inserting function calls to free() in the right places (and warning you if it can't)? Couldn't this be added to the C compiler? In fact I'm not sure what the difference is from a linter.

The article has the phrase "C/C++ Can’t Be Fixed", so it anticipates my question. But its answer is that programmers either won't remember or won't bother to set their C to "strict mode", run the linter, or whatever, because "static analysis comes with too much overhead: It needs to be wired into the build system. . . . If it’s not on by default it won’t it won't help." But if this is the only argument, it seems weak. I agree that it is more effort, but isn't it much more effort to switch out your entire language and ecosystem?

combatentropy··on Extracting Structured Data from Templatic Documents
This reminds me of some of Sergey Brin's research papers (https://scholar.google.com/scholar?q=sergey+brin), like "What Can You Do with the Web in Your Pocket?" (https://www.cs.princeton.edu/courses/archive/fall02/cs597A/p...)
combatentropy··on How to Write Email with Military Precision
> writing to fast

Writing too fast strikes again!

combatentropy··on How to Write Email with Military Precision
For years I've been following Bottom Line Up Front (BLUF) but I call it the Inverted Pyramid, because I learned it from journalism. Whatever you call it, I wish all followed it.

A lot of people at work, especially leaders, do the opposite: background first. I wonder if they think we'll reject the idea unless they warm us up to it.

combatentropy··on Learn to read Middle English
> What's "schuleth" then? . . . This is a form of "shall, should" but in this context it has its old meaning, now lost, of "owe"

I would not say it is lost. What else does "you should" mean but "you owe"? You can exchange "You should..." for "You ought to..." (ought is a past tense of owe).

combatentropy··on Prowords
Since this is Hacker News, I can only assume that the one who posted this is suggesting that we should have incorporated some of this vocabulary into our network protocols --- which would have been utterly cool.
combatentropy··on Programming is boring art
In all fairness, I led him that way. I called it "extracting configuration from code", which is reminiscent of #3 of the 12-Factor App (https://12factor.net/config).

You can extract config to various degrees. My example is perhaps the mildest: just group it together, near the beginning. You don't need complex frameworks. In fact this technique first caught my attention when I was reading other people's shell scripts.

The next step would be to move the config to its own file. This is very common in Linux. You have some tight binary, that is compiled and hard to change. But then you have config files, often with dozens of options. It's a nice way to do things.

The next step would be to move the config to a different level, no longer in a simple file. This is often either a relational database or environmental variables. Linux commands use environmental variables along with their config files.

For very large systems, this technique is the same in kind, just different in degree. You get fancy specialized systems, like Hashicorp Vault, to store your configuration, at least your secret ones, like passwords and stuff.

combatentropy··on Ask HN: Am I the longest-serving programmer – 57 years and counting?
The industry is backwards. Would you rather have a 25-year-old plumber, architect, photographer, chef, or a 50-year-old one?

Artists get better with age. Programming is an art. All tedious tasks get automated away. All that's left are design decisions. Making good design decisions is what people mean by "taste". Taste gets better with experience.

A young person may have more physical energy, but to paraphrase Steve Jobs, they don't have any taste. Their surplus physical energy could be a liability, as they'll just write more code that's hard to maintain. Of course there are exceptions. Don't discriminate by age in either direction. Ask for experience, and make your final judgment after examining their portfolio (just as you would an architect or photographer), looking for signs of good taste.

Further reading: "Taste for Makers", by Paul Graham, http://www.paulgraham.com/taste.html

combatentropy··on Fuchsia overview
> any improvement that could be added to Fuschia could be added to Linux

Not easily. If Linux has gone down a path far enough, it may be hard to reverse, especially if it is of fundamental design. For example, the separation of kernel space and user space is different. I am not an operating system engineer, but I would bet that certain things would be hard to change --- deep structural decisions mentioned in the article, like:

- the kernel primitives are exposed to applications as object-capabilities

- applications can interact only with the objects to which they have been granted access explicitly

- applications interact with each other and the system using message passing

> use proven ideas

I would say in the realm of software there are still competing ideas, even if you narrow it to the subset of ideas that are good (secure, maintainable, fast, etc.). Linux chose some good ideas, but if you want to try out different ones, you may have to start from a clean slate.

combatentropy··on The Unix Operating System (1982) [video]
featuring Brian Kernighan, Dennis Ritchie, and Ken Thompson.
combatentropy··on Programming is boring art
Comments are harsh on what I took merely as a pedagogical example, but maybe it's because y'all have been burned so many times. I agree with you who advise to resist speculative programming. Don't write it till you need it, since all code incurs a burden of maintenance.

But I would like to address a tangent: extracting configuration from code. Let's take the article's example and change it a little. I'll decompose it, since it already has become a function, but often the first step is just a series of statements. (I will also port it to javascriptish pseudocode, since I don't know Julia.) So this might be your first draft:

  response = HTTP.get('https://www.example.com/');

  if (response.status !== 200) {
     email('someone@example.com', 'something is wrong');
  }
Instead of abstracting this into more general functions, I might simply move the literals to the top of the file:

  url = 'https://www.example.com/';
  ok  =  200;
  to  = 'someone@example.com';
  msg = 'something is wrong';


  response = HTTP.get(url);

  if (response.status !== ok) {
      email(to, msg);
  }
The only reason I know to do this is to maybe make changes easier. Even if you never need to generalize your code to other uses, you may need to update it for reasons outside your control. For example, someone leaves the company, and now you need to email someone-else@example.com. Or marketing changes the URL.

Is there a name for this kind of refactoring?

combatentropy··on Programming is boring art
Paul Graham agrees: http://www.paulgraham.com/taste.html
← PreviousPage 5 of 30Next →