skysight-inc/HackerNews huggingface dataset:
Ask HN: How do you write tests when feature toggles are involved?
Hey,
I am working on an application and I started using feature toggles recently. I'm not sure how to test my code (both unit and integration/service test) for all the states of the toggle.

For unit tests I duplicated my test cases and patched the feature toggle checker to return either true or false (depending on the test case). The plan is to remove the test cases for the "off" toggle case when I remove the code. The downside of this approach is that number of test cases grows exponentially with the number of toggles we use.

For integration/acceptance tests I plan to build a framework to somehow enable/disable the toggle for a user (maybe using an HTTP header to override the toggle value).

Are you using any other approaches?
Facebook's dating service doesntt promise "getting laid" part.

But it's consequence of every dating site in existence.

Offering employees perk in your own service has never been illegal.

Ford gave its employees ford cars. No one bat an eye lid.
The 'Window of Opportunity' to Act on Climate Change Is 'Almost Closed' UN Warns
> the programming assignments were not challenging. I didn't really feel like I gained anything from them

I was in the first cohort of the front-end nanodegree, and I also took the full-stack shortly after. I'm pretty shocked by this statement. For me, the vast majority of learning happened by implementing the topics that were discussed in the short videos. Given that the videos are very brief summaries of the topics you're meant to implement in the projects, It's pretty odd you gained nothing from doing them. Did you know the material before starting the nanodegree? If so, I'd argue the fault is on you for choosing a curriculum meant for beginners whilst being intermediate or above. Otherwise you're a very rare person for being able to learn more from watching videos and reading articles than by actually practicing what is taught.
Web focused dev isn't the only area with interesting problems but that's definitely what gets the most attention is frankly probably the most lucrative path for most people. I work in finance as well, and am kind of too specialized in it to switch now, but I do think I'd have been better off working at the FAANGs for my whole career.
It wouldn't be hypocritical for Trump since IIRC he bashed Amazon during the campaign. Probably a little more difficult for the Chamber of Commerce republicans.
Not to blame the victim, but this is an apt example of social engineering at work. The so-called 'educated' person in question is not too aware I guess. All the banking institutions send you a gazillion emails about not sharing your card information ever with any employee. In fact it has come to a point that the government of India runs TV ad campaigns regarding this on all the channels under the sun. So the ignorance of the victim is to blame for this as well.
Maybe calling a machine that has just demonstrated its profound stupidity an “Artificial Intelligence” is part of the problem. This crappy tech is overhyped and overrated.
Loosely the presumption of guilt lands on the car driver for failing to stop in time, just as it would if you ran into the back of someone, or hit a cyclist.

There are of course circumstances where a driver has little chance, like a kid running from between parked cars after their ball, someone not looking, or a cyclist running a light.

The police generally investigate the scene and assess what happened, measure out distances, skid distances to assess driver speed, and seek witnesses etc if there's reason to think circumstances aren't straightforward or there's serious injury or death.

There's also some degree of marshalling on busiest roads by putting up railings in some places to encourage crossing at safer spots, or the crossing a few yards away.
The Future – Tesla Model 3 from Mountain Pass Performance
I tend to write up (not necessarily formal UML) diagrams in 2 cases:

1. I'm brainstorming with myself about how I want the software to behave

2. The software is basically done & tested, it's unlikely to change, and communicating the behavior to other people is of value, especially when describing a system that spans multiple components
Conferences with Colleagues – 6 Ways to Do It Right
Marginalization of Maori in New Zealand
Which is crazy as well, right?
Strongly recommend. The learning curve on SMT is steep (at least it seemed so to me; perhaps I'm not so bright?) but Dennis's work really helps with a lot of nice examples of non-trivial problems being solved with SMT.
Pioneering sociologist foresaw our current chaos 100 years ago
For larger investors Interactive Brokers is good.
> can file a small claims case

> it will still cost me time/effort .

In my country, costs can be added to the claim. Is it not the same in the US?
And if you win, you pay the lawyer, court fees and administrative costs. The last ticket I had for speeding was rougly $90. The speeding fine was only $30 of that -- the other $60 was not recoverable with a win in court.
"Truth never triumphs—its opponents just die out." - Max Planck
Believe Shazam also started as such a dial in service.
This is true, but you also have to look out for coopting of the Democratic party. For instance this year the Koch organization is looking a significantly shifting a lot of donations into Democratic politicians. You can blame one party, the GOP primarily, but you also need to lobby for the Democrats to come out with a strong and clear climate plan.
That's why you "pay" a premium for big US credit cards and banks. Trust, and when shit hits the fan, they will/should be there.

Somebody stole my Capital One card awhile back and racked up over $2,000 in charges. Capital One, instantly deactivated the card, sent me a new one, and reversed all the charges.
Funny what happens when you run before you can walk, but with any such technology, there would be false positives even when this gets improved significantly. At such a nascent stage, this is bound to happen.
I too have had this dream. It's like a Realtime stragedy game, you have a minimap where you make big movements around the map, zooming in to perform some micromanagement on individual units. Zooming in further to directly edit there AI.
I'm also in Chicago and have done a similar analysis. But I'd argue there are two main reasons for the per-month costs for owning are cheaper than for renting:

- Illinois is broke and is going to increase real estate taxes every year for the foreseeable future. So while you can also sell to escape the tax bill, the value will just drop to compensate.
- There are many fixed costs to buying a place that aren't reflected in the monthly bills. Such as closing costs on both the purchase and sale (including chicago's lovely transfer stamp tax, realtor commissions, etc).

Also keep in mind how many high-rise condo buildings are going up right now. This can only be bad for prices of "old" condos around the city.
He bashes Amazon because Bezos owns a newspaper he doesn't like.
>>In the case of jaywalking, the answer is simple. You just make it legal. Cars can slow down.
> Mmmm I dunno about that. Drivers have minimum reaction times and cars have stopping distances

Actually in many countries like the Netherlands and the UK, inside the city pedestrians have priority (right of way) over traffic everywhere. If a pedestrian crosses you stop, no jaywalking BS.
Normally to other plants, rarely for animals (see: poison ivy, poison oak and poison sumac). In really extreme cases can be very dangerous even to burn it (but nobody has a manchineel in their garden). Walnut can poison the soil for a couple of years so is better put its fallen leaves on a isolated compost pile. It depends on the species and the chemistry of the soil.
Instead of providing some one-off special case for addresses close to 0, they could have what actual computers actually have: a way to mark regions of memory as unusable (which the WebAssembly code could then do), which would also provide help with other issues like stack overflows.
Most AI systems output a 'confidence' to their result. One could simply set a higher bar for drawing conclusions to counter the bias.

This goes against the idea that 'machines are unbiased because math'. And it is a form of positive discrimination, which not everyone likes, but it is an easy fix.
> How do you pay in cash?

I don’t have that use case but yes, they have announced a service to do that.

> How do you order foreign currency?

I would typically use my card at ATMs in a foreign country (which comes with a small fee above a certain amount). In practice, I almost always need cash abroad for reasons covered by work-related expenses, and I keep those transactions on my Revolut account.
> The primary federally required thing citizens have to do is pay taxes.

Sure.

> Legally you cannot pay taxes in any other currency than USD.

Sure. But though that two sentence pair is both true and includes the word “primary” and a reference to “USD” and paying taxes, it doesn't support th conclusion that the primary use of USD is for paying taxes.
Heritability of Human Longevity Substantially Inflated Due to Assortative Mating
I think the suggestion was only that the call to malloc shouldn't crash. If it overcommitted memory, some other part of the program will likely be where the crash is. If it couldn't commit the memory, it will return null. Which is not crashing.
This is a bit too deep for me at the moment. I don't know that much about the science. What little I know about DNA is in service to understanding my genetic disorder.

Have a happy Sunday.
>What happens when a driver hits a pedestrian? Is there an investigation into whether the driver could've stopped in time?

The driver would be more guilty as they should have been going with a suitable speed and pay attention to the road when driving inside the city.
Finland, I believe, scales fines proportionally to your income. Not perfect (the rich can more easily hide their income than the not so rich), but a good start.
Super interesting. I have to admit my bias is to say that it seems difficult to assess when the pedestrian became visible to the driver (which would affect whether they could've stopped in time), but I'm also totally willing to admit that I might be nitpicking and it's a fine system.

Thanks for the response!
VisBug
In effect the state received an extra $250 by making this mistake, so there is little incentive for them to fix it.
Vacuum is good insulator.

Initially he would probably feel warm in the in vacuum.

The evaporation of water would cool his mouth and nose.
Thanks, I enjoyed that a lot more than I enjoyed the actual movie. (although I enjoyed that too) A bit like Burden of Dreams vs Fitzcarraldo[0]. In both pairs, the fictional story seems trivial in a lot of ways compared with the real story. Maybe that's often or usually the case? Well, I don't think it's likely I would've enjoyed Terry Gilliam's Quixote or Jodorowsky's Dune more than I did the amazing documentaries about them. (Lost in La Mancha and Jodorowky's Dune)

[0] Fitzcarraldo (1982) is a Werner Herzog movie about a guy who wants to build an opera house in the jungle, which plan involves hauling a ship over a hill between 2 rivers. Burden of Dreams is Les Blank's documentary about the making of the movie.
Nice!! have been waiting for something like this for a while. Gonna try this for sure.
>Also curious as with the other poster: What happens when a driver hits a pedestrian? Do they do an investigation into whether the driver could've stopped in time/was traveling the speed limit/etc?

Yes. And the driver has the burden of proof. They drive in a city, so they should have appropriate distance from anything in front of them, and go slow enough to stop. What if it was a kid running into the street?

Here's the lowdown from a UK solicitor:

https://www.digbybrown.co.uk/solicitors/news-main/what-happe...
Technology giants didn’t deserve public trust in the first place
You’re selecting for exemplary people in your example, while Obama and Corolla are talking about a wide group of people in an industry. Your comment does not hold water.
Perhaps it's a proxy attack but he criticized Amazon's tax practices for putting smaller shops out of business and the supposed preferential treatment by the USPS.

Anyway, my point was that it doesn't matter. His administration could do good here for purely partisan reasons.
If you didn't use third-party sellers, you could have published your software on your website and accepted payments via any of the "software registration" services or even PayPal. 5-15%.
If that's unexpected then I really find it hard to take your earlier comments serious.
Why would you use a blockchain? There's already a central authority - the DC city government. They should just host their own git instance.
I'm on the RISC-V J committee (headed by Martin Mass), but what I'm proposing here is unlikely (?) to appeal to the mainstream RISC-V SoC developers, at least not without a strong PoC.
I bet John Carmack is just winging it in a lot of aspects of his life, too.
>Linus didn't win the debate vs Tanenbaum. He simply happened to be the right guy at the right place at the right time.

He just kept building, even though he was aware that there was a "competitor" in the space. I mean, look at his very first Usenet post announcing Linux ("just a hobby, won’t be big and professional like gnu") - sometimes "just keep building" is all it takes, and the established leaders have far less of an advantage than we think they do.
When I was learning to use a chromatograph (barely a decade ago) the textbook still suggested the "plate stacking method" to figure out the AUC (area under the curve): basically see how many rectangles fit under the curve.
Living in a major city myself, I can think of several intersections where one could be traveling the speed limit and paying attention but be completely unable to stop in time for a pedestrian crossing unexpectedly.

There are numerous streets and corners that are really poorly lit because of scaffolding/debris/etc.
Well, like Anacharsis told to Solon (the lawmaker) in 6 BC Athens:

"[Your] laws are no different from spiders' webs. They'll restrain anyone weak and insignificant who gets caught in them, but they'll be torn to shreds by people with power and wealth".
Discourse is also free and open source. You can run it on a $5 DigitalOcean droplet instead of spending $100+/mo on a discourse.org account. With your $88/mo, you can keep $80 of it after spending a little over $5 in Discourse hosting and taxes. Both CI options are free for your project. $200/mo seems exorbitant for two simple services.
Communism does not have the pretensions to divinity and supernatural aspects that we see manifested during elections in the USA.

It has a recognition that the forces of production change. That relations of production change, and this base changes superstructure in the society. Hunter gatherer tribes make way for Sumerian and Greek slave empires, make way for feudal Europe, which make way for capitalism and bourgeois republics.

The Paris commune, the Russian revolution, the 1936 Spanish republic etc. are seen in this light as nascent proto-steps toward the next superstructure coming out of changed forces of production and relations of production.

History has already seen four major changes from one system to another, but not by means of divinity. Marx's pointed to contradictions inherent to capitalism. I think the 2008 bailout and crisis would be a sign of the eventual end in Marx's view - US Treasury secretary Hank Paulson said GE CEO Jeff Immelt visited him on September 15, 2008 and said GE was having trouble financing day-to-day operations. Events like that are harbingers of the eventual collapse of the capitalist economic system, in Marx's view. For now, the government and taxpayer bailing out the capitalists and corporations work, in Marx's view, one day it will not work. But the collapses are only part of the collapse, advances had to have happened to shift the system as well. It is not divinity, it is history continuing to be dialectic.
This, so much.

Not to undermine their success, but people tend to skip where their success come from, besides brightness. I mean, you can be as bright as possible, but of course if your parents are the first one investing on you (investing cash, I mean) then everything it's a lot easier.

This happens at various levels of course.

I recently had a conversation with an ex-colleague that had just left the company and was considering moving abroad. He said he had some money saved and I was shocked to hear how much he had saved. When I came back home, feeling quite miserable I must admit, I ran the numbers and understood the where the difference in his savings and mine came from: put simply, I had to move from another region of my nation to where I currently live and work, while he's just from here. The difference merely came from not being forced to pay a rent every month and on top of that, saving more money on others things he just didn't have to pay. There's nothing bad about that per se of course, I just felt a bit bitter because I understood that no matter how good or hard I work, that's a privilege gap I will probably never fill.

Privilege is something many people don't realise, and don't realise how big of an impact it makes.
Don't you just love it when something you can not change, only can house in is declared a moral vice by a person. Born with the schizophrenia history of a family- well, if you where a moral person, you would have chewed through the navel and aborted yourself.

Totalitarian enlightenment at its finest hour. Instead of wanting to know about a condition, its usefulness, its dark-sides and how those afflicted could get along with it and there fellow men, just take those feelings in your gut, and glue some half-decent reason to it.
Not sure with n26 but when I lost my Monzo they sent a new one to Thailand without problems, fast too.
It's more similar to using a proof of work than a foreign currency. The outside force is technological advancement, and nobody has their hand on a lever.
Wait, is it just inside the major cities? Not everywhere?
The Holodomor was aimed at Ukrainians by Russians.

The Great Famine was aimed at every commoner by the Politburo.
I think if it scales to a maximum amount its fine especially for driving related violations. For example nobody needs to be paying 25 grand for a speeding violation thats absurd regardless of income. But its interesting. I believe in Mexico its based on your hourly wage and x amount of hours. So if you have no job and you get a ticket you owe nothing, at least thats how it was when my sister got a ticket in Guadalajara in '07.
>We typically try to equalize society by raising the floor for the many, rather than lowering the ceiling for the few.

When it comes to crimes like that, you want to absolutely lower the ceiling for the few as well, and scaling fines is the way to do it.
Defeating Disposable Email Addresses
I've been out of SFX for decades so can't speak for current practice; anything really black (classically velvet/black flock) is (was?) useful for hiding all sorts of things from the camera. So I'm just guessing here, but because cameras (more specifically the sensors) are much more limited than the human eye in terms of the range of brightness they can handle it's probably more useful in scientific/direct view applications.
I received a notice about not paying a ticket, 6+ years after I had paid for it. Lucky for me, I still had the paper receipt and so I went into the SF courthouse to show proof of payment. After reviewing it, the clerk told me that it looked like their IT modernization had erroneously marked my case as being unpaid. I can't imagine how very painful the resolution process would have been if I had not kept that receipt.
> To what degree

What I would do is, first list the characteristics that must not be used to make arrest decisions. Then, train an AI to recognise those characteristics. Afterwards, when training the crime predictor AI or whatever, use the first AI to scrub unwanted characteristics from the training data input. If it all works out right, the biases in the AI's decisions will reflect statistical differences between ethnicities, but won't be driven by them. And if it works out really well, you could use it in reverse a-la style transfer: what should the people of group X do differently to not be arrested so much.
> Congress can't make a law overriding the Supreme Court

Indeed they can, the Supreme court merely interprets the law. If congress decides to change the law then the Supreme Court's interpretation is moot.

These days changing the constitution is politically infeasible so it may seem this way - but ultimate power rests with Congress.
Could you change the address (as described in this article) then claim it?
> Not directly answering the question, but, one I've been thinking about: what skills/traits allow a person to make such predictions with high accuracy?

The same that make people succesfull at the stockmarket and investments. So mainly luck with a spot of knowledge and information and many small investments to get one good hit
Fire yourself up a Windows XP virtual machine, pour a glass of white zinfandel, and go to town with Rational Rose.
That's true of other cars, too. They're big, change direction slowly, and are covered in bright lights. Pedestrians are small, can (and do) change direction quickly, and often wear dark colors, even at night.

Cars are also much more predictable. They have lines that show where they're going, (usually) signal before changing direction, and (IME) are much more likely to obey red lights. I rarely see cars simply ignore a red light, but I see pedestrians do it all the time.
Downvote me all you want, but someone taking Metformin STILL HAS DIABETES.
To my knowledge, jaywalking is legal in Boston, where I live. The pedestrian is presumed to have the right-of-way.
To be fair, I don't think anyone believes that this is the one and only source of the law in all forms. As in if GitHub suddenly started changing it on their own, we wouldn't all throw up our arms and resign to our new GitHub overlords.

It would be treated no differently than someone else trying to tamper with the written law in any form.
>There are numerous streets and corners that are really poorly lit because of scaffolding/debris/etc.

Well, the city should light them properly and clean them up then?