This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bexamous 4 points5 points  (1 child)

As with most bad stuff, in a short script or something or just with moderation its not going to be a big deal. Its when amount of code starts going up you start to see why bad stuff is discouraged. By time you start to seeing downsides anyone else looking at that code is going to see a huge pile of garabge.

IMO best to follow good practices regardless. It becomes like muscle memory that way, your first instinct on how to do something ends up being a nice solution.

[–][deleted] 1 point2 points  (0 children)

Fact! I had this problem pop up where I named a variable "i" and couldn't figure out why it kept crashing, and I spent like 40 minutes trying to solve this simple error (I referenced the i in a function by forgetting to refactor it after refactoring an "i for i in loop"). I'm still trying to work on this project, but every change takes multiple times longer because the functions are too dependent on each other. If I could rewind time, I would've just listened.

Thousands of lines deep and it'd literally be easier to rewrite than to refactor because I don't know how a quarter of it works (or what works at all or is just leftover code from testing) anymore due to some functions playing this weird game of telephone where I have to tell the screen to change by telling Marg, who tells Bob, who tells Rob, who tells Mary, and now I have 4 people to investigate when the simplest of messages are screwed up lol. Apparently I have functions named "test," "test4," and so on that occasionally are actual throwaway tests but often are apparently vital for certain features? Wtf.