kme + ishard   6

Sorting strings properly is stupidly hard – Daniel Lemire's blog
However, I tried to test out the sorting on fr_ca locale and got the incorrect answer, which I found out was due to incorrect locale settings on Max OS X/BSD. On my machine, fr_FR.UTF-8 collation is linked to la_LN.US-ASCII
sorting  ishard  collation  strings  devel  javascript  python  pitfalls  macos  elcapitan  brokenness 
12 weeks ago by kme
West Bengal name change: This Indian state wants to be at the top of India's alphabetical roll call — Quartz
How to collectively define the citizens of West Bengal—nonetheless the people of the whole nation of India—in a single name is near impossible. To be “Indian” is to speak one of 22 languages, believe in one of six main religions, to eat a multitude of different cuisines, and wear countless different national dresses. A single name for a city, state or country will never encompass the patriotic pride of such a diverse people—especially one chosen to place a people at the top of an alphabetical roll call.
naming  ishard  india  geopolitics 
september 2016 by kme
What’s in a name? | Jon Skeet's coding blog
Conclusion

You’ll probably be unsurprised to hear that I don’t have a recipe for coming up with good names. However, in thinking about naming I’ve at least worked out a few points to think about:

* Context is important: how discoverable does this need to be? Is accuracy more important than brevity? Do you have any example uses (e.g. through tests) which can help to see whether the code feels right or not?

* Think of your audience. How familiar will they be with the rest of the code you’re writing? Are they likely to have a background in other areas of computer science where you could steal terminology? Can you make your name consistent with other common frameworks they’re likely to use? The reverse is true too: are you reusing a familiar name for a different concept, which could confuse readers?

* Work out the information the name is trying to convey. For types, this includes working out how it participates in inheritance. Is it trying to advertise capabilities or restrictions?

* Is it possible to make correct code look correct, and buggy code look wrong? This is rarely feasible, but it’s one of the main attractions of “Plus” in the benchmark case. (I believe this is one of the main selling points of true Hungarian Notation for variable naming, by the way. I’m not generally a fan, but I like this aspect.)
cs  programming  bestpractices  naming  ishard 
november 2014 by kme

Copy this bookmark:



description:


tags: