"Winning isn't everything, but wanting to win is." -Vince Lombardi

Sunday, September 25, 2022

Code Writing

I have been involved with computers for almost 40 years now and have progressed from coding simple HTML pages where a blinking text header was the “thing” to do. Back then, any progress made in enhancing your web site was a big deal.

As expected, websites got more and more involved and the complexity of “writing” code started moving the wannabe coders to the sideline. Unfortunately, I am one of those wannabe coders. Considering that I love everything about computers, I am constantly amazed that I CANNOT learn to code. It doesn’t matter what language it is, be it PHP, Python, CSS and to a certain extent, some of the current HTML code. I can’t learn to code.

That hasn’t stopped me from “tweaking” my sites which in many cases involves cobbling together code that I find on the internet that will do what I want it to do. As stated above, I have never been able to code, but for some reason I can look at code and figure out what it is trying to do. With that in mind, I am then able to add to my existing code application to make the site look the way I want. The language I work with the most is PHP and I have gotten to the point that I feel comfortable in “getting my hands dirty” to digest the code I need to accomplish the goal I am trying to reach to enhance my websites.

This of course has caused me some problems, because I keep running into situations where I need to use some piece of code that I have used previously but of course can’t remember in which file it is now located. With that in mind, I recently started looking for some kind of PHP script/application that would help me keep track of the different pieces of code that I have used or that I might need down the road. Surprisingly, there aren’t that many PHP scripts that will do that. Then again maybe I am looking in the wrong places.

I have found one script that I believe will accomplish the task I need. It has both a desktop version (for Mac) as well as a community edition that you can upload to your web server. It uses SQLite as the database and is very easy to install and set up. It has quite a few features and a very strong search module that makes it very easy to find the piece of code you are looking for. If you are interested, go to the main site located at https://www.cansnippet.org where you can then link to the download zip file on github.com. The code is 4 years old, but so far I have not had any problems running the script on my web host running php version 7.4.24. Now all I have to do is remember to add my code pieces to the application. This way I can continue to reach my “coding” goals.