Hacker News new | ask | show | jobs
by brigandish 2263 days ago
Isn't everything usually ABC and 123 by default?

I suppose countdowns aren't but there's a clue in the name…

1 comments

Right, priority was 1..5 where 5 was a higher priority. So “order by priority” delivered priority=1 items first, and processed them in that order, which was the opposite of what I wanted.

It was absolutely my mistake, but “order by priority” reads so well in English, so my eye just couldn’t see the mistake.

I mean I’d been programming for decades at that point, I knew the syntax, I know our data model, I stared at the code and I still couldn’t see it. (Eventually I did see it of course..)

Since then I’ve been of the belief it would be better if SQL forced you to put “asc” or “desc” when using “order by”. Then you’d be forced to think about it.

So I was agreeing with the previous poster, who said that defaults aren’t always a good idea.

This is also an example of how difficult naming can be. This is arguably a "ranking" (1=low, 5=high), not a "priority" (1=high, 5=low).
That’s a very good point.

However people say things are “high priority” which, at least to my mind, implies higher numbers, so I don’t think ”priority” is necessarily the wrong term here.

right, and you execute tasks in descending priority order, not just the priority order.
> “order by priority” reads so well in English

I had my suspicions that programming reads very different to native speakers, and I guess here's a case when it's better to have English as a second language: I heard a ding-a-ling in my head immediately upon seeing the absence of ‘desc’.