skysight-inc/HackerNews huggingface dataset:
I think this highlights an important nuance to the Don't Repeat Yourself maxim. It's not just about whether two bits of code are similar now. It's about whether, when they change in future, they are likely to change in the same ways. If not, then DRYing up the code now is only making more work for yourself down the line.
It's surprising that Monday was the best day. I'd expect the surgeons and staff to be impaired from weekend activities, and back to normal on Tuesdays. Tuesday was not much different from Monday and may be the wiser choice, in case your surgeon is a hard partier.
Ironically a lot of "puritan" values are now considered "social justice" values.

See eg "shirtgate" where an astronomer was castigated by feminists for wearing a shirt with skimpily clad figures, on the basis that it was offensive to women. Ironically, the shirt had been given to him by a feminist woman friend who thought it was liberating.
> Withdrawal from cigarettes or junk food don’t send you into a 72 hour coma.

I don't see how this is relevant to the question, unless you want to get into whether their burden on the medical system outweighs their right to do what they want with their bodies (but lung cancer/emphezema, diabetes/heart disease, and traumatic injuries from extreme sports would fall into that category as well).

> Smoking and junk food don’t have the huge impacts to how you treat those around you that being drunk all the time does.

We don't lock up sober assholes for being assholes either.

The question is: where does someone's right to do what their brain makes them want to do end? Individual autonomy is a big deal in a free society, as it should be. When you take away a person's freedom to act, I think you take away part of what makes them human.
I’ve usually heard this phenomenon called “incidental duplication,” and it’s something I find myself teaching junior engineers about quite often.

There are a lot of situations where 3-5 lines of many methods follow basically the same pattern, and it can be aggravating to look at. “Don’t repeat yourself!” Right?

So you try to extract that boilerplate into a method, and it’s fine until the very next change. Then you need to start passing options and configuration into your helper method... and before long your helper method is extremely difficult to reason about, because it’s actually handling a dozen cases that are superficially similar but full of important differences in the details.

I encourage my devs to follow a rule of thumb: don’t extract repetitive code right away, try and build the feature you’re working on with the duplication in place first. Let the code go through a few evolutions and waves of change. Then one of two things are likely to happen:

(1) you find that the code doesn’t look so repetitive anymore,

or, (2) you hit a bug where you needed to make the same change to the boilerplate in six places and you missed one.

In scenario 1, you can sigh and say “yeah it turned out to be incidental duplication, it’s not bothering me anymore.” In scenario 2, it’s probably time for a careful refactoring to pull out the bits that have proven to be identical (and, importantly, must be identical across all of the instances of the code).
Well it can't, but it doesn't matter in the way your colleagues thought it would.

Excel is a much better product than Google Sheets, but having the better product doesn't mean having the winning product.
> which argues that we use too many rounds in symmetric constructions: our security margins are too high and don't match any of the best "practical" attacks. We're too paranoid for our own good. He suggests reducing the number of rounds for a number of constructions like AES, SHA-3, Blake2, etc.

This seems a quite dangerous way of thinking. New attacks, methods to attack crypto are discovered regularly. A view years ago people also said SHA-1 will never get broken to the degree it just got broken a recently.

So the only think we can do is to be slightly paranoid, everything else would be strongly negligent.

Especially if we consider how long it often takes in practice to update software and phase out previous encryption and hash methods without having to worry about e.g. downgrade attacks or similar.

Sure software should be possible to be updated asap, but honestly how long will it take until SHA-1 is phased out?

EDIT: Through that also means if you believe you will always be able update the _deployed_ relevant parts of your software ASAP (which can't work for libraries) and you are sure that you will follow the crypto community close enough and you believe some one else does so to if you are unavailable because of sickness, then yes go ahead and use less paranoid/secure crypto.
https://www.cert.ssi.gouv.fr/avis/CERTFR-2020-AVI-018/

https://www.bsi.bund.de/SharedDocs/Warnmeldungen/DE/CB/2019/...
No comment on the Null References, but I will say I love the time-index provided for the video. I wish every video had these!
Hang on. Why is everyone talking about dirty Paris streets and not about the claim that unrealistic expectations can result in literal psychosis?
Surely this kind of mind-body connection would suggest further investigation, inform policy on deceptive advertising, etc.
In my experience, forbidding null refs usually only results in getting null objects instead, such as empty strings or empty collections. Thats not bad, but might not solve such a silent error message, you'll still end up with an empty message in the end. In order to solve it proper, I'm thinking you'd might want to go further and have more expressive type constraints, like Ada subranges.
To be honest I stopped reading after the initial focus on writing vs having a chat with someone.

Maybe that works for some organisations but I'd much rather my team talk through a problem than engage in long protracted email threads.
I hear the argument but taxi drivers were always required to show their real name, so the same should apply to Lyft drivers.

The privacy of the driver is outweighed by the need for the public to feel they will safely be taken to their destination in an enclosed vehicle totally controlled by another party.
And in the other direction, when adding flags etc to a method that was created to reduce duplication, consider if splitting it into two "duplicate" copies or copy it to the call-site requiring the flag isn't the better alternative.
You are completely out of your depth. Please look up the definition of genocide and read up on French history.

All the colonies you are thinking of were established during either the Second Empire or the Third Republic, long after the 1789 revolution and the last of the kings.
He wrote many very interesting and insightful things, but his ego has always been quite big.
I felt it would've been unfair to include KangarooTwelve in that particular bar chart, because at 16 KiB of input it hasn't reached its peak throughput. At the same time, the goal was to focus on more widely used algorithms.
Nope, not if it introduces common customer support backdoors.
I didn’t mean to imply there’s anything novel in my post :-) someone’s gotta beat that drum once in a while.
> A healthy engineering team is constantly building trust. Rewriting your teammate’s code without a discussion is a huge blow to your ability to effectively collaborate on a codebase together.

I'm against the idea that people should be attached to "their" code (that is: the code they wrote). Now I also understand that humans that humans, but the priority should be to make them evolve toward more detachment from their work and acceptance that what they design "can" (actually will) be imperfect, rather than avoiding upsetting them even when it would not be justified to be upset. Plus one essential purpose of source control is to be able to make changes, and revert them if they were "wrong"; or for any other purpose. Maybe propose a patch instead of committing directly, but that's really a cultural matter about how projects are organized.

I don't want to ask of permission for an improvement. If there is a need to have formal authorization of maintainers responsible for parts of the code, they setup just that. Otherwise, I'm certainly going to improve "your" code, in some rare cases without even telling you (that's not a goal in itself to do it behind your back, obviously, and I also value collaboration -- but that should not be a problem). The question that remains is: is it really an improvement. If you are not sure, then maybe don't commit. If you are, do it (following your local rules), and if it ends up being a mistake, yes, it will be reverted, and so what?

You should not take issue of your work being reverted (for good reasons), like other people should not take issue of "their" code being modified. Better ask for forgiveness than permission.

> For example, we later needed many special cases and behaviors for different handles on different shapes. My abstraction would have to become several times more convoluted to afford that, whereas with the original “messy” version such changes stayed easy as cake.

Then re-expand the code later.
No, amdahl's law is (roughly speaking) a limit to how parallel an algorithm can be. Applications (in the sense of web apps) generally have the potential to scale via Gustafson's law, but we are (IMO) largely held back by framework and old ways of programming. https://en.wikipedia.org/wiki/Gustafson's_law
This is completely pointless, but there's so many random things I share a name with, and somehow I've only met a few PEOPLE named Blake in real life.
Especially when they're just average people who happened to get lucky with money.
Very. Back here in reality, we care about performance so much that we do not even close TCP connections needlessly. So we can support thousands of requests per second, not just... one per three seconds?

I can find few better way of discrediting unikernels than to claim this as their killer feature.

(The actual killer feature being their ability to reduce attack surface substantially by simply having fewer syscalls that can be abused.)
> No way in hell Google isn't going to use this for advertisement.

There are ample ones: It's illegal, it's highly unethical, and you wouldn't be able to keep something like that a secret.

> Even if the intentions are benign now, there's no reason to trust they'll be so later, based on Google's track record and the typical tech mindset.

What track record?
Thanks but I’m only helping maintain it. :-) I did co-author a few other projects though.
> I thought the people in Paris were surprisingly nice.

I've had extremes. Either very rude, or unreasonably nice and friendly. Paris has 10 million people around, so there must be some very good people. But the average guy you'll hit on the street is probably going to be a mediocre experience.
Plenty of people have opted out of the horrors of chemotherapy, choosing to die at home in relative comfort.
Taking over accounts is mainly American thing, the rest of the world is using same method to identify yourself to a telecom company - by providing your ID card or passport.
I've always found the https://en.wikipedia.org/wiki/Open%E2%80%93closed_principle, where you derive from classes instead of editing them in-place, sort of appealing for this reason.
This. I started on a 10.5’ board.
Detection Rules Coverage
It does! It's the numerical "null object", just like the empty string and empty collection.
The reason they come up again and again is that it's hard to design an imperative language without them (try, assuming you want to provide generic user-defined data structures that allow for cycles).

As a result, calling them a "mistake" is reasonably dishonest, as it implies there was an obvious, better alternative.
Yes. If extracting and deduplicating is in your toolbox, so should be inlining and duplicating.
I totally agree on this post. Being too zealous about code duplication is counter-productive. Don't be more royalist than the king.
i started just a few years ago in my mid-30s. i'm proficient: i can paddle and catch my own waves, go up and down "the line", i can stay out of the way (very important :) do turns, etc. i moved to the beach though once i knew i was hooked. i go several times a week, sometimes twice a day. there are guys/gals out there that have been doing it their whole life who i would say... very humbly, that ive surpassed. once i moved to the beach i started progressing super fast. i grew up skateboarding a lot, so i think that has something to do w/ it.

however! i once heard an old surfer describe surfing proficiency vs being good w/ an analogy: "you're fluent in the language, but when you talk, we hear the accent." and, like i said, i skateboarded a lot and that immediately makes sense to me. when i see folks skateboard that learned later in life i can immediately recognize it just by the way they push the board, let alone ride it. i'm ok w/ having an accent.
An individual can have an outsized impact while maintaining a low-profile or non-networking approach.
.
.
.

Commodities do not usually exist for the benefit of ultimate producers & consumers.
.
.
.

You can't fix stupid but you can come up with some appropriate workarounds if you put in the effort of long-term repair anyway.
The Food Lab: The Best Way to Grill Sausages (2012)
We're mostly fighting Murphy's Law, not Moore's law. As said below, most problems are so far from being compute/$ or otherwise technically limited and far more about organizational / political issues putting vast inefficiencies into these systems and priorities that fund their creation.
I think there’s a balance. There’s a difference between gradually improving something, or improving it at some point later — and literally rewriting 100% of code someone has just landed over the night.
Cryptographic hash functions can be orders of magnitude slower than functions tuned for hashtables and dictionaries. If you’re using them as hash table indexes, then you have to take the big cryptographically secure number and mod it by a small bucket count - and then you’re going to have collisions. If you don’t salt, then an attacker is going to predict the bucket indexes no matter how strong your hash function is, and since you can’t have that many buckets, they can just brute force to find collisions.

Salting is the way to deal with these issues, and for hash tables it works well even if your hash function isn’t cryptographically secure. Hence, for hash tables, salt+fast hash function should be sufficient.
upm, the Universal Package Manager
Not really and Dan didn't invent React, he is currently on the core team. Just ignore trolls such as GP, it ain't worth it.
Almost everything I work on hasn't been in the main repo for the last 5 years. I work in the hardware PA, and before that Fiber. I mean, it's all mirrored _into_ there, but work happens in separate git repos, using gerrit.

Prior to Fiber, yes, I worked in Google3. I've been @ Google for 8 years.
Came here to say exactly this. I’m waiting for Amazon to deliver the new CPU cooler I ordered today so my i9-9900k can run flat out for longer when building, after I spent so much of yesterday waiting 20 mins for another build when my attempted fixed didn’t pan out. (Though probably more of a reflection on how painful C++ as a language is if you have to touch a common header file).
Do we live in a computer simulation? (2012)
Those are called fuzzy or locality-sensitive hashes; they’re used a lot in image processing for similarity testing, for example. I don’t consider them to be in the same category as normal hashes, though, because fuzzy hashes have vastly different properties.
Yeah, VI locals all call it that and have for a long time. It's hard to imagine anyone passing through to the island wouldn't have heard about the scene there. But who knows. Even when we hear stories from people who claim not to have participated they'll often have stories about seeing very young girls doing stuff like propositioning people. We know from the flight logs of the Lolita Express that young girls were on flights with major personalities who surely must have thought it odd and wondered what underage teen girls were doing on the flights as hostesses.
I mean, it's nice to talk about ideals, but it's also highly unrealistic that people are able to separate the code they write and what is says about them. Especially if you are part of a newly formed team, you must make sure that there is trust, respect, and clear communication, because this is the stage where most misconceptions occur. Upon building a successful foundation, you can test new team dynamics such as changes in communication that tradeoff that initial safety for more efficiency.
On the other hand(and I'm really not trying to excuse this behaviour) some doctors are almost daily in situations where "if I had a little bit more time or did this thing a day earlier maybe the patient would still be alive". If you run into those kinds of situations frequently, then obviously any slowdown(like having to remember or type in a password) is obviously stupid. And only they understand it, no IT employee ever would.
It's still not ideal.

With git's DAG-based "patch model", I think what you'd really want to do is, after making the new branch and cherry-picking the fix, make that new commit a second parent of the original commit (so that it becomes a merge, but its tree doesn't change).

I think that would leave the graph with the best representation of what's going on (ie, the same thing as if you'd made the patch from the merge-base in the first place).

But git's hash-based system for identifying commits won't let you add new parents.
> Being able to reboot not just an application but an entire server in seconds in response to an attack is a killer feature of unikernels.

Rebooting an entire server "in seconds" sounds costly here. Maybe if it was more about some secure service being at risk of attack with backup Unikernels, this would make sense. 1-5 unikernels running on high load? The risk of unavailability is greater.

I'd accept this if it were a nanosecond or picosecond reboot. Seconds is too slow.
As a FB employee, I hear this sometimes - I can't take your point of view as you work at FB, instead of debating the fact straight up. It's just an Ad Hominen attack in a different form.
Gwyneth Paltrow's Vagina Scented Candle
> Why do they need to store so much data in a single DB, and could they use a different approach?

Well, we have examples of the opposite (Amazon uses a multi-repo approach) and my understanding is that it works fine, until it doesn't, when its awful. This often happens when there are security vulnerabilities, and Amazon is forced to, under time pressure, walk their entire dependency graph and pin all dependencies to newer versions, fixing forward as they go.

At the point where you have a lot of code, you only really have two options.
Are you blaming Trump on the trans? That's a funny new perspective!

But joke aside, why would hormones only work in one way?

And why couldn't you say the same about, say acetaminophen? Without a RCT your guess is as good as mine!
This is _so_ true! I remember a few years ago interviewing for a position where the largest supercomputer in the area was being used to run Perl programs. Of course the place I ended up working was running Python at supercomputer scale and running out of I/O bandwidth because of all the naive Python runtime startup crud.
Thanks for the correction. You're right.

I would still place more trust in Consumer Reports than in for-profit review sites, but that trust has declined.
> Firstly, I didn’t talk to the person who wrote it. I rewrote the code and checked it in without their input.

If you want to modify a method that has 10 unique contributors. Do you really need to talk to different 10 people to maintain to make a change? That does not sound very effective.

And, most importantly: when you code as a job, all your deliverables are company's property. They are not yours. The company can do whatever they want with them, they don't need your opinion or approval. If they want to replace every piece of code that you ever submitted with an ASCII clown, then print the source code make a pinata from it, they can do that too if they want.

Secondly: version control. If you want the old version of some code, you can retrieve from version control right? You can leave a comment such as: "for a verbose version of this method, see revision <sha1>".
Stellar Engines
IMO line count is an important metric

if two companies are broadly similar but one gets the job done with 10x less code, they're probably in a better survival position

not all logic should be reusable or super generic, but there's a size level at which avoiding abstractions becomes toxic to further growth

there's a good article floating around somewhere about things you learn at 1k, 10k, 100k-line codebases and how your philosophy changes

with a million caveats, of course, size and maintainability are going to be correlated
> sociology

Fair enough. I guess I should've stopped at saying that a little bit of exposure to both is good, can't hurt. My personal story was to come in for socio (part of political studies) but I left with anthropo as the real eye-opener.

> I earned my doctorate studying World of Warcraft guilds (believe it or not)

I've spent more time than I care to admit playing WoW and other 'persistent' online games in my 20s, but even more time managing organizations therein... (I'm sure you'll agree that "officers", the staff, spend about twice as much time managing than playing ;-) ) So, I guess I can believe it, like, first hand! And kudos, by the way, you have my genuine admiration. Had I continued in social sciences, I would have definitely focused on virtual environments. We need so much more awareness in that regard if we're to massively become real "digital" civilizations.

____

That being said, there's serendipity for me in the turn you took our discussion :)

I'm currently toying (seriously) with the idea of launching a "real world" guild: a 'new'/hybrid type of org that fits somewhere between:

- real medieval guilds (culture centered on a trade, a line of work, set of skills, craftsmanship, etc; and its general interfacing with the rest of the world)

- online modern guilds (organized group, purpose-driven, 'free' and voluntary, etc). Also sort of digging abstract 'dreams' of internet pioneers (the world village, communities..) and taking what fits reality (e.g. looking at the good and bad of open-source).

My project is aimed at developers, software makers; but a deeper goal is to nail (well, explore, experiment, describe) structures, processes, show an idea that others may emulate, in the same or other fields.

Bluntly, I'd love to hear your quick opinion and ask you a few questions maybe. You seem so uniquely qualified!

I haven't drafted much yet (still research/concept), and I'm curious about your very general take on the idea, this elevator pitch; but if you're interested I can give you more details.

I hope this is not intruding on my part, I'd totally understand if you replied with silence for a polite "no".

Best, regardless ;-)
You would be surprised. One of the other criticisms currently is that FB doesnt share data with academics to do research as freely as academics would like.
Did the colleagues code go through code review before it was accepted?

And obviously, there wasn’t a review for the refactored code before check-in.

Use a code review system, would e avoided a lot of this in the first place.
Right now, most organizations (and developers) are focused on developer speed/productivity. As compute resources plateau, some developers will be required to focus on compute efficiency and speed. There will always be a limit to how fast you want your CRUD web app to run vs how much you want to spend on developers, though.