Instant Pot Pressure Cooker

Yes, I can do more than write software!  I have always been interested in cooking and couldn’t pass up  a great deal on an Instant Pot Pressure Cooker.

I love that I can saute things in the same pot that I can then pressure cook in.  So far I have only made Chicken Adobo (turned out great) and made some hard boiled eggs only took 8 minutes and they peeled really easy!  I made curried deviled eggs:


Cuuried Deviled Eggs With Cilantro

I then used Great Chow’s recipe to cook an 8 lb pork butt to make fantastic pulled pork.  Check out his excellent YouTube video for an entertaining walk through of the whole process.  I chilled the left over stock which caused all the fat to separate, solidify, and float to the top. I skimmed all the fat off and was left with an amazing stock. I added my favorite veggies to the pot and some chick peas, pressure cooked it for 20 minutes and did slow release. The soup turned out great – the rich broth with the flavors of the rub turned it into liquid gold.


A Call For Change: Mass Shootings and The Press

I haven’t blogged in some time, but feel moved to write this.

The recent events in Paris France and San Bernardino CA, USA are two more tragic events carried out by parties that had an agenda of spreading fear, chaos, and most critically — have as large an impact as possible by knowing their heinous  acts would be not only broadcast by world news agencies, but sensationalized.

Each time a mass shooting occurs, the news press not only reports the basic facts, but covers such an event in very dramatic fashion (e.g. showing police convoys, victims, terrified evacuees, loved ones in tears).  Covering mass shootings this way gives the assailants exactly what they want the most: a world-wide platform that they know will cover their acts in dramatic and highly emotional fashion; it gives them and their message the notoriety they crave.

Each time a mass shooting occurs gun control, increased screening and surveillance are proposed and debated.  Such measures can be divisive and do not address the main incentive that mass shooters all want: sensationalized world-wide press coverage to spread their final message.

I’ve thought about this at length and am convinced that if we take away their platform, will be taken away.  I would like this blog to serve as a catalyst for a world-wide call for all news press agencies to enter into a code of conduct and protocol agreement that specifies how they will cover a mass shooting:

  • Report the basic facts like other news (who, what, when, where).
  • Do not broadcast video coverage of the events or witness reactions.
  • Do not dramatize the event by issuing news alerts and breaking news flashes.
  • Do not speculate on possible motives and possible links to terrorist organizations.
  • Do not keep cycling coverage of the event.  Report it, indicate that the mass shooting press protocol is being observed and move on to other news.
  • Self police this protocol and report on news organizations that break this code of conduct.

Most importantly, the press must show a comprehensive and unified front by committing to this agreement and launch a major campaign that announces to their audiences that this is how mass shootings and other similar events will be covered.  I believe that if the press has the courage to commit to do this, the dramatic message platform that would-be shooters so highly desire will be taken away.  I don’t know if this blog will be read by many.  My hope is that what I am proposing will spread and action will be taken.


My Raspberry Pi Motion Sensor Project


, , , ,


I got a new Raspberry Pi model B+ in July.  The Pi has been out for a couple years and the B+ is the latest incarnation.  It’s an amazing little Unix platform (and it can run other OSes too) and the developer community for it is vibrant and active.

The Raspberry Pi bristles with interfaces (HDMI, USB, Ethernet, I2C bus, SPI bus, and an audio jack) all in a footprint about the size of a credit card! One of the unique features of the Raspberry Pi is its GPIO interface; this simple physical interface lets anyone connect a myriad of different devices.  Since this was my 1st project, I wanted to keep it simple with some basic requirements:

  • When motion is detected:
    • Capture a photo
    • Email and text the photo to a configurable distribution list
    • Sound an alarm for a configurable period of time
    • Set a configurable Pin number to High for a configurable period of time.  This can be used for anything, I used a relay so that a work light is illuminated just before the photo is captured.
    • Do none of the above if the motion has occurred within a configurable period since the last detection (this avoids repeated alarms, emails when motion has already been reported)
    • Log events, errors, management functions
    • Record most recent detection events (date-time of most recent, number of events, recent photos)
    • Illuminate an LED when the sensor detects motion
    • Blink an LED with the alarm is disabled so user is aware that the alarm is off
  • Provide a simple management user interface via web browser:
    • Disable alarm, photo capture, and emails (i.e. turn off), and Enable (turn back on)
    • View log entries
    • View most recent photos captured and date-time of the capture
    • View basic statistics: most recent detection, number of detection events since last reset
    • Reset – clear detection count, photos, date-time of most recent detection.
    • Panic button – allows the user to activate all functions (e.g. alarm, photo capture)
    • Silence the alarm

The raspberry pi is only $40 US.  Motion is detected with a simple passive IR sensor (about $6), that is connected to the GPIO interface and the Pi camera is triggered to capture a photo.  I connected some old computer speakers to sound an alarm.  The $8 wifi adapter allows my software to send emails/texts.

The user interface (written in JQuery and JSPs) is depicted betlow (featuring my Jack Rusell terrier, Rebound).  The server side is written in Java using the Spring framework.  The Pi’s little camera is actually quite impressive for its size and cost ($25), but as you can see low light conditions are a challenge.

User Interface

You can read more about it and download the software at

Keep it Simple – Scheduling.

We’ve all heard the saying ‘Keep it Simple’ [Stupid].

I needed a periodic timer to do some batch processing and wanted folks that operate the system to be able to set the schedule using cron’s scheduler format.  Our project is Spring based and being relatively new to Spring, but somewhat familiar with Quartz I wanted to use the “Spring Way” for integrating Quartz into my application,

I searched online and found an excellent example by Theodora Fragkouli.  As you can see there is a lot of Spring XML configuration required to setup a task, trigger, and the SchedulerFactoryBean.  It works (although note that if you are using Quartz 2, with Spring 3, you must change JobDetailBean to JobDetailFactoryBean and CronTriggerBean CronTriggerFactoryBean).

A lot of Spring wiring.  

I got it working in my web application, but my friend Joe suggested I keep it simple and take a look at using Spring’s @Scheduled which requires just a single line to designate a method in any pojo to be called on a fixed delay or with cron format scheduling.  It’s also possible to refer to a system property instead of hard wiring the cron schedule:

public class Foo {
public void onTimeout()
   // do something on timeout


Much simpler, but admittedly my requirements were simple.  I just needed a periodic timer that used cron’s syntax for scheduling.  Since my job was stateless using @Scheduled was fine and much much simpler.

I think the lesson I learned here was not necessarily the value of ‘keeping it simple’, that is a lesson impressed on me long ago.  The lesson I really learned;

– I immediately reached for Quartz simply because I was familiar with it and needed a scheduling solution

– My mistake was asking myself the wrong 1st question: “How do I integrate Quartz into Spring?”.  I should have asked: “What are my options for scheduling that best satisfy my requirements?”

If you need a simple scheduler, use @Scheduled, but be aware that it if you needed a scheduled job to maintain state (e.g. your system is event based and the event;s processing requires scheduling and state information when scheduled then Quartz is a better choice).

A Global Warming Sonnet

Green house gasses generate carbon taxes?

   Another hot summer of our discontent.

Buy a solar panel and a wind turbine?

   Oh blow mighty wind when the sun don’t shine.

Sea levels rising from melting ice sheets,

   Will we mourn the once Great Barrier Reef?

We know better, in our depths we all know

  Our lives short and they’ll solve it tomorrow.

Change.  Made by man?  Natural cycle? Both?

  Let’s debate when it’s too late with grim loath.

Our heavenly sister Venus prey teach us!

  Her climate the original hot-mess.

With hope, we’ll cope, compulsory regret.

   Another hot summer of our discontent.

You Don’t Have to Call The Highs and Lows


, , , ,

I am a working guy and I invest some of my earnings.  I’ve been investing long enough to see the ups and downs of the bond and equity markets and no surprise, they are cyclical.  Equity markets buy in anticipation of future growth bond markets respond inversely (usually) to interest rates.  Markets sell when the greed that pushed levels up finally turns to fear, the most striking (some would say absurd) example is the Dutch tulip mania of 1637:

I am not an all-star investor, my approach has been simple:

  1. Look for the best return i think i can get for the perceived risk, there are a number of good online stock and mutual fund selectors to help you do this.
  2. Stay diversified across small and large cap domestic and international stocks, government and corporate bonds (including some junk)
  3. Take profit when you have reached a goal and re-balance your portfolio with the proceeds
  4. Above all, beware of high management fees (anything higher than 0.75 is too high in my book)
  5. Favor index funds, they are hard to beat and normally have the lowest fees

Some might question item # 3 – how do you know when to sell and when to buy, after all no one can time the market (other than insiders of course!)?  I absolutely agree with this, you cannot call the absolute highs and lows but the truth is you don’t have to.  You can still do well by simply recognizing that markets go through boom bust cycles of various duration (some can be a decade or more long).  You can take advantage of this fact by simply setting some very simple goals:

– I am going to maintain my current portfolio mix until the mix changes to a point where one or more asset classes has changed by say 6 or 8, 10 percent. For example, if my international funds have grown by 10 percent, I will take some profit and spread gains across other classes to maintain my target mix.  In affect sell when others might still be buying.

– The same applies on the downside … and this is hard.  If an asset class loses X percent, and you still believe your mix should include the original balance, then you need to sell from other classes and buy into that falling class..  In effect buy when others are selling.

Notice I am not talking about predicting market highs / lows (that would be foolish), rather I simply set reasonable goals after doing my homework.  You will not be a stock / bond picking all-star with this approach.  In fact the famous investor and philanthropist Warren Buffet once said something to the effect “Diversification is what you do when you don’t know what you are doing”.  Probably true.  I don’t kneed to calls the highs / lows or best asset classes, I just need to do well enough over time to meet my personal goals.


Life with Rebound


, , ,


Rebound is a Jack Russell Terrier (or Jack Russell Terror depending on your point of view).  He has been a faithful companion and court jester over the years.  Favorite things:

  • Chase squirrels and rabbits from the yard
  • Go into a sprinting fit whenever we have company
  • Quality time on the sofa
  • Occasional treat

Least favorite things:

  • Thunder, fireworks
  • Intruders (i.e. other dogs) in his lawn
  • Being left alone (even for very short periods

When considering a JRT I received dire warnings: “too spastic, will never obey, hard to control”,  When he’s excited, he exhibits some of these traits, but the overwhelming majority of time he is a loving, obedient, comical companion.  Despite being 10 years old, he still likes to play with his toys and still likes me to chase him around the house in a bit of ‘catch me if you can’.  Above all he is a people dog – it doesn’t matter where he is as long as he has people to be with.that love him.  He has made the quality of my life better, for that I will always be indebted to him.


About 7 months ago I hired a personal trainer (Matt).  I’ve had a workout routine I’ve used for years and thought I was doing fine; treadmill, machines, weights.  Matt introduced me to the “functional workout”, a workout that emphasizes using your own body and body weight (think squats, push ups, pull ups, burpees), and simple dumbbell exercises.  He taught me two key things:

– Maintain form always; don’t slouch, lean, or ‘cheat’ when doing an exercise

Intensity, give it all you got when doing an exercise and don’t take long breaks between each exercise.

I’ve always understood the importance of form, but Intensity was / is a game changer for me.  It’s taken my workouts to a whole new level.  You don’t need lots of equipment or hours in the gym, just dedication.  If you’re skeptical hire a trainer, even for just a few sessions or take a body-pump class, it’s one the best investments you can make in yourself.

Thoughts on software development in the fall of my career


, , , ,

I’ve been a professional software developer for more than 25 years.  My progression in the field has been somewhat typical:

  • started out doing C/Unix in the 80s
  • moved to C++ in 90s
  • transitioned to Java in early 2000s
  • JEE / Spring and other enterprise technologies from 2004 on

I’ve managed to stay technical by constantly learning (almost exclusively on my own) and ensuring I still have to deliver working software regardless of the development process being used.  While many of my contemporaries tell me “I used to develop software, wish I still was”, the truth is, if you love doing it you’d still be developing.  I laugh (to myself) when I hear various managers tell me that I should be an architect or you need to be a development lead, etc.  These are important roles and I understand they typically go to someone with more experience, but I have always viewed ‘software architect’ as one of many roles an individual can play during the full software development life cycle (SDLC).  I guess as your wages go up those who manage expect that you naturally want to do the same – manage, lead, be a thought leader, whatever you want to call it.  So it has been a challenge to continue to stay with a company that lets me remain “hands-on”, but I have done it by delivering; at the end of the day that’s what matters.

I remember when I started my career, I was the youngest guy (young punk according to one of my managers).  I am now the older guy and have defined my role in the SDLC as a player-coach; someone who has the same deadlines to deliver as everyone else, but also mentors younger folks who are new to software development.  Personally this is a satisfying and rewarding role and a way to pass on things I have learned to others.

Software development as a lifelong career is still being defined, it is currently viewed by many as a younger person’s trade craft.  Some will say the career progression should be developer, then development lead, then architect, then software manager. Others purport their company does have a technical path, from developer to architect then fellow or principle architect to technical adviser.  I find those latter roles to be primarily management tilted and not very technically deep.   They may be perfectly legitimate career paths, but not for all; certainly not for me. I admit it is hard to remain hands on as you get older and yes, more expensive.  I am grateful my company still lets me be hands on, I keep up my end of the bargain by continuing to learn, contribute, step-up, and deliver.

I’d like to put in another 5 – 7 years of doing what I am doing, then [hopefully] be in a position to give back to the Open Source community.  I have benefited from so many open source projects over the years from Apache, JBoss, and many others.  I think every software developer should at some point should consider giving back; the needs are great and what a waste it would be to simply retire and not continue to use all that you have learned.