Skip to content

GIGO

Dear Reader,

Life is not toxic unless I let it be.

There is a lot of good in the world, but there’s no business model that derives profits from bring it to me.

The next time I am binging on social media, I need to remember that these platforms exist to manipulate me. Their business model is to get me fired up so I get a hit of dopamine and want more. That’s the “Garbage In”.

I want more from life than anger – the “Garbage Out”. There’s only one way to get that though, and that’s to make sure I am not constantly pouring garbage in.

Until next time,
I <3 |<

Training isn’t about finding, it’s about understanding

Dear Reader,scrabble tiles spelling out listen, understand, act

I get a lot of offers for training, mostly in the areas of  marketing and programming, two things that are passions of mine.  I pass over most of them with the attitude of “I’m not paying $99 for something I can find in a couple of online videos or blogs.

Contrast that with scuba diving – regular readers are tired of doing this – where I spend on average two weekends a month helping train people to “swim with the fishes and live to tell the tale”. Each of these people I’ve helped train have paid at a minimum $500 to be there and some paid much more.

As a programmer, I have taught myself much of what I know. A lot of it through trial and error. Yes, it’s easy to find things on the internet that will show me how to do something, but that’s not what training is for. Training helps me understand what I am doing. It’s only when I understand what I’m doing that I can apply that knowledge to other problems.

Trail and error is not only an inefficient way to learn scuba diving principals, it’s a deadly way to do it. I literally need to understand not only how but why.

I need to spend more time in professional training courses for software development. It’s a much faster way to learn how to do something and it has the added benefit of  helping me understand why I need to do it.

Until next time,
I <3 |<

 

 

Photo Credit Steven Shorrock
Listen, Understand, Act

Life doesn’t have to be great to be good

Dear Reader,

I’ll be the first to admin that I am not living the life I thought I would. Growing up I had dreams of being a millionaire and living the good life. Working when I wanted to and on what I wanted to. I’m probably not alone in this.

My life didn’t turn out that way. I’ve always been able to provide for my family, sometimes better than other times, but we never went hungry, but it’s not exactly la vida loca. :)

Instead of constantly longing for what I don’t have though, I’ve learned as I got older that I cab be happy with what I’ve got.

  • I am married to the most beautiful woman in the world.
  • I have two wonderful children that, thanks to their mother’s genes, are very smart and talented
  • I have a dog

Life is good.

Could it be better? I’m sure it could. At some point though, I began to realize that instead of spending my time constantly working and scheming to get more stuff, I could spend the time I have left on this planet just enjoying what I have.

Life is good. Yes, if I worked at it, I could make life great. But then I would have less time to enjoy it. So I’ll stick with good.

Until next time,
I<3 |<
=C=

Creativity is hard

Dear Reader,

I have a friend named Jeremy Kendall who is an outstanding photographer. One day I was taking a picture of an old clay pot I thought of Jeremy and something kinda fell into place for me.

I can look through the view finder and see the subject. I can compose a picture properly to showcase the subject. I can adjust the settings for the available light. I can frame it and I can take a picture.

Jeremy however, can look through the viewfinder and see beyond the clay pot, he can see the beauty of the shot that is waiting to be captured. Jeremy doesn’t take pictures, Jeremy makes art.

We both use a camera, we both push the shutter button, but only one of us makes art.

The next time I am tempted to dismiss someone’s creation as “simple” because it’s something I can do, I’ll think of Jeremy.

This includes the next time I look at a SaaS product and think “I’m not paying $75 a month for 250 lines of code and a cron job.” (Actually happened. Cost me 3 years of my weekends.)

“Code is Poetry” as Matt Mullenweg is fond of saying. Code is truly is art.

It doesn’t matter if it’s written in a language I approve of. It doesn’t matter if I like the platform it runs on. Art is art, even if I don’t recognize it.

I need to remember that code is art and that someone poured a lot of love into that code, even if I don’t immediately appreciate it.

Until next time
I <3 |<
=C=

Making Lando work inside WSL2

Dear Reader,

About five months ago I started using Lando. I have never been a Docker fan. I know Docker is useful, but for most things I work on it just seemed to be one additional layer on top of everything else I’ve got to build. Then a friend I was working with at the time introduced me to Lando. Lando seemed almost perfect.

  • It was easy to spin up and down
  • It supported PHP, WordPress, Drupal, and Composer out of the box
  • It was easily extensible

Honestly, the only downside was that on Windows 10, it ran in Windows, not in WSL. On Windows all my development takes place inside WSL. Until  I started working a contract that required it, I didn’t even have Git or PHP installed on Windows, only in WSL.

Then WSL2 hit and everything changed. Docker released a new version that would run inside of WSL2 and would take advantage of the WSL2 Linux kernel when running in Windows. I was beginning to see the light at the end of the tunnel.

Still, as with everything in tech, there were hurdles to overcome. This blog post does not delve into the WHY things work the way they do; honestly, in some cases, I do not know. This is designed to be a step-by-step guide to getting Lando and Docker up and running.

Also, where applicable, I have linked to the original posts where I got the information. Most of this info was borrowed from other sites but I had to piece things together to get everything working.

Step, the first: Install Docker

I am going to assume you already have already upgraded Windows 10 and have WSL2 installed and operational. You will need a Linux distribution. I chose Ubuntu because Cent OS isn’t available (grumble).

WARNING

If you have Docker Desktop installed on Windows 10, check the settings. If you have enabled WSL integration make SURE – I mean absolutely, positively SURE – that you do not integrate it with the distro you are going to be using Lando with. If that’s your default Distro then don’t check the “Enable integration with my default WSL distro” checkbox. Make sure the slider is not lit for the distro you will be using Lando with. Failure to do this will lead to hours of heartache and head-banging until you come back to this post, read it again from the top, and see this warning.

Ok, now that you either understood and heeded the warning above, or you ignored it thinking it doesn’t really apply to you, follow the instructions from https://dev.to/bartr/install-docker-on-windows-subsystem-for-linux-v2-ubuntu-5dl7 to get Docker up and running on your WSL2 distro.

For me, these were the commands I executed. Feel free to copy and paste them one command at a time. (They are the same ones from the blog post but without the comments.)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common libssl-dev libffi-dev git wget nano
 
sudo groupadd docker
 
sudo usermod -aG docker ${USER}
 
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
 
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
 
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
 
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
 
sudo apt-get update
 
sudo apt-get upgrade -y
 
sudo apt-get autoremove -y
 
sudo apt-get install -y docker-ce containerd.io
 
sudo apt-get install -y kubectl
 
sudo curl -sSL https://github.com/docker/compose/releases/download/`curl -s https://github.com/docker/compose/tags | \
grep "compose/releases/tag" | sed -r 's|.*([0-9]+\.[0-9]+\.[0-9]+).*|\1|p' | head -n 1`/docker-compose-`uname -s`-`uname -m` \
-o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose

That got me almost there. right now, if you can run the following command and it works then you are golden.

docker run hello-world

If that worked, you can proceed to Step, the Second.

However, if you get this error:

docker: Error response from daemon: cgroups: cannot found cgroup mount destination: unknown.

Then you need one more step. Reading the thread https://github.com/docker/for-linux/issues/219, I found that Dinar-Dalvi posted this “temporary” fix. Execute these two commands in your WSL2 terminal.

1
2
sudo mkdir /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd

Now try Docker run hello-world again. It should work. If you’ve gotten this far, you are home free. The rest is pretty easy.

Step, the second: Install Lando

Ok, Lando’s install instructions are pretty dang simple. Go to the Lando Releases Page and grab the package for your distro from the latest version. Since I am using Ubuntu, I grabbed the .deb package. Then, following the instructions on the Lando Install Page I executed:

sudo dpkg -i lando-WHATEVER_I_DOWNLOADED.deb

Yup, it’s that easy.

Step, the third: Spin up your first Lando

I work with WordPress a lot so my Lando Hello World was spinning up a WordPress site. The very easy to use Lando manual has a page for WordPress and to init a container for Lando with WordPress, all I need to do is follow these instructions.

$ lando init \
--source remote \
--remote-url https://wordpress.org/latest.tar.gz \
--recipe wordpress \
--webroot wordpress \
--name my-first-wordpress-app
$ lando start

BOOM!

Two minutes later I have a working WordPress site ready for my “Five Minute Install.”

Before you start the final WordPress install step, make sure you execute:

lando info

Lando has already installed a DB for you and created a user. lando info will give you the info you need to finish up the install and start developing your next great idea with Lando.

Step, the last: Wrap-up

If you are already a Docker aficionado and conversant with how to setup and maintain Docker containers, Lando, will be of little interest to you. However, if you are a developer who just wants to get a container spun up so they can work on a website (WordPress, Drupal, Laravel, whatever) it is a great tool and will fast become one of your regulars.

Until next time,
I <3 |<
=C=