Categories
Uncategorized

Atom is my New Text Editor

I started using BBEdit back in the 1990s and eventually moved to jEdit in the 2000s. Well, it’s 2020 now and since I tend to change text editors every ten years or so, I’m behind schedule! I’m pretty sure that in recent years I checked out Brackets, Sublime Text, and maybe even Atom, but I stuck with jEdit because I knew it, customized the heck out of it, and didn’t see a reason to switch.

For me, a text editor should be open source, run on macOS, Windows, and Linux, be extendable, customizable, and hackable, and… I should like using it. Life is too short to use a text editor you don’t like!

I’m working on a rather large project on GitHub right now, and I had to walk through the process of installing GitHub Desktop, and while I was jumping into the GitHub Desktop experience I figured I would also try out Atom since it integrates well with GitHub and GitHub Desktop.

When dealing with a new text editor it’s hard not to find faults. Part of it is that it’s new, and may do things differently than you are used to with your old text editor, or it may have missing features, or what appears to be missing features because it does things differently. It’s easy to take the stance of “What!? I can’t do X anymore!?” (Where X is some esoteric thing that you used to do.) It’s important to remember to take some time, investigate, dig in, and see what a new text editor offers.

There was a feature in jEdit that was really neat, but I think I used it maybe once or twice a year, and I could have achieved the same end result using another method. In Atom there’s a feature I’d never seen before, but once I understood it, it blew me away, and I was thankful it was there. I might not use it all the time, and yes, I could totally achieve the end result another way, but it’s nice to have new things.

I do miss macros and macro recording and playback in jEdit. Despite all the packages for Atom I’ve yet to find an equivalent. I have already written a really simple Atom package, so it’s good to know that’s an option if I can’t find some of the features I need. (Update: I did find some macro packages, just needed to be on a machine with dev tools to install them.)

Here are the packages I’ve added to my Atom install so far:

I’ve tried a few others, but haven’t added them to the lineup quite yet, but I’ll keep an eye out for new and useful packages. I’m also a fan of the command line integration and ability to customized the look of the editor by using CSS (though I wish there were more/better example files out there showing how to customized everything.)

So yeah, it’s safe to say at this point I’ll keep using Atom as my text editor, even though it will take some time to get used to the find & replace, and I’ve experienced a few crashes, supposedly can’t deal with large files, etc… I mean, the Command Palette is awesome. jEdit had a similar feature (I think?) but I never used it. I think one of the things I like about Atom (and I liked about jEdit) is that they were built by hackers for hackers. People who want to fiddle the bits and change things and make it their own.

The other important thing about a text editor is what you use it for. I will most likely not be using it as an IDE, though I may play around with integrating it into OpenSCAD or the Arduino IDE, I’m not doing large scale software development. I am mainly… working with text. Writing text, manipulating text, writing scripts, editing text files… stuff like that. It’s rare that I need autocomplete (in fact I disabled it) and some of the “coding” features just get in my way. YMMV depending on what you use a text editor for in your own work.

Categories
Uncategorized

Use a computer… FAST!

Text

I’ve been using computers for over three decades now, and about two of those decades have been professionally, you know, as part of my job for work. When using a computer I like to get things done, like, fast.

Back when I used Macs in the pre-OS X era I used BBEdit, which doesn’t suck, and along with the Finder of the day, I could do things really fast. I could edit files fast, and I could manage files fast. It was good.

Eventually I moved to Mac OS X, and found jEdit and things were slow at first. I even mentioned that it seemed like I was using a computer with gloves on. Things got faster.

Sometimes I see people use a computer and I get twitchy watching them try to select some bit of text, not starting at the end, or not double or triple clicking, or even just trying to retype some code instead of copying and pasting it.

I wonder if I could teach a class on using computers quickly, at least for dealing with text…

Of course I’ve also learned how to use find/replace, including regex, and tons of terminal tricks to deal with text and files and the like. And there’s still a ton I don’t know! There’s *nix tools that I could probably add to my toolbox to do things even more efficiently.

Anyway, if you feel like you could use a computer faster, you probably could. Really, in the old days we spent time waiting for computers, but if you’re dealing with text, chances are the computer is sitting around waiting for you.

Categories
Uncategorized

Single Stroke Font

I needed a single stroke font for some laser cutting. You’d think that would be an easy thing… Well, keep reading.

When laser etching, any font could be used. You can raster etch the type, or “vector etch” the type. Raster etching takes a long time, and vector etching (basically doing a low-power vector “cut”) is fast. If you’re doing 3,000 pieces, the time can make a huge difference!

Regular font

Here’s a normal font in Inkscape. Fonts consist of an outline which is then filled with a color. In this case, the outline of the font is filled with black and you see what you normally see when viewing a font on a computer screen.

Regular font

Here’s the normal font with the fill set to none and the stroke (outline) set to a thin line. You could laser etch this (and some people do) but you’re now outlining the letters instead of just etching them with a single stroke. This is fine, but takes more time. Since going really fast is our goal, this doesn’t work.

At this point, you may be thinking “No problem! Our pals at Evil Mad Scientist Laboratories have us covered with Hershey text, and engraving font!” Indeed, Hershey text is awesome, but not always the right solution. I use Hershey text often, and it’s lovely, but let’s keep exploring…

CamBam font

I found these CamBam fonts, which probably work quite well for a spinning bit that is cutting material, but there’s an issue:

All the fonts are built using a 100% overlap in the font design, which tricks my TrueType font design program into thinking they are really looped TrueType fonts, when they really don’t have an inside and outside loop.

CamBam font

A spinning bit cutting material is quite different than a laser cutting material. If you use this font to laser etch, it will double up, which mean you’re lasering the same thing twice. This takes longer, and cuts your material twice. No good.

You can manually go in and delete the overlaps, but it’s a time-consuming pain, and you’ve got better things to do.

Machine Gothic

I found Machine Tool Gothic, which looks a bit weird when you first select it, but we’ll fix that. Remember that fonts are typically outlines that are filled with a color. That’s what is happening here.

Fixing Machine Gothic

We just need to set the fill to none, and give it a thin stroke. Much better! We’ve nearly got our clean single-stroke engraving font.

Fixing Machine Gothic

Let’s fix the weird lines that connect everything and close the paths. First you’ll want to convert the type to outlines (that’s the “Object to Path” command in Inkscape) and then select the two nodes at each end of the line you want to delete and use the “Delete segment between two non-endpoint nodes” feature to remove the line.

Fixing Machine Gothic

Oh, it’s worth noting that when you convert the type to paths, you lose the ability to edit it as type. More on that later. Here’s the “L” with no extra line connecting everything.

Now, it may look like only certain letters need the extra line deleted, but they all do. Go through each letter to delete the extra lines! If you’re doing a one-off project this may not matter as much, but if we are laser cutting 3,000 pieces, even an extra 5 or 10 seconds per piece will make a huge difference.

Type on a curve

Here’s the real reason I wanted to use an editable typeface rather than the Hershey text extension. With text, you can place it on a path. This means you can curve the text onto a circle or some other shape. We want to make sure we’ve got the text exactly as we want it before removing the extra lines. (Remember that we need to change the editable type into outlines before we remove those extra lines.)

Type on a curve

Don’t forget to remove the circle, or whatever path you used to place your text on.

Type on a curve

Fire up the laser! Here’s our clean and ready to vector-etch single-stroke type.

Categories
Uncategorized

More fun with captchas

I’ve been known to deal with captchas over the years, but today while posting something on Facebook, I got one that made me pause…

captcha

Well that’s new! I’ve never had one with the text flipped upside down before… but in the world of captchas, there’s always room for improvement.

Being a smart-ass literal person, I headed over to fliptext.org to make sure I got it right. I mean, I didn’t want to just type in “they” right-side up, as that wouldn’t be correct. (Right?)

There we go… Confident I successfully entered the words in the captcha, I hit submit.

And it worked.

I wasn’t sure whether to be surprised or satisfied.

But I was left wondering if just typing in “they” right-side up would have worked.

Categories
Uncategorized

Processing: WordCram

WordCram

Today in Processing we won’t even show you a sketch, but we will talk about Processing, and sharing, and code.

So part of the fun of doing this “Processing Month” thing has been in sharing my exploration. Make no mistakes, I’m not an expert at Processing, not even close… I’m pretty much a newbie. That’s OK though, because I like to learn as I go.

It seems strange that it’s only been a week since I posted my Overlapping Ovals sketch, because I’ve already learned things since then, and would do it differently today. Lucky for me, a guy named Dan Bernier left a comment. And it was encouraging. And he left a link that pointed me to WordCram.org, which is described as: open-source word clouds for Processing.

So I grabbed WordCram and tested it out. (The results are in the image above.)

After installing the WordCram library, I took a look at the examples, and took the first one (firstnamesUsingWordPresets) and tweaked it just a bit, and fed it my own word list. My list consisted of the tags from this blog, and the number of times they appear. (See the file here.) I did remove any words that were only used once.

If you’re intimidated by Processing, you shouldn’t be… it’s fairly easy to get started, and there are lots of great example sketches out there. If that’s not enough, I hear that some guys in Milwaukee are planning a Processing class to help get other folks up to speed. :)

Stay Tuned!