Skip to main content

3 posts tagged with "CleanCode"

View All Tags

Clean Streaming Code

· 3 min read
Lars Opitz
Passionate Software Craftsperson | Seasoned Agile Leader @ eBay

water flowing out a pipe

Streaming is an awesome tool. It helps to separate concerns (e.g., iteration, filtering, execution), to avoid state and thus improves thread safety. Additionally, we can express the same functionality with less code. But it’s hard to read and to test.

Really?

Getting Rid of Nasty Parameters

· 6 min read
Lars Opitz
Passionate Software Craftsperson | Seasoned Agile Leader @ eBay

I bet you’ve seen code like this when your IDE auto-completed a function call in your code and there’s no source code or Javadoc found:

EmailSender.class
emailSender.sendEmail(String arg1, 
InternetAddress arg2, InternetAddress arg3, InternetAddress arg4,
String arg5, String arg6, List<EmailAttachment> arg7);

PMD will annotate this code as a violation of the rule "Getting Rid of Nasty Parameters."