My thoughts as an enterprise Java developer.

Thursday, October 17, 2013

The type of work that I like to do

I like working on detailed, complex, and/or interesting problems on a product that I know well, has a large codebase, and has to support high load. I call those “guru-level” problems.

Tuesday, October 15, 2013

Change comments to logs?

It seems that almost all of the time, comments in a method work better as logging statements.

  • The log statements still give clues to the developer about what is happening
  • The log statements also give that information to someone looking at the logs
  • Since log statements will be seen more, they are more likely to to kept current

Thursday, October 10, 2013

Sitting Too Much Could Be Deadly, Experts Say | Fox News

Sitting Too Much Could Be Deadly, Experts Say | Fox News: "Scientists are increasingly warning that sitting for prolonged periods — even if you also exercise regularly — could be bad for your health. And it doesn't matter where the sitting takes place — at the office, at school, in the car or before a computer or TV — just the overall number of hours it occurs."

" "After four hours of sitting, the body starts to send harmful signals," Ekblom-Bak said. She explained that genes regulating the amount of glucose and fat in the body start to shut down."

One idea that comes to my mind is to setup a standing height desk. The computer would be setup with remote desktop so that employees using it could connect back to their workstation and do work as if they were at their desk.  That cube could then be reserved like a conference room so that employees could use it for a few short periods during the day.  Optionally, the cube could have a tread mill right in front of the computer so that employees could also walk while working.

Thursday, October 03, 2013

A Simple Rule to Eliminate Useless Meetings | LinkedIn

A Simple Rule to Eliminate Useless Meetings | LinkedIn: "materials that would typically have been presented during a meeting be sent out to participants at least 24 hours in advance so people can familiarize themselves with the content"

"begin each meeting by providing attendees roughly 5-10 minutes to read through the deck"

"Once folks have completed the reading, it's time to open it up for discussion.There is no presentation. It's important to stay vigilant on this point as most people who prepared the materials will reflexively begin presenting."

"If the material has been well thought out and simply and intuitively articulated, chances are the need for clarifying questions will be kept to a minimum."

XSLT example to iterator through a comma separated list

<?xml version="1.0" encoding="UTF-8"?>

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="" version="1.0">
    <xsl:template match="/">
        <xsl:call-template name="splitcommas">
            <xsl:with-param name="comma" select="comma"/>
    <xsl:template name="splitcommas">
        <xsl:param name="comma"/>
            <xsl:when test=" not(contains($comma, ','))">
                <value><xsl:value-of select="$comma"/></value>
                <value><xsl:value-of select="substring-before($comma, ',')"/></value>
                <xsl:call-template name="splitcommas">
                    <xsl:with-param name="comma" select="substring-after($comma, ',')"/>

Wednesday, October 02, 2013

Keeping sensitive data out of logs

When a product has logging there is a risk that sensitive data(i.e. passwords) will make it into the logs. How do we reduce that risk?

Logging an object or adding toString to a class might not obviously leak sensitive data so it is probably better to make sensitive data obvious. i.e. If sensitive data is stored in a Properties object, as soon as the properties object is obtained, it should move sensitive data to a separate location (i.e. a separate String variable in the class) and remove the sensitive data from properties so it is obvious that there is sensitive data.

Google security exec: 'Passwords are dead' | Security & Privacy - CNET News

Google security exec: 'Passwords are dead' | Security & Privacy - CNET News: "looking ahead, "our relationship with passwords are done," and that "passwords are done at Google.""

"any startup that still relies on standard passwords needs to ensure that it has an abuse team set up to deal "with customers getting compromised." "

"anyone starting a new technology company should be sure that one person is designated to focus on security and privacy, and that one of the first 25 employees should work full time on security and privacy."


OSGi Tutorial: "What is the OSGi Service Platform? A Java framework for developing (remotely) deployed service applications, that require: Reliability Large scale distribution Wide range of devices Collaborative" It supports multiple jar versions so each library can use the version that it wants.

Tuesday, October 01, 2013

Semantic Web: Resource-Oriented Architecture Patterns for Webs of Data

Resource-Oriented Architecture Patterns for Webs of Data:

Start on page “1” (about 60%).

"Whatever domain we work in, we can imagine translating the data elements we care about into named resources:,,, or
These names represent good, long-lived, stable identifiers for these disparate domains."

"Avoiding data extraction, transformation, and loading (ETL) steps reduces the burden of having multiple copies of our information repositories. We can achieve the goals of a Master Data Management solution while simultaneously avoiding the unnecessary limitations of a prescribed format."

"When you point your browser at any random website, it does not “know” anything. It issues a standard, semantically constrained verb, called GET, to a named element and responds to what comes back. “Oh, an HTML document! I know how to parse that.” or “Oh, a plain text file, I know how to display that.” It is reactive. It does not know. Knowledge is a form of coupling."

"The client does not know what it is going to get, it reacts to what is returned. It knows how to parse standard types. And from there, it discovers what options to present to the user (if there is one)."

"The media type should be designed to support hypermedia links. This should identify the resource itself, as well as its related resources. Clients will be able to “follow their noses” through your hypermedia representations. In the following example, we can find our way back to the account resource itself (useful if we did not fetch it initially but were given the representation as part of an orchestration), its recent orders, as well as individual orders.
1 < a c c o u n t i d = " 12345 " >
2 < l i n k r e l = " s e l f " h r e f = " h t t p : / / e x am pl e . com / a c c o u n t / i d / 1 2 3 4 5 " / >
3 b s l e t t e n < / name >
4 < s t a t u s > g o l d < / s t a t u s >
5 < r e c e n t O r d e r s h r e f = " h t t p : / / e x am pl e . com / o r d e r / a c c o u n t / i d / 1 2 3 4 5 / r e c e n t " >
6 < o r d e r i d = " 141234541234 " h r e f = " h t t p : / / e x am pl e . com / o r d e r / i d / 1 4 1 2 3 4 5 4 1 2 3 4 " >
7 < i t e m s > . . . < / i t e m s >
8 < / o r d e r >
9 < o r d e r i d = " 452354234534 " h r e f = " h t t p : / / e x am pl e . com / o r d e r / i d / 4 5 2 3 5 4 2 3 4 5 3 4 " >
10 < i t e m s > . . . < / i t e m s >"

"A slightly more verbose representation [of a collection]:
1 < a c c o u n t s h r e f = " h t t p : / / e x am pl e . com / a c c o u n t / s t a t u s / to p " >
2 < a c c o u n t i d = " 12345 " u s e r n am e = " j o j a l e h t o " s t a t u s = " a c t i v e "
3 h r e f = " h t t p : / / e x am pl e . com / a c c o u n t / i d / 1 2 3 4 5 " / >
4 < a c c o u n t i d = " 34246 " u s e r n am e = " bkemp " s t a t u s = " a c t i v e "
5 h r e f = " h t t p : / / e x am pl e . com / a c c o u n t / i d / 3 4 2 4 6 " / >
6 < a c c o u n t i d = " 77323 " u s e r n am e = " bl u u " s t a t u s = " d i s a b l e d "
7 h r e f = " h t t p : / / e x am pl e . com / a c c o u n t / i d / 7 7 3 2 3 " / >
8 < / a c c o u n t s >"

"The clients will not have to know how to paginate across arbitrary collections, they will simply discover links related to the collection with a rel type of next or previous. The server still drives URL layout, which is what we want in a hypermedia system."

This may not be as useful for external systems but seems more useful for internal systems where you can make your clients use the extra info.

The full book is available for $20.