Posts tagged “thoughts”
Kip Password tips for non-geeks

I’ve been thinking about passwords recently, as I have gone and changed passwords for pretty much every website that I can remember having a password for. For me, this was prompted by the hacking of PlayStation Network, which led to my PSN password being compromised. And, like most people, I used the same password for PSN that I used for many other sites. This is generally a Bad Thing, but what are you going to do?

Well, for geeks, the answer is “have a separate, randomly-generated password for every site, and the password must be long and contain numbers, lowercase letters, uppercase letters, and symbols.”

I realize that this is impractical for normal people.

So here’s my advice for non-geeks. Come up with a sentence. A really random sentence. Try to include some numbers in the sentence. Then take the first letter of each word. This will be your base password. Here, I’ll make up an example:

forget about the last 7 things u Heard 2-day

That gives us: fal7tuH2d

Believe it or not, it’s really easy to remember a sentence like this! You can leave out articles, conjunctions, and/or prepositions if you like, and you can replace “are” with “r”, “you” with “u”, etc. Whatever is most natural for you to remember. Making at least one of the letters uppercase and including some kind of punctuation is good. Make sure there are at least 7 characters, since a lot of sites use 8 characters as the minimum length of a password.

Next, come up with a rule for how you will include the company name in the password. For example, “use the last letter of each word in the company name, and capitalize the last one”. Using this rule, my password for Amazon, PayPal, and Gmail might be as follows:

Amazon: fal7tuH2dN
PayPal: fal7tuH2dyL
Gmail (Google Mail): fal7tuH2deL

Now, if someone somehow obtains your password to one site, they won’t have your password to every site you use. And hopefully they won’t be able to figure out the rule for the last few characters (this is why using something other than the first character of the site name is a good idea). And no one’s ever going to guess a password like that.

Of course, this isn’t fool-proof. But it is a lot more secure than using the same password for every site, and it’s a lot more secure than using a word that can be found in a dictionary or your pet’s name or your birthday or something like that.

Note: If you really want to do it the geeky way (a long, random password for each site), you can get applications that will generate random passwords and store them securely. This makes it so you only need to memorize one password, and that password lets you access all your other passwords. I like KeePass, and it runs without an installer on PC and (I think) Mac. I keep it in my Dropbox so I can use it from home or work. But I don’t do it for every site; mainly, I just do this for really sensitive sites (like bank and credit card websites). And remember, if someone really wants your password, they can probably crack it in a few hours with just five dollars of equipment.

No Comments
Kip Accented memories

Over the weekend I went to my ten-year high school reunion, and I noticed something interesting when catching up with people. When I haven’t talked to someone in a long time, I forget that they speak with an accent. I guess it’s because I don’t remember their voice, and my brain fills it in with “accentless” Midwesterny broadcast English. Then they talk and I’m thinking “oh wow, you have a southern accent that I totally don’t remember1.” Which shouldn’t surprise me, most of these people spent most of their childhood in North Carolina.

1 Not that there’s anything wrong with that, I have one too
Kip Photographing the moon

As I mentioned a few months ago, we got a new digital camera for Christmas.  I was curious to see how it would perform taking pictures at night, so I waited until a clear night with a full moon and took a few photos.  Below is a comparison with a picture I took during the lunar eclipse in 2008.

Comparison of moon photos on old camera and new

Now, this isn’t exactly a fair comparison. The exposure on the first picture was too long, and it’s grainy because it was using a higher ISO setting. Maybe I’ll try to do a fair comparison sometime, but I doubt I’ll get around to it. I’m not even sure if I can fully specify the settings manually on my old camera.

One thing I don’t understand is why the size of the moon in the two photos is so similar, given that one camera was 4 MP, and the other was 15 MP. If the images are taken with the same focal length, and the moon is 89 pixels wide in an image 2304 pixels wide, then in an image 4752 pixels wide the moon should be 184 pixels wide. But it’s only 112 pixels wide. Now, that would be true if they are the same focal length, but according to the metadata the 4 MP image is 18mm, and the 15MP image is at 55mm, which is more zoomed in, so the moon should be even more than 184 pixels wide.

My best guess as to the reason is that the old camera has a much smaller sensor that records the image, so an 18mm focal length is a much higher zoom. I’ve seen the term “35mm equivalence,” and I’m not 100% clear on what that means, but I think that’s the difference here. The focal length isn’t the only factor to be considered. I think this means that the new camera has a much wider field-of-view than the old one, but I could be wrong about that too. One of these days I might get a decent telephoto lens; I’d definitely get a much larger moon that way.

Before I go, here are two other pictures I took with the new camera the previous night, when it was a little cloudy.

Photo of the moon behind clouds

The next one was interesting because I used a long exposure and I was zoomed out, and I got a lens flare from the moon, which I thought was cool.

Photo of the moon with lens flare

No Comments
Kip Gettin’ old

In years past I have mentioned my birthday on this blog, in one way or another.  Since I haven’t posted anything since Halloween, I figured why break the tradition.

Over the weekend Stephanie and Emma headed out of town for my sister-in-law’s final wedding shower, which meant I had the house to myself Friday evening and almost all day Saturday.  So what did I do with the time?  I played BioShock until just after midnight, went to bed, then got up at 8:45.  Now, compare this to the Kip of six years ago, when I would play Smash Bros. until 3am, go to bed, and maybe set an alarm clock if I would need to get up by eleven the next day.  So the following has changed: I go to bed earlier and get up earlier.  The following has remained the same: I love video games.  So I can only conclude that decades from now, when I get some time to myself, I will play video games till seven or maybe even eight, go to bed, wake up at five, have a glass of prune juice, and fire up whatever latest and greatest murder simulator the world has to offer.

No Comments
Kip An unusual business model

Once upon a time, approximately two days ago, just as I finished mowing the sixth of an acre of grass within which my house resides, an unfamiliar man in a wifebeater pulled over in front of my driveway in a dirty 1992 Ford pickup truck.  “This is unusual, even for North Carolina,” I thought to myself as he exited his vehicle and approached me.

“Would you be interested,” he proceeded to ask, “in good deals on meat?”

Is this a metaphor? a euphemism?  What plans might this stranger have?  A classic fight or flight response ensues:  if he means no harm (which is almost certainly the case) but I run, I look like a fool and possibly, depending upon his race, a bigot; on the other hand, if I hold my ground, I save face, but I could possibly be abducted and (let’s say) fed into a wood chipper.  He’s approaching, time is running out, what am I going to do??  Ultimately I decide to risk the wood chipper.

“I’m sorry?” I respond, as if I didn’t understand him (which is at least partially true).

“I have good deals on steaks, chicken, and beef.”  A strange wording, considering that “steak” is a subset of “beef.”  I make a mental note to ponder this at a later time.  After all, “steak” is a particular type of beef which (I presume) has high demand elasticity at low prices, so it is worth mentioning.  I mean, it’s not like he’s going to have every type of beef, so specifying up front that steak is one of the types of beef he carries will efficiently answer a nearly-inevitable follow-up question.

It’s been half a minute already; etiquette dictates that I supply some form of response.

“No thanks.”  There, I’ve responded.  My manners are so awesome.

He barely gets a quick “you have a nice day” out before he walks back to his truck.  Which I now notice has a freezer in the truck bed.  Secured into place with a single bungee.  As he drives away, I am filled with questions.  Where does this meat come from?  How did he come to acquire it?  Is this a side job, or his primary source of income.  For that matter, is it a source of income at all?  I’d like to think he just sells meat as a hobby.  After all, even the most rudimentary efforts at the appearance of legitimacy are lacking.  Maybe a logo on the side of the truck.  Or a dress code consisting of pretty much anything other than a wife beater.  I think such things would more than pay for themselves after a relatively short time.  How significant are the savings, compared to a grocery store?  How many other people are willing to buy meat from the back of some guy’s pickup truck?  Regulated food markets have produced enough contamination scares of late, how many people are willing to risk meat from some guy’s truck?

Or maybe I’m overthinking this.  I have a tendency to do that.  I wonder why that is.  Do I find comfort ruminating upon things which are ultimately meaningless?  Is it a way of escaping thoughts about deeper topics?  Or does everyone do this and just not write blog posts about it?  Or maybe I actually do think about things more than other people.  Some form of scientific modesty principle prevents me from leaping to that conclusion, anymore than I would leap to the conclusion that somehow the sun actually revolves around me.

Oh wait, I’m doing it again.

Kip Does anyone else do this or is it just me?

I have a way of remembering to do things that might be idiosyncratic, or it may be completely normal.  So I thought I would reach out to the dozen or so people who read this little blog to see if you do the same thing.  So here’s the scenario:

Let’s say I want to remember to take a CD to the office with me tomorrow morning.  I will pick out some very specific action that I know I will take tomorrow—like picking up my keys off the bedside table—and I’ll visualize myself doing that while thinking to myself “don’t forget that CD.”  I only need to spend a minute or two concentrating very hard on picturing myself picking up the keys while thinking “don’t forget that CD.”  Then in the morning, when I’m picking up my keys, the thought “don’t forget that CD” will magically appear in my head.

I believe this is technically a form of self-hypnosis, or something like it.  It works most of the time, but only recently did I start to wonder if other people use this little trick.  When the thought comes popping into your head, it feels very much like deja vu.  In fact, I think I figured it out when I was curious about the feeling of deja vu when I was little (this was before I learned there was even a term for it).  I reasoned that surely I didn’t have some buried “memory” of a future event, so I tried to induce deja vu like this.  Eventually, I got it to work.

So does anyone else do this?  If not, you should try it, it really works.

No Comments
Kip Some thoughts on programming style

Time to discuss something controversial that leads many geeks to commit acts of heinous violence.  I’m talking about programming style!

So there are three basic ways to write if/elseif/else statements in most languages with C-like syntax:

Style A

1
2
3
4
5
6
if(condition1)
  statement1;
else if (condition2)
  statement2;
else
  statement3;

Style B

1
2
3
4
5
6
7
if(condition1) {
  statement1;
} else if (condition2) {
  statement2;
} else {
  statement3;
}

Style C

1
2
3
4
5
6
7
8
9
10
11
12
if(condition1)
{
  statement1;
}
else if (condition2)
{
  statement2;
}
else
{
  statement3;
}

Personally, I go for the most readable and maintainable code, so I use Style A iff all conditions and statements are trivial (by which I mean, they are short and fit on one line).  Otherwise I use Style C.  (Which you can see, for example, in that gradient-generator source I posted a few weeks ago.)

I’ve posted on my preference for Style C over Style B before, and I’m not going to focus too much on that here today.  However, I continue to see Style B promoted as the universal, be-all end-all solution.  It is recommended by Sun for Java, and by Zend for PHP.

The argument for preferring Style B over Style A usually goes something like this:

What if you come along and add a new line?

1
2
3
4
5
if(condition1)
  statement1;
else
  System.out.println("Condition1 failed!");
  statement2;

Now statement2 gets executed everytime!

The argument makes sense from an academic standpoint, but I am pretty sure this almost never ever happens in practice.  The reason for this is that anyone who has been programming for more than a month will immediately see that this code won’t work as designed.  It is a glaring bug that jumps out at you.  It is nearly impossible to overlook!  (Again, this is all assuming that the conditions and statements are all trivial.)

Now, for the last four and a half years my job has been primarily to fix bugs in a huge body of code, very little of which was written by me.  For the last two and a half years, in particular, I’ve been the guy who looks at build traces and unit test results from the previous night.  And when there are build or test errors, I have to look at recently changed code and decide who is responsible.  This means I have seen most of the errors made by a group of about fifty or so programmers.  That is to say, real-world errors made by real programmers, not hypothetical errors that might be made by a theoretical programmer.  So I think I am reasonably well-qualified to have a strong opinion on the matter.

With that in mind, I’ve never seen an error that was due to the use of Style A for trivial statements.  I have seen some downright ugly code that used Style A inappropriately, with conditions that were ten lines long.  And I’ve seen ugly code that has braces on the if block but not the else block (or vice-versa).  And I have seen several errors in Style B or Style C that result from intermingling of tabs and spaces.  This happens because simple editors like vi and Notepad render tabs that are up to 8 characters wide (per spec, I might add), but advanced editors usually break spec in favor of user-friendliness, rendering tabs at 2 or 4 characters wide (or whatever the user sets them to).  So if code was written using 4-character tabs in Visual Studio, then new code is added by someone using spaces in vi, and this happens back and forth a few times, you get indentation that jumps all over the place.  This is where I think Style C is better than Style B, because it is easier to find the matching open-brace because usually the opening and closing braces are written by the same developer with the same indentation level, even if the code between the braces jumps all around.  Also, with Style B, at a glance the code looks like indentation is wacky, since you have to actually read the previous line (or scan to the right end of the previous line) to find out if the developer actually intended the indentation to increase there, or if someone just increased indentation because they were using a different editor.

You can tell me why you disagree with me, and I am fully aware that there will never be agreement on this point; however, I’ll continue to avoid Style B until my pay is docked for it.  Someone has to stand up for what is right.

Kip Post-election thoughts

Now that the election is over, I thought I’d share a few thoughts.

One: Stephanie and I went by our polling place at 6:30 PM on election night, just to see what the line was like.  There was literally no line.  We could see inside and there were some booths that weren’t even occupied.  No more waiting in line in the cold for ninety minutes to vote early for me.

Two: As a general rule, I don’t like to hear other people’s opinions of politics.  Especially the opinions of people with extremely strong opinions.  That said, I’ve been surprised and impressed with the mature, sensible way most (but not all) of the extremely conservative people I know have reacted to the results of the election.  Just one example: “My man didn’t win, but I will now support this man as my President.”

No Comments
Kip The history of Jim Carrey repeats itself

I haven’t made a post in quite a while (over two weeks).  For those of you who have been eagerly anticipating something deep and moving, I have to apologize, as this post is decidedly meh.

I am sharing a comment on Yes Man, Jim Carrey’s newest movie.  If you haven’t seen the trailer, I’ve conveniently posted it below.

Here’s the thing.  I’ve already seen this movie.  Except last time the guy lied all the time, but now he says “no” all the time.  And last time magic forced him to change his behavior, whereas this time he experiences some kind of enlightenment.  Other than that, I think it’s the same movie as Liar Liar.  While Liar Liar taught us the importance of telling the truth, Yes Man will teach us the importance of giving in to peer pressure.

I think I’ll say “no” to this one.  (See what I did there?  I’m so clever.)

No Comments
Kip Re: special characters

I found it very ironic the way the title of my last post was displayed after being imported into Facebook:

Screenshot of my last post imported to Facebook, rendering the title as “What’s wrong with special characters?”

No Comments
RSS feeds: Kip's - Stephanie's - Both