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.

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.

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.

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!

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.

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.

Too Long, Didn’t Read

This post is about the “TL;DR” thing.  If you’re not aware, it means, “Too Long; Didn’t Read”.  It’s irritating to see, and I pretty much hate it.

“Look at that… jeez… it would probably take me like two minutes to read that… nope. TLDR.”

If I post something on Facebook about some article that was mildly amusing, I’ll understand if you didn’t read it.  When I come across long articles that look interesting, but I just don’t have time, then I skip it.  I totally get it.

BUT.  If somebody tells me about it later, says that I should really read it, I try take a few minutes to read it.  Especially if it seems important.

When I write you an email, especially when it’s specifically to you or to a very limited audience, I expect you to read it.  I spent a lot of time on it: the longer it is, the more time I spent on it.

So when you respond with, “TLDR” or some derivative, it means you don’t care about what I’ve said.  Not even enough to skim it.  Seriously, I can skim a two-page email in a couple of seconds if I need to.  In about as much time as it took for you to click “reply,” type in “TLDR,” and hit the send button.

Good friends read.  Acquaintances skim.  Assholes respond with “TLDR”.

Excuses and Respect

I hate excuses.  I really hate them.  Trying to get something figured out, get people together, or whatever, and somebody throws out an excuse.

I can’t make it, I just don’t have the time.

That’s a shitty excuse.  “I don’t have time” is like the most over-used excuse ever.  It’s right up there with “I don’t have any money.”

I remember back when I smoked.  Sometimes it was once an hour, once every few hours, or four packs in as many hours (especially when I was out drinking with friends).

Anyway, there were always those times where I couldn’t do something because I didn’t have money.  Couldn’t go to a friend’s place, go out for supper with a buddy from out of town, whatever.

But when I needed smokes, the green just magically appeared.  I don’t even remember how.  Maybe I wrote bad checks.  Maybe it was money I found under the cushions of the couch.  But the money was always there when I needed smokes.  I’d stay home from work if I didn’t feel good, but I sure as hell would leave the house to pick up those smokes, didn’t matter if I had the plague and had to steal the neighbor’s car.

“I know you just got into town, and I haven’t seen you for like a decade, but I don’t have time.  And I’m broke.”  Then I hang up my phone, put the car into park while I run into the gas station to get a box of donuts and a couple packs of smokes.  All so I can go home and play some shitty RPG on my expensive console that I didn’t have the time or money for.

What’s Going on Here?

I’ve re-engineered this website.  I’ve removed all the users, deleted all the posts.

It’s a brand new day.

I’m tired of holding things back.  Tired of rewriting the same thing five different times before I post it, just because maybe that first version might piss somebody off.

Prepare to be pissed off.

If you know me, you probably know that I’m usually pretty reserved.  I pick my words carefully, go with the “politically correct” approach, and I’m usually pretty careful about not offending anybody.

This isn’t politically correct.  Probably not grammatically correct, either.

My intention here isn’t to call anybody out on their bullshit.  I’m going to use the “first person” perspective of writing, and I’m going to say “you” a lot.  I’m not talking about you, though.  If I say something that strikes a cord, fine, let it strike.

This ain’t about you.

Maybe you said something to me that struck a cord with me. It invoked some memory of a time where I did something, and now I’ve gotta talk about it.  Because that’s how the human brain works: we remember things by relating them to one another. So if I piss you off because I sound like I’m talking directly to you, fuck right off.   Remember what I said a little bit ago?

This ain’t about you!

Welcome to my world.  My brain just opened up and shit all over the page.  You’re about to get a peek at my (crazed) sanity.