Author: Dave Strickler

  • AI Can’t Design Code

    AI is everywhere today, but for people who want to create an application, where is it really helping?

    As a person who codes, I can’t imagine any coder not using it, just as I can’t imagine typing a text without auto-complete. For a non-coder, AI can build a prototype for you if you carefully know how to ask it.

    But will it replace coders today? No, but it will shift the way we think of them.

    Currently, AI makes it easier to create basic code, the code that creates an application menu or a form to accept data. The list of what AI can code is long, and it’s getting longer every day.

    The nuance of an application’s requirements has become much more important than the task of building it.

    But if you think coding is simply a series of tasks to complete, you’re missing the difference between a mechanical engineer and a 3D printer. Humans envision the design and the interaction with an object, and the 3D printer just builds it. AI can be used as a tool for building applications, but it’s just that—a tool for building, not an architect.

    Today’s AI lacks higher-level tasks such as architecture—the application’s overall design. The nuance of an application has become much more important than the task of building it. While AI will get better at this, its overall design today is to regurgitate patterns that humans have already used, not to think of a clever new way of doing things. For the moment, that’s the exclusive domain of humans.

    In the near future, I see the market for a coder who can only “code” shrinking. But for application architects and designers, the market is already exploding. They are becoming the “Prompt Engineers” of our future. They’ll be good at coaxing AI to build what they envision.

    So when you hear, “AI will eliminate coders!”, that’s a gross generalization. A better explanation is that it will alter how coders do their work, recasting them as deep thinkers of the problems presented to them. They will spend more time designing at the whiteboard and less time coding at the keyboard.

    After all, what is an application but a representation of what it’s architected to do?

     

  • Monitoring PlanetScale from Zabbix v7.x

    PlanetScale is a hosted MySQL database SaaS, and while it’s got great uptime, you should be monitoring it for metrics if nothing else. While PlanetScale offers lots of features beyond your average MySQL install, monitoring it is surprisingly the same.
    (more…)

  • Laravel

    I’ve been coding in PHP for a few decades, mostly using the CodeIgnitor, which I have grown to love. But today, I’m breaking from the old ways and adopting a framework that’s been on the rise for many years: Laravel.

    Ironically, I’ve layered on many of the basic features of Laravel over CodeIgnitor as I extended CodeIgnitor’s framework for my use. Not as clean, not as well architected, but the basics were there. But seeing Laravel’s implementation made me realize how mine paled in comparison.

    If you’re considering switching, I’ll advise you that its design is “opinionated”. This means there are rules, like keeping a Model (it’s an MVC framework) filename singular but the database table plural. While you can override things like this if you follow their conventions, things, as Steve Jobs used to say, “Just Work.” For instance, is that example my Model is almost empty. There’s the shell of a class but nothing else. Yet I can go into a controller,  reference the Model, and query the database, even though the Model looks unfinished.

    The “opinionated” nature of Laravel makes it very quick to code, but (and here’s the catch) you need to learn its conventions. Following these conventions allows all kinds of magic to happen in the background and allows for less code that’s easier to read, which is a win for both the programmer and the next person who has to read their code.

    Add in the incredible ecosystem of packages that extend Laravel, and you’ll find this like writing CRUD for a table more of configuring, and less of coding. While its list of packages is growing, I’ve only once found something I needed that wasn’t already coded and free or reasonably priced. I’ll discuss a few of of this in another Post.

  • Running Engineering in a Vacuum

    Wouldn’t it be great if you could be in a section of an office, surrounded by intelligent people, working on projects that really mattered to you personally, and never having to interact with the rest of the company? I know a lot of people who would consider that a dream job. I would hate it.

    Don’t get me wrong, as an engineer, the first few days would be delightful. Lots of interesting conversations over coffee. Working on engineering projects that are just purely interesting, regardless of how they fit into the company. That sounds fun – for a bit.

    And there’s the rub. Within a few days, I’d start asking myself, “Why am I working on this?”. “What is it accomplishing, and where does it fit into the company’s goals?”. I shouldn’t live in a vacuum, nor should my engineering team.

    How about we take a better approach? One that starts to ask those salespeople, “What does the customer want?”. One that starts to ask accounting if I have a budget and asks HR how hard it would be if I needed to staff up. And how about asking the CEO what goals they’re trying to accomplish? You can learn a lot if you just ask.

    Somewhere along the line, we’ve forgotten that we need to accomplish the company’s goals – not ours. If you’re running your engineering team in a vacuum, it’s not good for the company, and it’s probably not good for your career.

  • Getting the Weather via an API the Easy Way

    If you’re coding and need to find the local weather, there are a lot of places you can go to get it. Most are complex and require you to create an account, and generally don’t offer much.

    If you’re looking for one that’s simple and based on GPS, try https://api.pulsewise.com/environment/weather/42.3388/-71.0726 , which is free for the first 1,000 calls per month and includes sunrise and sunset, too. Just swap the latitude & longitude coordinates for your own latitude & longitude, or if you leave them off, it will use your browser’s coordinates.

    This is just part of a set of tools I wrote at https://pulsewise.com or see the documentation.

    Its output is in standard JSON, and looks like this:

    {
    “success”: true,
    “timestamp_utc”: “2023-10-16 20:25:30”,
    “summary”: “Clouds”,
    “description”: “Broken clouds”,
    “temperature_current”: 56.68,
    “temperature_min”: 53.22,
    “temperature_max”: 59.11,
    “feels_like”: 55.53,
    “pressure”: 1003,
    “humidity”: 74,
    “wind_speed”: 5.75,
    “wind_direction”: 120,
    “wind_gust”: null,
    “sunrise”: 1697453864,
    “sunset”: 1697493703,
    “lattitude”: “42.33880000”,
    “longitude”: “-71.07260000”
    }

  • Letting a Customer Out of Their Contract

    I’ve run a few companies over the years, and one inevitably wants out of contact with you. Maybe they’re going out of business, or their business has changed and they no longer need your services. To make this decision, you need to weigh some data:

    • What is the value of the contract they want out of compared to your entire customer revenue stream? A small percentage or a large one?
    • What are the circumstances of their situation? Are they going out of business (inevitable) or just wanting a new vendor?
    • Are you ready to ruin the relationship with the people at that company if you insist they pay?
    • Will the outlay to collect the money (lawyers and collection agencies) be worth the value of their contract?

    The idea here is to look at the bigger picture. Sure, collecting revenue from a customer on a signed contract seems like your legal right, but what is the bigger picture? If you insist on it, it will create friction and a rift. Are these people you’re dealing with going to go to other places and have a permanent memory of your inability to work with them on this issue? Or will you be a reasonable vendor – someone they’d like to do business with again at their new job?

    Transactions create memories. The good ones can be memorable and often result in further business. The bad ones create memories that are hashed over and over, spreading the bad outcome. What kind of memory do you want to create?

  • Everything you could possibly want to know about Internet Email – Part 1

    In this series of posts, I’m going to share what I know about email. Over the last 20 years, I’ve learned to set up, diagnose, and do just about everything with email that you can imagine at any scale. In this series, I’ll be talking about email over the Internet, which uses protocols like SMTP and IMAP. I won’t be talking about the inner workings of commercial email software like Exchange.

    Understanding how email is sent
    As mentioned above, email works with a few protocols, and the one used to send email is SMTP. The idea here is the sender’s email is converted into a string of characters and is passed to an SMTP Gateway, typically at an ISP. This gateway receives this email transmission and relays it to its recipient, typically the receiver’s SMTP gateway. This hot-potato-relay idea allows SMTP gateways to forward an email to its next “hop” along the way. While you may think of an email being sent from me to you directly, it really takes a few hops before it reaches you. This is often why sometimes email arrives quickly, and sometimes it takes a few minutes. Email, by its design, is asynchronous.

    What happens when a gateway is down
    Email gateways are really just pieces of software that run on a server, listen for inbound connections, and forward an email to another gateway. And, like other pieces of software, they can go offline for any number of reasons. When they do, they’re unable to send or receive email, causing the delays you sometimes experience. The good news is that the SMTP protocol was designed to be resilient to servers going offline. So, if an SMTP gateway tries to send to another SMTP gateway, and the receiving gateway is offline, the sending gateway will pause and then try and resend the email. How long it will pause and how long it will keep trying are configurable by the person managing the SMTP gateway. Typically, the pause is about a minute, and the gateway will keep retrying for three days. If the sending SMTP gateway gives up sending the email after its predetermined time, the email is returned to its original sender. This is known as a “bounceback”, and has a numeric code associated with it that’s typically in the 500-600 range. I’ll explain these “result codes” in another post.

    Part 2 of this series will include more.

  • Figuring out US TIme zones

    Twice a year, many people in IT often get mixed up by time zones in the US. Understandably, as it is a little tricky to wrap your head around. Here are some tips when sorting it all out in the US.

    1. Timezones in the US change twice a year, in the fall and spring, with an offset of 1 hour in either direction.
    2. The exception to #1 are the States of Arizona (most of it) and Hawai’i – they never change their clocks like the rest of the US.
    3. In the spring, around March, the US switches to Daylight Savings Time, so we set our clocks forward 1 hour, giving us more light in the early evening.
    4. In the fall, around November, the US switches to Daylight Standard Time, so we set our clocks back 1 hour, giving us more light in the early morning.
    5. Part of the confusion is Daylight Savings Time and Daylight Standard Time both have the initials of DST. When abbreviating, it’s better to include your time zone. As an example: EDT is Eastern Daylight Time which starts in the spring, and EST is Eastern Standard Time which starts in the fall.
    6. These switches happen at 2:00am, so the clock becomes 1:00am in the fall or 3:00am in the spring.
    7. Be careful of #6 above. The swing appears to be two hours, but it’s not. Since time is relative, the switch is only 1 hour in either direction.
    8. Since the time switch is done by timezones, in the single hour that the East Coast sets is clocks backward in the fall by 1 hour, and Midwest hasn’t begun the change, clocks in New York will be set to the same time as Chicago; typically an hour apart. This hour-long cascade happens in each timezone as the local time changes around the US.
    9. Most other countries, but not all, also shift their clocks, but not on the same dates as the US. This causes some crazy scheduling twice a year with people in different countries than the US.

    If you want to get a bigger picture of all this, you can consult NIST which is the US standard for keeping time.

  • Consider Benevolent Dictatorships

    I’ve started, run, and sold a few successful companies. Each one was different from the last one because I was constantly learning. But early on, I took on a management method that I used throughout my career – I ran each as a Benevolent Dictatorship. Now, before you go looking it up on Wikipedia, it’s a term I used with my own definition.

    A Benevolent Dictatorship, in my terms, means I was very interested in other opinions on problems, as they often brought me to see new ideas. Others’ opinions added perspectives that fleshed out details I hadn’t previously seen, and, with rare exceptions, I relished each one. But regardless of how many I listened to, the proverbial buck stopped with me. I made the final decisions and was responsible for their outcome – good or, sometimes, unfortunately, bad.

    If you’re going to run any organization, there’s a temptation to run it “By Committee”, pushing away decisions, so it makes it easier to wag a finger when they don’t produce great results. But it’s harder to take responsibility. It’s harder to run a Benevolent Dictatorship. It’s harder to shoulder the responsibility and be ready to take on the consequences. But if you don’t, who will?

     

  • Why Use Zabbix Templates?

    There’s nothing as tedious as setting up the same type of server over and over, adding the same Items and Triggers. In any environment, we tend to use the same types of servers because we’ve standardized on them. It could be in your house (“My family is all on Apple products”) or at work (“We’re a Linux and Windows shop”).  So if you’re setting up 20 laptops, it’s the same Items and Triggers on each one.

    To handle this headache, Zabbix uses Templates to make the configuration easier. At the Host level, you can add Items and Triggers one by one or save yourself a lot of time an use the Templates field. Choosing a Template for the server allows the addition of pre-defined Items and Triggers so you don’t have to type them all in, but there an extra bonus. If you change the Template, the changes ripple out and affect all your Items and Triggers using that Template. Imaging configuring 20 Hosts, each with 30 Items, each with 60 Triggers, and realizing you made an error and need to update most of them – but if you use a Template you only have to make a few changes.

    My Zabbix server monitors hundreds of Hosts, but even if you only have a few, try a few pre-fined Templates to save yourself a lot of time. In a future post, I’ll show you how you can create your own Templates, and you’ll be stunned at their power.