Better HN
topnewbestaskshowjobs
Log inSign up

randomdata

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

Submissions

comment 4y ago · link · parent

> If your customer decides they want/need ASCII your test is immaterial.

Not at all. First, if your customer doesn't know upfront that ASCII is necessary, showing the customer how the program will work will help them realize that. The lesson gained from your test was useful in getting to get to that point.

Second, your failed attempt at an interface that provides UTF-8 (or whatever) during exploration is convertible to a negative case that will fail if ASCII isn't used, documenting the customer's requirement for future developers.

If the customer originally required UTF-8 and years later a changing landscape forced them to require ASCII instead, again your spec can be negated to help you ensure that you made the correct modifications to meet the new requirements.

> Aspirational tests are great if you know exactly what you need to do.

Whereas I would argue that TDD isn't all that useful if you know exactly what you need to do. In that case you can simple write the code along with unit/integration/acceptance tests that validate behaviour.

TDD is about exploring the unknowns and answering questions – showing the customer how the program will function on the outside – before you waste time implementing all the internal details of a full program around UTF-8 only to be told when you demo it that the customer actually requires ASCII, potentially requiring massive rework. The latter is where you waste effort.

comment 4y ago · link · parent

It does not sound backwards at all. That is what TDD is for: To start writing the visible portions of your program to see how it works and adjust accordingly as user needs dictate. Once your program does what the user wants, all you have to do is backfill the "black box" implementation, using test cases created during the discovery phase to ensure that the "black box" provides what the user came to expect. The scenario you present is exactly what TDD was envisioned for.

If you know the exact requirements upfront, you don't really need TDD. You can simply write the code to those requirements and, perhaps, add in some automated acceptance testing to help catch mistakes. TDD shines when you are unsure and exploring options.

comment 4y ago · link · parent

Much, much worse is users having to deal with things randomly breaking after an update because someone decided they could make it better.

That's not to say you can't seek improvement. The public interface can be expanded without impacting existing uses. If, for example, an existing function doesn't reflect your current view of the world add a new one rather than try to jerry-rig the old one. If the new solutions are radically different such that you are essentially rewriting your code from scratch, a clean break is probably the better route to go.

If you are confident that existing users are no longer touching your legacy code, remove it rather than refactor it.

comment 4y ago · link · parent

> Most organizations want to start work even while the final specs of the work are being worked on.

Is that significant? Your tests can start to answer these unanswered questions before you ever get around to writing implementation. Suppose you thought you wanted to write data in ASCII format. But then you write some test cases and realize that you actually need Unicode symbols. Now you know what your implementation needs to do.

Testing is the spec. The exact purpose of testing, which in fairness doesn't have the greatest name, is to provide documentation around what the program does. That it is self-verifying is merely a nice side effect. There is no need for all the questions to be answered while writing the spec (a.k.a. tests). You learn about the answers as you write the documentation. The implementation then naturally follows.

comment 4y ago · link · parent

Public interfaces should change only under extreme circumstances, so needing to refactor legacy tests should be a rare event. Those legacy tests will help ensure that your public interface hasn't changed as it is extended to support changing requirements. You should not be testing private functions, leaving you free to refactor endlessly behind the public interface. What goes on behind the public interface is to be considered a black box. The code will ultimately be tested by virtue of the public interface being tested.

comment 4y ago · link · parent

TDD isn't concerned with how your program works. In fact, implementation details leaking into your tests can become quite problematic, including introducing the problems you speak of. TDD is concerned with describing what your program should accomplish. If you don't know what you want to accomplish, what are you writing code for?

comment 4y ago · link · parent

Then you must have mistakenly replied to the wrong thread? If you are in a position where you can introduce fx, then you are also in a position to introduce testing, and testing will already force testable code. If fx can help your code, great, but that's orthogonal to the discussion.

comment 4y ago · link · parent

If you refactor code to be more testable then it is testing that is forcing you, not fx.

comment 4y ago · link · parent

> I've found that unless I write code in golang in a way that was intentionally written to be unit tested, it is very hard to bolt on unit testing after the fact.

Absolutely. This is true in most, if not all, languages. But when you're in the driver's seat, able to make choices like whether or not to use fx, why would you bolt on testing after the fact?

Not much you can do about legacy code, if that's what you have to deal with, but when dealing with legacy code it is unlikely the authors used fx, so...

comment 4y ago · link · parent

Doesn't FedNow just provide transit? Whether the payment comes out of a deposit account or a credit account seems beyond the purview of FedNow and up to your arrangement with your bank, similar to how VISA is used to provide transit for credit cards as well as debit cards, depending on your arrangement with the card issuer.

comment 4y ago · link · parent

> Obviously, you can use that same pattern on your own without fx, but going all in on fx really kind of forces you to do it.

Unless you are trying to add tests to legacy code, where you also wouldn't have much say in the use of fx, wouldn't the stated testing difficultly already force you away from that dependency mess?

comment 4y ago · link · parent

It may be not true right now amid difficulty in finding labour and materials. Much like cars, the value of a used home is proportional to the cost of building a new home. When new homes are difficult to acquire, cost of used homes go up. Used cars have also increased in value lately for the same reason. This is not typical, however. These are normally depreciating assets.

Under usual market conditions, houses are headed to being on the older side and reaching the end of their effective lifetime, leaving little value left in the structure. You can renovate a home to bring it back to new-like condition, which restores value to the structure, but that cost must be maintained in the equation.

comment 4y ago · link · parent

> the group with the most voting power "feels" powerless?

It seems like a strange thing to have powerless concerns about as voting only selects a representative. In my experience, the most likely candidates are all reasonably suited to the job, leaving it to matter little who ultimately wins. Even if you are powerless it is not that big of a deal, being the most inconsequential part of the process.

The real work happens after the vote has taken place when you have to start engaging with the selected representative on the regular to make your perspective known. It is guaranteed that you didn't elect a mind reader. It is not clear if the younger generations are aware of that. This may be why they feel powerless.

It my youth the message was always "contact your local representative", but in recent times that message has changed to "how could <insert political figurehead> do this to us?" There is some apparent degree of learned helplessness at play; perhaps because greater media exposure gives us insights into places with strong dictatorships and we project their conditions upon ours.

Invariably, those with enough land ownership ties will ultimately run into municipal issues that will require approaching council, at very least forcing a deeper understanding of government upon them. This may also help explain why those who own things are apparently more engaged politically.

comment 4y ago · link · parent

Importing immigrants in Canada requires that the employer provide suitable housing for the imported workers, so that brings us back to the earlier comment.

comment 4y ago · link · parent

> What I meant is an ability to be within the reach of any other person within an hour.

Is that all that significant? I live rurally and can be within reach of any other person in two different large cities (along with some smaller ones) within an hour. Under some circumstances, I can be at a shared meeting place in one of those cities before a person who lives in said city can get there. The highway is incredibly efficient.

Moreover, such proximity to the city – but also off the beaten path – seems to make it an attractive place for the rich and famous to have homes. I run into household names at the small town coffeeshop quite regularly.

What is significant, however, is the the city is much more amenable to wealth concentration. That small town coffeeshop might see 100 customers in a day, while a coffeeshop in a dense city can draw on thousands of customers, allowing a coffeeshop empire to be established. The small town coffeeshop will never be able to grow the same way.

comment 4y ago · link · parent

> and they've managed to keep prices down.

Perhaps it would be more accurate to say that they managed to crumble their economy which brought the value of housing down with it? They had a massive housing boom before the "Lost Decades". Japan is no stranger to asset prices rising out of control.

That said, when I have looked at Tokyo pricing it has always been in line with high priced North American cities, only configured differently. The difference in configuration means that the sticker price is often lower, but you are getting less for that lower price. Apples to apples the prices have always shown to be in the same ballpark.

comment 4y ago · link · parent

Houses are ultimately purchased with wealth, so labour value input isn't all that significant.

comment 4y ago · link · parent

I see nothing in your comments to suggest there is grammar inconsistency. If it had instead said "Sick Codes has jailbroken a 4640 Universal Display", which maintains identical grammar, I doubt we would be here. What you have actually suggested is that the subject selection isn't consistent.

I am not sure a strong case has been made for that, though. We can found countless examples of people referring to an object by the name of the business who produced it. This is very common when the individual product lines are not well known, and especially when the branding of the business is what is front and centre.

Furthermore, the message was written to describe a set of photos, so what detail was lacking in the words was made up in the images. If you are familiar with Deere's product lines, you can plainly see it is a 4640 that is being referred to. If you are not familiar with Deere's product lines, you know it's not a plow, all while the device calls itself a "John Deere". A branding fail on John Deere's part, perhaps, but the words are consistent with what is shown.

comment 4y ago · link · parent

> UNpaid workforce

Automation is far from unpaid. At very least it expects you to give it food (electricity, gasoline, etc.), shelter, and healthcare (repairs and maintenance). Generally the same things that humans expect from you.

Automation is significant not because it is unpaid, but because it can often do much more work for the same amount of pay.

comment 4y ago · link · parent

> you can't jailbreak "an" Apple, and you can't order "a" McDonald's.

Nor can you drive a Ferrari, but people often say such things anyway, especially when they don't know what kind of Ferrari it is that they see being driven where only recognizing the Ferrari branding. This is not uncommon at all.

It's only less common when specifics are common knowledge. Most people are familiar with Apple's products, so they can be more specific. Most people are familiar with McDonald's products, so they can be more specific. Most people have absolutely no idea what John Deere does beyond some fuzzy notion of "farm equipment manufacturer".

In hospitality, "I'll order a Local Craft Beer Co." is something I hear quite often, where the individual beers made by 'Local Craft Beer Co.' don't have wide recognition. This is functionally the same as your McDonalds example.

comment 4y ago · link · parent

Were you left to believe John Deere, the person, was being jailbroken? There should be no room for confusion, especially when the text was describing a photo of a Universal Display playing Doom. "Device" is already given by the nature of the photos.

comment 4y ago · link · parent

> the attackers have that information and could have looked it up if they didn't.

The Tweet was clearly not written by the attacker... The attacker did reply with the exact model of the device later on.

Trying to figure out what you're looking at while live-tweeting a presentation isn't exactly easy. Us farmers might have recognized it right away, but the CEO of iFixit is decidedly not a farmer. These are not common devices outside of niche uses.

If you want detailed information, maybe don't turn to something that is being reported as it is happening through a short messaging service?

> all I am trying to say is that "jailbroken a John Deere" makes zero sense on its own, and doesn't convey any useful information on its own.

It might not make sense on its own, but it wasn't stated on its own. It accompanied photos of the device in question. You know full well from context what "John Deere" means in this case; at very least you can discern it is some kind of computing device made by John Deere.

The "Turns out our entire food system is built on outdated, unpatched Linux and Windows CE hardware with LTE modems." part of the Tweet was far more ridiculous.

comment 4y ago · link · parent

> John Deere is broadly understood to only make tractors.

It is not a tractor that is jailbroken here, though; not even a computer built into a tractor.

It is their "Universal Display" that has been jailbroken, which is a computer that is sold as an independent unit. Often you will move these displays between machines and, in some cases, even use them in tractors built by other manufacturers or even away from farm machines entirely.

For all intents and purposes it is a different category of product.

> You wouldn't refer to an iphone as an Apple because Apple is generally known to produce several different categories of products.

I expect the real difference here is that the iPhone is a household name. Most know what an iPhone is and are able to recognize one when they see it. It would absolutely get called "an Apple" if that is all that was known about the device. In fact, I know some not-so-technically-engaged people who do call their iPhone "an Apple", reflecting the branding visible on their device. Apple removed the iPhone logo several iterations ago.

How many are familiar with the 4640 Universal Display? Approaching nobody, I expect. Especially when at a tech conference and not a farm show. The device is branded with "John Deere" and no other visible markings, so it is understandable that it was called that in the absence of additional information.

comment 4y ago · link · parent

The device brands itself as a "John Deere", displaying no other visible markings, so I think it is reasonable in this case.

Obviously those with inside technical knowledge can refer to it with more clarity, but the tweeter doesn't seem to be someone with strong ties to agriculture to have that technical knowledge in the moment of live-posting something happening in front of him. He's working with the information he has. A branding fail by Deere, perhaps.

It is not unusual to refer to objects by their visible markings, especially when you don't have any additional information to be more specific.

comment 4y ago · link · parent

Works on the 2630 and 4240, apparently.

comment 4y ago · link · parent

If gas wasn't so cheap, more likely the price of trucks would come down to compensate and the same number of units would roll off the lot. GM makes nearly $20,000 in profit on the sale of a truck. For comparison, a Chevy Trax barely sells for $20,000 out the door. The margins on trucks are huge.

It's a tough situation for buyers. I'd rather have a car 90% of the time, for a lot of reasons, but I legitimately need a truck 10% of the time. A car cannot become a poor truck, but a truck can become a poor car, and so the truck wins.

comment 4y ago · link · parent

> which i think is an attempt to understand who the aggressive party/parties are in your opinion

Appeasement is defined as policy that avoids conflict. The conflict in Ukraine hasn't been avoided and remains ongoing, so Russia does not fit no matter how you slice it. Nor does the West, to be fair. Conflict hasn't been avoided full stop.

If, for argument's sake, conflict has been avoided, it is important to understand what concessions have been made to Russia, if Russia is the aggressor. It matters not who the aggressor is if nobody is performing appeasement in the first place. I am not aware of the West providing any concessions to keep Russia happy as it pertains to this. Instead, sanctions has been imposed against their wishes.

Russia pulling out and conceding Ukrainian territory back to Ukraine to keep the West happy is how sanctions will be lifted. The West is not the aggressor in the war, but could be considered an aggressor when it comes to sanctions. They were very much intended to be putative. If appeasement is relevant (which is debatable), that is where it fits given the subject of what it will take to see sanctions lifted.

One's feelings about whether or not Russia is justified is irrelevant and a change in subject. Furthermore, use of language needs to be introspective of broad interpretation, so even if personal opinion would serve to skew in some fashion, it does not hold relevant to understanding language use in a community.

comment 4y ago · link · parent

Seems they do, more or less. I once had a GM vehicle where the OnStar system (not activated) would occasionally fail to turn off and drain the battery overnight. Although, once I discovered the source of the problem yanking the fuse made it go away.
1
143144145
256