4 minutes to read

Well, this week’s post will be short, and sweet, and about a little website housekeeping where I have been creating a local coding environment.

A number of terrible things have happened in 2020, not the least of which — and to my mind possibly the most horrible — was the recent death of Ruth Bader Ginsburg. I really hoped she would hold out until after January 2021. I do not know if Donald Trump will win a second term (and I still don’t know). But I did know that if something happened to RBG before then, the hypocritical Republican-controlled Senate would abandon their much-vaunted “let the voters decide” approach that they took with Obama’s attempt to appoint Merrick Garland after Justice Scalia died.

But it never has been about letting the voters have a say:

Republicans have lost the popular vote in all but one of the last seven presidential elections. But they have appointed four of the last six picks to the Supreme Court, based on the support of GOP senators who represent less than half the American people.

In any event, the Supreme Court would now appear to be lost for the remainder of my lifetime. It has me considering whether I even wish to continue practicing law. (Or, for that matter, living where I live. But that’s another issue, which I may not be able to do anything about.)

Whether I do, or I don’t, one of my favorite hobbies — and those who know me know that I have several, including writing, photography, and — building websites, has pushed me to do something I meant to do a long time ago: build myself a local coding environment.

What is a local coding environment?

In the context of what I’m doing, a local coding environment will allow me to design and build websites on my laptop computer. That includes website housekeeping: fixing errors in my existing site, or adding additional upgrades. I have spent the last two days learning how to install a webserver, a database server, a “PHP” server, and a few other things on my laptop, and getting them all to talk to one another.

It was more of a chore than I expected: I have hardly slept through the weekend. It involved a lot of reading, trying things out, having to back them off the system, and trying again. Even the best of articles on how to do it failed me at some point. Every system is a little different.

Complications from my hosting company

Matters were complicated because apparently my hosting company is in the middle of a migration of their own. The version of the database software that they are using is an older version, which is difficult to get installed these days. I had to go through significant gyrations to do so. Every newer system wants much newer software. That, after all, is part of what website housekeeping is about.

When I asked them about it, they said that they couldn’t tell me when they would upgrade my database software. The best I’ve been able to determine is that it will be the end of the year. At best.

Complications from my software

When I coded my first “Probable Cause” design in 2008, I don’t even remember exactly how I did it. I know I could not do what I’ve done now: build a coding environment from scratch. I believe I used a packaged set-up.

But the latest package — MAMP Pro — which handles putting together the webserver changes, the PHP, and the database software configuration, would not work for me. With the hosting company using such an old version of the database software (and, paradoxically, the latest version of the PHP software), it was a no-go. I’d have to dig deeper into how the machine and software work together, and cobble my coding environment on my own.

What this does for me, and my readers

In any event — because a post about website housekeeping should not be too long — what this means is that I can now duplicate my “live” sites on my laptop. Having created a local coding environment means I can change the code that drives the websites without worrying about disrupting the existing site until I know everything works.

Then I just upload the files, and “instantly” (as far as the readers are concerned), the site has improvements.

Another thing it allows is for me to design web themes that I can give, or sell, to others.

And with the Supreme Court headed down the toilet, it may be a way for me to make a living, and do it from anywhere I have an Internet connection.

I might even make more money.

6 comments

  1. Hey Rick, That’s an interesting project. I’ve tried to do it a couple of times for my site, but always decided it was more work than it was worth. Then again, I was trying to do it running Linux in a VM. That’s a closer match to how my hosting company is running the site, but it was also a lot more work. There’s a bit of a building-a-ship-in-a-bottle feel to running in a VM, although I imagine it’s a lot easier nowadays.

    If your hosting company is using cPanel, one way to upgrade the database is to switch to a different hosting company that offers newer stuff. The transfer is usually something like doing a full backup from the old company, upload it to the new site, and file a support ticket to have it installed, and then changes your DNS entries to point to the new site. If it works, cancel the old hosting service. And if it doesn’t work right, switch DNS back to your old site and things are back the way they used to be, and you can cancel the new hosting service. I’ve been doing variations of this for years. Just a thought.

    1. Yeah, I pretty much have always done what you say you’re doing, with switching vendors. The problem right now is my hosting company has been pretty fantastic for about 4-6 years now. And the problem apparently is that they’re migrating away from cPanel to something else. (I forget the name right now, and I’m not going to go look it up.) Once that’s done, then I’ll be able to upgrade on the PHP, MySQL, etc.

      I just don’t want to wait until “whenever,” which is the current timeframe for them to migrate me to the new stuff.

      So, this weekend, it was figuring out how to get SSL to work (so I can use https instead of http, and be closer to what my real website uses). It seems to work fine in Firefox and Safari right now, but not in Chrome. I suspect that means I don’t have it 100% right, and those other two browsers were told by me not to care so much, as long as it’s a localhost certificate.

      It’s possible, of course, to put everything on a staging area with my hosting company, and make modifications there. At first, the drawback was how to compile scss files. But there’s a plugin for that, if I wanted to do it.

      So the main reason I wanted a local development environment, aside from fixing up my websites (even when technically offline), is that I want to see what it would take for me to learn how to create a practice management package that does not live in the cloud. Or, at least, does not live in someone else’s cloud.

      You may know (because I’ve said this on Twitter) that I don’t trust putting my client data on someone else’s cloud.

      Plus, I like learning things like programming. I used to do it a lot. I wrote a perl script a long, long time ago that got worldwide distribution for collecting and reporting statistics on mail servers.

      So now, my goal is to figure out how to build an app for practice management. I’ll probably use HTML5, PHP, and MySQL. It may, or may not, have some other stuff in there. (Still toying with whether WordPress, Advanced Custom Fields, and functions.php could handle what I need, and so save me some of the more mundane programming parts.)

      We will see what happens.

      Either way, I expect it will be fun.

      And I think it’s hilarious that, on my law blog, this post about programming now has more comments than anything else I think I’ve ever posted here.

  2. Hello Rick,

    considering that you already into some changes of the way you have your web set up, you may try embracing some modern technologies. I am thinking of static sites hosted on something like Netlify (https://www.netlify.com/).

    To get you started if you haven’t heard of that already:

    https://snipcart.com/blog/choose-best-static-site-generator
    https://scotch.io/tutorials/top-10-static-site-generators-in-2020
    https://dev.to/bholmesdev/before-building-your-next-static-site-with-react-consider-this-2b60

    I would gladly provide you with tech assistance should you need it. Feel free to reach me over e-mail or Facebook.

      1. Not a “static site” but “a generated static site” which is quickly completely generated whenever you either create/edit a post or change some details of design.

        That is a contemporary trend which is possible considering the current balance of available computational power vs the amount of content a person is able to produce.

        Here is one short explanation with some links: https://gohugo.io/about/benefits/
        I have been able to do a toy setup of Netlify+Netlify-CMS+Gridsome over my lunch with literally my left-hand (the right one was busy with chicken).

Leave a comment:

Your email address will not be published. Required fields are marked *

Free ePamphlet

Sign up for my newsletter and receive a free ePamphlet on "How to Hire a Criminal Defense Lawyer."

Recent Posts

Topics

Archives