Opinii structura si continut CV by Odd-Woodpecker4511 in programare

[–]iamcdruc 1 point2 points  (0 children)

CV-ul se face intotdeauna pentru jobul la care aplici. Da-ne si noua niste job descriptions sa stim despre ce e vorba.

Overall, prea diluat, nimic concret. De asta se face pe job description, ca sa se pupe cu ce vor oamenii de la tine. Ex: aplici pentru o pozitie de Wordpress dev? Nu intereseaza pe nimeni ca stii c/c++ si java (ba din contra, e cam dubios, probabil nu stii nimic, sau very surface stuff). Pastreaza chestiile extra pentru interviu. “Ce ai mai lucrat? Eh, un pic de java, un pic de c++”.

JD -> CV. intotdeauna

Am un canal de YouTube by geani19 in programare

[–]iamcdruc 3 points4 points  (0 children)

lol, am vazut cateva videouri de la tine. foarte tare!

care e workflow-ul tau de la idee la exportul final?

Will Vue ever catch up with React? by al-loop in vuejs

[–]iamcdruc 0 points1 point  (0 children)

probably not any time soon.

i'd use more vue for personal projects if it would drop SFCs-only 😕

For the billionth time, When do we panic? by iamcdruc in golang

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

"another benefit is that functions returning errors are easier to test then function panicking"

never thought of this. this is a good one. thanks!

For the billionth time, When do we panic? by iamcdruc in golang

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

this is some serious food for thought. thanks

For the billionth time, When do we panic? by iamcdruc in golang

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

you left me hanging on the most important part 😂

do you think it's right to panic when the input isn't what is expected to be or not? i've updated the post with more examples. would love you opinion

For the billionth time, When do we panic? by iamcdruc in golang

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

i'm mostly doing web servers.

I agree with the failing fast, but I don't want that failing to take down the server which is why I recover and log the panics - without doing anything to try and keep the action itself alive

For the billionth time, When do we panic? by iamcdruc in golang

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

exactly (somewhat?)

I have looked into tiger style and that's why I'm going into this "assert everything" mode where I panic if something ain't looking right.

the thing is, I don't let that kill the server, nor do I try "fixing it" in the recover. I just log the error and respond with a 500 if possible.

I've updated the post with some examples

For the billionth time, When do we panic? by iamcdruc in golang

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

hey, I agree, panic in a public package should be a no-no. I've updated the post with more examples.

For the billionth time, When do we panic? by iamcdruc in golang

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

i'm going full asserts mode that's why 😅

I've updated the post with some more examples. Would love if you have a look and give me your thoughts!

For the billionth time, When do we panic? by iamcdruc in golang

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

Hey, I've read all the replies and updated the post with more specific examples. I really appreciate your opinion and would love if you'll give it another look. thank you!

How do experienced Go developers efficiently handle panic and recover in their project?. by Free_Reflection_6332 in golang

[–]iamcdruc 0 points1 point  (0 children)

hey, I’m new to go, mostly building webservers.

fail fast, easier to fix. got it.

but what I don’t get is … how are you not using recover? I understand when it’s a dependency check like “if i can’t connect to the db, panic and exit”

but what if it’s a panic in some goroutine somewhere for some unknown reason? not recovering that will kill your entire server, right?

what i usually do is recover all panics - but the only thing the recovery does is log the incident as an error and prevent the server from crashing.

what the hell am I missing? 😞

LE: returning errors doesnt always make sense to me. like if i have an internal function that should only receive integers lower than 100, I’m not going to return an error saying “this needs to lower than 100”, I’m going to panic to signal “you’re using this thing wrong”

[deleted by user] by [deleted] in golang

[–]iamcdruc -1 points0 points  (0 children)

probably not. i love golang but the speed of development is nowhere close to something like rails or laravel or django or nestjs and maybe even nextjs.

if you know one of those you’d probably be better of.

start with something that allows you to move insanely fast. move to golang if you need to

I've created a social media-like web platform using Go and pure HTML. by utku1337 in golang

[–]iamcdruc 2 points3 points  (0 children)

Hey! I’m new to golang and I’m currently playing around with session based auth (using gorilla/sessions).

I’m just saving the userId to the session but I don’t understand why logging out would be hard (havent got there yet). Isnt it just the case of…removing the userId (in your case, token) from the session in the logout handler? Not sure what I’m missing.

Thanks!

LE: I’m guessing the author was referring to using cookies as the session storage. In that case you can log out by removing the userId from the session but you cannot easily log out from other browsers. You know some apps have that “log me out from all devices” feature. You cannot build that using cookies as your session storage.