To be fair, this is horribly written error handling. These errors should be wrapped to add the specific context that the caller might want in order to handle the error.
You’re right. But that’s my point. You can “ignore” the error and Go doesn’t force you to do anything that about it. I’ve seen this in production code. Also I’ve seen people just checking the null-ness of the return value, ignoring the error. And that brings me to my point, which is, it’s all about good programming practices, whether it’s Python or Go.
Go forces you to think about failure just as much as success, and I find that fantastic for building robust software.
Errors happen, so you're forced to do something when they do. Errors aren't exceptional.
But more importantly to me, Go forces you to think about what a caller to your function might want to know about what went wrong. Errors in modern Go are for communication, not an explosion of "something bad happened, abort!"
A long time ago, errors in Go were very basic -- essentially just strings 99% of the time, and I think that's where some of the hate comes from. In the early days, I think it was deserved.
But nowadays, with the Go errors package (error chaining), errors are extremely powerful.
Good libraries will often return an error structure that provides more context than a stack trace would, e.g. os.LinkError: https://pkg.go.dev/os#LinkError
tl;dr if you're writing "if err != nil { return err }", you're holding it wrong.
> Go forces you to think about failure just as much as success
Except, it doesn’t.
Forcing you to at least write boilerplate code for failures might be a nudge to think about them for some people, but it absolutely is not “forcing” you to think about it, and you can absolutely defer it with boilerplate while concentrating on the success path and never actually return to it.
Could you share how that can be done? I spent some time this year trying to pack a node tool into a single fat binary for a specific use case where we wanted a history of versioned executables - i.e a build job that needs to run specific versions of the packed tool in a specific order determined by external factors.
I tried Vercel pkg, Vercel ncc, nexe, and a few other tools I can’t remember right now. They all had issues with node v20, some dependencies, or seemed to not be maintained anymore. I ended up relying on esbuild as a compromise to get a fat script containing all sources and dependencies, tarballed with some static files we rely upon we can at least get versioned, reproducible runs (modulo the node env). Still not perfect, a single binary would be preferable
I don't remember the details, and cannot find my notes on vercel/pkg. But looking at https://github.com/vercel/pkg right now I see the project has been deprecated in favour of single-executable-applications
I saw that deno did this but cool to see node picked it up too. I wish there was an option to run turbofan at build to generate the instructions rather than shipping the entire engine, but i guess that would require static deps and no eval, which can’t really be statically checked with certainty
How often the deployment model “copy a single binary to VPS via SSH and run it” is even used nowadays?
And with that still, you’d be much better served by using a more expressive and less painful to use language like C#. Especially if the type of use is personal.
For Python, you could make a proper deployment binary using Nuitka (in standalone mode – avoid onefile mode for this). I'm not pretending it's as easy as building a Go executable: you may have to do some manual hacking for more unusual packages, and I don't think you can cross compile. I think a key element you're getting at is that Go executables have very few dependencies on OS packages, but with Python you only need the packages used for manylinux [2], which is not too onerous (although good luck finding that list if someone doesn't link it for you in a HN comment...).
I think I’m missing something, because I’m pretty sure you understand the go module proxy (having seen you around here before) but I really don’t understand what problem you’re talking about.
If a module author deletes or relocates their module, the old module is not deleted or renamed from the module proxy. It is kept around forever. Code that depends on it to not break does not break.
If they relocated and you want to update to the new location, perhaps for bug fixes, then you do have to do a bit extra work (a find and replace, or a module level replace directive) but it’s a rare event and generally a minor effort, in my opinion, so I don’t think this is a significant flaw.
For most users most of the time they don’t need to think about this at all.
> good luck doing just run when a code repo breaks all those URL hardcoded in source code
You're on a tear in this thread being wrong about how Go works, but I'm really curious what extremely specific series of events you're imagining would have to happen to lead to this outcome. If I use a dependency, it gets saved in the module proxy, I can also vendor it. You would have to, as a maintainer, deliberately try to screw over anybody using your library to accomplish what you describe.
Go doesn't have a build system, so I don't have to learn that. (I spend every second I'm using Gradle to curse it's very existence -- and wish I had `go build`)
Go cross compiles natively, so I don't have to think about the toolchain.
Go has go:embed, so I don't have to think about bundling/packaging as a separate step.
Go has fantastic backwards compatibility, so I don't have to spend time getting an old project to even build.
Go's stdlib is extremely high quality, so much so that I've never run into a serious bug in it.
When jumping into other ecosystems, I'm shocked at how much time is spent fiddling with build scripts, packaging, deprecations, unfixed bugs in the tooling etc...
Still wish it didn't explode on null pointers though. And any large dependency authored by Google will be unidiomatic and over-complex, of course (see: grpc)
Very well said. As someone who rarely touches Go (only used it for a couple of simple web servers, something like a WebSub subscriber), you've named much of what I like about it. I'd love to see more languages achieve all these features, or even make that a goal.
I'd also mention how great the documentation is. Truly best in class. For instance, see https://pkg.go.dev/net/http
* Has enough examples to fully understand how to use the package.
* Links to the individual source code files so you can read those if needed.
* Has a highly visible link for reporting vulnerabilities.
* Has a great search tool accessible with a keyboard shortcut.
Absolutely. The documentation is first class, and I took love how easy it is to jump into the source. Often, reading the source helps me understand how a package is meant to be used.
Other ecosystems seem to have a "don't worry yourself about that" approach to viewing a package's source, and it's maddening. In contrast to Go, trying to get from docs to source code in the JVM ecosystem is by no means straightforward.
I accidentally stumbled upon a feature in YouTube that's killed my binging altogether.
Turn YouTube Watch History off (Google Account > Data & Privacy > YouTube History). I mostly did it cuz I didn't want Google to have a history of all my YouTube videos, but the accidental effect is that when I go to youtube, I literally have a blank screen (no suggested videos) and instead it just says "turn search history back on"
This means that I have to actually search for a particular topic to start watching about it, and most times when I'd be consuming more, I don't have the mental capacity to pick a topic I care about.
The one hitch is that if you subscribe to channels, you'll still see all those videos, but those update very infrequently and you don't see a bunch of nonsense you don't have to watch.
Resolution is the big compromise with color e-ink, the effective pixel density is cut in half when the color layer is enabled. With the current best panels you get 300dpi in mono mode but only 150dpi in color mode, and fidelity of the mono mode is compromised compared to a mono-only panel with the same resolution. The color rendition still isn't great either.
Going eink helped me cut back video content. But I ended up listening to more podcast at faster speeds and since i have youtube premium, backgorund listening. It's... better, since I treat it as background noise and ears don't get fatigued / strained like eyes do.
As a developer, the annoying thing about the "Local Network" permission is that:
1) It's poorly implemented. Unlike other permissions, there's no way to explicitly trigger the prompt. It just pops up at Apple's discretion. There's no way to give it a "soft landing" for cases where it's necessary for core app features. And there's no way to check if the permission has been granted or not.
2) More importantly: Apple's own apps don't trigger this warning, which makes the playing field unfair. AirPlay etc. work seamlessly, whereas any competitor's tech doesn't. And as a developer, since you can't tell if this permission has been granted or not, you're left with a poor user experience.
I'm particularly fed up of (2). If Apple is going to introduce restrictions, they need to apply to their own apps as well. AirPlay and AirDrop need to each ask for Bluetooth and local network access. The Photos app needs to trigger the "Select photos, Allow All, Deny" prompt on launch. The Camera app shouldn't be able to write to the photo library without triggering the same prompt too.
That gives them an incentive to design the user experience around these restrictions well, and maybe be more creative with how to solve for this too rather than confusing dialogs.
Currently they have a disincentive to design this stuff well. Any iOS developer that's had to work with these APIs knows that they are designed absolutely awfully with arbitrary and unexpected limitations.
Not sure if this is what you mean, but there could be multiple apps installed that write to the device photo library. You may not want the developer of one camera app to be able to access all photos on the device.
But this raises a related point about how frustrating Apple's APIs are here: When an app is granted the "Write to photo library" permission by the user, it can only write. It can't read back what it's written, ever. You might expect that writing to the library might return a token that can be used to read that photo back. Nope.
Android, for all its faults, does a much better job here. The OS keeps track of the app that wrote the photo -- and that app can read that photo indefinitely, unless another app edits that photo (and thus becomes the owner). A much better design.
On iOS, to read back photos from the library, you have to ask for the "All photos" read permission, which few people will grant you. "Why does my camera want to read all the photos on my device?! Deny!".
And just like that, you can't compete with the built-in camera which shows thumbnails of recently taken photos and allows you to swipe through them.
Apple has no incentive to fix this either, because their own apps bypass this permission system.
No argument from me but regarding workarounds for (1), accessing ProcessInfo.processInfo.hostName has been a reliable pop-up trigger for me for a long time. Eskimo also offers some (esoteric) suggestions for how to notice if your network operation has been denied due to lack of permission: https://developer.apple.com/forums/thread/663852
Amazon (US) has really gone downhill in the past ~5 years.
I signed up for Prime a over decade ago because of the reliable 2 day shipping. It worked pretty much as described. It was great.
Shipping is no longer 2 days on most items - "Prime" shipping can now take 7 days. Amazon advertise same or next day shipping, but it's really only for big ticket, occasional purchase items. Most everyday purchases now take 3-7 days, the same as without prime. They show the prime badge, but if you log out you can see that non-prime members get the same shipping.
This feels really dishonest. Amazon pretend that you get huge shipping benefits from Prime, but it turns out you don't anymore.
For the first time, I've cancelled my prime renewal. What, exactly, am I paying for these days? Walmart offer next-day free shipping on the big ticket items too, without the membership.
Maybe it varies by location because in Chicago it's extremely rare for things to take more than 2 days. In fact they've been stepping up next and same day delivery for a lot of items.
That being said, I'm actually moving in the opposite direction since that creates a lot of waste. Unless I really need the item quickly I use Prime Day delivery so it all comes in one box. If my whole family didn't share the account I wouldn't pay for Prime.
The theft problem doesn’t vary at all in Chicago. I’m in a North (west) Side neighborhood and receive about 83% of Amazon packages, with the rest being stolen or just not delivered. Compare this with a 100% success rate for items delivered by UPS, USPS, or FedEx.
I figure at some point I’ll fall below whatever metrics Amazon has internally, they’ll stop resending/refunding packages, and I’ll have to fight the same battle as in the article. If anything, OP unfortunately/correctly teaches that empathy, common sense, and treating level 1 workers as human have no place with Bezos…you have to assume the worst and treat everything as a cost/blame situation.
I live in a high-rise which has a mail room so maybe I'm insulated from whatever factors lead to that (porch piracy obviously, but something about Amazon specifically). I didn't realize it was that bad, only getting 83% is insane
Edit: though my family in Rogers Park and the suburbs have never complained about this issue so I'm not sure it's that common.
I live in a single-family unit in Uptown and would be surprised if my rate is anywhere below 95%, I'd be shocked and demand a recount. I order several times a week, often several times a day (yeah, a lot of items I need are same-day delivery, most are next-day), and I recall two or three packages missing this year. And those were likely never delivered of to the wrong address, as they had no picture.
I live in Washington, DC. Two or three times a week on the neighborhood listserv there is an email asking whether anyone got the sender's package. Some of the problem is certainly theft, but I doubt all of it is.
No doubt there's some of this given the ridiculous photos I get through the "take a picture" feature that Amazon, DoorDash, and others believe substitutes for actually validating delivery happens.
I just don't give these tech companies any benefit of the doubt for the situation. My home is on a major street next to a door that has the street number displayed very prominently. As mentioned above, FedEx and others have 100% success rate. Amazon's delivery drivers just don't care, because Bezos has created a system where they are incentivized not to care.
You're right, not sure why the doubt in the edit. Different [areas/data points/anecdotes] will no doubt yield different results. The suburbs are very different than the neighborhoods. I used to live the Loop high-rise life, felt the same way you did.
Though Amazon usually is no help in the last mile delivery there. Encountered numerous stories of high rise package rooms that have just been overwhelmed by Amazon/since COVID. If anything, most improvement/success stories I've heard have been from a startup in the space, Luxer.
I don't know - I lived <20 miles from an Amazon warehouse, but saw shipping suddenly become 7-day on Prime most of the time back in 2021. I'd already tried to disentangle myself from Amazon's ecosystem, but it was definitely the nail in the coffin for my Prime subscription.
I literally never experience this issue. Except for a couple of actually lost packages, my prime has had EVERY package come in 2 days or less except holidays. I live in a 250k town tho, so I am not sure if there is some level of size that plays into it. Perhaps I am the perfect size to have enough infrastructure to get reliable deliveries, but small enough that I don't have to worry about all that comes with a massive city.
Curious about where you live. How far are you from a major Amazon shipping hub? Here in the broader LA area, it is mostly all next day, and even same day shipping. It's all Amazon's in house delivery service too.
The shipping ETA problem seems to be very hit-or-miss. I've spent more time than I'd like to admit sifting through pages of "prime" results trying to find something that can arrive sooner than 3-7 days out.
And then sometimes every search result shows same/next day--but you absolutely can't rely on it because the packages have a ~50% chance of "running late" and get assigned a new ETA of what the non-prime shipping would have been. For order after order.
We cancelled prime this year. I was surprised that shipping cost and timeframes haven’t changed. In fact, on many items it seems like it’s faster to not use prime.
If you're getting FBA, it's just an optimization of throughput. If there's enough folks in your area with Prime, trucks are going around your neighborhood daily anyway, so it's better to send a full truck, even if it means things get there early, then to send a partially empty truck twice.
Amazon likely does not have separate Prime and Non-Prime lanes in their warehouses. It would be a redundancy and add additional complexity that would increase costs/reduce profits. Since customers never see the warehouse there really wouldn't be any benefit to doing this.
Are we in the game where an event happens randomly, and we’re trying to guess whether any of our actions, if not worshipping Bezos directly, might have an effect on delivery times?
There's a lot of existence that really feels like we just live in a hash code now. And its all malevolent for some reason. It feels like there's "supposed" to be something you did wrong, yet it's all malevolent hash randomness. Maybe all the focus on cryto money?
That, or we're being experimented on. "What will the mice do if we poke them this way? The ants really hate it when we shake them this way."
What’s dishonest is that they say the 2-day applies only after they ship the item, but they don’t count their “internal logistics” shipping in this time.
How do I know that? Amazin charges your card only when they actually pack and ship the item. But the tracking on UPS will not appear until 3-4 days later
Another annoying thing about Amazon is the subscribe and save. They see it as one way contract. Many times I have subscribed to a product only to get a notification when it’s fulfillment time that was saying that the product was out of stock and I should choose a replacement.
That’s not how it is supposed to work Amazon. I take up the obligation to buy a product monthly and you should take the obligation to make sure it’s available.
It ended up being death by a thousand cuts for me and Amazon. I barely use it anymore
It's very location dependent. Where I live most stuff beats the 2 day estimate and it's not unheard of to order something in the afternoon and have it at the front door when I get back from dinner.
Friends in other locations seem to have more of your experiences. I actually dread ordering from anyone but Amazon since the shipping is such a crapshoot for usually the same money.
What I dislike the most is how unreliable "Amazon Day Delivery" is.
Several times I've bought something that I don't need that week, so I chose Amazon Day delivery, which allows all of my packages get delivered during the same day the next week.
I expected those packages to arrive, e.g. buying something for a gathering I'm hosting that weekend, but they are often days late and don't arrive in time.
Amazon was great for a few years, but it looks like something happened. They still claim they are customer obsessed and "Day 1" thinkers, but anyone can see the delusion. I wonder if Jeff Bezos sees that Amazon has gotten worse; it seemed like he truly believed in the company until his departure a few years ago, but maybe it was always just about the money.
I'm not familiar with this, but it certainly does seem like the startup world is completely backwards, and anything VC funded should be considered toxic.
Hmm. My experience with prime shipping is exactly the opposite, but I think I must live near a distribution center.
In fact, just yesterday I ordered some vitamins for overnight delivery and they actually showed up in 3 hours, so sooner than promised.
That has happened on several occasions, and I can't recall every not getting something on time.
That's shipping.
But I do think Amazon has a serious problem with fake, incentivized reviews, and I have heard of, but not yet experienced (to my knowledge) counterfeit products.
I signed up for Prime when it was just shipping, and it was a great deal that made the platform sticky - I always looked there first. When they bundled in all the other Prime functionality and upped the price it left a very bad taste in the mouth.
And yet, here I am, years later, still with a Prime account. I really need to make more of an effort to get off Amazon.
What's more is if you filter for "arrives tomorrow" you'll get a bunch of results, but there's no guarantee they will arrive tomorrow - you have to double and triple check at every step of the order flow.
Not ≈5 years. Three years and 9 months. Amazon's retail division was broken by Covid and will probably never fix itself.
I have no inside knowledge, but I suspect what happened is a bunch of crooks were hired during the massive hiring spree to keep up with Covid demand, and there wasn't capacity to investigate every fraud, theft, and scam. Internal fraud went from zero to prolific almost overnight. Prime also stopped being able to deliver in two days, and never recovered.
It's been three years, and it seems a permanent culture change at this point. The only CEOs I've seen recover a business from this sort of shitshow were Steve Jobs and Satya Nadella. Most businesses can't recover from this. I hope Amazon can, but realistically, I'm very sceptical.
On the upside, there's a huge opening for a competitor, if anyone wants to do a startup :)
I was despairing that those big internet companies were settled for 80 years, but I see that there might be movement.
However, it takes 25 years and unprecedented investment to build Amazon, warehouses, delivery schemes… Unless Amazon sells some of them with the automation, it’s extremely hard to enter the field.
(1) We are in an era of massive investments, much more so than when Amazon started. The billion dollar plus fundraising round is increasingly common over time.
(2) An entrant does not need to operate the same as Amazon. The sharing economy provides a lot of alternative models. To give a fictitious example, connecting with existing rideshare vendors for delivery and a network of local stores for fulfilment could give a lot of the same product without the same investment. Ditto for existing logistics players like FedEx (who do a lot more than delivery).
(3) It's possible to start in different markets, and especially foreign markets. A company which could do this play easily might be something like Aliexpress which already has a leg in.
There are many more models possible too, but the point is that building Amazon today does not need to the same as building Amazon in the nineties. Even building the same Amazon would be cheaper today, since we can learn the lessons of the existing Amazon.
I live in rural new mexico. When we moved here 5 years ago, even the most available item shipped using Prime would take 3-5 days to arrive (and more typically 5). Over the last year, that has shifted to the point where some items arrive next day and nothing takes more than 2 days.
I would not generalize from my experience. I would suggest that you do not generalize from yours.