skysight-inc/HackerNews huggingface dataset:
It's been a while since I've been relying on environment variables per-configuration key. I haven't defined profiles such as dev or production for a really long time, with Django projects in particular. I have collected a handful of little secrets that I can share with you.

I do have if DEBUG: based switch all along my settings file, and enforce DEBUG=True in manage.py at the same time: in manage.py set os.environ['DEBUG'] = '1', and in settings.py DEBUG = bool(os.getenv('DEBUG', False)).

My objective is that when a new developer clones the repo, and runs ./manage.py runserver or shell, it will load with all development settings by default.

In theory this could cause the problem that running manage.py commands in production would run them with DEBUG=True. I tried that, and in practice this turned out to never be a problem. But this could certainly bite you if you're not careful.

In particular, I also spread env vars in two config files: docker-compose.persistent.yml for persistent deployments, and docker-compose.ephemeral.yml for ephemeral deployments.

To complete that, because I don't want to store secrets in the git repository, I do have things like that to load multi-line environment variables in CI:

- export $(echo $PROD_EMAIL_SETTINGS | xargs)
- export $(echo $PROD_ENV | xargs)
- export $(echo $PROD_SOMEAPI | xargs)

So for example, in PROD_EMAIL_SETTINGS I have a a multiline value with EMAIL_SOME_SETTING=something for every setting that settings.py will fetch from the environment to provision the Python email settings.

And if I want the production email server settings in staging and production, I can load the set of variables that configures for the production email server with that single line.

Anyway, for me the best setting profile management, is no profile management at all: local clone should have development settings by default and just work with 0 config, configuration for deployments in compose files for non-secrets, in CI vars for secrets, and I should be able to easily decide if I need any of the settings that are in production to develop something in which case I end up building a custom profile with environment variables (ie. to debug a blackbox such as a partner API) just "for the time being", for example I have dumped the blackbox request/responses and then build up my unit tests based on that.

I'm extremely happy with that trivial setup that I have in a bunch of projects now for the last years, I thought that's what everybody who's not using a profile-based system was doing, I thought that was the essence of 12factor/config, at least that's what I understood.
Your company sets the guidelines/expectations for what determines the difference between intermediate and advanced programmers. You could meet the definition of advanced programmer in one company and not another.

There are also variations in titles, both real differences and just differences between what companies call you. Are you really a programmer? It sound like you might be a software developer since you are learning concepts and architecture.

So to get to that next level, you can either do it from your perspective or the company's. Use the company's guidelines and get promoted. Or, improve areas you see as an opportunity to improve.

My company sees me as an intermediate developer, but I have often been mistaken as a senior developer or tech lead (not currently as I switched roles/tech stack). So perspective is everything.
No, surely the creative is the actual image (say) that carries the message. The creative is the bit people perceive with their senses, not the interpretation of that.

One designs a message: "people who drink $cola are fun" and then the creative to convey that message - such as an image showing someone smiling, nestling the product in their hands.
That clang/LLVM support was contributed by NVidia.
99WebHelp: Unwinding a Tech Support Scam with Osint
Java Kubernetes Operator SDK reaches v1.0
I am indeed glad I saw this comment, because as someone who likes Keybase, when I saw the title, I was like "ugh". Hopefully dang or sctb will edit it soon!
It's not all about you, it's about trying to stop the spread of the virus to people who might be more vulnerable than you are.
C and C++ dependency hell comes from prioritizing user experience over dev experience. Imagine if every little tool you used shipped a full fledged system running in a docker container. It would be a nightmare.

As a user it's possible to put up with this, even enjoy it, when there are a handful of tools using it. A container running your webserver and its dependencies like database and caching for instance, that's reasonable.
They should isolate.
Yes thats the added value of having an abstraction layer like CDK. If you are familiar with coding then CDK is the way to go off course.
Use Joiner-Mover-Leaver Processes to Gain Control, Improve SAM and Cut Costs
Building a Crystal Project with Nix
It's not cgroups, but rather namespaces and seccomp (and apparmor/selinux on some distros) that sandbox the processes inside the container.

cgroups are used mostly for resource limits, not for sandboxing (aka namespacing).

docker by default does have a slightly more lax security posture than systemd or lxc (i.e. a default set of capabilities that isn't explicitly enumerated and a focus on UX over tweaking them, no usernamespaces by default, etc), though you're right that it is largely meant to be a secure sandbox for untrusted containers, as long as you know hat you're doing.
What activities are expected from remote developer for effective collaboration?
Are electric vehicles doomed? We don’t think so, despite poor sales
Right, microservices beget monorepos because managing permissions and build pipelines across 100's of repos isn't pleasant. As mentioned elsewhere in this thread, coordination is really challenging across multiple repos and versions.
A registry is a plausible idea, but in general, this article seems to assume by default that regulators are always wise and benevolent, and companies are always scheming, wicked villains. This year's coronavirus pandemic has showed that we can't just assume this. Eg., the FDA made it illegal for labs to develop their own coronavirus tests, which let the disease spread:

https://www.politifact.com/factchecks/2020/mar/23/dan-crensh...

Distilleries have been trying to make hand sanitizer, but the FDA has made this much more difficult by requiring that the alcohol be denatured first:

https://abcnews.go.com/Politics/distillers-lawmakers-pressur...

Companies developed at-home coronavirus tests, but the FDA shut them down:

https://www.statnews.com/2020/03/21/fda-warns-new-home-coron...

(the FDA later approved one by LabCorp - at-home testing does in fact work - but this took almost a month, and AFAICT the original sellers still haven't been approved)

The Apple Watch has the ability to test blood oxygenation, which would be incredibly useful now, but it can't because that would be an illegal medical device:

https://www.city-journal.org/fda-blocks-apple-watch-blood-ox...
There is the idea that warriors could get infected by bloodlust. Also, the berserkers who would be placed in an altered state of consciousness and obliterate anyone near them, friend or foe.

Also, in a culture where public toture and execution were the norm, they might have had different tolerances.
That's wild.

> This means I'm going to skip the whole very subjective “use metaclasses for this but not for that” conundrum.

That's sad.
How to Host Your Dapp with IPFS+ens and Access It via EthDNS
But that took the simplicity away. Everyone that knows modern JavaScript knows classes. Now they have to learn this alien concept called "hooks".

Now regarding reusability: I have been doing UI code for many many years and I have rarely felt that logic inside UI components need to be reusable. First move all business logic out of UI components into model-layer objects. This eliminates most of the need for reusable logic in components. Then decompose your mega-components into simpler components. This removes all remaining need for reusable logic. If you still have reusable logic inside your component -- this is very rare -- allow some duplication of code, this is better than creating monstrous code that nobody understands.
Is it possible to track the action inside the installer itself?

e.g. each install contains a unique slug, when the installer is opened you use the unique slug to know where it is coming from?
Imagine you walk into a grocery store and pick up a rewards card to save N%. To get it, you have to give a phone number. If you write down your phone number, you've handed over some PII. If you write down a fake number, it's still legally PII, but has been anonymized, so the store won't be able to find you.
I know for sure that my company doesn’t have great long term data about its own devices in the field and even less about competitors. Once implanted, most patients disappear.
A double digit percentage of AdWords campaigns are budget limited on any given day. I honestly can't believe how tens of thousands of marketing folk can't notice how much money they're throwing down the drain by using the budget limiter...
> loss of personality

Like ahlzeimers? It doesn't make sense that the graphics heavy world would have less personality than the constrained world of text.
Hi everyone! Author here. I'm humbled that someone felt this was HackerNews worthy, really unexpected! I'll do my best to respond to comments, but if I don't get to yours feel free to drop me an email, link is on the website.
Some cross platform, it was never supported on Android, and most likely never will be.
Just a heads up, this post started as dead, probably because of the new account. I vouched and upvoted.
I apologize, you are correct that you did not say mandatory. I got carried away in the conversation.

> By the way, no, 1 in 5 people do not have antibodies.

"Cuomo Says 21% of Those Tested in N.Y.C. Had Virus Antibodies", NY Times, https://www.nytimes.com/2020/04/23/nyregion/coronavirus-new-...
Wouldnt any wire with electric charges in motion be considered to have EM waves? I dont think there is a minimum frequency per se, at least not a relevant one.
If your limited to a certain percentage of costs as your profits, you have an incentive to increase costs. Hospitals and insurance enter into an unholy pact to increase costs implicitly as a result.
Gmail now being a for-profit, floated business isn't the point of it to target people with advertising. The function is only to achieve the rough aim of causing people to buy products they otherwise wouldn't have.
I haven't found a use for it yet, but I'm not upset that they gave me money. It's the only crypto I've ever owned, but it's mine I guess?

Also, my understanding is (at least in the US) that you don't need to declare gifted cryptocurrency until/unless you realize it's value by either selling it or sending it to someone else as payment for a service.
How do you compensate for lighting conditions and differences between different phones' cameras when identifying pantone colours?

I'd expect Pantone to be precious about that sort of thing, as accurate reproduction is important to them - right?
Mitigating human errors is certainly important. The brittle nature of your onboarding story is exactly why I wrote this post and encourage the practice in it.

Larger apps that I deploy have a development.py.example file that people can copy to development.py (or fredsmith.py, madonna.py, it doesn't matter. These would not be checked-in to Git)

Then all I need to do before running anything in my project is prefix with ENV=fredsmith.

As a team we could settle on a different name for this variable. We could all have our own environments. We could even decide, as a team, to check them into Git so that we can all see each others config in case there is an issue.
I haven't followed them too closely for a while but wasn't the cryptocurrency misstep an answer to critics about the safety of keybase as keeper of the database[0]?

Now that I'm looking it although their docs don't mention anything[1] I'd assume it's related to their funding[2].

[0]: https://keybase.io/docs/server_security/merkle_root_in_stell...

[1]: https://keybase.io/docs/server_security/merkle_root_in_stell...

[2]: https://keybase.io/blog/keybase-stellar
And yet again, the YC downvote brigade is out, silencing all dissent from the death cult.

You monsters won't be happy until 00 million are dead, all because you're afraid someone might have some freedom somewhere

In the words of George Carlin: you are all diseased.
After the 1st world war, Germany was paying crippling amounts of reparations to the winner countries. That wasn't so successful, lead to hyperinflation and the Nazi power grab. So after the 2nd world war you had the Marshall plan, debt forgiveness, and trade integration between the western European countries. This was the basis of the EU pacts that live till now.
The undated post thing is a huge pet peeve of mine (as are the relative time stamps, i.e. "2 days ago" rather than a real date/time).
> I've never clicked on an ad

Impressive
And further, I don't think Apple/Google intend to provide the database that infected people push their data into - my understanding was that would be per-app and in this case controlled by NHSX.
People in developing nations didn't ask to get injected with random things western capitalists invent, if you guys think it's a great idea, please volunteer your own children first #skininthegame.
>> Gmail Ads Can Scale

Does Gmail have ads? I know it used to, but I can't remember the last time I saw one. Looking at my Gmail inbox now, and I don't see a single ad anywhere on the page. I'm not running any kind of ad blocker.
Honestly what I dislike about docker is the very effectful config file.
What if there was a lightweight keybase cli that only did the basics (official or community)?
Personal Anecdote: Every time I've tried using rust-analyzer in another editor I've ended up going back to CLion (an IntelliJ-based IDE from JetBrains). The CLion experience is far superior in my personal experience. The speed difference is barely noticeable on my system while the completions, etc. are far more accurate with CLion. For example, with rust-analyzer on one of my projects, it sometimes suggests hundreds of possible completions for in a certain context whereas CLion (accurately) only suggests a handful. The integrated debugger support has been quite nice too.
Or if you have to manage 100s of accounts stacksets can be really helpful as well.
Hey there, thanks for your comment! You're totally right to be skeptical. I didn't include any numbers on ROI for 2 reasons:

- This was my previous job, and I don't have the data anymore :)
- I don't want to reveal numbers that could harm that company or inform their competitors.

I will say I was 100% focused on profitability. I'd be a pretty shitty marketer if I doubled spend without focusing on profit.
React's efficiency is through its millions of packages. I had to build a project rapidly in React a short while ago and there was a package for everything.

A toggle? Yep. A timeline? Yep. A textarea? Yep. Toasts? Yep. Spinners? Yep. React just has so many pre-built components that you can add features very rapidly.
There is a lack of evidence to support either assumption. There is anecdotal evidence that suggest it might work and plenty of examples where it was not done and there was no significant increase in Covid infections/hospitalizations (Sweden).
Show HN: Automated Redaction sensitive information from PDF thru Pdffiddler
Isn't Keybase built exactly for this though? To be able to look at the connected accounts/proofs, and know that a given Keybase user has proven control of those accounts? An attacker looking for crypto may have hacked someone's HN or GitHub. However, with Keybase, you can establish someone you want to talk to has linked their Twitter and their web domain and the like, whereas an attacker probably does not have access to all of their various identities around the Internet.
America's health system at risk from cyberattack, senators warn
Looks like what he really wants is to use Ada which has had much better support for low-level programming than C.

Example:

Word : constant := 4; -- storage element is byte, 4 bytes per word

type State is (A,M,W,P);
type Mode is (Fix, Dec, Exp, Signif);

type Byte_Mask is array (0..7) of Boolean;
type State_Mask is array (State) of Boolean;
type Mode_Mask is array (Mode) of Boolean;

type Program_Status_Word is
record
System_Mask : Byte_Mask;

Protection_Key : Integer range 0 .. 3;

Machine_State : State_Mask;

Interrupt_Cause : Interruption_Code;

Ilc : Integer range 0 .. 3;

Cc : Integer range 0 .. 3;

Program_Mask : Mode_Mask;

Inst_Address : Address;

end record;

for Program_Status_Word use

record
System_Mask at 0*Word range 0 .. 7;

Protection_Key at 0*Word range 10 .. 11; -- bits 8,9 unused

Machine_State at 0*Word range 12 .. 15;

Interrupt_Cause at 0*Word range 16 .. 31;

Ilc at 1*Word range 0 .. 1; -- second word

Cc at 1*Word range 2 .. 3;

Program_Mask at 1*Word range 4 .. 7;

Inst_Address at 1*Word range 8 .. 31;

end record;

for Program_Status_Word'Size use 8*System.Storage_Unit;

for Program_Status_Word'Alignment use 8;

More info:
https://www.adaic.org/resources/add_content/standards/05aarm...
I like that definition, but is the response "unresolved," or just "unhelpful?" Maybe "unresolved" has a different meaning in your specialty though.

I thought when someone experiences trauma, it makes their brain sensitize to preceding stimuli and unconsciously produce a strong response, in an attempt to avoid similar trauma. This would increase survival odds in life-threatening environments. The problem being that heightened sensitivity to similar stimuli and automatic strong responses are usually detrimental to living a safe, modern life.
Zelda: Majora’s Mask at 20, the Enduring Appeal of Nintendo’s Strangest Game
> Sadly, I think the current state of “modern” web development reverses that principle. Developer efficiency is prized above all else.

I strongly disagree with that, "modern" web development values beautiful code over almost anything else, if that wasn't the case you could have one of your dev building a form in a few hours, instead they need tons of tools (react for example) that slow their development
We don't know what would have happened in the US if we hadn't locked down. Considering the human cost so far with a lockdown, I think 20/20 hindsight indicates that we made the right choice. We can't just assume that things would have remained the same without a lockdown.

And if things had become worse than now, how would that have impacted the economy?
> Most developers don't work for the end-user.

This is extremely reductionist.

If you want to take it further, then nobody works for the end user ever. If you have any funding at all (even from the public markets) then you "work for investors".

Can you see how this is theoretically true, but practically not as true?
This is silly. There’s a clearly demonstrable reason why Germany switched tack, and why the UK should too. All of this contact tracing can be done in a privacy preserving way. However, the NHSX development of these tools is led by such industry partners as palantir... We aren’t going to see much regard for privacy from them.

Edit: Google and Apple need to get their act together though, and just provide a contact tracing framework as part of the OS that is compatible, and can have data housed in each country where they see fit. It should be optional for people, but it should be part of the OS, and it should just be presented to the countries as ready to go with just a little bit of integration. That way we can force everyone to respect user privacy and not do sketchy contact tracing apps.
You might want to put some sort of identifying information about yourself somewhere, on the site or the github project? Maybe a key of some kind? :-)
Explanation about Sweden's Covid policy
The Keybase Filesystem
The results of coronavirus ‘serosurveys’ are starting to be released
> Since some countries apparently have been succeeding in containing the virus, I don't think that is a good bet to make.

Some islands. Those, naturally, have well-defined borders due to their being surrounded by water. I'm not sure any non-island nation has had any luck.
My gandma used to read the Struwwelpeter stories to me as a child. I would actually disagree with the premise of the article that they make children want to die. They actually are supposed to frighten children into behaving properly.
Well at least in this case the patient were interned before.
Did we break their site? :(

Edit: seems to be back up with everything in order.
You people with your "anti-vaxx" everything, anti-anti-vaxx everything. It's all "right wing conspiracy". All you do is try to shame people into passively accepting whatever you've decided is True and Good, i.e., "science", the field of truth that produces "vaccines", and everything else that is Safe and Effective. So quick to attack skeptics and truth seekers as "right wing conspiracy theorists" like the good media audience that you are. You are simply Appalled! The OP ought to be Ashamed! A 12-day old account, must be a troll, spammer, Russiagate disinformation agent. Hey, it was Russia and the terrorists been injecting falsehoods into the lexicon to disrupt the fabric of our comfortable dream state all along, listen here.
And you speak for the whole HN community, no less, with far-flung high-falutin self-obsessed pro-tag'n'track cattle herding ideas sent by billionaire human saviors. The great delusion is thinking that everything is exactly as it seems. Actors tell truths. Governments save lives. And if you think otherwise, then Doctor Skuthus says "Please seek help; you lack the mental faculties of my great erudition and are disordered in your thinking". Just some self-aggrandizing garbage toss, same as anywhere else, but with the protective coating of "HN is on my side guys".
Isn't Vulkan supported on Series X or PS5? That wouldn't surprise me, given every vendor wants to rule with their API.
I am far more confused by hooks than by classes and 'this'.
You understand the UK is part of the Five Eyes, right? And with this plan the NHS will just have access to all the data?

So the thing you are fearful of is actually happening because the NHS plan is the route they are choosing.
Why is Fitbit able to get a pulse oximeter in the market while Apple is not?
This probably the less mobile friendly website I've seen in a while!
I'll have to check it in my laptop later on.
Ask HN: What topics aren't well enough covered on YouTube?
> The problem with learning about hooks is that they're not generally applicable knowledge about computing or programming.

That's true of the hooks API specifically, but not true of the underlying abstraction. Hooks are (informally) algebraic effects - one of the coolest and most general abstractions for inspecting and manipulating a program's control flow [1, 2]. Algebraic effects are still somewhat niche and most programmers haven't encountered them in name or in practice, so in that regard, hooks are actually one of the fun cases when learning a new API is mind expanding.

[1] https://github.com/ocamllabs/ocaml-effects-tutorial#1-algebr...

[2] https://overreacted.io/algebraic-effects-for-the-rest-of-us/
If I create a file in my project named requests.py, then a sibling file's `import requests` starts importing that file, instead of the library. Maybe name conflicts are "basically fixed" in the sense that there are ways to avoid them, but there is still surprising and magical (in the worse possible sense) behavior to trip over.

> Regarding hyphens and such in package names pretty much every language has restrictions on identifier names.

This particular restriction is an artifact of the bad design of treating paths on disk as special language tokens instead of string literals.
As the Apple/Google system shows, it's possible to do contact tracing without sacrificing privacy. The blame is entirely with the UK government, not anybody who takes the reasonable step of refusing to support unnecessarily harmful technology.