"If you really look closely, most overnight successes took a long time." -Steve Jobs

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.

  1. David

    Sunday, September 25, 2022 - 12:23:36

    That’s a very interesting looking and potentially helpful coding tool to have at one’s disposal. Never heard of it before. And, hey, it even supports RSS feeds! :D

    What I’ve always done is have a few test pages on my PC and/or server that housed examples of all of the HTML/CSS/PHP coding scripts that I found interesting or used in the past. When I need something that I used a while back, yet forgot how to implement, I just brought up my corresponding test page. Probably not the most efficient way to go about it, but it’s just what I’ve grown accustomed to using.

    There are some programming languages that I seemed to take to and others I could never get my head around nor motivate myself to learn. Like on my old Commodores, BASIC has been the way I program in it. I’ve attempted to learn Assembly (machine language), but I’ve never gotten very far. Same with HTML and CSS (to a point). I’m quite comfortable using HTML, okay with some CSS, but PHP just never really had much interest to learn more than just enough to “get me through”. Just the way it is with some people, I suppose.

Add comment

Fill out the form below to add your own comments