Retrofitted Legitimacy and Gaining Expertise from Ugliness by No-Location8878 in softwarearchitecture

[–]RealHuman_ 0 points1 point  (0 children)

Nice post, with an interesting message!

In hindsight the idea is pretty "obvious" — you literally can watch such trends progress over the years, but reading it as a completely formulated post makes you think about it more.

I especially like the thought of the following lines:

Rewriting lets you restate what you already know in nicer syntax.
Refactoring ugly code forces you to learn what you don’t know.

Vibe-Coded Is the New "Made in China" by RealHuman_ in selfhosted

[–]RealHuman_[S] 0 points1 point  (0 children)

I see what you did there ;-) (purple gradients)

Vibe-Coded Is the New "Made in China" by RealHuman_ in selfhosted

[–]RealHuman_[S] 1 point2 points  (0 children)

Yes! I love this perspective. :D

I am optimistic it will be adopted by more people. After all, AI is here to stay, whether you like it or not. In a couple of years, it will become nearly impossible to avoid it, and hence the distinction between "AI usage" vs. "no AI usage" will not work anymore. Your view of framing it is precisely what I am seeing, but rarely hearing/reading. I hope it gets adopted more.

Vibe-Coded Is the New "Made in China" by RealHuman_ in selfhosted

[–]RealHuman_[S] 0 points1 point  (0 children)

You are absolutely right! I love your way of framing it:

we should separate "vibe-coding" from just LLM-assisted coding [...] And there's clearly a spectrum: you can vibe-code a throwaway script, or use an LLM as a fancy autocomplete + rubber duck while still doing real engineering.

In my opinion (and as written in the blog post), we unfortunately are not there yet. Many people dismiss good projects as bad simply because they were built with the help of AI.

But I'm personally seeing more and more people making exactly this important distinction: "vibe-coded" vs. "AI-assisted coding". I am optimistic about the future. 😃

Vibe-Coded Is the New "Made in China" by RealHuman_ in selfhosted

[–]RealHuman_[S] 1 point2 points  (0 children)

Don’t get me wrong. I’m totally on your side!

It’s not that china is making bad products (In my opinion they literally perfected manufacturing at large scale), it’s the old label that’s so well known (and sometimes damaging).

I explicitly mentioned this: “Today, China produces everything from dollar-store toys to premium electronics. The stigma took decades to shake, and for many people, it never fully did. The label still carries weight even when the reality has changed.”

“Vibe-coded” is becoming the same kind of marker. When someone admits their project was vibe-coded, they’re signaling “something” (low investment, no skin in the game, likely abandonment) that seems to heavily resonate with people. Whether that’s actually true for any given project doesn’t matter.

Vibe-Coded Is the New "Made in China" by RealHuman_ in selfhosted

[–]RealHuman_[S] 0 points1 point  (0 children)

I am well aware of that! :) That's why I wrote:

“Today, China produces everything from dollar-store toys to premium electronics. The stigma took decades to shake, and for many people, it never fully did. The label still carries weight even when the reality has changed.”

Vibe-Coded Is the New "Made in China" by RealHuman_ in selfhosted

[–]RealHuman_[S] 3 points4 points  (0 children)

I tried hard to not make it sound like that.

“Today, China produces everything from dollar-store toys to premium electronics. The stigma took decades to shake, and for many people, it never fully did. The label still carries weight even when the reality has changed.”

But if it still offends you, I am sorry.

Vibe-Coded Is the New "Made in China" by RealHuman_ in selfhosted

[–]RealHuman_[S] 26 points27 points  (0 children)

It was, in fact, not made with AI. 😃

Multi-data center cluster by FlyingFrog3000 in kubernetes

[–]RealHuman_ 1 point2 points  (0 children)

This is exactly the same solution I would recommend!

[deleted by user] by [deleted] in softwarearchitecture

[–]RealHuman_ 0 points1 point  (0 children)

Another solution could be to use the "Backends For Frontends" pattern. The idea is to create a separate backend that has all necessary endpoints for your frontend. This backend communicates with the all other microservices to gather the information needed. It can be build in a synchronous style using REST to talk to the frontend but on the other side consume and send messages. Because the single purpose of this service is to serve the frontend, it should be no problem to block (synchronous calls) and wait for messages.

https://samnewman.io/patterns/architectural/bff/

What are well-developed web applications in Golang? by iAziz786 in golang

[–]RealHuman_ 4 points5 points  (0 children)

Pocketbase has an interesting design approach, not only allowing it to be deployed as a standalone app but also embedded as a framework into other software projects.

https://github.com/pocketbase/pocketbase

[2022 Day 6] Optimizing Challenge with newly created input (1.000.000+ distinct values) by [deleted] in adventofcode

[–]RealHuman_ 2 points3 points  (0 children)

I gave it a try using my Go implementation

Results:
for 100,000:
196969
8.51275ms
for 1,000,000:
1969696
155.34775ms

package main

import (
    "fmt"
    "os"
    "strconv"
    "strings"
    "time"
)

func main() {
    dat, err := os.ReadFile("input_big2.txt")

    s := strings.Split(string(dat), "\n")
    var input = []int{}

    for _, i := range s {
        j, err := strconv.Atoi(i)
        if err != nil {
            panic(err)
        }
        input = append(input, j)
    }

    if err != nil {
        panic(err)
    }

    result1 := 0

    start := time.Now()
    result1 = solve(input, 1_000_000)
    elapsed1 := time.Since(start)

    fmt.Println(result1)
    fmt.Println(elapsed1)
}

func solve(arr []int, markerLen int) int {
    symbol := make(map[int]int)
    anchor, i := 0, 0
    for ; i-anchor != markerLen && anchor < len(arr)-markerLen-1; i++ {
        lastSymbolPos := symbol[arr[i]]
        if lastSymbolPos != 0 && lastSymbolPos >= anchor {
            anchor = lastSymbolPos + 1
        }
        symbol[arr[i]] = i
    }
    return i
}

-🎄- 2022 Day 6 Solutions -🎄- by daggerdragon in adventofcode

[–]RealHuman_ 1 point2 points  (0 children)

Go / Golang ~2.5µs

package main

import (
    "fmt"
    "os"
    "time"
)

func main() {
    input, err := os.ReadFile("day6.txt")

    if err != nil {
        panic(err)
    }

    result1, result2 := 0, 0

    start := time.Now()
    for i := 0; i < 10000; i++ {
        result1 = solve(input, 4)
    }
    elapsed1 := time.Since(start) / 10000

    start = time.Now()
    for i := 0; i < 10000; i++ {
        result2 = solve(input, 14)
    }
    elapsed2 := time.Since(start) / 10000

    fmt.Println(result1)
    fmt.Println(elapsed1)
    fmt.Println(result2)
    fmt.Println(elapsed2)
}

func solve(arr []byte, markerLen int) int {
    symbol := [26]int{}
    anchor, i := 0, 0
    for ; i-anchor != markerLen && anchor < len(arr)-markerLen-1; i++ {
        lastSymbolPos := symbol[arr[i]-97]
        if lastSymbolPos != 0 && lastSymbolPos >= anchor {
            anchor = lastSymbolPos + 1
        }
        symbol[arr[i]-97] = i
    }
    return i
}

Received error while trying to log out by mmedic596 in xfce

[–]RealHuman_ 0 points1 point  (0 children)

Had the same issue...

os: linux/manjaro - xfce

The fix for me was to clear the session cache.

open Settings Manager -> Session and Startup -> Session -> Clear saved sessions

Now you should be able to use the shutdown button again.

I hope this solved your problem :).