Archive

Author Archive

Yeah yeah yeah

December 22nd, 2009

I’m aware that I haven’t written anything in over 6 months. Umm…. I’ve been busy.

admin Uncategorized

Things That Make No Sense - Part 1: English

June 10th, 2009

I’ve been a bit negligent with my writing duties of late.  It’s been an odd month.  This past week has shown me that there actually ARE people out in the world that are reading my silly little musings, so I now feel a new responsibility to keep new content coming.

This article is intended to be the first in a series of random things that simply make no sense to me.  With any luck, there’ll be more of these to come.

Let’s talk about English.  By “English”, I mean the language.

First of all, having spent some time in England several years ago, I should first point out that what we Americans speak is very different that the language spoken in the UK.  So, for the purposes of this article, “English” equals “American”.

I’ve heard or read somewhere before that English is one of the most difficult languages to learn.  I can absolutely understand this.  First of all, you have all of the slang and regional colloquialisms.  But even setting those aside, there are grammatical rules enforced in our language that are completely inconsistent and downright confusing.

Let’s start with a simple example:  Take the word “do”.  “Do” means to take action.  Using “do” as the root, we can apply prefixes to alter the meaning according to a predictable pattern.  Adding the prefix “un” results in “undo” which means to take away an action performed.  Adding “re” results in “redo” which means to take the action again.  Pretty simple right?

So what’s the deal with the word “repeat”?  The definition is essentially the same as “redo”.  But according to the establised pattern, it’s a root word appended with the prefix “re”.  So if that’s the case, then why isn’t the word “peat” exercised in our language.  Actually it is, but in a different context (it’s a kind of moss).  The point is, if one must first “do” something before one can “redo” it, shouldn’t one also have to “peat” something before one can “repeat” it?

But wait, there’s more….

Let’s take the word “solve” as our root:

Context 1:
solve - accomplish a goal / arrive at a conclusion / fix a problem / etc.
solution - the goal / conclusion / fix

Context 2:
solvent - in chemistry, a liquid substance into which a solid substance can be combined
solute - in chemistry, the solid substance to be introduced to the solvent
dissolve - the act of mixing the solute into the solvent
solution -  the mixture of the solute in the solvent

Now, particular focus should be placed on the prefix “dis” in the word “dissolve”.  “Dis”, for the most part, seems to mean remove, reverse, etc.  When applied to a root, it establishes an antonym of that root.  As in the word “disassociate” becoming the opposite of “associate”.

Here’s where it gets tricky.  In the first context, to arrive at a “solution”, one would “solve” the problem. However, in the second context, to create a “solution”, one would “dissolve” a solute into a solvent.

So, “solve” results in solution, and it’s “dis” prefixed antonym “dissolve” also results in a solution.

See what I mean?  No sense.  I can go on and on about this.

admin Uncategorized

Steam Punk - For Real

May 8th, 2009

This may come across as a little off-topic, given what I usually write about, but I never said this here little blog was intended to be exclusive to career specific ramblings about web technology hoodoo.  It’s my blog.  I’ll write about whatever the heck I darn well please.

So I woke up the other day thinking about steam engines, for some reason.  I caught the tail end of the horrible “Wild Wild West” movie some time over the weekend, so that’s the likely culprit.  Whatever the cause, I had steam engines on the brain.

When things like that happen, I tend to look at it as my subconcious mind giving me a challenge.  It’s happened before, like when I made the crossbow a few years ago (something I’ll write an article about someday).  I have no doubt that I could do some googling and find detailed schematics on how to build a function steam engine from common household items, but the challenge I embrace is, can I figure out how to build a steam engine based purely on the knowledge I already have in my noodle?  In other words, can I solve the engineering puzzle all on my own, without researching what’s been done before?

True to form, I took my waking thought and came up with the following schematic:

Steam Piston

Steam Piston

Now this is pretty crude, given I that spent a whopping 30 minutes or so, but the general idea is to construct a steam actuated piston, which could then be attached to a fly wheel, or some other assembly.  The boiler is some kind of sealed container with water in it and a heat source applied that would, well, boil the water and therefore generate the steam pressure.

The boiler has a single outlet pipe for the pressurized steam which attaches to a slide valve assembly.  This valve runs parallel to the actuation of the piston itself, and has 2 ports.  One for intake of the steam, and one for exhaust.

The piston itself also has two ports for intake and exhaust, and is retained in its “resting” position by a simple spring assembly.

So, when the piston is at rest, the port for intake is opened, allowing steam pressure to build in the piston.  Once enough pressure is built to overcome the tension of the spring, the piston is actuated forward, closing the intake port in the slide valve.  Once it reaches it’s maximum open position. the steam is vented out of the exhaust port via the slide valve, and the spring returns the piston to its resting position to allow pressure to re-build and start the process over.

Sounds simple enough in theory.  The next step is to actually build it.

A few years ago, I think it was Christmas of 2006, I got a plastic model of the Millenium Falcon, which sent me on a scale modelling kick for a period of time.  In my pursuit of building super detailed models, I got this product at Hobby Lobby, which is essentially a bag of various sizes of small copper, brass, and aluminum tubes.  It’s intended to be used for making little guns, or pipes, or whatever you might need in a scale model.  So, armed with all these cool little parts, a mini butane torch, and some solder, I started working out the plumbing.  So far, I have the piston itself constructed:

The Piston

The Piston

To give an idea of scale, the piston housing is 1/2 inch copper tubing, and the rod is 1/4″.

I’ll post more later when I actually get it working.

admin Uncategorized

Critical Thinking - The Sean Method

April 26th, 2009

Let me start by saying I really have no reason to write things like this other than to serve my own vanity.  I acknowledge that, and accept it about myself.  If anyone out there is actually reading this stuff, and finding it interesting or useful, then bless you!

As I mentioned in an earlier article, I’m on the job hunt, and have had numerous conversations with recruiters and such.  Interviews, whether phone or face to face, are essentially sales pitches for oneself.  So I’ve been thinking about ways that I can more effectively demonstrate or dictate just what it is that makes me special (with respect to finding a job… I won’t get philosophical here).

So I thought I’d jot down a note to diagram how my little brain works to solve problems.  I make no assumptions that my method is the correct one.  How you get through the world is your business.  This is just how I do it.

When faced with some challenge, whether it be some code project, high energy bill, or an overheating car, the steps break down as follows:

  1. Identify the specific problem to be solved
  2. Identify the possible causes of the problem (the points of failure)
  3. Starting with the simplest, begin eliminating those points of failure until the problem is solved, or until an even more specific problem is identified.

Here’s an example:

A man sits down at his computer to check his email.  He clicks the “Get Mail” button, but gets an error message saying “Cannot connect to mail server”.

Problem: Cannot retrieve email.

The first, and most obvious point of failure is that the computer is not connected to the internet.

Point of Failure: No internet connection

Are other programs (like a web browser) able to retrieve content from the Internet?  If not, then the missing connection is the cause of the current problem.  So, by definition, that problem is solved, and the internet connection becomes the new problem.

Problem: No internet connection

Why is the computer not connected?  Let’s assume this is a desktop computer that’s connected via network cable to a cable modem or DSL router, and that there are other computers similarly connected.  With that in mind, the possible points of failure might be:

  1. Is the network cable plugged into both the computer and the router?
  2. Is the cable in good condition / not damaged in some way?
  3. Are other computers in the house able to access the Internet?
  4. Is the router turned on / receiving power?
  5. Is the coax cable or phone line that connects the router to the Internet plugged in?
  6. Is the subscriber account current in billing (has the bill been paid)?

Odds are, it’s one of those things.  So it’s simply a matter of checking each of those and eliminating them one by one as possibilites until the solution is found.  If all are eliminated, and there’s still no solution, then the problem is something to do with the ISP.  So it’s time to call the company and ask what’s up.

There’s clearly more to it than that, but that’s really the core of it.  Below is a flow diagram that gives more detail.

Critical thinking diagram

Critical thinking diagram

I’m a big fan of OmniGraffle, by the way.

admin Random Nonsense

The most important question….. why?

April 24th, 2009

As I noted in my post a few days ago, I’ve officially started my search for other job opportunities.  As some of you out there may have experienced, this has led to several conversations with recruiters.

Now, I’m not bashing on the recruiters, because I know they’re just doing their jobs to the best of their abilities, but I noticed something a long time ago, and the past few days have reminded me of it.

My particular field is riddled with acronyms, abbreviations, and other techno-babble buzz words.  A few years ago, AJAX was all the rage.  Now, people seem to all abuzz about Ruby, JQuery, and Web 2.0 (thankfully, Flex finally seems be finding its way into the lexicon).

As such, opportunites are often presented to me, with a particular focus on some buzz word.  What I’ve never been able to successfully get others out there to understand is that the words, acronyms, even the technologies themselves are just tools.  They are a means to an end.  Whether or not I’m familiar with YUI is ultimately irrelevant.  What is relevent is whether or not I can make a sub-nav doodad slide in from the left.

So I get frustrated because it feels like the criteria for evaluating a talented developer isn’t really structured efficiently.  To me, asking if I know JQuery or YUI is the same as asking a carpenter if he knows how to use a nail gun.  The real question might be, “Do you know how to hang crown molding”.  If he does, then what difference does it make whether or not he uses a nail gun or a hammer (though, as a carpenter myself, I’d strongly recommend using a nail gun)?

My point is, the requirements that are posted for these jobs and mostly likely done so from verbatim instructions by the recruiter’s client.  Things would be so much easier, I think, if people would just stop once in awhile and ask “Why?”.

I do it, and it seems to annoy people.

them:  “We need a guy that knows YUI.”
me: “Why?”
them: “We want to do sliding menus on our new site.”
me: “You don’t need YUI for that.  You need somebody that can code sliding menus.”

Please note:  If any recruiters or potential hirers out there read this article, I sincerely hope you don’t take offense.  My comments are not intended to reflect negative judgement on recruiters, or other hiring personnel.  Rather, it’s a shot against the nebulous nature of this particular industry.

admin Random Nonsense

The hunt is on…

April 21st, 2009

I’ve been freelancing since December of last year, and I’ve had the fortune of being able to do some pretty interesting things in that time.

The bad news though (and I’m sure this is true for many in my position), is that the world of the independent contractor is very feast or famine.  It’s difficult to handle all the different business roles required to be successful in this arena.  I’m great when it comes to execution of project, but not so good and drumming up new business.

So, I’ve decided that I think I’m just going to find another job.  I’ll miss the freedom and liberty of being able to work in my pajamas, but welcome the idea of predictable income.

Given the past year that I’ve had, I’m also entertaining the notion of relocating to some other part of the country.  I feel like it’s time I shook things up a bit.  I moved to Dallas 11 years ago.  I never really thought that I’d be here for the rest of my life or anything, but I didn’t exactly have a long term plan in mind.

Meh, I’m just rambling.  Back to work….

admin Random Nonsense

The genius that is Red Box

April 2nd, 2009

Recently, I discovered the wonderful awesomeness that is Red Box.  I noticed the machines at the Wal-Mart in my neighborhood some time ago, but didn’t really pay them much attention until I found myself with nothing to watch one night.  Usually when that happens, I’ll tap into the Video on Demand stuff on Uverse.  They’re pretty good about having the latest DVD releases available, but they’re a bit expensive.  Then I remembered the Red Boxes.  By this time, there was one at the 7-11 6 blocks from my house.

If you haven’t heard of or embraced the concept yourself, I highly recommend it.  What I really like is that you can register on their website and then find and reserve a movie at any Red Box location.

It got me thinking though.  Their payment model is based on credit card transactions.  So, whether you’ve registered or not, you get a movie by swiping a credit card.  You get charged a buck per night that you have the movie.  If you keep the movie longer than 25 days, it stops charging you and you now own the movie. Pretty straight forward.

But there’s a flaw in their model.  They don’t verify maximum available funds prior to distributing the DVD.  In other words, they don’t make sure your credit card has at least 25 dollars on it.  They only authorize and capture the amount for the single transaction at a time.  So basically, an unscrupulous person could buy a $25 Visa gift card that can be registered online to associate it to a physical location (some address / zip code… real or fake), spend $24 on other stuff (leaving a buck on the card), then go rent a movie and never take it back.  That would basically let a person buy a DVD for the the price of one night’s rental, leaving Red Box no avenue for collecting on the rest of the balance.

I wonder if this ever happens to them.  I’m sure I’m not the only one who’s figured this out.  I dunno.  Maybe they have cameras built into the machines like ATMs or something.

admin Random Nonsense

Those wiley Norweigans

March 26th, 2009

In my daily perusal of engadget yesterday, I came across this article.

Reading things like this simultaneously encourages me, and makes me uneasy.  It encourages because it proves that my little crackpot idea has merit and that there are practical implementations of SMS controlled whatevers that I haven’t even considered yet.   It makes me uneasy, because I feel like somebody else is going to beat me to the punch and cash in on this groovy idea.

Not that I had any plans to actually try to build some kind of business or anything…. just saying.

admin The SMS Gateway Project

Building an SMS gateway part 2… The API strikes back.

March 15th, 2009

It’s been a few weeks since I first did my SMS gateway experiment.  Like so many other things in my life, I reached my first plateau of success, then had to shelve the project to focus on other things.  Well, I finally got around to researching what would be necessary to build a PHP based API that would let me actually send messages from a hypothetical web application.

Obviously, the first priority was to actually have the LAMP stack running on the Ubuntu box.  I actually configured everything to do this before I ever got the notion to try the gateway.  I initially built the server to act as a both a local development / testing machine, and also act as my own subversion repository.

Anyway, with Apache, PHP, and MySQL running already, it was simply a matter of figuring out how to get PHP to call the gammu function and send the message.  As with building the gateway itself, the documentation on how to do this was somewhat lacking, so I had to dig through several examples, and read pretty much every article that came up on google when searching for the answer, before I finally pieced it all together.

What it basically boiled down to was the PHP system() command.  So basically:

system(’gammu –sendsms EMS +12223334444 -text “This is the message content”‘);

The trick that wasn’t clearly defined was that the apache level linux user that’s specified in the httpd.conf must have permission to execute anything in the /dev system folder.

Once I figured that out, the rest was just straightforward PHP programming.  I created a MySQL database with two tables.  The first was a “scheduled” table.  This table contained fields for the recipient’s mobile number, the message content, the scheduled timestamp, the sent timestamp, and a status field.  I set up a cron job to run every minute that queries that table to find any messages with a scheduled time that is less than the current time, and a status of “U” for “unsent”.   The results would be looped, and the message would be sent.  The row would then have it’s sent timestamp updated, and status updated to “S” (”sent”).

This method basically allows pre-scheduling of messages, for automated reminders or whatever.  So if I want to tell the thing to send me a reminder at 7:55 PM every Wednesday that “Lost” is about to come on, I can.

The second table was “received”.  Self explanatory… a place to store messages received.  It was the same kind of process.  I appended the cron job to also execute another PHP script  to retrieve messages, parse out the results, and store each message in the database.

Completing the bi-directional capabilities of the API got me thinking though, and I had an idea.  I further appended the retrieval process to not only parse the incoming messages and store the info, but then to also analyze the sender’s mobile number and the message content itself, and then compare it against pre-defined patterns to execute some other process. In other words, I wrote it so that if I text the phrase “change home” from my mobile phone, then a script will run that changes an image on a sample page on the web-server.

This was kind of a big breakthrough, because it represents the basic methodology that other services use when they say “Text ‘laugh’ to 11211 to receive your joke of the day”… that kind of thing.

This also got me thinking that it would be really groovy to wire up a microcontroller to the server that could then be programmed to influence something in the physical world.  For example, I could hypothetically text “turn office lights on” or something from anywhere in the world, and, well, turn my office lights on.  There are already plenty of products on the market for home automation from a web interface, but people aren’t always in front of a computer.

Anyway, I’ll continue my research and keep everyone who’s been reading this nonsense updated on my additional findings.

admin The SMS Gateway Project

Building an SMS gateway. What it is, what it’s for, and how I did it.

February 8th, 2009

Recently, I posted a status on facebook stating that I was researching building my own SMS gateway.  This prompted many of my friends to ask me what the hell I was talking about, so here goes:

What it is
An SMS gateway is basically a server that can send text messages.  Go here for more details.

What it’s for
When used as part of a web server, the gateway can send text messages to subscribers for whatever reason is necessary.  Specifically, I’ll be using it to send dinner reservation confirmations for a freelance site I’m building.  I’ll also use it to send re-union status updates to those who register on the member site and elect to receive the messages.

How I did it
The server itself is an old Gateway 2000 computer running Ubuntu Linux with the Gammu package installed ( http://www.gammu.org/ ).  I used my Sierra USBConnect GSM modem to actually send the text messages, since it’s on an unlimited data plan with AT&T.  I started by following the steps I found here.

Since I wasn’t using the same phone the guy in that article used, and since my particular GSM device isn’t officially supported, I had to do some research and tweaking to get Gammu to recognize it.  Fortunately, the latest build of Ubuntu has a driver for the device, so the system itself recognized the modem.  I just had to set the config options like so:

port = /dev/ttyUSB2
connection = at

Once I got that figured out, it was just a matter of learning the command line sequence to actually send a message.  It basically looks like this:

echo “The message” | gammu –sendsms TEXT [mobile number of recipient]

I also figured out that the recipient number has to be formatted with the country code plus the 10 digit number.  Something like +15551112222.

I got that all working, and then got Apache, PHP and MySQL running on the box as well so I could write an API that would let me execute the command from any other web server.  I had to punch a hole in the firewall and set up a routing table to point all HTTP traffic to that particular server as well.

Granted, this isn’t intended to be a long term, production solution, since my IP address here at home isn’t static.  I just did it as a proof of concept, so I could put together an actual solution in a robust production environment at some point.

Anyway, it wasn’t remotely as difficult as I thought it would be, and it sure beats having to use a third party gateway to send messages.  The Gammu package also supports EMS for sending things like ringtones, and MMS for pictures and such.

admin The SMS Gateway Project