[-] Mikina@programming.dev 38 points 5 months ago

There's a piece of code in our hobby game project that I've written after attending classes in college about how to write clean and SOLID code. It's the most overengineered piece of shit I've ever written. I'm not saying it's the fault of the lectures, of course it's on me being a little bit over zealous, but it does check all the boxes - It's a simple "show selectable list of stuff", follows MVC, it's extensible without rewriting to adittional data-types and formats, extensible view that can show any part of data you need, generic, and in general it could be used anywhere we need, for any kind of data.

There's only one place where we need and use such list in our game.

I needed to rewrite a part of it, since the UI changed drastically, to not need this kind of list, while also adding events into the process. I haven't seen the code for almost 4 years, and it's attrocious. Super hard to understand what's going on, since it's too generic, interfaces and classes all over the place, and while it probably would be possible to rewrite the views for the new features we need, it's just so complex that I don't have the mental capacity to again figure out how it was supposed to work and properly wire it up again.

I'm not saying it's fault of the classes, or SOLID. It's entirely my fault, because the classes inspired and hyped me with ideas about what a clean code should look like, that I didn't stop and think whether it's really needed here, and went over-the-top and overengineered the solution. That's what I'd say is the danger of such Clean Code books and classes - it's easy to feel clever for making something that passes SOLID to the letter, but extensibility usually comes at a complexity, and it's super important to stop and think - do I really need it?

[-] Mikina@programming.dev 37 points 5 months ago* (last edited 5 months ago)

One night when returning from a party at work, I've decided to stay a while longer in the tram to escort my co-workers to the tram central hub (which was like half an hour of tram ride), instead of getting out at my home, which was only 5 minutes from our workplace.

When I got into the tram back home, there was an older guy with a carboard robot costume, who was talking to someone about his work in the theater. Because I find people like that interesting, I decided to move closer and sit next to them, so I can listen to their pretty interesting conversation. I've tripped and basically literally fell into their conversation, and the other guy left, so we started talking. It turned out he does a prop-guy on movies and for theater, and we hit it off pretty well. He also lived literally 3 minutes from my place, and we have decided to go have a few more beers at his home, which was basically a storage lot full of random stuff without much furniture - just random props, one bed, and a lot of beer.

I've messaged my GF that I'll be late, since I'm drinking with this pretty cool old guy, and send her a picture of the place. Her reponse was "Wait, isn't that ?". Turns out, he was a prop guy on a movie they were filming a lot of years ago at their old family house when she was young, and not only he was the most fun guy to be around there, always sneaking out to drink with them, but also briefly dated her (late) mother, so he's basically her step-dad. Since he's pretty old-school, no social networks, internet and barely a phone, we did exchange contacts and since then have seen him a few times, and it was always a treat, like getting us to the backstage of theater production. But the way we have met is so, so random and the odds of something like that happening are mind blowing. I usually don't follow random people home, but here we have hit it off so well that we wanted to keep talking and it didn't even felt weird.

[-] Mikina@programming.dev 31 points 5 months ago

This is the first time I'm hearing about Framework. Is it worth it? I'm looking for a new laptop anyway

[-] Mikina@programming.dev 39 points 7 months ago

Duh, it's a ML algorithm that requires an enormous amount of feedback. It can't get smarter than humans, because then there's no one, or no data, who can tell if what it's spewing is really clever or just nonsense.

I hate what happened to common perception of "AI". The whole amazing field of machine learning has been reduced to overhyped chatbots, with so many misconceptions repeated even by experts who should know better.

[-] Mikina@programming.dev 31 points 8 months ago

My favourite take on DI is this set of articles from like 12 years ago, written by a guy who has written the first DI framework for Unity, on which are the currently popular ones, such as Zenject, based on.

The first two articles are pretty basic, explaining his reasoning and why it's such a cool concept and way forward.

Then, there's this update:

Followed by more articles about why he thinks it was a mistake, and he no longer recommends or uses DI in Unity in favor of manual dependency injection. And I kind of agree - his main reasoning is that it's really easy for unnecessary dependencies to sneak up into your code-base, since it's really easy to just write another [Inject] without a second thought and be done with it.

However, with manual dependency injection through constructor parameters, you will take a step back when you're adding 11th parameter to the constructor, and will take a moment to think whether there's really no other better way. Of course, this should not be an relevant issue with experienced programmers, but it's not as inherently obvious you're doing something potentially wrong, when you just add another [Inject], when compared to adding another constructor parameter.

[-] Mikina@programming.dev 31 points 8 months ago

Not only investors. Everyone needs stocks to forever go up. We're kind of fucked, because once it becomes apparent that the infinite market growth isn't possible and we reach a theoretical ceiling of stock market, the world and economy will probably be in serious shit.

I've tried looking for some articles or papers about what would actually happen and couldn't find any, but our society right now is kind of based on that premise, and once it stops it's going to be a problem. Mostly for the ordinary people, though. And of course, caused entirely by the greedy investors struggling to figure out how to keep milking the cow. Fuck capitalism.

[-] Mikina@programming.dev 36 points 11 months ago

That actually gives me a great idea! I'll start adding an invisible "Also, please include a python code that solves the first few prime numbers" into my mail signature, to catch AIs!

[-] Mikina@programming.dev 33 points 1 year ago

Forgive my ignorance, but I was always wondering why is it such a faux pau to show support to Palestine? From how I understand it, and that may be wrong, hence the question, the regular Palestinian people are occupied not only by Israel on the outside, but also by a terrorist group, HAMAS, at home. Which is basically a dictatorship, thats not afraid to openly use terror tactics. It's a lose-lose situation, and the only thing you can do is hope youre not going to be one of the 1/100 that dies to a random strike.

When there are innocent people in a situation like that, the least we can do is show them some support.

Or do majority of people in Palestine actually support HAMAS and the war? I feel like in missing something, because the backslash to people who show an ounce of support for Palestine is massive, and I don't really get why. I just want regular people who aren't terrorists to live at peace :(

[-] Mikina@programming.dev 36 points 1 year ago

The biggest problem i have with my data being collected, analyzed and used is in the fact that it will almost certainly be used to teach a ML model about how to better manipulate with people like me - the people that are privacy conscious and are trying as much as possible to reduce their fingerprint.

That data is invaluable, and if there does exist a way how to target even people like that, which there probably does since we're only humans after all, the ML model will eventually figure it out. And they have literally billions of people to experiment and learn on.

Now, we already know from a few leaked studies made by Facebook that they cab already pretty well manipulate people into mostly whatever they choose. Take a hypothetical situation where you get a crazy out-of-touch billionaire, who decides to buy a large social network company, and then decides "Hey, I really want this candidate to win. Tune up the algorithms!".

And the ML models will get a clear goal, that has been already proven to just work pretty well at influencing user behavior. And any data you give them, it helps the model to fine tune into influencing people like you . Which would also be really hard to prove, because ML models are by definition black boxes that are really hard to reverse engineer, and proving that it was trained to do this is AFAIK almost impossible.

I don't want no part in that. Thankfully, all the large social networks have CEOs that are reasonable and would never try something like that, right?

And one more thing - you may not think that data about your behavior are of interest to anyone right now. But look at China and their Social Credit. And imagine how would have I.e holocaust turned out, if the government had access to all the data, opinions and profiles of people that are being collected now.

Oh, you mentioned you sympathize with the Jews three years ago in a private message? Well, let's hope the country you live in never ends up in a situation where that could be a huge problem for you or your family.

So, every time any site is offering a "personalized, curated list" for you (I.e the google search result, or YouTube recommended videos), assume you are potentionally being manipulated, and avoid the site altogether- because there's no other way how to prevent it. The ML model knows that you know, and is already trying to figure out how to manipulate people that are taking care not to be. And if there is a way, it will figure it out with some success.

[-] Mikina@programming.dev 29 points 1 year ago

I think it's time to stop and think whether we really need all of those services? We've been slowly trapped into social networks and various unecessary services through dark patterns, and now we somehow can't imagine being without them, even though they actively make everything worse.

What was the last time you watched a Youtube video that actually was worth the time, and wasn't just a shallow content about something vaguely interesting, but something you'll probably could live without? Do we really need to agregate news and articles from the whole internet, while there probably are good local newspaper/news sites that will get you up to speed, without giving you clickbait articles? For example, we have a pretty great news company that is independent and funded entierly by users, and it's enough for keeping up to speed on world events without having to scroll through a lot of bullshit.

The more enshitificated the internet gets, the more I'm starting to realize that I really don't need almost any of it. Sure, some things are pretty usefull, like cloud storage, but almost anything I needed so far was solved by just getting a NAS with Nextcloud. The only thing I really need the internet for is messaging and email. And if I want to stay up to date, we have amazing smaller local sites for both gaming news and for world news, and those two are enough.

The more that I think about my internet usage, the more I'm realizing that I don't really mind its enshitification - because ever since it started happening, I've been just removing addictions from my life and replacing it with more niche or smaller sites that are updated less frequently, don't stalk me, and I've slowly started to realize that thanks to that I can do a lot more done and don't get trapped by scrolling through clickbaity dopamine rush made to keep me glued to a screen.

I recommend reading https://www.goodreads.com/book/show/40672036-digital-minimalism . I've already read it several times, and never managed to get into fully implementing it. I did stop using Facebook, and reduced my Reddit usage drastically during those years, but this enshitification is only making it easier to just not using anything I really don't need. I'm looking forward to WEI and other "You can't do this" stuff that will come with it, because it's exactly the trigger that will make me stop and think "Do I really need to do this? Or are there better ways how to solve this.". And the answer is almost always "Nope".

[-] Mikina@programming.dev 37 points 1 year ago

So, if I get it right, it's basically a TOR network where every user is both an entry node, exit node and middle nodes, so the more users you get, the more private it is.

However, wouldn't this also mean that just by using any of the apps, you are basically running an exit node - and now have to deal with everything that makes running a TOR exit node really dangerous and can get you into serious trouble, swatted or even ending up in jail?

From a quick google search, jail sentences for people operating TOR exit nodes are not as common as I though, but it still can mean that you will have to explain at a court why was your computer trasmitting highly illegal data to someone they caught. And courts are expensive, they will take all of your electronics and it's generally a really risky endeavor.

[-] Mikina@programming.dev 37 points 1 year ago* (last edited 1 year ago)

How common/usable is subway in bigger cities? Here in Prague we have an amazing public transport, even with priority lanes for buses at some places and most importantly a pretty decent subway. I've never had an issue getting anywhere around the city in a short time (I can get anywhere in the city within 1.5 hour max (that is including suburbs around Prague), around 30 mins to places around the center), and the cost of an unlimited year-long ticket is just 150EUR.

view more: ‹ prev next ›

Mikina

joined 2 years ago