The Web Helped Me See Through My Wife’s Eyes

Standard

classroom_0_0_0

Most people go about their every day lives worrying over the smallest things. They get angry when someone steals their parking space, when a baby won’t stop crying in a public setting, or when the quality of their latest Netflix binge is below Super HD. We bicker and we moan over the most minuscule “problems” in our lives. We too easily lose sight of what is really important in life and we take for granted the many blessings each us receives on a daily basis. When was the last time any of us gave a gave a second thought to the roll that our sense of smell plays upon the foods we eat? Or the fact that our sense of touch is sensitive enough to detect the difference between a house and a car if our fingertips were the size of the Earth. We pay no attention to the fact that we have almost a 270 degree field of vision (including head and eye rotation), or that our brain is capable of distinguishing about 10 million different colors. The human body is capable of amazing things, under normal circumstances. But what about those who’s circumstances are a little less normal?

Let me interject real quick. My wife is my hero. She’s a wonderfully strong spirited woman and she’s exceptionally brilliant.

My wife had a rough start to life. She was adopted at 2 weeks old. She was an at risk SID baby and placed on a heart monitor for the first few months of her life. At just a few months old, her parents and doctors discovered she had actually been born blind. Miraculously, another few months after her blindness was discovered, she could see. Her sight wasn’t perfect, but it was something. She had heavy prescription glasses from an early age, and while some might see her sight as a setback in life, she had a relatively normal childhood. She ran, played basketball, and was driving a four wheeler by the time she could walk (she grew up in Iowa). She didn’t let her eyesight handicap her. She dealt with and adjusted for her “limitations”. What other choice did she have?

Being born in the mid/late 80′s and growing up in the early 90′s, there weren’t a lot of options besides glasses. Optometrists told her that her prescription was too high for soft contacts and she’d have to wear hard ones if she wanted the option. Now, I can’t even stand a spec of dust or a slight breeze in my eye, I couldn’t imagine a hard piece of plastic sitting flush against my eyeball. But she did it. I’m not sure if it was her “limitations” in life that contributed to her stubbornness, or if she was just born that way (it’s one of my favorite things about her btw), but being the strong willed woman that she is, she stuck that hard plastic in her eye on a daily basis.

Years later, technology would improve. Materials got thinner and lighter. No more of the bottle cap glasses of yesteryear. Goodbye to the hard contacts and hello to the soft comfortable contacts that the rest of the world is able to enjoy. With the advancements in technology, I asked the same question that I’m sure you’re asking right now. What about LASIK? The answer was the same as one she too often gave out when people would look too long at her eyes. She was born with Nystagmus. It’s a condition of involuntary eye movement. The movement isn’t as noticeable as she thinks, but it does make her self conscious and it is something that you can see after speaking with her for a few minutes. Since this condition and the movement is involuntary, it obviously means she can’t control it and therefore can’t keep her eyes still during the LASIK procedure. Despite the lack of corrective options available to my wife, she still enjoys life and her independence.

Again, my wife is a very strong woman and very independent, but she does rely on others to travel. With her glasses, she’s legally blind. She is able to have a license (with a doctor’s note), and is able to legally drive during daylight hours. I’ve ridden with her, she’s a wonderful driver. Facing such limitations of sight though doesn’t give her the best confidence while driving. She is uncomfortable with the thought of driving. She chooses not to drive for fear of not seeing a stoplight, another car, or a pedestrian in time to react. Currently she either walks to where she needs to get to, or I drive her. We’ve been fortunate that I’ve worked for a company that has been understanding and has let me work odd hours and take random “lunch” breaks in order to give my wife a ride somewhere.

It’s been a dream of my wife’s to live in New York City since before I met her. She’s in love with the city, the idea of it, the culture, the freedom. The only time either of us has been there was on our honeymoon, and we loved it. I dream of moving there one day, not for me, but for my wife. A large city with a large mass transit system would provide her the freedom she desires and deserves. I want to do whatever I can to provide for her.

I’ve spent years trying to gain a better understanding of her vision. Sometimes when we’re driving, I’ll point out something in the distance and ask her to describe it to me. I try to visualize the images that she sees. I can’t. I’ll never be able to fully understand. I am daily in awe of her will, determination, and strength. I’m sure the dependency on others weighs on her, and I’m sure she wishes she had better vision, but if you were to meet my wife, you would never know she was “limited” in any way. This is why she is my hero.

So why tell you all of this? What does it have to do with the title of this post?

The other day I was given a gift. A gift that touched me deeply. I’ve been completely unable to get this gift out of my mind, and I felt a deep urge to write this story to express my gratitude for this gift.

What was the gift?

I was given the gift of sight. I stumbled upon a simple website called Eye Simulator. It allows you to put in a prescription and it renders an image that simulates the vision of person with that prescription. The predefined values of the fields don’t actually go as low as my wife’s prescription, so I entered the lowest values available in the form. The image generated is slightly better than my wife’s vision. Care to see the through my wife’s eyes? This is her world without glasses:

classroom_-7_-2.5_20

To put it into perspective, the image at the top of this post is the crystal clear image of perfect vision.

Wow.

Honestly, when I saw this, I was speechless. I felt an battery of emotions all at once. I never dreamt that I would be able to understand. It’s not an exact representation, but it’s close enough. This simple image made me appreciate and love my wife even more. It also put my life into perspective. I suddenly felt ashamed of all of the petty complaining I do throughout the day. I felt more appreciative of the gifts that I’ve been given. And I felt even more determined to do whatever it takes to love, honor, respect, and help my wife in any way possible.

This website, and specifically this image, have given me perhaps the second greatest gift that I’ve ever received. I will never be able to fully put into words my gratitude and appreciation for it’s creator. Thank you.

“Don’t Bind Yourself To A Framework”: or, Shut Up and Build Your Shit

Standard

It’s almost November and boy has 2013 been a rough year for PHP. From what I gather, it’s “hip” to hate PHP right now. With so many outsiders, and insiders, fighting and bashing the language and each other as if they were high school rivals, I’ve been rather surprised and elated to see the formation of the PHP FIG and the work they’ve done with the PSR standard. Having so many library and framework authors come together, agree upon a standard way of doing things in order to make their code interoperable, and then actually upgrading their code to meet said standard is an amazing feat that just a short while ago would have seemed impossible.

Now is an exciting time for PHP. New features are being proposed, added, and implemented faster than any previous time in history. PHP drives the world’s largest website (Facebook) and powers the world’s most popular content management system (WordPress). With so much love for open source, social coding, and cooperation amongst the industry leaders and PHP community as a whole, why are we still fighting over what comes down to either: A) Personal preference, or B) The right tool for the right job.

Shut up and build your shit!

My first intro to PHP was through the framework CodeIgniter. It taught me so much about PHP as a language while making it easy to accomplish tasks beyond intro level ability. Granted, I did learn some bad habits by adhering so much to the syntax of the framework as opposed to vanilla PHP. Through the years my abilities have grown, my practices have become more industry standard, and I have branched out into other frameworks. I’ve even written a micro framework that I use in my job to work around the limitations of their internal system.

One principle that drives me daily is to use the right tool for the right job. When I used to build websites from scratch, I had three CMSs that I would choose from (Joomla!, WordPress, PyroCMS). Each one met a different set of criteria for each job, and I had a certain comfort level in each system as well. I no longer build websites, but with any new custom application I write, I start by evaluating the needs and requirements of the job. My framework of choice at the moment is Laravel but I still go with the classic CodeIgniter from time to time depending. These happen to be the frameworks that I am currently most comfortable with and allow me to do my job quickly and efficiently. I’m eager and willing to try other frameworks as well. I love new things. I love playing with new things even more.

My rant here is inspired by a recent post I read (Publish Your Failures; or, The Way Of All Frameworks), and the comment banter between the post’s author, Paul M. Jones, and the author of Laravel, Taylor Otwell. The post is a good read and I encourage you to check it out (if you haven’t already). I get frustrated reading the comments between Taylor and Paul because I see two wonderfully brilliant men going back and forth over something so simple as an opinion. That’s what these are, opinions. Really, that’s what their two (and any) frameworks are, they are opinions. Any framework is just an opinion of how something “should” or could be done. There is no right or wrong way to go about a problem. There are no right or wrong opinions, just our perception of what is “right” and what is “wrong” based upon our own personal opinions. I am not without my strong convictions and preferences/opinions. I will argue a syntax with my coworker until we’re blue in the face.

In the end, if the code solves the problem and solves it well, who cares how you did it, what framework or library you used, or whether you used spaces or tabs? It doesn’t matter. Let’s all learn to appreciate each other for what each of us brings to the table. Let’s all encourage each other to grow and learn. What sets the software community apart from any other in the world is the openness and the fact that the amount of encouragement and positivity greatly outweighs the amount of discouragement and negativity. We have the privilege of being a part of something greater than ourselves, and we have the responsibility to put aside our stubbornness and egos and to give back to others.

Remember people:

“Be excellent to each other!”

Stagger Sequential jQuery Animation

Standard

Let’s say that you have a couple or a bunch of images or elements that you want to animate sequentially on a page. Now let’s say you choose to slide those elements into place using jQuery’s slideDown method. Take the following examples: On the left the panels slide down starting at the same moment. While there is nothing wrong with this approach, it can be better. By adding a slight incremental delay before each animation, it allows for a smoother experience. It gives the subtle impression that each box is waiting for the previous animation to be done before beginning. This is more visually appealing.

 

Build RegEx

Standard

Regular Expressions, does anyone actually like them? I suck at them. If you’re like me at all, you struggle with them too. When I need to use regular expressions, I spend countless amounts of time on RegexPal trying to find just the right combination. That’s why I built Build RegEx.

This week, I discovered VerbalExpressions. Oh my! Regex made simple! What could be better than this? A GUI!! Thanks to the suggestion of my buddy Mike Crittenden, I decided to make a simple GUI that uses the VerbalExpressions JavaScript library. Here you go world! Enjoy!

Feedback welcome (comments and bugs).

Project on GitHub

FQL FTW!

Standard

I despise the Facebook Graph API. Luckily I’m not alone in my distaste for this wonderfully powerful yet horribly explained tool.

Recently I needed to pull the statuses of a page for a site I’m building. Seems simple enough right? Yes and no. I can easily use the Graph API to pull the page’s feed. The problem is the feed is cluttered with posted photos, comments, and other bits of data that I simply don’t need. This sounds like a job for the statueses endpoint correct? Well, yes, you would be correct. Except that that endpoint needs a valid page token or user auth token. I don’t want to use a user’s auth token or have my site continuously request authorization. Solution?

FQL FTW!

Anyone familiar with SQL will be able to easily pick up Facebook’s query language. With a few simple lines I was able to accomplish my task after having wrestled with the Graph API for half a day.


$params = array(
    'method' => 'fql.query',
    'query' => 'SELECT post_id, type, message FROM stream WHERE source_id=PAGE_ID_HERE AND type=46'
);
$statuses = $facebook->api($params);

That’s it. Simple. Beautiful. With a few lines of code and a single line of FQL I can fetch just the information that I need. FQL is powerful and simple. It doesn’t just stop at statuses, there are many “tables” to choose from (link). In my example above, I’m fetching the information that I need from the page’s stream. I’ve set the type equal to 46 which is a status, but there are more type codes as well. Exactly what I was looking for!

 

*If anyone knows an easy way to accomplish my goal with the Graph API, please comment below. I’m always looking to learn and better myself.