HNHacker News
TopNewBestAskShowJobs

brainbag

333 karma · joined February 16, 2014

submissionscomments
brainbag··on Why the Sanitizer API is just `setHTML()`
With context, this article is more interesting than the title might imply.

> The Sanitizer API is a proposed new browser API to bring a safe and easy-to-use capability to sanitize HTML into the web platform [and] is currently being incubated in the Sanitizer API WICG, with the goal of bringing this to the WHATWG.

Which would replace the need for sanitizing user-entered content with libraries like DOMPurify by having it built into the browser's API.

The proposed specification has additional information: https://github.com/WICG/sanitizer-api/

brainbag··on Show HN: FlashSpace – fast, open-source, macOS Spaces replacement
I've been using Choosy.app for easily managing different browsers for work and personal (and testing), and it works great. You set it to your default browser, and then anytime something opens a browser it pops up a picker. Lots of global and per-site configuration options like browser profile selection, private windows, etc.
brainbag··on AI isn't going to kill the software industry
Would you say more about your experience writing it in Rust? It worked well, what didn't, anywhere you found that you struggled unexpectedly or that was easier than you expected?
brainbag··on Allstate used GasBuddy and other apps to track driving behavior: lawsuit
Even in the flood of terrible news about privacy and other things, this exposé stands out as especially disturbing. I was considering getting a new electric car to replace my combustion, but now I'm going to stretch it for as long as I can instead.
brainbag··on Mastering Ruby debugging: From puts to professional tools
pry is what I miss most when using other languages. I've used all kinds of debuggers all kinds of hardware with many different languages, and pry is by far the best tool for development and debugging. People talk about the REPL in Lisp for good reason, but pry takes that concept to infinity and beyond. When I think about the future of AI assisted programming, it's something much more like the pry interactive development loop than a code editor's suggestions.
brainbag··on Can you get root with only a cigarette lighter?
Reminds me of the story of the kids in Ethiopian village that were given tablets by One Laptop Per Child. The kids had figured out how to turn it on within minutes, in five days they were using 47 apps per child, in two weeks they were singing the English alphabet, and then within five months they had hacked Android. https://www.theregister.com/2012/11/01/kids_learn_hacking_an...
brainbag··on Are there individual protons and neutrons in a nucleus?
You do a great job explaining these concepts, better than most. I have appreciated all of your replies in this post. Do you have a blog or podcast or teach somewhere? I would tune in.
brainbag··on Five Most Productive Years: What Happened and What's Next
I like this take. I'd be interested to hear more what you gained from studying them. What ways do you model your companies after Valve and Wolfram?
brainbag··on Affinity six-month free trial
Has anyone found or made a great set of tutorials for "Affinity for Photoshop Experts"? I've been using Photoshop for more than 30 years (now Photopea), and I don't think I've ever felt more like an alien than the two times I've tried in earnest to learn Affinity tools. A six month trial could be generous enough for me assimilate.
brainbag··on Mozilla Builders Accelerator 2024
Thanks for this link. Firefox has been getting worse for me stability-wise on my Mac M1, even with tab discarding it consumes huge amounts of power, and at least two or three times a day it will just stop loading webpages and show errors in the network tab and need to be restarted. I spend a couple of hours every few weeks trying to track down the issues and Firefox and even in the bug tracker can't find answers.

I also have a bizarre problem where any Chromium-based browser (Chrome, Brave, Edge) are extremely slow to load any page since upgrading to Sonoma, where Firefox or Safari are near-instant - like taking 60 seconds to even start DNS lookup. After a couple of minutes it will eventually fully load a page. I've seen other people mention the same issue online, but no fixes. I have spent hours trying to debug and track down problems for that too.

It's discouraging how much it feels like every software tool I use on every device has gone to shit, especially things as fundamental as a web browser.

brainbag··on The Guide to Git I Never Had
I've also taught git to dozens of beginners in a classroom setting, and I have to agree that the OP and GP articles aren't great for beginners, even if they have a technical background. The problem I have with git media is that everybody begins by teaching git's user interface, which is a usability disaster. On the other hand, the internals of git are elegant and simple, and if you start by teaching from the inside out, it makes it far easier to understand why and when we use certain commands.

The video you mentioned, "Git For Ages 4 And Up" https://www.youtube.com/watch?v=3m7BgIvC-uQ, is the best resource for explaining how it works internally, once they have a rudimentary understanding of what git is and why we use it. Watching this video makes future explanations way more digestible. I still sometimes conceptualize difficult git operations in tinker toys.

I highly recommend it even to experienced people.

brainbag··on From Pomona to Oakland, a skater mapped California block by block from his board
That's what I was expecting too. I was excited to see some kind of topographic map, or an open web map with pins for particularly good skating areas, etc. Could be a cool project.
brainbag··on Ask HN: Daily practices for building AI/ML skills?
Do you have any recommended resources on those topics? I'm coming from a strong ~30 year software engineering background which has been excellent, until now, as ML requires a completely different background. I'm trying to decide if I should start a new game+ with academic background, or get some expansion packs with what I already know and move into ML that way. I've found plenty of resources for the former and practically nothing for the latter.
brainbag··on AI’s big rift is like a religious schism
I remember a sci-fi book where they were talking about one of the characters hacking on thousand-year-old code, but I could never remember what book it was from. Maybe this was it and it's time for a reread.
brainbag··on Ask HN: Best UI design courses for hackers?
I am a longtime developer but I'm passionate about design and UX. I'm always on the lookout for materials that I can give my team and other developers to help them get better at design. It's not a course, but "The Non-Designer's Design Book" (ISBN 978-0133966152, Robin Williams) is the best material for design fundamentals I've found. It's very approachable for anyone and it's broadly applicable across all kinds of design. Everyone I have convinced to read it has loved it, and I've seen an improvement in output and understanding. I highly recommend this if you have an interest in design.

Refactoring UI is also valuable and can be impactful, though it's heavily web focused and is more like a Web Component Design Cookbook rather than foundational knowledge.

brainbag··on High blood pressure may contribute to cognitive decline
Do you have any more information about this? It would explain the challenge I've been experiencing as I enter my early 40s with a family history of hypertension; my blood pressure has been going up, which makes sense, but my ADHD has also been getting harder to manage, which doesn't.
brainbag··on Cicadas are so loud, fiber optic cables can ‘hear’ them
I enjoy the sound of crickets and cicadas (which are much louder) except for the one particular kind of cicadas we get occasionally in Texas that make a singular unwavering high pitched ambient buzzing sound, like the whine of an old tv cranked to 11, coming from everywhere. It's a horribly unpleasant sound, but thankfully they don't stick around long. The other cicada sounds are nice.
brainbag··on MonadGPT – What would have happened if ChatGPT was invented in the 17th century?
The book Accelerando by Charles Stross has some bits about this and many other oddly prescient recent technology.
brainbag··on Is my toddler a stochastic parrot?
I had heard about this before my son was born. We didn't try to teach him anything, anytime we remembered (which was sporadic) we just used the gestures when talking to him. I was amazed at how quickly he picked up on it, and he was able to communicate his needs to us months before he was able to verbalize.

It took very minimal effort on our part, and was very rewarding for him; certainly a lot better than him crying with the hope that we could guess what he wanted. Definitely recommended for any new parents.

The best moment was when he was sitting on the floor, and looked up at his mom and made the "together" sign, it was heart melting.

brainbag··on I accidentally a scheme
Until I read all the way down here to the bottom of the comment thread, I was thinking about the older people who didn't get this reference since I've been hearing it for decades. But now I see, thanks to your comment, that it is I that is the old one, and it's the youngsters that don't know it.
brainbag··on Google pays Apple 36% of the revenue it earns from searches in Safari
You can change the default of Safari, but not for Siri. "Search the Internet" voice command always uses Google. I'm personally hoping that either part of this lawsuit or part of their Siri upgrade allows us to change it.
brainbag··on Write your own terminal
Is your Ruby-based terminal source online? I'd love to see it.
brainbag··on Goodbye Spotify
Does it sync tracks that you Love in Apple Music? I have liked Apple Music a lot, except for one major thing when I realized that there is no way to view tracks that I have marked with Love, and I'm trying to find a way to get that information out.
brainbag··on Htmx, Rust and Shuttle: A New Rapid Prototyping Stack
vitest, like everything to do with vite, just works. The API is almost identical to Jest so you can swap over easily.
brainbag··on I accidentally saved my company half a million dollars
What is 18F? That's not the easiest thing to search if you're not looking for the obvious.
brainbag··on 8BitDo Micro
I've been searching for a great quality PS5 controller that has the left thumb stick in a neutral position and doesn't cost $250. On the rare days when get a chance to play a longer session, I can use the Xbox or Switch Pro controllers for hours without issues, but I hardly touch my PS5 because the left thumb stick requires such a stretch that my thumb tendon already starts to get sore after 15 minutes.

I understand the business logic, but I wish the console manufacturers would allow more portability between them.

brainbag··on Web components will outlive JavaScript frameworks
I like web components especially with the nice tooling that comes with lit, but agree that the lack of server-side rendering and hydration makes them impractical to use compared to other server side progressive enhancement libraries like Stimulus and Alpine. Server-side renderable web components would open up a lot of possibilities for better user experience for multi-page apps.
brainbag··on Web components will outlive JavaScript frameworks
Yeah, other than a project that was still on webpack, I can't think of any time in the last few years where this was a problem. Vite has made JavaScript apps nearly effortless for years now.
brainbag··on How to Fetch a Turbo Stream
I've done and loved at least 15 years of Rails, but not since the new Hotwire/Turbo/Stimulus releases. I've played with it a bit in side projects and it seems interesting, though I'm still skeptical that it's a good model for apps that plan to stick around for a while.

One of the things I've found difficult coming back to Rails is how spread out all of the behavior is in so many different files and partials and helpers. While SPAs have a lot of trade-off, organizing related code into components works so much better than any experience I had with server-side MVC, especially when using something like TypeScript and Remix's islands that very effectively isolate even further into logical modules. What little I've done with Hotwire/Turbo made it seem like very basic behavior is even more spread out and even harder to reason about for someone who didn't write it, which seems like it would make maintenance and refactoring in Rails even more time-consuming and perilous than it already is.

I'm really interested in the technology because I hear such glowing reviews of it, but I'm not sure I see it. I'd love to see a non-dogmatic comparison of SPAs vs Rails with Hotwire/Turbo MPA for post-MVP longer-term projects.

brainbag··on Ask HN: Git Training Course Recommendations?
I have taught a lot of people in classroom settings and as a leader of companies and teams. By far the best resource that I know of is the video "Git for Ages 4 and Up". https://m.youtube.com/watch?v=3m7BgIvC-uQ

The presenter uses children's construction toys to explain the surprisingly simple and intuitive git internals, and how each of the somewhat obtuse and unintuitive git command operate on their repository structure.

Once people understand the underlying concepts of git, even programming beginners, they can conceptualize what they want to accomplish in their repository, and then and then figure out which tool is the way to get there.

Page 1 of 6Next →