• 1 Post
  • 11 Comments
Joined 1 year ago
cake
Cake day: July 10th, 2023

help-circle

  • Probably unpopular opinion, but peer reviews are overrated. If coders are good AND know the project, the only thing you can do in a PR is nitpicking. They are more useful for open source collaborators because you want to double-check their code fits with the current architecture. But people here are reacting as if peer reviews could actually spot bugs that tests can't catch. That happens rarely unless the contributor is junion/not good.


  • Lol I feel so old reading these replies... I learnt copying BASIC games from magazines and typing them manually on the computer.

    But jokes apart, when it comes to learning, I think the best thing is to tinker with weather language you choose and don't worry about making the "right choices" since the start. Forget about writing "pythonic" code and don't worry about being "idiomatic": just build something. Building good software is not just constructs, but also knowning which subsystem to improve and when. That's what makes experience.

    When it comes to improving, you can dig deep into the language.



  • Sometimes I wonder if this pure search for being "idiomatic" is worth the effort. On paper yes, more idiomatic code is almost always a good thing, it feels more natural to create code in a way the language was designed to be used. But it practice, you don't get any points for being more idiomatic and your code isn't necessarily going to be safer either (smart pointers are often "good enough"). I'm fine using references to pass parameters to function and I love the idea to "force" the programmer to organize objects in a tree way (funny enough I was already doing that in C++), but I'll take a Rc rather than a lifetimed reference as a field in a structure any day. That shit becomes unreadable fast!

    EDIT: but I love cargo clippy! It tells me what to change to get more idiomatic points. Who knows why an if/then/else is better than a match for two values, but clippy says so, and who am I to question the idiomatic gods?


  • "intuitive" is extremely subjective, and based on your past experiences. I've coded in C++ for years, and some Python, too and was able to grasp many Rust concepts very quickly, while for others I struggled (and still am). I'd say that if you are looking for "intuitive", Rust ain't it. It's a system language, so it requires planning, it's definitely not the ideal language to slap a prototype quickly together, expecially as a beginner.



  • My understanding is that this is possible: you should be able to take a C project, add a build.zig file and under the hood the system is calling clang to compile the C project. HOWEVER, you can now add a .zig source file, compile that in zig and link together with the output of the C compiler into an executable. If this is actually true, I can definitely see the attractiveness of the language.



  • I'm going to be the devil advocate here (so please, don't take anything I write personally) but sometimes I wonder if people live in the real world or the Little Pony one. Your expectations on how the real companies work are imho completely off the mark. Now, I'm sure that ethics is not dead and you might find something that has the checks in the right spots, but ultimately the IT world is a shark tank where you either are hunting or are the prey. At BEST the work you do is to steal business from your company 's competitor to affirm itself in the market (thus causing the other company to potentially go out of business and layoff employees). At worst, you actively damaging some group of people somewhere. Hell, even the fact we keep datacenters close to deserts, increasing the amount of air conditioning needed so that we can share memes quicker is unethical, and yet here we are. So, on one hand I say "what were you thinking!". On the other, I want to say that I admire you for your search. I hope you can find solace somewhere. Personally, I'm content with not causing direct damage to anyone (AFAIK, at least...)