Home

Michael's blog is now available on the Click here to order on Amazon.com

Blog

vargs and arrays in java

vargs are a cool feature in java that has gained some traction since their availability in JDK 1.5. However, there are some nuances when working with them that if you don't keep straight, can require quite a bit of Googling to figure out. Since I keep tripping up on this one myself, I figured I would write a quick post as a reminder for myself. In java, when dealing with a method that accepts a variable number of parameters (vargs), if you pass an array in as the parameter, it will be parsed as a list of parameters. Take this example: ...

Tutorial

How to Mock Static Methods

e have all read it or heard someone talk about it. "Static Methods are Death to Testability". You can read the article here: http://bit.ly/4mk3fP. Something that has become a fundimental piece of the language (all you need to do is look at the Apache Commons project to see that) is so bad that it must be avoided at all costs in the name of testing. Gosling (or someone on his team) put it in the language for a reason and to avoid those uses solely because your toolset doesn't support the testing of it is nonsense. Time to get a new toolset. In this tutorial we will cover how to mock static methods (*gasp) using PowerMock.
More

Widgit

Prototype & script.aculo.us Lightbox

Want lightbox functionality but don't want to add yet another javascript library to your project?  Prototype and script.aculo.us are probably two javascript libraries you already have in your project.  Here we will cover a lightweight way to implement lightbox functionality without adding yet another javascript library.
More

About MichaelMinella.com PDF Print
JavaWelcome to MichaelMinella.com, your home for learning about quality software development.  Although this is my corner of cyberspace, this is your forumn.  This site will only get better with feedback from you.  What do you want to hear about?  What challenges are you facing in your development?  We all are aware of areas where the software development cycle can be improved.  Together we can come up with solutions that will take your development to the next level.  Make no excuses and demand quality.
 
Google Reader

Social Links

Image
View Michael Minella's profile on LinkedIn

Tweets

    Twitter Button from twitbuttons.com