HN user

Townley

1,675 karma

Web/mobile developer (mostly python/javascript). NYC -> Montreal -> Washington, DC

Posts47
Comments146
View on HN
lazyvim-ambitious-devs.phillips.codes 5mo ago

LazyVim for Ambitious Developers

Townley
1pts0
www.nytimes.com 7mo ago

The Dark and Predatory World of Crypto Casinos

Townley
5pts0
www.seangoedecke.com 9mo ago

Seeing Like a Software Company

Townley
4pts0
news.ycombinator.com 1y ago

Ask HN: Options for One-Handed Typing

Townley
95pts96
www.kiplingsociety.co.uk 1y ago

Hymn of Breaking Strain

Townley
3pts1
www.nytimes.com 1y ago

A.I., The Electricians and the Boom Towns of Central Washington

Townley
2pts1
www.nytimes.com 1y ago

Insurers Are Deserting Homeowners as Climate Shocks Worsen

Townley
44pts85
www.pcmag.com 2y ago

First Human to Receive Neuralink Implant Says It Lets Him Play Civilization VI

Townley
6pts2
arstechnica.com 2y ago

Can a $3,500 headset replace your TV? We tried Vision Pro to find out

Townley
2pts9
www.portugaltheman.com 2y ago

Portugal the Man, Band Website

Townley
1pts1
www.consumerfinance.gov 2y ago

CFPB Proposes Rule to Jumpstart Competition and Accelerate Shift to Open Banking

Townley
4pts0
news.ycombinator.com 3y ago

Ask HN: How to find a small town to relocate for remote work?

Townley
252pts550
farmfreshforlife.com 4y ago

How to Clear Woods for Free (Without a Back Hoe)

Townley
1pts0
www.theatlantic.com 5y ago

Before you answer, consider the opposite

Townley
2pts0
news.ycombinator.com 5y ago

Ask HN: How much do social networks spend on hosting and storage per user?

Townley
7pts6
www.soyacincau.com 5y ago

KFC deploys autonomous 5G ‘food trucks’ in China

Townley
1pts0
builtin.com 5y ago

The internet should be more like Wikipedia

Townley
2pts0
twitter.com 5y ago

XMLHttpRequest Capitalization

Townley
1pts0
www.theatlantic.com 5y ago

The Plan That Could Give Us Our Lives Back

Townley
2pts0
www.npr.org 6y ago

Early Oxford-AstraZeneca Coronavirus Vaccine Data 'Encouraging,' Scientists Say

Townley
2pts0
wattenberger.com 6y ago

Creating a Gauge in React

Townley
5pts0
www.swyx.io 6y ago

Mise en Place Writing

Townley
85pts30
www.theatlantic.com 6y ago

Social distancing is the only way to stop the coronavirus

Townley
73pts72
www.theatlantic.com 6y ago

The Case for Buying a House with Friends

Townley
19pts10
puri.sm 6y ago

Librem 5 October 2019 Software Update

Townley
2pts0
blog.pragmaticengineer.com 6y ago

The Product-Minded Software Engineer

Townley
12pts1
slackhq.com 6y ago

A snappier, more efficient Slack desktop experience

Townley
1pts0
michaelfairley.com 6y ago

I Made a Game in Rust

Townley
5pts0
arstechnica.com 6y ago

YouTube flags robot battle videos as “animal fights”

Townley
1pts0
roberttownley.com 6y ago

Ben Affleck Made Me a Bad Project Manager

Townley
1pts0
Starcloud 1 year ago

It sounds like their vision for space-based data centers presupposes nearly-free energy costs, delivered via a colossal solar farm made possible by falling launch costs.

Temporarily putting aside (extremely fair) feasibility questions around those two pre-requisites, data centers are a not-bad choice for things to do with unlimited space energy.

Aluminum smelting or growing food are the two I’d think of otherwise, and neither of those can have inputs/outputs beamed to a global network of high-bandwidth satellites.

A competitive geoguesser clearly got there through memorizing copious internet searching. So comparing knowledge retained in the trained model to knowledge retained in the brain feels surprisingly fair.

Conversely, the model sharing, “I found the photo by crawling Instagram and used an email MCP to ask the user where they took it. It’s in Austria” is unimpressive

So independent from where it helps actually improve performance, the cheating/not cheating question makes for an interesting question of what we consider to be the cohesive essence of the model.

For example, RAG against a comprehensive local filesystem would also feel like cheating to me. Like a human geoguessing in a library filled with encyclopedias. But the fact that vanilla O3 is impressive suggests I somehow have an opaque (and totally poorly informed) opinion of the model boundary, where it’s a legitimate victory if the model was birthed with that knowledge baked in, but that’s it.

These companions can take a variety of forms — in the 2004 study, which looked at 100 6- and 7-year olds, 57 percent of imaginary friends were human, 41 percent were animals, and one was “a human capable of transforming herself into any animal the child wanted.”

Real world data is a messy thing

At work I’ve recently moved from a Node/TS monolith to “Python+TS react in a sea of .NET microservices I debug and contribute to”

It’s been the second time in my career I’ve been surprised by not hating C# (the first was goofing off with Unity in 2018). The language itself has a lot of niceties; for example a method to turn the variable foo into the string “foo”. The Neovim LSP set itself up just by installing the dotnet executable. And the syntax for creating complex workflows were pretty ergonomic once an experienced .NET dev walked me through what I was even looking at. I still prefer FastAPI + well-typed Python as the backend framework of my dreams… but I’d work in .NET again.

Blazor hasn’t sold me yet, but seems like a fine choice. It fits in the same class of tools to me as Django Templates, HTMX, or JS handlebar rendering. There’s a class and size of apps for which that’s perfect, and there’s some value in a fullstack language keeping your stack monolingual. But IMO the framework should stand on its own against frontend frameworks like React, Vue, or Svelte… with the simplicity of monolingualism added as a cherry on top. Otherwise you’re optimizing towards the number of languages your devs need to learn over which frontend framework would be the best fit for your app. And between the DX and expansiveness of the JS ecosystem, it’s been hard to imagine going back once you’ve spent a few years eating the shamefully-complicated-constantly-shifting-and-reforming elephant that is learning TS React and friends

Those diapers say 10-18lbs on the package, but they actually hold waaaaay less urine than that

—First dad joke my brother in law bestowed upon me after my daughter was born

My teenage niece is getting solid at chess, but I can still beat her handily. So we came up with a fun handicap the last few times we’ve played:

Every third turn, my four year old daughter gets to move for me. She doesn’t know the rules so she chooses a piece and we give her the full rundown of options where that piece can legally move. Neither of us can influence her choice, but there’s some degree of psychological play allowed for everyone’s entertainment

It’s been unexpectedly rich and fun for everyone involved:

- My daughter is slowly learning the game and likes hamming up the choice

- I exercise a different part of my brain around guarding eventualities and conservative movements

- Pure cackles of joy and glee from my niece whenever my daughter reaches for the queen

Another application of GLSL/SDL: you can make custom shader materials for yourself in ThreeJS using the ShaderMaterial. You write the GLSL code in a string within the material and it’ll be applied to the mesh the material is attached to

Gives you the ability to make some cool looking effects like fresnel without post-processing filters

A single person sifting through 15,000,000 pounds of trash at a rate of one pound per minute would take 28 restless years

But finding one of 2^256 private keys would take millions of years. This math felt correctly conservative https://bitcoin.stackexchange.com/questions/2847/how-long-wo...

There’s a chance that if Moore’s Law holds, a computer might catch up after decades of continued exponential growth. But my money’s still on the trash spelunker in that race

All of us must navigate the trade-off between “me” and “we.” A famous Talmudic quote states: “If I am not for myself, who will be for me? If I am only for myself, what am I?” We must balance optimizing for oneself with optimizing for others, including the public good... To take an extreme example, Big Tobacco surely does not support the public good, and most of us would agree that it is unethical to work for Big Tobacco. The question, thus, is whether Big Tech is supporting the public good, and if not, what should Big Tech workers do about it.

The duty to align your professional life ethically scales with your ability to do so. I personally don't cast aspersions on anyone working in tobacco farms or in a gas station selling cigarettes; they're just trying to get by. But if you're one or two levels up Maslow's Pyramid, it's right to weigh your personal needs against the impact of your work. You'll also be better off for it, knowing that the world would be worse off if you decided to switch gears and become a carpenter/baker/bartender/choose your adventure.

I'll also say: there are ways to contribute morally outside of your 9-5. Volunteer to teach a neighborhood kid to code. Show your local sandwich shop how to set their hours online, or maybe even build them a cookie cutter Squarespace site. Donate a small fraction of your salary (eg 0.5% local, 0.5% global) to causes you believe in, and scale up over the years.

Wait I remember those ads and I’m now confused.

If vision-restoring eye transplants are the novel domain of futuristic moonshot research, how did Jerry Orbach’s eye donation give the “gift of sight for two New Yorkers” twenty years ago?

EDIT: Ah I follow now: he donated his corneas, which is a more routine procedure than an aspirational, vision-restoring full eye transplant

For the last badge, it wasn't masterful strategy: I played until I got lucky with an overpowered Ring of Wealth run, and farmed the dwarven floors for like 3 days before breezing through the demon halls and ascending. That one and only six challenge run landed with 1,050,700 points, which was just enough to get the final "Over 1 million points" badge.

That was the last round I played, almost a year ago. I consider myself free from the game now, but look back on it fondly :)

Excellent game, I lost an embarrassing amount of time last year getting all of the badges.

The mobile versions are great because they’re ad-free, and work without internet access when on airplanes. And since it’s turn-based, it’s very interruption-friendly. The Reddit community is also a lot of fun: equal mix of strategy and memes.

I agree with your overall point that cloud resources probably shouldn’t be a problem for Amazon that factors into the hours of processing time. But is it true that AWS could provide at-cost resources to sister companies?

More of a legal/organizational question. But assuming Amazon Fresh is a legally-distinct entity with service agreements with Amazon Web Services, wouldn’t offering those services at below-market-rate be considered anticompetitive (and also call into question the legal separation of the two entities)?

I grew up in NYC but moved to DC years ago and enjoy it a lot. Cost of living is noticeably lower, still no need for a car (though having one isn’t prohibitively expensive like in NYC), and it’s got a better vibe than people give it credit for (At least if you’re not in politics). A bit slower paced but you can also Amtrak or Jet bus up to NYC any time you want.

NYC is incredible, but when it came down to value… it was hard to justify the $5k+/mo rents. Delis are great but its just not worth it

That said, if you are interested in NYC, I wouldn’t look in Manhattan these days. Brooklyn or the more accessible parts of Queens are where I’d look for a better vibe and good values

It's interesting that this phenomenon is much more prevalent in game development, as opposed to (for example) web development: some people build their own web development frameworks, but it seems like every game dev tries to make an engine at some point.

My theory why: good web frameworks consider developer experience to be of paramount importance, and invest heavily into examples, documentation, and API improvements. Unreal and Unity by comparison are unpleasant to work in. The UI is clunky, the examples cap out after a certain point of complexity, and community input is almost nothing when compared to the Django, Express, Rails, or language-specific ecosystems.

Anyway, I can't say I've ever made it far enough down the rabbit hole to want to make my own language... but I know for me, the desire to make my own engine* has punctuated every attempt over the years to get better at both Unity and Unreal

*Acknowledgment that I might be partially disproving my own point, as I've tried to build both my own web framework, AND my own game engine... but I spent a lot more time on the game engine (https://github.com/RobertTownley/gamehook)

I developed almost exclusively in django for many years before moving to react or vue for frontends.

The switch from django templates was painful and a tremendous learning curve, so I get the value proposition of drop-in interactivity tools like HTMx. But when you compare the two frontend ecosystems (javascript vs htmx) it's night and day. The support, the DX tooling, the variety of libraries... that's not to say HTMx couldn't one day mature to a comparable place, but it seems unlikely, and in the meantime investing in "eating the elephant" by learning a JS framework seems worthwhile for anyone planning to spend a significant amount of time building frontends

It’s surprising to me that stenography-esque chording hasn’t had a breakthrough moment among programmers. Most programmers love trading hotkey/shortcut recommendations, and software from vim to blender to photoshop show users have a deep interest in using shortcuts to become more efficient.

Hardware restrictions notwithstanding, if my keyboard driver/OS had convenient support for importing standardized maps that let me type `h-down, e-down, release` instead of “hello” I’d gladly (slowly) start using it

In the case of a username/email + password login, the password is sent to Facebook. Code on their end uses a one-way encryption to turn it into a unique value that's compared against a value they stored in the database when you set your password. As long as the one-way encryption is done with the same values, the two passwords match, and FB knows that you've typed the correct password without them having to store your plain-text password in their database

Some insecure websites (not Facebook) may not do this, and instead store your credentials in a database without encryption. It's a terrible idea, and GP's comment seemed to be referring to this when they (correctly) suggested that no one should have access to a database of plain-text passwords.

The replies mostly refer to the fact that even if the password never hits FB's database, there is still code running on authentication servers that handles that password in plain text before it's been encrypted. Limiting engineer access to authentication servers is a good idea, but it'd be challenging to prevent ALL engineers from having access.

Sometimes, though thankfully less frequently (and for a less-disastrous definition of "serious") than I used to.

Luckily, a good CI/CD pipeline makes reversions just as easy as deployments. So even when you have errors, it's easier to correct than if you suddenly discovered "our deployment bash script / ansible playbook isn't as reversible as we thought it was"

Mortality rate is the ratio of deaths to individuals in a specific population.

So there's the mortality rate for the overall population (what GP is referencing) vs mortality rate among people who've had COVID (what I believe you're referencing). Both are valid and useful in different circumstances: "How likely am I to die if I get COVID" changes as we discover a glut of asymptomatic cases, but "What % of the population will die of this disease?" stays the same

Ref: https://www.merriam-webster.com/dictionary/mortality%20rate

Downsides (see: tremendous complexity) being generally understood, I'll list some of the upsides I personally feel compared to your described setup:

- If you wanted to scale up or down the number of container processes running on your VM, you'd need to write some code that looks at system utilization. Autoscaling k8s clusters do that for you. They can even provision additional VMs ("nodes") for you during times of heavy traffic, or scale down to save money.

- Updating your app requires either logging into each VM, or writing an Ansible playbook to do that for you. By the time you've written a zero-downtime, health-check-honoring, contextually-aware Ansible playbook, you've made your own container orchestration solution.

- If you run multiple containers that need to talk to each other, you'd need to handle their networking. K8s gives you tools for handling networking between containers in the same namespace that allows them to communicate without exposing them to the wider internet.

- The ecosystem of utilities is as good (and sometimes better) than you'd experience in your VMs setup. cert-manager makes certificate management almost as easy as LetsEncrypt does on a single machine. Prometheus and Grafana are excellent logging and monitoring solutions (and, IMO, much easier to setup on K8s than ELK is within a distributed VM setup). Cillium provides extremely powerful and useful networking and security policies that leverage eBPF

- Changes you make to the configuration of your server won't carry over if you ever need to switch hosting providers, or (more often the case for me) just want to start fresh.

It's absolutely a huge learning curve, but eventually the complexity (mostly) goes away, and you're left with a reproducible method for deploying apps. So in the same way a rails/django developer might use an overpowered solution for their blog API, or a React developer may build a custom frontend when wordpress would also do... someone who's taken the time to familiarize themselves with K8s might find the familiarity and consistency of the interface enjoyable, even if it is clearly killing a fly with a sledgehammer.

Tangential to this article, but can I just say that this is HN at its best. Random, curious, snippets of learning on topics that I can’t imagine hearing about anywhere else. It’s a pure love of knowledge that leads thousands of people to spend Friday night reading a largely useless Wikipedia entry on house burning just because it’s mystery

Also a big django fan taking the plunge (we've started using FastAPI in production at work, and really love it!)

An admin interface would be wonderful, but given such a heavy API focus, I find Insomnia or Postman to work well enough for those interactions, so I haven't missed it all that much.

Seconding the SQLAlchemy friction though. Built-in ORM support would really help cut down the boilerplate required to wire FastAPI/Starlette models into the database. I think django devs feel the issue more acutely since defining FastAPI objects feels so familiar to making django models. But at the end, rather than having to wire up DRF serializers and viewsets, you need to wire up the database.

One other benefit to taking a more opinionated approach to database interactions: with a sensible-defaults-but-customizable user model, FastAPI could offer token based authentication/authorization out of the box by implementing something similar to Django+DRF+Djoser endpoints

Anyway, seconding the gratitude for this wonderful project, and really looking forward to using it more!

Dunno what search backend you’re using, but if it’s ElasticSearch this can be done pretty quickly with a Gaussian decay filter. That takes in lat/lng directly, and adjusts the ordering of results.

That’d also give the nifty feature of finding the closest available vaccine, even if it’s a hundred miles away (not a walk in the park, but I’d drive that far personally)

Personally I love poetry, if for no reason other than making publishing a breeze. If I can’t use it for some reason, I like managing virtual envs with pyenv (not to be confused with pipenv. You’re better off for having missed the controversies around that)

Oh btw virtualenv is gone now; you make envs using python -m venv myEnvName