this post was submitted on 07 Dec 2023
81 points (90.1% liked)

Programming

16975 readers
1288 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 26 points 9 months ago (2 children)

My brain goblins love refactoring. I love taking a rusty pile of shit and making it shine. I want to polish something old, or build something completely new. Adding features to existing code is the part I hate.

[–] [email protected] 9 points 9 months ago (1 children)

Yesssssss. I just got done splitting up a 3000-line mess of React code into a handful of simple, reusable components. Better than sex.

[–] [email protected] 3 points 9 months ago

I’m a total noob but I learned how and refactored my python project I’m doing at work. It takes time but it is very rewarding to have clean code lol

[–] [email protected] 7 points 9 months ago* (last edited 9 months ago)

My brain goblin is a big fan of performance. Recently I reviewed a teammate's code. It was a small 100ish line PR and he calls the same function twice in a row with a tiny variation. My brain goblin went "you could consolidate these into one call", "since it's only one call you could inline it".

A couple hours later when he came to ask me what I'm smoking I realised my proposed solution had more LoC and was more complex to read. If we needed better performance, step 1 should've been to offload this task to an API that wasn't made with python. Not to mention the next thing this API does is string manipulation and then write to file.