Categories
Uncategorized

Share Your Code

code-share

It’s important to share your code, and for you to see the code other people have written. I almost never start with an empty text document when I write code. I either use my own previous code or find examples of how to do something. (And my “previous code” probably came from someone else anyway!)

I should note that I am not a “software developer” but just some guy who has been writing code since the 1980s and managed to cobble things together so they work and I can use them to get things done.

I am not some amazing coder, but I get the basics of how things go together. I have absolutely zero interest in “vibe coding” or explaining to an AI what I want and having it spew code at me.

I am, and always have been, deeply interested in learning things, understanding things, figuring things out, and solving problems. I will take the long way round to meet my goals because I don’t mind doing the work. I discover new things, and what could be more exciting than that? Saving time to do more work to try to make more money? No… no thank you.

The maniacs I know who “save so much time with AI” are still working 50+ hours a week and for what? How is life improved? I don’t know. I enjoy learning new things and don’t want to outsource that enjoyment to machines.

Now, that said, there is a quote from “The Fly” that I’ve always liked:

There’s a lot of stuff in there I don’t even understand. I’m really a systems management man. I farm bits and pieces out to guys who are much more brilliant than I am. I say, “build me a laser” this, “design me a molecular analyzer”, that. They do, and I just stick ’em together. But, none of them know what the project really is. So…

Mostly the “bits and pieces” and “those who are much more brilliant than I am” and some of the “a lot of stuff in there I don’t even understand” to a certain degree. Though I actually do want to understand it.

I just did a small coding project and I was able to find example code that got me 90% of the way there… after a bit of searching I found other example code that got me the rest of the way there. I may want to take my code further, in which case more example code will surely get me there.

But the thing is, that example code needs to exist. I need people to share their code. I hope that doesn’t sound selfish, as I also share my own code. I want to learn from other humans, and I want to share what I’ve learned with other humans.

There is some concern that forums where people ask coding questions will go away, and that would completely suck for people like me who love to see a question with multiple answers on how to do something. I found like six different solutions to what I was working on today, and it took a few tries but one of them worked quite well for my case. Another might be right for you.

If I skip the BASIC I wrote in the 1980s and jump to the 1990s when I was learning Perl (and eventually other languages) it was due to developers and other nerds publishing their code, and their tutorials and documentation and putting it out there. That is how I learned, and it’s still how I learn, and when the AI bullshit hype circus is done and gone it will still be how we can learn from each other. Human to Human… Nice.

Categories
Uncategorized

HomeBox for Parts Inventory

I’ve started using HomeBox to track the parts inventory for the things I build. This is something I used to do (somewhat) in a spreadsheet but I didn’t do a good job of keeping it up-to-date, and it lacked some important information. While a spreadsheet works for some things, it might not work for everything. As the only person in my company I get to choose the tools I want to use and no one else has to deal with my choices!

I know that “Homebox is the inventory and organization system built for the Home User” but I’m more concerned about the components and parts I have for my small business than I am for my own personal stuff at home… though I can see the appeal for some people.

HomeBox is open source and installing it on TrueNAS was super simple. There are plenty of features I don’t need and I can mostly ignore them… and on the flipside it doesn’t seem to be lacking too many features I’d really want.

Anyway, I’ll give HomeBox a try and see if it makes things easier for me and my (previously poor) tracking of inventory.

Categories
Uncategorized

BearExporter

Codeberg release

I released the code for a Python script called BearExporter over on Codeberg.

It’s a Python script to export all of your Bear notes to Markdown files you can use with Obsidian, read in the terminal, or whatever. I originally started on this when I started using the MintBook and realized I did not have a good way of seeing any of my notes from a Linux computer.

And yes, you can export your notes in plenty of other ways, the idea with this script is that you can automate/schedule it to run whenever you want, as often as you want, for up-to-date files wherever you might need them.

As the old saying goes “it works for me!” but I know it’s not amazingly well-written code, but it is available. I’m not exactly skilled at Python but I’ll try to improve it as time allows.

The README file probably goes way too in-depth about all the shortcomings. There are times I’m proud of the code I write, and then there are times I get something to (barely) work for me and figure others might find a use for it.

I originally tried this bear_backup script but it wasn’t what I was after. But maybe it’s what you need? I should probably steal/borrow a few ideas from it to enhance my code.

Anyway, enjoy the code, use it ignore it, improve it, or tell me what to do better. :)

Categories
Uncategorized

Advanced Preferences & Settings in Arduino IDE 2

The Arduino IDE 2 has been out for a while, and I’ve gotten used to it. Surprise, it’s another piece of software based on Electron. If you don’t know what that is, it probably doesn’t matter. Just keep going…

The important thing is, if you’ve looked at the preferences for the IDE, you’ll see… not a lot. There are a few things you can change, but wait, there’s more! It’s just hidden.

On macOS hit Command-Shift-P (on Windows it’s probably Window Key-Shift-P, and Linux same, but whatever you folks call the GUI key there.)

Anyway, after hitting those three keys you should see a scrollable and searchable list of stuff. You can scroll and click on something or type in something to filter it a bit more. If you type “User Set” you’ll see “User Settings” and you can click on it.

And Bingo! You’ve got access to the full list of stuff you can change and adjust. Neat!

You can also search for things, like “font” or whatever. I seriously think the greatest advance in software in the past lustrum has been searchable preferences. Anyway, I hope you find this useful.

Oh, and one more thing… If you don’t like any of the (limited) themes in the Arduino IDE you can add your own. See this Personal Themes thread. You can find themes in the Visual Studio Code Marketplace because VSCode also uses Electron. Two words of warning though, some of the themes in the “marketplace” are commercial, or at least “nagware” and will bug you about paying for them. (Which is fine, just making note of it.) The other thing is, I can only assume installing a VSCode theme in something besides VSCode, or just using the “Visual Studio Code Marketplace” for non-Microsoft software violates some Microsoft terms of service or license or such. Because face it, Microsoft still sucks in many ways.

Categories
Uncategorized

Affinity Photo

Let me start by saying that I’ve used Photoshop for the past thirty years. That’s three decades of using an application. I actually cannot think of an application I’ve been using longer than that. My Photoshop abilities probably helped me get my first real job. That said, my days with Photoshop might be numbered.

As you may know, the world is moving to 64 bit computing. Apple’s latest OS will no longer support 32 bit applications. Since I am not a fan of renting software, I still run Adobe Photoshop CS5 on my Mac OS X 10.12 and 10.13 machines. In 10.14 it will not run. A friend of mine at Adobe told me to “join the cloud” and that I would see lots of new and amazing features, but to be honest, with what I use Photoshop for these days, I don’t need the new and amazing features…

So I’ve got a copy of Affinity Photo, and I’ve been using it, and it’s pretty good, and at some point I’ll dump Photoshop completely (probably when I upgrade to 10.14) though I’ll still use Photoshop if working at places that use it. (And yeah, I rarely trade PSD files with others, though if I need to, Affinity Photo can read & write PSD files.)

I tried Pixelmator years ago but it never really grabbed me and made me feel like it could be my everyday editor, but I’ve actually been very impressed with Affinity Photo. It’s close enough to Photoshop but has its own personality. There are a few things I’m still getting used to, but I am trying to use it anytime I would normally launch Photoshop in an effort to train myself.

With all new software (let alone something you’ve used for decades) it’s often a matter of getting used to things that are slightly different. Like using Windows when you’re used to a Mac, or Canon when you have a Nikon… I’m getting to memorize some of the key commands, and I find a few things annoying, like not putting the focus on the first value in a dialog so I need to remember to hit the tab key before I start typing. Little things, nothing big… The important part is, I can do nearly everything I want to (or need to) do with Affinity Photo that I would have done with Adobe Photoshop.

While I am a huge fan of open source, I’ll also pay a reasonable price for non-open source software if it fits my needs and there is not a viable alternative in the open source world.

If 2020 has done anything so far, it’s introduced me to a lot of new software (and services) through my various jobs and projects this year. I’ll probably post a bit more about software in the future, as it’s been a long time since that’s been a regular feature around here.