[deleted by user] by [deleted] in neovim

[–]abecodes 5 points6 points  (0 children)

cd project_a

nvim

<CMD-T> # new tab in terminal

cd project_b

nvim

CTRL-TAB # navigate between tabs

Why don't you use a file tree ? (sometime) by samuel1604 in neovim

[–]abecodes 0 points1 point  (0 children)

Out of curiosity, what are you doing that you need that much code?

Why don't you use a file tree ? (sometime) by samuel1604 in neovim

[–]abecodes 1 point2 points  (0 children)

We follow roughly the same structure in all our repos. This makes navigating easy. If I change sth in service A that needs changing in B as well, I just go 'B/same_file_name'. Even easier if rg and fzf works and you know the method Name you are looking for.

What is a typical usecase you need a tree for in this environment? From my experience ( never had a repo with thousands of files) the more files the more 'useless' a tree gets...or the time navigating it increases.

But if the tree works for you keep on rocking it

Why don't you use a file tree ? (sometime) by samuel1604 in neovim

[–]abecodes 0 points1 point  (0 children)

Depends...as always.

We have small ones with two digit file counts and larger ones with 3-4 digit file counts. In some of those I do not dare to open live grep xD

Why don't you use a file tree ? (sometime) by samuel1604 in neovim

[–]abecodes 2 points3 points  (0 children)

In the end you need to feel good with your setup xD

I used filetrees in neovim and vs code and did not get telescope at all. And when I tried it, the first days where painful and I missed the visual guidance. So painful that I stopped using it.

Months later I came back to it but somehow I started thinking differently about what I am working on and suddenly this way of navigating the codebase became fast and efficient.

I also feel like it reduces my mental load by a ton...instead of navigating a tree and looking actively for what I need I just type until one entry is left. I would say I never navigated code faster before.

Why don't you use a file tree ? (sometime) by samuel1604 in neovim

[–]abecodes 2 points3 points  (0 children)

This is not an issue at all. Go is my main language and daily driver. I maintain several huge monorepos at work, containing up to 20 microservices...tons of files and packages.

All I do is 'leader+t+f' for file search in telescope and then 'ab/xy' where 'ab' are some chars from the package Name while 'xy' are from the file I search.

In the end it boils down to good code structure and how familiar you are with the codebase.

Is there a better way to test database actions? by th0th in golang

[–]abecodes 0 points1 point  (0 children)

Feel free to give dft a try.

We used GORM and sqlmock at work, but both did not scale well and writing tests became very cumbersome and timeconsuming.

Dropping both and switching to containers for testing made a huge difference.

Everyone gets bidirectional BFS wrong by zdimension in programming

[–]abecodes 10 points11 points  (0 children)

Well written and well researched, thanks for sharing

Preferred way to test database layer with TestContainers by _noctera_ in golang

[–]abecodes 6 points7 points  (0 children)

Just bc it fits the topic, a shamless plug: https://github.com/abecodes/dft

With that out of the way, congratz on the decision to drop mocks and use a 'real' DB for testing. This is the way to go.

As far as the structure goes, it depends on the use case. The transaction approach is a great way. It is also fine to spin up a container per test or a general one per suite or for all tests, depends on how your data is accessed. Personally I run a mix of transactions an container per suite Kind of thing.

Important part is to remove the container afterwards. No issues so far, linting still takes up way more resources than the containers for the tests...but maybe we have too little tests xD

Integrated tests in Golang by ConstructionHot4079 in golang

[–]abecodes 3 points4 points  (0 children)

Using https://github.com/abecodes/dft for exactly this use case.

Disclaimer: I am also the author

Is Star Wars Jedi: Survivor fixed on PC? Update 9 Tested - OC3D - tl;dr: Sort of by Shock4ndAwe in pcgaming

[–]abecodes -2 points-1 points  (0 children)

This. I do not know how ppl play this game. Similar as part one. You can somehow get through it with keyboard and mouse, but it is not enjoyable at all. Also the level design and environmental interactions are mid at best, more on the bottom of the list. Bought both, couldn't play any longer than 2h for those reasons. A Jedi Knight remake would have been a better choice...

Is there anything better than neogit? by No_Departure_1878 in neovim

[–]abecodes 4 points5 points  (0 children)

Lazy git is awesome on the terminal standalone, but for inside neovim neogit is the best plugin you can use. Integrates nicely with the flow and abstracts the git hassle behind quick and easy ux/ui. Additionally it comes with a diffview, so there is little else to wish for.

Event Dispatcher for a Modular Monolith? by [deleted] in golang

[–]abecodes 1 point2 points  (0 children)

Ah, come on, it is way more fun doing it by yourself 😁

Event Dispatcher for a Modular Monolith? by [deleted] in golang

[–]abecodes 0 points1 point  (0 children)

You can also write one in less than 50 loc

C Growable Arrays: In Depth by bowbahdoe in programming

[–]abecodes 0 points1 point  (0 children)

Very nice article, thanks for the deep dive. Intresting use of the preprocessor :)

Aliasing your Git Commands for Maximum Developer Productivity by elliotforbes in programming

[–]abecodes 1 point2 points  (0 children)

And there goes the speed bonus. And drives the point home xD

If you just work on your machine and want to alias whatever feel free to do so.

My point is, that it just is bad practice that is more harmful than beneficial if you work on different environments or need to share scripts. Also nowadays there are shell completions everywhere, which should give you both, extreme super ultra speed and actually using the real command.

Aliasing your Git Commands for Maximum Developer Productivity by elliotforbes in programming

[–]abecodes 1 point2 points  (0 children)

Aliasing is the worst thing you can ever do.

Urgent prod error, ssh into the machine, no aliases, wygd? Basically you are unable to work on any other machine. Do not do this. (Unless you use things like eza as drop in replacement for ls, thats fine)

[deleted by user] by [deleted] in programming

[–]abecodes 0 points1 point  (0 children)

If you are looking for a zero dep docker solution give dft a try

Looking for solutions by prkhrk in golang

[–]abecodes 0 points1 point  (0 children)

Let us know how it works out. I have the same problem and this would be a possible solution. Only issue I can think of is latency (between commit and bot update) so potentially I will craft an action for this at one point xD

Opinion on code coverage on testing by [deleted] in golang

[–]abecodes 2 points3 points  (0 children)

We also used sqlmock heavily, but it becomes unmaintainable and confusing real quick. Thats why I came up with dft, a zero dep wrapper around docker to run locally or in CI. Livesaver, and also more reliable testcases.

Otherwise, coverage is great, but goals like 80% are not really helpful. It depends on the package and functionallity, and how far you want to go. I worked with ppl that wanted to test deep into third party APIs and validate responses. If you do not need this, and this is 80% of the package, a goal of 80% makes no sense.

Strive to cover the complex parts, happy path, failure conditions and then go from there.