Mostly about my amusement

Year: 2014 (page 2 of 4)

What if everyone felt this way and talked about it?

This past week hasn’t been an easy one. The world lost a charming, well-loved and talented man. This has inspired people to talk about depression and how it affects all of our lives.

Why don’t people talk about it? Because it’s personal and when it happens to you it sucks and hurts. But what many people are not aware of is that they’re not alone. It happens to a lot of folks and everyone shouldn’t feel like help is not available. It is and you can get support.

Years ago I was catching up with a friend on the phone and somehow I had said this:

I’ve forgotten what it feels like to be afraid.

I meant it too. I had a great job, my family was doing well, my commute was easy (work was a 10 minute drive away). At that moment on the phone I could not remember the tenseness, the dread, the fear of doing everything wrong at work and in my personal life.

I remembered those times but I could not remember at that moment what it felt like. It was gone and I was finally relaxed and at peace. It made me nervous but that was OK.

Less than a year later I called Lily on a Friday just before noon and said how sorry I was but I needed to quit my job immediately. It was not working out for me and without getting myself into trouble I can say that some people do not deserve the label “human being”.

Lily’s response was exactly as I had hoped.

It’s fine, it’s going to be alright. Don’t worry just do what you have to do. It’s OK.

Support is important and it counts. I resigned and was granted the next 2 weeks off paid. Some of the people I dealt with were raised by a family after all.

I had to quit. Normally being depressed makes a situation worse but for many months at work I was feeling trapped. I became short-tempered, I was eventually talking to myself in front of Lily (thankfully just her I think). I began to respond to everyone either defensively or with outright hostility. I came down with shingles.

Walking away was the start of my dealing with my problem. After a short 30 day break I found new work. While it’s not always flowers and sunshine, it’s good and I’m lucky to be in that environment where I can contribute positively.

That’s how depression is for me

It’s that unreasonable fear and sadness about everything I do. Sometimes it’s from a bad day or it comes for no reason at all. It’s being angry at myself and eventually others. It’s being frightened all the time and it feeds itself in a sick loop. Sometimes it stops me cold. It’s not always there thankfully, and usually it’s delivered in small doses and I cope with it. When it really hits hard I can’t get a thing done.

I deal with it by relying on my family and friends especially Lily. I do reality checks all the time. I have to as sometimes someone will say a word to me and I’ll need to step back and realize that they didn’t mean to upset me.

When I don’t deal with it I lash out at those near me. I treat others badly and I become ashamed.

Help when you can even if you don’t understand

People who are dealing with this aren’t bad, or weak, or anything. They need help and support. My support is my family and it works for me. I hate using this phrase, but for me this is not that bad.

Some aren’t that lucky and hurt themselves or others. If you suspect someone is dealing with this try to be supportive. Even an “Are you OK?” can help turn it around and your support means the world to people. It’s a dialog and if that doesn’t work then just being around can make it better.

If you are going through this then it’s OK. You might not know it but you are not alone. Others are coping and getting support and that can happen for you too. It’s hard but talk to someone about this, write about it, put it down on paper. Consider seeing a doctor. It just may help you cope and you can begin to feel better.

Feeling better even in degrees is a great relief and no one should deal with this alone.

Wash, rinse, repeat kitchen faucet edition

A week or so ago my kitchen Delta faucet slipped on its mount and refused to go back. The faucet was held in position by 2 wimpy 8th of an inch plastic tabs. I have 2 kids and you know what happened. At least it lasted 3 years.

Last Saturday I got a new Kohler replacement as I like to give new companies a chance. The faucet mounted fine but it sprayed everywhere and washing dishes as like washing them in the rain. It’s not adjustable enough and I’m returning it.

I’ve just installed a new Delta faucet and it gets the Dembowski Household Seal of Approval™. It also has the same wimpy plastic tabs to hold it into position so in less that 3 years I expect to do this all over again. Delta has a lifetime warranty and I plan to speak with them about the last faucet.

I am so keeping the box and all the parts for the new one.

I may have broken my Feedburner feed

After I converted my WordPress install to 100% SSL I noticed that my own feeds in Tiny Tiny RSS were not updating. Years ago I forwarded my RSS feeds to Feedburner and 301 redirects from https://blog.dembowski.net/feed/ https wasn’t working.

I can’t even remember why I used Feedburner. I’m pretty sure I turned it on in a moment of “What’s that button do? *Monkey pushes button*”.

I’ll keep testing but eventually I’ll disengage Feedburner and just use https://blog.dembowski.net/feed/ instead.

Edit: This work around seems to fix it.

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} blog.dembowski.net [NC]
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} !^/feed/$
RewriteCond %{REQUEST_URI} !^/index.php$
RewriteCond %{QUERY_STRING} !^feed=rss2$
RewriteRule ^(.*)$ https://blog.dembowski.net/$1 [R=301,L]
</IfModule>

The part starting at line 5 is where I added conditions so that the SSL 301 redirect will be ignored.

Why not use SSL and be done with it?

On the Internet there has been talk about Google and SSL based web sites. Apparently you may get a small boost if you switch to https. I myself doubt that (I’m jaded that way) and the additional SSL math will slow down busy sites a little. But I don’t get enough traffic to care really and I do like to play. This seems easy enough to do.

I Like Server Based Solutions and I Cannot Lie

I use WordPress multisite and on my web server I have a valid SSL certificate installed. I’m already using Apache’s mod_substitute to modify https://blog.dembowski.net/ to https: before it get’s sent to the browser for my SSL site.

Why not switch to SSL and be done with it? I could have used a tool to change all the WordPress database references to https but I’m running multisite and I wanted to be a little more site specific so I added this to my .htaccess file above the WordPress part but below the “Get Lost, I don’t like you” part.


<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} blog.dembowski.net [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://blog.dembowski.net/$1 [R=301,L]
</IfModule>

So far it hasn’t broken anything and is limited to my this one and not the other sites. I’ll keep an eye on it but there’s no reason for me not to leave it that way. I like server based solutions but for other people a HTTPS plugin may be an easier way to go.

The only downside is that I will need to maintain my SSL certificate but I plan to do that anyway.

So this means I wear a tin foil hat?

Not really but it does mean in most cases people visiting my site will get the traffic encrypted between my site and their browsers.

*Adjusts Tin Foil Hat™ and skips conversation about  SSL transactions and man in the middle interception*

It’s more a concern that someone will have some key logger or other hack installed on their machine.

Sniffing unencrypted data on the Internet is easy. Doing so for encrypted SSL traffic is more difficult. It would require the Bad Guy or Spook to have access to the private certificate issued by the certificate authority. Or exploit a server bug and harvest the SSL private certificate from the web server. That would never happen right…?

If your interested in how it all works then start with this Wikipedia article on TLS. This Digicert article is good too and may be easier reading. In the meanwhile anyone coming to my site will get redirected to the SSL based version.

That was a short walk and I installed Xmarks

When I switched the laptop back to Firefox I bemoaned the lack of being able to synchronize my browser’s bookmarks with each of my other devices. That was on the list for why I used Chrome in the first place:

  1. Shared passwords
  2. Shared history
  3. Shared bookmarks
  4. Participating in the massive data collection experiment known as The Great Google™ BOW BEFORE THE DATA COLLECTION MONSTER!

That last one always made me tighten my tin foil hat just a little.

Shared passwords are easy with 1Password. I set it up to synchronize with Dropbox, picked a reasonably complex password that I can remember and just go. I have my passwords on Windows, Mac, my Android phone and the iPad. It doesn’t work with Linux as far as I know but I always have my phone with me and it’s all good.

Using Xmarks covers the other items and it works well.

I use it to synchronize my bookmarks and history but I turned off the other add-on items like site info. This shouldn’t surprise me as I’d used this tool before and I still can’t recall why I stopped using it (though it might have been because it shutdown for a while).

It works in the background and with those other features disabled it’s really transparent and unobtrusive. That’s good software design: it performs it’s job and gets out of your way. Cool.

I could setup my own server to sync with but I don’t think my bookmarks are really that telling. That doesn’t mean there is not a lot of good social engineering potential in my bookmark data: it’s just that I’m already tracked one way or another by the Great Google Monster™ so Xmarks isn’t high on my list to be concerned about.

Featured image photo by B Rosen

Cross platform browser bookmarks?

Chrome on my laptop drains the battery dry so I’ve installed the current Firefox and went through some quick installations and all is right in the world. I installed the following:

  1. Firefox – Duh.
  2. 1Password4 extension
  3. Greasemonkey

It struck me that my favorite tools have cross platform equivalents.

  1. Chrome
  2. 1Password4 extension
  3. Tampermonkey

But what I am lacking is a tool to easily sync my browser bookmarks. Yes, I can easily export and import them but I’m lazy and would prefer a tool that works across all browsers.

I may need to give Xmarks another look. I forgot why but there was something about it years ago that turned me off.

I prefer using apps that work the same between platforms. I use Postbox for that reason (it’s also a cool mail app) even though it doesn’t have any data sync exactly. I’m using the same mailbox in both so the experience is the same even when I accidentally send a private email to a mail distribution list. I make the same mistakes on both versions.

The same goes with the 1Password application and I was thrilled when the Windows version was updated. The 1Password app is a great example of cross platform utility. The experience between Windows and Mac just works and it works consistently.

I’ll need to do some digging for a bookmark solution that I like.

Featured image Photo by Titanas

Twenty.

I'm sitting in bed typing this and Lily is reading a Chinese newspaper she picked up after dim sum with The Girl this morning. She wants to keep those language skills alive. Tomorrow morning I'll read this one last time and then press "Publish".

It will be July 16th, 2014 and I'll have been married for twenty years. I've been with her for more than half of my life. Memory works by association and I remember all of those years from when I first met her.

It's easy for me to remember. A smell, a word, a sound and I can associate it with something involving her.

I can do the same thing from before we met but those memories are strange.

I remember my family. I remember school. I remember summers upstate for weeks running around in just shorts and nothing else. Shoes at home will always be optional for me because of that.

She's there in those memories but she's not. It's like she's off stage and just hasn't stepped into the scene.

I'm learning how to swim in a lake and she's just out of sight at the shore. I'm coming back from the grocery store for my mother carrying 2 big brown bags full of food and she's just around the corner. I am speaking with my grandmother and she's there listening to every word. I'm learning that I have some of my other grandmother's gift with animals and she's nearby but she doesn't like dogs. I'm climbing a tree and she's waiting for me to come down. I'm in high school and my grandmother is gone. She's reaching out to me waiting to hug me.

She's there and I can't explain it. It feels like I've known her, wept with her, lived with her and loved it all my whole life.

We're meeting for the first time. I'm nervous and I don't know what to do or say. My friend introduced us. I don't know how I have the confidence to speak with her and I'm speaking too much. I'm meeting her family and working hard to impress them. I'm holding her hand. She's meeting my family. We're starting our own family. We're doing things together, big things. It's all so easy saving, planning, doing it all with her.

She's reading this. She's here. She's with me.

Excerpts and not full content, but only sometimes

WordPress filters and actions remains one of my favorite features. There is so much that you can easily manipulate without modifying a theme’s files.

For example: on my front page I like the latest published post to show the whole content with a featured image if there is one. For the rest of the articles I want to display the excerpt and no featured image. This is the same on the front page and subsequent pages.

One way to do this is to create a child theme and modify the PHP to get the effect you like. There’s a few reasons why I don’t like that option.

  1. Child themes are fun and I always recommend users create them. But I’m bad at maintaining them when the parent theme is updated.
  2. My CSS is just awful and I’m pretty sure I’d break the responsiveness of my site.
  3. Filters are cool! I can use this code in a plugin.

Filter the_content

I took a shot at making my own filter but a quick search found that Justin Tadlock had written a really good post on the topic already in 2008. I use that code in my function but added a few lines.

// Get the ID of the last published post
$mh_last_id = wp_get_recent_posts( array( 'numberposts' => '1' ,
     'post_status' => 'publish' ) )['0']['ID'];

// Get the post format. If the post is a standard format then the value will be false
$mh_post_type = get_post_format();

I do not want to show an excerpt for the latest post  and only want to modify standard post formats. Anything else I want to skip. The reason I only want to play with standard format posts is that other post types break horribly when I force the excerpt this way.

Except for adding to the conditional statement, the whole function is copied from Justin’s post. He writes great code and explains it much better than I do.

// If is the home page, an archive, or search results and not the last post and is a standard format
if((is_front_page() || is_archive() || is_search()) and $mh_last_id != get_the_ID() and !$mh_post_type )

That’s a little ugly to look at but it does the job.

What about the featured image?

In the past when I wanted to hide the featured image in a child theme I would use CSS like so.

.ryu-featured-thumbnail, .attachment-ryu-featured-thumbnail, .wp-post-image {
     display: none;
}

Which works but is a little heavy handed. My WordPress installation still sends the HTML for the featured image and the browser still pulls that image. The end user just doesn’t see it because it’s not being displayed.

I don’t want to remove featured image support from the theme and I don’t want to send that HTML either. Thanks to the post_thumbnail_html filter I don’t have to.

add_filter( 'post_thumbnail_html', 'mh_post_image_html', 10, 3 );

function mh_post_image_html( $html, $post_id, $post_image_id ) {

// Get the ID of the last published post
$mh_last_id = wp_get_recent_posts( array( 'numberposts' => '1' ,
     'post_status' => 'publish' ) )['0']['ID'];

if ( (is_front_page() || is_archive() || is_search()) and $mh_last_id != get_the_ID() ) {
     $html = '<!-- Featured image not displayed in excerpt -->';
     }
return $html;
}

This code checks if we’re the first post and replaces the post_thumbnail_html with a simple HTML comment.

Child theme or plugin?

This code works either way. At the moment I am using this in a plugin but the whole thing can be implemented in my child theme’s function.php file.

It belongs in the child theme because I’m playing with the presentation and that is theme territory. Editing a copy of content.php in the child theme directory would be more theme’ish but I like filters. Filters are cool.

I’m not good at keeping my child theme changes in sync with the parent theme so using a filter lets me just play with the results and not mess with theme files. In a plugin or the child theme’s functions.php file the filters still work the same.

There is no anonymity on the Internet

Well, at least in the U.S. there really isn’t. This morning around 2 AM EDT a troll followed me from a topic on the WordPress forums from Denver, Colorado.

He’d poked around for about 30 minutes with his Android tablet using Firefox (likely from his parents basement) and left a racist contact form submission about my wife and how I “struck out with pretty white girls and ended up in the bottom of the social barrel”.

There’s something really sad and pathetic about someone posting that from their parent’s basement after midnight their local time.

None of that bothers me; trolls on the Internet have been around forever. I’ve heard that in the work place (though that was 20 years ago) and hey, it’s the Internet.

Had he left anything remotely threatening then instead of a blog post I’d be preserving log data for law enforcement and making some calls this morning.

What irks me is when a plugin developer follows me home to continue an argument or leave a “<EXPLETIVE DELETED> YOU!” message. When that happens I don’t get angry but I do get disappointed. It doesn’t happen often as most WordPress developers are cool.

Troll are bad. WordPress developers losing their mind? More sad than anything else. I expect people who contribute to the community to be better than that. 😉

Really? Congratulations!

I get odd solicitation calls but occasionally people dial it up to eleven to try and sell things.

Yesterday Lily got a call at the store from someone looking for me. It happens and I’m pretty sure that Googling my name might lead you to the store’s WordPress site.

What was odd was that they’d pronounced my name perfectly and seem to have a Polish accent.

Lily got the phone and had this conversation.

Sales Monkey: Can I speak with Jan Dembowski?

Lily: He’s not here. Who is this and why are you calling?

Sales Monkey: Do you know when he’ll be back?

Note to Sales Monkeys everywhere? When my wife asks you a direct question just get to the point. Do not make her repeat herself. She can track down your boss, call him if she wants to and hurt you in “ways”.

Lily: Why are you calling?

Sales Monkey: Does he speak Polish and have life insurance?

Ah ha! Yep, Sales Monkey. This is the same person who called me at the house looking to speak to and sell life insurance to my late Dad. That was a fun conversation.

In short order Lily explained that we’ve got that covered and stop tracking me down. I don’t speak Polish and these are not the marks you are looking for.

Sales Monkey: (Incredulously) He does not speak Polish? He is not from Poland?

Lily: He doesn’t and he was born here in the United States.

Sales Monkey: Oh. Congratulations!

I had no idea I was special for that reason. I alway thought it was my carefully honed sense of humor.