iMessage feature request: show the recipient’s current time. I’d like to avoid buzzing a friend’s phone in the middle of the night when they are (unbeknownst to me) traveling in Europe.

Both East and West NBA Conference Finals are between the #1 (Golden State, Atlanta) and #2 (Houston, Cleveland) seeds. Chalk!

Disable Submit Button After a Form is Submitted

Once a user has submitted a form, you generally don’t want them to submit it a second time.1 A nice way to handle this is to disable the submit button once the form has been submitted, while replacing the text in the submit button with a message to let the user know that their desired action has been taken.

Here is a little code that will disable the submit button and display that nice message:

View the code on Gist.

And here is a JS Fiddle to play around with.

Set the message to display by setting a data attribute on the submit button. If the data attribute isn’t set, we don’t do anything. This is a good safeguard against unexpected functionality, but if you want to disable the button for all forms anyway you can do so with a little code tweak.


  1. Some folks insist on double-clicking on the web. 

Tom Brady talking “Deflategate” in front of a background touting #flexball – you can’t make this stuff up.

IMG_0443-edited

We’ve Made Web Development Complicated

When I first made my transition from front-end development into back-end development in ~2002, I had two things to learn:

  1. a server-side language
  2. how to talk to a database (SQL)

on top of my knowledge of HTML, CSS and JavaScript. With these five basic things, I was able to build some useful stuff.

I’m working on a web app now and it recently struck me how much more complicated things have become. I’m following what I consider to be modern development best practices and that means that I’m dealing with the following concepts and technologies:

  1. a server-side language
  2. how to talk to a database (SQL)
  3. HTML
  4. CSS
  5. JavaScript
  6. The concept of a virtual machine
  7. Vagrant with a pre-built image (Laravel Homestead)
  8. SSH
  9. Version control (Git)
  10. A branching/merging process (Git Flow)
  11. Gulp
  12. Node.js (for running Gulp)
  13. Homebrew
  14. /etc/hosts file (or Dnsmasq)
  15. CSS pre-processors (Bootstrap was already using Less, I am using Sass)
  16. CSS concatenation
  17. JavaScript concatenation
  18. Image sprites
  19. A server-side framework (Laravel)
  20. Framework-specific command line utilities for creating template files, running pre-load optimizations, database commands, etc.
  21. ORM
  22. Security (SQL injection, XSS, CSRF, etc.)
  23. Templating syntax (Laravel uses one called Blade)
  24. A client-side framework (jQuery, Bootstrap, Angular, etc.)
  25. JSON
  26. PHP Composer
  27. PHP Packages
  28. Database migrations (database schema defined in code)
  29. Database seeding
  30. Faker (for creating dummy data)
  31. Unit testing

Unused in my project thus far, but other things you’ll need to know sooner rather than later:

  1. Memcached (or other key/value caches)
  2. Capistrano (or another deployment process)
  3. CDNs

I’m guessing I’ve forgotten another dozen or so things that you all will remind me about in the comments… point being, this stuff has gotten more complicated and difficult to get one’s head around. Lots of abstractions, optimizations, etc.

I was recently asked to chime in on a “what programming language should a new developer learn?” round-up. The resulting :scare: article :/scare: is a bit of a mess as you have relatively unstructured comments from 83 developers to slog through. Further, many of them have huge biases towards frameworks they created, etc. Regardless, I was interested to see that I wasn’t the only one to challenge the question and push the importance of motivation and the project goal over a technology choice.

We need to remember that we’ve created this chaos bit by bit. When we are teaching, we need to provide a path that allows people to master one brick at a time. Pretty soon, they have enough bricks that they can build more layers on top of them.

Re-structuring CSS and JS files so that external libraries and override files flow cleanly through Gulp.

Sorry ladies, I’m taken.

NBA announcers, do we have players that can really “score the football” on the basketball court? Do we need the “basketball” distinction?

Sane Laravel 5 Mail Example

For some reason, the example code in the Laravel docs for their Mail feature neglect to show how to pass defined variables into the closure. Here is something a little more useful. View the code on Gist.

Seven Days With a Macbook →

I agree with many of Steve’s points here, but I’ve had much better luck with my battery life. I’m getting 7-8+ hours easily on a charge – perhaps because he got the special order 1.3GHz model while I schlump along with the 1.2 model.

My MacBook Pro is now my desk machine and I use it for my photography workflow. Just about everything else is done on my MacBook. I really like this little guy.

Eric Flying Quadcopters

This is a great video of my friend Eric showing off some of the latest DJI kit. I haven’t been following the drone stuff too closely, so this gave me a better idea of what he’s been up to. Nice work, Eric!

Comparing Asics and Nike Running Shoe Sizes

I have a wide foot so I order shoes online nearly all the time now. I take full advantage of the Zappos‘ “free shipping both ways” to order up a batch of sizes, figure out which ones work best for me, and send the others back. Recently I have learned that in running shoes, an…

Texas Governor Deploys State Guard To Stave Off Obama Takeover →

As my friend Shawn put it, “This is NPR, not the Onion.”

Thankfully there is a voice of sanity among Texas Republicans:

“Your letter pandering to idiots … has left me livid,” former State Rep. Todd Smith wrote Gov. Abbott. “I am horrified that I have to choose between the possibility that my Governor actually believes this stuff and the possibility that my Governor doesn’t have the backbone to stand up to those who do.”