HNHacker News
TopNewBestAskShowJobs

alexhutcheson

3,780 karma · joined February 17, 2013

Nothing I post reflects the views or policies of my employers, past or present.
submissionscomments
alexhutcheson··on Learning Spring with Kotlin – Sprint 0
If you're using Groovy you might as well use Grails[1]. It's built on top of Spring Boot but gives you Groovy interfaces to most of the things you'd care about.

[1] https://grails.org/

alexhutcheson··on FreeRDP 2.0 – A Remote Desktop Protocol implementation
Xpra is what you want for this: http://xpra.org/
alexhutcheson··on Swift: Google’s Bet on Differentiable Programming
From the language selection doc[1]:

"Java / C# / Scala (and other OOP languages with pervasive dynamic dispatch): These languages share most of the static analysis problems as Python: their primary abstraction features (classes and interfaces) are built on highly dynamic constructs, which means that static analysis of Tensor operations depends on "best effort" techniques like alias analysis and class hierarchy analysis. Further, because they are pervasively reference-based, it is difficult to reliably disambiguate pointer aliases.

As with Python, it is possible that our approaches could work for this class of languages, but such a system would either force model developers to use very low-abstraction APIs (e.g. all code must be in a final class) or the system would rely on heuristic-based static analysis techniques that work in some cases but not others."

[1] https://github.com/tensorflow/swift/blob/master/docs/WhySwif...

alexhutcheson··on I can't keep up with idiomatic Rust
In my opinion, there are two main factors driving this:

- Lower spec devices have a hard cap on overall code complexity imposed both by available ROM or flash constraints (big projects literally won't fit on the chip), and by time constraints (if your chip is running at <= XX MHz when it's active, you don't have time to run very many functions between events or interrupts). Most projects for these devices won't grow to the point where you really need the code organization benefits that C++ provides.

- It's a lot less effort to port or implement a C toolchain for your chip than it is to port or implement a toolchain for a more complex language like C++, Rust, or even Ada. It's not just the compiler - you also have to have a working standard library (even if some functions are just stubs), an interactive debugger, and integrations with IDEs (if you already provide that for C). All that software engineering is expensive, and you have a much smaller market of developers to amortize that cost over.

These constraints aren't as binding for high-production, higher-spec devices like popular families of ARM Cortex-M chips, so usage of C++ seems to be relatively more popular for those devices. Even then, embedded work normally requires more of a "C with classes" or "C plus the std::algorithm library" approach, which is different from C++ projects you'd see that target servers.

alexhutcheson··on Mosh
Tips if you're writing your own elisp:

- If you're walking the filesystem, make sure you start from the "default-directory" variable.

- If you call other programs, make sure you use "process-file" (for synchronous processes) or "start-file-process" (for async). Using "call-process" or "start-process" unfortunately won't do the right thing, but the two functions I mentioned are mostly drop-in replacements.

alexhutcheson··on Mosh
If you're an Emacs user (like the author apparently is), I would recommend trying out TRAMP: https://www.gnu.org/software/tramp/#Overview

Emacs will transparently handle SSH connections and let you edit remote files as if they are local. Just as importantly, if you run commands like M-x compile or M-! (aka M-x shell-command) while you're looking at a remote file, Emacs will "do the right thing" and run the process on the remote machine, rather than on your local machine.

This gives you the benefits that the author mentions about mosh - characters will appear as you type without waiting on a server round-trip. Additionally, you also won't have to wait for a server round-trip to see your cursor jump to the minibuffer, which the author mentions as a pain point.

If you need to run things at the command-line, you can do so in a "shell" buffer via M-x shell (or M-x term if you need to run something curses-like).

The major downsides:

- I/O operations (including opening and saving files) can be much slower than if you were running Emacs in a terminal, because the bytes need to be sent over SSH.

- It's not always easy to keep track of which buffers are "remote" and which are "local", so sometimes you'll run a command and it will run a process on a different machine than you expected.

alexhutcheson··on Mosh
If you are in a buffer for a remote file, then M-x compile should run make on the remote machine.

Docs are here: https://www.gnu.org/software/tramp/#index-compile

alexhutcheson··on Lyme disease bacteria eradicated by new drug in early tests
This is correct - you can confirm from the CDC charts here: https://www.cdc.gov/lyme/datasurveillance/maps-recent.html

Note that cases are reported by state of residence, so even the handful of cases in Arkansas and Missouri are probably attributable to travel to the upper Midwest or Northeast.

However, the Ozarks do have a high incidence of Rocky Mountain Spotted Fever, so you should still be careful about preventing tick bites and removing them ASAP: https://www.cdc.gov/rmsf/stats/index.html

alexhutcheson··on SpaceX bans Zoom over privacy concerns
> Hell the cryptography of group end-to-end encryption hasn't really been worked out yet. WhatsApp doesn't do it and that's just for text.

That doesn't seem to be accurate: https://faq.whatsapp.com/en/android/28030015/

Maybe you're thinking of this issue?: https://medium.com/@haniahshafi/are-whatsapp-group-chats-vul...

alexhutcheson··on New restrictions in Hong Kong show that a single lockdown won’t be enough
> the number of average children in existing young families is going to go up

Intuitively, you'd expect that, but the data from previous epidemics show the opposite effect:

- http://www.populationassociation.org/wp-content/uploads/CAD_...

- https://ifstudies.org/blog/will-the-coronavirus-spike-births

alexhutcheson··on Square eGift Cards
A couple points:

- Interest-free loans are valuable. Small businesses that want to borrow would normally have to pay relatively high interest rates to do so.

- A $20 gift card only results in a $20 reduction in revenue if that customer was definitely going to buy something from you even if they didn't have a gift card. This isn't true 100% of the time: X% of gift cards will be given to people who wouldn't otherwise have been customers, X% will be bought by people who aren't regulars, but would like to support a local business, X% will be bought by people who have always thought about going to that business, but wouldn't have checked it out without this push, etc. For gift card holders who wouldn't have been customers without a gift card, your loss is just the marginal cost of serving that customer. Maybe for they buy $20 worth of stuff from you, but your marginal cost to serve them is only $8. That's still $12 you otherwise wouldn't have had.

- In the right circumstances, gift cards can be a cheap way to acquire customers. Some number of customers are going to discover businesses through this and other similar efforts. If this brings in customers at a lower customer acquisition cost than typical channels, then that's a benefit, particularly if the customer sticks around even after they've used up the gift card balance.

- A substantial portion of gift card balances never get used. People forget, they move, they use part of the card and end up with an inconveniently small balance, etc. That ends up being free money (admittedly free money that's difficult to account for).

alexhutcheson··on Total Cost of Her Covid-19 Treatment: $34,927.43
Even on an HDHP, the discount you get by going through insurance is significant. For a recent bill, my insurance website shows:

    Total amount billed: $771
    Plan discount:       $699
    Plan paid:             $0 
    You may owe:          $73
Because I haven't hit my deductible yet, the plan didn't pay for anything, but I got their negotiated pricing, so I'm only paying ~9.5% of the "billed rate".

> But the expectation is that you “negotiate”, which is one the dumbest things I’ve ever heard of. Why can’t my insurance company do that?

If you have insurance, you're not expected to negotiate - the insurance company does that for you. That's the "plan discount" quoted above. You have to negotiate if you don't have insurance.

Not defending the system - I think billing is incomprehensible and hard to stay on top of. Just pointing out that you get significant benefits from being insured even if you never hit your deductible.

alexhutcheson··on Total Cost of Her Covid-19 Treatment: $34,927.43
The face values on medical bills in the US are like a bizarre joke - to a first approximation, no one ever pays them. Everyone with insurance gets insurer-negotiated "discounts" to around ~10% of the listed cost.

It's tougher for people without insurance - my understanding is that you can negotiate with the entity that sent you the bill to get significant reductions, but I don't have first-hand experience doing this. Even so, it sounds exhausting, since a single doctors visit will often result in bills from 2-3 separate entities (doctor, lab, radiologist, etc.), so you'd have to negotiate with each of them individually.

alexhutcheson··on MIT to no longer consider SAT subject tests in admissions decisions
SAT Subject Tests are either optional or not considered at most schools. I personally took a few SAT Subject Tests that were only required for a single school I was applying to.
alexhutcheson··on Lies, Damned Lies, and Averages: Perc50, Perc95 Explained for Programmers
My normal approach is to measure and set up separate alerts for "error rate" and possibly "timeout rate". You definitely want to know about those, but "mean latency" mixes those metrics with the latency metrics for successful requests, which makes it less sensitive to changes in either one.

In general I agree that averages aren't always bad. One additional advantage is that it's often possible to generate robust confidence intervals for averages, but it's often not valid to generate CIs for medians/percentiles without introducing other probably flawed assumptions.

alexhutcheson··on New MacBook Air
eBay is full of cheap refurbished Latitudes, because businesses are constantly replacing them with something newer.
alexhutcheson··on Actual Causality (2016)
Marc Bellemare's Metrics Mondays posts are pretty good: http://marcfbellemare.com/wordpress/metrics-mondays

Lots of practical tips for causal inference on real data.

alexhutcheson··on The Mystery of the Missing Bus Riders
In New York, specifically, it's not much of a mystery - the incredibly close stop spacing and inefficient boarding procedures make it so the bus is barely faster than walking.

Most buses stop almost every block, they board through a single door, and they use the two slowest payment methods available in almost any system (cash and magnetic strip cards).

However, I don't expect this to change anytime soon, because many existing riders are very invested in keeping buses the way they are. To be clear, their concerns are valid - for a variety of reasons, it may be difficult for many people to walk an additional block to their local bus stop, vs. having a stop in front of their building. Many of the current riders are also long-time residents who are more likely to go to community board meetings, contact their city council members, and protest changes in other ways. If you're a policymaker, it's hard to weight the costs that would be imposed on this vocal set of people vs. the benefits that would accrue to a much less vocal group of people who would benefit from a faster and more consistent bus.

alexhutcheson··on Google Open Source Code Search
By necessity, Abseil is full of dark template magic that would very rarely be used elsewhere in the codebase. That's the point - it encapsulates a lot of useful abstractions and allows them to be used without the client code author thinking about the guts of the abstraction. But it makes it pretty unusual relative to typical Google C++.
alexhutcheson··on Glibc malloc inefficiency (2016)
Have you seen the recently updated GitHub project: https://github.com/google/tcmalloc
alexhutcheson··on Please stop recommending Gitflow
It's honestly crazy how much time we as a community of software developers spend thinking about Git. We spend time training new engineers how to use it, we spend time researching how to un-wedge ourselves when we run into problems, we spend time standardizing preferred workflows and giving feedback when someone doesn't follow them, and we seem to spend time debating the proper branching workflows within each team or company once every couple years. When all those costs are added up, I felt more productive using svn. I can't be the only one.

Ultimately I think the problem is that Git solves too many problems - it provides a very general data structure that can be used in a lot of different ways, but the tooling itself is mostly agnostic to how you want to use that data structure. Teams can define preferred workflows on top of that, but the tooling itself doesn't enforce the workflow, or provide any specific affordances that help you properly comply with the workflow. Instead, every developer is supposed to keep the workflow in their head, and make judgement decisions every time they interact with it.

The cost of this is huge. We're sorely in need of opinionated tooling that sits above Git's data structures and makes real-world workflows simple to follow correctly, and difficult to mess up.

alexhutcheson··on Waymo Via
You are overrating how far truck drivers would go to resist a robbery. That's not their job, and the load is insured - even if a driver is there, they're not going to do anything to stop you.
alexhutcheson··on Photographer Jacob Riis showed “How the Other Half Lives” in 1890s NYC (2017)
That was the most interesting part to learn about for me, but they don't have the outhouses, and many of the tours are in units that were retrofitted with indoor plumbing and bathrooms later. Those units look essentially the same as they do now, except they have older furniture and kitchen fittings.
alexhutcheson··on Photographer Jacob Riis showed “How the Other Half Lives” in 1890s NYC (2017)
If you live in NYC, you might be underwhelmed. I toured a couple years ago, and my main reaction was "This looks like a bigger version of my current apartment!" A huge percentage of the walk-up buildings in Manhattan are from the tenement era, so it's pretty likely that you or a friend already live in one.
alexhutcheson··on SETI@home shuts down after 21 years
I wonder what the aggregate carbon footprint and electricity bill was over the project's life. It has to be a lot, right?
alexhutcheson··on Why Cloudflare Chose AMD EPYC for Gen X Servers
The rr debugger, which is an amazing productivity enhancer for C/C++ development, still doesn't support AMD: https://github.com/mozilla/rr/issues/2034
alexhutcheson··on I Want Off Mr. Golang's Wild Ride
The author of Joda-Time actually thinks that even Joda-Time didn't get it quite right, and believes the java.time libraries in Java 8 and above (aka JSR-310[1]) are better than Joda-Time: https://blog.joda.org/2009/11/why-jsr-310-isn-joda-time_4941...

It turns out that abstractions for time are really hard to get right.

[1] https://jcp.org/en/jsr/detail?id=310

alexhutcheson··on Spreadsheet Horror Stories
"There are only two kinds of languages: the ones people complain about and the ones nobody uses."[1] That applies to spreadsheets as well as to C++.

[1] http://www.stroustrup.com/bs_faq.html#really-say-that

alexhutcheson··on Downsides of Google Authenticator
What's your threat model? Security researchers or nation-state level adversaries might theoretically be able to tap your printer and parse it for things that look like codes, but if you're receiving that level of expert human attention then you're probably already compromised in one of 1000 other ways.
alexhutcheson··on GitLab Handbook
Did you see that "South Carolina" is an option in the drop-down? It has a value of 0.7, which seems pretty generous: it's higher than New Jersey (0.633), and is the same as Atlanta, Charlotte, and Connecticut (0.7), all of which have higher cost-of-living than most parts of South Carolina.

The fact that the urban areas of South Carolina aren't broken out actually seems better for anyone who would plan to live in a rural part of the state. By comparison, "Everywhere else, Georgia", "Everywhere else, North Carolina", and "Everywhere else, Virginia" all have a multiplier of 0.633. This seems to indicate that you'd get paid about ~10.5% more in rural SC than you would in other rural places in the SE.

← PreviousPage 9 of 29Next →