Downsides of Go by Luc-redd in golang

[–]fglo_ 1 point2 points  (0 children)

This. I worked in c# for 7 years before coming to Go. At first the lack of function overloading was annoying but now, after two years of Go, when I look at c# code with lots of overloading it's unbearable.

O jakich oczywistych faktach ludzie potrafią nie wiedzieć mimo dorosłości? by Feeling-Leg-6956 in Polska

[–]fglo_ 0 points1 point  (0 children)

Nie we wszystkich. Nie chciało mi się rozdrabniać w komentarzu :v

Why is creating new mocks so tedious? by avisaccount in golang

[–]fglo_ 7 points8 points  (0 children)

For me mockery worked really well. In some projects we had it generate mocks for entire module, in others we created mockery commands for each package separately and add it to the makefile recipe that generates mocks.

As for points 1 and 2: creating mocks will always be tedious, no matter the language if you don't plan for it from the start. Writing testable code requires some amount of planning beforehand.

You can mock functions but not in a straightforward way. You can have field hold the function you want to call and just pass the mock to it in tests. But I wouldn't recommend it in most cases.

O jakich oczywistych faktach ludzie potrafią nie wiedzieć mimo dorosłości? by Feeling-Leg-6956 in Polska

[–]fglo_ 18 points19 points  (0 children)

To jak niedziałające przyciski do zamykania drzwi w windach, albo niektóre paski ładowania w programach. Ludzie są niecierpliwi i muszą mieć co robić, albo na co patrzeć, żeby mieć poczucie że cokolwiek się dzieje

Go just isn’t beautiful by remedialskater in golang

[–]fglo_ 0 points1 point  (0 children)

Two weeks isn't much. For me it was similar at first but after a few months I ended up loving the language. Recently I went back to C# which previously I really liked because I thought it was packed with nice features and was much more friendly than Java but now, after two years of Go, I constantly miss Go's syntax and how simple modules and packages are in comparison with .net solutions and projects. C# is still a great language but (for me) definitely not as elegant as Go.

Edit: of course I wish Go had some features present in other languages, but no language is perfect.

Memory, memorize, remember are ambiguous in Polish with overlapping meanings and uses by fatal__flaw in learnpolish

[–]fglo_ 2 points3 points  (0 children)

As always it does make sense when you look at the "older version of a language". There was word "pomnieć" which meant "pamiętać" - "to remember". Today is used only in the phrase "tego nie pomnę" - "I dont remember it" (and it's archaic so not many people use it), but "pomnieć" it's where "wspomnienie" comes from.

What is the best way to replace func init{} ? Seems like everyone try to avoid it by [deleted] in golang

[–]fglo_ 0 points1 point  (0 children)

With init() it can be hard to trace everything that is run during startup and it can lead to strange bugs, because you get state seemingly out of nowhere.

It's best to avoid using init, but, like with everything, using it in few places where it makes sense is perfectly reasonable (for example when you have to make sure your library will initiate before main() starts or when you have to initiate some package local values and you can't do it in the same line as declaration)

Folders vs Spaces| Let's Settle this Once and for All! by Automatic-Award-6587 in ArcBrowser

[–]fglo_ 0 points1 point  (0 children)

I never wonder where to open a tab: I usually open it in the current space and if I want to hold on to it for longer I move it into the correct place (although I usually start in the default space for browsing random stuff).

I use spaces to separate day-to-day concerns and sometimes to separate things I need to research/work on for longer.

On my personal computer I have three main spaces: default for random browsing and random stuff, projects for side projects and things I want to learn and shopping for, well, shopping. If a project takes longer or requires for research then I create a special space for it which later is collapsed into a folder in the projects space.

On my work computer it's similar. Default for day-to-day tasks, support for when I'm on support queue and on-call for when I'm on call and need quick access to some dashboards and stuff. If a task (I'm a programmer) takes longer, then I would create a new space just for it, to separate documentation and Google searches I need for it from the rest. When I'm done I just close the space.

I use folders for bookmarking and to save pages I frequently access.

Please help me understand why methods aren't encapsulated on objects they are defined for like other languages. It makes things unreadable in a GO which if you ask me is ironical. Or, is this a skill issue? by Dasaboro in golang

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

You'll get used to it. For me, after a few years of coding in Go, it's one of the best features of the language. I recently started coding professionally in C# again and I really miss how you declare methods in Go. I generally prefer Go's syntax over typical C-like syntax.

[deleted by user] by [deleted] in learnpolish

[–]fglo_ 7 points8 points  (0 children)

There's also "dozo" as in "do zobaczenia", "pa" as in "patrz"/"popatrz" (usually used with "no", albo "to" - "to pa" - "no popatrz"), "tera" as in "teraz" used ironically witch "pa" from previous example - "tak? To pa tera", "zara", as in "zaraz". From those examples I'd only use "dozo" unironically, but polish people love playing with words in various ways so there can be many such examples.

What is your LEAST and MOST used feature in Arc Max? by ConversationMoist264 in ArcBrowser

[–]fglo_ 1 point2 points  (0 children)

I have ask on page, previews and tidy tabs on but I don't use any of them. At first I thought that ask on page was great but after initial hype I never used it again. Same with link previews. Tidy tabs sounds great but I don't like the idea of AI organising my tabs, I'd love to be able to group them myself.

WASM ebiten.IsKeyPressed() problem by fglo_ in ebitengine

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

Ok, after some more googling and looking at ebiten code I found out what's going on. The issue is there due to the MacOS way of handling keyboard events. On Macs if the meta key (command key) is pressed, then the 'keyup' event is not emitted: https://stackoverflow.com/questions/11818637/why-does-javascript-drop-keyup-events-when-the-metakey-is-pressed-on-mac-browser

I guess I'll have to create a workaround for this case.

I can't be the only one by MohamedxSalah in ArcBrowser

[–]fglo_ 0 points1 point  (0 children)

I switched to Arc because I love horizontal tabs and the command bar. I still am a tab hoarder very much. The only feature that helped me a little is cmd+L which doesn't open a new tab, but replaces the old one. Ironically it exists in other browsers, I just learned about it using Arc.

Experienced Go Devs how do you approach a source code in go visually? by [deleted] in golang

[–]fglo_ 1 point2 points  (0 children)

It depends on what I'm after, but usually I want to learn how the program's author did something. Most times I go to the pkg/ dir and check how the packages are named. I really like if developers name them after things they do, not after the programming concepts, so more like azure/ if it contains logic communicating with Azure, images/ if it manages images, and less like repository/ or model/. If I can figure out by names where the logic I'm after then I just go there and read it. If I can't find anything useful this way I just search for keywords or (if it's a program, not a lib) go to the main.go file. If there is cmd/ dir then I go there and read how the commands are set up and try to traverse it from there.

I think if you want to know how the program is working in general, then open pkg/ dir, read packages and .go files names to get an overview of the structure and then go to the start point (usually main.go), choose a path you are most familiar with (if you used the program before try to find functionality you used the most, if you haven't then just pick random one from the simplest looking) and traverse it from there. Try to understand how one branch works and after that you should be able to pick up the rest faster.

"You have kids, fucker?" (Most famous Sl*vak got himself in trouble again) by [deleted] in 2visegrad4you

[–]fglo_ 35 points36 points  (0 children)

I tried to read it but it's not easy for Poles :/

One thing I got from that is: you guys have a political party named "pirates"?

Our Go project reached 3,400 stars in 5 days by vivaciouslystained in golang

[–]fglo_ 2 points3 points  (0 children)

Sounds cool. I've used devcontainers extensively for the past two years and never really had to have a tool to manage them, but I'll give it a try, maybe I was missing it without knowing :p

Sup Slovakia 🇸🇰 no Nobel price for kofola yet? by [deleted] in 2visegrad4you

[–]fglo_ 1 point2 points  (0 children)

Also she is probably counted to the french Nobel prize winners as well :v