623: It’s About Human Connection
https://atp.fm/623
Nerdy home-buying considerations, Hyperspace updates, the surprisingly difficult engineering challenge of scrolling, and how we're going to get through all of this.
🏳️🌈❤️🏳️⚧️
623: It’s About Human Connection
https://atp.fm/623
Nerdy home-buying considerations, Hyperspace updates, the surprisingly difficult engineering challenge of scrolling, and how we're going to get through all of this.
🏳️🌈❤️🏳️⚧️
@atpfm I just started listening and Marco’s thoughts on our current political situation in the US were cogent, resonant, and galvanizing. Thank you.
Just one minor suggestion for a tweak to the shorthand: SLAP might work better. Support, Love, Accept, Protect.
@atpfm I somehow hit the jackpot on our house; the garage had full patch panels for cat5, phone, and coax. Every single room has at least 2x cat5, 1x rj11, 1x coax run. It's been absolutely marvelous to just plug and play all my networking stuff in the garage and get PoE all the places. It was done in 2002 so it's just starting to show its age -- it can only push 2.5Gbps, but that's fine because while all of my garage wiring is 10gig, the only device in the house that can use more than 2.5 is my Mac Studio.
I definitely echo your comments on power, though. Seemingly simple things ("upgrade the service") can be vexingly complex. Waiting ages for your utility to actually run the service you need. Dealing with the panel upgrade. In my case, our panel is on a wall that is now over a setback. So upgrading from 200A service to 400A service would have cost us $35k+ to basically move EVERYTHING.
Don't ask why 200A is constraining us. Small bay area house, no A/C today. But, I have a 60A circuit for the EV charger, and we're looking at going to an electric heat pump, adding a hot tub, and.. well, it adds up, huh? The smart panel is a GREAT way to avoid having to go 400A.
@siracusa is right, "just let me decide which things to run at once" but the electrical code doesn't agree. If the load calcs don't support what you're doing, you can't do it. It's an easy sacrifice to say "Yeah, drop the power to the hot tub if for some reason we're charging the car at 3am and also running an induction stove and the air fryer and the air conditioning”.
@atpfm
Edit: This isn't true!
There is an option to not ask for the apple id password for TestFlight IAPs when using the purchase function from StoreKit:
try await purchase(product, options: [.simulatesAskToBuyInSandbox(false)])
Or:
try await product.purchase( options: [.simulatesAskToBuyInSandbox(false)])
But it won't even throw up a modal asking the user to buy and instead just successfully completes and buys the product.
I think.
@atpfm @caseyliss re: Taking your smart switches with you—You should know that when you move out of an apartment in Germany, you take the stove, the kitchen cabinets and counters, the dishwasher, the kitchen sink…*everything* with you to your new house. And when you move in, you get two bundles of 3-phase wire for the stove and hot water heater, bare walls, naked in- and out- pipes, and that’s it.
@atpfm @caseyliss regarding the smart switches/smart appliances. You can make any light, light switch, or switch based appliance smart using Shelly relay switches (eg: https://www.shelly.com/products/shelly-1-mini-gen3) [they also do power monitoring versions which would help with open/closed detection].
They integrate with Home Assistant natively and they can then be passed to HomeKit via Home Assistant.
(Also they support MQTT, scripting and webhooks)
@atpfm @siracusa I had an issue with list performance with my bookmarks app iirc around 5000 core data items. Logic like if statements in lists. I was able to fix it by architecting something that, imo is less than ideal but not awful but for the most obsessive people, 20k bookmarks should be fine.
This is iOS though, even on mac it’s designed for iPad. I don't know if designed for iPad lists are the same as native mac.
@atpfm To build a fast scrolling `list` in SwiftUI on macOS the best solution is to create a custom layout. Here if you are able to set a fixed height per row you can avoid calling the layout call for each row.
The cost to performance you have in SwiftUI with a VStack or list is due to it needing to check the sizing of each element.
@atpfm from the after show. @caseyliss don’t use led lights. Analog tubes sound better 😜
@atpfm @caseyliss Since you asked specifically about LED statuses and home assistant. This video might be of interest to you: https://www.youtube.com/watch?v=Oz87wOJSQm8
(Note: This is obviously complete overkill compared to the solution you actually want, but it has elements that you would want for your purposes, it's also only 11 minutes long, and he has a github repo with more explicit detail on programming and circuitry [though no code sadly]...and mentions MQTT!)
@atpfm whenever @siracusa starts a subject that might lead him to say “filesystem”, I can almost see @marcoarment reaching for the bell, standing by it, maybe getting bit frustrated that’s taking too long, and then finally… “ding”!
That whole situation needs to be filmed. I hope you guys reconsider having a video version of the podcast, maybe for members only. Doesn’t need to be particularly well-lit or shot.
@atpfm @caseyliss @siracusa never heard the UDP joke flipped like that: “MQTT does run on TCP…”
btw, WhatsApp and Instagram DMs used MQTT for a long time. Not sure how it works now.
@atpfm @marcoarment i suspect, like my 330e, your second screen will also display the current iOS audio source.
@atpfm Thinking about electric car naming - I was one of the many who was annoyed with Ford because of the Mustang Mach E. They should have called the Mach E the Maverick (ugly 4-dr coupe), the current Maverick should have been the Ranger (cool cheap little pickup), and who cares what they call the current Ranger. Maybe the F-100 (medium sized pickup smaller than the F-150) or something?
@atpfm @caseyliss This is the original YouTube video where an iPhone was upgraded from 128GB to 1TB: https://www.youtube.com/watch?v=HuIr67F36VM
@atpfm If smart home stuff comes with your home, ensure the previous owner removes it all from their accounts. It can be really hard to transfer ownership afterwards. And don't let them factory reset things like thermostats; that can require some painful set up if they're older devices.
You can test wifi range in a house. Bring a router along, put it where the modem would be, connect your phone to it, and walk around checking your bars. Not a perfect system, but a reasonable indicator.
@atpfm Regarding @caseyliss desire for three lights https://media3.giphy.com/media/69rOXF4YTDVDD6cwkt/giphy.gif, in support of the Nanoleaf idea: if you can get the “garage is open” signal into the HomeKit world, you can do anything. You could buy a 2x4, some raw threaded lightbulb sockets, wire, and a plug from Home Depot, and 3 smart bulbs, spend 5 minutes with a screw gun mounting them in a row, and more time setting up your automations, and then you can put your now-ugly three lights anywhere you want! #It’sUglyButItWorks
@atpfm dumb question that I have put off for ages but what do the sound effects in episodes mean?
@atpfm @caseyliss Get a Shelly Wall Display unit for your "3 LED Problem". Point it at a custom dashboard on your home assistant instance.
https://www.shelly.com/products/shelly-wall-display-white
P.S. For simple home hardware hacking, the hammer of choice is ESPHome devices. Similar hardware to Arduino but different firmware. Config is done via a YAML file and it works like magic with home assistant.
@atpfm @siracusa I've just been listening to your Hyperspace table view discussion whilst putting together a basic AppKit example. I've started with 100,000 items in my table and it's smooth as silk when scrolling. I haven't done macOS development in some years now so I'm pretty rusty, was surprised I couldn't repro your issue. Any chance you kept the sample app demonstrating the problem?
I'm gonna try SwiftUI next, I imagine the issue will be easy to encounter there!
@atpfm @caseyliss The last ep missed a couple of other options that are better than the terrible upload speeds @siracusa mentioned. In dense areas, there are often microwave ISPs. That's what I have, and I get 800-850mbps symmetric. I've used those T-Mobile 5G home internet things too. Not terrible, but the ping time is a little slow. This is the ISP I use:
@atpfm @marcoarment @caseyliss @siracusa if ethernet can’t be run through the house another option is MoCA adapters that run the signal through coax cables. I live in a house that was built in 1862 and tried powerline but too many different wiring scenarios to make it work. Learned about MoCA and all of my eeros are hardwired with it and I get full speed. https://amzn.to/3WAE1ml
@atpfm in regards to displaying a list of many, many items there's a good section in this writeup from the creator of everyuuid.com on how they got around the problem. Not necessarily the solution for Hyperspace, but interesting either way. https://eieio.games/blog/writing-down-every-uuid/
@atpfm @caseyliss You should use a traffic light like Mr. Roger’s house! 🚦
@atpfm @marcoarment @caseyliss @siracusa When I moved into my house 15 years, I found these funky looking switches. It wasn’t until I removed them that I learned they were part of an ancient Radio Shack system for remote light switches that communicated over the power lines.
@atpfm re: @caseyliss taking light switches with him when moving, I did that in my last house, those things were expensive $$$ so I totally see his point
@atpfm I just want home automation like in Wallace and Gromit. Just a bunch of robotic gloved hands pressing things, passing things, shooting things, etc.
@Drarok Try a web browser with the same content to see how much smoother it can be. (Grab the scroll thumb and yank it around. Don’t just swipe.)
@Drarok @atpfm @siracusa I’ve not seen scrolling issues with NSTableView. My app currently has two big NSTableViews with 6.5 and 7.9 millions rows (view-based, auto-layout within each “cell”) that are loaded on-demand from a SQLite database. They’re very smooth yanking the thumb around (on an M1 Pro). It is slightly slower than when I was using NSCell, but it sounds like you have something else going on. I’d be interested to see an Activity Monitor sample from scrolling your app…
@mjtsai @Drarok Doing the NSCell version helped me find a case in my NSView-based version where an init() chain (through several subclasses) was failing to set the identifier on view, causing new ones to be created too often. Fixing that made the NSView-based version just about as fast as the NSCell-based one, so I went back to that. (The NSView-based one was nicer in a few other ways as well.)
@Drarok Yeah, like I said on the show, web browsers give up after a certain point. But up to that point, they're smoother.
@siracusa I get what you're saying, but I couldn't disagree more. Even when comparing Chrome with 1000 items to native with 100,000 the performance of the latter is flawless for me.
@siracusa @Drarok Not sure where the bottleneck is is in the web view, but you may consider content-visibility and contain-intrinsic-size to help with performance https://css-tricks.com/almanac/properties/c/content-visibility/
@Drarok Funny, I'm in the process of switching to old-style NSCell because it does actually seem to make a difference in performance for my data/UI.
@siracusa weird! Do you have loads of columns? Without seeing any slowdown it's hard to guess where the issue might be. Might be worth identifying the root cause rather than going for refactor number... 6?
@Drarok Too late! I dunno why NSCell-based is faster, but it is (slightly). I tried to use Instruments but I don't know how to use it well enough to tell where the time was being spent.
@Drarok Are you using NSTableCellView or are you returning NSTextViews from tableView(_:viewFor:row:)? Or something else?
@siracusa returning NSTableViewCell instances in tableView(_:viewFor:row:) which are created by tableView.makeView(withIdentifier:owner:)
I think you might be holding something wrong!