- Basic best practices and optimization techniques for JBoss EAP 4.3 Production Environments.
- A tutorial in which you will "create Pingstream, a small notification tool that uses PHP (sorry ;), jQuery and RSS to communicate over the Extensible Messaging and Presence Protocol (XMPP), a set of XML technologies designed to support presence and real-time-communications functionality."
- Asynchronouse method invocation with Spring 3.0 tutorial with example code via annotiations. Full task and scheduling reference here.
- Good list of REST API anti-patterns.
- And another set of anti-patterns, this time for Apache Hadoop. Also includes best practices.
- Pretty funky: researchers developed misco, a mobile framework of MapReduce in Python (sorry again :) that can be handled by a server farm/cloud comprised of smartphones (e.g Nokia N95)."
The best articles and links to interesting posts for technical team leaders building sophisticated websites, applications and mobile apps. Think about: software architecture, hardware architecture, design, programming, frameworks, scalability, performance, quality assurance, security, resolving issues, fixing bugs and Android.
Sunday, August 29, 2010
Best of this Week Summary 23 August - 29 August 2010
Wednesday, August 25, 2010
Endless flashing TextView animation in Android
A little while ago I needed a flashing text in Android.

Pretty easy you'd think: stick two animations in an AnimationSet, set the repeatMode to Animation.RESTART and repeatCount to Animation.INFITITE like this:
XML
Activity code
and you're done.
But no! It only runs one time, or 1.5 times or whatever; definitely not endlessly.
This pretty basic requirement of looping a set of animations indefinitely is apparently a known bug. I haven't been able to find out if it's still an outstanding issue today (August 2010) but unless I implemented it incorrectly, it is definitely present in SDK 1.6.
Based on the answers in that thread and the example code here, I came up with the following solution:
XML
A fadein.xml and a fadeout.xml. See the end of this post for the complete code.
Activity code
Two listeners which start the other animation at the end of an animation:
Runnables that do the fading
Note that I improved efficiency of the mentioned example code by only setting the animations one time and getting the TextView to animate only once.
That's it!
Note: in the logcat I do get these messages (2-3 times in about 5 minutes):
Pretty strange, the CPU doesn't seem to be pegged... It says it recovers, but I guess the warning is there for a reason. Can the code be modified to avoid these warnings?
It might be a platform bug. Indeed I do see it appear in 1.6 but not in 2.1.
Full code (tested on 1.6) can be downloaded here.

Pretty easy you'd think: stick two animations in an AnimationSet, set the repeatMode to Animation.RESTART and repeatCount to Animation.INFITITE like this:
XML
|
Activity code
|
and you're done.
But no! It only runs one time, or 1.5 times or whatever; definitely not endlessly.
This pretty basic requirement of looping a set of animations indefinitely is apparently a known bug. I haven't been able to find out if it's still an outstanding issue today (August 2010) but unless I implemented it incorrectly, it is definitely present in SDK 1.6.
Based on the answers in that thread and the example code here, I came up with the following solution:
XML
A fadein.xml and a fadeout.xml. See the end of this post for the complete code.
Activity code
|
Two listeners which start the other animation at the end of an animation:
|
Runnables that do the fading
|
Note that I improved efficiency of the mentioned example code by only setting the animations one time and getting the TextView to animate only once.
That's it!
Note: in the logcat I do get these messages (2-3 times in about 5 minutes):
|
Pretty strange, the CPU doesn't seem to be pegged... It says it recovers, but I guess the warning is there for a reason. Can the code be modified to avoid these warnings?
It might be a platform bug. Indeed I do see it appear in 1.6 but not in 2.1.
Full code (tested on 1.6) can be downloaded here.
Sunday, August 22, 2010
Best of this Week Summary 16 August - 22 August 2010
- Great performance analysis (PDF) between Java IO and Java NIO by Google engineer Paul Tyma. Java IO is performing about 25% better.
- Of course I have to mention Oracle's Java lawsuit against Google. Several viewpoints can be found here (more on the profit/free markets) and here (more elaborate and technical details) and here (Android == Java?).
- A short comparison between Spring Web Services and Apache CXF.
- Several short HTML5 tutorials by Bob Leah from IBM collected at one place.
- Five things you might not know about .jar files.
Sunday, August 15, 2010
Best of this Week Summary 9 August - 15 August 2010
- A quick tutorial creating a Spring Roo application and deploying it on Google App Engine. And related to that, an article deploying Spring Security on GAE.
- A "concise summary of the key points of API design, in easily digestible form" by Joshua Bloch.
- Finally: jQuery is also working on a version that is for mobile devices.
- A short comparison of Google App Engine and Amazon EC2. They are not really comparable, but still useful when deciding where to host your site/service.
- A Big Data analytics equivalent for LAMP (Linux, Apache HTTP Server, MySQL and PHP) architecture based on Hadoop. Mentions Adobe and Facebook using several components. Interesting is the mentioning of Facebook which created a web-based tool, HiPal, that enables non-engineers to run queries on large data sets, view reports, and test hypotheses using familiar web browser interfaces. More details on how Facebook uses Hadoop can be found here.
- Gartner released their new 2010 Hype Cycle. Always useful to see if you missed any new trends :)
Sunday, August 8, 2010
Best of this Week Summary 2 August - 8 August 2010
- How to utilize Externalization (faster, less flexible) for high performance applications instead of Serialization (slower, more flexible).
- A bunch of pros and cons of Wicket.
- An extensive tutorial on how to work with XML, JSON and Google's protocol buffers within Android applications. It shows how to "develop a Web service that converts CSV data into XML, JSON, and protocol-buffers formats. Then you'll build a sample Android application that can pull the data from the Web service in any of these formats and parse it for display to the user". Assumes Froyo 2.2. Also shows a short comparison in performance between the three protocols.
- A five part introduction to HTML5 focusing on the mobile web.
- Highlights from Black Hat and Defcon 2010. That means security stuff :).
- A list of (mostly obvious) performance problems identified at Zappos, Monster etc.
- A pretty comprehensive overview of Java code obfuscating including these types: name, strings, code and flow, incremental, watermarking etc.
Sunday, August 1, 2010
Best of this Week Summary 26 July - 1 August 2010
- Pretty nasty, some application apparently depend on the the company name in the JDK! Including Eclipse, causing OutOfMemoryErrors since Oracle changed the name from 'Sun Microsystems, Inc' to 'Oracle'. Sounds like a magic constant somewhere... Though as it says here it had to be put in to work around another bug. Oracle rolled it back until JDK 7.
- Evolutionary architecture and emergent design: Leveraging reusable code, Part 1 and Part 2.
- A Spring MVC 3 Showcase, which should give you have a good idea of what the technology can do.It includes a sample project, along with a supporting slide presentation and screencast. After digging in, you should have a good understanding of what Spring MVC can do and get a feel for how easy it is to use.
- Some random Android tips/lessons learned.
- Java Iterator Quiz time!