• 0 Posts
  • 27 Comments
Joined 3 年前
cake
Cake day: 2023年7月2日

help-circle
  • Yeah, in my experience, it’s very hit or miss with frontend code architecture (I primarily work with React). And I am very particular about keeping code clean and maintainable, so that can be a challenge sometimes for sure. It’s not bad for smaller one-off tasks, but I still do a majority of my larger tasks by hand because I typically already know what I need and how to do it correctly.



  • When I was an intern, I was tasked with writing a file converter for 3D geometry files. There was an official cpp library to read the source files, so I was using that to read the data, restructure and transform it as needed, then write it to the output file format. Near the end, I was having a problem where I was SURE that my math was correct for the transform coordinates, but the resulting file would load in the viewer with all the correct looking pieces but all in the wrong locations. The senior guy there helped me debug it since I wasn’t super familiar with cpp at the time, and we found that the library I was using had overloaded the multiply (*) operator specifically for the objects I was using it on, and it was actually multiplying and saving the result directly to the first variable used in the multiplication. I assume it was done for memory efficiency or something, but I had no idea it would behave that way, so I was accidentally changing the values of variables I didn’t intend to.

    Example: I was doing something a = b * c, which caused the value of b to be changed (to b * c). Which screwed things up when I needed the original value of b later.








  • It’s not “solved.” Not trying to dive into yet another tabs vs. spaces argument. But this is just another example of how tabs can be pretty neat when they’re interpreted in a specific way. But it’s up to your editor, plugin, etc. to do so. Take the same text and throw it into an editor that doesn’t use this same interpretation, and it immediately falls apart.



  • Lol mine just about throws up when I take her 5 mins to the vet. Unfortunately for her, she has to do day-long road trips once or twice a year to visit family. But after she chills out, she’s quite an easy rider. Just very anxious at the beginning haha. I love her so much 😭