• 0 Posts
  • 84 Comments
Joined 1 year ago
cake
Cake day: June 30th, 2023

help-circle

  • How to Win Friends and Influence People by Dale Carnegie should be required reading for everyone. It’s full of things that are so obvious in hindsight but go against our natural instincts so we blunder through attempts to persuade not realizing that we might be increasing resistance rather than decreasing it.

    Like the whole, “you might be right but you’re still an asshole” thing. Being correct just isn’t enough. In some cases you get crucified and then after some time has passed, the point you were trying to convince others of becomes the popular accepted fact. And they might even still hate you after coming around on the point you were trying to make.

    That book won’t turn you into a persuasive guru, but it will help avoid many of the pitfalls that make debates turn ugly or individuals stubborn.

    Or, on the flip side, you can use the inverse of the lessons to become a more effective troll and learn how to act like you’re arguing one thing while really trying to rile people up or convince them of the opposite. I say this not so much to suggest it but because knowing about this can make you less susceptible to it (and it’s already a part of the Russian troll farm MO).


  • Yeah, I was going to mention race conditions as soon as I saw the parent comment. Though I’d guess most cases where the debugger “fixes” the issue while print statements don’t are also race conditions, just the race isn’t tight enough that that extra IO time changes the result.

    Best way to be thorough with concurrency testing IMO involves using synchronization to deliberately check the results of each potential race going either way. Of course, this is an exponential problem if you really want to be thorough (like some races could be based on thread 1 getting one specific instruction in between two specific instructions in thread 2, or maybe a race involves more than 2 threads, which would make it exponentially grow the exponential problem).

    But a trick for print statement debugging race conditions is to keep your message short. Even better if you can just send a dword to some fast logger asynchronously (though be careful to not introduce more race conditions with this!).

    This is one of the reasons why concurrency is hard even for those who understand it well.



  • I wish more businesses would use Canada Post to deliver in Canada. They’ve got these great community mailboxes with larger ones for secure package delivery. They just drop the key to the big one in your smaller mailbox that works similarly to locked apartment complex mailboxes. It’s way better than worrying if someone will grab the box in front of my door or if the delivery guy will even drop it at the right door.





  • Putting all the eggs in the solar basket has risks, too. Like a large volcano eruption that reduces the amount of light that reaches the surface for a few years would be a double whammy, affecting food production as well as electricity production (which we’d need to rely on to try to offset the food losses). If we’re instead facing brownouts or full blackouts, that’s a recipe for a complete loss of stability. I suspect less solar energy reaching the surface would also reduce total wind energy (less localized heating would mean lower pressure differentials, but I could be missing other significant parts of this equation).

    I’d be most comfortable with a nice mix of energy sources combined with mothballing instead of decommissioning some capacity as renewables are able to take over more and more of the day to day energy needs so that we’re prepared to deal with an emergency like that.

    I’d also like to see more food production moved to vertical farms that can be powered by electricity rather than relying entirely on the sun and weather. But I do understand that the scale of food production would make doing that with a significant portion of the food supply very difficult. But with climate change (plus nutrient depletion of the soil), keeping so many eggs in the “just keep farming” basket also doesn’t seem like a great idea.


  • I wonder if people will soon realize that that rage they have for scalpers is just directed at the amateurs and that the upper class is full of people doing pretty much the same thing just in less obvious ways.

    Your employer (if you work for a private for-profit company) pays you x for your labour and then takes the proceeds of the labour and sells it for y where y is (generally) much higher than x. A business is profitable when the sum of all y is higher than the sum of all x.

    If it’s a non-profit, then the difference between y and x must be put back into the business in some way, which could be an investment into an expansion of its scope or it could be a raise for some or all of the workers (payroll is not profit, it’s an expense). And that could mean just the CEO gets a raise, because some of the leeching is via different pay levels for different people that isn’t based on just the difference they are directly making to the income.

    Public services can vary. If the service is profitable, then the profit goes into the budget of the government entity(s) that run it, as determined by legislature. So everyone is acting as the middleman there. If it’s not profitable, then it’s covered by taxes, at cost. There’s still varying salaries but it’s subject to government oversight, so things shouldn’t get as unbalanced as they would in the private sector, at least in theory. Though even in the public sector, there’s this assumption that promotions should come with big raises, regardless of how the workload changes, so you can still have people at the top making orders of magnitude more than people at the bottom.


  • Yeah, I wish C++ had function/scope epilogs and labeled loops/breaks, too. Those are the cases where the “never use goto” rule can be broken to make better code than adding all of the code that would be required to handle it the “right” way (setting up early exit flags and if statements after each level of nested loop to check the flag).


  • That’s the core of neo liberalism. Liberalism has a “my rights end where yours begin” component but neo liberalism drops that and expects the free market to solve such conflicts.

    And by “collective public elements”, I meant public organizations like the postal service, police departments, etc. The government itself is supposed to be one of those. Liberalism is neutral on what is and isn’t collectivized. Neo liberalism likes privatization but appreciates that some functions are better handled by the public, like law enforcement and road maintenance. Libertarianism believes it should all be private.

    In the last comment I said neo liberalism and libertarianism are pretty much the same, but it’s more accurate to say libertarianism is an extreme version of neo liberalism.



  • Buddahriffic@lemmy.worldtoLinux@lemmy.mlVLC Player
    link
    fedilink
    arrow-up
    11
    ·
    4 months ago

    I didn’t expect to click on a VLC appreciation thread agreeing that it’s awesome only to end up maybe switching to MPV based on the comments, but such is life I guess.

    I will remember it just like I will remember winamp, as one of the greats of its time.



  • They might mean neo libs.

    It’s fucking annoying when capitalists keep coming up with capitalist positions and naming them so that they sound like they are something else. Like neo liberalism or libertarianism, which are pretty close to the same thing (all about a deregulated, private, free market), only libertarians like to emphasize how they are ok with sex and drugs.

    Liberals want governments and collective public elements to protect the rights and freedoms of individuals (from other individuals, organizations, and governments).

    Neo liberals want governments and collective public elements to stay out of their affairs and let them manage their own interests.



  • I think part of it is going through all those sorting methods to show quick sort is the best so that a) students who run into new sorts are better equipped to determine it most likely isn’t better than quick sort and b) to show the process used to determine quick sort is better than the rest in case you have some other algorithm options you want to pick the best of.

    And yeah, depending on what you do, some tasks never involve any of that, or when they do, they get offloaded onto a library or something that gives the solution to that step directly.

    But, for example, if you have a collection, the question of array vs linked list vs tree is still relevant, even if you’re just choosing a provided construct that is built on top of one of those. Each has their strengths and weaknesses depending on how the data is added, removed, and accessed.

    And with how slow things are these days despite how much better the hardware is, I think there’s a lot of successful software engineers and programmers who should be using that stuff from school more than they are.


  • Also big O analysis IMO should just be the starting point of maximizing efficiency. Those coefficients that just get dropped can have a huge impact. For example, any algorithm written in JavaScript or visual basic will be of the same order as that same algorithm written in C/C++ or rust, but will likely perform much slower. And the exact manner of implementation could even result in the C version being slower than the VB one.

    And on the other hand, I wouldn’t call a lot of big O analysis very advanced math. You might get a tighter bound with advanced math on some algorithms, but you can get a rough estimate just by multiplying and adding loops together. The harder question would be something like “does this early exit optimization result in an O(x³) algorithm becoming an O(log(x)*x²)?”


  • He’s got a lot of charisma. And his videos frequently give that “people doing something they should have prepared more for but pushing through anyways” entertainment where you can laugh at how they put effort into creating an illusion of professionalism but left enough gaps to make it clear it was just an illusion and he’s in way over his head, but somehow still manages to keep it going.

    It’s a weird spot where I like the guy and want to see him succeed but also don’t think he deserves that success and want to see him fail.

    Though I don’t really spend much time watching hardware enthusiast videos in general, so I probably won’t see either of those unless it goes viral like his last shitshow did.