HNHacker News
TopNewBestAskShowJobs

nathan_long

4,485 karma · joined June 1, 2012

submissionscomments
nathan_long··on But no, 80-column terminals in 2020 isn't “reasonable” any more
On my 15-inch MacBook, I have a full-screen terminal running tmux, split down the middle with Vim in the left pane and a shell in the right pane. At the smallest font size I can stand in decent lighting, I can get 88 columns in the left pane. Usually I want the font larger.

80 seems good to me.

nathan_long··on Scaling Up with Elixir
A discussion of how Erlang processes help us build scalable and reliable systems in Elixir.

This may not be news to developers, but might be useful for broader company discussions.

nathan_long··on Show HN: Obsidian – A knowledge base that works on local Markdown files
This is really murky to me. As a professional, I keep notes as I learn things which may or may not relate to my current employment. The notes are my property and part of my knowledge base that I bring to any job. But I suppose I indirectly receive compensation for knowing things, so I need a commercial license?

Or what if I start taking notes on some random subject for fun, and eventually I write and sell a book based on them? All of a sudden I need to start paying a yearly fee?

It's not a prohibitive amount of money, but I'd be much happier with paying a one-time fee for the current version, then buying future versions if I choose to.

nathan_long··on Twitter Will Allow Employees to Work at Home Forever
> I work at a large tech company on a young team (average age is late twenties). In my experience many don't view working from home regularly as a benefit. I understand that must change drastically when you're middle aged

Yes, and there is some correlation between age and seniority. If companies are so eager to hire senior developers, they might consider the preferences of candidates who have been working long enough to fit that description.

nathan_long··on Twitter Will Allow Employees to Work at Home Forever
So you're considering Candidate A, who lives in SF, and B, who lives in a small town.

You decide that B has to compete with A on talent, but A doesn't have to compete with B on price.

Does that make strategic sense?

nathan_long··on Twitter Will Allow Employees to Work at Home Forever
It cuts both ways, right?

Companies: "I don't have to pay you $big_city rates because you live in $small_town and nobody there will offer you $big_city rates."

Candidates: "I don't have to accept $small_town rates because I work remotely and can work for a company in $big_city."

nathan_long··on Ask HN: What is your strongest argument against remote work?
> Hiring is more difficult. It's not that you can't find applicants, but the people capable of performing without direct supervision is (mostly) a subset of those capable of performing in an office.

OTOH, your applicant pool is limited only to the time zones and legal jurisdictions you're willing to hire from. If you're office-based, it's limited to those who can reasonably commute there.

nathan_long··on Ask HN: What is your strongest argument against remote work?
Yep. But I'm not lugging a crock pot on a plane. :)
nathan_long··on Ask HN: What is your strongest argument against remote work?
> There can be a fair amount of lag time over messenger and this occasionally blocks the completion of work.

Agreed. But the reverse is also true: it's harder for people to interrupt you.

nathan_long··on Ask HN: What is your strongest argument against remote work?
It's impossible to have a company potluck.
nathan_long··on Build a real-time Twitter clone with LiveView and Phoenix 1.5
> That's the same risk you have with any open source project.

Yes and no. The larger the number of dependencies you have, and the larger number of maintainers that are behind them, the more chances you have of one of them containing malicious code.

I think you're pretty safe from Phoenix or Rails or NodeJS getting owned because so many people work on them. But one of the thousand small packages you use may belong to someone careless or malicious.

nathan_long··on Build a real-time Twitter clone with LiveView and Phoenix 1.5
Lumen may be the answer to this in the future: https://www.youtube.com/watch?v=uMgTIlgYB-U&list=PLqj39LCvnO...
nathan_long··on Build a real-time Twitter clone with LiveView and Phoenix 1.5
The common retort from SPA devs is "what about offline?" Since LiveView keeps state on the server, it doesn't really work offline.

However, 1) you can add custom JS using LiveView's hooks, which might be enough for very simple offline behavior and 2) many SPAs don't work offline either.

If offline support is a major part of your app's design, LiveView isn't a good fit. But you could still use Phoenix Channels (the building block underneath LiveView) to provide fast push updates to your client. See the channels docs for an idea of how they work - https://hexdocs.pm/phoenix/channels.html

nathan_long··on Build a real-time Twitter clone with LiveView and Phoenix 1.5
> The only modern web problem that Elixir isn't ideally suited for is heavy number crunching.

I would caveat that in a couple of ways.

First, suppose you have a web app where some requests involve heavy number crunching and others don't. In web frameworks where 1 request ties up 1 OS thread, a burst of heavy requests could gobble up all your available connections. Phoenix would use one cheap BEAM process per request, and the BEAM's preemptive scheduler would ensure that other requests are answered in a timely way and that all the heavy ones continue to make steady progress. So although the heavy requests might be completed more slowly than in another language, the overall system would remain more responsive.

Second, if you have need for heavy computation or data structures that work better with mutability, it's possible to (eg) use Rustler (https://github.com/rusterlium/rustler) to implement that part in Rust. See https://github.com/rusterlium/rustler for a story about doing this.

nathan_long··on Build a real-time Twitter clone with LiveView and Phoenix 1.5
The answer is applicable. LiveView is implemented using Phoenix Channels.
nathan_long··on Build a real-time Twitter clone with LiveView and Phoenix 1.5
You can see some other examples of LiveView apps at https://phoenixphrenzy.com/results
nathan_long··on Build a real-time Twitter clone with LiveView and Phoenix 1.5
Chris McCord has given some talks and explained this - eg see https://www.youtube.com/watch?v=8xJzHq8ru0M at about 22 minutes in
nathan_long··on Phoenix LiveDashboard
I like to say that the BEAM's preemptive scheduling provides non-blocking IO AND non-blocking computation.

To expand on your workload description: things like waiting for a database query or an API result are smoothly handled in this paradigm; the process goes to sleep for a bit whle another request is processed.

If your workflow is like a delivery truck which makes a lot of stops, "faster trucks" doesn't help much with throughput. "More trucks" is better.

nathan_long··on Phoenix LiveDashboard
Another consideration: Phoenix PubSub makes it simple and performant to add more servers. So if one (say) chat app server can provide acceptable performance for N users, you can serve N more users by adding another node.

See the architecture of Phoenix Channels (which powers LiveView and other websocket-based solutions in Phoenix): https://hexdocs.pm/phoenix/channels.html

nathan_long··on FLIF – Free Lossless Image Format
Imagine this: you set your browser to download only the first N bytes of each image, showing you a decent preview. If you want more detail on a particular image, you tap it, and the browser requests the next N bytes (or the rest of the file, if you prefer).

And to enable this, the site only needed to create one high-resolution image.

Seems like a victory for loading speeds, for low-bandwidth, and for content creation.

I think FLIF looks incredible.

nathan_long··on Equifax securities fraud class action [pdf]
Are you being serious? If a bank "locked" its vault by tying the door closed with yarn, would you say "at least they locked it"?
nathan_long··on Phoenix Phrenzy Winners Announced
This was a contest to show off what Elixir's Phoenix LiveView can do. More about the underlying tech at https://dockyard.com/blog/2018/12/12/phoenix-liveview-intera...
nathan_long··on Richard Stallman resigns from CSAIL at MIT
> Stallman was arguing that from Minsky's point of view, he probably had no reason to suspect that he was not dealing with a consenting girl.

"Consenting girl" is a contradiction. A child cannot legally give consent for sex. If he knew she was underage and if he had sex with her anyway, that was criminal.

nathan_long··on Ask HN: What's your favorite corporate power move?
The classic programmer corporate power move is wearing whatever you want to the office.
nathan_long··on CSRF is really dead
> Could we just avoid cookies altogether, and store session info in local storage?

Several possible issues there:

- If the session is large, it eats space on the user's machine and bandwidth in requests - The session can't be shared across devices - Security concerns. You don't want to trust the user to tell you what their current state is - especially if it's "I have this much money in my account" and the like. Even if you encrypted the data, they could resend the same state at a later time - "oh look, I have a full wallet again!"

You're much safer if all the user sends is "here's who I am" and every bit of associated information is under your control server-side.

nathan_long··on Questions to ask a company during a job interview
> Because unless you are some sort of celebrity engineer, "interview is a conversation between both parties" is nonsense.

I disagree. Unless the candidate desperately needs this job, he/she can walk away. The candidate is free to consider "company won't bother to answer my questions at the point when they have most reason to be nice to me" as a bad signal.

> I am specially referring to companies that don't really have to care about your feelings towards their interviews

"This company doesn't have to care about my feelings because they are huge and have lots of applicants and a giant incessant interview machine chugging through them efficiently" is certainly something I'd consider in whether I want to work for them, because it tells me I'd be a cog in a machine. (And if enough people consider that, perhaps they will have to care.)

To the parent question: I wouldn't ask a whiteboard question exactly, but I would certainly ask some questions about existing architecture and rationale so I have an idea what I may be working on.

nathan_long··on Goldman Sachs is spending $100M to shave milliseconds off stock trades
Unless you add random delays to each trade.
nathan_long··on The Hottest Phones for the Next Billion Users Aren’t Smartphones
> you expect us web developers to cater to every different device out there? i am sorry, but the whole promise of the web is that i don't have to do that.

A basic HTML document with CSS styling will adapt beautifully to any screen and requires very little CPU or memory. Write once, view on every device with a browser. Publishing content is also part of the original vision of the web, and luckily HTML forms are also accessible to any device.

Yes, you want to write apps, and perhaps that requires more from a device, and maybe you don't want to cater to poor Indians. But lots of sites are sending down 3 megabytes of JS to display an article and run 48 ad trackers. That's a crappy experience even on my smartphone and decent WiFi.

I'd also wager that there are many, many "apps" you could write which could be 100% server-side rendering and simple markup, and which would be super useful in the developing world. Think Craiglist and Ebay - the kind of applications that help people share their location and agree on prices of goods.

The "use anywhere" promise of the web is easier to keep if you lean on the web's fundamentals instead of writing a browser to run in the browser and shipping it to every user.

nathan_long··on Mr. Darcy’s Ten Thousand a Year
Sounds right, but she wasn't purely mercenary like her friend Charlotte, who admitted to marrying Mr. Collins for his money, which filled Elizabeth with horror.
nathan_long··on Don’t Put Your Work Email on Your Personal Phone
Depends highly on the employee's value to the company.

Also, if the employee has very marketable skills, they may be happy to leave a job whose hourly rate has suddenly dropped.

Page 1 of 34Next →