30 May 2014

Understanding Net Neutrality

It seems like normal people don’t understand what this whole “Net Neutrality” thing is.  And why it is SO IMPORTANT.

I’m planning on making a little drawing of this, or something, but for now, the analogy will have to work.  I’ll try to keep it simple.

So think of the Internet like the road system.  The speed limits are sort of like your ISP, limiting your speed based on what package you bought.   Your car is, basically, you… or your computer.  Getting stuff from one place to another is like driving somewhere to get a piece of paper, just like what you did to view this website.

So you can drive as fast as the speed limit allows.  If somebody is slowing you down in one lane, you just pass them in the other lane.  That’s the way the road system works.  Pretty straightforward.  This is Net Neutrality.

But what happens if we lose that neutrality?

Let’s change it up just a bit.

Before getting on to the Interstate, you have to choose what you’re doing, where you’re going.  “Well, I’m going to Tricia’s Bakery.”

So you start driving.  Plug in those GPS coordinates, and you take off… and suddenly your car slows down to 25.  WTF?

It seems Tricia’s Bakery didn’t pay for fast access.  Let her know that she can pay more, and people can get there at full speed.

“But that’s stupid.  The big companies like Verizon or Comcast or whoever are saying you pay to go FASTER, not SLOWER.”

Oh, those sneaky bastards.  See, you were already going as fast as you could before.  They can’t make your ’97 Junker LT go faster… so they slow everybody else down.

If you were going to, say, Comcast Bakery, you could go faster because they paid to get full speed.

OH SNAP.

Share your opinions here on things like Copyright law and other stuff.

Category: Uncategorized | Comments Off on Understanding Net Neutrality
1 May 2014

Lessons Learned

Stop Being Lazy.

That was probably the biggest lesson I could learn.

Sure, I’ve heard people say it to me and others for a long time.  And it made complete sense.  How could one be both healthy and lazy?  That’s a difficult one, with different answers for different people, but for me the answer was that I absolutely could not be lazy and be healthy.

But being lazy is a much more complex thing than you might think.  Instead of putting something off, do it now: later never comes.  Having to do something at the last minute is frustrating, it causes a lot of unnecessary stress, and is completely unnecessary.

Just Do Something.

Working out was the “something” for me.

I wanted to work out, but I just didn’t know how.  I’d use that as an excuse to avoid it altogether.  “I don’t know how to lift weights.”  “It hurts when I ride an exercise bike.”  “My knees are bad.”  “My back hurts when I walk too far.”

Amazing things happened when I just started doing something.  Walking, working out at the gym, playing outdoor/physical games, etc were all things that helped push me in the right direction.  And they made me realize that I’m actually quite fond of exercise.

Stop Making Excuses.

Excuses are like belly buttons: everybody has one, and nobody wants to hear about it.  They are invalid reasons to avoid doing something: if they were valid, they’d be reasons.

I used to convince myself that I couldn’t work out because my knees were bad.

Or because my lower back would tighten up instantly when I walked.

Or my hip hurt because it was malformed.

Or that my face would feel like it’s on fire because of my Rosacea.

Lo and behold, these problems started going away when I started working out.  My knees hurt less.  My back didn’t tighten up anymore just from walking a little.  My hip stopped hurting all the time.  Using a cold wet rag on my neck (and keeping very hydrated) keeps my Rosacea from flaring.

Don’t Lie To Yourself.

As I’ve become more introspective, I’ve found that I haven’t been honest with myself.

Like the reasons why I avoided walking.  Why?  Because I didn’t want to breath hard.  WTF.  I realized that I made a concerted effort all the time to avoid breathing hard.  Because breathing hard meant that I wasn’t in shape.  And I didn’t want anybody to know that I was out of shape.  What.  The.  Fuck.

Like the reasons I avoided lifting weights.  Why?  Because I didn’t want to look like a wuss.  I knew that I had to start somewhere, but somehow my brain didn’t let me see that I had to start somewhere to get past that “wuss” stage and into the “strong” stage (which, by the way, is where I’m at now).

Stop Trying to Look Cool.

This was a big one.  I felt like I had to look “cool” all the time.  Sweating, breathing hard, showing any pain or weakness of any kind wasn’t cool.

Not that I thought I was cool.  Like, ever.

When I went to the gym, I would do things to avoid sweating.  Sweating was bad.  It was gross, smelly, and turned the girls off.  Then I “heard” myself say that… why do I care what they think?  I’m married to the love of my life, I don’t give two shits (let alone one) whether or not the girls think I’m hot.  They could think I was transparent, translucent, transpiring, or transsexual, it just doesn’t matter.

How I Roll Now.

Now I go to the gym three or more times a week.  Even when I don’t feel like doing anything.   The only thing that stops me is if I’m deathly ill.

When I go there, I work out hard enough that my shirt is soaked.  Soaked so much that going home before showering simply isn’t an option.

I wear a cold wet cloth around my neck to avoid overheating.  And I nod at those jerks that give me that look like, “oh, he’s cheating, trying to make himself look like he’s working harder than he is.”  And then I work even harder, just to spite them.

I take ibuprofen or acetaminophen beforehand to avoid stopping because of my hips or knees or whatever.  Not heavy painkillers that mask pain, because pain means that I’m pushing too much.

I lift as much as I can as many times as I can, even if it’s a lot less than the last person that used that machine.  And now I smile when I sit down after that guy that I thought was so much stronger than me and add 100 pounds (and pull it more times than he did).

When one of my friends asks me to go outside and do something, I try to do whatever I can to make that happen.  Disc golfing even in high winds.  Walking even when it’s colder than I’d like.  Moving around even when I’m really focused on that video game.

Remember Nobody Is Perfect.

I find myself breaking the rules all the time.  It’s part of being human.

But I try to do the right thing more often than the wrong thing.  I try to eat healthy more often than eating garbage, even after I ate nearly an entire pizza by myself yesterday.

Category: Health | Comments Off on Lessons Learned
28 April 2014

Getting Motivated

#1. Stop trying and just do it.

I really like the song “One More” by Superchic. If you can overcome step one, you can face the 99.

A thousand mile journey starts with that first mile.  And that first mile starts with a single step.  Just one.

Don’t concentrate on an end goal, or you might get dissuaded by lack of progress.  In a journey of a thousand miles, it can be daunting to think that there’s another 999 to go after getting that first mile down… so, instead, think of how far you’ve come.  And when you get another mile, realize that you’ve just doubled the distance traveled.

#2. Concentrate on the Next Step.

When I started weight lifting in November of 2013, I had no idea what I was doing.  I just jumped into it, asked for some advice, and did my best.

Probably the biggest single thing that I did was to make it to the gym regularly.  Even when I felt like crap, when I didn’t want to work or was feeling sick, or whatever, I just went.  Just getting in the door was a big challenge.  Once I was there, I would think, “well, I’m already here, might as well do something.”  And then I did a full workout.  In fact, there were many days that started out with not wanting to do anything, and ended up being some of my best days.

#3. Track Your Progress.

On that first day, I moved 9,525 lbs. Today, I moved 91,170.

That’s a 10X gain.  And it was all with little additions.

One of the things that motivates me to work out just a little harder each time is Nerd Fitness.  It’s an awesome website.  No pushing merchandise, or pills, or services on you, just simple no-nonsense advice from real people.  One of my favorite articles is “How to Set a New Personal Record Every Day.”

Category: Uncategorized | Comments Off on Getting Motivated
26 March 2014

Comments Finally Available

I’ve wanted comments available for a long time.

Due to my lack of willingness to deal with spam, I disabled the standard commenting system in WordPress.  For a while, I allowed it (though on a different website), but required them to be authenticated users… and they had to have at least one comment accepted… unfortunately, this only lead to an unmanageable number of bogus users being registered.  I tried to cope.

I don’t cope with technical bullshit very well.

I’ve used Disqus before, many times, without problem, so I decided to go with that system.  I installed the plugin, configured my account so there could be posts on a different website (using a different “category” or whatever), and POOF: nothing.  Just like before I installed the plugin.

Comments were enabled (at least as far as I could tell)… nothing.

Went back to the default theme… nothing.

Removed all other plugins… nothing.

Followed Disqus’ “manual installation” instructions… NOTHING.

Finally, after fiddling with the code a bit, I forced the Disqus comments to show.  Basically ignoring the check that determines if WP says that commenting is okay.  For now, that’s just how it’s going to have to be.

So… START COMMENTING ALREADY!  (Click on the title of the post if you don’t see a place to comment.)

Category: Uncategorized | Comments Off on Comments Finally Available
21 March 2014

No Space Left On Device

I got this message while testing something on my web server. I was quite baffled to find out that there was, in fact, quite a lot of space remaining.

What Is Tail?

The “tail” program is a command line utility for Linux based machines.  To read the last few lines of a text file (such as a log), the command is “tail /path/to/file.log”.

However, the true power of the tail program comes when adding the “-f” argument.  Now, it will show the last few lines of the file, along with anything appended to the file.  Running “tail -f /var/log/nginx/error.log” shows me, in real time, the errors that are occurring on my server.

Searching For A Solution…

I read a few articles on the web about this problem, after I tried freeing up some space.

Ultimately, the problem was due to CrashPlan’s greediness (and a bug in the “tail” program).

How To Fix It… For Reals

Instead of configuring the system to have a higher value for “fs.inotify.max_user_watches”, just restart the crashplan service.  Or Dropbox, or whatever it is.  Just restart a service, then try running “tail -f” again (on virtually any file): if the error went away, then the culprit was that last service you restarted.

Category: System Administration | Comments Off on No Space Left On Device
4 March 2014

Why MS Access Application Developers Should Be Ashamed

If you have written what you consider to be an application in Microsoft Access, you should be ashamed of yourself.  MS Access is not a developer-friendly environment.  Not even a little bit.

You might think, “oh, but I’m just making this simple little application, and it’s not going to be used for very long.”  Wrong.  The company you made it for is going to use it until the amount of money they’re spending on maintenance vastly overshadows the amount it would cost to create a real application to replace it.

“No, that’s silly,” you might think, “I told them this thing won’t scale.”

Well, kudos to you for realizing that MS Access is a pile of crap, and for realizing it doesn’t scale.  But the company isn’t going to do anything about it.  Because if it ain’t broke in a way that costs a lot of money, don’t fix it.

“I told them I’ll rewrite it as soon as I have time.”

You’re never going to have time.  Once this thing gets put to use, you’re going to spend all your time fixing it.

Eventually, you’ll leave the company, probably because the pain of maintaining that application was too stressful.  That’s where I come in.  And I hate you for doing this to me.

That’s right, I’m the guy that gets hired to maintain the pile of shit you left behind.  And guess what?  The company has no money to spend on creating a real application, because they’ve spent all of it maintaining that thing.

Without further ado, here’s a few of the many, many, many reasons why MS Access isn’t developer-friendly:

  1.  Source code can’t be maintained.  Go ahead, tell me there is–and prove to me that you’ve used them successfully.
  2. Debugging is a joke.  If the application gets closed, all those breakpoints are gone, and trying to step through it is like scalping yourself and then replacing your own hair with individual strands of silk from a black widow spider.
  3. Changing the code will RESET THE PROJECT.  So those breakpoints you spent an hour setting are ALL GONE.
  4. Only one developer can work on it at a time (see #1).  If more attempt to, the result will be that somebody’s change will get overwritten.  But neither will know who did it, what’s missing, or why.
  5. The source code is obscure, difficult to access, and can be password-protected.  Because that’s a good idea.
  6. You have to know the application’s “secrets” to develop on it (like holding <shift> while opening the file)
  7. Pretty much any programming language that still uses “GoTo” should not be used anymore.

If you’re thinking about writing an application in MS Access: DON’T.

Category: Code, Rant, Software Development | Comments Off on Why MS Access Application Developers Should Be Ashamed
24 February 2014

My Drive

Recently, a friend and I had a conversation where he asked me how/where I get my drive.  He said the last thing he wants to do when he gets home is code, or–in the case of many others–touch a computer.

I’m not 100% sure where my drive comes from, to be honest.  It seems strange to say that I go home, after a long day of programming at work, and sit in front of the same laptop doing essentially the same thing.

So, here’s some things that seem like they might contribute to my drive.  I’m been having some mental issues as of late, so I’m yet capable (or willing) to decide which is the biggest motivator… but here goes:

Goals

I want to eventually push some of the software I’ve developed to a paying audience.  Through support contracts, through pay-for applications, or something.  Somehow the software I’ve written should be able to support me.

If I manage to support my application development by being a published author, that would be okay too.

I’d really like to have a company where I can work with my friends.  I have a couple of friends that are developers, and I really think it would be fun to work with them.  Maybe on web application development, maybe on building some sort of game, or maybe working on books or something like that.

Learning

I love to learn new stuff.  Not just anything, though, but stuff that interests me (I’m not going to learn Mandarin, for instance, because I don’t find it interesting nor useful).

I’ve decided against learning some things, though.  Several of my friends and colleagues have tried to get me to learn Ruby, Python, and some other languages.  And honestly, I just don’t find them interesting enough to pursue.  Learning programming is hard, and I’ve already got quite a few of them under my belt.

Category: Rant | Comments Off on My Drive
24 February 2014

Nginx and PHP as Different Users (Pooling)

So, after having installed a few WordPress sites on my server (namely this one), I ran into some permissions errors.  I couldn’t get plugins nor any updates to install.

The problem first appeared simply as a prompt to enter FTP credentials.  That was bizarre, so I hunted to find why that was.  I realized it was a permissions issue by reading this page (among others).

I scoured the Internet for answers (in other words, I tried a lot of different search terms in Google) for a way to make Nginx, the webserver software I used, to run as the proper user.  I’d setup different users for different websites, so just changing the webserver’s default user/group wasn’t the answer.

My first solution, albeit an ugly one, was to give everybody read+write+execute permissions on my WP folders.  That was an ugly kludge, but it worked.  And so it sat for some time.

Then I finally found how.  Through some bit of serendipity, I found an article on Apache and suExec.  I changed the term to Nginx with suExec, and found the answer… sort of.

Nginx, PHP-FPM, and Pooling

So the key was the “pooling” part of PHP-FPM that I’d basically ignored.  I had read the configuration file, but didn’t really understand it.

But after reading this article about pooling with Nginx and PHP-FPM, I found the answer.

So PHP-FPM can be configured to run different pools.  Basically, that means that there are multiple main processes for PHP, and they can run as different users.

Easy.  Added a new pool, changed it’s name and the user, and the new process (well, processes) appeared, with the correct user.  But how could I attach that to my website, so it ran as the correct user (instead of www-data)?

It’s All In The Socket

The bit of magic that makes Nginx hand off the PHP work to the correct pool is the socket.  The new pool needed to have a unique socket, then the affected websites needed to be reconfigured to use the socket corresponding to the appropriate pool.

I went back and changed my new pool to have a unique socket name, then restarted the php5-fpm process.  I then went and changed my website’s configuration file to use the corresponding socket.

Before restarting Nginx, I changed the permissions on my website’s folder to no longer be world readable/writable.  Then I attempted to delete an old plugin: as expected, I got a permissions error.  Restarted Nginx, then tried again, and it worked.   Woot!

Category: Nginx, PHP | Comments Off on Nginx and PHP as Different Users (Pooling)
19 February 2014

Why Coding and Smalltalk Don’t Work

So, when I’m working on code, and somebody starts trying to talk to me, I sometimes get funny looks from them when I can’t respond right away.  Or because they have to wait a significant amount of time before I let them talk.  Or because I get frustrated right away when they just start talking anyway.

I’m not intentionally being an asshole.  But I do get frustrated by it.  Switching to and from programming/coding isn’t like switching to/from a book or an article or whatever.  It’s way way more involved.

There’s a fair amount of time required to get (back to) programming.  Like one of those choose-your-adventure novels, only… more.

If you chose “I’ll go with the stranger” on page 2, but didn’t take the candy in chapter 12, and you’ve got a machete (from pages 12, 13, 405, 7004, or 7005), go to page 803..  If you chose “I’ll go with the stranger” on page 2, didn’t take the candy in chapter 12, and you’ve got a machete from pages Honey? 85, 99, or 9008, go to page 405.  If you chose “I’ll go with the stranger” on so I was at the store today page 2, didn’t take the candy in chapter 12, and you’ve got a machete from a page that is NOT 12, 13, 85, 99, 405, 7004, 7005, nor 9008, go to page 777.  If you chose “I’ll go with and I saw Jerry the stranger” on page 2, didn’t take the candy in chapter 12, and you don’t have a machete at all…

So now the stranger’s name is Jerry.  And I got the machete from a store… wait, there’s no chapter called “store” in here… SHIT.

Category: Code, Rant, Software Development | Comments Off on Why Coding and Smalltalk Don’t Work
17 February 2014

Nerd Rage on MySQL and Postgres

MySQL vexes me SOOOOO MUCH.  Why not just use PostgreSQL?

I know, I know, you’re thinking, “I have no idea what you’re talking about.  I don’t even know how to pronounce those two things.”

So, MySQL can just be pronounced “my squeal,” and PostgreSQL can simply be pronounced “post gres.”  There, one part down.

Choosing a database is a developer thing, I guess.  But… WHY?  Here comes the classic car analogy.

On the left, we’ve got the MySQL coupe.

It’s kinda plain looking.  It has a history of doing unexpected things, like not stopping when you press the brakes, and continuing to accelerate when you release the gas.  It looks like any normal car, but there are some rather devious things under the hood, and is definitely not “standards compliant.”

On the right, we’ve got the PostgreSQL coupe.

It looks sleeker, more like a sports car than a run-of-the-mill coupe.  Even though it costs the same as the MySQL coupe.  It does everything you expect it to.  Everything about it is standards-compliant.

So, why choose MySQL at all?  Doing so has zero benefit.  Choosing PostgreSQL means it’s actually pretty easy to convert to MySQL later (right… “hey, I’m trading in my Lamborghini Diablo for a No-Name Turdmobile).

If you’re a developer, and you’re working with a database, just use PostgreSQL.  It will save you time in the end.  SERIOUSLY.

Category: Rant, Software Development, System Administration | Comments Off on Nerd Rage on MySQL and Postgres