Let’s say you have your portfolio, like www.glynlewington.com, hosted on Netlify and want to add your projects onto the same domain. They are all separate git repositories and Netlify is made for hosting from a single repository…but don’t fear! We can host them on subdomains like project.glynlewington.com with just a little work.

Photo by Nicole Y-C on Unsplash

Netlify makes it super easy to host your static sites with them for free. I recently moved my portfolio from a VPS over to them, and it’s great that they automatically update your site every time you push to your git repository.

In the past, I had all…


Photo by Mahir Uysal on Unsplash

Are you building a full-stack app and want to let users upload an image but you’re not sure how? In my experience, this is always achieved by having users input a link and saving this string to your database. This works great and is quick and easy, but it’s also kind of cheating. What kind of app makes you first go to another site and upload your image, and then come back and link to it?

So, what’s the solution?

Allow the user to input a file, then on your server, upload this file to a cloud service and save…


Not as simple as it sounds…

Photo by Faye Cornish on Unsplash

There’s a few unexpected steps involved which left me scouring the internet for solutions. All the full solutions I found were bloated with ugly and long Javascript or using jQuery, etc which is really unnecessary.

Step 1 — HTML

1.1 — Create a Navbar

Here’s a simple example with links to sections on the same page with #id’s.

<nav class='navbar'>
<ul class='navbar__list'>
<li class='navbar__list__item><a href='#intro'>Intro</a></li>
<li class='navbar__list__item><a href='#meatnpotatoes'>Meat 'n' Potatoes</a></li>
<li class='navbar__list__item><a href='#stuff'>Stuff</a></li>
</ul>
</nav>

1.2 — Add Tab Index to html Sections

If you don’t set the tabindex you won’t be able to set focus when writing…


If you want to implement the minimax algorithm, it will bust your balls…

Step 1: Don’t think about the minimax algorithm! (Whattt?)

Before implementing minimax for the AI move, build the game. I made it with the AI choosing a completely random move from the available squares. As you can imagine, not very difficult to beat… but effective for putting together all the styles and other logic. At this point, you might also be content and happy to leave out the algorithm. But this just didn’t feel right for me.

After hours/days of frustration implementing (trying to) minimax I felt…

Glyn Lewington

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store