Erick Arbe 2 minute read
January 3, 2014

Longevity in Web Development

Today I had the pleasure of looking at some code that I had written about three years ago. A client needed a site updated and I decided that the code also needed to be updated. It's not that the site didn't work just fine - but there was just so much cool stuff I was able to add to it that I didn't have (or know about) 3 years ago. I added some font icons, some fancy new CSS3 properties, and some new javascript for added functionality. I also had to refactor some of the PHP to make it a little cleaner and more efficient.

But all that updating had me wondering if there was a better way. Is there a better way to keep your code more maintainable and "future-proof"? My best guess would be that no - it's impossible to write code that is completely future-proof because new things will always be evolving. It's not to say that you can't write the absolute best program right now and it won't be useful at all in a few years. Because it totally should be. However there will definitely be something you can add or change within a few years. That's just the nature of the beast.

So from now on I suppose I'll try to write all my code as clean and as "future-proof" as I can make it - all while knowing that someday, I'll be back to clean it up a bit more. Or add something shiny and new.

Whoops, looks like something went wrong.

1/1 ErrorException in Filesystem.php line 81: file_put_contents(): Only 0 of 288 bytes written, possibly out of free disk space

  1. in Filesystem.php line 81
  2. at HandleExceptions->handleError('2', 'file_put_contents(): Only 0 of 288 bytes written, possibly out of free disk space', '/home/devbeta9/public_html/erickar.be/statamic/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', '81', array('path' => '/home/devbeta9/public_html/erickar.be/local/storage/framework/sessions/f3a8d34cb2345721b16eea40885341a46d2b03eb', 'contents' => 'a:4:{s:6:"_token";s:40:"9DCIl21ZJ8qJXIvQXU3OgYd15nCL2QWE9w73OPSL";s:9:"_previous";a:1:{s:3:"url";s:51:"http://erickar.be/blog/longevity-in-web-development";}s:9:"_sf2_meta";a:3:{s:1:"u";i:1516107687;s:1:"c";i:1516107687;s:1:"l";s:1:"0";}s:5:"flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}', 'lock' => true))
  3. at file_put_contents('/home/devbeta9/public_html/erickar.be/local/storage/framework/sessions/f3a8d34cb2345721b16eea40885341a46d2b03eb', 'a:4:{s:6:"_token";s:40:"9DCIl21ZJ8qJXIvQXU3OgYd15nCL2QWE9w73OPSL";s:9:"_previous";a:1:{s:3:"url";s:51:"http://erickar.be/blog/longevity-in-web-development";}s:9:"_sf2_meta";a:3:{s:1:"u";i:1516107687;s:1:"c";i:1516107687;s:1:"l";s:1:"0";}s:5:"flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}', '2') in Filesystem.php line 81
  4. at Filesystem->put('/home/devbeta9/public_html/erickar.be/local/storage/framework/sessions/f3a8d34cb2345721b16eea40885341a46d2b03eb', 'a:4:{s:6:"_token";s:40:"9DCIl21ZJ8qJXIvQXU3OgYd15nCL2QWE9w73OPSL";s:9:"_previous";a:1:{s:3:"url";s:51:"http://erickar.be/blog/longevity-in-web-development";}s:9:"_sf2_meta";a:3:{s:1:"u";i:1516107687;s:1:"c";i:1516107687;s:1:"l";s:1:"0";}s:5:"flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}', true) in FileSessionHandler.php line 83
  5. at FileSessionHandler->write('f3a8d34cb2345721b16eea40885341a46d2b03eb', 'a:4:{s:6:"_token";s:40:"9DCIl21ZJ8qJXIvQXU3OgYd15nCL2QWE9w73OPSL";s:9:"_previous";a:1:{s:3:"url";s:51:"http://erickar.be/blog/longevity-in-web-development";}s:9:"_sf2_meta";a:3:{s:1:"u";i:1516107687;s:1:"c";i:1516107687;s:1:"l";s:1:"0";}s:5:"flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}') in Store.php line 262
  6. at Store->save() in StartSession.php line 88
  7. at StartSession->terminate(object(Request), object(Response)) in Kernel.php line 145
  8. at Kernel->terminate(object(Request), object(Response)) in index.php line 160