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

I'd rather have a richer analytics system, but I'll take it over no analytics. It is beneficial to know that someone has consumed your work. There is no fun in speaking to the void.

comment 4y ago · link · parent

Someone pressing the button allows you to know, with a reasonable degree of confidence, that someone read your message.

If you receive no replies or other feedback you would have no way to know if your comment was ever read by anyone. This differs from the real world where you can usually determine by various cues that someone heard you.

comment 4y ago · link · parent

The display of outside temperature is a curious oversight. That's the one thing I find myself regularly toggling back to the native console for.

iOS plasters that information all over the place when running on the device itself, so it is not like it is out of character.

comment 4y ago · link · parent

I doubt it. It seems quite apparent that Thompson just wanted to take another stab at creating the next generation in the B -> NB (New B) -> C -> Go family tree. It would have likely been named D if the name wasn't already taken.

Pike slapped his Newsqueak's CSP paradigm on top and the rest is history.

comment 4y ago · link · parent

Fast compilation times are a human-centric goal. The machine couldn't care less if it takes a millennia to compile your program. Only humans care about fast compile times.

But, I'm not sure that is even the primary benefit. The primary benefit is that you won't be incentivized to leave unused imports and variables to litter your code, as I see happen all the time in languages that aren't so strict. The Go team has even stated that they decided there would be no warnings because they've learned that warnings get ignored.

comment 4y ago · link · parent

Which suggests that pay disparity isn't the source of their decision making. After all, if they are simply trying to spite tech for not paying them as much as men doing the same job then they would do the same in healthcare where you indicate men are also paid more.

comment 4y ago · link · parent

Casting errors to exceptions (panic/recover) are considered a valid approach in Go within your application logic. Its built-in HTTP handlers will even 500 out of the box if a panic isn't recovered beforehand.

But other layers of abstraction lose their utility value if they start to make assumptions about the caller. Maybe in your web service a 50x stop the world error is all you'll ever need if there is a database error, but the next guy using the code for another purpose could have very different requirements and when you have to actually deal with errors, exceptions become a royal pain very quickly. As such, the official line is simply that you shouldn't let errors casted to exceptions cross package boundaries.

But, again, Go isn't really designed for stop the world programming and it's okay to use another tool if your problem space is suited to stopping the world.

comment 4y ago · link · parent

> What kind of utopian programming job do you have that you don't have to think about errors?

My job primarily requires thinking about errors. It is why I wish for Go-style errors in the languages I use.

But on rare occasions I write things like batch scripts, automations, etc. in which failure means addressing the issue in realtime and trying again. There you don't care much about errors other than ensuring that the world stops when an error occurs to allow you to fix the problem before continuing.

While contrived, if you run into a "client A attempted to purchase item B which is limited to client C" error in this space you're probably going to have to phone them up and tell them that you can't process the transaction, apologize for the mistake, remove record of their purchase, and then once complete run the script again. The program crashing with an error message is sufficient here.

Different tools for different jobs.

comment 4y ago · link · parent

On the other hand, Go's defining feature: Its CSP model, lifted from Newsqueak, was originally designed for user interfaces.

I believe Go could be a really great fit for UIs, but likely never will be as there is little economic incentive to put in the incredible heavy lifting required to build up the support libraries. There are certainly some small projects trying, but without massive resources backing it, it is a struggle to achieve the full fit and finish that we've come to expect.

comment 4y ago · link · parent

While that may look good for a hypothetical example, I'm not sure how beneficial it is in real-world use. If your higher level functions are directly passing errors from your lower level functions then you start to bake implementation details into your abstractions which becomes a nightmare later when your implementation changes and callers are depending on those details. In reality, you need to deal with the error immediately and, if there is no better option, return your own error that describes the problem in a non-implementation-specific way.

It is possible that with other error-related features added to the language you could avoid those traps, but Go doesn't feature those either, so simply adding that construct without thinking about the problem much more deeply doesn't buy you much.

If you are solving a stop the world when you encounter an error-type problem that might be okay, although I'd argue that you may as well panic instead. But, again, Go isn't designed for those problems and I'm not sure it needs to be. There are already plenty of good languages designed for that type of work.

comment 4y ago · link · parent

> needs better error handling

First it would need to add error handling before it could look to improve upon it.

I'm not entirely convinced it should. I spend my days in a variety of other languages that have added error handling in various ways and, in my experience, it always ends up making errors unnecessarily difficult to do deal with. I regularly wish the idioms of those languages recognized errors as being core to your application as any other value, not something to treat differently. Go really got things right for the type of software I write.

But not all software is solving the same problems. There are a lot of programs where you don't need to think about errors; where stopping the world is fine if you encounter one. Go is not at all a good fit for these situations. However, I think it is okay for Go to not try to be all things to all people. We already have plenty of other good languages that serve other niches. Right tool for the job and all that.

comment 4y ago · link · parent

> and they get lower compensation for the same job.

Okay, so let's assume that instead of $250,000 per year that a male makes they are offered $200,000 per year for being female. In response they choose a $50,000 per year job in healthcare instead?

comment 4y ago · link · parent

In total, but you're building denser so the per-resident cost ends in a similar ballpark.

comment 4y ago · link · parent

> Now imagine what happens when blue collars get saturated again.

The downward pressure on their compensation will see the cost to build new homes come down and thus the market will trend towards affordable again? After all, like all things, the cost of a used home is a function of the cost of a new home.

comment 4y ago · link · parent

No doubt they do think hard about how their product will be used and ensure that the customer is as happy as possible. Money is on the line. It is production of the product that produces undesirable externalities.

Frankly, how does anyone continue to work in any job? They all bring undesirable externalities of some sort. As a farmer, I'm one of the most evil people on the planet, or so they say, due to the externalities created by agriculture. Working for Facebook would be a huge moral improvement. But, what are you going to do?

comment 4y ago · link · parent

> Isn't it the job of the representatives in a representational democracy to have working mechanisms to understand what their constituents' demands are?

The advantage big business has is scale. Big business, by definition, has many more stakeholders. This means that big business will be disproportionately represented by the constituents. If those biases weren't made clear, and each constituent's position was taken at face value, then the unified front would appear stronger than it would actually be if each actor were acting without those biases.

> Shouldn't they stay true to the promises they made?

I'm not sure why you'd want them to. The state of the world is constantly changing and new information continues to flow in. You will be constantly reevaluating your position in the face of new information. A representative will respond to that.

Representatives know that some segment of the population honestly believe that they are mind readers and will offer up some examples of how they might try to read the minds of those who buy into that witchcraft to attract their vote, but marketing and reality are quite different.

comment 4y ago · link · parent

> It's insane enough letting Big Corps lobby your legislature

Well, it would be rather pointless to elect to hire a representative to represent you and then not take time to make your position known with them. They certainly are not mind readers.

And you can't realistically remove big businesses from citizenry as those who are stakeholders in big business are going to bias their position to what benefits their business. Business is people, after all. ByteDance certainly has stakeholders who are American citizens.

So we make a best effort to register those biases for the sake of transparency. The only real alternative, short of abandoning democracy entirely, is to leave it a mystery who talked to their representatives.

comment 4y ago · link · parent

Probably because it is the place most likely to be where you watch your friends live their apparently perfect lives without also being able to see their failings. Facebook is not the only place that provides that type of thing, but brand recognition in the headline draws attention.

Real life isn't without its own flaws, but the research shows an increase in mental health issues when social media is a factor. That increase is interesting, and worth studying, even if it is not the only place one can develop mental health issues.

comment 4y ago · link · parent

Another thing to consider is that while a query may be dynamic during the discovery/development phase, once it is solidified in the application for deployment it becomes static and is able to be optimized as such.

If you are a small team of developers that is no doubt a lot of unnecessary indirection. When you are small you can talk to each other and figure out how to create a service that returns the optimized results right away. At Facebook scale, if everyone tried to talk to each other there would be no time left in the day for anything else.

Conway's Law strikes again.

comment 4y ago · link · parent

It is a result of representing application state as complex entity structures. I am not sure I would call it degenerate. n+1 would be quite natural if relational databases were theoretically pure. It only falls down in the real world because we accept deviation from the theory to allow implementation.

Joins are one possible workaround to the n+1 problem. However, they push the problem into the application to unpack, which detracts from having a nice high level abstraction in the database for fetching data. The many queries of n+1 would be ideal if you had an ideal database. You are querying on behalf of many different entities so many different queries is conceptually sound. But since we don't have ideal databases...

That's not to say that joins don't have their place. In the relational model, joins are essential. But the n+1 problem happens when you are not working in the relational model.

comment 4y ago · link · parent

> It would technically be faster because of lower latency between services in the same data center and sending the final results to the user in one go

Which is a pretty big deal when you have practically the whole planet as users, many of whom are found where low latency is a luxury.

> but at the same time if your DB is hit 50 times to service that request, you still have a problem.

Maybe. Or when you are Facebook maybe you don't care. Just throw another datacenter at the problem.

> without actually improving anything else

They found it improved discoverability for designers and non-technical folk.

> That tradeoff seems like a tough sell to me

If your organization doesn't look like Facebook, I imagine it wouldn't sell. It's very much designed for a purpose.

comment 4y ago · link · parent

The goal is equalize the demand with the supply. Keeping with the example, the hope is to see just as many iPhones sold, already limited by how many chips are available, but not with people fighting over them outbidding each other with higher and higher offers to obtain one.

A recession will occur if they overshoot, however.

comment 4y ago · link · parent

It was believed that supply would return. It hasn't. Destroying demand means that you don't need supply to return.

comment 4y ago · link · parent

> except that they forgot to include the bit that actually talks to your data store

Which stands to reason given that GraphQL was designed for talking to services, not data stores. It was built for BFF. The backend is responsible for talking to the data store, as usual.

[client] <-dynamic GraphQL query-> [GraphQL resolver] <-boring old RPC/REST/whatever-> {Set of backend services}

comment 4y ago · link · parent

Rent has skyrocketed recently, largely because people are afraid to buy houses right now, thus more demand for rental units. A mortgage may still be cheaper if you can stomach the reality that you might quickly end up underwater.

That said, if you have rent control locked in, the choice is likely easy.

comment 4y ago · link · parent

GraphQL was explicitly designed for querying the service model. I’m not sure that makes it an alternative, but rather and early advocate and adopter of BFF, promoting the BFF approach that worked for Facebook.

It has been used to query the data model by some. Data is data at the end of the day. But that is not where it really shines and misses some of its advantages when the service layer is skipped.

comment 4y ago · link · parent

Web browsers could be given super special access or some other suitable sandbox. We know how to do it, even if it comes with some tradeoffs.

Communism is a thought experiment about how people might organize if we ever achieved post-scarcity. We haven't yet figured out how to achieve post-scarcity. We have absolutely no idea how to do it, if it is possible at all.

Quite different.

comment 4y ago · link · parent

If you build it, they will come is a fun premise for a movie but in reality the market just isn't there. Better video delivery means that animations have moved there, better HTML/Javascript/CSS means that interactive applications have moved there, games have moved to game development environments (Unity, etc.), and where there is no clear alternative the work is thought to be kitschy and outdated these days so those works have largely disappeared. Animate serves what niche audience remains.

comment 4y ago · link · parent

Steve Jobs declared Flash dead. Whether by his influence, or simply good timing, the world agreed with him and moved on. What market remains is small and not worth putting a lot of effort into.

comment 4y ago · link · parent

Worse, when it comes to code if execution doesn't do what you intended it is your fault for not writing it correctly and you are who gets punished for it.

When it comes to legalese, if execution doesn't do what you intended it is their fault for not understanding what you meant correctly and they get punished for it.

1
138139140
256