<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Baptiste Le Bail</title>
    <description>The latest articles on DEV Community by Baptiste Le Bail (@baptistelebail).</description>
    <link>https://dev.to/baptistelebail</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F577129%2F012c0ea2-7da9-4087-9163-4f902072643e.jpeg</url>
      <title>DEV Community: Baptiste Le Bail</title>
      <link>https://dev.to/baptistelebail</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/baptistelebail"/>
    <language>en</language>
    <item>
      <title>Our code is at its best when it is not ours anymore</title>
      <dc:creator>Baptiste Le Bail</dc:creator>
      <pubDate>Thu, 01 Jul 2021 13:00:39 +0000</pubDate>
      <link>https://dev.to/baptistelebail/our-code-is-at-its-best-when-it-is-not-ours-anymore-16i3</link>
      <guid>https://dev.to/baptistelebail/our-code-is-at-its-best-when-it-is-not-ours-anymore-16i3</guid>
      <description>&lt;p&gt;I want to work with code that belongs to no-one.&lt;/p&gt;

&lt;p&gt;We are, as software engineers, participating to the whole IT ecosystem, even if we are neither precursors nor working on cutting-edge technologies. &lt;br&gt;
The vast majority of us do not work at GAFAMs or any shiny new startup. &lt;br&gt;
That being said, I think we should always consider ourselves, at all times, as &lt;a href="http://manifesto.softwarecraftsmanship.org/"&gt;craftsmens&lt;/a&gt; and aim at the best version possible of our code.&lt;/p&gt;

&lt;p&gt;To me, this best version can only be achieved when our code is simply not "ours" anymore.&lt;/p&gt;

&lt;p&gt;"our code" is the code we produce that will be used in any way possible, even if it's only used by ourselves.&lt;/p&gt;

&lt;p&gt;But what do I mean by "not ours anymore" ?&lt;/p&gt;

&lt;p&gt;There is code because there is a project, whether it is personal, open source, for a private company, or whatever.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I share the strong belief that the main goal of the vast majority of projects in this industry should be to remain easily maintainable. &lt;br&gt;
Otherwise, these projects will inevitably become unsustainable, either technically and/or financially.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In a nutshell:&lt;/p&gt;

&lt;h4&gt;
  
  
  Is the code easily read and understood ?
&lt;/h4&gt;

&lt;p&gt;No ? It's still ours then.&lt;br&gt;
We could think of a simpler, clearer component architecture, and better variables/methods names.&lt;/p&gt;

&lt;h4&gt;
  
  
  Is the code style homogeneous ?
&lt;/h4&gt;

&lt;p&gt;No ? It's still ours then.&lt;br&gt;
We could set up a code convention and even enforce it with static analysis tools.&lt;/p&gt;

&lt;h4&gt;
  
  
  Does the code have tests ?
&lt;/h4&gt;

&lt;p&gt;No ? It's still ours then.&lt;br&gt;
We could add &lt;a href="https://www.softwaretestinghelp.com/the-difference-between-unit-integration-and-functional-testing/"&gt;tests&lt;/a&gt; to get a fair bit of coverage and prevent unavoidable regressions, in addition to showing how the code runs the way it's supposed to.&lt;/p&gt;

&lt;h4&gt;
  
  
  Does the code produce a good feedback ?
&lt;/h4&gt;

&lt;p&gt;No ? It's still ours then.&lt;br&gt;
We could add comprehensive logs and error messages. &lt;/p&gt;

&lt;h4&gt;
  
  
  Is the code documented ?
&lt;/h4&gt;

&lt;p&gt;No ? It's still ours then.&lt;br&gt;
We could write a clear README, a component diagram or a full blown documentation.&lt;/p&gt;

&lt;h4&gt;
  
  
  Is our current brain required when it comes to maintain a specific part of the code ?
&lt;/h4&gt;

&lt;p&gt;Yes ? It's still ours then. &lt;br&gt;
Probably because one or several of the above issues remain.&lt;br&gt;
I used &lt;em&gt;current brain&lt;/em&gt; here, because our future brains are no different than other team members wishing to interact with maintainable code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The reality of projects make things a little less binary than that, obviously, a project's life is full of compromises.&lt;br&gt;
But if we want its life not to end prematurely, we should strive for this maintainability.&lt;/p&gt;

&lt;p&gt;Which is the responsibility of the project itself by the way. &lt;br&gt;
Not only us, writing our code. Never only us. &lt;br&gt;
But all other collaborators as well.&lt;br&gt;
I think every collaborator should be seen as temporary (the reasons for their unavailability are actually multiple and not that important when it comes to the project's code). &lt;/p&gt;

&lt;p&gt;Our code should belong to the project. &lt;br&gt;
If we want it to be maintainable and qualitative, we need to let it go.&lt;/p&gt;

&lt;p&gt;That way, we will reduce the waste of any resources, which is often money but also our sanity and the most valuable resource in our world: time.&lt;/p&gt;

&lt;p&gt;I want to work with code that belongs to no-one.&lt;/p&gt;

</description>
      <category>codequality</category>
      <category>qa</category>
      <category>craftsmanship</category>
    </item>
  </channel>
</rss>
