skysight-inc/HackerNews huggingface dataset:
This is sound advice for sure, and I think it applies much more broadly (or do I mean deeply?) than just for databases.

For instance, one micro-application of it that makes a lot fo sense to me is the const-ness of variables in languages like C. Since a normal variable can be overwritten, and that affects the use and semantics of that variable, marking them as const whenever possible really helps in my opinion.

For instance, take this micro-snippet of code from Redis [1]:

int time_independent_strcmp(char *a, char *b) {
char bufa[CONFIG_AUTHPASS_MAX_LEN], bufb[CONFIG_AUTHPASS_MAX_LEN];
/* The above two strlen perform len(a) + len(b) operations where either
* a or b are fixed (our password) length, and the difference is only
* relative to the length of the user provided string, so no information
* leak is possible in the following two lines of code. */
unsigned int alen = strlen(a);
unsigned int blen = strlen(b);
unsigned int j;
int diff = 0;

Here, it seems quite important that the values of 'alen' and 'blen' do not change during the execution of the function, since it's iterating over them. The 'diff' variable on the other hand is intended to change as a function of all the characters in both strings, that's the whole purpose of the function.

So, I think the middle two lines should be:

const size_t alen = strlen(a);
const size_t blen = strlen(b);

That "locks" the values in, so you know that for the rest of the function at least these two values stay the same. Since changing either length mid-function would represent an invalid state, I think this is close to the OP's point.

Also please note that I have massive amounts of respect for Redis and Antirez, I'm not trying to say that the code is bad or anything, it was simply the first file in the first high-profile open source project that came to mind. Obviously this code works and has probably been more tested than most things I've written, again I'm NOT trying to somehow paint that program(mer) in a bad light.

Btw, changing the type (to me) to size_t is also an obvious, free, improvement since it frees the reader from having to worry about why the type was unsigned int to begin with. Also 'int' can be less wide than 'size_t', which again is probably not a problem in practice since the CONFIG_AUTHPASS_MAX_LEN is probably always going to be even less, but still. It's pointless complexity that triggers anxiety in people like me. :)

[1]: https://github.com/redis/redis/blob/unstable/src/acl.c
Are we pretending that we, as devs, have much say in this? If our management says they want a features that’s going to take 3000 lines of code, you don’t have a choice. It’s nice if you’re somewhere where you can roll out feature mvps, but in some environments you don’t get that luxury.

And some features are just monsters, either through the nature of the feature or architectural choices that were made before it was conceived.
I'm getting single digits from Finland:

$ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: icmp_seq=0 ttl=58 time=3.766 ms
64 bytes from 1.1.1.1: icmp_seq=1 ttl=58 time=4.120 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=58 time=4.636 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=58 time=3.587 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=58 time=5.370 ms
64 bytes from 1.1.1.1: icmp_seq=5 ttl=58 time=3.286 ms
64 bytes from 1.1.1.1: icmp_seq=6 ttl=58 time=4.084 ms
64 bytes from 1.1.1.1: icmp_seq=7 ttl=58 time=3.766 ms
64 bytes from 1.1.1.1: icmp_seq=8 ttl=58 time=3.548 ms
64 bytes from 1.1.1.1: icmp_seq=9 ttl=58 time=6.760 ms
64 bytes from 1.1.1.1: icmp_seq=10 ttl=58 time=3.667 ms
^C
--- 1.1.1.1 ping statistics ---
11 packets transmitted, 11 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 3.286/4.235/6.760/0.973 ms

And this is on wifi.
> Not all bugs can be reproduced by an automated test

While that may be true, I'd say in this case, order-dependent tests are evil. This case study pretty much fits the definition -- the test result changes depending on what other tests are run before it (due to shared state across tests). It certainly is possible to write automated tests for this -- reset that state to its default before each test!

One thing that Google recently (in the past year or so) added to its CI setup is a job that goes through periodically and randomizes the order in which tests are run, thereby increasing the chance order-dependent tests are caught. (Early on, I remember being annoyed by all the triggers due to floating point error accumulation in a monitoring library -- do I really care about an error of 1e-10 when my noise is >10?)

That's a long-winded way of saying that it's also possible to catch order-dependent tests by shuffling the order in which they run, although built-in support may vary depending on your testing framework. (from a brief search, it looks like rspec and junit both support randomization; xunit forces it).

That said, I absolutely agree with the other conclusions, especially that binary search for debugging is immensely useful (even when dealing with Google-scale tens of thousands of unrelated commits due to monorepo), and definitely empathize with debugging often taking much longer than the bugfix.
the $415m is kind of a slap on the wrist, the amount of benefit gained by those companies is probably a lot higher.
I didn’t give the app any location permissions during setup, IIRC.

I was setting up the printer over WiFi, so that WiFi setup functionality didn’t bother me.

I assume you could avoid the app by plugging the printer with a USB cable, though I didn’t try.
I have it build for it, but I didn't manage to get everything run properly on it though.
THe only other report I can find is from the BBC:

"It was caused by some data files reporting positive test results exceeding the maximum file size."

https://www.bbc.co.uk/news/uk-54412581

Still not too clear.
"Das Internet ist für uns alle Neuland" as Merkel put it in 2013.

In general, Germany is very conservative and unwilling to change, but in recent years I think the digitalisation has started to take off and get some more strategic support from the government (at least 25 years too late, but anyhow).

On the bright side, Berlin being so cheap for a long time and having such a great cultural life has enabled it to become one of the better start-up scenes in Europe, and I do think it will continue to grow in importance. Besides the 'native' start-ups, Amazon is expanding heavily, Tesla is opening up a factory and Google seem to slowly be increasing their presence, etc...
There is a European banking regulation mandating 2FA. Apps are starting to be mandatory because they generate the OTP or authorize access: start logging in in the browser on the computer and authorize the access with a fingerprint in the app.

https://en.wikipedia.org/wiki/Strong_customer_authentication
I wouldn't dare to call some one with an income of 60$ per month not poor...
Also because the F1 audience is strongly concentrated in Europe, where Honda's market share is miniscule. Contrasted with Indycar, which is US-based, where Honda has a much larger presence.
Very interesting!

In the context of C++ some of us have been calling these programming/design principles "Value Oriented Design". Some talks on the topic:

- Most Valuable Values (Juan Pedro Bolívar) https://www.youtube.com/watch?v=_oBx_NbLghY

- Squaring the circle, value oriented design in an object oriented system (Juanpe) https://www.youtube.com/watch?v=e2-FRFEx8CA

- Objects vs Values: Value Oriented Programming in an Object Oriented World (Tony van Eerd) https://www.youtube.com/watch?v=2JGH_SWURrI
If you think that non-experts can't make a judgement about food safety that, while not being perfect, is still useful, then I don't think we will agree about much.
Whats the general opinion for using Maps instead of Structs/Simple Objects for the data containers in languages that allow for either?
Regulate as utilities/infrastructure. Nobody likes the Ma Bell type of anti-trust because it feels like infringing on private property rights but regulating as utility or infrastructure is much widely accepted and palatable. However if you have poor management then you end up in the P&G situation with blame passing from one generation of management to another and no real improvements.
UK loses 16,000 Covid-19 cases due to Excel spreadsheet snafu
> One could argue that the complexity of the system where code and data are mixed is due to a bad design and data an experienced OO developer would have designed a simpler system, leveraging smart design patterns.

Indeed he (or she) would have made use of traits/protocols/categories/whatever, to separate behavior from data, while keeping the design extensible (via polymorphism).

This is something I usually find in OOP critics, too much focus on class driven implementations, without spending too much on the other parts of the toolbox.
Gatsby was amazing for getting a landing page with a blog off the ground. It's much less compelling as we expand what we want our landing page to do .
But doesn't that assume that you based your larger feature on the local branch, instead of the squashed public version? If you wanted to build on the previous commit, why wouldn't you build on the squashed version?
Overdue books returned to British library 48 years later
Amazon is also a publisher. Many books I’ve read have been self-published by authors via Amazon’s system.
I think these businesses are impossible to scale because of the trust issue. You can pay someone a decent wage to empty the machines but you lose all your profits. Or you pay them rock bottom to drive around with thousands of your dollars in cash and merchandise. Then they rip you off in various plausibly deniable ways.
"Just why is Silicon Valley so successful?" asks a VC as they fund yet another startup within an Uber ride of Sand Hills Road.
.tk TLD
Announcements of the 2020 Nobel Prizes
But if it's CG cat then it's not a real cat, hence not "ground truth".
Pinning to hardware threads is most certainly not "always" better with fibers. I can say with certainty after very thorough performance testing across dozens of architectures and dozens of workloads. The difference can be dramatic and it's difficult to determine in advance which will.be faster (heuristics are necessary).
In NY you’d have to deal with the mob to break into the business at all.
I think DOD of games is only tangentially related to this post.

https://en.wikipedia.org/wiki/Data-oriented_design
> You ignored the entire premise.

Yeah, seems so. I've re-read the original message now.

Here are two thoughts for your consideration:

- This is a discussion about FLOSS projects' lives and their maintainers' experiences. Given that your approach is an outlier, your observations don't have a lot of relevance to an average FLOSS project. Nor, as a consequence, does the opinion of "who owes who".

- Consider, in abstract, two projects. One has only bug reports from actual, motivated users. Another has 10% of bug reports from its users and 90% of "drive-by" bug reports. Starting with a certain size, I think you can imagine how the second project might have the maintainer overwhelmed, unmotivated, and/or spending a lot of time on code that is almost never run in production.

Software is not math; there are always parts that are more used, and always some bugs that are ignored because they're non-trivial to fix, and the tradeoffs are not worth the developer's time. Unless you're DJB, I guess.
Counting to a Billion
Track limits tend to vary from ciruit to circuit (or even corner to corner). The race director publishes the "rules" for a given weekend, defining the track limits for the event.
Why is easy - because corporations love them. As for the “how”, that’s also pretty simple. Enough money applied to lawyers who argue for the corporation’s side in contract disputes, enough to set precedent.
LUKS is capable of using AES-NI, and most CPUs are faster at AES-NI than two-lane NVMe drives at delivering that data. It should be absolutely no problem with SATA.
and not only that, but they do impose limits on how much they can use at each stage. I know for example that the computing power for the algorithms that generate the best shape for the best air flow are all equal among teams.
I was only citing it so that you would be aware of where people are getting their misinformation so you could fix it with your superior information.
Springer Released 65 Free Machine Learning, CS, Data Science, Web Dev Books
Seems like other (slightly) more reputable sources are now reporting that it's Excel: https://www.standard.co.uk/news/uk/covid-testing-technical-i...
A Telegraph article mentions a Press Association report.
Well, to be honest, some of my work is actually engineering, but I feel like most of it isn't, and by most of it I mean things such as: adding small features, finding bugs, fixing bugs, dealing with users.

To be clear: a craft is not a "lesser job" than engineering and very often requires just as much ingenuity. My main goal with writing the article is to keep myself honest about what my work is about most of the time and not to think too highly of myself.

Are you absolutely sure that most of your time is spent analyzing and designing and not implementing or doing routine maintenance?
The store does, but not all apps require it and can be sideloaded.

Assume banking apps do tho
"Regulation", "NIMBYism" and "not a normal market" (it is a typical market, for assets --- the confusion is thinking that housing/real estate behave as supply-elastic commodities) generally are behaviours resulting from the dynamics I've described.

Of the various corrective measures, a land value tax (tax on the unimproved value of property) is likely the most widely known, understood, and accepted by economists. Other issues are more difficult to address (see e.g., Mancur Olsen's Logic of Collective Action), but also arise and create dysfunctions through economic logic giving rise to pathologies.

A reading of Adam Smith's sections on prices of various economic products and services suggests a set of differentiable behaviours by types:

1. Commodity goods.

2. Labour wages and services. Extended to include pleasantness, skill, training, constancy, success probability, and trust.

3. Natural resources (developed further by Ricardo, Grey, and Hotelling, though still fundamentally flawed).

4. Returns to stock.

5. Rents: monopoly and network services.

6. Assets and money (to Smith: gold and silver).

7. Interest.

8. Public goods.

9. Taxes.

Each has distinct behavious, much explained by later concepts of the marginalists and political theorists (class and power), though these are suggested by Smith.

There's some likely consolidation of these (rents, assets, and interest, say). Commodity goods follow laws of supply and demand as commonly understood, but only where goods are undifferentiated (no "luxury" branding, monopoly, or lock-in effects). Many of the others, for confounding reasons, deviate markedly some or much of the time. Smith was largely addressing these failures under merchantilism and politically-influential monopolists and classes.
The fact that it's a set can be hidden, and any queries that depend upon an ordering can be presented as a sorted view or whatnot.
Whatever happened to the simulation code that advocated lockdown??
Change in deaths over change in statistical illiteracy is positive eh? How positive? Presumably the change in statistical illiteracy depends upon the magnitude of the deaths. It'd be an interesting relationship to study...
White House Faces Remote-Work, Security Challenges as Trump Treated for Covid-19
The text states this is comparable to PCR tests (molecular tests). So it is really not bad.
A spade is only a cat if you have tomatoes on your eyes.
LVT says otherwise.

https://en.wikipedia.org/wiki/Land_value_tax
I think for untyped languages like clojure, you lose nothing. For typed languages that don't support parametric polymorphism, you trade type safety for flexibility and code simplicity. For typed languages that support parametric polymorphism, I don't see the advantage.
If you know ahead of time the shape of the data you're dealing with, you might as well use structs and reap the benefits of type safety and improved performance
Microsoft Excel coding issue drives big spike in U.K. Covid tally
Pronouncing LaTeX like the material is pretty common in the math world; id say up to half of Berkeley math when I was there.
OP doesn't embed googlesyndication+googletagmanager, so that's a plus for me.
Yeah, that’s nice in theory, but in practice the situation is often less ideal. Some features, partially implemented, would break existing functionality if not completed, and merging those upstream prior to total completion is therefore impossible. And on the other side of things, some environments and features require large, systemic changes. This is, surely, an organizational failing, but one that we must adapt to.
An untested disaster recovery or backup plan is a bad plan. Sorry you had to learn that the hard way.

Agreed that identical or confirmed working spare components are important.

I've migrated RAID arrays through several generations of Areca cards successfully and even tested back and forth between models. I like them.

Also remember RAID is not backup; keep a second copy of your data around (offsite if you're serious).
`squash` is a tool and it's neither good nor bad; it needs to be applied where it makes sense.
The title is indeed click-baity. It would have been more interesting to read that the bug/mistake was caused as a result of squashing. It's not the case and I take issue with the way the author describes his commits.

The problematic commit is described "Extract CreateTokenValidationParameters method", without an explanation of why the refactoring is necessary or what problem is it solving. It looks like it is improving code readability, but it doesn't go as far as fixing the more glaring issue with global variables. Other commit messages seem to follow the same pattern.

In other words, the commit:

- has minor code readability improvements

- contains no useful message for the future programmer (why is it needed?)

- provides no new functional feature/improvement/business value

- is later found to contain a bug

I find squash/rebase/cherry-pick useful when reviewing my work and deciding what should go in the current pull-request. For example, a refactoring might be postponed for later if it is deemed too time-consuming or irrelevant to the current PR. Or, one can squash logically related commits together, add a useful message and merge them separately. The resulting commit log will still be bisect-able.

For beginners: there's a very good article with tips for Git Commit Messages[0] that helped me have git histories I enjoy reading.

[0] https://chris.beams.io/posts/git-commit/#why-not-how
/sarcasm

Very careful wording here by the author, where the usage of "children" includes "adult children".
16,384 column limit, even in the newer versions according to Microsoft! Mind you, for when things get really bad, it does support "Colors in a workbook: 16 million colors".
I agree on ETrade, but the ShareBuilder product itsself was sunset after the merger with Capital One.

Their product was to specify a basket of stocks with percentages, specify a dollar amount, and then purchase on some cadence. Dollar cost averaging made simple. Before the various discount trading houses went zero-commission, this was impossible to do cost effectively, since you'd lose more in commissions than you'd gain from dollar-cost-averaging + diversification benefit.

Now with zero commissions, it is still hard to do because the process is manual. As an example, suppose you want to purchase $1000/wk of {NVDA 23%, MSFT 27%, GOOG 10%, TSLA 40%}. It should be easy to do. It was with ShareBuilder. You buy less of the stock as it goes up, more as it goes down -- the ultimate buy low "sell" high.

M1 Finance is the only product I found which does the Dollar Cost Averaging well with your choice of stocks. There are other products (e.g., Betterment, but then they stick you with stock portfolios -- better in theory, ahem)
Or take this actual example: you buy a CD with a game, install it, and it doesn't run :( You go to the forums and there is a crack which also apparently fixes some crashes? You download and apply it, and lo, the game runs :)

In fact, I believe in some jurisdictions it's actually legal: since you bought it, you're allowed file and sandpaper it to make it actually work.
So Google's protocol buffers have this feature called "required" fields, which enforce schema in the type system. You should never use it. Never. It's one of those things that sound good until you're a few years into the project. Similar to how you should never be using meaningful IDs as primary keys for objects, always use meaningless fingerprint-like integers. Or how all integers should be signed unless you're dead sure the number is unsigned (like a fingerprint). And how many integers should actually be strings, unless you're dead sure this is a number (externally provided IDs, such as for example customer account IDs, are not numbers). Or how you should be careful to use bytes rather than unicode strings.

Make your schema permissible and your code paranoid, it will pay off later. Build a data linter if necessary, but don't tie the schema.
FastCGI was one of my favorite silver bullets for improving the speed of /cgi-bin/ programs. I used to have slow machines where the Perl interpreter startup time would be significant, so rewriting the script around an fcgi loop made a huge difference. The script could stick around serving requests, and if you feared a memory leak, you could just exit() after a hundred requests or whatever, and the FastCGI spawner would restart them on the next request.

It wasn't as fast as something like mod_perl [1], but much easier to integrate with quickly hacked scripts, as long as you were lexically scoping everything with my() and not screwing up your globals. Fun times.

[1] https://www.perlmonks.org/?node_id=108008
Depending on how a language defines their syntax.

Often times literals are only things like `"string"`, `0` and so one.

But thinks like `[ 1,2]` would be a array expression where each "entry" is syntax wise an expression (and any literal is an expression itself).

I don't know if JavaScript specifically does define object literals or object expressions, in the end it depends on what you define a literal as.

Lastly depending on the language something like `[ 1,2]` might literally de-sugar to something like following pseudo code `var tmp = Array.new(capacity=2); tmp.push(1); temp.push(2)`.

So a better way would be that a formulation like "data should be creatable without explicitly doing any function calls, variable assignments or similar. Creation must not depend on implicitly captured data".
For home office use you can't go wrong with a Brother HL-series laser printer. Cheap as beans, and (unlike HP), toner cartridges don't cost more than the printer itself.

For large offices: I have NEVER encountered a large multifunctional that didn't suck. The number of times I've pressed CTRL-P on my dekstop, only to have walked to the printer and found that somehow the print job hasn't arrived, was printed on A2 instead of A4 or the paper was jammed in one of 15 trays...
Show HN: Security Whitepaper Generator
Knowing the name of the branch is not enough to find the commits. With Git, a branch is just a kind of moving tag on the last commit.

The problem mentioned in this thread is rolling back a feature that was merged. The only solution I know is navigating the log to find the first commit on the branch from which to revert. Don't forget there may have been several merges from and to master, as well as commits shared with other git branches that should not be reverted.

In a Mercurial branch, each commit is tagged with the branch name. Unamed branches, à la Git, are called "bookmarks".