HNHacker News
TopNewBestAskShowJobs

wfleming

1,264 karma · joined September 21, 2011

https://gitHub.com/wfleming
submissionscomments
wfleming··on Adopting Ruby 3 types with RBS
I basically stopped paying attention to the progress of this feature when it was announced it would use header files. I don't expect I'll use it.

I think it might be worth the headache with libraries - I think type errors are more useful when you cross the boundary into someone else's code. They're still useful within apps, of course, but personally I don't think I hit them often enough to make the headaches of a separate file worthwhile.

My hope is that this is primarily motivated by wanting to maintain backwards compatibility for source, and maybe as more of the ruby ecosystem moves to 3.x future versions will add an alternative way of doing type annotations inline.

wfleming··on Producer of Netflix Three body problem found poisoned
... right up until the series had no books to adapt, at which point the consensus seems to be they took a steep dive in quality.
wfleming··on Ask HN: Why are M1-based Apple laptops so much faster at changing monitors?
I’m largely guessing here, but I think at least one aspect of the hardware contributing to this is the M1 shares the same RAM for the CPU & GPU. Normally that’s not the case, so a display change requires recalculating the display buffer for the entire screen and then copying that to the GPU. The M1 can skip that copy phase, it just tells the GPU where the buffers already are in RAM. That definitely can’t account for multiple seconds, but it’s probably part of the story.

We also know that Apple spent time optimizing very specific operations in their CPU - optimizing retain/release operations on objects is the one that’s gotten mentioned a lot. Maybe they spent similar time optimizing things in the GPU for changing modes/outputs?

wfleming··on AMD CPU sales skyrocket with Ryzen 5000 launch, leaving Intel in the dust
Lenovo is selling several of the new T series Thinkpads with Ryzen chips. IHMO something like the T14s is pretty comparable to an XPS, but I don't know what your evaluation criteria are, and I have a personal preference for Thinkpads, so I'm biased.
wfleming··on Running Docker on Apple Silicon M1 (Follow-Up)
I would hope that most people's production images are being built & pushed to an image repository in CI, not from somebody's laptop.

A lot of the official base images on Docker Hub are dual architecture now (both x86-64 and arm64), so if devs on M1 can build arm64 images locally from those, develop on those, and then have CI build the production x86 image, things should be more or less fine.

Of course, I'm sure a lot of people rely on 3rd party base images that are still just x86-64. So I expect there's going to be a pretty painful transition period where Docker works on M1 Macs but a lot of popular images don't.

Or maybe Docker's official response will be a Docker for Mac release that still runs x86 in a qemu VM or something, and arm64 Docker on M1 Macs will remain an oddity for a while. But I hope they lean into improving tooling for dual-architecture support, because I think we're increasingly moving into a dual architecture world, and not just because of the M1: as ARM becomes more popular in production, I'm sure more people are going to also find themselves in the opposite situation with x86 workstations & arm64 production servers.

wfleming··on Show HN: A Django code review bot for GitHub pull requests
I don't think this critique applies to restyled - it's free for use on open source repos, but costs money for private repos.

Which is a pretty standard arrangement for SaaS dev tools that I think makes it pretty clear your data isn't the business model. What I like about that model it is a reasonable balance of customers actually paying for the thing they use (so the business owner isn't beholden to advertising or tempted to abuse data access), and supporting the open source community (without which most of the modern web couldn't exist). I won't say it's entirely without risk - you need enough paid use to cover the costs of the open source use. But I think it's an ethical and sustainable approach if you can achieve that.

And, again, restyled is open source - if you don't trust the owner, you can run it yourself.

wfleming··on Show HN: A Django code review bot for GitHub pull requests
For anyone who likes the idea but doesn't use Django, check out https://restyled.io/ - it supports a bunch of tools [1].

It's also open source and self-hostable for folks who like the idea but don't trust that automation to a third party.

[1]: https://docs.restyled.io/available-restylers/

wfleming··on New online bookshop unites indies
Amazon does not need to make a profit off of books, for a variety of reasons. It can therefore sell them at a much narrower margin, or no margin, or even a loss.

Other booksellers generally don't have the many additional sources of funds that Amazon does. So if they compete with Amazon on price, they lose money and go out of business. And if they don't compete with Amazon on price, customers go to Amazon and the bookseller still goes out of business. Bit of a rock and a hard place for the booksellers.

wfleming··on Trump's Twitter account hacked after Dutch researcher guessed password?
Which is trivial to fake by going to your own profile and using your browser's inspector to swap out a few images and change a few text boxes.

I kind of think it's a toss-up if this is true. I can believe Trump would use a very weak password and not apply 2fa, but I'm very surprised that Twitter's additional guard-rails for important accounts didn't prevent this.

wfleming··on No One Goes There Anymore
I believe Dang is Daniel. There was an interesting New Yorker article about HN's moderation a while back you might enjoy: http://archive.is/QiDtu.
wfleming··on Facebook to Buy Giphy for $400M
I don't disagree, but as an aside I think the references to that Star Trek episode (which I've been seeing a lot lately) is interesting. I find it amusingly ironic that the most effective way to describe the growing tendency to communicate mainly in cultural references is... a cultural reference.
wfleming··on Test Desiderata 8/12: Tests should be isolated from each other [video]
In my experience a mixed approach can be valuable, but I think whatever approach is taken the real key is to build it in such a way that it's not an individual test's responsibility to clean up either before or after - it's extracted to the test runner/framework so every test gets the appropriate behavior automatically.

As an example of what I mean by a mixed approach: if the thing being tested is software that primarily interacts with, say, a SQL database, then the "clean up before" approach (which might mean running `TRUNCATE foo` on every table) works, but as the schema gets bigger it gets slower, and while it might not be very slow it gets very noticeable if every test runs it (particularly as the test suite is presumably also growing). An effective way to implement the "clean up after" approach might be to setup the test runner so every test runs within a transaction and after the test the transaction is rolled back: but in order for that to be reliable the database must be in a clean state when the test suite is started. So the mixed approach I've used (and is close to the default for Rails & Phoenix apps nowadays, I think) is to do the "clean" op at the start of the entire suite and configure it so every test runs in a transaction.

The transaction/snapshotting features of modern SQL databases make that approach really easy, of course, so if a project's main external interaction is instead filesystem interaction or something it may not be so simple and more of the infrastructure would have to be hand-rolled, but if it has to be done at scale (many tests, many developers), I do think it's worth abstracting into the test runner so that individual tests don't need to remember those details: I've done that for some CLI tools where the test runner sets up a sandbox dir for each test and so the tests just need to use the appropriate patterns for FS interaction (which is easy since all the existing tests do it and people imitate those, and in my case it helped stop the "just write to /tmp" approach that some had taken before that).

The container isolation approach certainly has the advantage that it's difficult to mess up no matter what any particular test does, but if you run each test within a container, in the long term I'd be worried about the overhead causing the same headaches as the "truncate DB tables before every test" approach. And if you're running the entire test suite in a container it seems like you'd still have the potential challenges of each test needing to be responsible for stuff unless some of the other approaches are also taken? Sorry if I didn't understand the container approach you described.

wfleming··on Most frequently checked-out books in the history of the New York Public Library
The NYPL is a big library system! Currently it seems they have at least 166 copies of Harry Potter & The Sorcerer's Stone[0]. Probably more: I think these are only the copies of the standard edition, and they also seem to have a few copies of an illustrated edition, some special editions, etc., plus of course translations.

[0]: https://catalog.nypl.org/search~S1?/Xharry+potter+and+the+so...,

wfleming··on Before you call an Uber or a Lyft, you'll want to know about 'Vomit Fraud'
I guess it's not surprising that at some point less ethical drivers would start to do this. (And of course the rideshare services very poor rates for their drivers probably pushes more people to behave unethically to make working for Uber, Lyft, etc. more economically sustainable for them).

I guess the logical response is for Uber & Lyft to lean towards believing the customer in these situations, not the driver. Which is going to understandably anger a bunch of drivers who are left holding the bag when passengers legitimately make a mess of their vehicles. And the logical response to that is for all these drivers to get cameras in their cars filming the interiors so they can prove it. I guess outward facing dash cams are already pretty common in areas where accident fraud is common, so maybe that's (unfortunately) the likely end-state here.

wfleming··on In Its First Funding in 14 Years, 1Password Raises $200M Series A
> (like switching to a subscription based service model for a simple app)

1Password did this a couple years back, before they even took on funding!

Maybe your choice of example was a sly reference to exactly that, sorry if it was and I'm explaining your joke :). If that was your intent I hope my comment at least makes it clear to people who aren't as familiar with 1Password's history.

wfleming··on My Favorite Programming Problem to Teach: Digit Length
I was quite comfortable with writing the Fibonacci function. Writing that would have hardly taken me any longer and would not have taught me anything either.

The thing I did learn, and which I think has paid more dividends in my career than knowing the definition of the Fibonacci sequence, is that knowing your tools well can save you time and effort and reduce the amount of your own code you need to maintain and put effort into.

wfleming··on My Favorite Programming Problem to Teach: Digit Length
Because I am a smart-ass, I did something like this in college. There was an intro course in MATLAB my freshman year, but I'd been programming for several years at that point so I found it too basic to hold my interest. In one of our early labs, we were told to implement a function that calculated a Fibonacci number. I figured that sounded like something MATLAB probably had in its stdlib, and it did, so I wrote a 1 liner and called over a TA to approve my work.

Thankfully this TA agreed with you (as do I). He said it looked good, and I think that's the shortest lab I ever had.

wfleming··on NBC took Bob Costas off the Super Bowl for speaking out about concussions
Interesting point but I'm not sure I agree. There are other professional soccer leagues in the UK aside from the Premier League as well. It's not entirely apples-to-apples because the wider market structures are different between the US & UK, but I do think comparing the dominant player in each market is useful & instructive.

I think your point is totally fair though in that my description of NFL as a monopoly isn't as comprehensive as I expected. From what I can find, CFL revenues are about $213M , and US college football is $3.4 billion. CFL is pretty close to being a rounding error compared to the NFL, but college football is a definitely a significant presence. I think I'd say a market where one entrant commands almost 80% of the revenue is pretty close to being a functional monopoly, but not entirely, so I should have accounted for that.

wfleming··on NBC took Bob Costas off the Super Bowl for speaking out about concussions
That article states that globally Soccer makes more money than the NFL. Just adding up the 5 Soccer leagues listed in the top 10 there, they total more than the NFL. And there are a bunch of soccer leagues globally that aren't in the top 10. So while the NFL does have a commanding lead as the largest sports league globally, American Football is indeed behind Soccer globally as a sport.

Another way of thinking about why that is is that the NFL is effectively a monopoly. They are the only game in town for a sport which is only popular in one country (the USA). Soccer is, globally, a much more popular sport than American Football, but it's not controlled by a single league (FIFA is a governing body (a terribly corrupt one, but that's a separate conversation), not a league).

If you look at it per-capita, the NFL also seems a bit less impressive, and their revenue might be more a result of the fact that the USA is both rich and fairly large than any strong indicator of global popularity. Taking population estimates from Wikipedia, the NFL made roughly $39.76/person in the USA, and the Premier League made roughly $80.30/person in the UK. (And that methodology is arguably a bit generous to the the NFL, since the Premier League is technically only in England, but I'm including the rest of the UK since they also do watch a lot of Soccer AFAIK.)

To me the enormous revenues of the NFL is a stronger indicator of why monopolies are harmful than of any special virtues of the NFL or American Football.

wfleming··on Changing Our Approach to Anti-Tracking
I think that's effectively already the world we live in. As a uBlock user I occasionally run into sites that are broken because they wrote code assuming that some function provided by an analytics library would exist, and it doesn't because that library got blocked. I file bug reports when I can, and I'm concientous about handling these cases in my own code.

Writing code to handle the failure to load of third party scripts like this should really be a best practice anyway. Even if you use subresource integrity checks on all the external scripts you load, what if some analytics provider's site is down for a while? Do you want your site to still work? I do. (Obviously this does not apply to scripts that are actually necessary for the core functionality of your site, but that doesn't really apply to analytics/tracking tools for the most part.)

Making this the default behavior of FF will make this sort of breakage more visible to more people, it's true. If anything maybe this will encourage sites to write their code to handle failure more elegantly and I'll spend less time annoyed. One can dream.

wfleming··on Sequoia-PGP – A new OpenPGP implementation in Rust
I'll also chime in to say that `pass` is a fantastic tool, and I'm so glad I switched to it as my password manager. So the effort you went through to get there (which I can sympathize with since I've had to use the OpenPGP CLI directly plenty of times) is very much appreciated.
wfleming··on A proposal to move Gnome to GitLab
I suspect GitLab's customer niche right now is teams that want private/on-prem source control but aren't willing to pay for GitHub enterprise. If that is in fact the case, I don't think it's surprising that they're lagging behind their competition on features and UX, since the cost-conscious customer doesn't value those things as much. (Or, more likely, the person holding the purse strings is not the one suffering from those deficiencies.)
wfleming··on OfflineIMAP: sync and backup tool for IMAP
> So if you're looking for an IMAP->Maildir retriever or backup solution consider trying out mbsync first.

I'll second this: I used OfflineIMAP at first, but switched to mbsynrc after being unhappy with OfflineIMAP's performance. (It also seemed to hang semi-sporadically for me, which made it a pain to launch as a cron job.)

Lots of factors affect which tool is the better for a given user, of course, but I personally have been happier with mbsynrc.

wfleming··on Electron is flash for the desktop (2016)
The problem is that in popular usage many GIFs are not 16x16. People are sharing high resolution GIFs that can weigh tens of MB, and rendering several of those at once (whether directly in Chrome or in Electron) is not a negligible amount of CPU. It shouldn't peg a core, of course, but it's definitely higher impact than videos of similar sizes, since video rendering is considerably more optimized for these cases than GIFs are.
wfleming··on Electron is flash for the desktop (2016)
I've noticed the same myself, and I'm a bit surprised Slack hasn't done the same trick some of the larger image hosts have and started converting gifs to videos. Those hosts did it to cut bandwidth costs, but it also helps users as a side effect.

(I continue to be amused that everyone records & shares gifs for "compatability" and "simplicity", but many of the places they're shared re-convert them into videos.)

wfleming··on PulseAudio requirement breaks Firefox on ALSA-only systems
Arch does not use PulseAudio by default, and I'd be surprised if that changed. It's my daily OS, and I'm quite fond of it.
wfleming··on Let's crash the integrated browser in Facebook
I wonder if Bell Telephone is a more apt parallel for FB than Microsoft is. I agree FB is not a monopoly today, so I'm not saying this is the case right now, but if they continue to dominate social networks (both through themselves & their subsidiaries), I could see a day coming when they have an effective monopoly on "online social messaging".

Of course, Bell also had a vertical monopoly in that they owned the physical wires in addition to being the service provider, and I think that was part of what brought them down in the end. Unless FB starts buying ISPs they won't be in the same position.

wfleming··on Ask HN: Leave job right before app goes to production?
If the current project has been poorly managed so far & dates keep slipping, that is likely to continue to be the case. The launch date could slip even further.

You already arranged a leave date with your employer, and you already went beyond what you were required to by trying to schedule that so you could help launch the project. You are not responsible for their failure to hit their schedules.

Trying to push your start date back with your new employer could also damage your upcoming relationship with them: they're more likely to care that the date change hurts their plans then that you want to do something generous for your current employer.

I think you should get out.

wfleming··on Go vs. Swift [pdf]
Maybe I'm wrong about how it works, but I feel that Optionals in Java are a bolt-on solution that only solves half the problem that the same concept solves in Swift (or Haskell, or Rust, etc.)

An Optional in Java is just another value, and nothing in practice stops that from being null. I.e. a method that returns an Optional can still return an actual null if poorly implemented. So the major benefit Optionals give you in Java is a typed declaration that the method may return an "empty" value, which is certainly helpful for knowing what cases your client code needs to handle, but it does not guarantee that the method will never return null. It reduces the probability of unhandled null pointers, but it does not eliminate them.

On the other hand, Swift & co. guarantee at compile time that a function which says it returns an Optional will always return an an Optional, never a null, and, better still, if a function says it returns some non-optional value, it still is guaranteed to never return null.

It's great that Java is pushing for this style of code, but I'm afraid without compile-time guarantees of return values it will always feel less powerful there.

wfleming··on Ask HN: Thinking of moving to Europe from USA
I did this: moved to the U.K. for several years. To echo some of the other excellent comments here, I think the main takeaways should be:

1. Compensation is generally lower than in the US. That's worth keeping in mind depending on your age & long terms plans, if you have those already. Don't let it turn you off from the idea, because living elsewhere can be wonderful, but it's worth being clear that this probably isn't the optimal choice for your bank balance/savings. But it doesn't sound like that's your priority, so that's fine.

2. If the primary reason for the move is a lifestyle change, I agree with others that the best way to do that is figure out where you want to live & then look for jobs there (or freelance/work remotely if that suits you). From my personal experience & seeing friends go through it with various countries, it's usually fairly straightforward & a company that wants to hire you should be able to help out with the process.

I'll second Berlin as a really good choice for location: culturally very vibrant & has a rapidly growing tech & art scene. I know several people who have moved there in the last few years.

I'll also say I personally loved living in London, and already being fluent in the language has its perks, but that may not be as much of a change as you want.

Good luck!

← PreviousPage 5 of 6Next →