8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions
comment 3y ago · link · parent
Interfaces don't change under microservices. Communication by contract enshrines a contract. You must ensure that your API does not break legacy users no matter what changes you want to make going forward. You have committed to behaviour forevermore once you submit the contract to other teams.
This may be another reason why IPC is often preferred over straight function calls as some languages, particularly those with static types, make extending functionality without breakage quite hard. An HTTP API can more easily resort to tricks to return different results to different callers.
> I think the red-green-refactor loop of TDD doesn't bring much.
You find little value in writing a specification for your work or you find little value in automatic validation that the program works according to your spec?
"Red-green-refactor" is a little more specific in that it says that you should write a spec only for the work you know you are going to work on in the short term, whereas TDD in general leaves room for things like writing the entire application's spec before getting down to business. I think this is most practical in the real world, generally speaking. Often you don't know what your entire application should do in the beginning, making writing a full spec unrealistic.
> I've never seen it applied well on a statically typed codebase
Interesting, as I have only ever seen specifications (be it TDD or "Word documents") written for work that is done in statically typed languages. In my experience, the dynamic programming languages tend to attract the cowboy coders who don't understand why other (future) developers need more complete documentation or why specs are important and have no care to see that those things are done.
comment 3y ago · link · parent
You can reach them by phone, but it's not the way things are commonly done, so you're going to get suboptimal results. You can also mail them a letter (the snail mail kind), but I expect you'll receive even poorer results than by phone doing so given that it is even less common to conduct business by mail. For better or worse there is only so much time in the day so you have to focus on what works for the 90% common case and just try your best for the remaining 10%.
> Because I am a paying customer. That is why.
You're paying for something, but apparently not phone support, else you would not be a paying customer anymore when they failed to provide what you thought you were paying for. What is in it for them to provide you something that you're not paying for?
comment 3y ago · link · parent
The same database is tricky because one team might want to change the schema, breaking another team's work. You then need to have meetings to discuss the changes that will work for all parties and you've broken "communicate only by contract", and therefore no longer doing microservices. If you can ensure that there is no way for teams to trample over each other then you could use the same database.
The same codebase is more feasible as long as the team boundary separation is clear. You are likely already doing microservices with other teams when you import third-party libraries. In practice, though, much like the database problem maintaining boundary separation is difficult if you can easily reach into other team's code, so often each team's work will be parted into distinct codebases using IPC between them to ensure that the separation is unbreakable. This certainly isn't a requirement, though, just one way to keep people in line.
> Testing is certainly a way to provide a self-verifying application. TDD is a toxic, hype-driven, mess
Testing is a development tool to help test the functionality of a feature. If you are faced with a dynamic language you very well might write tests to ensure that types are handled correctly. Static types can, indeed, relieve the need for some tests.
TDD, on the other hand, is a documentation tool to relay to other developers what functionality is intended to provide and how it is meant to be used. It is strange to think that documentation is toxic. Before TDD we wrote "Word documents" containing the same information, but often found that the code didn't do what the documentation said it did. What TDD realized is if the documentation is also executable then you can have the machine prove that the application behaves according to spec. It's not exactly magic.
comment 3y ago · link · parent
Isn't calling them by phone, as if you're still stuck in the 1950s, like showing up at the back door at a restaurant and wondering why you weren't greeted by the host and seated promptly? Maybe the surly dishwasher will eventually notice you standing there, but why would their 'A team' be there waiting for you?
comment 3y ago · link · parent
It is true that one may use testing to stand in for the lack of static typing, which is no dobut what the parent is talking about, but TDD != Testing. Testing long predates TDD.
comment 3y ago · link · parent
TDD is a method of documenting your application in a way that happens to be self-verifying. You could use a Word document instead, but lose the ability for the machine to verify that the application does what the documentation claims that it should. Static typing does provide some level of documentation as well, but even if you have static typing available static typing isn't sufficient to convey the full intent that your documentation needs to convey to other developers.
comment 3y ago · link · parent
If spending was our thing perhaps we'd have gotten into woodworking, or photography, or whatever it is that can take a good chunk of change to get into deeply instead.
comment 3y ago · link · parent
More concretely, let's say it costs $1,000 per month to the landlord and the tenant pays $500 per month. The landlord is losing $500 a month and wants to unload the place, so he offers the property to you, the tenant, for $500. But now you have to assume the $1,000 per month cost. What's in it for you to double your expenses?
That is unless the landlord continues to carry the $500 per month shortfall even after the sale. That would be a good deal for the tenant, but why would the landlord sell under that scenario? If you're paying $500 per month out of pocket either way, you may as well ride it out and hope things improve someday.
comment 3y ago · link · parent
Let's examine that. If you were selling it to yourself you would charge yourself $0. We have established, for the sake of argument, that you can't turn a profit renting out the place. Which means that even $0 is too high. Are you suggesting that the rate is negative? i.e. You will pay someone to take it off your hands? I think at that point you may as well just disappear into the night and never come back.
I mean, maybe you're thinking that this hypothetical person is trying to heat the place with $100 bills and the next guy to come along can cut costs dramatically by switching to natural gas, but I think for the purposes of discussion we can assume that the costs are already reasonably minimized. Are there small gains to be made with economies of scale? Sure, but I don't know if they are significant enough here.
> Are you saying that you believe people will, month after month, take a loss for years so that someone can live more cheaply in a house
I'm saying losses in business are the norm. It's not done out of the goodness of one's heart, it's just the nature of business being largely unpredictable and hard. I expect if you are discerning in your choices you can also continually eat at restaurants that see the restauranteur pay out of their own pocket for you to eat there. Even most software never turns a profit.
comment 3y ago · link · parent
To who? If it can't be profitable, why would anyone else want to buy it? Maybe you'll get lucky and find another sucker, but then you're just pushing the same problem onto the next guy.
Outside of that, about all you can do is disappear as if you never existed and let the fate of the property land where it may. But as humans tend to be strongly loss averse, more likely you'll keep plugging along in hopes that one day things will turn around.
comment 3y ago · link · parent
Not at all. The claim about not being stumped was made in response to criticism that Go is unusable without generics. Said criticism was probably made up, but I guess it was still interesting enough to garner the response that ultimately brought us here.
> That would be blub the other way around.
Seems like blub the same way around. Indeed, the blub paradox itself is paradoxical.
> the more languages (that are actually different) you have used, the more unhappy you are with every single existing language.
And the more you really appreciate just what Go has done by taking an engineering approach and not an academic approach.
comment 3y ago · link · parent
comment 3y ago · link · parent
It no doubt can be quite profitable where the tenants are willing to pay more than your costs. There are unquestionably markets where that is the case. I'm not sure it holds universally, though. Not everyone is a landlord in San Francisco renting out to software developers with the capability to pay almost anything to be there and a competitiveness to be willing to do so.
Do you really think the landlord in a dwindling town is profitable? As the town dwindles costs rise, and at the same time what incentive is there for the renters to pay more? It is not like there is a lineup behind them champing at the bit to rent the place when they leave.
comment 3y ago · link · parent
Or you will find yourself continually cycling through landlords as each one eventually gives up and sells to the next sucker. Assuming the next sucker comes along. The landlord might be stuck with the property. Real estate has been an easy sell of late, but that hasn’t been true historically.
> and increase your rent
To which you can say, "no thanks". Sure, they can kick you out[1], but with no rental income their losses will be even higher. What landlord worried about profitability wants to reduce profitability even further? The landlord is beholden to what the renter is willing to pay. The renter couldn't care less about the expenses involved in running a rental property. That doesn't factor into how much they are willing to pay at all.
[1] If your jurisdiction has liberal enough laws. Where I live it is essentially impossible to evict tenants. Even in egregious cases, like the tenant who stopped paying rent, there is currently a year+ backlog in the government signing off on the eviction.
comment 3y ago · link · parent
Although I think you are on to something per the original question about the appeal of Go. For all its faults, Go also gets a lot of things very right that aren't obvious until you have gained the necessary level of familiarity.
Once you rise above 'blub', it is indeed hard to go back. While I spend most of my days in other languages full of all kinds of fanciful features, I did a short stint on a Go project and now especially hate not having blocking functions everywhere (async/await is one of those fanciful features I have to deal with) and sensible error handling.
comment 3y ago · link · parent
Definitely not always. Loss is common in business.
Doubly so here when asset values are appreciating. If the landlord thinks they're making bank simply holding property, any rental income on top that helps minimize costs is just gravy. There isn't tremendous pressure for costs to be fully recouped.
In reality, you're paying the least amount you can that still beats the alternatives. That doesn't guarantee profitability for the landlord. The landlord recognizing lack of profits and selling the property is an alternative, but may not even be a tenable one in some circumstances (e.g. a market downturn that leaves potential buyers weary) without taking even greater losses.
comment 3y ago · link · parent
If a function accepts an arbitrary type, as is the case for all inputs in a dynamic language, one needs to document how the function is expected to behave when given x type. This is ultimately the same as type checking in a typed language. It just moves where the documentation is located.
In that move, it is true that you often lose some strictness in the quality of the documentation. The developers who have an active hatred towards their co-workers may even forgo writing documentation entirely. But if you reach that point you've really got people problems, not technical problems.
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
This means that the only reason there is a shortage is because labour is choosing to not charge higher rates for their work. When the media/government states that there is a labour shortage they are saying: "Hey workers, charge more already!" If that's not pro-labour, I don't know what is.
comment 3y ago · link · parent
comment 3y ago · link · parent
When labour is free the amount of work is infinite, but with a higher price some work is no longer worth doing and workers get reallocated into the jobs that are still viable.
comment 3y ago · link · parent
Not exactly. Weight is used as a price multiplier, but nutrient density is one of the factors that goes into establishing the per unit price. I grow wheat in a climate that struggles to produce high protein content and absolutely see a reduced price when my product doesn't meet the grade.