skysight-inc/HackerNews huggingface dataset:
While it's true that "measure everything" is a good ideal to aim for, I think this article also ends up demonstrating why that's actually hard in practice. One of the reasons it is hard is that "the right datastructure for the job" often depends very much on the details of "the job", including things like the expected distribution of inputs and also on what "right" means for the particular job (e.g. do we prefer to get the best possible average times or to avoid bad worst case times in favour of worse averages).

The first example raises as many questions as it answers. In practice I'd consider using a sorted vector with binary search lookup over a hash map in situations where key insertion / deletion either happens entirely up front or is very infrequent relative to lookup. The benchmark here does have all insertions upfront but doesn't test a sorted vector with binary search. The problem description suggests that insertions and deletions will happen for the real use case however, though we don't really know with what relative frequencies.

If we were to use a sorted vector, performance in the use case described would be affected by the size of the cached data if the data was stored 'inline' (as a vector<pair<key, value>>) and if it was stored elsewhere would depend on how we accessed it after finding the key. The best choice there would in turn depend on the relative frequencies and distribution of insertions and deletions and the percentage of cache hits.

In practice I think simple synthetic benchmarks like this end up being of limited value. Usually you're better off implementing something simple with reasonable theoretical performance based on your expectations of the distribution of data you'll see, then profiling / benchmarking with representative data (ideally captured real world data) once you have something working. Making guesses / approximations up front about the data distribution you'll see in practice can be just as misleading as relying on your intuitions about performance without measuring.

Sometimes you have a good understanding of the data you'll have to deal with up front (or even have the data available for testing), in which case you may be able to do a better job of building meaningful benchmarks before starting a full implementation, but in my experience that's relatively rare (though in other domains it may be more common).
There's zepto.js, which is supposed to be a drop-in replacement for jQuery. Not sure how it fares wrt Bootstrap, though.
Explain? I'm not sure whats so bad about that.
I've used a transport for a while, but I've never successfully done a file transfer using one. Voice/video over transports is going to be even harder to do. I think that makes it a dead-end for most people.

Trust is also a difficult problem with transports, as they often need to store your passwords in plain. A single server storing your Facebook, Google, Twitter and Microsoft passwords just does not sound like a great idea to me.
Note that work is being done to give `NodeList`s the `Symbol.iterator` property so in new browsers it's trivial to use the native DOM with `for(let x of nodeList)` loops making our lives easier.

This will make our lives easier :)
It would have been interesting to look at the world in general and common factors between countries with drops in crime. The UK has had a similar drop in crime, that many attributed to lead being removed from petrol. http://www.bbc.co.uk/news/magazine-27067615

Car crime reduction is definitely a technology issue. Basically a car below a certain age is impossible to jack.

It would be interesting to see how much electronic fraud has gone up. With the population living longer and dementia on the rise, lottery fraud is an easy way to relieve vulnerable old people of their money. With the operations working out of different countries, prosecution is so much harder.
IP options were not an option, unfortunately.

One of the many studies: http://www.eecs.berkeley.edu/Pubs/TechRpts/2005/EECS-2005-24...
Test domain variations to detect typo squatting, phishing, corporate espionage
Kentico is nice and enterprisey and should please your corporate overlords.
In very basic terms - one of the biggest boons of jQuery were patching over browser incompatibilities. The tradeoff was an extra library being downloaded and a small performance trade-off (in certain scenarios).

In 2015 most browsers are in much better shape than they were in, say, 2007. A lot of people are mostly targeting users who use up-to-date, standards compliant browsers. They are also often targeting people who use mobiles, which are (for a couple of reasons) much more sensitive to poor JS performance than desktops, and also see a more tangible benefit from small page sizes.

Another advantage to jQuery was making complex JS operations very simple. Modern JavaScript has actually made life much easier[1], meaning that it's often only a little more work to use vanilla Javascript.

[1]: http://youmightnotneedjquery.com/
Author here. It was not written back then :) However it was used so much Rob decided to write a tool to auto generate the String method. So it's now very easy to generate and and it's also uses a much more efficient algorithm to return the string :)
Humans v Algorithms: The recommendations problem
I don't get this sentence:

"And in the 2000s, when everyone under 30 had grown up exposed to less lead, the lead theory helps even less."

Did crime go back up in the 2000s? I thought it was still declining?

Also I'm sure I've seen reports that looked at exactly when the decline happened between states and countries that removed lead from their cars at different times, and it supported there being some effect. In general I find many sociological studies seem a bit ridiculous when they don't bother to compare across countries, e.g. this survey indicates that mass incarceration probably helped, yet no other nation followed the US lead, and saw a similar fall in crime.
Why would you punish yourself with various *BSDs when you can have OpenRC and more advanced ports on Gentoo? Do people really associate systemd, Gnome and other nuisances with Linux?
Compare Boolean Blindness (https://existentialtype.wordpress.com/2011/03/15/boolean-bli...).
Let’s Build a Simple Interpreter, Part 1
Version control systems and transactional databases are built over atomic operations. Transactions in particular refer to having multiple operations that either succeed or fail all at once, making in essence atomic operations composable (they normally aren't).

Editing a file and saving it multiple times is not an atomic operation, but reading a file can be, so having the user issue a reload command only after he's finished editing a file is an entirely reasonable approach that has been used in Linux since forever and it only shares some basic building blocks with version control or transactions, but there's nothing fancy about the approach. Fancy and very error-prone would be to apply configuration changes automatically, which is what the article seems to suggest.

In other words the joke is lame :-P
He describes them mostly in present-tense terms, and my reading of the point about slavery is that it's a past problem with effects persisting into the present.

And FWIW I wouldn't say that they have mostly been fixed now. It's true that racism's got a lot better, but the US is still very individualistic (for good and/or ill), there are still big racial differences in prosperity (whatever the causes), and the US still puts an awful lot of people in prison.
You're right that your (very contrived) examples are different. But if anybody on my team writes code like this, it doesn't pass code review.
100% in agreement with you. I can't remember the last time I needed to add a time with more granularity than 5 minutes. And the iOS date picker actually [does allow for custom granularity](https://developer.apple.com/library/ios/documentation/UIKit/...) up to 30 minutes.

But I guess there is no easy way to accommodate for both those that do need 1-minute intervals and those who would rather have 5-minute intervals (without adding yet another UI element or yet another setting to toggle).
If you skim it it might look like a null is getting passed along when it actually isn't.

Maybe op misread the code?
Of course you're sending all this information to Google now. Are there any offline translators that are advanced enough to be used for something like this? I imagine most just naively map words 1:1 which wouldn't do much good here.
Everon Clarke: Music
But I must say that I don't really like the list comprehensions syntax in JS.It leaves a lot to be desired.
Standardization Through Containerization on OpenShift 3
They aren't needed at all. Semicolons in JS are optional.

Which becomes really annoying if you just want to quickly concatenate a few files together.

Sure, it's something that you can fix yourself; I'd consider it a common courtesy to include at least one, though.
Spotify Rewind: What you’d be jamming to if you lived in another decade
> In Germany old coal plants that were due to be decommissioned are now still running because nuclear plants are being switched off instead.

As far as I know that was one of the fears stated, but never actually happened. Do you have any sources stating that coal plants meant to be decomissioned now will run longer?
Hey, as long as people agree with you and don't stray outside the HN filter bubble, they'll be fine. I'm sure about that.
Quote from OA

"The ThinkPads, which run on Intel Pentium M single core, 32-bit processors and hold less than 2 Gigabytes of RAM, were state-of-the-art 10 years ago but are far outdated by today's standards."

What OS would you suggest as an alternative? Just in case you meant OpenBSD or something...
Definitely disagree with that. I've been using some form of a Linux based OS since 1998. Now i'm finally starting to feel like this is #mylinux.
Hero purchases are not cosmetic, neither is the grind to level 30 so you can use full rune pages (basicly minor buffs to a collection of stats). It is inaccurate to portray these things as cosmetic.

And yes, I'm sure you can 'have fun anyways' and a host of other standard pay to win excuses, but the fact remains its an element you pay for that makes you more competitive, and not simply cosmetic.
Only if your compiler ain't smart enough.

Yes, for some compilers and interpreters performance considerations will force you to write less than readable code.
Well said. This should be a blog post.
I assume the next version of systemd will include git.

Actually, it's not that bad an idea:

cd /home/efaref/config/servername
vim blahd.service
git commit -m "Update blahd service file to increase widget count"
git push live master

Then have something else watching the master branch of the live repo do a git pull, systemctl daemon-reload. It doesn't even have to live on the same server. If one of the config files is a puppet script, you can maintain everything.
That annecdote just perfectly describes the pandora's box of turing-complete document formatting languages: Ultimately, you will be faced with the undecidability of the Halting Problem [1] :)

[1] https://en.wikipedia.org/wiki/Halting_problem
wrap elements in a node list

This is not correct. You may say that it wraps or outputs elements in a node list like object but it is not the real deal. If you examine the emitted jQuery objects using instanceof or any other method, you'd see that they are not related to NodeList in any way. They're just generic objects of Object type.
I would add that a lot of the time, your browser-set is very small. For mobile apps, many of which use web views for at least some functionality, you're writing to one or two versions of WebKit only.
Bitcoin Comic Book: The Hunt for Satoshi Nakamoto
Reading a file is not even atomic - you can race with concurrent writes.

The only safe way to update a config file of a running service is with POSIX atomic rename, and most editors don't do that by default.
something like Firefox Hello?
A double tap on the minute picker switches between 1- and 5-minute increments, afaik.
Yes, and no.

#3 - ("T{A:1, B:2} is better than T{1, 2}") - usually yes, and you'd want to write it multi-line for readability etc (see #4); but there are times, when you exactly want to benefit from the fact, that T{1, 2} is verified for completeness. And sometimes it can read better in table tests. (Sometimes. Only sometimes.)

#5 - as others said already, you can be smart and spare yourself some dumb work here and use golang.org/x/tools/cmd/stringer + go generate.

#6 - even better: start from 0, and make sure the 0 value is correct as the default value for unitialized variable/field! E.g.:

const (
Stopped State = iota
Running
Rebooting
Terminated
)
// That said, this is assuming the "Stopped" can also mean "pre-running".
// Otherwise, add a named "Uninitialized" state, or something.

#7 - I believe sometimes yes, sometimes not. Especially in longer functions, for the sake of "no surprises", it might be easier for readers to just keep multiple boring (read: regular) "return 0, err" blocks, and final "return x, nil". Also, it's then slightly easier to add more code to such a function (in growing codebase), and/or refactor it. Still, for cases when this results in a concise one-liner, totally yes!

#9 - as Author notes at the end, "This approach has the disadvantage that it pushes out the indentation and makes it harder to read. Again seek always the simplest solution." In my opinion, nice trick to know, but usually a "x := NewContext(...); defer x.Close()" or similar is the standard idiom.

NOTE: Especially for locks, I'd say you won't be adding anything to the block in future (see also: YAGNI). On the contrary, you might actually want to change it to a RWLock at some point, and then modify only some of the uses, and then the func would actually make it more annoying.

#10 - I'd say, only when you need it. If you don't need the lock, just use the map. If you need the lock... usually, I'd think you probably already have some higher level meaning for the "map", so I'd suggest to already wrap it in a proper type name & higher-level interface. "type FooRegistry { ... }; func (r * FooRegistry) Register(...)" etc. (And, actually, probably don't add the Delete() yet, until you really need it.) And probably you already have more complexity at this point that you'll want to nicely encapsulate in those funcs.

That said, all of the above is just my subjective opinion, too.

"#11" - By the way: if you're able to force yourself to use vim, absolutely have a look at the Author's https://github.com/fatih/vim-go plugin. Especially with full oracle support, it's a killer.
New trend? It was a new trend in 2011. Jquery isn't needed anymore with HTML5 browsers, all the useful API have been added with native speed advantage. If you still have to support IE8 than Jquery is great.
systemctl list-dependencies
Well, the thing with jQuery is that if you use a CDN to get it from, then it is a very high chance that the client already has the library cached, so the bandwidth problem is actually not that much of a problem now.
The systemd war is probably the best thing that could have happened to ensure widespread adoption of systemd. It allowed the supporters to lump anyone with any concerns or objections in with the frothing-at-the-mouth haters, and completely ignore them.

I don't hate systemd. I like what it's trying to do, and I don't hate the big-picture implementation either. But I, and many others, have a bunch of concerns around some specific details of the system, that got ignored and swept under the rug in the tide of vitriol between the two sides of the "war".

If the discussion had been more civil, maybe the more rational objections might have got heard, and we might have been able to pressure Lennart and Kay into not rolling their own, un-reviewed, crypto for journald[0]. We might have been able to avoid some of the feature-creep[1] that seems to have grown out of a NIH-mentality, and a better relationship with the community might have made the core developers more willing to play nicely with others[2][3].

0: http://lwn.net/Articles/512895/
1: http://www.freedesktop.org/software/systemd/man/systemd-reso...
2: https://bugs.freedesktop.org/show_bug.cgi?id=76935
3: https://bugzilla.redhat.com/show_bug.cgi?id=1116651
The "back to their roots" thing inspired this useful reference website: http://standardjavascript.info
Suppose you have a network with a hundred devices and an addressing scheme that allows 256. You add an extension such that you can use 65536 addresses, and add another 150 devices. Now you have six addresses left under the old scheme (and lots under the new).

But do you have a way to discover whether any of the first hundred devices break soon? Or even the 150 new devices? You could add a device on a new-only address before you run completely out of the old-compatible addresses, but that won't test completely. There might still be devices that will connect, but log the connections improperly, or have a buffer overrun and crash randomly, or, or, or. There might be software on a device that supports only old addresses, even though the device itself supports the extension scheme.

If the network is a big one, where different parties own and operate the devices, then you may well be completely unable to test whether the extension scheme is universally supported. Before the day when you run completely out of unextended addresses, that is.

Contrast this with a dualstack approach, where you can make a list at any time: THESE devices are on v4 only and will be a problem when v4 runs out, THOSE OTHERS are on v4+v6.
Actually semicolons are necessary. For example, try writing a rather simple script wrapped and stored in a Chrome bookmarklet without inserting semicolons and see your 100% working script crumbles under the weight of all those unexpected exceptions.
Shameless self promotion for something I threw together ages ago and may be implemented in a better way these days. https://github.com/matt1/doc.js

So it uses "doc" instead of "$" but feel free to fork :-)
funny! I had the same idea a few months ago, 1 extra feature: .off binding to removeEventListener ;)

https://gist.github.com/vectorsize/feda8ac1ebc889c33b6f

not as tested as yours…
That temperature made me think that humans could survive there if only they were sheltered from the vacuum and radiation of space.

I expected the temperature to be much lower, could this temperature be on the sunny side?
In the first code block (how to install) you have the "pretty" (”) quote style rather than just ".
area rendered uninhabitable/unusable for hydro power is larger

That can be true of reservoirs (Lake Mead is huge) but isn't necessarily. UK's largest reservoir is https://en.wikipedia.org/wiki/Kielder_Water at a mere 2 miles by <6 miles, supporting a piddly 6MW (yes, megawatts not gigawatts, I had to double check that). But that's subject to planning permission in a way that radioactive exclusion zones aren't. The UK suffered from Chernobyl fallout for years: http://www.telegraph.co.uk/news/uknews/1514492/20-years-on-B...

It's not that nuclear power is bad on average, it's just that the worst case scenarios affect potentially huge areas.
Except that's a really serious felony far and above other statistics fiddling, Baltimore at its worst didn't go that far - you're making yourself an accessory to murder after the fact.
Not only would you have Federal authorities getting interested quickly but you have pesky family members raising queries about how their loved one shot themselves to death 34 times on a street corner.

Even in the darkest days of Baltimore I don't think there were allegations of homicides being declared as suicides.
Oracle Proposes G1 as the Default Garbage Collector for Java 9
Commit comment "facebook: prevent potential memory leak "
That's true, that's why I said that it "can be". And if you have a special edit command, like "systemctl edit", then it can take care of the details for you, which is I presume the reason for its existence (much like visudo).
OK, but what's the relevance to Schmidhuber?
I think booleans (flags) are unavoidable at times. Consider a case where you want a flag to switch verbose logging on and off selectively. Writing an enum is a viable solution, but heavy weight nonetheless compared to the primitive boolean-flag based approach.

I agree with the author that with flags in fn-signature, the code becomes tough to reason about at the call-site; but a preferred solution, IMO, is to use "named arguments" or "labeled arguments" in the languages that allow them and/or write proper doc-strings in languages that don't.

For instance in OCaml you'd do (note: specifying types is optional):

let calc_formula (a :int) (b :int) ~(is_gain :bool) :float =
if is_gain then
(* something slightly different *)

(* common stuff *)

You'd call the above as:

calc_formula 10 20 ~is_gain:true

Optional arguments allow for a terser call-site syntax at the cost of implicit behaviour:

let calc_formula ?(is_gain=true) a b = ...

You could then call the above fn:

calc_formula 10 20
calc_formula 10 20 ~is_gain:false
Also worth mentioning that Python 3 supports keyword only parameters, which enforce this calling styling http://blog.gahooa.com/2009/12/08/python-has-keyword-only-pa... e.g.

def calc_formula(a, b, *, is_gain=False):
...
Zepto is more of a "provide the jquery interface you're used to" (and that people often find easier, probably by habit) for modern browsers without all the added compatibility in jquery. I don't like the way they present themselves (or at least did in the early days) but I believe they have a place.
Curate your portfolio, show only your best work.

The best case would be to have experience, without that you need a portfolio. But as you have seen, the portfolio is only to get you through the filter to an interview seat. Then it's up to you to sell yourself and your skills.
> So tell me. Why are you opposed to IPv6?

I'm very concerned about implications for anonymity. If every device has a unique IPv6 address, then just one leak can compromise all other anonymized connections.
I've started a simular project myself recently, I check on various parameters (reading level score, words per sentence, syllables per word, sentences per paragraph, average word length, average syllable count) and calculate the distance between 2 texts / authors using a simple euclidean distance.

I started out with the code provided on https://github.com/mac389/ToxTweet/blob/master/textanalyzer....
I use it in a private project, but the results are promising!
Even simpler: Just use a const variable instead of a constant literal in the caller code:

const bool useWayA = true;
int result = foo(a, b, useWayA);

instead of

int result = foo(a, b, true);
Would be nice to have more detail on tyum, https://github.com/vmware/photon/blob/master/docs/tyum.md

"a new, open-source, yum-compatible package manager that will help make the system as small as possible, but preserve the robust yum package management capabilities."
I feel your pain.

For me, as somebody that learned English mostly reading, to know how to spell a word is easy but I never know if I am saying it "properly" (whatever it means in this crazy language).

I think the opposite is true for the native speakers: they started learning to speak and then they have to learn how to spell.

I used to joke that learning English is like learning Japanese; you have to learn two languages, oral and written.
>> Tries to play it cool by wrecking jQuery?

> not sure exactly how he's "wrecking jQuery"

The grandparent is misguided, but I believe they mean using '$' as the QSA. The grandparent probably uses script tags and globals in which case there would be a conflict if a script tag library requires window.$.

JS modules should var $ = require('jquery') (or equivalent) and then use the $ in their local scope if they need jquery.
How to Not Be Awkward on the Phone and Get What You Called For
If only the operating system maintained a tree-structured key-value configuration store with atomic updates, like the Windows registry.

(Even I'm not sure if this is sarcasm any more)