今日推荐英文原文：《The Art of Discarding for Programmers》
今日推荐英文原文：《The Art of Discarding for Programmers》作者：Tanmay Deshpande
The Art of Discarding for ProgrammersRecently I came across a very interesting book: “The Art of Discarding: How to Get Rid of Clutter and Find Joy” by Nagisa Tatsumi.
This book talks about ways to discard things in your life that are of no use to you but that you have difficulty letting go.
The more I read about this topic, the more I felt this is true for software professionals too. Hence, I thought I’d write an article.
The book consists of three sections:
- Ten attitudes to help get rid of things
- Ten strategies for discarding
- Alternative ways of throwing
Don’t Keep It “For Now”Often, we have a dead code block that somebody wrote for some feature to be implemented someday. Or we have some job/task running that you know isn’t being used, but since you inherited it, you;re afraid to shut it down. For all such things, people end up saying, “Let’s keep it for now.”
The author suggests, if you haven’t used this code/job/task in some time, it’s better to discard it. It’ll probably not be useful in the future either.
Avoid Temporary Storage — Decide NowWhile designing systems, I’ve come across situations where people end up saying , “Let’s keep this data/table here temporarily, and we’ll change it later.” Or they say, “Let’s use this method for now, and we’ll change it later.”
Another way to look at this is when we ask people to discard something, they end up moving things to temporary storage. The author suggests if you plan to discard something, act now and don’t think of moving things to temporary storage.
Sometime Never ComesWhen asked to discard something, people tend to say, “This might be useful sometime.”
The author says most people don’t discard things, convincing themselves these things will be useful in the future. But most of the time, that time never comes. Hence if you find something not to be useful, discard it right away.
Nothing’s SacredIf you’re inheriting a giant piece of software code, there will always be some classes, scripts, and code blocks that are treated as sacred, and people fear if you make any changes to those, it’ll end up breaking things.
We need to understand that with time, certain functionalities and features get disabled, and it’s important to keep the code up to date by removing the dead code. This will help you keep your system lean and clean.
Don’t Worry About Getting Rid of Something UsefulThis is the biggest fear when discarding things. It’s always good to identify when something’s useful or not useful.
But there are times when you’ll be unsure if something is really being used. In such cases, it’s better to go step by step in discarding these types of things. For example, you might be running a job/task that, even after doing research about its usage, you don’t know if its being used. In such cases, instead of completely discarding the job/tasks, you can start with disabling the execution from the schedule.
This will help you identify if something is really being used, and if something breaks, you’ll be able to enable it quickly.
Don’t Aim for PerfectionIt takes time to master the art of discarding, so you shouldn’t try to aim for it on day one. You can start small. And keep practicing the pros and cons of doing or not doing something.
Eventually, you’ll be able to master the art.
Regular DiscardingIt shouldn’t be the case that you take up discarding as a yearly activity. You may want to do it frequently — maybe every quarter. This will help you strip unnecessary loads from your system.
These days we use the cloud for most software deployments, and we pay for what we use. Regular discarding may even help you reduce costs a bit.
Establish Discarding CriteriaIt shouldn’t be one individual who’s deciding what to discard. It might good to establish criteria — this helps to make the decision-making process easier.
- Is there any active consumer of the feature/functionality/job?
- Is there any noise after temporarily disabling the feature/functionality/job?
- Is there any cost reduction if we discard the feature/functionality/job?
- Is there any performance improvement if discard the feature/functionality/job?
- Does discarding some jobs help reduce stress on the operations team? Will they be able to put their focus on business-critical jobs/functionalities?
Don’t Think of It As WasteThe author keeps emphasizing this. We have certain things because we wanted them at some time.
Over a period of time, requirements, users, and demands change, which, in turn, make certain things not useful. Hence, they need to be discarded. If you keep this attitude, discarding will be much easier.
ConclusionIn summary, be it life or software, things get aged over a period of time, and, hence, it’s important to master the art of discarding to keep your life and system lean and clean.