• 2 Posts
  • 799 Comments
Joined 3 years ago
cake
Cake day: September 24th, 2023

help-circle



  • ORMs are a pain and so is hand rolling SQL queries and doing the mapping manually.

    I definitely think there’s scope for NoSQL databases where the database “shape” matches the normal struct style of programming languages. Kind of like how JSON does and XML doesn’t.

    But it seems like all we got was MongoDB and Firebase which are both shit.

    Are there any good NoSQL databases? MongoDB and Firebase don’t even have schemas.



  • I always like "by example"s for learning languages - here’s Rust’s.

    I’d probably make a project with it. Maybe a CLI tool using clap_derive and some crate that does something neat that you want to do. Depends what you’re interested in I guess.

    I wouldn’t recommend trying to do leetcode problems with Rust because they are obsessed with linked lists and linked lists are awkward in Rust.

    Also I wouldn’t recommend making a game or GUI app with Rust yet since the ecosystems there are immature.

    A microcontroller project using Embassy is probably a fun way to learn too but I haven’t actually tried it yet.








  • modern C++ facilities do make a difference to prevalence of bugs.

    This is true, but just saying “write modern C++!” doesn’t actually work in practice. First, there are a ton of footguns that even best-practice C++ doesn’t avoid. Using std::shared_ptr? Great, you’re probably going to avoid memory leaks. Null pointer dereference? Not so much. What’s the modern C++ way to avoid integer overflow?

    Second, it’s pretty much impossible to completely avoid raw pointers etc. even if you’re trying, and good luck getting your colleagues to actually try. I can’t even get mine to write proper commit messages. You need a machine forcing them to do it properly. Something they can’t opt out of (or at least where opting out isn’t the easy lazy option).

    So yeah it’s better to use modern C++ and it is an improvement, but not enough the change the conclusion that you should just use Rust instead.