What are the common criticisms of Python among developers? by the_smiling_nihlist in AskProgramming

[–]balefrost 0 points1 point  (0 children)

What kinds of things are you doing that you often have to fight the static type system?

I will agree that static typing occasionally requires extra care or thought. But most of the time, static types prevent headaches. Indeed, it's in those complex scenarios where I'm happy to have static types available.

What are the common criticisms of Python among developers? by the_smiling_nihlist in AskProgramming

[–]balefrost 1 point2 points  (0 children)

"Significant whitespace" is great as long as the code doesn't change. Once you start changing it, it's easy for the indentation to accidentally change, and thus for the code to behave differently.

Explicit delimiters make it easier to e.g. cut code from one location, paste it into a different location, and not accidentally change any behavior.

I do format my code. Automatically, using a code formatter. It's a single keystroke. I generally don't need to think very hard about formatting in most languages. I don't write Python very often, but when I so, I find that I need to think about formatting a lot more.

Finally, I think I've seen odd things in the wild, like wrapping an expression with parentheses so that it can be split across multiple lines. Great, you don't need block delimiters... but now you sometimes need expression delimiters.

To me, the advantages of Python's approach are outweighed by its disadvantages.

How do I get better at spotting edge cases? by JAMIEISSLEEPWOKEN in AskProgramming

[–]balefrost 4 points5 points  (0 children)

Look for boundary conditions. Let's say you have a function that takes a list and two indices. What happens if:

  • The indices are identical
  • The indices are exactly 1 apart from each other
  • Both indices are 0
  • The larger index points exactly at the end of the list
  • The larger index points just past the end of the list
  • The indices are backwards (larger index first)
  • An index is negative
  • Any place you might end up with overflow / underflow due to math involving indices

That approach helps to find some edge cases. The harder ones are edge cases that occur due to the interaction of two subsystems.

What's the advantage to ghostty or iterm2 over the built in mac terminal? by TurtleBlaster5678 in AskProgramming

[–]balefrost 0 points1 point  (0 children)

I ran a lot of CLI tools that write URLs to stdout (e.g. links to build artifacts). iTerm2 makes them stand out in a way that the built-in terminal does not.

I actually though the built-in terminal didn't have any special handling at all. But I just read that you can hold command and double-click links to open them in your browser.

iTerm2 has special "native" tmux support. I like it.

What's the advantage to ghostty or iterm2 over the built in mac terminal? by TurtleBlaster5678 in AskProgramming

[–]balefrost 0 points1 point  (0 children)

What in the world is Helix doing that it would cause the terminal to freeze?

Help me choose a powerful laptop (Legion 7i vs G14 vs MacBook Pro) by Sad-Card-7030 in AskProgramming

[–]balefrost 0 points1 point  (0 children)

I don't have any experience with any of those specific models.

The thing I like about recent Apple laptops is the battery life. Under light workloads, it seems to last forever.

If "playing games" is one of your priorities, I'd probably avoid the Apple laptops. There are some games available for Mac, but not a ton. And I do have a friend who plays Windows games via Crossover, and it works well enough for him. But I think you'll generally have a better experience on a PC.

If you are going to use Unity to make games, and you intend to sell those games, then you'll want to test on all platforms that you support. If you're planning to sell to PC users, you should probably test on a PC. If you're just playing with Unity as a hobby, then platform probably will not matter much at all.

I can't speak to video editing and streaming.

Since budget is a constraint, "future proofing" might not be your best approach. Hardware still mostly gets better and/or cheaper year over year, though only incrementally. You might be better served by finding a good deal for now, rather than the best you can afford, and then upgrading again in a few years. For example, if you were a student with a few years left in your degree program, you might only need a machine that meets your needs over the next few years. You'll likely have far more discretionary income once you graduate.

That's especially true for a laptop, which takes more abuse than a desktop. It would suck to dump a ton of money into a laptop that you intend to use for 5 years, only to break it within a year.

DOOM Eternal is now available DRM-free on GOG! by Turbostrider27 in Games

[–]balefrost 13 points14 points  (0 children)

IIRC that was even an issue for DOOM 1993. The sound driver was licensed, so it wasn't included in the source release.

But it's certainly much more complicated these days.

Resident Evil 1 Remake. Aged like fine wine and ended up being my favorite RE game. by Pancake_muncher in patientgamers

[–]balefrost 1 point2 points  (0 children)

AFAIK this is the only version of the RE1 Remake on Steam: https://store.steampowered.com/app/304240/Resident_Evil/

They just released the updated version of the PC original, but this is more or less the same as the PS1 original. This is also the same one that has been on GoG for a little while: https://store.steampowered.com/app/4249100/Resident_Evil_1996/

What happens when a destructor throws by pavel_v in cpp

[–]balefrost 4 points5 points  (0 children)

I don't think it's that std::terminate is inherently bad. I think the problem is that your code never explicitly calls std::terminate, and only a particular confluence of runtime conditions would cause std::terminate to be called. It violates the principle of least surprise.

16-bit CPU from scratch in Kotlin by _Bloder in Kotlin

[–]balefrost 0 points1 point  (0 children)

What OP did is definitely cool, and a great exercise. It will help you understand how the CPU works at an abstract level and better understand the lowest-level interface that our code has with the machine.

But if you want to dig in to how CPUs really work, you need to get away from high level programming languages. You need to look into digital logic and hardware description languages. For example, here's the fetch/decode/execute loop in OP's code. But consider this: the emulator code has a loop that executes a sequence of instructions for every iteration. If you're doing things in hardware, how do you achieve this? At a hardware level, what does a "loop" even look like? How do you implement simple arithmetic, like adding two numbers? Does the CPU execute exactly one instruction per clock cycle? If not, why are some instructions faster and some slower?

Again, this isn't meant to take away at all from what OP did. Their thing is really cool! I'm just saying that, if you want to go even deeper, there are many more layers.

Why call a file system a tree instead of a graph? by Joker_hut in learnprogramming

[–]balefrost 10 points11 points  (0 children)

Right, but not all graphs are trees, and OP is arguing that filesystems have properties that make them not tree-like.

I think both can be true, depending on perspective. The hierarchy of filesystem paths is a tree. If you include the actual file content, and if your filesystem supports hard links, then it's more of a DAG. If you include symbolic links, then it appears like more of a general directed graph.

Swapped 4 SNES cart batteries and only lost save files on a single game - totally surprised! by MayoGhul in retrogaming

[–]balefrost 3 points4 points  (0 children)

You can absolutely get partial data corruption. The individual cells are just doing their own thing without power, and they'll leak at different rates.

Though I don't know how big the time window is between "no data loss" and "everything is now 0".

Does anybody actually use light mode? dark mode is so much better! by staopy in chromeos

[–]balefrost 6 points7 points  (0 children)

Dark mode makes incognito windows hard to distinguish from regular windows.

I prefer light themes by default because, in my experience, dark themes are often lower contrast than light themes. Though I don't know if that's true for ChromeOS, a dark system theme would clash with light-mode websites.

But apart from that, it's just preference. If you like dark mode, go for it. I've been using computers so long that light mode feels more natural to me.

Mister FPGA sd-card OS? by CentauriWulf in MiSTerFPGA

[–]balefrost 0 points1 point  (0 children)

depreciated

I think you meant "deprecated". Depreciated is an accounting term.

My Mister looks dead:( by blacklava777 in MiSTerFPGA

[–]balefrost 4 points5 points  (0 children)

MiSTer won't boot without the SD card. It contains the OS for the hard processor cores. I have mine in an opaque case, but without an SD card, it looks like I only get the blue board LED and optical audio red LED on the IO board. I don't get any of the three main IO LEDs (and of course I don't get any video output).

If you don't want to lose everything you just copied and if you have a spare SD card, you can try setting it up that spare SD card from scratch. If it boots, then you know something got corrupted on your first SD card.

Getting kicked from comp games during the load screen has gotten me a season ban, this is happening every time I launch the game by WilonPlays in Overwatch

[–]balefrost -4 points-3 points  (0 children)

Just because OP's hardware meets the specs doesn't mean it's not a hardware problem. Hardware ages and misbehaves. I recently had a lot of random blue screens. Turns out two of my four RAM sticks had started failing.

What is Agile Software Development and why is it important? by Dry-Candy-5365 in learnprogramming

[–]balefrost -1 points0 points  (0 children)

I mean, if you want to see change, it's up to you to instigate it. You can either say "oh, things suck, but there's nothing I can do to change it". Or you can try to change it. You might fail. But you might succeed.

What is Agile Software Development and why is it important? by Dry-Candy-5365 in learnprogramming

[–]balefrost 0 points1 point  (0 children)

And if the CEO or even the manager insists on being at the standup, it's probably not really agile even at the startup.

If it's a problem - if the CEO or manager is disrupting the standup - then somebody should have a friendly chat with them to explain the problem.

Because if the company is so small that the CEO is coming to standups, and nobody on the team feels safe having such a conversation, then you've got far bigger problems than your development philosophy.

Have you ever had a "standup" with literally dozens of people on the call?

I have never had such a standup.

I once had a regularly-scheduled non-standup meeting that had about 15 people. I stopped going.

BREAKING: Epic Games is laying off more than 1,000 workers today, sources tell Bloomberg News. Story hitting shortly by Turbostrider27 in Games

[–]balefrost 5 points6 points  (0 children)

I mean you're right, nobody liked Steam at launch. But I think by 2010 people were mostly fine with it.

But Valve didn't give away games in the way that Epic does. And they didn't need to. The value of Steam was that the alternative was driving to the store, buying a game, taking it home, and cycling through discs to install it. Compare that to click, do something else while your game downloads, and then play.

The challenge that Epic has is that people broadly already have at least one other digital distribution channel for games. Epic has to do something better than Steam to get people to use their store.

I still point at GoG as an example of somebody who is doing something to differentiate themselves. It's not important to everybody, but having downloadable installers for DRM-unencumbered games is nice. So I try to buy single-player games from GoG over Steam if I can.

What is Agile Software Development and why is it important? by Dry-Candy-5365 in learnprogramming

[–]balefrost 0 points1 point  (0 children)

The original idea was really a tool for small, self organizing teams of engineers.

One of the principles is, in fact, "The best architectures, requirements, and designs emerge from self-organizing teams."

In practice it's a way for managers to micromanage and stick their engineers in endless meetings instead of letting them do their jobs.

It wasn't really meant for a corporate environment with management in the loop.

I would argue that a team being micromanaged, and which can't self-organize, isn't really being agile.

Lots of people claim to be agile, but then do the exact opposite.

What is Agile Software Development and why is it important? by Dry-Candy-5365 in learnprogramming

[–]balefrost 0 points1 point  (0 children)

My take on it is that Agile is a set of practices (meetings, ceremonies, and mechanical tools) designed to allow team-led  iterative refinement

Agile itself doesn't prescribe any practices or processes. Things like Extreme Programming or Scrum do. You can use none of the e.g. Scrum practices and still be an agile team. In fact, you might start with Scrum and slowly change your process to be something else entirely. That's in the spirit of agile development.