burnout is real

Doing this wasn’t easy. I had a well paid job coding several projects with traditional LEMP stacks. I worked for a great company, with people I liked, was moving up the ladder, and felt confident with my abilities. With all the stress and keyboard time required of a full time job, how does one find the additional motivation to learn new tools? The answer for me is not unheard of for programmers. I took a break to decompress and relight some motivation inside myself. Six months of hiking and traveling later, I felt ready to jump headfirst into what seemed to be all the rage these days as the future of the internet. And I see it now, JavaScript has come so far, and has such a healthy environment, I’m ready to jump.

occasional joys of being a developer

After four months of non-stop development, I launched a passion project called “PartyPal”, an app which allows you to interactively share photos, videos, and music, and watch them play on your TV. It’s a progressive web app in every sense and I’ve been able to deploy it across Web, Google Play, and Amazon Fire TV so far. Without Node & React, I’m not sure I would have been able to get this done in the amount of time I had allotted myself.

My history goes back to my first job out of university, where I jumped straight into programming embedded systems. I was a Computer Engineering grad working for a Fortune 500. My time was spent in the world of C and malloc, contributing to kernel code for an in-house, real-time OS. This was interesting stuff, but I’ve always been drawn to the impact web development has and the ability to share your work with people in a way that writing a device driver won’t quite do. The obvious jump was to PHP, with it’s C like syntax, and it became a quick transition. So 10 years later, PHP has certainly come a long way, and I don’t see myself jumping on the hate bandwagon anytime soon. It helped me make around a dozen high trafficked, production level websites, has given me a deeper understanding of the internet and programming, and in general it works as well as you decide to make it work.

the community people love to hate

There are certainly limitations to PHP. It’s a resource hog on high traffic sites, due to the need of unique instances on every request. This also brings the side effect of constantly creating and killing connections to your DB, Redis, etc. WebSocket support is not ideal. Integrating cleanly with your front-end code (which is increasingly JS heavy), often requires a bit of flexibility. One example of the many small things you run into is how objects & arrays are handled differently between PHP and JS, which can be the source of bugs in handling JSON. Or you need to do a lot of re-inventing the wheel, since you can’t share packages between the two, you often need to find or create separate libraries across both languages that do essentially the same thing. These two languages have coexisted for as long as I have been a developer, and you can continue making them work well together far into the future, but that isn’t to say they are a perfect match.

or it has already arrived

Then comes JavaScript as a full stack solution. Starting from humble beginnings and evolving into something continuously more impressive. It’s become very powerful in a way that stays subtle. Maybe this is because the core of JS has remained stable (even if syntax has changed in newer versions). Code written 5 years ago, or longer, is likely to be very close to what you need out of it. “Almost everything is an object” as a core concept has allowed newer, cleaner syntax to be built on top, rather than designed separately. This becomes apparent in the way different ECMAScript versions can be transpiled into each other using Babel. PHP on the other hand has had to deal with more evolution. Classes and namespaces and continuing advances in PHP7, while great features for the language, have caused existing work to continuously reset itself as it has to be rewritten to conform to new capabilities. Well used frameworks were constantly scraped because they became outdated by language features. As a developer who was in the middle of it, it could be frustrating at times to say the least.

for your scheduled dose of fanboyism

Next I get to React (I have not used Angular or Vue yet, so please don’t hold that against me too much). I could not honestly be much more impressed. First, I should mention I have never considered myself a big front end developer, always being more comfortable on the back end working with the data layer. Regardless, I have written a lot of jQuery in my day, and I’ve used other tools such as Backbone and Handlebars. I could probably be accused of using these well past their supposed limits to make front ends that turned into a bit of spaghetti due to endless lists of new features. Some of this may be because I never really understood how to structure UI code. Either way, React has guided me into new, better ways to approach the asynchronous nature of front ends, and that will stick with me with any tool I use in the future. In addition, the clever use of a virtual DOM is fast. Very fast. Fast enough that I made an app running a WebView on a Fire TV stick, and the little $40 computer runs just fine serving up a fairly logic heavy interface. Finally, an added bonus to all of this is that back ends have become more bare bones. Servers can finally be focused on serving APIs and handling raw data, largely giving up the need to run all the extra logic required to render user specific HTML through a template on every network request.

seriously, thank you

JavaScript of today isn’t perfect. It certainly has problems unique to itself. All I’m here to say is these problems are not as pressing to me as I’ve dealt with in the past (I lived through IE6 after all), and I’m very optimistic about the direction it’s heading. Any ol’ developer can transform their ideas into fully-fledged, multi-platform applications in a fraction of the time of just a couple years ago. A big thank you to all the great people who have made JavaScript the ecosystem it is today, I’m honestly in awe of what you have accomplished.