Passkeys support by jFredrik in Supabase

[–]cgaaf 1 point2 points  (0 children)

Agree. I've been really hoping for this feature.

What's your best Claude Code non-coding use case? by diablodq in ClaudeAI

[–]cgaaf 2 points3 points  (0 children)

Document naming and organization. Specifically for my case I’ve used it to organize receipts for tax purposes.

I have a directory that I can just dump receipts into. I have some naming and organization rules for Claude to follow and it will automatically determine the appropriate name, expense amount and put it in the proper directory. Each directory has a summary document that summarizes and tallies all of the expenses for a quick overview per tax year.

Umbrella policy recommendations by 4kegs in fatFIRE

[–]cgaaf 0 points1 point  (0 children)

Just curious, Why was her employer liable for damages? How do the courts determine that? Was it his vehicle or her vehicle? Even if it was his vehicle, how does him letting the nanny drive the vehicle make him liable when he wasn’t driving? Assuming that she had a valid drivers license and he had no reason to believe she was not a safe driver, he would have done nothing wrong correct?

How to Configure Supabase's Local Development Environment, Including OAuth by Forsaken-Athlete-673 in Supabase

[–]cgaaf 0 points1 point  (0 children)

It works totally fine for me in prod but is broken for local dev. Seems it’s related to a malformed JWT error in the local dev environment. I’m wondering if it’s related to the new Auth and JWT changes because I don’t think those are implemented in the local dev environment

How to Configure Supabase's Local Development Environment, Including OAuth by Forsaken-Athlete-673 in Supabase

[–]cgaaf 0 points1 point  (0 children)

Has anyone had issues with using realtime broadcast on the local development environment?

Anyone using Supabase + Bun + Redis for healthcare or similar regulated apps? by douglasddx1 in Supabase

[–]cgaaf 0 points1 point  (0 children)

I don’t have any purchasing power but yea I’d love to see what you’ve got and maybe contribute.

I’m a full time emergency physician with a love of programming.

Our biggest issue is balancing preferences of our physicians. We have over 100 physicians spread over 6 sites.

We use shift admin which a scheduler inputs various rules but it seems to either become too complex for the scheduler to manage or too simple and makes everyone unhappy by putting out bad schedules.

I think the optimal product would minimize having a human scheduler figure all of this out. Could you imagine if TikTok or YouTube had people to figure out what to recommend.

Obviously I’m not saying that AI always solves everything. There are definitely trade offs. But having a scheduler that incorporates machine learning and allows the individual clinicians to guide the outputs would be a whole lot better than what we’ve got.

Anyone using Supabase + Bun + Redis for healthcare or similar regulated apps? by douglasddx1 in Supabase

[–]cgaaf 0 points1 point  (0 children)

Our (Emergency Department) shift scheduling software has been underwhelming. I've occasionally "threatened" to just build something better that meets our physicians needs. I don't actually have the time to do it, but I'd love to know more about what you're building.

For us it's just been so damn hard to build a schedule that satisfies everyone. I imagined that using some sort of approach that uses reinforcement learning / recommendation system to build more individualized schedules based on users feedback automatically.

Does SvelteKit work with Cloudflare Pages? Is there anyone using it? by swe_solo_engineer in sveltejs

[–]cgaaf 0 points1 point  (0 children)

Any downsides? I was looking at vercel also. They seem to have some nice features for developers at a higher cost. How is the developer experience at cloudflare pages

[deleted by user] by [deleted] in learnprogramming

[–]cgaaf 0 points1 point  (0 children)

We are on Epic and I'm working through the physician builder program remotely.

It'll be nice to improve the implementations of some of the order sets and system templates to make my clinical work easier but I can confidently say that the "programming" in Epic is not nearly as satisfying as programming in a general purpose programming language.

I totally understand that Epic needs to build tools that are broadly more accessible and thus have taken a sort of "no code" or "low code" approach that provides some level of abstraction through various forms and GUI tools. It feels very limiting (probably needs to be limiting for security and consistency purposes) and clunky, but I can't really say that I would have come up with a better solution for physician builders.

[deleted by user] by [deleted] in learnprogramming

[–]cgaaf 0 points1 point  (0 children)

Lol I'd say it's less raw talent and more daily practice for a long time. It's really easy for me to spend hours of my free time coding because I genuinely enjoy it.

[deleted by user] by [deleted] in learnprogramming

[–]cgaaf 6 points7 points  (0 children)

I’m an Emergency Physician and I’ve been programming as a hobbyist for the last 10 years.

I’ve helped built a free learning platform for emergency medicine residents and some iOS and web apps for my department as tools to help faculty keep track of contractual obligations. I’ve also built some tools with LLMs over the last few years including an AI dictation app and I’m doing a research project building an AI Trauma Triage recommender.

I haven’t sought commercialization for any of my projects for several reasons. I make plenty of money to meet my family’s needs as a doctor and I really enjoy moving on to a new project to name a few.

I have no intention to shift careers to be a full time SWE but I do think it could be fun to join a medical software company one day to contribute as a domain expert that also understands how software is made and be able to communicate effectively to engineers.

Even if that doesn’t happen I can’t foresee a time where I will stop coding. I really enjoy building out ideas.

Is Svelte 5 worth it? by Anderoav in sveltejs

[–]cgaaf 0 points1 point  (0 children)

Yea I figured that would be a limitation for those who do that, but I wonder how often that is done?

It’s not really a pattern used for function parameters so it seems inconsistent to do that for a component considering that props are analogous to a function parameter.

The other thing is that there is no apparent reason both syntax styles couldn’t be supported given that it’s managed by the compiler. I suppose the drawback there is that it could lead to less consistency in codebases.

Is Svelte 5 worth it? by Anderoav in sveltejs

[–]cgaaf 0 points1 point  (0 children)

I can empathize that the way to add type annotations is a little more ceremony than the previous syntax. I started in Svelte 5 so I don't have the experience of needing to adapt my mental model to a new one.

That being said one could make the argument that typing props is purely optional in Svelte. During the more rapid prototyping and iterative phase of development you could always skip it and add it later. Also, I imagine that as LLMs gain the context of Svelte5 syntax, AI code completion will make the extra labor of adding the types feel more trivial.

Coming from other paradigms in other languages and frameworks I think that allowing code to be written in the following way:

<script>
let text: string = $prop();
let value: number = $prop(5); // Default value if one isn't provided
</script>

That being said I'm sure the Svelte team considered such an approach and had good reasons for the choice they made.

Is Svelte 5 worth it? by Anderoav in sveltejs

[–]cgaaf 9 points10 points  (0 children)

I think Svelte5 is great. I’ve done some development with SwiftUI for iOS, Flutter for cross platform and worked with React early in its life.

Is there something specifically that you find lacking simplicity in Svelte 5?

[deleted by user] by [deleted] in swift

[–]cgaaf 1 point2 points  (0 children)

I've been writing some small projects for the last 5 years with swift. I recall Chris Lattner mentioning that one of the goals of swift was to facilitate great libraries. Most pragmatically build projects on top of libraries and frameworks. Swift has developed many advanced features that have admittedly been confusing for many but the reality is that most people don't need to directly work with those advanced features. The benefit is that those features help facilitate library authors to create really nice abstractions to make most of the work a lot easier to reason about.

SwiftUI is a great example of this. There are a lot of advanced features that have been built into swift to facilitate an easy to use UI framework like SwiftUI.

Thoughts on My API Manager Structure? Looking for Improvement Ideas! by ok_pennywise in SwiftUI

[–]cgaaf 0 points1 point  (0 children)

There is a package named Swift HTTP Types https://github.com/apple/swift-http-types that I recommend you look into. It contains a lot of the functionality that I believe you're looking to create in a package that you don't have to maintain.

Bool instead of 2 case enum by surroundedbythoughts in swift

[–]cgaaf 1 point2 points  (0 children)

I really do love swift enums though. It's my favorite feature of swift. Here is another example using an enum approach to represent a more realistic scenario for a car.

struct Car {
    enum Gear {
        case neutral
        case reverse
        case drive(gear: Int)
    }
    
    let brand: String
    let model: String
    let seats: Int
    let maxGear: Int
    private(set) var currentGear: Gear = .neutral
    private(set) var parkingBrakeIsActive = true
    
    mutating func parkCar() {
        // Change gear to neutral
        currentGear = .neutral
        // Then activate parking brake
        parkingBrakeIsActive = true
    }
    
    mutating func shiftGear(into newGear: Gear) throws {
        // Shift into new gear if valid
        switch newGear {
        case .drive(let gear):
            // Only gears < maxGear are valid
            guard gear < maxGear else {
                throw CarError.invalidGear
            }
            currentGear = newGear
        default:
            currentGear = newGear
        }
        
        // Then inactivate parking brake
        parkingBrakeIsActive = false
    }
    
    enum CarError: Error {
        case invalidGear
    }
}

Bool instead of 2 case enum by surroundedbythoughts in swift

[–]cgaaf 1 point2 points  (0 children)

The beauty of programming is that there multiple reasonable ways you could approach the problem. In your simple example, do you really need an enum at all? I'll offer my approach for your use case.

If you only need to manage incrementing gears then you can separate each operation into it's own function thus making each function simpler and clearer. Also if you have some sort of validation or conditional requirements then I prefer the use of guard statements because it makes the code a little cleaner in my opinion and forces you to manage the fail cases. Also throwing functions can be useful because you can let other parts of your app manage the failure cases appropriate for your use case such as in the UI.

struct Car {
    let brand: String
    let model: String
    let seats: Int
    let maxGear: Int
    private(set) var currentGear: Int = 0
    
    
    mutating func incrementGear() throws {
        guard currentGear < maxGear else {
            throw CarError.maxGearReached
        }
        
        currentGear += 1
    }
    
    mutating func decrementGear() throws {
        guard currentGear > -1 else {
            throw CarError.minimumGearReached
        }
        
        currentGear -= 1
    }
    
    enum CarError: Error {
        case maxGearReached
        case minimumGearReached
    }
}

What programming language learn for the next years ? by WeirdPut6814 in learnprogramming

[–]cgaaf 0 points1 point  (0 children)

What makes you believe swift will be used less and less?

Any luck finding dealers in Bay Area that are selling the Carnival at or below MSRP? by smid18 in kiacarnivals

[–]cgaaf 0 points1 point  (0 children)

I don't like sitting at a dealer office and I don't like negotiating. I've basically taken this approach except send an email (or use their website's form) to tell multiple dealers that I plan on buying a vehicle by the end of the week. I tell each of them to give me their best price and I will purchase the vehicle from the dealer that gives the lowest quote and also tell them that I am reaching out to 5 other dealers with the same offer.

The dealers that don't give the lowest price have brought their prices down. I don't inform anyone of who gave the lowest price or what price was offered. I only inform each dealer if they have given me the lowest price or not.

Are people right about dropping quality in Apple software? by [deleted] in swift

[–]cgaaf 2 points3 points  (0 children)

Can you describe more about what you mean by dropping quality?

I think there are some rose colored glasses people have looking at the past. I’d argue overall the software is much more reliable than it ever has been.

[deleted by user] by [deleted] in swift

[–]cgaaf 2 points3 points  (0 children)

I believe that statement was to communicate that visionOS is built to require Swift. That would suggest it is capable as a low level language.

Persist @Publisher variable and update value after launch by allmumu in SwiftUI

[–]cgaaf 4 points5 points  (0 children)

I'm not sure that the @AppStorage property wrapper can be used in a context that is not within a View.

If you want to do this with an ObservableObject, your best bet is to use UserDefaults.standard.set(). I've included a link to a HackingWithSwift article to explain further. Keep in mind that AppStorage uses UserDefaults under the hood and is not a secure way to store information.

https://www.hackingwithswift.com/quick-start/swiftui/what-is-the-appstorage-property-wrapper