Hello World!

Welcome to the blog! In my first blog post I'd like to formally introduce myself and my journey, as well as talk about how I built this blog, the technologies I used and break down some of the pain points I had in making it all work together.....(there were ALOT of pain points!). I hope you enjoy the reading material and look forward to making tons more awesome content as I progress through this journey.

About Me...

If you didn't read the intro in the home page, or just randomly found this article, I'm David...a freelance full stack developer from New York City. After college I worked your traditional 9-5 at a corporate job for about 5 years and toward the end of my "rat-race" journey, I started to realize that there had to be more to life, and my career, than just doing the same thing over and over Monday through Friday. Not to mention that giving up 40hrs per week of my time to make somebody else rich started to really bother me, so I decided to give up a corporate career in order to start my own business. Smooth sailing from there on out right!?...I made six figures as a freelancer and all is good now!....not quite!

Inspired by books like The 4hr Work Week and Think and Grow Rich I set out on the entrepreneur route about a year ago and I've learned a ton along the way! By "learn", I mean what every business person means when they use the word "learn.".. I mean I've failed.....a lot!...at a lot of things that have to do with business. But I've definitely made each one of those failures count. Which is what being in business is all about. Just as in everything else in life, if you want something bad enough, then all you have to do is endure the tough times and eventually things start to make sense (and make dollars too if you know what I mean)! I realized that I was a good software engineer...but a terrible business person. The thought of selling something used to make me cringe. I felt that I was somehow imposing something on somebody that wanted nothing to do with it... well at least that's the story I built up in my head. Nevermind things like marketing, and pitching clients, proposals, and all that stuff that makes a business run... I was TERRIBLE! But to make a long story short, I'm slowly but surely figuring it all out and things are coming together after much persistence and endurance I'm happy to say that I've seen some success in my business ventures. Maybe I'll write a blog with tips on becoming a better tech entrepreneur now that I have a blog :-)

The Tech Behind the Blog

This project was super fun to work on and I learned a ton about some technologies I hadn't used too much prior to working on it. Before getting into the details, I want to mention that it is a project that isn't 100% complete yet since there are still a few features that I want to add to it so I'm considering this my MVP (ie version 1). With that being said, lets get into the deets.

The blog itself is built on the Gatsby.js platform. If you don't know what Gatsby is...it's a React based static site generator that allows for some awesome performance in page load speeds and a few other benefits built right in. I specialize in building JAMstack web apps and Gatsby is my preferred static site generator for website projects. Up until this point I had only built static sites that didn't require too much adjusting after they were deployed, but this being a blog I knew that I would need to build it as a dynamic site since the content was always going to need to be updated. With that in mind, I knew that I was going to need a content management system or CMS. For the CMS I decided to go with Contentful since it pairs nicely with Gatsby and is super intuitive to work with. I won't lie, the initial setup and getting everything to hook in together can be a little tedious, but..after you've got it all tied together it's pretty straight forward. The biggest pain point at this stage was getting my Gatsby site to display the rich text form the Contentful CMS correctly! I almost gave up at this point because I just couldn't figure out how to fetch embedded images and get them to display correctly client side. After about 5 days of nonstop research, reading documentation, and endless stack overflow queries that lead nowhere...I decided to buckle down and implement a super hacky solution that isn't the prettiest in the world...but hey!...it works and that's what matters. One thing I've learned as a dev is that improvising is the key to progress sometimes :-)

Another technology I learned tons about working on this project was GraphQL. Prior to this blog I had only used it sparingly with Gatsby when querying for small things like static images, since I mostly work on the MERN stack when building apps and just never really got around to fetching data with it or using it on my app projects. That will change! I love the simplicity and the syntax is super straight forward after you get past the learning curve. I'm using GraphQL in this blog to query everything from this text that you are reading which is a query to the CMS....the hyperlinks have their own query....the images have a query....you get it!, there's alot happening behind the scenes to deliver this content to your device. I also learned how to create pages programatically in Gatsby. I had read about this in the documentation but never really implemented it until now, and let me tell you...I've been missing out on making my life alot easier when developing static site projects. Creating pages on the fly according to your queries is so much easier than creating a page manually every time you need a new page for content. The learning curve for this was pretty tricky since it was completely new to me, but I got the hang of it after about 2 days of messing with it. If you're a Gatsby developer and aren't using this technique, go ahead and read the docs here and give it a try!

Lastly, to round out the JAM part of the JAMstack, I deployed the site to Netlify which by far my favorite hosting platform for most if not all of my projects. They make it super simple to get your work deployed and you can even have it use your Github repo....it just doesn't get any easier for me. Because this blog is an extension of my business website, I learned how to make a subdomain of my domain to host this blog...I had never done that before...so again.....learned something new! (yay)

All in all, it was a cool learning experience that took about 2 weeks to figure out which I consider a win. I'm happy with the result and look forward to implementing all of the features I have in mind in order to create a richer reading experience for you! Interested in the codebase? Check out the repo here

Until next time my friends!

-David