What do you see when you look at your code? What are the occasions that you open up the files and read through them? What are you trying to get done? at what pace? with what sensibilities?
Many common ailments that chronically strike programmers stem from code image problems. Simply put, our image of what our code is differs, often dramatically, from what it is, what it does, how it runs, what other programmers see when they read/use it.
People are generally the worst judges of themselves. This extends to the code we write.
How many times have thoughts of style, architecture, bugs, etc… flooded your mind the moment that you send someone else a link to look at what you’ve written? How many pre-qualifications have you sent out like calvary leading your code into an epic battle of judgement that is sure to come? How are the feelz that manifest from the chemicals that are released into you system? Bad?
If your answers to these == true, then you have a problem. Each of these are symptoms of a code image problem, which is probably holding you back and generally making you miserable in other ways too.
There are sleek, efficient, popular libraries out there that make anything I’ve written look like a pile of dog shit. At lest they do if I spend a lot of time reading, rereading and analyzing them. When, on the other hand, I recognize that what I’ve done is crap but then circle back to stare at, smell and taste the crap, I realize that it’s not crap after all. It’s actually clay.
The reason your code looks like crap to you is that you’re too close to it. You can’t see it. Then you look over and see this sparkly thing that does something better. Your own image of your code ceases to be related to what it is and becomes a representation of a lack of what it’s not: that other stupid fresh ultra library.
But what, exactly, is so good about that other code that has the power to cancel the very essence of what you’ve done and replace it with hollow emptiness? This is the question you should keep at the forefront of your mind. It needs to be a knee-jerk reaction to the ulcerous feelings of inadequacy that ooze from your clamped shut eyelids when you walk through your files.
Once you’ve found why you react so strongly to some code, grab that and hold on to it. Is it something that’s relevant to your work? Implement the fuck out of it. Is it a trick of syntax that is slick and clean? Start employing it. Is it a style du jour that exemplifies another amazing step in the constantly progressing culture of coding? If so, crank your smile up one more notch (or further flatten your poker face, or deepen whatever comportment you sport) and carry on.
The important part is that you close the other code and start spending time with your own. Failure to do this leads to fetishization. It becomes enough to wield statement about mythological coders and idealized techniques and your capacity to create fades. Yes… I love this style. It is.. beautiful. Your eyes grow and grow as your flesh decays and rots. It’s a trap, a tragic fate.
Love your code for it is part of you. Dwell on it as you would reflect on your own actions. Read through it for it’s own sake without being driven by drums to refactor or add features. Spend time. Have ideas and that arise from purposeless moments and honor them through implementation. Find where you can employ the real things you love about other code in your own. Reap the benefits of mental health and wholeness of self. Prophet.