A few months ago, I joined a software team that’s making use of Kubernetes as a platform to provide elastically scalable software services.  It’s Docker + more magic.

One of the tenets espoused by some folks building container deployments is that a container should only have the software on it required to run a single process / microservice.  The particular software system I’m deploying is a private Docker registry, but to deliver the service, there are currently 4 Docker containers in play.  (I actually think that to solve a problem I’m having, I’ll need to add two more.)

One of the containers wasn’t behaving nicely for me today.  The container provides a web user interface and needs to communicate with a database provided by another container to store and retrieve its data.  But the logs were saying that the user interface container couldn’t log into the database.

The first two options that came to mind:

– the hostname wasn’t accessible to the ui container

– the port wasn’t open on the database container

Turns out, it was neither of those: it was a badly shared database password.  But in trying to prove or disprove those options, I ran into a challenging problem.  See, the UI container _only_ had the binary for the UI process on it.  Which meant: it didn’t have ssh, telnet, curl, wget, netstat, or any of the various other options I came up with to verify network connectivity between the containers.  How to get my answer?  Google + Stack Exchange to the rescue!

In recent versions of bash (which thankfully the golang image did provide), bash will let you access TCP and UDP ports directly, ala

cat < /dev/tcp/databasehost/3306

Running the above from the ui container got me a garbled prompt received from the database container, which proved that the hostname resolved AND the port was open, all in one command.

Kudos to Peter Mortenson and his answer on superuser.com  for helping me crack the bug.  Tuesday’s bug (courtesy of the Monday holiday) will be to see if Beego.Run() doesn’t crash if I manage to map in the app.conf file not otherwise being provided through my Kubernetes replication controller descriptor.  Not good to have applications just stop without an error message!!

 

 

We’re hiring at my company, Hayden Software, and I’ve been asked to help interview for my contract, so I’ve had a few different opportunities to ask candidates how they track down programming problem solutions.  The usual answer?  Either Google or Stack Overflow.  Both are reasonable answers, though are a bit broad brush in terms of their coverage.  If I find something mentioned in documentation, what I’d _really_ like is to see a working example of it.  Particularly since most programmers seem to write awful documentation.

I’ve taken, of late, to trying to use GitHub as my compendium of source code examples.  I’ll assume that the folks who cared about this post already know what GitHub is…  if you’re hear to read a post about clowning, you’ll have to wait for the next one…  GitHub announced in 2013 that it had reached over 10 million code repositories.  It’s not quite yet the infinite monkey theorem, but there’s definitely enough source code there to make me think that any library or framework feature that I’m interested in using already has a bit of sample code for it in someone else’s repository.

But how to find the examples I’m seeking?

Recently I was seeking examples of fabric8’s docker-maven-plugin in use.  It’s one of a couple of plugins that are supposed to help with managing Docker builds and Docker containers.  I don’t personally find Docker build files particularly challenging, but perhaps the managing the containers part would somehow be made easier with the plugin.  (TL;DR: finally didn’t find it useful, at least for our uses).  But in my hunt, I wanted to find examples of folks using this thing…

That plugin would be used in a pom file.  So, I want to find pom files that make use of the plugin.  In the case I originally went looking for, I wanted to use something called inline plugin configuration.  Basically, if I was going to use a Maven file to do the docker build, I wanted to keep all of the build information in the single pom file.  The docs described it as possible, but it just wasn’t coming together for me.  So, the query against Github:

(inline assembly docker-maven-plugin fabric8 dockerfile)  filename:pom.xml fabric8

Look across all repositories for a file named pom.xml which had certain keywords in it, and which were part of a repository or owned by a user which included the word fabric8. Found a few examples (and, and), but nothing which blew me away on the usefulness of that plugin and approach.

What about when I wanted to see examples of a particular routing package used in Go code?

language:go beego router

Wow, that gave me back 7K+ results.  Maybe narrow that down a bit?  I’d like to narrow that down by cross-checking the stars on the owning repository: theoretically, something with more stars would have more useful examples.  Interestingly, I cannot seem to get that to work as I’d like…  Although I can hunt for repositories with the phrase beego in their name or referenced in their description, I cannot get it to further check files.  The query below ignores the ‘stars’ descriptor and gives the same 7K+ results.  (I say ignores because I pulled up one of the repositories and it showed zero stars.)

language:go stars:>10 beego router

So, GitHub filtering has its challenges and quirks.  That said, I can also filter on looking for code within a particular repository or by  particular user, both of which help in filtering out the wheat from the chaff.

I can’t learn everything in software on my own, but if I can learn from someone else’s example (good or bad, assuming I recognize the difference), I can get the thing done and build upon my knowledge very efficiently.  Would love to hear if other folks have code search tricks and techniques, on GitHub or otherwise.

 

In last month’s Nerd Nightmare, I described the interruption of flow of a broken arm when one works at a keyboard.  So, here’s the update since then…  I did get a plate and some eight screws to hold everything to the bone.  I spent two weeks in a splint and a sling, and then got my stitches out and was put in a exoskeleton sort of removable hard splint.  Turns out, I get light-headed when I see fresh scars on me: nearly hit the floor the day the doc took the stitches out.  Since that appointment, I’ve been doing a twice a week physical therapy visit to work to get the mobility back in my wrist and arm.  Two days ago, the doc even told me to take off the exoskeleton..  Scary times.

The bones are apparently healing nicely, based on what the doc said this week after seeing new x-rays.  The marathon part refers to what it takes to get mobility and strength back.  Right now, my right (non-broken) wrist can pivot 90 degrees from thumb up…  I can go palm down or palm up, no issues.  My left wrist can go mostly flat if I go clock-wise.  And I maybe get 10 degrees counter-clockwise.  My right wrist can get close to 90 if I bend it up, and something much less than that bending it down.  My left wrist gets about half down what the right does, and barely makes it out of flat when trying to pull up.  Needless to say, push-ups are out of the question the right now.

My physical therapist tells me not to worry, that it’s a marathon.  I told her today, I’ve run marathons.  There are those who run sub 5 minute miles and finish in 2 1/2 hours (not me) and there are those who run 5 1/2 hours or more (me).  She laughed and didn’t comment further…

I got a turtle tattoo on my leg after my first marathon, as a marker of a dream accomplished and work put in.  What’s my wrist marathon tattoo, I wonder?  Got a handy 6 inch scar I guess I can work in…

I’m typing this out one-handed, as my left arm is in a splint with a broken arm and wrist.  Nerd nightmare.  Complete interruption of “flow”.  No longer do my thoughts just appear in code..  everything’s slowed down enough to make even the ideas disjoint, as well as my arm.  Pain coupled with frustration makes every day a slog…  and the guy who wanted to hold a design discussion in a chat room?  He held a special label in my heart that day.

Now, a few advantages just to help focus my mind in a better direction…

– I’m getting better at taking advantage of bash shortcuts, aliases, pulls from command history, etc

– More in-person chats to get things done mean a chance to get to know my co-workers better

– The more junior members of my team are getting more focused time from me.  Their hands on a keyboard solving a problem are much more efficient than mine.  My personal productivity is down, but our team’s going to look great at next week’s sprint review.

Tuesday I’ll get to become a bit bionic with a plate and screws, and some two weeks after that I might get the ok to do more than just open and close my hand.  So, there’s hope in sight. But only a week into this nightmare, I’m really not looking forward to several more…

My life has many aspects, and I’ve always been sensitive to losing my identity through motherhood.  Too many women I know go around known as “Mikey’s mom”, rather than as someone with their own interests.  As a Sunday school teacher before I had kids, I realized I knew many folks through the church as “Mikey’s mom”, rather than “Sue” or “Elaine” or “that awesome mom with this talent in…”.  So, I’ve always been interested in exploring many interests and highlighting things here from those interests: coding, clowning, business, motorcycles, etc.  But now let me give you into my life as a mom.

Tomorrow is my son’s 10th birthday.  He’s the youngest of my three.  While we don’t have birthday parties with friends every year, we’ll do it for big birthdays.  Ten counts as one of them, as does thirteen, which is what my middle daughter will turn in just two weeks.  So tonight we have the sleepover for my son.  He had 5 friends join him for a Harry Potter birthday party at our house.  We did a Dementor pinata, a Quidditch match, a cake that would have made Hagrid proud, butterbeer, polyjuice potion, and lots of jellybeans and chocolate.  (No chocolate frogs this time…)  The house was decorated in Hufflepuff colors and we had a photo area for ‘Have you seen this wizard?’.  All of this is homemade…   Pool noodles became brooms and hula hoops became Quidditch rings.  Paper bags and black clothing became a pinata.  Ice cream and cream soda became butter beer.  Much consultation with Pinterest over the past few weeks…

Tomorrow is also the fun fest at our church.  My daughters were approached to do face painting, and to help them fend off feeling completely responsible, I became responsible for face painting.  Tonight we three were practicing.  On my hand, I have a two different flowers, a heart, and a shark.  Each daughter has some set of images on their hands and face, all in the name of practice for tomorrow.

Next Saturday is the Homecoming dance, my eldest’s first.  So, in addition to party execution and face painting, tonight was online Homecoming dress shopping.  We debated dress length, dress fit, and backup plans in case the one ordered doesn’t hit the mark.

All this is the life of a happy mom on a Friday night.  The earlier part of the day had satisfying interactions with Gitlab open-source code as part of work.  But the afternoon and evening has happily been consumed with making memories with my kids.  There are 4 boys around my kitchen table right now playing a drawing game and generally ramping down to go to bed for their sleepover.  Some of them are unfortunately still eating the sugar we overstuffed them with earlier – slightly counterproductive on the whole sleeping thing of sleepover….  But much less energetic than the epic Nerf battles going on earlier.

The life of a mom… Ahhhhh…

 

I can now say, I was a member of the Ms. America parade. I’m not a pageant kind of gal myself, so it wasn’t exactly on the bucket list. BUT, now my husband can say he’s married to someone who was in the Ms. America parade. Score!  (For the record, I’m the blue-haired clown in the back row… ) 

msamericaparade

 

Had a great time high-fiving kids and adults along the parade route….  two miles of Atlantic City boardwalk, lined with folks on both sides.  We saw young and old, all interested in interacting with clowns and having their days brightened.  Even in my newbie clown state, I got to help brighten a few folks’ days.   Expect the wig to change by the next pic, as well as the makeup – learning with each new event how to get better at clowning…  Uh, and learning to take environmental conditions into consideration – the wind along the boardwalk made wigs, clown noses, and clown props much more of a ‘will they stay on’ kind of affair…

 

Seen on Twitter this morning with guilty amusement:

 

Made me laugh as I thought of blocks put into my Docker files to let me go in and see what state things were in after I ran them.   Move 2 lines of code around from place to place and see what new info I glean…

#####DEBUG - exit here to check state
exit


Or console.log statements with odd text that should _never_ make it into checked-in code, but acts as a visual trace of the flow of code.

Or conditional asserts put into code to verify that a condition really does happen on the Nth +1 iteration of the loop.  (Handled with less danger of an inadvertent code check-in by setting these up as conditional breakpoints in a debugger..)

Or even comments added in to help us better understand what we think we’d like to keep versus toss in a burning hole.  (Source of comments: Apollo 11 Guidance Computer source code…  Way before my time, but demonstrating another ancient programmer spell…)

Got any new tricks to add to my bag?

Sunday evenings: are they filled with potential for the week ahead or remorse for the weekend now ending? For me, it’s an odd mix of both…

Sundays are generally relaxing. We sleep in a bit, at least as compared to the school and work week, getting up in time to make it to church. Since there’s no Sunday school during the summer, that means we need to be there by 10:30. Seeing as I work to get into work between 7 and 7:30, that’s a several hour difference of sleep and just general languidness and enjoyment of my bed, breakfast, and beagles.

Sunday afternoons, we’ll often go out to lunch as a family after church, and then maybe visit friends or play a softball game or go for a walk. There’s a real enjoyment to Sunday. And yet, I spent part of today feeling restless. What am I achieving in this restful state? (Besides observing a commandment…) I need to retrain my brain to enjoy the rest, to perhaps pursue a hobby (practice some balloon twisting? go for a run? cook something interesting?) rather than weigh examining government proposals or building recruiting budgets or checking out technology questions. Those are Monday through Friday things. (Saturday is catchup on lawn, on housecleaning, on commitments to volunteer efforts…)

So Sunday is also a day of anticipation, of getting back into the swing of achievement of Monday through Friday. I can dig back into Docker without thinking I’m short-shrifting something else. I can read code with appreciation and enjoyment. I can look at government SBIR descriptions and plan and scheme on how best to answer with a proposal.

Love this ebb and flow of go-getter-ness and slow-down-edness. I don’t think I could appreciate either one as well without the continual rhythm of shifting between the two of them.

Happy Sunday!