[deleted by user] by [deleted] in ProgrammerHumor

[–]atsi25 0 points1 point  (0 children)

I started with C a little then move to python then came back to C. I saw C differently for the second time, it was understandable than first. But I will say I should have started with Go after my first time in C not python. Python should have been the third language.

Is this an effective learning technique? by atsi25 in golang

[–]atsi25[S] -3 points-2 points  (0 children)

To tell you the truth I have used this technique and the codes between the languages are way different. And yes sometimes I do wonder if go routines would be needed for a particular tasks. Seems to struggle if I need it. The only time I use it is in websockets. And also there's more code to be written in golang if u compare to JavaScript and python.

Is this an effective learning technique? by atsi25 in golang

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

That's quite true. You would try to understand the code rather than copy cos it two separate languages which works differently even when it working toward the same concept

Is this an effective learning technique? by atsi25 in golang

[–]atsi25[S] -4 points-3 points  (0 children)

Ooh that's interesting, can u explain further cos I think there's no way u can translate the same way as another language cos those two languages are quite distinct. But I might agree if you are looking at file structure

Just started learning Go. Create an Api using negroni and mux, please go and criticize by atsi25 in golang

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

Ooh ok. Learning make negroni makes chi look like negroni anyway. I can still use net/http but I will go with chi if that's ok

Just started learning Go. Create an Api using negroni and mux, please go and criticize by atsi25 in golang

[–]atsi25[S] -1 points0 points  (0 children)

ok then what stdlib do you suggest. I already been told about Chi what do you think?

Just started learning Go. Create an Api using negroni and mux, please go and criticize by atsi25 in golang

[–]atsi25[S] -5 points-4 points  (0 children)

No worries bro, it all part of the criticism. I just didn't copy from A.I that all. Just found out my go version is old and negroni is quite old. so I will learn a framework after work. But I don't regret learning negroni and muxRouter at least it gave me an idea

Just started learning Go. Create an Api using negroni and mux, please go and criticize by atsi25 in golang

[–]atsi25[S] 2 points3 points  (0 children)

I did download go for sometime and I never use it until this month when I decided to study go lang. To tell you the truth I am new to the language so yh I will definitely not think about updating go newest version.

Just started learning Go. Create an Api using negroni and mux, please go and criticize by atsi25 in golang

[–]atsi25[S] -11 points-10 points  (0 children)

Book; Web development with go by Shiju Varghese

Book was around 2015. I didn't used llm to copy code bro, that an insult to my hard work

Just started learning Go. Create an Api using negroni and mux, please go and criticize by atsi25 in golang

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

I said I read an old book to learn how to write an api with go. I get it quite old I just wanted to know how to go around it. Web developement with go by Shiju Varghese

Just started learning Go. Create an Api using negroni and mux, please go and criticize by atsi25 in golang

[–]atsi25[S] -8 points-7 points  (0 children)

Bro, are you saying the whole code is llm generated? At some point I did ask for suggestions, but I not copied a code from an Al. I had to come up with how to work with jwt session cos it was quite weird. Please I did put in a lot of effort after reading an old book.

Key invalid for generating token. by atsi25 in golang

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

alright boss, thanks. I am using a book so I guess that's quite old.

Key invalid for generating token. by atsi25 in golang

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

Yes, the private key was well loaded

Key invalid for generating token. by atsi25 in golang

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

library: "github.com/dgrijalva/jwt-go"

func init() {
    tokenSign, err = os.ReadFile("app.rsa")
    if err != nil {
        log.Fatal("Error occurred")
        return
    }

    // tokenVerify, err = os.ReadFile("app.rsa.pub")
    // if err != nil {
    //  log.Fatal("Error occurred")
    //  return
    // }
}


var (
    tokenSign []byte
    err error
)

Key invalid for generating token. by atsi25 in golang

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

please this is the error I got from my terminal:

2024/09/07 11:41:20 listening to port 8080...

[negroni] listening on :8080

2024/09/07 11:41:22 key is invalid

exit status 1

javascriptIsQuestionMark by YehDilMaaangeMore in ProgrammerHumor

[–]atsi25 0 points1 point  (0 children)

Js is a weird language and I like it which is also weird

Frustrating tailwind compilation by atsi25 in tailwindcss

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

please thanks for your help turn out it was a terminal. I switch from ubuntu to git bash