What my grandfather taught me about happiness

Boris K.
1919-2013
This is the eulogy I gave for my grandfather on March 14, 2013. He was 93 years old. 

I want to share with you something I learned from my grandfather. It may sound a bit odd at a time like this, but I want to tell you guys what I learned from him about happiness.

Here’s the thing: my grandfather had a tough life. He went through war, communism, poverty, emigration, and somehow, he came out the other end happy, kind, and loving.

His happiness showed through in every conversation.

For example, he spent over 20 years in the Red Army, and not by choice; his original plan had been to study history in college, but when WWII broke out, he was drafted. But if you asked him about it, the story he would tell would not be about the misery of military life, but rather about the life-long friends he made in the army and the discipline and strength he learned.



He fought in some of the biggest battles of World War II, including Stalingrad and Kursk, and was wounded several times. But if you ask him about that, he’d mostly smile as he told you about the pretty nurses he met while recovering from his wounds. He’d also tell you that he was wounded in the leg... though the photographs clearly show a bandage on his head... He’d just laugh about that too.


After fighting the Nazis for years across all of Europe, he ended up being part of the offensive that took Berlin. There is even a photo of him in front of the fallen Reichstag. Ask him about that and he'd tell you how much he enjoyed living in Berlin. With a German family. And how hospitable and friendly they were.


He lived through some of the toughest years of Communism in the Soviet Union, sometimes at near poverty levels in horrible communal apartments. But if you ask him about that, he'd tell you about his circle of friends, he’d go on about how Riga was beautiful, and he’d tell you about going to theater every night. 


I found his attitude astonishing, but wonderful. Life was never easy for my grandfather, but he never complained. Whereas I freak out when my iPhone loses signal for a minute and I can't check my email; and then freak out again because I can't use twitter to complain about the signal loss.

So what was his secret?  

I think my grandpa realized, perhaps subconsciously, that you can’t just be happy. You can be tall or you can be fat or you can be strong, but happiness is different.

Happiness is not something you have, it’s something you do.

My grandfather was happy because he always focused on the things he loved. That’s what he did. And when you do what you love, you do it well, and you’ll be happy.

For example, in the army, he was a medic. I cannot imagine the daily horrors and stress of a job like that. But my grandpa was able to focus on the parts he loved: learning medicine, helping people, and working with a team of doctors he admired. My grandpa became an excellent medic. 



Later in life, in his 40’s, he went to law school and began studying law. That’s not an easy career change at that age, and not an easy job at any age. But he never complained; in fact, he’d always light up when talking about being an attorney, about the amazing people he got to work with, and the perks of the job - you could tell he loved it. It’s no surprise he spent the next 30 years as a successful attorney.

Now, this isn’t just blind optimism; there is science behind it. There is research that indicates that if you just change your body language - force a smile on your face, assume an open, comfortable posture - after a few minutes, your cortisol levels drop, testosterone levels go up, and you feel better. You feel happier.

It’s also possible that how you react to events - in fact, the very words you use to think about those events - has a dramatic affect on your mood. When something bad happens, some people react by starting to curse, yell, frown, shake their hands, complain... Other people just look around, nod, and say “that’s... mildly inconvenient”. And just like that, the entire problem doesn’t seem so bad.

It’s counter-intuitive, but the way you think about things and your verbal and body language are not just a reflection of your emotions, but an active cause of those emotions. It’s a two way street.

By choosing to focus on the things you love, you aren’t just pretending to be happy, you really are happy. My grandpa’s happy memories of living in communist Riga or even post-war Berlin weren’t delusions: they were genuine happiness.


Happiness is not something you have, it’s something you do.

This doesn’t mean my grandfather totally blocked out all the bad memories. He wasn’t in denial. Years ago, I was watching Saving Private Ryan, a violent WWII movie, and my grandfather, who never watched any American movies, happened to walk by the room and watched for a minute. After a drawn out battle scene, he said “I’ve seen this before... it’s not that great”, shrugged, and moved on.

He remembered the war, both the good and the bad. But his reaction was of the “that’s... mildly inconvenient” variety, which made the bad, even the awful, tolerable. And then, of course, he’d be able to focus on the good. In fact, he was proud of what he did in the war - we all were. V day was one of the most important days of the year for him and always called for a celebration.


My grandpa had other passions that made him happy. He loved to go on walks. Every day, even multiple times per day, rain or shine, he’d go out on a walk. Walks made him happy, or maybe being happy made him walk, but either way, he got good at it. He even walked the dogs of family friends, partially because he loved dogs and partially because dogs were the only ones that could keep up with him on a walk.

He also loved a good conversation and became quite good at that too. Every family dinner would start with the a toast from my grandfather: he’d stand up, raise his glass, and inspire everyone with a few well thought out sentences. Sometimes he’d throw in a joke or even a poem. And he could talk to anyone. Language barriers didn’t matter: Russian, Ukranian, German, Yiddish, even learning a little English at an old age. The language of kindness and a smile is universal.

And of course, he loved his family. I think my mom turned out pretty well, as did the grandkids, so I guess he did a good job there too. I like to think we made him happy.


So, that’s the secret. Happiness is not something you have, it’s something you do. No matter what is happening in your life, actively focus on what you love and you’ll be happy. I think on a day like today, this is more important than ever.

So, as you remember my grandpa, do what he would have: remember the things that are good. Remember the stories he told you, the laughs you shared, and the amazing life he led. Better yet, share those stories with someone you love, while out on a nice, long walk.



Goldensunsky 1000/1600/2000 dpi High Speed Wireless Gaming Optical Mouse with USB Mini Receiver, Plug and Play 2.4ghz





Best Wireless Gaming Mouse - Goldensunsky 1000/1600/2000 dpi High Speed Wireless Gaming Optical Mouse with USB Mini Receiver, Plug and Play 2.4ghz is great for the price. There is anything to bad about it, it fits into your hand perfectly. I have been using it to play guild wars 2 and it has been working great after 5 hours of straight use.The mouse itself is not huge, and  fits comfortably

MySQL error: last packet sent to the server was XXX ms ago

I just spent a few weeks battling a strange, infrequent, hard-to-reproduce error when using JDBC to talk to MySQL. After about a dozen experiments, I think I've finally found a solution and I've decided to capture the details here, since my online searches didn't turn up this particular answer anywhere else.

tldr: If you see a "last packet sent to the server was XXX ms ago" error, you may want to upgrade your version of the mysql-connector-java library.

The Symptoms

I had a simple Java app in production that was using JDBC to talk to a MySQL DB. Everything was running great: DB calls were taking 2 ms on average and 8 ms in the 99th percentile. However, once every 4-8 hours, a strange error would pop up that looked something like this:


I can understand the occasionally slow query, but 28800126 ms? EOFException? What's going on here?

Lots of ineffective options

As usual, I turned to a programmer's two best friends: Google and StackOverflow. I quickly found my way to the MySQL docs and found out that MySQL has two timeout settings that will close a connection if it is idle for too long: interactive_timeout and wait_timeout. The default value for these two settings is 28800000 ms or 8 hours.

The general advice online was to make sure that your connection management library was sending periodic "keep-alive" queries to prevent connections from going idle. I was using BoneCP, so I tried everything I could to make it behave properly, including a few configuration tweaks as well as workarounds for a connection leak bug and a releaseHelperThreads bug. Nothing worked.

Eventually, I swapped out BoneCP entirely for a different connection management library. Nevertheless, after a few hours, the dreaded "last packet sent to the server was XXX ms ago" error would pop up on the production box.

The solution at last

For a while, I was at a loss. I couldn't see how two entirely different DB connection management libraries could have the same bug. I began digging for what the two had in common and realized that, under the hood, both would be using the same JDBC driver. For MySQL, this is Connector/J.

It's at this point that I noticed that I was, for some reason, using Connector/J version 3.1.12, which is quite old. In fact, it is officially obsolete and only compatible with MySQL 5.0 and below. This is unfortunate, as I was using MySQL 5.5 in production.

I figured it was a long shot that this was the cause of the errors I was seeing, but I figured that using the "recommended" connector version was a good idea anyway. I updated from mysql-connector-java version 3.1.12 to version 5.1.22.

And just like that, all the errors were gone.

The final word

So, there you have it.  If you see a "last packet sent to the server was XXX ms ago", it's likely one of two things:
  1. Your DB connection management library is leaving idle connections open too long
  2. You're hitting an incompatibility bug between the Connector/J version and the MySQL DB version

    Logitech M510 Wireless Mouse Review




    Best Wireless Gaming Mouse - I have been seeking a fully-featured wireless mouse for the past two weeks and have finally found my optimum choice in the Logitech M510 Wireless Mouse. This mouse is just large enough to be a comfortable fit for virtually any hand. The battery life is outstanding! The package says the batteries will last 2 years. I have been using it for gaming and normal computer