What are possible applications for bit manipulation in Airtable?

TL;DR: I spent a lot of time learning about manipulating binary and I don’t want it to be for nothing.

I consider myself somewhere between a novice and intermediate coder. It’s like my fluency with Spanish; I have pretty good comprehension but am not able to speak it without using a lot of brain juice and looking things up.

Yesterday I came across a script that I later found out was generated by ChatGPT that basically created a Base64 encoder in Airtable which was used to generate URLs for Airtable interface pop-out windows. (I also noticed that @Karlstens wrote a similar script on the old forums some years ago).

Wanting to understand the code, I went down a rabbit hole that led me to literally learning how to translate numbers into a binary representation and how to use bitwise operators. It has been satisfying to demystify this ancient art of binary computation but I can’t help but feel that I wasted my time learning something that won’t actually help me become a better Airtable developer.

So other than the Base64 encoder, are there other legitimate applications for using bit manipulation within Airtable or is my newfound knowledge just the nerdy equivalent of an overindulgent social media session?

2 Likes

Yep. Security, privacy, obfuscation, performance. These are just a few areas where your admiration for the bit-level operations could create developer advantages.

I think there’s also a possible intersection with AI. Consider that embeddings are the foundation of semantic discovery of similarities composed of vectors. Vectors are large arrays, but they can probably be compressed.

If you enjoyed learning it, then it wasn’t a waste of time.

In terms of Airtable scripting, I think these concepts have limited usefulness because the full text of the script is available to everyone with access to the base. It is possible to obfuscate code, but if security is a high priority, I think you need to put code somewhere other than Airtable scripts.

2 Likes

Or, stated another way, they have massive advantages if used smartly outside the porous Airtable scripting model. :wink:

Oh, absolutely. But AirBenderMarcus’s state goal was to “become a better Airtable developer”. Most (but not all) Airtable developers don’t do much with code outside of Airtable. But if he wants practical applications for his newfound knowledge, I’m just directing him to look outside of Airtable.

Sorry, this might be off-topic because you guys are talking about scripting. Or maybe it’s on-topic. One of the two. :stuck_out_tongue_winking_eye:

I’ve actually had to use Base64 manipulation in Make a few times in the past, although I can’t remember why. I think that an external app required files to be sent to it with Base64 encoding.

The reason I bring this up is because Make has 2 different Base64 functions built into Make that you can use to convert text to binary, or binary to text. They are described on this page.

2 Likes

In a world completely divorced from the vulture grip of capitalism, I’d find it easier to agree. The less cynical parts of me very much agree, for what it’s worth.

I work primarily in Airtable so if I can build something useful outside of Airtable that connects back to it, I’d be open to that!

Is having the general knowledge of binary and bit manipulation useful at all to my foundations as a budding developer? Or is it like using an abacus to do arithmetic which is more like a “Well that’s a fun little trick to know, but we have progressed far beyond the need for a tool like this”?

This is a question of scope-and-sequence. There is so much that you could learn and explore as a budding developer. And even experienced developers don’t know everything. Even Bill doesn’t know everything.

Given the capitalistic world we live in, there are probably lots of other skills that you could focus on to make money faster. Niche things like this can pay off if you happen to find just the right client and have just the right skillset because that particular combination of skills is less common. On the other hand, it is less common because there are fewer clients who need it.

I tend to pursue things that interest me and have an easy, clear financial benefit before I followup on things without that financial benefit. But I also learn things that I find very interesting, even if they have no obvious financial benefit. Cuz, hey, learning this stuff is cheap entertainment.

2 Likes

I remember learning about bitwise operators for the first time. I found extensive use for them for object management within my various video game development tinkerings, and found them to be overly useful in that environment. As for their use with my scripting in Airtable, I dare say outside of BtoA() and AtoB(), I haven’t consciously/specifically set out to use them.

Full transparency too, I recall finding that script/discussion in another thread, so can’t take credit for this script. I was more concerned with why AtoB/BtoA are only available natively within an Script Extension, but not in an Automation Script. And could anyone enlighten me from a technical stance, of why there couldn’t even be a AtoB() or BtoA() native expression available for use within a Formula field?

There could be one if Airtable wanted to take the resources to create one. There are lots of formula functions that Airtable could implement if they wanted to. I’m guessing that there just isn’t enough of a financial incentive for them to do so.

It’s sad that Airtable positions themselves as the “more powerful” alternative to Microsoft Excel & Google Sheets, until you find out that those spreadsheet apps have about 500 more functions than Airtable.

1 Like

On this point, you and my wife agree. Sill, I’m pretty sure I know everything.