A Body of Code
Photo by Anastase Maragos on Unsplash

A Body of Code

Have you ever written some code and looked back on it years later to see that it remains as beautiful and perfect as you thought when you wrote it. No? Me neither.

Good code is like getting fit. It's not something you can attain and then give up. Well, you can, but I doubt you'll be pleased with the overall results! It's something you maintain. You don't go to the gym, work on your abs until they look good and never do a sit up ever again. A car is the same. Clean it, fill it with fuel and leave it parked for 3 years and it won't be in a good condition upon your return. It will simply rot. It needs to be used and maintained.

Most developers, at some point in their career, have been in the situation to have to choose between well structured code and getting it done fast! We all dream of that quiet time after the sprint where you can revisit and refactor the mess you submitted only hours ago as a proof of concept.

Refactoring is important, or should I say essential, but we are again seeing it as a fleeting thing you do to your code before the final commit. Set and forget. I think it has become this way as the chances of getting back to this code any time soon are minimal. There's a backlog of features to implement as long as your arm, right?

"Fewer clients, less money." - Jerry Maguire

Suddenly, the words of the great Jerry Maguire spring to mind. No, not "show me the money!" but "Fewer clients, less money". In my mind, this translates to "Fewer lines, less features". In order to maintain the whole body of code, we need less code to maintain. Code shouldn't be refactored once, but repeatedly. It needs to be maintained.

We're so busy measuring and evaluating the quality of the code we produce, when we should be gauging success by how often we revisit that code. Your code, your car and your body are all machines requiring maintenance.

Linards Liepins

Product Architect at Docupace Europe

4 年

Ironically, failure of producing refactorable code iencloses proportionally large portion of cases when development itself fails or creates a product, obselete the first day it is used.

回复
Bruno Reis

Senior Software Engineer

4 年

Incremental design and architecture are chemical reactions that will occur at that specific, merciless refactoring, condition of temperature and pressure.

回复

要查看或添加评论,请登录

David Roberts的更多文章

  • Recruitment is broken

    Recruitment is broken

    Does the traditional recruitment process find the best developers? I think not Do the best developers have the best…

    10 条评论
  • Which language/framework should I choose?

    Which language/framework should I choose?

    Choosing the right tech stack is hard, especially when you're starting out. How do you know the right one? What happens…

    2 条评论
  • Just calm down!

    Just calm down!

    Not the right thing to say, in any situation, but let's move on! Remaining calm during an interview is an easy thing to…

    3 条评论
  • You don't need a list of questions!

    You don't need a list of questions!

    Trying to remember a list of questions in order to make yourself stand out during an interview is a fool's errand. Why…

  • This is NOT remote work!

    This is NOT remote work!

    This is NOT remote work! I keep stumbling upon polls asking people following 2020 they prefer working from home, in the…

    3 条评论
  • Interview Rejection

    Interview Rejection

    You receive the rejection email. Now what? Get angry? Decide you didn't want the job in the first place? We've all been…

    9 条评论
  • Minimum Viable Product (MVP)

    Minimum Viable Product (MVP)

    By now, most developers are sick of the term. Widely misunderstood and miscommunicated (in the same way terms like…

    2 条评论
  • Push Notifications and Team Communication

    Push Notifications and Team Communication

    I recently published a poll on who is to blame when a project is late. I believe it is the responsibility of everyone…

  • Missed Interviews

    Missed Interviews

    A no show for an interview is frustrating. It's a complete waste of time but also it's discourteous.

    2 条评论
  • What I look for in a developer profile?

    What I look for in a developer profile?

    I must stress, this is my personal opinion. It is important to remember that I'm often looking for something very…

    15 条评论

社区洞察

其他会员也浏览了