this post was submitted on 15 Aug 2025
26 points (96.4% liked)

Programming

22186 readers
277 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

Mono appears to be dead. I enjoy making life hard so I dont use windows. I am trying to learn very simple c# but am having trouble gettung visual studio to run anything on linux (debian/mint). It wont even run with dotnet in the terminal either. I dont really like all the features in vs either, i just want simple.

For reference im learning with the yellow book by rob miles. I want to learn the old way, not using a bunch of shiny helping tools (i never feel i really learn with those and it stunts my growth).

you are viewing a single comment's thread
view the rest of the comments
[–] atzanteol@sh.itjust.works 2 points 21 hours ago

FWIW Here's similar go code (converted by a llm).

func TestReplyAlreadyBookmarked(t *testing.T) {
    var reply PostReply
    err := db.Raw(`
        SELECT pr.* FROM post_replies pr 
        WHERE pr.id IN (
            SELECT post_reply_id FROM post_reply_bookmark WHERE user_id = ?
        ) AND pr.deleted = false 
        LIMIT 1
    `, userID).First(&reply).Error
    
    if err == nil {
        err := putReplySave(auth, map[string]interface{}{
            "comment_id": reply.ID,
            "save":       true,
        })
        
        assert.Error(t, err)
        assert.Equal(t, "This comment has already been bookmarked.", err.Error())
    }
}

You can create in-line data structures AND be a properly typed language.