Archive for ‘tech’

April 2, 2013

Our SoundBridge Has Finally Collapsed

Our beloved Roku SoundBridge has ceased to function. After seven years of service tuning into SomFM, otherwise unreachable radio stations and our iTunes library, it emits neither light nor sound.

SoundBridge1

It turns out, the thing is beautiful inside. Constructed like double-ended Pringle’s can. Pop the ends off and it’s inner shell slides out of the aluminum tube.

SoundBridge2

Splitting the clamshell exposes a single circuit board.

SoundBridge3

SoundBridge4Notice the how the primary circuits are completely encased in a shield? This unit was unaffected by nearby cell phones, the microwave oven or other radiation sources. Which is pretty amazing because I don’t think things like 3G phones were invented when this was made.

Fortunately, there is EBay and it’s vintage replacement is on it’s way.

February 15, 2012

Campaign to Eliminate Log4J Pattern Layouts Containing Conversion Character “%L” in Performance Sensitive Components.

A fantastically horrible title, but please savor this trivial homespun tale of squeezing the microseconds out of my underwear  Log4J configuration.  

At my new place of employ, I was unaccustomed to seeing smallish parenthesized numbers in log statements:

2012-02-06 14:00:46,916 INFO  [Thread-2] ContextLoader (189)- Root WebApplicationContext: initialization started
I gave it little thought until one day I tripped over a typical LOG4J patterns in use around these parts:
<param name="ConversionPattern" value="%d %-5p [%t] %c{1}(%L) - %m%n" />

It turns out that conversion pattern reckons the source file line number.  I’m assuming it had been employed to aid developers.  However, the use of that little critter comes with the following caution in the Log4j JavaDocs:

 L
Used to output the line number from where the logging request was issued.
WARNING Generating caller location information is extremely slow and should be avoided unless execution speed is not an issue.

So .. it’s been nagging me.  Just how slow could it be?   Well … I finally did a what they call a micro-benchmark using Google’s Caliper framework.  I tell you what!  That Caliper is a marvel – it intercepts stdout & stderr, warms up caches, heats up the JIT compiler, and all them other gory details to help make sense out of measuring things in a JVM.

I ran a test using 2 patterns differing only by that %L bugger:

private static final PatternLayout LINENUMBERS = newPatternLayout("%d %-5p [%t] %c{1} (%L) - %m%n");
private static final PatternLayout NO_LINENUMBERS = newPatternLayout("%d %-5p [%t] %c{1} - %m%n");

Ohmygosh! There was an order of magnitude difference:

 0% Scenario{vm=java, trial=0, benchmark=LineNumbers} 816290.85 ns; σ=6878.06 ns @ 3 trials
50% Scenario{vm=java, trial=0, benchmark=NoLineNumbers} 76665.96 ns; σ=22184.19 ns @ 10 trials 
             benchmark    us linear runtime
  LineNumbers_no_parms 816.3 ==============================
NoLineNumbers_no_parms  76.7 == 
vm: java
trial: 0
Note: benchmarks printed 183162000 characters to System.out and 0 characters to System.err. Use --debug to see this output.

If I’m seeing what I think I’m seeing, that %L critter appears to cost almost millisecond per log line.   Don’t let that get yer real-time system in trouble, ya hear?


July 6, 2011

I think it’s on with Google+

I read this snippet in Business Insider regarding Facebook’s troops defending their turf against the limited introduction of Google+Zuckerberg's Google+ profile

Everybody’s on Facebook already. Philip Su, the engineer who worked on Facebook video chat, said it’s a one button click to any friend “on the social network that already HAS all your friends.” That’s definitely not the case with Google+ yet.

I commented:  Yes, “everybody’s” on Facebook already .. but so many of my cohorts don’t really want to be there. I don’t need Facebook for work but I couldn’t do business without Google, GMail, Google Apps, Reader, and such. If Google+, LinkedIn, and Twitter can provide all required social interactions, I heartily welcome having one less presence to maintain. Had Google acquired LinkedIn, it might have been game-over.

If you’ve got a Google+ account, what do you think?   Does this resonate with you?

February 2, 2011

Init.d rc Script to launchd.plist Translator

The world really needs one of these.   It  would make Linux based services so much nicer when brought over to Mac OS X.

The problem seems to be that no one has the time to understand the completely different approach to agent and daemon management in OS X when adapting their Linux service to the Mac.  And unfortunately it is not a simple case of wrapping existing service scripts:  *nix init/rc scripts implement the starting and stopping whereas launchd performs this uniformly for a programs as specified by a configuration file.  Furthermore, launchd decides when to start, stop or re-start programs and requires that the program not actually do things that some classic daemons do, like run in the background and direct standard output to /dev/null.

So unless somebody takes the time to extract the intent in the service scripts, we get open-source services [Hello JBoss!] on OS X that just don’t fit well.

References

launchd on Wikipedia

launchd source code – Apple re-released the source code under Apache license in hopes open-source crowd might adopt it as a replacement for initrc, init.drc.dinetdxinetdatd, and crond.

launchctl(1) – Manual page for launchctl, the user interface for launchd,

launchd.plist(5) – Manual page for the data specifying a job to be managed by launchd,

Tags: , ,
September 2, 2010

My heart still belongs to Lala

My Lala profile

dude, where's my Lala?

I’ve just taken a test drive of Apple’s Ping and I am totally underwhelmed.   As a user of Pandora, Rhapsody, Last.FM, MOG, and most significantly, Lala, I am completely befuddled.  Why in the world would only iTunes purchase history be considered in user profile creation and not the wealth of data contained in the user’s iTunes library?  There are play counts, ratings, playlists, genre tags, BPM annotations and so forth.  No, really, can someone explain this to me? As it stands, Ping is utterly worthless to the musically driven social net citizen and is not likely to perform a meaningful social networking function in Apple’s marquee media store.  Surely Apple must realize how scale-free social networks are formed.  Without well-connected nodes capable of generating quality content, and without those nodes’ mass of preference data there is nothing going on here.   Had my library and playlists been pulled in I just might have cared enough to write some reviews, invite my tribe and hang around long enough for a little more Lala DNA to show up.  Not a chance now.

In summary, dear Apple, compare and contrast how hard Last.FM works to import and export user music preferences.

Tags: , , ,
Follow

Get every new post delivered to your Inbox.

Join 81 other followers

%d bloggers like this: