med-mastodon.com is one of the many independent Mastodon servers you can use to participate in the fediverse.
Medical community on Mastodon

Administered by:

Server stats:

345
active users

#devtools

5 posts5 participants0 posts today
Continued thread

By way of follow-on, Cursor wrote me a function that uses type checks to decide which conditional branch to call.

Junior Dev Cursor, let me tell you about polymorphism, my friend.

This is the kind of thing that may get covered in a Object Oriented Programming 201 kind of course: If you're branching on type, this is screaming out for an interface/protocol/class family.

OO 310 will teach you: don't create too many families or families that are too deep or ouch time. Sometimes, composition works better than inheritance. Choose wisely. This decision requires judgement (hence experience).

#swift#swiftui#ai

If you're a professional dev, bear with me. There's a good chance that you'll see this post as god damn heresy.

If you've been a dev for any significant amount of time, you understand that change is the nature of our field. Alan Kay famously remarked that the technologies and practices grow faster than education: that, inevitably, our field has become a pop culture. I buy that.

For that matter, the pop culture, later in my career, and the peer pressure and hamster wheel of learning the "new hotness" every god damn time pushed me to the point where switching into management seemed the only reasonable recourse (though not the only reason I did).

But I digress. My point is this: AI dev tools are, now, fucking impressive.

For context: I've been a software engineer for just shy of 30 years now (yes, ok, I'm including my 5 year stint as a manager in there as well). I'm not going to claim that I'm an "S" tier developer—though I've had the fortune to get to know several and work with a small handful over the years. These people helped me to get to what is maybe an "A" class.

I say this to attempt to establish my bonafides before I go further.

I've been test driving Cursor, a VS Code-based editor + SaaS that taps into several different LLMs across many different vendors.

As of about a month ago, I'd never touched Swift in my life.

Over the past several weeks, working only with ChatGPT XCode integration, one file at a time, I slowly built out a prototype of an iOS app that works. It wasn't built according to Apple HID guidelines and tips. And ChatGPT XCode integration is only able to see and edit a single file at a time (a massive limitation). I have a deep background in imperative languages both strongly (C, Java back when it was so painful to work in—'96 through '04) and loosely typed (so very very much Ruby).

And then, late last week, I started trying Cusor.

Today, I had Cursor modify the UI to adhere to Apple's design tips (developer.apple.com/design/tip).

Holy. Fucking. Shit.

My app went from looking serviceable to something resembling a real™️ iOS app in the period of a few minutes.

Sometimes, AI's code factoring leaves something to be desired, certainly. It'll do some squirrelly shit.

That's fine. I treat it like it's a junior developer. I ask it to do the tasks that I would either bore me to tears or would cause this ADHD brain to introduce all sorts of stupid bugs by way of typos and the low dopamine of necessary tedium.

**And then code review the F out of its work**

I ask for specific refactors. And the refactors look pretty damn good.

Even still being a Swift nooblet (I'll freely admit it), I know plenty about programming languages in general (and am learning Swift by example here quickly enough) that I can see opportunities to DRY, to reduce ceremony, and to express intent more clearly.

For instance, today, I saw 3 structs that were being used similarly and with essentially duplicative code. Blech. In Java, I would've used a shared Interface and passed the objects around that way. I forgot my Objective-C, learned over a decade ago, from writing a Pivotal Tracker iPad app. What I needed was a Protocol. I told Cursor what I wanted, to treat the structs in a polymorphic-ish way, so that I could DRY the code, have my One Method to handle them (thankfully, no special casing to care about here so nice and cleanly too). It immediately said, "Oh, I need a Protocol", wrote one, wrote the method, modified the UI accordingly and wham, bam, thank you, ma'am, refactored UI code that deleted lines.

Yes, the AI did this. Yes, I guided it from a place of experience.

Bitch about how clueless LLMs are about our work. Sure, unlike Junior Devs, you can't teach an LLM more than its already capable of (and that is part of the fun of working with Juniors—watching those lightbulbs turn on and having them rock your world when they see something that you can't because of all of your earned biases). However, the LLMs out now? They make pretty darn good pair programmers, if you give them half a chance.

And Cursor is pretty f'ing impressive. And it is one of the earliest arrivals.

We live in interesting times...

DISCLAIMER: I have *NO TIES WHATSOEVER* to Cursor. I'm not even a paying customer yet (though that may change).

developer.apple.comUI Design Dos and Don’ts - Apple Developer
#swift#swiftui#ai

🚀 Gitea v1.24.0 is here!

This release is loaded with 🔒 security, ⚡ performance, and 🛠 quality-of-life improvements:

• Anonymous access now supports private/unlisted repos — browse issues, wikis, and code publicly
• New file tree in the repo file view for easier navigation
⚡ Performance boosts: database query caching, optimized PR/file list & heatmap loading

🔗 Dive into the full release notes: blog.gitea.com/release-of-1.24

blog.gitea.com · Gitea 1.24.0 is released | Gitea BlogWe are thrilled to announce the latest release of Gitea v1.24.0.
#Gitea#Git#DevOps

🚨 New: secrets-detector – scan your PHP project for leaked API keys, tokens, passwords in .env, config & code.
✅ CI-ready
✅ JSON/Markdown reports
✅ Symfony Console CLI
🛡️ Supports ignore/include rules
MIT licensed & open for feedback!

🔗 github.com/selfphp/secrets-det
📦 packagist.org/packages/selfphp
#PHP #Security #CI #DevTools

Contribute to selfphp/secrets-detector development by creating an account on GitHub.
GitHubGitHub - selfphp/secrets-detectorContribute to selfphp/secrets-detector development by creating an account on GitHub.

🚀 New Open Source Tool:
composer-license-audit

Scan your Composer dependencies for license compliance (MIT, GPL, AGPL...)
Supports blacklists, package exceptions, CI/CD pipelines, JSON/CSV exports, exit codes.

🔗 github.com/selfphp/composer-li
📦 packagist.org/packages/selfphp

Built with ❤️ for PHP devs. Feedback welcome!
#php #composer #oss #license #devtools

Contribute to selfphp/composer-license-audit development by creating an account on GitHub.
GitHubGitHub - selfphp/composer-license-auditContribute to selfphp/composer-license-audit development by creating an account on GitHub.

🚀 I built php-dependency-inspector, a CLI tool to analyze Composer packages: find unused, outdated or excessive dependencies. Great for CI/CD via exit codes & JSON/Markdown reports.
Perfect for legacy cleanup or dependency hygiene.
MIT-licensed & open to feedback 🙌
🔗 github.com/selfphp/php-depende
📦 packagist.org/packages/selfphp
#PHP #Composer #DevTools

Contribute to selfphp/php-dependency-inspector development by creating an account on GitHub.
GitHubGitHub - selfphp/php-dependency-inspectorContribute to selfphp/php-dependency-inspector development by creating an account on GitHub.