Key Lessons from the Specification by Example Course, Day 1
If you haven't heard about Specification by Example (SbE) before (really?!), then you need know that its main concern is ensuring that you build the right thing (complimentary to building the thing right), which is achieved by specifying functionality collaboratively with business users, testers, and developers, clarifying and nailing them with key examples, and finally, where it is worth the effort, automating checks of those examples to get not only automated acceptance tests but, more importantly, a "living documentation" of what the system does that never gets out of date. Best to read the key ideas described by Gojko himself or the SbE Wikipedia page.
Continue reading →
Annual Blogging Report 2011
Continue reading →
Most interesting links of December
Recommended Readings
- The Netflix Chaos Monkey - how to test your preparedness for dealing with a system failure so that you won't experience nasty wakeup when something really fails in Sunday 3 am? Release a wild, armed monkey into your datacenter. Watch carefuly what happens as it randoly kills your instances. This is exactly what Netflix does with their with their cloud infrastructure - also a great inspiration for my recent project. Do you need to be always available? Than consider employing the chaos monkey - or a whole army of monkeys! (PS: There is also a post with a picture of the scary monky.)
Continue reading →
AWK: Extract Logs for the Given Date(s) from a Log File
Continue reading →
Quiz: What's the Best Test Method Name?
Continue reading →
Getting Started with Amazon Web Services and Fully Automated Resource Provisioning in 15 Minutes
Continue reading →
Most interesting links of November
Recommended Readings
- Recommended Reading by Poppendiecks - an excellent selection, starting with Lean from Trenches, Management 3.0, Specification by Example, The Lean Startup etc.
- Eric Allman says that Programming Isn’t Fun Any More because problem solving has been replaced with learning, configuring, and integrating tons of libraries, frameworks, and tools and many people agree with that (as discussion on reddit proves). In other words we tend to go for any benefit we can have without considering the costs and for "easy" solutions without considering the true enemy: complexity. Perhaps we should always listen to the Rich Hickey's Simple Made Easy talk before we add a lib/tool/framework?
Continue reading →
The 3 Most Important Things I've Learned This Year
First, I've learned how we decide (and a project - IT or other - is nothing but a bunch of hundreds, millions of decisions, both small and big). To deal with the incredibly complex world around us, human brain has many decision strategies ranging from a very rational decision making to "gut feeling" decisions based on our emotions and subconsciousness. Every of these strategies is perfectly suitable for some situations (for example relying on emotions and intuition is often the best thing, conversely to what we've been thought) - and leads to suboptimal results (read: terrible failures) in others. Thus the single most important factor that determines how successful we are is our ability of metacognition, i.e. being aware of how we think, and thus being able to select the most appropriate strategy for the situation at hand. (Which might not be as easy as it sounds and may require that we "trick" our mind somehow, i.e. by distracting it or forcing it into a certain decision mode.) Jonah Lehrer documents that on the "Marshmallow experiment" - the children who knew that they got to distract themselves somehow not to eat the marshmallow, which they've been given, not only managed to wait those 15 minutes for another one but were also much more successful in their later lives - presumably because their ability of metacognition helped them to make better decisions more often.
Continue reading →
Where to Get Sample Java Webapps
Continue reading →
What Changes When You Deploy More Frequently and Why You Should Do It
I'd highly recommend you to watch his presentation as I will only reproduce parts of it (and as they are out of their original context, they might well not represent exactly what Kent wanted to communicate).
Kent argues that as you deploy more and more frequently, many things have to change including the business side of the software. What is a best practice for one of these speeds becomes an impediment for another one. With more frequent deployments teams have to progress towards the following practices, while leaving some other practices behind:
Continue reading →
Refactoring Spikes as a Learning Tool and How a Scheduled Git Reset Can Help
- Schedule git reset --hard; git clean -fd to run in 1 hour (e.g. via cron)
- Do the refactoring
- "WT*?! All my changes disappeared?!" - this experience indicates the end of the refactoring :-)
- Go for a walk or something and think about what you have learned about the code, its complexity, the refactoring
- Repeat regularly, f. ex. once every week or two - thus you'll improve your ability to direct the refactoring so that you learn as much as possible during the short time
Continue reading →
Principles for Creating Maintainable and Evolvable Tests
- Tests tell a story
- True unit tests + decoupled higher-level integration tests (-> Mike Cohn's Layers of the Test Automation Pyramid)
- More functional composition of the processing
Continue reading →
How to Fail With Drools or Any Other Tool/Framework/Library
They decided to switch to the Drools rule management system (a.k.a. JBoss Rules) v.4 from their homegrown rules implementation to centralize all the rules code at one place, to get something simpler and easier to understand, and to improve the time to market by not requiring a redeploy when a rule is added. However Drools turned out to be more of a burden than help for the following reasons:
Continue reading →
Tips And Resources For Creating DSLs in Groovy
Paul mentions one important thing - you can always make your DSL better, i.e. more fail-proof (case insensitive, support plural endings, ...) and secure and more like a natural language but it all comes at a cost and you must evaluate when the cost overweights the benefit (beware the 80:20 rule).
Some of the Groovy DSL implementation tips:
Continue reading →
What Is CDI, How Does It Relate to @EJB And Spring?
Context Dependency Injection (CDI, JSR 299) is a part of Java EE 6 Web Profile and itself builds on Dependency Injection for Java (JSR 330), which introduces @Inject, @Named etc. While JSR 330 is for DI only and is implemented e.g. by Guice and Spring, CDI adds various EE stuff such as @RequestScoped, interceptors/decorators, producers, eventing and a base for integration with JSF, EJBs etc. Java EE components such as EJBs have been redefined to build on top of CDI (=> @Stateless is now a CDI managed bean with additional services).
A key part of CDI aside of its DI capabilities is its awarness of bean contexts and the management of bean lifecycle and dependencies within those contexts (such as @RequestScoped or @ConversationScoped).
CDI is extensible - you can define new context scopes, drop-in interceptors and decorators, make other beans (e.g. from Spring) available for CDI,... .
Resources to check:
Continue reading →