Cyno

joined 1 year ago
[โ€“] Cyno@programming.dev 1 points 9 months ago (1 children)

I was really hoping there was something like hamachi/xfire/garena from the old days but modernized and more stable ๐Ÿ˜… I just assumed it'd be a solved problem by now.

I'm not giving up on tailscale yet, I'll try the funnel feature but yeah... seems a bit troublesome for sure

[โ€“] Cyno@programming.dev 1 points 9 months ago (3 children)

Thanks for linking that, seems like a great resource! Seems like there's a few that support UDP although I'm not sure if they will work with a CGNAT setup, also their setup seems a bit more complicated and technical than expected but I need to look more into it tomorrow. If everyone else needs to have this installed then that might be an issue

[โ€“] Cyno@programming.dev 2 points 10 months ago

๐Ÿคทโ€โ™‚๏ธ Downvotes are meaningless, I'd rather see them give an actual counterargument if they have one but im used to it from reddit

[โ€“] Cyno@programming.dev -2 points 10 months ago* (last edited 10 months ago) (2 children)

That's not really a good solution although it is a temporary workaround.

  • Many users won't know this is a feature they can use, or how to set it up
  • Some users use alternative instances that federate with lemmy which might not have this feature
  • Content still gets copied and hosted on this instance which might not be desireable

Besides, at the end of the day, shouldn't the admins and mods here curate the content according to the community's guidelines and spirit? If someone started spamming undesired content on a forum you're administrating, the answer wouldn't be "all the users can just block it if it's an issue". I don't think it should be the answer here either

[โ€“] Cyno@programming.dev 2 points 11 months ago (1 children)

If you find or run into that article later please share it, I'd definitely like to read it!

[โ€“] Cyno@programming.dev 2 points 11 months ago* (last edited 11 months ago) (1 children)

Ah sorry, forgot to mention it here because I originally posted it on csharp and then crossposted. I'm specifically thinking about c#, EF and .net core for web dev.

[โ€“] Cyno@programming.dev 2 points 11 months ago (3 children)

I'm not caching or reusing method results however, and even the inputs are not necessarily cached for multiple uses. I'm just preparing all potentially required input data before the method is actually called so I don't have to do any loads within the method itself, so the method is just pure code logic and no db interaction.

For example, imagine you have a method that scores the performance of an athlete. The common "pattern" in this legacy code base is to just go through the logic and make a database load whenever you need something, so maybe at the beginning you load the athlete, then you load his tournament records, then few dozen lines later you load his medical records, then his amateur league matches, etc.

What I do is I just load all of this into a cache before the actual method call, and then send it into the method as a data source. The method will only use the cache and do all the calculations in-memory, and when it's done the result would be in the cache as well. Then outside of the method I can just trigger a save or abandon it to persist the result. If I want to unit test it, I can easily just manually fill a cache with my data and use it as the data source (usually you'd have to mock custom response from the repository or something like that, inject an in-memory repository with the same data anyway or just resign to using an integrated test).

It's like I'm "containerizing" the method in a way? It's a pretty simple concept but I'm having trouble googling for it since I don't know how to call it.

[โ€“] Cyno@programming.dev 2 points 1 year ago

I only have half as much experience as you, and none with Go specifically, so I can't give you any good answers but I can say I empathize - the company I work at is also stuck with a legacy monolith that's still on .net framework and everything is so coupled that it's impossible to even unit test, less alone deploy the projects separately. Some people aren't bothered even with the basic principles of code writing and the senior people are just overworked and can't keep tabs on it even if they wanted to.

The worst part is that the company is mostly either juniors just doing what they are told or older seniors that are stuck in their ways and are afraid of anything new - although as I got older I started to see why that might be the correct approach, not everyone wants to learn and adapt to new tech and it's a big ask of the upper management to risk it on that. Basically we're just repeating the same mistakes and wasting time fixing known errors that keep happening and any actual improvement or proper removal of tech debt never happens.

So yeah... I'm starting to believe that "clean good code" only happens either in hobby projects or new startups. Any larger, "stable" codebase of a larger company is going to be an inefficient mess however ๐Ÿคทโ€โ™‚๏ธ

[โ€“] Cyno@programming.dev 2 points 1 year ago

It's a neutral, easily accessible language. Having it in programming could incentivize more people to learn it as well.

[โ€“] Cyno@programming.dev 6 points 1 year ago (2 children)

I'm not disagreeing outright but... Why do we need more non English programming languages? Is there a specific practical reason?

The only language translation I'd maybe consider to accept in programming is Esperanto. Anything else just sounds like a terrible idea.

[โ€“] Cyno@programming.dev 1 points 1 year ago

Hmm, having googled very superficially about django and flask, it seems to me like the state (at least today) is the opposite - flask is lightweight and django is more heavy duty, having a built in ORM layer, authentication service, admin interface, db migration framework, etc.

To be fair the article also says Django is known for its performance but when I googled that the other day, it looked like it was often near the bottom of the chart rather than top... I guess it really comes down to personal preference in the end ๐Ÿคทโ€โ™‚๏ธ

[โ€“] Cyno@programming.dev 0 points 1 year ago (2 children)

Was there a noticeable performance improvement on flask or what kind of features did you need that django didn't provide? I've always used bigger enterprise frameworks for webapps and only recently started looking into Django for smaller personal ones so I'm wondering what are the differences

view more: โ€น prev next โ€บ