While writing unit tests for complex existing code, must…resist…refactoring at the same time… Tests first. Then refactor.
Must…resist.
=> More informations about this toot | View the thread
Assembly is slightly tricky because it's a bit hard to mix honey, ice, and seltzer. But here's how I do it.
2/2
=> More informations about this toot | View the thread
New drink I'm working on. I've been exploring apple cider vinegar, which I find helps reduce heartburn for me (I don't get how vinegar could help heartburn, but it does seem to).
It took me a while to find the right bitters. But lavender bitters go very well with honey.
1/2
=> More informations about this toot | View the thread
Getting ready for a bit of a snowstorm. They say it's likely to be the biggest since we moved here. So, I think I should definitely settle in and assemble this Raspberry Pi I just picked up to do some Home Assistant dev work. That is a totally normal cozy snowstorm evening.
=> More informations about this toot | View the thread
I really shouldn’t do work work on the weekends, but deleting useless mocking code is just so satisfying that I’d probably do it all weekend for free if I could get my PRs reviewed. Deleted 500 lines of mocking code today. Replaced it with a few lines of “oh, testing? Write to /dev/null; reset at the end of the test.” Same test value.
Please stop “mocking” things.
Eventually I’ll write the blog series and give the talks explaining it all, but it really feels good just to do it now.
=> More informations about this toot | View the thread
So far, I have never complied. I have a existing linked accounts that I can use to get money out of Wise. And I'm filling out the paper forms for Fidelity. But it's getting harder and harder. It used to be you had to hunt for the "manually link accounts" button, but they're steadily taking that away. (Fidelity let me try to manually link the account, and at very end said "hah! you actually have to give us your password.")
=> More informations about this toot | View the thread
It really makes me mad when a financial company says that, "for security," they require you to hand over your banking credentials into some thirdparty site who promises that they will in fact scrape all of your data using that password.
That is not "security."
Wise (formerly Transferwise) will absolutely not allow me to link a bank account without handing over its password and every piece of data that password can fetch.
Fidelity will, but requires elaborate hoop-jumping and a paper form.
=> More informations about this toot | View the thread
I've generally been in favor of the "put protocol conformance in extensions" approach that @dimsumthinking advocates.
But chasing down "Main actor-isolated property '...' cannot be used to satisfy nonisolated protocol requirement" warnings, when you can't figure out what protocol is being referenced and it isn't done in this file? yeah… got me questioning myself on that.
=> More informations about this toot | View the thread
@mattiem I know you like a good concurrency puzzle; maybe this one will amuse you, bridging Combine with cancellation.
(@johnsundell, you may also be interested since you wrote on this without cancellation.)
=> More informations about this toot | View the thread
@robertryan I've been exploring your AsyncAwaitFuture for some production code. I've been puzzling over whether this can be made into an init on Future, so that the "awaitness" isn't in the type. I need it for a protocol conformance, but in general it feels this shouldn't be in the type.
It's not coming to me, though.
https://stackoverflow.com/a/78899940/97337
=> More informations about this toot | View the thread
When developing cli tools with ArgumentParser, I generally create a two scripts in the source directory like this (for a tool called "fin"):
$ cat fin
swift run -c release fin $*
$ cat install
swift build -c release && rm -f ~/bin/fin && cp .build/release/fin ~/bin
fin --generate-completion-script zsh > ~/.oh-my-zsh/completions/_fin
This way while developing, I can run ./fin to get the dev version, and I can get shell completion.
Is there a more built-in way to do that w/o custom scripts?
=> More informations about this toot | View the thread
While I think you're 100% justified to block anyone you like for whatever reason or no reason, I also like the idea there are people you might want to hear from if they would just think about their reply for more than 40 seconds. If after thinking about it for a day they have something they think is worth saying, that's great.
I write a lot of posts I let "marinate" for an hour or two, then delete without posting because they weren't worth it. More probably should.
https://fed.brid.gy/r/https://bsky.app/profile/did:plc:wcmdstkjsrghcsa6e76kocbs/post/3ldeqrtqfxk24
=> More informations about this toot | View the thread
Though I'm not sure if I can fall back to the REST API or not. I want historical data (dailyStatistics in the Swift API), and I'm not seeing that available on the REST side. It looks like you might be able to take specific snapshots by passing currentAsOf, but I don't see anywhere they publish high/low temperatures for a given day.
(I'm computing degree-days for an energy-tracking tool I'm working on.)
=> More informations about this toot | View the thread
Has anyone used WeatherKit from a commandline tool? I've set up the capability on my bundle identifier at developer.apple.com, but in Xcode the capability doesn't appear in the "+ Capability" list. I could fall back to the REST API, but that adds a lot of complexity that the Swift framework does for you.
=> More informations about this toot | View the thread
There are some Swift features that are just a delight, and some
in parameter types is one of them.
I was just working on a bunch of code where everything expects arrays. Totally reasonable. But I wanted to introduce chunks(ofCount:)
to replace our home-grown chunks(of:)
, and that makes things lazy and changes the types.
A few mechanical conversions of [?]
to some Sequence<?>
, and boom, more flexible without adding a ton of syntax noise.
=> More informations about this toot | View the thread
The last point here, about people feeling that email is a bad way to communicate, really hits home for me. At Cisco, everything was done in email, from "wanna go to lunch?" to complex policy document reviews, to automation.
I received hundreds of emails a day, and read them in mutt, a powerful text-only, keyboard-only mail reader, plus some procmail rules.
And it worked very well. And I miss the effectiveness of the communication tools we had until Outlook broke it.
https://mastodon.social/@tychotithonus@infosec.exchange/113449201231903120
=> More informations about this toot | View the thread
The bug was in Android code that worked fine on arm64 and x86, but crashed on x86_64. Heisenbug: adding logs would change its behavior. All the relevant bits were deep in C++ code, 3 layers of modules from the Java, so a debugger is basically impossible. Just logs.
Different modules have to be built on different machines with different build systems and assembled by hacking .so files into the APK by hand. And the results had to be tested on a Windows box for x86_64.
2/
=> More informations about this toot | View the thread
Yesterday I finally solved the third hardest discrete bug I’ve worked on in my career. Took about 3.5 weeks of work. At the end, I spent 10 consecutive days doing nothing but investigating this bug, all day, every day. I then took a day off to pick up my folks in Pennsylvania because they wrecked their car (everyone is fine, just car damage). Came back, and yesterday I finally found it.
1/
=> More informations about this toot | View the thread
They changed the recommendation for Family Emojis, and that's now being deployed? I mean, I get it. Family emoji are a combinatorial nightmare that completely breaks how emoji work today.
But they were my favorite topic in my emoji talks.
And the new ones are just ugly.
But also, I totally get it. Implementing even the current family emoji is overwhelming. Making them what they should be is impossible without redesigning how emoji are implemented.
But a little sad.
https://www.unicode.org/L2/L2023/23029-family-emoji.pdf
=> More informations about this toot | View the thread
It feels like Task should be able to transition into a "gone but not forgotten" state after running all of its partial tasks and simply holding onto its return value. Is there some reason it doesn't?
// @mattiem
https://stackoverflow.com/q/79080218/97337
=> More informations about this toot | View the thread
=> This profile with reblog | Go to cocoaphony@mastodon.social account This content has been proxied by September (ba2dc).Proxy Information
text/gemini