Web Developer by day, and aspiring Swift developer at night.

  • 3 Posts
  • 738 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle
  • You found an important bug in your short code plugin. Removing the line from .gitkeep is not actually the solution; it was a symptom of a much bigger and more dangerous problem: you are inadvertently including and parsing a file that is not intended to be a short code.

    You, or a crafty hacker, might one day create a file with code in it that should not be parsed as a short code, and not realize that it’s being done. You’re lucky that you’re the one who discovered this and not somebody else.

    The solution is the only parse the files that you need to parse. This means ignoring hidden files that begin with a dot. You might also think about creating a default ignore list for any other non-shortcode file that could exist.




















  • Back in 2016 (wow, almost a decade now…) I got a job with a group who used Word docs to email instructions on how to update your code with their changes. For example, “In file xyz.php, go to line 123 and replace <code> with <code>.”

    One of my first tasks was getting that group set up with git. But I will never forget that was their best way to version control code… in 2016.