HNHacker News
TopNewBestAskShowJobs

pmoleri

288 karma · joined April 7, 2016

submissionscomments
pmoleri··on On Comments in Code
Or you can write tests for every single not there case. Just bringing it up, I usually write lots more comments than tests. I also encourage my teammates to add comments. The problem is when one can't really explain why the simpler approach didn't work. That requires more research just to write the comment, but I think it pays off really quick.
pmoleri··on 2021.06.08 Certificate Lifetime Incident
AWS load balancers also give you managed certificates for free.
pmoleri··on China now generates 54 percent of the world's coal-fired electricity
Outsource, buy cheap. When are the main economic powers going to tax the origin of merchandize based on environment impact, labour rights and such metrics. Putting a higher customs tax for lower rated countries can be a game changer.
pmoleri··on 'New car smell' is the scent of carcinogens
Peanut, Egg, and Milk protein (CMPA) allergies are common in babies. My understanding is that the digestive system is not mature enough to process them, so it rejects them. Some of these allergies develop even while breast fed (baby colic). I take that some allergies stick once developed. But you should consider that something that creates an allergy response in a baby may be not harmful at all for an adult. And sometimes, once the allergy is triggered it sticks.
pmoleri··on Firefox 85 cracks down on supercookies
Fetch/XHR as long as the tracker server have CORS * enabled, right? Then they can just inspect the blob data.
pmoleri··on The world needs nuclear power and we shouldn’t be afraid of it
How come there are many countries with 100% renewable then? Big, small, rich, poor; we have many examples of different characteristics and still we get the nuclear vs coal debate as those were the only options. Is it really that expensive, how come 3rd world countries can afford it? I think it's more about politics than feasibility.
pmoleri··on Hiroshima (1946)
That kind of reasoning can be used to justify all kind of things that are considered crimes. Wipe out 200K in one action just to show power seems too much. I don't accept that the amount of creativity used to create weapons cannot be applied also to use them more wisely in ways that don't wipe out 200k.
pmoleri··on Hiroshima (1946)
> Which if it had continued, could have consumed far more lives.

Everything along these lines are counterfactual excercises and a nice way of justify the crime of dropping nuclear bombs on cities full of civilians. I don't buy this. And something we all know is that history is told by the victors.

pmoleri··on How a flawed idea is teaching millions of kids to be poor readers (2019)
In Spanish: word -> sound (is straightforward). sound -> word (not so straightforward).

So, spelling does make sense, but it's not much of a thing like in English. We have some rules to aid the process, but at the end of the day, you need to have read a lot to know how truly write a word.

That being said, I find kind of weird the cue process described in the article. I think that in Spanish we always learn by identifying letters with sounds as there's a 1 to 1 relationship in that direction. I.e. every written word has only one possible pronunciation.

pmoleri··on Old box, dumb code, few thousand connections, no big deal
> probably easier than using whatever async/await interface your language has

Is it? I haven't used threads directly in a while, but I remember dealing with sinchronization issues. Problems that just don't exist in single threaded node with async await.

I find the async Promise or Task to be a more useful abstraction than the thread. Although, you need threads or a task dispatcher with a pool of threads if you need to run cpu intensive stuff.

pmoleri··on Old box, dumb code, few thousand connections, no big deal
Learning curve close to none? I like that many times there's "the way" of doing things, but when I have to do something slightly outside the recommended way, I feel that the effort required outweights all the benefits.
pmoleri··on A Critique of React Hooks
What's the problem with render props? You need a component to provide values to its unknown children, you either do render props or you need to clone the children injecting them the values. I find render props to be a much more clear pattern than clone. It also works nicely in TypeScript doing the proper type checking. Am I missing something?

Edit: I think I missed the point. Hooks do make providing state to children simpler in a lot of cases. I just don't hate render props that much :)

pmoleri··on 'Pandemic ventilator' could offer solution in potential 'worst case' scenario
Interesting, so a little improvement there may lead to less ICU beds and sorter overall time at the hospital. Wonder if that's possible.
pmoleri··on California governor issues statewide 'stay at home' order
If you let it go wild is not gonna be a 1% death rate, health care collapses and it suddenly jumps to 5% or higher. With the health system collapsed deaths are not only about COVID-19, but everything else that depends on health care.
pmoleri··on Please stop recommending Gitflow
I think so. Sometimes we have long-lived branches with multiple contributors for new features. Is this some kind of anti-pattern? We don't use feature flags, they seem hard to maintain and restrictive in terms of what you can do (e.g. structural changes). OTOH, because we're a small team, when there's a lot of work in a new feature branch there's little work on master, so there's little hassle there too.
pmoleri··on Please stop recommending Gitflow
> * major features are done in feature branches, w/rebasing prior to merge

Rebase in a feature branch, that can be long-lived and have many commits, seems like a painful experience to me.

You can end up solving the same conflict more than once, or even solving conflicts that don't exist in the final result. no-ff merge commits are usually easier to solve.

Am I missing something? Is there an easier rebase strategy?

pmoleri··on Downsides of Google Authenticator
Mmm, does that mean that now your iCloud password unlocks all your 2FAs?

It isn't that bad, it still a 2nd factor, but it's worth considering it.

pmoleri··on Should you self-host Google Fonts?
I agree on that, I just don't see fonts as critical for your site, provided that you have a fallback. But I see how hosting the fonts is pretty easy to do and you avoid one point of failure for the user experience.
pmoleri··on Should you self-host Google Fonts?
Isn't that like not trusting AWS and have your own reliable data center for website hosting?

Edit: Removed cache statement.

pmoleri··on Monoliths Are the Future
That's what semver is for, right? Breaking changes go in a major, same major means that the latest is always compatible. You'll have the same issue with microservices if you introduce breaking changes.
pmoleri··on LInQer – C# Integrated Queries ported to Javascript
It looks pretty good. However, I find it similar to what you can do with wu.js or immutable.js@4, although of course LInQer would be more appealing to someone coming from C#. I wish you good luck with this project.
pmoleri··on Firefox 71
There used to be a similar project, PRISM: https://en.m.wikipedia.org/wiki/Mozilla_Prism

Products like Zimbra Desktop were based on it.

pmoleri··on The Firefox UI Is Now Built with Web Components
Bloated, yes. Slow, no. You start at a not so low binary size and memory footprint, but that's it. VS Code is an awesome IDE built on electron and it's really snappy.
pmoleri··on NASA engineer's 'helical engine' may violate the laws of physics
Interesting, maybe that's why they chose a ring, although the article is not clear in that aspect.
pmoleri··on NASA engineer's 'helical engine' may violate the laws of physics
The animations sure help, but I find the second one misleading because the ring bounces instantly and it has only 2 discrete sizes.

Instead of a discrete bounce, picture a slow motion elastic bounce where the ring gets heavier as it's being accelerated. It seems to me that when the box pushes the ring (left side), the ring would be gaining mass as it accelerates, thus cancelling the harvested movement, right?

pmoleri··on Costa Rica has run on 100% renewable energy for 300 days
> As Costa Rica is a small country, it's much easier for it achieve these lofty goals, than say, countries like China and the USA, which are larger in size.

Does this affirmation actually hold? Is it really easier just because it's smaller? In this particular case Costa Rica has a lot of natural resources that enable this. But in general I think that these changes depend more on willingness than country size.

pmoleri··on Software Projects and Heroes: Lessons Learned from GitHub Projects
Except that you're usually building knowledge specific to the organization in which you're working. IMO, you should avoid monopolizing vision and knowledge. I see this as different to the surgical team, where each patient is a different "project".
pmoleri··on The inception bar: a new phishing method
Scary exploit! Would it also work using Element.scrollIntoView()? In such case it wouldn't even need user interaction.
pmoleri··on JSON as configuration files: please don’t (2016)
This is the first time I read about TOM. After checking out the syntax, I don't like the way you declare nested data, because if you need to move one block of data to a different parent you need to replace all the path of each table. If done wrong, this can lead to very difficult to find errors. OTOH, it can be easier to send partial information, just append this block to your config and you are done.
pmoleri··on Ask HN: Is all programming constantly changing or just front-end JavaScript?
Does Vue + TS remove the need for Webpack? Which one creates the JS and CSS bundles?
← PreviousPage 3 of 4Next →