Better HN
topnewbestaskshowjobs
Log inSign up

randomdata

8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions

Submissions

comment 2y ago · link · parent

Is it? Kent Beck, coiner of unit test, made himself quite clear that a unit test is a test that is independent (i.e. doesn't cause other tests to fail). For all the ridiculous definitions I have come across, I have never once heard anyone call an integration test a test that is dependent (i.e. may cause other tests to fail). In reality, a unit test and an integration test are the same thing.

The post facto attempts at differentiation never make sense. For example, another comment here proposed that a unit test is that which is not dependent on externally mutable dependencies (e.g. the filesystem). But Beck has always been adamant that unit tests should use the "real thing" to the greatest extent possible, including using the filesystem if that's what your application does.

Now, if one test mutates the filesystem in a way that breaks another test, that would violate what Beck calls a unit test. This is probably the source of confusion in the above. Naturally, if you don't touch the file system there is no risk of conflicting with other tests also using the filesystem. But that really misses the point.

comment 2y ago · link · parent

What differentiates a city from a village is legal status, not size. If size means population, there are cities with 400 inhabitants, villages with 30,000 inhabitants, and vice versa. It is not clear how this pertains to tests.

When unit test was coined, it referred to a test that is isolated from other tests. Integration tests are also isolated from other tests. There is no difference. Again, the post facto attempts to differentiate them all fall flat, pointing to things that have no relevance.

comment 2y ago · link · parent

In other words, unit tests – unless, perhaps, you count an empty test as being a unit test – do not exist. "Talking" to structured sets of data, i.e. a database, is fundamental to computing.

comment 2y ago · link · parent

> The point of any test is to fail when something breaks and pass when something works

The point of any test is to document API expectations for future developers (which may include you).

That the documentation happens to be self-validating is merely a nice side effect.

comment 2y ago · link · parent

Implying that integration tests (or vice versa) are legally incorporated like cities, while unit tests are not? What value is there in recognizing a test as a legal entity? Does the, assuming US, legal system even allow incorporation of code? Frankly, I don't think your comparison works.

comment 2y ago · link · parent

In reality, unit tests and integration tests are different names for the same thing. All attempts at post facto differentiation fall flat.

For example, the first result on Google states that a unit test calls one function, while an integration test may call a set of functions. But as soon as you have a function that has side effects, then it will be necessary to call other functions to observe the change in state. There is nothing communicated by calling this an integration test rather than a unit test. The intent of the test is identical.

comment 2y ago · link · parent

When you sit down and go over the reports and give direction with your employee each week, it should stand out pretty clearly if they are not doing their job. No different than any other organization where you hire employees. Cities and countries are not somehow magically different. Of course, you don't just vote for the employee you like and never speak to them again. That would be just plain silly. Being the boss doesn't mean you can sit idle on a sandy beach for the rest of your life.

Although that is not nearly as silly as hiring an employee and then doing their job for them. There is no point in hiring anyone if you want to do the job yourself. You go through the employee election process because you recognize that it is more efficient for one person to do the work on your, and your neighbour's, behalf. You are choosing to hand off the work to someone else precisely so you do not have to do it.

comment 2y ago · link · parent

> they essentially have two kinds of produce: cheap and expensive. Not too much of a middle ground there.

In fact, there is middle ground as the least expensive product goes for animal feed. The middle ground is the lesser quality, but still high enough quality, product that human consumers are still willing to purchase.

You, of course, set out to grow the highest quality product you can – it fetches the highest value, after all – but Mother Nature often has other plans.

comment 2y ago · link · parent

If your time is worthless, the least expensive option will be to produce your own food.

If your time has value, the least expensive option will be to buy from a commercial kitchen.

What is reasonable is subjective and depends on the experience you want to have.

If you enjoy cooking as a hobby and are able to afford the high cost of operating your own kitchen, then that will be the only reasonable choice in your mind, and in that case the grocery store will provide a pretty nice experience in simulating wholesale distribution in quantities the hobbyist can manage.

A number of reports suggest that commercial kitchen use is on the decline, so, assuming people aren't eating less, it seems that cooking is gaining in interest as a hobby. Thus it stands to reason that the grocery store can charge that elevated interest more than in times past. That's just basic supply and demand.

comment 2y ago · link · parent

Hardly. If you do not pay your taxes, other people will seek restitution. If you do not engage in the experience provided by the food middlemen, nobody is going to care.

One can always by directly from the farmer, or produce their own food, if they truly do not want the experiences provided by the third parties. But I expect most people will find out that the experiences are actually pretty great.

comment 2y ago · link · parent

Importing `C` declares that you intend to use Cgo instead of Go. Cgo is not Go[1].

[1] https://go-proverbs.github.io

comment 2y ago · link · parent

The third parties provide an experience.

comment 2y ago · link · parent

The pockets of the entire economy. Ultimately, food is mostly sold on futures contracts, so realistically the end consumer is currently paying the price from one to two years ago when the farm gate price was double what it is now. Within the next year or so, retail food will no doubt crash hard as those old contracts start to clear and the much lower contracts of today start to come into force.

comment 2y ago · link · parent

People seemingly value the experience of shopping in a grocery store more now than two years ago.

comment 2y ago · link · parent

> what about when people actually have a good model, and a disinformation stream replaces that with a bad model, or causes them to just say 'nothing is true'?

Do they actually have a good model? Or a flawed model with good intentions?

Global warming stands out as a prime example where many accepted the general idea in theory back when it was a novel concept, but under a flawed model, and when the flawed model didn't stand up to practical use the conversations began... There was an attempt to rebrand the idea as climate change to try and reset the clock, so to speak, but in many ways that only confused the issue further.

comment 2y ago · link · parent

> basic necessities like [...] food are significantly more expensive than they were just two years ago.

Here on the farm, the price I'm getting when selling food is half of it was two years ago. If I, the farmer, am selling the food for less than two years ago, while you are paying more than two years ago, then it seems experiences are you problem – e.g. you are paying more for the experience of shopping in a grocery store.

comment 2y ago · link · parent

> to understand any of the above to a useful level.

The standard model for electrical current is not true, but it is still useful in the vast, vast, vast majority of cases. True and useful are very different things. The conflation here is erroneous.

The average person is never going to understand what is true in any meaningful way, and even those who focus on certain truths are going to be focused on very specific truths, not all truths. There is only so much time in the day. For everything else they have to work with simplified models that may be quite disconnected from reality, but as long as they work for all practical purposes, who cares?

> And you are claiming that adding industrial-scale AI agents to the public 'conversation' at a scale never seen in history will have zero effect?

Conversation only happens when people realize they are working with a faulty model, so if conversation keeps happening then that means people are realizing that the model they currently have doesn't work. What do you think is going to happen with more noise? If people can't find a usable model in a not-so-noisy environment, do you think they will suddenly be able to find one in a noisier environment? That seems quite unlikely. In reality, the outcome is the same either way.

Maybe increased noise will turn more interest to the vetted environments and ignoring the noisy conversations, but if people are already not finding the vetted, the reality is that we are not likely to see change there either.

comment 2y ago · link · parent

I have seen it. Nobody I know posts on Facebook anymore, so when Facebook is desperately trying to find content to fill the feed it turns to whatever it can come up with from random accounts.

The apparent active group of friends you have is no doubt why you haven't seen it. That activity gives Facebook something to work with.

comment 2y ago · link · parent

Most cities and counties see the people of those cities/countries hire representatives to discover and report on the things that should be cared about that are not immediately in front of the average person going about their day.

If you alone feel you also need to duplicate their efforts, you may just have control issues, but if the need is genuine and shared by many then you need to rally the people to get the problem solved. Paying an employee to do nothing while you pick up the slack is a plain waste of resources.

comment 2y ago · link · parent

It has never been realistic for people to find the truth, perhaps save those who are focused on a very narrow subject of truth and are dedicating their lives to the study. We have always relied on a collection of people with the aforementioned focus with some system of accreditation to tell us what is true.

While far from perfect, I'm not sure a deluge of generated AI nonsense outside of the vetted channels, complementing people already stirring up nonsense, changes anything.

comment 2y ago · link · parent

Robots don’t work for free. Perhaps they will pay.

comment 2y ago · link · parent

Sounds like the real problem is that the consumer is not very good at communicating their wants, leaving people to guess at what they might be interested in.

comment 2y ago · link · parent

> I don't understand why this continues to be newsworthy.

It's not. It is a marketing opportunity.

comment 2y ago · link · parent

I'm not sure that follows. The bill is specifically targeted at "big tech". Businesses with less than $1 billion in revenue and/or fewer than 20 million active Canadian users are exempt.

Presumably he is talking about news startups. For instance, a news agency with fewer than two employees is not eligible to receive the funds. This makes it difficult to bootstrap a startup news organization while the established players are sitting there collecting free money from the government.

comment 2y ago · link · parent

This is to have multiple relations returned. Traditional unions and joins only see one relation returned.

You can pack multiple relations into one relation using unions/joins and then unpack it again in the client to ultimately achieve the same effect, which is a workaround that some utilize, but that is really hacky (to be clear, unions and joins are not hacks when used for their intended purpose, but the data packing is).

The proposed would be much less hacky - although still far from an ideal database that has no latency constraints that force deviation from what is "pure". But that’s engineering for you.

comment 2y ago · link · parent

My interpretation is to enable a query to return many relations in order to overcome the high latency associated with most RDBMBes that often prevent using relational databases in a "theoretically pure" way. It's a hack, but possibly a better hack than the hacks we currently resort to.

comment 2y ago · link · parent

If there was group of spooky masterminds behind tobacco, why would they waste their time on a relatively small market like the USA?

comment 2y ago · link · parent

There is no mention or implication of there being a free market. Start a new thread if that is a subject you are interested in. Nobody in this thread is.
1
858687
256