HNHacker News
TopNewBestAskShowJobs

afry1

364 karma · joined January 28, 2021

submissionscomments
afry1··on Be careful of the examples you use. They stick
If I had a dime for every time I saw somebody copy and paste "#myExampleWidget" into production code ...
afry1··on The HTML review is an annual journal of literature made to exist on the web
Very cool!

This issue of the review includes a very cool submission from a few weeks ago which did pretty well on the front page: https://alex.miller.garden/grid-world/

afry1··on XML is the future
I don't know about incurious, maybe "extreme". A lot of the tools, techniques, etc. mentioned in the article aren't appropriate for ... well, most websites probably. But they do have their roles to play in large, complicated systems.
afry1··on The Nature of Code (2012)
One of my absolute favorite YT coding channels, I will second that recommendation!

https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw

afry1··on Vim-like “jump” cursor for Mac OS Window Management
For my emacs friends, here's a wonderful package that provides the same functionality: https://github.com/abo-abo/avy

And, if you're interested in some historical context for this "type characters and jump to point" functionality, the Canon Cat: https://youtu.be/o_TlE_U_X3c

afry1··on Brains speed up perception by guessing what's next (2019)
The 2:00 timestamp in this Veritassium video on expertise goes into exactly that phenomenon. We acquire expertise by recognizing the patterns in what we do. But once you take the patterns away, a lot of that "expertise" disappears too: https://youtu.be/5eW6Eagr9XA

Jazz piano vs classical is a perfect example of this: same instrument, two paradigms with totally different idioms.

afry1··on Janet for Mortals
It's the "sadness of mortal men" as Tolkien put it. So many awesome languages in this world, so little time to learn and use them.
afry1··on California will give $2000 if owners convert their ICE cars to EV
I wouldn't be so sure! There are companies which are developing ICE->EV conversion kits which put the price point in a pretty reasonable place.

This company has it down to 5000 Euros: https://youtu.be/98mlJ1N50DU

That 5000 figure is after EU subsidies, so who knows how such a system would shake out with CA subsidies, but even still: it's possible.

afry1··on Ask HN: We found a cracked version of our software on the web, now what?
I wish I could find this post again, but one company had a clever approach to the problem. If you can figure out which countries the cracked software is originating from, you can serve up a version of your page where you offer up a free, unlocked version of your app.

You're still losing out on sales, but cracked software often originates in those same low-income countries. They get to have their free copies, and it's a likely bet that your customers in wealthier parts of the world will just buy the license instead of attempting to crack it themselves.

afry1··on Emacs: Feature/tree-sitter merged into master
That point you make about syntax highlighting being slow while using eglot/LSP-mode is a great one. I've been a bit underwhelmed with eglot, and I think that must be the reason: it feels like I'm programming in a bowl of oatmeal with every keystroke.

Do you have any tips or guides for using treesitter for syntax highlighting/structural editing and eglot/LSP-mode for everything else?

afry1··on Idaho Stop
Indeed. It feels unsafe to follow the "rules of the road" on a bike because the rules were created for an entirely different kind of vehicle.

I think about this a lot when approaching a stoplight or stop sign.

For any road user, where is the most dangerous part of any road? You guessed it, the intersection.

When is an intersection safest? When it's empty.

So, for a cyclist, it makes the most sense to cross through the most dangerous part of the road when it is devoid of danger; i.e., when it's empty, or when other cars are stopped.

This of course gets a little dicey when you consider protected turns, leading pedestrian intervals, jaywalking, or anything else which would make that "empty" intersection a little less empty and therefore unpredictable and dangerous. But generally speaking, I feel way safer running a predictable red light than crossing it with moving traffic.

afry1··on India's lattice buildings cool without air con
Decarbonizing the grid will be much easier if we have less of a "grid" to decarbonize. The article mentions this aspect, if you had cared to read it. Modern buildings can use this lattice to reduce the load on their air conditioners.

Although I do agree with you in principle. One of the lasting impressions I got from the early Covid lockdowns was that even though we stopped a good chunk of the world from driving to work, flying, running factories, etc., we didn't come close to reducing our energy use enough to prevent more warming. Those lockdowns were a huge exercise in "energy austerity", and they weren't enough.

afry1··on Emacs Timeline
I have indeed! This is my first year of using Emacs. Previously I was using VS Code, and before that Atom, and before that Sublime.

Two things which have contributed to my success: - The System Crafters YT channel. David has an amazing tutorial series where you build a config file from scratch. I followed along, and it both gave me a very functional Emacs config and taught me enough about Emacs to get out of trouble when I goof up: https://www.youtube.com/c/SystemCrafters - Not being afraid to go back to other editors/IDEs for a while, or even rely on other editors for some tasks. Learning Emacs is tough enough as it is, but when you're a working programmer and you're on the clock for getting something done, it's extra tough to tolerate the slowdown from all those 1000 little things that you haven't gotten comfortable with, or features which were present in your previous editor but aren't yet present in your Emacs config. In past lives I would have just rage-quit and given up on Emacs, but I tried to be gentle with myself this time and take breaks from Emacs when I need to, and it has been a winning strategy.

Never going back.

afry1··on Runway melts at London Luton airport as temperatures in UK near 40°C
Source here: https://graphics.latimes.com/oil-operations/

The investigative research that brought this up was a big development in proving that they knew on an institutional level that the science was real.

afry1··on How we fixed the ozone layer (2021)
The mind boggling thing is that he was the right person at the right time. If some other Republican had been in office, they probably wouldn't have pushed as hard as he did to take action on the issue.

And where would we be today if history had gone just a little bit differently? Heatwaves, wildfires, hurricanes, deforestation, mass extinction, AND I can't go outside without dressing like a beekeeper? It gives me a cold feeling in my stomach.

afry1··on How we fixed the ozone layer (2021)
What a cynical and unhelpful view.

Yes, if a person manages to stop a cycle of recurrent bad behavior that is their fault, they should celebrate that.

They've recognized a problematic behavior for what it is, and curbed that behavior, even though their baser instincts are probably encouraging them to keep doing it. Even though continuing to do it is a lot easier in many cases than stopping it.

They've gained mastery over themselves, and that is something to celebrate. Hell, they've even managed to SEE the problematic behavior for what it is. They've managed to see it within themselves. That kind of introspective ability does not come for free, there are a lot of people in this world who never develop it at all.

I think that's something to pat yourself on the back for, no matter what it is.

afry1··on How we fixed the ozone layer (2021)
One fact from this saga to boggle the mind: a big reason that the international treaties on ozone-harmful chemicals succeeded was because Ronald Reagan, president at the time, had skin cancer removed from his nose right around the time that studies on ozone layer depletion were coming out.

The issue was low priority for him and his administration, but the fact that he had personally suffered from the effects of excessive UV made it personal for him, and so he eventually pushed for action.

afry1··on Time Traveler by Merriam-Webster: Search Words by First Known Use Date
Submit the evidence to them! I know some friends who work in dictionaries, and they are more than happy to do revisions on things like earliest printed usage of a word, and people frequently do write in providing exactly that kind of evidence.

https://www.merriam-webster.com/contact-us

Seeing as this one was so easily googlable, the following point will seem a bit silly, but the research performed by dictionary editors is only as good as the source material they can get their hands on. There may very well be earlier documented usages of many words that they define, but if they can't find those earlier usages ... well, the oldest usage at hand is the one that gets documented.

afry1··on Sliderland – Creative coding with 64 HTML sliders
So cool! What a fantastically well presented piece. The simple step-by-step explanations of how to interact with and control the various function inputs left me feeling like I actually knew how to do something with it, which is a far cry from most interactive software playgrounds.

Well done.

afry1··on New links found between musical training and cognitive ability
I'll play the role of the insufferable pedantic here and note that drums absolutely have an element of tone in addition to rythm and volume: the tuning of the drum heads, where you strike with your sticks (edge of the cymbal vs center of the cymbal), even mirroring what other instruments in the band are playing and accompanying those parts with your drums to augment the perceived tone of those other instruments for the audience. There's a lot you can do with tone!
afry1··on Chinese inmates had hearts or lungs removed during executions, study says
Eesh.
afry1··on Chinese inmates had hearts or lungs removed during executions, study says
I am astounded by the lack of empathy in what you've written.
afry1··on From context collapse to content collapse (2020)
That part about information being condensed down into a tiny form factor (a smartphone screen) hits hard as a frontend web developer:

> The diminutive size of the device’s screen further compacted all forms of information. The instant notifications and infinite scrolls that became the phone’s default design standards required that all information be rendered in a way that could be taken in at a glance, further blurring the old distinctions between types of content.

I've really struggled with this concept when building out apps and tools that have to fit in the form factor of a smartphone. Some things are just too complicated or too nuanced to express with little buttons on a little screen.

Sometimes it's an interesting constraint to work within, but more often than not I feel like I'm leaving so much on the table when it comes to functionality and usability.

afry1··on Ask HN: Codebases with great, easy to read code?
I find Ramda very easy to read! It's a functional Javascript library based on currying and composition. https://github.com/ramda/ramda/

I find a lot of code fairly alienating to read. Lots of codebases require you to get into the "mindset" of the person who wrote the code: their idioms, assumptions, patterns they lean on, etc. So unless you've got the time to get deep into it, the insights you can draw from reading it are minimal.

Ramda, by comparison, is just a library of utility functions, and all of those utilities perform very simple operations: merging, plucking, appending, equality checking, etc.

There's a lot of intention in the Ramda API as well. All functions are "data last," meaning that the actual piece of data you're operating on is the final argument to every function. This enables you to write Ramda code that is very structurally consistent: function parameters first, data last, every time.

It gives me a sense of empowerment, reading the code. It's like "This doesn't have to be rocket science. If you just start from these basic operations, and write those basic operations with a simple but strict ideology of 'data last' every time, and stick them together like lego blocks using compose, then you can achieve some very cool stuff with very little code."

afry1··on Ace, CodeMirror, and Monaco: A comparison of browser code editors (2021)
In theory, I agree with you, but on the whole, this is a rather elitist viewpoint.

The vast majority of the world uses a mobile phone to connect to the internet. While I do agree that web-based editors aren't as good as desktop-based editors, and that there's potential for abuse in the transactional nature of web-based editors, a web-based editor is the best that billions of people can manage.

It's not perfect, but I'd take a world with online code editors over a world where coding is only possible in a desktop environment. A world with more programmers and more people who are knowledgeable about how their digital lives really work is better than a world with fewer in the know, or fewer who are empowered to know due to technological limitations.

afry1··on NYC cuts deal to reset thousands of yellow taxi medallion loans to $200k
It would also reintroduce the problem that medallions were invented to solve: traffic congestion. By restricting the number of taxi drivers on the road via the medallion system, it keeps traffic down and the streets driveable.

... granted, the presence of so many unregulated rideshare cars on the streets renders this moot. We're right back where we started before the medallion system when it comes to congestion.

Spectacular Failures had a good episode about the medallion system! https://www.spectacularfailures.org/episode/2020/09/28/nyc-t...

afry1··on An update of 455 new words
Indeed there is! https://developer.oxforddictionaries.com/
afry1··on Are software engineering “best practices” just developer preferences?
Give it a couple years, it'll come back around!
afry1··on Are software engineering “best practices” just developer preferences?
I hope at least that we're in a phase of the profession where we're "discovering" the actual best practices.

There have been a lot of best practices that have been hypothesized over time: OOP, functional programming, unit testing, generative testing, formal analysis, strict typing, weak typing, etc.

And all these as-of-yet unfounded hypotheses are important! You've got to have a theory of how something works before you can prove that it does. Hopefully we can start to devise those proofs.

afry1··on How I, as someone who is visually impaired, use my iPhone (2020)
I know, I want to learn how to use it now!
← PreviousPage 2 of 3Next →