Better HN
topnewbestaskshowjobs
Log inSign up

randomdata

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

Submissions

comment 3y ago · link · parent

Even if you could get away with it, no amount of money is worth having to endure two standups per day.

comment 3y ago · link · parent

> Abstract insight into a problem and its solution needs to be implemented into policy by the government.

That's all well and good if you live in a dictatorship, but those of us under democracy are lead by the same individuals that who won't act. Only once they have decided to act and feel the need to clean up the outliers who continue to go against the grain will they use their governmental powers.

comment 3y ago · link · parent

Factory farming mostly takes place inside barns so, for all practical purposes, it is not really any more visible than fishing.

comment 3y ago · link · parent

The only winners in a debate are those who learned something, so yes, it stands to reason that the winners are going to be "wrong".

comment 3y ago · link · parent

There is an opportunity cost. Time spent washing dishes means time not doing something more productive.

comment 3y ago · link · parent

> I’ve taken lunch to school in paper bags that were literally brown

Are you sure they weren't a certain shade of orange?

comment 3y ago · link · parent

> I think it makes perfect sense not to refer to women primarily by their marital status

Not in isolation, but in full context there may be some practical merit. In the earlier age where these titles were used, women adopted their husband's entire name. A woman who married Mr. Robert Smith would become Mrs. Robert Smith. This provides feedback that her given name isn't Robert. Ms. Robert Smith would be ambiguous. Is her given name actually Robert or is she married to Robert? Who knows?

But, indeed, in the modern age nobody cares about titles. We have heavily curated Instagram feeds, or whatever it is the cool kids are into these days, to serve as a status indicator instead. That's the thing about status indicators: They only serve to display status for so long until it becomes commonplace and those with status have to move on to new indicators to stand out.

comment 3y ago · link · parent

> Who are they for?

You can determine who something is for by looking at who is paying for it. This one is provided to us for free and without any obvious source of third-party revenue (e.g. advertising), so, like HN comments, it is no doubt for the author.

comment 3y ago · link · parent

Seems to me that the real villain is the network interchange companies. The credit companies which use said networks are numerous and are in reasonable competition with each other, continually eroding their share of the transaction fee to provide more and more compelling 'rewards' to their customers.

Once upon a time people dreamed that blockchain would provide the network, operating in a distributed fashion that isn't dependent on one or two companies, and bet big on it becoming that, but obviously that didn't pan out.

comment 3y ago · link · parent

> Someone has put some notion of function identity in his head

The only comment that talks about function identity is this one[1], and it is written by you. "His head" refers to your own?

I used the word identity earlier in that thread, but I definitely wasn't referring to functions. The word "function" isn't even found in the comment.

[1] https://news.ycombinator.com/item?id=34983709

comment 3y ago · link · parent

> The event doesn't trigger any behavior.

Yes, that's right. We're talking about EDA, not CQRS or the like. EDA events signal a change of state from one component for other components to synchronize on. They are not commands to react to.

comment 3y ago · link · parent

> it had the potential to be a good test run to see how we deal with a more fatal pandemic.

Wasn't the AIDS pandemic already a good test run? It appears AIDS killed twice as many people in the African region in the year 2021 alone than COVID-19 has all told. Particularly with respect to the Americas, I expect AIDS would have proven to be far more deadly if it weren't for our effective proactive measures. That we seemed to be running around like chickens with our heads cut off when COVID-19 came around, even after the lessons learned from the previous major pandemic not that many years earlier, suggests that we simply don't learn (or tells that pandemics can be different enough that the lessons aren't transferrable).

comment 3y ago · link · parent

> I think the point is you're not doing anything with the event immediately, just setting the key state so it can be polled later.

Which is event-driven architecture. A component signals that something happened and other components take in that information and update their local state as appropriate.

comment 3y ago · link · parent

> You should reread “Refactoring”.

With respect, you should reread the comment chain. You're clearly just repeating what has already been said.

comment 3y ago · link · parent

Is testable code a tradeoff too much? That cannot be answered globally, only locally. That's why we have engineers, after all. You could eliminate the entire profession of engineering if "which tradeoff is best" could be answered broadly without deep understanding of specific circumstances.

comment 3y ago · link · parent

> Nowhere is it written that behavior in a system is strictly additive.

For a unit of the same identity to suddenly start doing something different is plain nonsensical, never mind the technical challenges that come with breaking behaviour that should scare anyone away from trying. Logically, a unit is additive until the unit are no longer used, at which point it can be eliminated.

> But the old tests disappear with the old code (when the feature toggle goes away).

Absolutely, but static analysis can easily determine that the tests being removed correspond with units being removed. If (TDD) tests are removed and the unit code isn't, something has gone wrong and your infrastructure should make this known.

comment 3y ago · link · parent

> TDD is about writing new code.

TDD is about documenting behaviour. Which is why it was later given the name Behaviour Driven Development (BDD), to dispel the myths that it is about testing. It is true that you need to document behaviour before writing code, else how would you know what to write? Even outside of TDD you need to document the behaviour some way before you can know what needs to be written.

A function's behaviour should have no reason to change after its behaviour is documented. You can change the implementation beneath to your hearts content, but the behaviour should be static. If someone attempts to change the behaviour, you are going to know about it. If you are not alerted to this, your infrastructure needs improvement.

comment 3y ago · link · parent

> there's no guarantee that the function call you see is doing what you remember it doing a year ago.

TDD provides those guarantees. If someone changes the behaviour of the function you will soon know about it.

That's significant because Robert 'Clean' Martin sells clean code as a solution to some of the problems that TDD creates. If you reject TDD, clean code has no relevance to your codebase. As Casey does not seem to practice TDD, it is not clear why he though clean code would apply to his work?

comment 3y ago · link · parent

> I think the author is taking general advice

Not just general advice, but advice that is meant to be applied to TDD specifically. The principals of clean code are meant to help with certain challenges that arise out of TDD. It is often going to seem strange and out of place if you have rejected TDD. Remember, clean code comes from Robert C. Martin, who is a member of the XP/Agile gang.

The author cherry-picking one small piece out of what Uncle Bob promotes and criticizing it in isolation without even mentioning why it is suggested with respect to the bigger picture seemed disingenuous. It does highlight that testable code may not be the most performant code, but was anyone believing otherwise? There are always tradeoffs to be made.

comment 3y ago · link · parent

> But he seems more interested in picking a fight with clean code.

Or, more likely, a straw man.

"Clean" exists to provide some solutions to certain problems in TDD. Namely how to separate your logic so that units can be reasonably put under test without an exploding test surface and to address environments which are prohibitively recreated. If you don't practice TDD, "clean" isn't terribly relevant. As far as I am aware, it has always been understood that hard-to-test code has always had some potential to be more efficient, both computationally and with respect to sheer programmer output, but with the tradeoff that it is much harder to test.

It is useful to challenge existing ideas, but he didn't even try to broach the problem "clean" purports to solves. Quite bizarre.

comment 3y ago · link · parent

> TDD and exhaustive unit testing make the maintenance process harder because you don't know if a test is useful or not.

TDD was later given the name BDD (Behaviour Driven Development) to emphasize that you are not testing, but actually documenting behaviour. What kind of behaviour are you documenting that isn't useful and why did you find it necessary to document in the first place?

> If you follow TDD, most unit tests are re-written all the time.

What for? If changing requirements see that your behaviour has changed to the extent that that your unit does something completely different, it's something brand new and should be treated as such. Barring exceptional circumstances, public interfaces should be considered stable for their entire lifetime and, at most, deprecated if they no longer serve a purpose.

The implementation beneath the interface may change over time, but TDD is explicit that you should not test implementation – it is not about testing – only that you should document the expected behaviour of any implementation that may carry out your desired behaviour.

comment 3y ago · link · parent

“CLEAN” doesn’t care so much about readability, but rather testability. The video would have been far more compelling if Casey had spent more time showing how he would test his application without the test surface area blowing up exponentially as the feature space expands.

comment 3y ago · link · parent

Your land must be poor?

500 fully owned acres of grain production would net you several hundred thousands of dollars around here. If you can't support a family on that kind of income, I dare say you are doing something horribly wrong.

The math changes if you are carrying debt or renting, of course.

comment 3y ago · link · parent

Housing in Toronto was affordable in the 90s because there was cheaper alternatives. Whether or not one preferred to live in Toronto is immaterial. What is significant is that there was an even more affordable choice to move to the edge of town, keeping pressure away from the core. Price is moderated by choice, after all.

In the 90s, a 100 acre farm here would have sold for around $100,000. Today, the same farm would sell for around $3 million. That is a substantial increase to acquiring the land and a cost that is burdened even if you choose to put a home on the land. This means that there isn't a cheap option outside of town to provide as an alternative like their historically was. And, thus, that puts more pressure on prices within the city.

comment 3y ago · link · parent

> How could you possibly be agile in that environment?

You couldn't. There are a lot of real-world scenarios where you can't be agile. For one, it suggests that it won't work if you don't have motivated individuals. There aren't enough motivated individual developers to go around, so someone is going to get stuck with unmotivated individuals and won't be able to be agile.

Such is life. It is not some kind of commandment. It's okay to not be agile.

comment 3y ago · link · parent

> The reason the agricultural land is not converted into housing is because there's little demand for it - not because it's essential to food production.

As an Ontario farmer located several hours from Toronto, I have had a seemingly endless line of people wanting to buy a small plot from my farmland on which to build themselves a home. The demand is there[1], but there is far too much red tape to make it happen. Furthermore, the price of food has been strong for the last decade or so which has sent the price of farmland sky high (up ~500% over the last 15 years), making housing on those lands more expensive. I would suggest that the price of housing in the cities has gone up exactly because it has become considerably more expensive to build out into the farmlands compared to earlier decades. When sprawl is too costly, that puts more pressure on existing city boundaries.

[1] Or at least was there. It is not clear if there is much lingering housing demand in Ontario as of the past few months. All reports I read indicate that people don't want to own homes anymore.

comment 3y ago · link · parent

View of what Dijkstra said. How one feels about the subject has no meaning nor relevance to the discussion.

comment 3y ago · link · parent

You certainly wouldn't be the first to hold that view.

However, Dijkstra accepts abortion clauses, which is what return really is (it is not an exit clause). My take is that his argument is that an unbridled go to is too primitive and that he believed go to statements should be bridled by additional structure that help describe the process, not that go to should be avoided entirely.

While I think we can agree that return is go to, it is a bridled go to. It strictly limits what a programmer can do, avoiding the mess Dijkstra claims an unbridled go to promotes. It is predictable and understandable, clearly describing the intent.

Exception handlers have no such strictness. It is not clear, without studying the program in its entirety, where your code will end up. That can be a good tradeoff when you are dealing with exceptions. The only reasonable response to encountering an exception is to ultimately crash, so at that point who cares? But, indeed, using exception handlers for control flow (e.g. passing errors around) is considered harmful.

comment 3y ago · link · parent

> He is very clearly arguing for “single entry single exit”.

Agreed. Return forces you into a single exit. Upon hitting return, the code can only return back to where the function was originally called. It cannot 'arbitrarily' jump to some other place in code as you could do in an unstructured programming language like, say, BASIC. Which is what Dijkstra was pushing for, being a strong proponent of structured programming.

I don't know of any modern programming language that does allow anything outside of a single exit, exception handlers and setjmp/longjmp excepted. There is a good case to be made that the latter two reintroduce the very problem Dijkstra warned of and are generally considered harmful for the same reason.

comment 3y ago · link · parent

Not in the Dijkstra "Go to statement considered harmful" sense. Nor are the goto keywords found in most modern languages. These retain structure and thus are not considered harmful.

But there is a good case to be made that exception handlers are gotos in the Dijkstra sense, at least when used for anything other than exceptions, like passing errors around.

1
115116117
256