skysight-inc/HackerNews huggingface dataset:
> "--If you need to invert a 2x2 matrix in your program, do you write down the algebraic formula for the solution by hand or do you call a linear algebra library? (that you would not need otherwise)"

If you wanted to use equations in your code and I was reviewing it, you're going to have a LONG session explaining the finer points of floating point and how you avoided all the problems that can cause.

I can quote sections of IEEE-754 from memory, and I would use a library. I simply have zero confidence that my algebraic equations would handle massive cancellation and roundoff correctly in all cases.

And these are the WORST class of bugs to introduce into your program--a function that works right 99.9% of the time but fails catastrophically at random times.
I'd like to see a legal limit to this out-of-network billing. If you limit them to the medicare reimbursement rate, I think this would stop happening.
It isn't for me, in Continental Europe. Where are you?
> somehow they continued paying the wrong provider

How does it happen that the wrong (old) provider still accepts money if they no longer cover you? Can this be used as a legal argument that the old provider is on the hook for coverage since they continued taking the money?
As most people do who talk about this online, you neglect to mention that in the lead up to the coup, Mossadegh was constitutionally dismissed and yet tried to hold onto power. Doesn't that make him the attempted usurper? It's not like the US put their own figurehead in government after the coup. They just gave it back to the person who was literally the head of the recognized state.

https://en.m.wikipedia.org/wiki/1953_Iranian_coup_d%27état

> On Saturday 15 August, Colonel Nematollah Nassiri,[14] the commander of the Imperial Guard, delivered to Mosaddegh a firman from the Shah dismissing him. Mosaddegh, who had been warned of the plot, probably by the Communist Tudeh Party, rejected the firman and had Nassiri arrested.[53][54][55] Mosaddegh argued at his trial after the coup that under the Iranian constitutional monarchy, the Shah had no constitutional right to issue an order for the elected Prime Minister's dismissal without Parliament's consent. However, the constitution at the time did allow for such an action, which Mosaddegh considered unfair.

"The laws not fair! I wanted to be a dictator but it wouldn't let me"
Box Response to Covid-19
Probably because they don't have a Snow Leopard machine left.
From [2]:

"Divisions may detain, without physical examination, the specified products from the firms listed in the Red List of this import alert."

Presumably they're not detaining every batch?

The fact that the import alert has been in place for 7 years suggests -- unless there's further clarifying data about numbers of stops and such -- that it's still a problem, that fake "honey" is being imported?

Per [3], https://www.ncbi.nlm.nih.gov/pubmed/17386484 "Study and validity of 13C stable carbon isotopic ratio analysis by mass spectrometry and 2H site-specific natural isotopic fractionation by nuclear magnetic resonance isotopic measurements to characterize and control the authenticity of honey." it looks like they use SNIF-NMR and SCIRA-MS (magnetic resonance and mass-spectroscopy) in determining authenticity of honey?

This, https://www.researchgate.net/publication/328029044_Authentic..., is quite intersting on the topic.

I wasn't prepared to spend $15 to buy AOAC Official Method 991.41 but the above ResearchGate linked study suggested "honey" could have up to 7% corn syrup and still pass that test. Later (p.8) they summarise:

>"While the study showed that some 73% of commercial honeys analysed were classified as pure according to AOAC criteria10,11,16 and previous studies8,12,13,15,17–20 it is entirely possible this overestimated the actual number of pure honeys. This is because honey is sometimes adulterated using C-3 sugars, such as those from sugar beet7. It is unfortunate that the methods used here cannot detect this form of adulteration61. Consequently, detection of adulteration of this nature remains a challenge7.In addition to C-3 sugars, other adulterants in honey are difficult to detect due to the development of new and more sophisticated practices and lack of officially accepted analytical techniques. The use of EA-IRMS (Elemental Analysis - Isotope Ratio Mass Spectrometry) is the only official detection method for addition of C-4 sugar in honey42. This study also relied on a number of AOAC criteria10,11,16 to determine if honey samples were pure. As shown in Table 1, 65% (17 of 26) of samples classified as adulterated did not meet the δ13Ch-p and the C-4 sugar criteria; 9 samples also failed to meet the relevant criterion for δ13Choney<−23.5‰10. While the C-4 sugar criterion is considered robust and has broad application, the AOAC 998.1211 method does identify that a small percentage of genuine pure honeys fall outside of the accepted criterion for non-adulterated honey (≤7%)." (ibid)
Starve the beast is working as intended. Mission accomplished.
Only 18% of the GDP of Norway is from oil and gas, though. Even without any savings, Norway would probably end up similar to other Nordic states.
What we know about the coronavirus – Ted
Maybe before a surgery, gather all of the hospital staff who are going to attend, and record a video while saying "I do not consent to working with anyone from out of network. If you are an out of network physician, I do not consent to be your patient." That ought to be interesting in court if they bill you. Really, the onus of responsibility is between your insurance company and the hospital (i.e. paying and billing party). If they fail, it needs to be something resolved between them. Because that's their fucking job.
Coffeescript was 'replaced' by ECMAScript 2015. Ember is fine but it's not the end of the line - it's been superseded' in most scenarios by React and Vue.js because those are generally better tools.

JS technology changes quickly not for its own sake, but because there are still discoveries to be made about how to improve both syntax and how we think about code. I'm sure the pace will taper off sooner or later, until the Web is taken over by something else.
Why would you ever build that kind of application using web technologies?
> As someone who’s been 1099 as often as not for the last few years, I don’t like the idea that these things are only available to employees, and would prefer a system that priced stuff equally for temps as for the elect.

I never understood why healthcare was tied to employment. Yes, it's a nice benefit, but it's not like your health needs change significantly if your job changes.

Maybe employers for dangerous jobs could offer supplementary insurance in effect at the workplace or job site. But access to affordable day to day healthcare is something we all need from birth to death without interruption.

Especially when you consider infectious disease, the health of the community impacts all of us.
Second this. Read it all more than once; the insights it will give you into C are so valuable.

I'll also recommend C++ FQAs [1]. It's C++, yeah, but it's relevant to C in many places, and since a lot of systems programming now uses C++ as the lingua franca, it's a good, entertaining resource.

1: http://yosefk.com/c++fqa/
Honestly I'm not sure. I listened to some grate talks on youtube about event sourcing mainly for with a scalability focus but I don't remember by whom they where. Most good articles I read about event sourcing for traceability/replyability where pretty old even when I read them a view years ago. Also many articles I read where pretty messy wrt. what applications of event sourcing help with which problems and have which consequences :=(

Give me a minute I will try to find at least some of the sources, but don't get your hopes up.
> experienced the same problem, and simply restored trim and turned off the stab trim system, and landed safely

As far as I remember it was far from "simply." Apparently they had luck of having a third pilot in the cabin present, who didn't have to maintain anything else in the cabin and had the luxury and time to observe and think about what is going on. The pilots in charge were overwhelmed by the killer plane then too, which is completely expected -- note the "10 seconds" admitted in my quotations.

So, no, as far as I remember, the previous LA flight actually doesn't support your claims.
>At the other end is the Middle Eastern countries. Monarchs and despots have largely enriched themselves and their families at the expense of their country and their people.

I mean, US and Canada are the same here. Just instead of Monarchs you have CEOs, and the religions name is capitalism.
As someone who works on a significant C codebase (IOS-XR), my 2 cents:

1. Most of the large userspace C codebases that still exist today didn’t have many alternatives when they were started.

2. Any non-trivial C codebase relies much more on runtime testing than other languages. In other words, with other languages, you can get away with fewer tests while achieving the same level of quality.

Note that you should be striving for comprehensive tests regardless of language; this is just an observation.
> I never understood why healthcare was tied to employment.

+1 its unclear to me why the pricing would go down for higher number of employees? The risk profile is still spread across many people in the case of contractors.
Banning networks would be less drastic than setting out of network prices to Medicare.
"Our current run of low unemployment is economically weird in that salaries haven’t gone up that much."

There is nothing weird, many companies took measure to not be impacted by hiring the cheapest people that can try to do the job, not caring too much about skills. My employer (big US-based non-IT company) is now hiring in IT without any IT skills interview or even a CV/credential check with the mindset that if they can keep the lights on for a few years, the next recession we can hire experienced people for cheap to fix the things that are currently neglected. I see this in every company I work with, big and famous IT software or services suppliers that are scrapping the bottom of the barrel and gives us unqualified people play-pretending to be developers, DBA's, architects etc. Everybody is cutting corners, in some cases very visible (Boeing), in others subtle (Intel and the 10 nm saga) and everyone else in between.
> Also, understand the undefined behavior, the compiler optimizations and how it can affect your code if you forget about the UB or if you ignore the compiler warnings, and read about the `volatile` keyword.

PSA: volatile generally doesn't do what you want it to; you almost never want it. volatile does not "fix" undefined behavior.

> And a personal tip, please tell the compiler not to use strict aliasing (I think it's stupid) - you will get rid of some UB without much sacrifice.

This prevents the compiler from performing a number of optimizations.
Do you know any others? Every time I’m redirected to twitter on mobile I’m in awe, it’s genuinely the only SPA I’ve ever experienced work “properly” on my phone comparable to a native app without any polish.
This is due to tax policy dating back long time.
The C standard does not talk about a heap or the stack; you could implement a "heap" by handing out pointers from the top level stack frame if you wanted to.
No and no. Remote work irt Covid-19 was absolutely hated by most people in China once it lasted for more than a couple of days. Surprisingly enough, a lot of people actually like going to an office, where they can get away from their family and socialize.

On the second point, the economic damage from natural disasters is usually short and severe, with a quick recovery. Barring Covid-19 turning out to be a lot worse than the Spanish flu, most impacted regions will return to business as usual sooner (as in a couple of months) rather than later.
You clearly haven't dealt with these guys. The hospital can charge whatever it feels like and the insurance pays whatever it feels like. And the patient sits in the middle and has to figure it out.
That’s not related to command economies. The razor blade market is anything but catering to the wealthy.
> I never understood why healthcare was tied to employment.

Because the people who keep it that way are the same people you hear say dumb crap like, "I don't want to pay for someone else's healthcare (ignoring the fact that that is the definition of insurance!)" when anyone brings up changing the way healthcare is run in the US of A.

They think only people who work deserve healthcare.
lol I get the reference
AIM could’ve been Slack, too. Many companies used it for internal communications
Zed isn't actually very good at understanding undefined behavior and has demonstrated this loudly and repeatedly. I would steer clear of his book, personally.
A screenshot / feature matrix would be a nice addition.
>I never understood why healthcare was tied to employment. Yes, it's a nice benefit, but it's not like your health needs change significantly if your job changes.

It's tied to employment because we have private health insurance and that doesn't really work without group plans. Employers are the most readily and widely accessible set of groups (unions are another for example).
This is the correct take. They just reinvented the ESB.
To me it's really both. Do one first, notice it works sometimes and you're not sure whether you should publish it (at that point, don't :) -- ) and then look at your own product through the lense of what you're learning. Eg. there are different kinds of UB and different problems it causes. There's a lot of entertaining literature and people in certain communities that can get you on the right track.

One of them was certainly this one: https://devblogs.microsoft.com/oldnewthing/20140627-00/?p=63...
I'm honestly quite surprised you've never run into surprising behavior caused by the optimizer handling undefined behavior…
Only a small percentage of jobs are actually remote-capable, but most people would be just fine with 1099 work. Most benefits are unused and people prefer cash that they can spend on their own needs instead.

As a COO, I disagree with every one of those statements.

EDIT:
All programming jobs (in my company) are remote capable, and most already are.
95% of my employees use their health benefits.
Once you know the basics watch this: https://www.youtube.com/watch?v=443UNeGrFoM

;-)
In Modern C (book mentioned by OP), there is takeaway 2.11.1.14 which says "Don't use NULL" because:

The definition in the C standard of a possible expansion of the macro NULL is quite loose; it just has to be a null pointer constant. Therefore, a C compiler could choose any
of the following for it: 0U, 0, '\0', 0UL, 0L, 0ULL, 0LL, or (void * )0. It is important that the type behind NULL is not prescribed by the C standard. Often, people use it to emphasize that they are talking about a pointer constant, which it simply isn’t on many platforms. Using NULL in a context that we have not mastered completely is even dangerous. This will in particular appear in the context of functions with a variable number of arguments.

NULL hides more than it clarifies. Either use 0 or, if you really want to emphasize that the value is a pointer, use the magic token sequence (void * )0 directly.

https://www.gnu.org/software/libc/manual/html_node/Null-Poin... says:

The preferred way to write a null pointer constant is with NULL. You can also use 0 or (void * )0 as a null pointer constant, but using NULL is cleaner because it makes the purpose of the constant more evident.

If you use the null pointer constant as a function argument, then for complete portability you should make sure that the function has a prototype declaration. Otherwise, if the target machine has two different pointer representations, the compiler won’t know which representation to use for that argument. You can avoid the problem by explicitly casting the constant to the proper pointer type, but we recommend instead adding a prototype for the function you are calling.

https://man.openbsd.org/style says:

NULL is the preferred null pointer constant. Use NULL instead of (type * )0 or (type * )NULL in all cases except for arguments to variadic functions where the compiler does not know the type.

---

Readers: what is your take on it and why?
The most adorable part is I remember the era of, "A Tim Horton's employee in Alberta gets paid HOW MUCH ?!" And now I'm living through the super butt hurt whining about an Alberta Brexit because they're not getting enough of a break by the federal government.
Interesting. Is a defense mechanism to this then to use the healthcare at least once every period you're comfortable with? I have Kaiser Platinum and looks like I'm about to start requesting monthly tests on things.

Co-pay is about $10, so for $10 a month I can guarantee my healthcare is working.
Preventive Education for Student Loans
My mom had a very mild form of breast cancer 10 years ago, caught in the earliest stages and hasn’t reappeared since. Last year, her oncologist had to get creative with billing codes, because the insurance company changed mom’s coverage so that yearly screening was no longer “preventative“, and thus not covered. No warning, just a huge bill when she went to pay the copay and leave. The insurance is through her job as a teacher in a large county, and is generally a very comprehensive plan. It would be a gold plan of some sort through an Obamacare exchange. Never underestimate the callousness of the American health system.
Farther down that thread (lightly cleaned):

Poverty is a public health crisis, y'all. Wage Slavery kills. And if you can't be bothered to care about that out of your basic human dignity, maybe the fact that the servile class you've been supported by can't afford to not make you sick will fisking help.

Chickens ... meet roost.
It can’t be “perfectly founded“ if it “doesn’t always work”.
> The syntax itself is just begging you to make a subtle mistake.

C's syntax is fine (if a bit ugly around declarations), it's really the memory safety that gets you.
I think this epidemic will expose a lot of weaknesses in public health sector globally. Hopefully, we will learn valuable lessons, but I wished we didn't have to learn them at the cost of losing numerous lives.
I love this.

I think the show Silicon Valley made two perfect archetypes of this divide:

Gilfoyle: the proudly independent coder who prefers to build everything himself rather than be subject to trusting other's code. Documentation is minimal. Code is intense, efficient, and requires a (too) high level of intelligence and effort just to make sense of. Gravitates towards back-end bare-metal systems code and hardware. Background is self-taught pragmatic hacker. Refuses management roles, preferring to do a department's work himself rather than trust underlings.

"Why would I use a library to perform elliptic curve cryptographic functions I am fully capable of writing myself? Do you think I'm a fucking moron?"

Dinesh: the extremely needy but clever programmer whose code is a massive pile of dependencies and abstractions. Unhindered by pride and happy to trust any workaround or outside source if it means him doing less "work" (he does not view learning about new libraries/codebases as work). Documentation is conversational and verbose, with huge doc blocks above the simplest functions. Code is highly abstracted and spread across many files but with an overall working logic to it - often following various (obscure) engineering standards rather than using personal pragmatism. Loves to communicate, and so has a flair for front-end-facing code and making things pretty and understandable rather than completely efficient. Background is more academic and group project based, with a deep understanding of standards and love of new technologies. In a management role, tries to befriend, integrate, and understand all his employees programming styles - and sends many memos with emoticons.

"Oooh, look, I found this neat library that animates my system font whenever I press the 'r' key! Arrrrrr! Hah. Pirates..."
Dictionary database with future API and bot integrations
Best paired with a bunch of modern resources about how undefined behavior works.
Stack pointers can live just as long (for example, define some objects in main(), and they will exist for the duration of the program; hand out pointers like candy). An allocated object can be deallocated whenever.

Dereferencing said pointers isn't any different, no matter how the pointee was allocated:

void myfun(void *foo) {
// do things with foo.
// how it was allocated is all the same to me
}

As far as C is concerned, stack and heap do not exist. The validity of reference to an object is defined in terms of lifetime, which stems from its storage duration (static/automatic/allocated).

And these are concepts that just define the semantics of the language. For example, an object with automatic storage duration might never hit stack or heap or any other part of RAM; it could live in registers, or be optimized out altogether. It could be in the bss segment. The semantics also do not forbid the implementation from using mmap() or malloc() (or similar) for objects with automatic storage duration.

Using stack for automatic variables and heap for allocated variables is just one implementation technique, which should not give rise to any observable differences in the meaning of a legal program (i.e. one that doesn't go into undefined behavior) as interpreted by the abstract machine, which the standard defines.
Not undesirable, just odd to make a big deal about it. Like making a big deal about Unix pipes. Yeah, when they were invented, okay. Nowadays ... old hack.
That doesn't make it worthless; it's still probably the best book to learn C today if supplemented correctly.
Don’t understand its connection to your grandparent comment
I think that one was good:

- https://www.youtube.com/watch?v=STKCRSUsyP0

I wasn't able to find any other talk I watched back then or any of the stuff I did read, but I then last time I looked into talks and reading material about this was ~2.5 Years ago and while a lot of new software and tooling was done since then the principles didn't change. Try some of the other GOTO; talks about it if you like listening to talks, they tend to be quite good.

This was interesting as far as I remember but not what I was looking for:

- https://www.youtube.com/watch?v=CZ3wIuvmHeM
What’s the point of testing? There is no treatment. So knowing you have it or not is pointless. If you have it, and it’s serious, you’ll seek medical attention regardless of whether you know it or not.

When you see the ridiculous on hand sanitizer and toilet paper, even if there was an over the counter version, you wouldn’t be able to find one in the store.
You'd be surprised how many people I have talked to who told me they are not worried at all because it's just like the flu.

Yeah, China, Korea, and Italy quarantined millions over just the flu. Some people's ability to deny reality is very impressive.
> the library ecosystem is absolutely gigantic

I can call out to C libraries from other languages, so that's not a big deal.

In addition, I think that probably the JVM ecosystem is larger and that Python may be as well.

You also find certain things at the bottom (like glibc, for example) where the C ecosystem isn't as diverse as you think it is.
I guess they're not "exclusive" to C, but they're very important in C in a way they aren't in most languages. So I think op's advice here is good.
>Fix that and we would see a lot more positive developments for workers.

That basically requires getting rid of private health insurance (except as supplemental insurance) which is going to be a difficult battle.
C++ is not a strict superset of C anymore. You can't compile all C in a C++ compiler.