http://localhost:8820/CodekvastThe Truly Dead Code Detector2021-04-16T13:04:30.466+02:00Olle Hallinolle.hallin@hit.sehttp://localhost:8820/favicon.icohttp://localhost:8820/img/logo-codekvast-400x217.pnghttp://localhost:8820/news/2021-04-16-codekvast-agent-1.4.1-released.htmlCodekvast Agent 1.4.1 released2021-04-16T00:00:00.000+02:00Codekvast Team<p>Codekvast Agent version 1.4.1 has been released.</p>
<p>Download <a href="https://downloads.codekvast.io/codekvast-agent-1.4.1.zip">codekvast-agent-1.4.1.zip</a> from <a href="https://downloads.codekvast.io">Codekvast Downloads</a>.</p>
<p>News in this version:</p>
<ul>
<li>The default write timeout is now 30 seconds, as is described in the documentation. (It was 3 seconds in the code.)</li>
<li>aspectjweaver is upgraded 1.9.6</li>
</ul>
http://localhost:8820/news/2020-09-23-codekvast-agent-1.4.0-released.htmlCodekvast Agent 1.4.0 released2020-09-23T00:00:00.000+02:00Codekvast Team<p>Codekvast Agent version 1.4.0 has been released.</p>
<p>Download <a href="https://downloads.codekvast.io/codekvast-agent-1.4.0.zip">codekvast-agent-1.4.0.zip</a> from <a href="https://downloads.codekvast.io">Codekvast Downloads</a>.</p>
<p>The agent jar (including sources) is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/1.4.0">jcenter</a> with the Maven coordinates <code>io.codekvast:codekvast-agent:1.4.0</code>.</p>
<p>News in this version:</p>
<ul>
<li>codekvast-agent now excludes classes annotated with @org.aspectj.lang.annotation.Aspect.</li>
</ul>
<p>This solves a problem with Spring AOP-managed @Aspect-style aspects not kicking in.</p>
http://localhost:8820/news/2019-12-03-codekvast-agent-1.3.2-released.htmlCodekvast Agent 1.3.2 released2019-12-03T00:00:00.000+01:00Codekvast Team<p>Codekvast Agent version 1.3.2 has been released.</p>
<p>Download <a href="https://downloads.codekvast.io/codekvast-agent-1.3.2.zip">codekvast-agent-1.3.2.zip</a> from <a href="https://downloads.codekvast.io">Codekvast Downloads</a>.</p>
<p>The agent jar (including sources) is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/1.3.2">jcenter</a> with the Maven coordinates <code>io.codekvast:codekvast-agent:1.3.2</code>.</p>
<p>News in this version:</p>
<ul>
<li>codekvast-agent never logs on SEVERE (ERROR) level.</li>
</ul>
<p>See also <a href="/pages/getting-started.html">Getting Started</a>.</p>
http://localhost:8820/news/2019-11-27-codekvast-agent-1.3.1-released.htmlCodekvast Agent 1.3.1 released2019-11-27T00:00:00.000+01:00Codekvast Team<p>Codekvast Agent version 1.3.1 has been released.</p>
<p>Download <a href="https://downloads.codekvast.io/codekvast-agent-1.3.1.zip">codekvast-agent-1.3.1.zip</a> from <a href="https://downloads.codekvast.io">Codekvast Downloads</a>.</p>
<p>The agent jar (including sources) is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/1.3.1">jcenter</a> with the Maven coordinates <code>io.codekvast:codekvast-agent:1.3.1</code>.</p>
<p>News in this version:</p>
<ul>
<li>codekvast-agent now simply refuses to start if missing any mandatory config parameter and <code>-Dcodekvast.enabled=true</code>.</li>
</ul>
<p>Previously, it threw an exception.</p>
<p>Now it just logs "Codekvast is disabled" and then lets the app loading proceed without aspect weaving.</p>
<p>This makes it even simpler to modify the start script and add <code>-javaagent:codekvast-agent.jar -Dcodekvast.enabled=true</code><br />
without having to wait for mandatory config to be in place.</p>
<p>Mandatory config:</p>
<ul>
<li><code>codekvast.appName</code></li>
<li><code>codekvast.codeBase</code></li>
<li><code>codekvast.packages</code></li>
</ul>
<p>See also <a href="/pages/getting-started.html">Getting Started</a>.</p>
http://localhost:8820/news/2019-11-26-codekvast-agent-1.3-released.htmlCodekvast Agent 1.3 released2019-11-26T00:00:00.000+01:00Codekvast Team<p>Codekvast Agent version 1.3 has been released.</p>
<p>Download <a href="https://downloads.codekvast.io/codekvast-agent-1.3.zip">codekvast-agent-1.3.zip</a> from <a href="https://downloads.codekvast.io">Codekvast Downloads</a>.</p>
<p>The agent jar (including sources) is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/1.3">jcenter</a> with the Maven coordinates <code>io.codekvast:codekvast-agent:1.3</code>.</p>
<p>News in this version:</p>
<ul>
<li>Setting the environment <code>CODEKVAST_ENABLED=false</code> or the Java system property <code>-Dcodekvast.enabled=false</code><br />
disables checking of mandatory parameters in codekvast.conf.</li>
</ul>
<p>This makes it possible to modify the start script and add <code>-javaagent:codekvast-agent.jar</code> without having all<br />
mandatory config in place.</p>
<p>See also <a href="/pages/getting-started.html">Getting Started</a>.</p>
http://localhost:8820/news/2019-11-20-codekvast-agent-1.2-released.htmlCodekvast Agent 1.2 released2019-11-20T00:00:00.000+01:00Codekvast Team<p>Codekvast Agent version 1.2 has been released.</p>
<p>Download <a href="https://downloads.codekvast.io/codekvast-agent-1.2.zip">codekvast-agent-1.2.zip</a> from <a href="https://downloads.codekvast.io">Codekvast Downloads</a>.</p>
<p>The agent jar (including sources) is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/1.2">jcenter</a> with the Maven coordinates <code>io.codekvast:codekvast-agent:1.2</code>.</p>
<p>News in this version:</p>
<ul>
<li>Now supports overriding Java agent configuration with Java system properties.</li>
</ul>
<p>Example: the field <code>appVersion</code> in <code>codekvast.conf</code> can now be overridden by means of the command line<br />
argument <code>-Dcodekvast.appVersion=xxx</code>.</p>
<p>Previously, it could be overriden by means of the environment variable <code>$CODEKVAST_APP_VERSION</code>.</p>
<p>See also <a href="/pages/getting-started.html">Getting Started</a>.</p>
http://localhost:8820/news/2019-10-16-codekvast-agent-1.1-released.htmlCodekvast Agent 1.1 released2019-10-16T00:00:00.000+02:00Codekvast Team<p>Codekvast Agent version 1.1 has been released.</p>
<p>Download <a href="https://downloads.codekvast.io/codekvast-agent-1.1.zip">codekvast-agent-1.1.zip</a> from <a href="https://downloads.codekvast.io">Codekvast Downloads</a>.</p>
<p>The agent jar (including sources) is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/1.1">jcenter</a> with the Maven coordinates <code>io.codekvast:codekvast-agent:1.1</code>.</p>
<p>News in this version:</p>
<ul>
<li>Now also uploads the location of methods. The location is either the basename of the jar<br />
that contains the class or the directory that contains the class.</li>
<li>Dropped support for JVM 7.</li>
<li>Added support for JVM 12 and 13.</li>
</ul>
<p>Read all the details in the <a href="https://downloads.codekvast.io/RELEASE-NOTES.html">RELEASE-NOTES</a></p>
http://localhost:8820/news/2019-02-21-codekvast-agent-1.0.0-released.htmlCodekvast Agent 1.0.0 released2019-02-21T00:00:00.000+01:00Codekvast Team<p>Codekvast Agent version 1.0.0 has been released.</p>
<p>Download <a href="https://downloads.codekvast.io/codekvast-agent-1.0.0.zip">codekvast-agent-1.0.0.zip</a> from <a href="https://downloads.codekvast.io">Codekvast Downloads</a>.</p>
<p>The agent jar (including sources) is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/1.0.0">jcenter</a> with the Maven coordinates <code>io.codekvast:codekvast-agent:1.0.0</code>.</p>
<p>News in this version:</p>
<ul>
<li>Added configuration parameters <code>enabled</code>, <code>hostname</code>, <code>httpProxyUsername</code> and <code>httpProxyPassword</code>.</li>
</ul>
<p>See <a href="../pages/getting-started.html#configuration">Getting Started</a> for more details.</p>
http://localhost:8820/news/2018-04-26-codekvast-agent-0.24.0-released.htmlCodekvast Agent 0.24.0 released2018-04-26T00:00:00.000+02:00Codekvast Team<p>Codekvast Agent version 0.24.0 has been released.</p>
<p>Download <a href="https://downloads.codekvast.io/codekvast-agent-0.24.0.zip">codekvast-agent-0.24.0.zip</a> from <a href="https://downloads.codekvast.io">Codekvast Downloads</a>.</p>
<p>The agent jar (including sources) is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/0.24.0">jcenter</a> with the Maven coordinates <code>io.codekvast:codekvast-agent:0.24.0</code>.</p>
<p>News in this version:</p>
<ul>
<li>Added support for extracting the app version from a text file within the class path. Read more in the <a href="https://www.codekvast.io/pages/configuration.html#about-specifying-appversion">configuration guide</a>.</li>
<li>Reduced logging. Repetitive stuff is now logged on FINE level.</li>
<li>Added support for the environment variable CODEKVAST_FINEST_LEVEL to help trouble shooting agent problems.<br />
Example: <code>export CODEKVAST_FINEST_LEVEL=INFO</code> before starting the application.</li>
<li>Added shortcut for setting codeBase for typical webapps.<br />
The config parameter <code>codeBase</code> can now be set to only <code>path/to/webapp</code> or <code>path/to/webapp/WEB-INF</code>.<br />
This will be interpreted as <code>path/to/webapp/WEB-INF/classes/</code> and <code>path/to/webapp/WEB-INF/lib</code> if these exist and are directories.</li>
<li>Bug fixes.</li>
</ul>
http://localhost:8820/news/2018-01-09-codekvast-agent-0.22.3-released.htmlCodekvast Agent 0.22.3 released2018-01-09T00:00:00.000+01:00Codekvast Team<p>Codekvast Agent version 0.22.3 has been released.</p>
<p>Download <a href="https://dl.bintray.com/crisp/codekvast/0.22.3/codekvast-agent-0.22.3.zip">codekvast-agent-0.22.3.zip</a> from Bintray.</p>
<p>The agent jar (including sources) is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/0.22.3">jcenter</a> with the Maven coordinates <code>io.codekvast:codekvast-agent:0.22.3</code>.</p>
<p>News in this version:</p>
<ul>
<li>Downgraded third-party dependencies to make Codekvast Agent work in Java 7 again.</li>
</ul>
http://localhost:8820/news/2017-12-19-codekvast-agent-0.22.1-released.htmlCodekvast Agent 0.22.1 released2017-12-19T00:00:00.000+01:00Codekvast Team<p>Codekvast agent version 0.22.1 has been released.</p>
<p>Download <a href="https://bintray.com/crisp/codekvast/distributions/0.22.1#files">codekvast-agent-0.22.1.zip</a> from Bintray. The agent jar is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/0.22.1/codekvast-agent-0.22.1.jar">jcenter</a>.</p>
<p>News in this version:</p>
<ul>
<li>Preparation for supporting other JVM languages than Java. Now filtering of uninteresting methods (e.g, methods generated by a<br />
Scala compiler or synthesized in runtime by e.g., Guice) is done in the Codekvast Dashboard instead of in the codekvast-agent.</li>
</ul>
http://localhost:8820/news/2017-09-13-codekvast-agent-0.21.5-released.htmlCodekvast Agent 0.21.5 released2017-09-13T00:00:00.000+02:00Codekvast Team<p>Codekvast agent version 0.21.5 has been released.</p>
<p>Download <a href="https://bintray.com/crisp/codekvast/distributions/0.21.5#files">codekvast-agent-0.21.5.zip</a> from Bintray. The agent jar is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/0.21.5/codekvast-agent-0.21.5.jar">jcenter</a>.</p>
<p>News in this version:</p>
<ul>
<li>No need to specify <code>-Xbootclasspath/a:/path/to/codekvast-agent-xxx.jar</code> anymore.</li>
</ul>
http://localhost:8820/news/2017-08-13-codekvast-demo1-launched.htmlcodekvast-demo1 launched2017-08-13T00:00:00.000+02:00Codekvast Team<p><a href="https://codekvast-demo1.herokuapp.com/">codekvast-demo1</a> has been launched.</p>
<p>It allows you to see Codekvast in action without having a Heroku app.</p>
<p>codekvast-demo1 is a small Spring Boot app, that is instrumented with Codekvast Agent. (It replaces codekvast-sample1 that was launched a week ago. Please update your bookmarks!)</p>
<p>It is able to emulate <code>heroku addons:open codekvast</code> so that you can jump to <a href="https://api.codekvast.io">Codekvast Warehouse</a> without being logged in to Heroku.</p>
<p>Go ahead to <a href="https://codekvast-demo1.herokuapp.com/">codekvast-demo1</a> and kick the Codekvast tyres!</p>
<p><strong><em>Feedback is welcome!</em></strong></p>
<p>See <a href="/pages/contact.html">Contact</a> for ways to contact the team.</p>
<p><strong><em>Heroku Alpha testers are still welcome!</em></strong></p>
<p>Drop a mail to <a href="mailto:support@codekvast.io?subject=Request+alpha+test+invite">support@codekvast.io</a> if you are interested.</p>
http://localhost:8820/news/2017-08-07-codekvast-agent-0.21.4-released.htmlCodekvast Agent 0.21.4 released2017-08-07T00:00:00.000+02:00Codekvast Team<p>Codekvast agent version 0.21.4 has been released.</p>
<p>Download <a href="https://bintray.com/crisp/codekvast/distributions/0.21.4#files">codekvast-agent-0.21.4.zip</a> from Bintray. The agent jar is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/0.21.4/codekvast-agent-0.21.4.jar">jcenter</a>.</p>
<p>News in this version:</p>
<ul>
<li>codekvast-agent now avoids posting empty invocation data sets to the server.</li>
</ul>
http://localhost:8820/news/2017-07-05-why-codekvast.htmlWhy Codekvast?2017-07-05T00:00:00.000+02:00Olle Hallin<ul>
<li><em>All code is a liability!</em></li>
<li><em>The best code is the code that is not written!</em></li>
<li><em>Fastest way to increase code coverage is to remove dead code!</em></li>
</ul>
<p>I believe all agree that is is good to keep the codebase small and compact.</p>
<p>Build times are kept short, test suites run fast, deployments are fast, static code analysis is fast, developer on-boarding is fast, the risk for bugs and vulnerabilities is kept low and so on. In short, <em>it allows you and your team to be more agile!</em></p>
<p>All development teams should spend time not only on writing new code, but also on cleaning up after themselves.</p>
<p><em>Which turns out to be easier said than done...</em></p>
<!-- PELICAN_END_SUMMARY -->
<p>As long as we write new code, things are simple. We build the <a href="http://www.agilenutshell.com/simplest_thing">Simplest Thing That Can Possibly Work</a>, and eat <a href="http://www.agilenutshell.com/yagni">YAGNI</a> for breakfast, right?</p>
<p>But the ugly truth is that over time the codebase becomes more and more rotten and bloated. It will contain not only useful features, but also features that no real user any longer is using.</p>
<p>Pure garbage, that really should be deleted, right?</p>
<p>The problem is also accented by modern phenomenons as Lean Startup and Continuous Delivery, that tells us to deploy little and often. Sometimes pure experiments to learn what the users really want. Some of these experiments are not successful, and should thus be removed.</p>
<p>But to be honest, how often does this happen? How easy is it to identify what should be removed?</p>
<p>So what can you do to identify code garbage?</p>
<p>- <em>Intellij reports dead code!</em> you might say.</p>
<p>True. In some circumstances. The IDE support for detecting dead code is based on static code analysis. The IDE will never propose deletion of public methods, since it cannot know all other clients to the code that potentially could invoke the methods. So this otherwise fantastic feature is of limited use in this context.</p>
<p>The same reasoning is applicable if you use code coverage tools during automated acceptance tests. The code that the coverage tool reports as unused often only indicates a shortcoming in the test suite. The natural - and correct - reaction is to write more tests.</p>
<p>If you have an acceptance test suite that tests exactly what your product is supposed to support, nothing more and nothing less, then all code that is uncovered by the tests can be deleted. Congrats! You don't have the problem Codekvast is solving!</p>
<p>Many companies add feature trackers to their products to learn their customers' behaviour.<br />
It could be JavaScript or invisible 1x1 images in web pages or manually instrumented code in the back-end.<br />
These tools are obviously good, since they help the product owner identify useful features that should be nurtured. They are however quite useless in pinpointing unused stuff that safely can be removed.</p>
<p>Well, what about log file analysis? Same thing, logs tell what has been used. It does not tell what is dead code without extensive manual analysis.</p>
<h2>What you really would want to have</h2>
<p>What you really want is a tool that</p>
<ul>
<li>Automatically records the instant methods are invoked in any of your production servers.</li>
<li>Automatically makes an inventory of the code that is deployed to production.</li>
<li>Automatically delivers invocation and inventory data to a central data warehouse.</li>
<li>Can applied with minimal risk; without risking jar hell.</li>
<li>Has minimal runtime penalty; CPU-wise, I/O-wise, memory-wise and bandwidth-wise.</li>
<li>Can be applied to an existing application without code modification.</li>
<li>Requires minimal modifications to the start scripts.</li>
<li>Makes the aggregated information available to the development teams without having to give them access to the production environments.</li>
<li>Has warehouse tools for finding code that has not been executed for X days.</li>
</ul>
<p>The value of "X days" is highly domain specific. For a news site it could be as little as 14 days. For a system handling public elections it could be 4 years!</p>
<p>When one after X days has used the tool for identifying and removing truly dead code (with accompanying tests), the IDE support for identifying statically dead code comes to play.<br />
Behind each public business method there are often supporting private methods.<br />
Once you have started digging, it could turn out to be quite much that is dead.</p>
<h2>So what such tools are there?</h2>
<p><strong>With the above feature set, as of today only Codekvast!</strong></p>
<p>Codekvast is currently offered as <em>Codekvast-as-a-Service</em>:</p>
<ul>
<li>You sign up for Codekvast, selecting a suitable price plan (including a free test plan).</li>
<li>You add the Codekvast Agent to your application.</li>
<li>You access the Codekvast Dashboard in the cloud.</li>
</ul>
<p><em>Easy!</em></p>
<p>As a first step, Codekvast will be added to <a href="https://elements.heroku.com/addons">Heroku Add-ons</a>, with support for Java only.</p>
<p>Later, Codekvast-as-a-Service will support other languages and platforms, including self-hosted data centers.</p>
<p><strong>Interested in becoming a Heroku add-on alpha tester?</strong> Drop a mail to <a href="mailto:support@codekvast.io?subject=Request+alpha+test+invite">support@codekvast.io</a>!</p>
<p>Read more at <a href="/index.html">What is Codekvast?</a></p>
http://localhost:8820/news/2017-07-04-codekvast-warehouse-upgraded.htmlCodekvast Warehouse upgraded2017-07-04T00:00:00.000+02:00Codekvast Team<p><a href="https://app.codekvast.io">Codekvast Warehouse</a> has been upgraded.</p>
<p>The big news in this version is the new <strong>Status</strong> page, which gives you insight into the collection process.</p>
<p>Some questions that can be answered by using the Status page:</p>
<ul>
<li><em>Are the agents in contact with the server?</em></li>
<li><em>Which apps are instrumented with the Codekvast agent?</em></li>
<li><em>Do they deliver data?</em></li>
<li><em>When will data be delivered next time?</em></li>
<li><em>For how long has data been collected?</em></li>
<li><em>Which versions of the Codekvast agent are in use?</em></li>
<li><em>Are we approaching the price plan limits?</em></li>
</ul>
<p><strong><em>Heroku Alpha testers are still welcome!</em></strong></p>
<p>Drop a mail to <a href="mailto:support@codekvast.io?subject=Request+alpha+test+invite">support@codekvast.io</a> if you are interested.</p>
http://localhost:8820/news/2017-06-30-codekvast-agent-0.21.3-released.htmlCodekvast Agent 0.21.3 released2017-06-30T00:00:00.000+02:00Codekvast Team<p>Codekvast agent version 0.21.3 has been released.</p>
<p>Download <a href="https://bintray.com/crisp/codekvast/distributions/0.21.3#files">codekvast-agent-0.21.3.zip</a> from Bintray. The agent jar is also available on <a href="https://jcenter.bintray.com/io/codekvast/codekvast-agent/0.21.3/codekvast-agent-0.21.3.jar">jcenter</a>.</p>
<p>News in this version:</p>
<ul>
<li>The first upload of invocation data is now done within 30 seconds after application start. This makes it simpler to verify that Codekvast is correctly configured.</li>
</ul>
http://localhost:8820/news/2017-06-26-heroku-alpha-testers-are-welcome.htmlHeroku alpha testers are welcome2017-06-26T00:00:00.000+02:00Codekvast Team<p><a href="/index.html">Codekvast</a> is in progress of becoming a Heroku Add-on.<br />
It is now time to start the alpha test period.</p>
<p>In this first round of alpha testing, the following applicants are welcome:</p>
<ul>
<li>A Heroku app</li>
<li>Written in Java 7+</li>
<li>Built with Gradle or Maven</li>
<li>Packaged as a Spring Boot executable jar or by means of the Gradle <code>application</code> plugin.</li>
</ul>
<p>In order to participate, please send an email to <a href="mailto:support@codekvast.io?subject=Request+for+alpha+test+invite">support@codekvast.io</a> and request an invitation.</p>
<p>The email must contain the email address which is associated with your Heroku account.</p>
<p>The invites are handed out on a FIFO basis. A limited number of alpha testers will be accepted.</p>
<p>Welcome!</p>
<p>Olle</p>
http://localhost:8820/news/2017-06-15-support-for-spring-boot-executables.htmlCodekvast now supports Spring Boot executable jars2017-06-15T00:00:00.000+02:00Codekvast Team<p>Codekvast Agent 0.21.2 has been released.</p>
<p>The agent now supports Spring Boot executable jar files.</p>
<p>Spring Boot optionally creates <a href="https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#executable-jar">executable jar files</a> with a custom nested jar format.</p>
<p>The Java platform does not natively support nested jar files, and the normal method for creating single-jar Java applications is to use what is called shadowing.</p>
<p>A shadow jar is created by unpacking all participating jars to a temporary directory which then is packed to the shadow jar.</p>
<p>This is a source of bugs, since if many jars contain the same resource only<br />
one of them will survive the shadowing process.</p>
<p>Spring Boot has taken a different approach, which includes a custom class loader and nested jars within the single packed parent jar.</p>
<p>Codekvast has been enhanced to understand this format.</p>
<p>Codekvast Agent 0.21.2 is available for download from <a href="https://dl.bintray.com/crisp/codekvast/0.21.2/codekvast-agent-0.21.2.zip">Bintray</a>.</p>
http://localhost:8820/news/2017-06-08-soon-on-heroku.htmlCodekvast soon on Heroku2017-06-08T00:00:00.000+02:00Codekvast Team<p>Hallin Information Technology AB, the maker of Codekvast, is in the process of becoming<br />
a Heroku Add-on Partner.</p>
<p>This means that Codekvast will soon be available as a Heroku add-on.</p>
<p>The first version will support Java 7 or greater.<br />
Support for Spring Boot-generated executable jars will be added shortly.</p>
<p>Alpha testing will start later in June, 2017.</p>
<p><em>Interested?</em> Please send an email to <a href="mailto:support@codekvast.io?subject=Request+alpha+test+invite">support@codekvast.io</a> to get an invitation.</p>