• 1 Post
  • 25 Comments
Joined 2 years ago
cake
Cake day: June 13th, 2023

help-circle

  • In 2005 or so, I got a tip about an application called LaunchBar, which would later be copied by Apple to replace the Sherlock search tool, and later by Microsoft in its PowerToys suite. The machine learning LaunchBar used to tailor its responses based on my previous behavior was life-changing. Instead of configuring an application, I just had to use it to change how it behaved.

    This is how language models and AI are going to improve your products. Subtly. Behind the scenes. Slightly improving a thousand different use cases, only a fraction of which your regular usage patterns are going to intersect with.






  • I’ve just spent a few weeks continually enhancing a script in a language I’m not all that familiar with, exclusively using ChatGPT 4. The experience leaves a LOT to be desired.

    The first few prompts are nothing short of amazing. You go from blank page to something that mostly works in a few seconds. Inevitably, though, something needs to change. That’s where things start to go awry.

    You’ll get a few changes in, and things will be going well. Then you’ll ask for another change, and the resulting code will eliminate one of your earlier changes. For example, I asked ChatGPT to write a quick python script that does fuzzy matching. I wanted to feed it a list of filenames from a file and have it find the closest match on my hard drive. I asked for a progress bar, which it added. By the time I was done having it generate code, the progress bar had been removed a couple of times, and changed out for a different progress bar at least three times. (On the bright side, I now know of multiple progress bar solutions in Python!)

    If you continue on long enough, the “memory” of ChatGPT isn’t sufficient to remember everything you’ve been doing. You get to a point where you need to feed it your script very frequently to give it the context it needs to answer a question or implement a change.

    And on top of all that, it doesn’t often implement the best change. In one instance, I wanted it to write a function that would parse a CSV, count up duplicate values in a particular field, and add that value to each row of the CSV. I could tell right away that the first solution was not an efficient way to accomplish the task. I had to question ChatGPT in another prompt about whether it was efficient. (I was soundly impressed that it recognized the problem after I brought it up and gave me something that ended up being quite fast and efficient.)

    Moral of the story: you can’t do this effectively without an understanding of computer science.








  • Okay, I have a lot of recommendations here.

    how can I quit textEdit/close a textEdit document and either:

    Choose not to save at all or

    To my knowledge, this can’t be done. Choose a different text editor, such as BBEdit instead. In BBEdit, if I want to choose not to save, I press Command-W to close the window. The “Save changes before closing?” dialog box will accept Command-D as input for the “Don’t Save” button. BBEdit also has command line utilities, which I will come back to.

    Choose to save somewhere and pick a location and filename to do so WITHOUT touching the mouse?

    You have already answered this one. All application Save As dialog boxes accept the command-shift-G (Go to) command. You can then type the path to where you want to save your file and use tab-completion to make it go faster. Saving files in locations that can be accessed with tilde expansion will dramatically speed your workflow.

    For example, I often work on little projects that involve editing lots of files. I will choose to put my project directory in my home directory so that I can access it with the following keystrokes:

    1. Command-Shift-S (Save As)
    2. Command-Shift-G (Go to)
    3. ~/Rot(tab)/Proj(tab) (which tab-completes to /Users/RotaryKeyboard/Project1/)
    4. (enter)

    But what I keep thinking about while reading your post is how much you should be working with an open terminal window. The zsh commands you can use there will change your life. It requires learning unix, and it requires you changing the way you work a bit, but I can immediately think of approaches that would make it so that you never have to use the Go To command again. Let’s walk through that now.

    In Linux/Unix, it is not uncommon to create your file in a location before you even edit it. For example, I can do this:

    touch ~/Users/RotaryKeyboard/Project1/tutorial.py

    This creates an empty file at that location. Now I can open the file, edit it, and save it, and I don’t have to specify where. My hands never have to leave the keyboard. But we can do better:

    nano ~/Users/RotaryKeyboard/Project1/tutorial.py

    Now I’ve opened the text editor nano. I can write in that file. When I save it, it will be saved at that location. But we can do even better.

    Remember how I mentiuoned that BBEdit has command line tools? Once those are installed, we can use bbedit as the text editor instead of nano.

    bbedit ~/Users/RotaryKeyboard/Project1/tutorial.py

    As you might have guessed, this opens a new BBEdit text window. The BBEdit developers have gone the extra mile, though. That empty BBEdit window will have the name you passed to it in the title bar as well as the path to the file visible in the toolbar even though the file doesn’t even exist until you save it.

    So far so good, right? Once you start using a terminal window in your workflow, you can begin to take advantage of things like environment variables, symbolic links, and commands like find and grep to rapidly increase your productivity.

    Oh, one more thing: if you don’t know how to use regular expressions, set aside some time to learn how to use them. Regular Expressions are probably the single most life-changing thing I’ve ever come across for computers.





  • Paradoxically, Apple has regularly introduced features over the years that result in me needing to use my devices less. When I got my first iPhone (an iPhone 4, I believe), every little notification would light up my phone’s screen. These days that doesn’t happen, and Apple has further cut down on those intrusions with focus and bed time configurations. I’m big into using HomeKit for home automation. And while it annoys me that home automation is still such a simple application, Apple has done a good job of insulating me from the need to use my devices when I want things to happen in my home.

    In short, letting myself take advantage of the Apple ecosystem reduces the touch-points of the technology I use. I just have to invest the time to learn about features and how they work, and to tune them to my preferred lifestyle.