31 October 2021

Why Logging Is Important

Why you need logging before you realize you’ll need it. Because when the user says, “I ran into an error…” but then fails to tell you the details, or the order of events leading up to it, and even the error itself, logging would save you.

Instead of saying, “well, let me know if you run into it again, and write down the exact error and everything you did before it happened,” you can say, “alright, I can see what happened after I just looked in the logs.”

Category: Code, held in drafts too long, Rant, System Administration | Comments Off on Why Logging Is Important
25 October 2021

Development, Automation, and Saving Time

(Note to the reader: this post has actually been a draft for a number of years.)

I’m a developer. I write code. Also, I’m just one guy with limited resources, so I can’t be spending a bunch of time testing my code in a bunch of different environments, or making sure that every single little change I make doesn’t have some unknown catastrophic ripple effect.

So I automate my life. I take advantage of freely-available tools. As much as possible.

How, you ask?

Self-Hosting Isn’t Worth It (sometimes).

First off, I don’t bother trying to do everything myself. I used to host my own code repository (a really, REALLY long time ago), and this took excess time to:

  1. setup
  2. configure
  3. maintain
  4. work with (use)
  5. keep updated
  6. handle security crap like SSL (you know, changing the website to https://….)

So I use GitHub. I’ve used SourceForge.net in the past, and it was alright for my first everyone-can-see-it code repository, but GitHub just feels nicer to work with. Going from SVN to Git was a hell of a learning curve, but totally worth it (yes, SourceForge now supports Git, but not when I switched). All my code gets out into the world, others can see it, and I get a tiny bit of exposure.

That said: self-hosting is a lot cheaper, if you’re willing to sacrifice time for money (like if you’re a poor nerd 🤓).

Continuous Integration is Very Important.

Unit testing helps avoid introducing bugs that have a nasty ripple effect. I’m not that great at getting massive code coverage with it, but I’m getting better at it.

The other thing is that, really, I can only directly (read: easily) test with the version of PHP available to me. Which is usually the newest version. And my server, or the servers that would potentially use my code, don’t necessarily have that new of a version… so I need to have something test against those old versions. That’s where Travis-CI comes into play.

So I setup the GitHub repository to work with Travis-CI. Every time I push something to GitHub, Travis-CI gets notified. They spin up a fresh new virtual server for each version of PHP that I declared my code to be compatible with. And they run all my tests in that environment. Oh, and they email me the results. WIN.

Semantic Versioning is Important.

Putting readable, easy-to-understand version numbers in the code makes life easier. Well, usually, except when I fall into “version hell,” where this project requires that project which requires another project, and none of them can decide on a version of a related project that they both like. Yuck.

Anyway, I’ll probably write more on this later. Maybe. If you’re lucky. (And I have time… Which is basically never.)

Category: Code, PHP, Rant, Software Development, System Administration | Comments Off on Development, Automation, and Saving Time
21 October 2021

Self Promotion

I was talking to one of my co-workers the other day, and the topic of self-promotion came up. I was telling him all about how he had to get better at telling others how good he is at creating digital music… and then I realized that I was horrible at it.

So this post is here for promoting me.

Hi, my name is Dan, and I’m a geek.

I’ve done a lot of geeky things.

I’m Self-Taught.

All the programming and system administration capabilities I possess have been achieved through determination. No formal education has furthered that. No classes. No certifications. (I did go to college for a while, and technically I have a 2.96 GPA, but I never finished because they failed me for bogus reasons; I think I have like three credits or six credits left to get my Associate’s degree.)

I’ve been programming since the turn of the millennium, mostly on web applications. I taught myself PHP.

I learned system administration because it interested me, and because there was a need at the place I worked. I watched the owner peck away at a console until I learned the password and gave myself access. I officially became system administrator through sheer force of will. Within a few months, I was administering two dozen servers, with all but a couple of them running various flavors of Linux.

I learned PHP through reading and experimentation.

Is there more to the story? Yes. Quite honestly, this story has been in my drafts since 2014… So it has been time to publish it for a while. So, for better or worse, here it is / was. Lol.

Category: History, PHP, System Administration, Uncategorized | Comments Off on Self Promotion
17 October 2021

Pedal Cars: How To Save The World

… and why Elon Musk should hire me.

(Disclaimer: this is a living document; I’ve posted it on the Internet to prove I came up with it first. And because I want to make money saving the world.)

If there is one single concept in this document that somebody should definitely start doing on a massive scale is to make stuff large-scale from styrofoam. And making power from burning garbage like the Swedes.

Or was it harvesting the methane from cow farts to make fuel? It might be that one.

On to the super-well-fleshed-out idea in bullet points.

The Bits

  • pedaling in the driveway:
    –> hyper-efficient pedaling
    –> how to power the heater (esp. during winter)
    –> how to power the AC (yep, you gotta pedal)
  • wheels that have wheels: how momentum can power your heater (and AC)
  • integrating non-custom electronics to make a smart(er) car
    –> using your phone…
    –>> mirror display onto bigger display (touchscreen)
    –>> load (custom?) app
    –> using old tablets
  • building (a body) using styrofoam
    –> the styrofoam collection facility/system
    –> melting it into hard plastic
    –> pour into molds (considerations for extracting the acetone)
  • powering the plant using garbage
    –> burn it like the Swedes
    –> SUPER NEGATIVE CARBON FOOTPRINT (Super Green – the Ruby Rodd story)
  • Making it cool(er)
    –> round tires (a car that literally turns on a dime)
    –> heads-up display: how to reflect a screen onto the windshield (safely)
    –> seats that slide out (for old people)
    –> transform(er)ing seats for wheelchair accessiblity
    –> heated seats, because winter.
    –> cameras all over for visibility (night + thermal vision)
    –> windows that are actually solar panels
    –> solar panels on the roof: how to make solar panels sexy (and durable)
    –> blind spot monitoring
  • Features I “stole” (off the Internet[?])
    –> automatic high beams
    –> heated steering wheel (and North Dakota needs it)
    –> intelligent “keys” / remote starting options (powered by Linux?)
    –>> using FOBs that use encrypted signals
    –>> intelligent scheduling: keeping your car un-frozen in the Coming Ice Age
    –> FOBs that combine fingerprint + proximity (+phone)
    –>> considerations for lost phones and asshole “hacker” thieves
  • (Really)Weird shit that might work
    –> using cow farts to fuel the “gas” engine
    –> buoyancy and sealed engine compartment: how Dante’s Peak will save you in a flood
Category: Uncategorized | Comments Off on Pedal Cars: How To Save The World