Cyno

joined 11 months ago
[–] Cyno@programming.dev 1 points 6 days ago

VScodium

I tried this but it seems that VSCodium is missing many of the extensions that are available on VSCode, it has something to do with them using different extension registries?

In any case thanks for the advice but they don't seem to be completely equal in terms of features

[–] Cyno@programming.dev 2 points 1 week ago* (last edited 1 week ago) (1 children)

How will manually retyping git pull or checkout 30+ times a day, or using the terminal log instead of a nice GUI with VSCode integration, teach me to solve other complicated issues? I just don't really see the benefit of struggling for most of the time for something that might or might not happen later

[–] Cyno@programming.dev 7 points 1 week ago* (last edited 1 week ago) (3 children)

When you need more advanced stuff then GUIs tend to become more of a sticking point I find

What's stopping you just opening the terminal in those rare cases? For 99% of my daily needs I'm good with a good GUI

[–] Cyno@programming.dev 1 points 1 week ago

Ok, I'll just default to flathub for app search instead, thanks.

Wish I wasn't already running into bugs with it though - I started installing vscode and logseq with flatpak, it opened them in Mint's Software Manager and there's a spinny thing now indicating work is being done, but when I click on it it just says "Currently working on the following packages" and then... nothing, blank screen. No idea if it's stuck or actually doing something in the background, but it's been a while (way longer than those would usually require to be installed).

Not a good first impression for sure

[–] Cyno@programming.dev 1 points 2 weeks ago* (last edited 2 weeks ago) (3 children)

So what do I do if I want to install VSCode? The official installation guide on their website says to download the deb file, why is such a big and popular tool not in the repository right away? Or better yet, if this is the officially endorsed why how are we to figure out the proper alternative?

[–] Cyno@programming.dev 11 points 2 weeks ago (2 children)

Git Fork is absolutely amazing. It has a good (unlimited) free trial but it is well worth the one time purchase too.

[–] Cyno@programming.dev 2 points 1 month ago* (last edited 1 month ago) (2 children)

I wonder what kind of support for development do you get? Honestly I've only had obstacles when I switched, for example the docker installation was much more complicated on linux than on windows+wsl. Even installing python was problematic because apparently 'upgrading it yourself can brick the system', at least if an older version comes with the OS?

And lastly it's the simple thing that pretty much all tools work on windows natively but on linux you have to find workarounds, which is definitely a problem when it comes to productivity.

So what are the benefits, what does linux have that windows doesn't in this context?

[–] Cyno@programming.dev 1 points 1 month ago (1 children)

I've only gone through the reddit thread and tbh most people seem to be bashing this method and pointing out flaws? It doesn't seem like a magic bullet solution and dual boot seems like the better option, at least for now.

[–] Cyno@programming.dev 2 points 1 month ago

Yeah I'm the same way, there is a 6h video linked in your post but i can't imagine myself actually going through it like that lol. I'm also in the process of trying to move data and media off my main PC but haven't figured out the best way yet, I have an older laptop that I was considering setting up as a mini pc/home server but then there's also the option of buying a NAS... it gets complicated and more expensive fast either way.

[–] Cyno@programming.dev 2 points 1 month ago (3 children)

Can you elaborate? Googling linux vfio just gives me text heavy documents I dont understand. How does that replace dual booting and how would I use it?

[–] Cyno@programming.dev 2 points 1 month ago (2 children)

Oh didn't see that one, thanks! Of all the advice there did anything stick with you and help in the end?

 

cross-posted from: https://programming.dev/post/18636248

I've always approached learning Linux by just diving into it and bashing my head against problems as they come until I either solve them or give up, the latter being the more common outcome.

I wouldn't take this approach with other pieces of software though - I'd read guides, best practices, have someone recommend me good utility tools or extensions to install, which shortcuts to use or what kind of file hierarchy to use, etc.
For example, for python I'd always recommend the "Automate the boring stuff with Python", I remember learning most Java with that "Head first Java" book back in the days, c# has really good official guides for all concepts, libraries, patterns, etc.

So... lemme try that with Linux then! Are there any good resources, youtube videos, bloggers or any content creators, books that go explain everything important about linux to get it running in an optimal and efficient way that are fun and interesting to read? From things like how the file hierarchy works, what is /etc, how to install new programs with proper permissions, when to use sudo, what is a flatpak and why use it over something else, how to backup your system so you can easily reconstruct your setup in case you need to do an OS refresh, etc? All those things that people take for granted but are actually a huge obstacle course + minefield for beginners?

And more importantly, that it's up to date with actually good advice?

[–] Cyno@programming.dev 1 points 2 months ago

Sure, but whoever's fault it was didn't really matter to me at the time. I just remember being annoyed at everyone constantly praising linux and saying how easy it is nowadays while I'm just jumping from one issue into another, that experience made me delay moving my main PC to it since I also have an nvidia GPU there. Had to go through like 3 different ways of installing drivers, various weird containers or bottles or wine and lutris or proton just for it all to constantly freeze or crash my PC.

It was a Dell laptop, not sure about specs but it's at least a few years old model, nothing too high end. The plan was to keep it as a small home server for hosting various stuff, services, media in the end, with varying success.

 

To clarify, I mean writing scripts that generate or modify classes for you instead of manually writing them every time, for example if you want to replace reflection with a ton of verbose repetitive code for performance reasons I guess?

My only experience with this is just plain old manual txt generation with something like python, and maintaining legacy t4/tt VS files but those are kind of a nightmare.

What's a good modern way of accomplishing this, have there been any improvements in this area?

 

I don't have access to my router and my ISP charges for port forwarding (I think they might have a CGNAT setup?).

I'm trying to work around that since I want to start hosting some apps and game servers from my PC. I'm seeing a lot of talk about tailscale as a possible solution to this but honestly I'm a bit confused with all the options and whether this is actually the proper tool for the job.

Assuming it is, do I go the route of setting up a "tailscale funnel" or a "subnet"? Will other people have to install tailscale too if they want to join my servers? People also mention Netmaker or Cloudflared Tunnel, although it also seems like cloudflare doesn't want their tunnels used for game and media traffic?

The more expensive option I guess would be just paying for protonvp premium since it offers port forwarding in that case, but I'm not sure about performance and whether it's worth it, at that point I might just rent a server instead.

Hoping you folks at self-hosted have more ideas on how can I, well... self host instead of throwing money at the problem.

 

cross-posted from: https://programming.dev/post/6513133

Short explanation of the title: imagine you have a legacy mudball codebase in which most service methods are usually querying the database (through EF), modifying some data and then saving it in at the end of the method.

This code is hard to debug, impossible to write unit tests for and generally performs badly because developers often make unoptimized or redundant db hits in these methods.

What I've started doing is to often make all the data loads before the method call, put it in a generic cache class (it's mostly dictionaries internally), and then use that as a parameter or a member variable for the method - everything in the method then gets or saves the data to that cache, its not allowed to do db hits on its own anymore.

I can now also unit test this code as long as I manually fill the cache with test data beforehand. I just need to make sure that i actually preload everything in advance (which is not always possible) so I have it ready when I need it in the method.

Is this good practice? Is there a name for it, whether it's a pattern or an anti-pattern? I'm tempted to say that this is just a janky repository pattern but it seems different since it's more about how you time and cache data loads for that method individually, rather than overall implementation of data access across the app.

In either case, I'd like to learn either how to improve it, or how to replace it.

 

It is a common sentiment that managing dependencies is always a big issue in software development and the reason why so many apps come pre-bundled with all the requirements so it reliably works on every machine.

However, I don't actually understand why is that an issue and why people generally bash npm and the way it's done there. Isn't it the simplest and most practical solution to a problem - you have a file which defines which other libraries you need, which version, and then with one command you can install them and run the program?

Furthermore, those libraries and their specific versions can be stored elsewhere and shared across all apps on a system so you can easily reuse them instead of having to redownload for each program individually.

I must be missing something since if it were that easy, people would have solved it years ago and agreed on a standardized best way, so I'm wondering what is the actual issue and a cause of so many headaches.

 

I see this often with both new and old developers, they have one way of doing a thing and when presented with a new problem they will fall back to what they are used to even if it's not the optimal solution. It will probably work if you bruteforce it into your usual patterns but sometimes, a different approach is much easier to implement and maintain as long as you are willing to learn it, and more importantly - know it exists in the first place.

On a less abstract level, I guess my question is - how would I go around learning about different design patterns and approaches to problem solving if I don't know about their existence in the first place? Is it just a matter of proactive learning and I should know all of them in advance, as well as their uses?

Let's for example say I need to create a system for inserting a large amount of data from files into the db, or you need to create some service with many scheduled tasks, or an user authentication system. Before you sit down and start developing those the way you usually do, what kind of steps could you take to learn a potentially better way of doing it?

view more: next ›