Most interesting links of June
Recommanded Readings
- Empirical Studies Show Test Driven Development Improves Quality - brief summary of two researche papers comparing TDD/non-TDD, one paper with 1 case study from IBM and 3 from Microsoft (get PDF; conclusion: The pre-release defect density of the four products, measured as defects per thousand lines of code, decreased between 40% and 90% relative to the projects that did not use TDD. The teams' management reported subjectively a 15–35% increase in initial development time for the teams using TDD, though the teams agreed that this was offset by reduced maintenance costs.), one older summarizing 13 case studies (conclusion: TDD seems to improve software quality, [...] there were indications that TDD does not necessarily decrease the developer productivity or extend the project leadtimes: In some cases, significant productivity improvements were achieved [...] However, in both of those studies the quality was improved.).
- Quantum computers are reality: World’s first commercial quantum computer sold to Lockheed Martin - this means that hard and NP-hard problems become solvable or at least much easier to solve (this means incredibly lot, just think about optimization problems, scientific computations and simulations, ...) and that current security measures are becoming obsolete. It has "only" 128 qubits, which sounds small but is a big thing (competitive regime for quantum comp. is about 100).
- Fit co-author says acceptance testing costs more then it is worth (i.e. there are better alternatives) - it's always good to learn from failures; the author, James Shore, has several pleas against A.T.: "[..] customers (a) weren't interested in doing that, and (b) often couldn't understand and didn't trust tests that were written by others. [..] Furthermore, acceptance testing tools are almost invariably used to create end-to-end integration tests, which are slow and brittle. Fit works best for targeted tests that describe the domain, but that's not how it's used. Also, tools like Fit [JH: which is based on HTML] don't work with refactoring tools.", summarized: non-participation of customers and maintenance burden. Gojko Adzic opposes that we can avoid the pitfalls while retaining the benefits - I guess his Specification by Example book is quite lot about this, as well as the last month mentioned post Top 10 reasons why teams fail with AT
Continue reading →
Validating JSF EL Expressions in JSF Pages with static-jsfexpression-validator
static-jsfexpression-validator is utility for verifying that EL expressions in JSF pages, such as
#{bean.property}
, are correct, that means that they don't reference undefined managed beans and nonexistent getters or action methods. The purpose is to make JSF-based web applications safer to refactor as the change of a method name will lead to the detection of an invalid expression without need for extensive manual UI tests. It can be run statically, for example from a test. Currently it builds on the JSF implementation v. 1.1 but can be in few hours (or days) modified to support newer version of JSF. How does it work?Continue reading →
How to Fix Empty "Show all bookmarks" in Firefox 4
The solution was to create a backup of my bookmarks (in the json format), stop FF, delete places.sqlite from my profile, start FF and restore bookmarks from the backup.
Continue reading →
Hacking Jasper to Get Object Model of a JSP Page
- Define a Node.Visitor subclass for handling the nodes (tags etc.) of a JSP
- Write a simple subclass of Compiler, overriding its generateJava() to invoke the visitor
- Subclass the compiler executor JspC overriding its method getCompilerClassName() to return the class of the Compiler of yours
Continue reading →
Version hell with JSFUnit, Arquillian, and (embedded) Glassfish and other containers
There are the following fatal constraints:
Continue reading →
Most interesting links of May
Recommanded Readings
Acceptance testing / Specification by example:Continue reading →
Ivy: How to Retrieve Source Codes of Dependencies
Summary: To download sources you must map the dependency's conf also to 'sources' (ex.: conf="myScope->default,sources"
).
sources
" (or "javadoc
" to fetch JavaDocs).Continue reading →
Installing Java 1.4 to Mac OS X 10.6
Continue reading →
Upgrading FCKeditor 2.x to CKEditor 3.x including plugins
Continue reading →
Discussion: Agile not suitable for governmental IT?
The article reveals a fundamentaly psychological and social issue. It doesn't question the ability of agile to deliver projects much more successfully than waterfall. The laywer, Alistair Maughan, doesn't speak at all about projects' results. He speaks about fear (to bear the consequences of a failure) and constraints present in governmental environment. Thus it's pointless to argue about benefits of the agile and absurdity of the waterfall approaches. The key to a successful project is to understand those constraints, lift them as much as possible, and create a security structure for both governmental officials and the supplier to be able to work within those constraints safely. We shouldn't forget that there are also smart people in the government agencies who will gladly accept a methodology that leads to better results as long as they are safe from being denounced on the front side of newspapers as bad public servants when something goes wrong.
Continue reading →
Most interesting links of April (renewed)
Continue reading →
How stateless can you go?
It was very interesting to compare the original, stateful version and the resulting stateless one and to see the solution in various languages (Haskell, Clojure, Groovy, C#, Java, Scala) - it looked actually pretty similar in all.
What I've learned is that stateless (i.e. functional-style) code looks much cleaner for you get rid of lot of noise such as local variables and loops. In practice it is important to use a language with an efficient implementation of recursion (especially tail-recursion) and with data structures that lead themselves easily to recursive processing, i.e. make it easy and efficient to process the first element of a collection and do that recursively for the rest without modifying the collection (and providing utility methods like each). It is of course best to have languages that support map/reduce.
You can check the slides and various solutions at GitHub and see our primitive and stateless implementations below. (We did it in a nearly TDD-manner, but I won't include the test here as it isn't essential.)
Update: There are more solutions linked to from the meetup's comments - search for "github" - and there is also a link to an article series for deeper discussion of challenges in writing pure and stateless code.
Continue reading →
What I've Learned from (Nearly) Failing to Refactor Hudson
Continue reading →
What Do I Mean by a Legacy Code?
It conjures images of slogging through a murky swamp of tangled undergrowth with leaches beneath and stinging flies above. It conjures odors of murk, slime, stagnancy, and offal.
Continue reading →
Refactoring the "Legacy" Hudson.java with the Mikado Method as a Coding Dojo
The Mikado Method
The Mikado Method, which the authors describe as "a tool for large-scale refactorings", serves two purposes:Continue reading →