New Self-Portrait for February 2021

February 2, 2021

I painted a new Bamboo self-portait for February 2021!

Hopefully this will be one of the only ones where I’m wearing a face mask. New one in a month or two!

The Macintosh: It's Free Real Estate

February 1, 2021

If you’re a software developer, you’ve probably written some code that, at the time, seemed like a great idea but turned out to be a not-so-great one after a while. I’ve done it hundreds of times. Often it’s no big deal – it’ll get cleaned up or removed eventually, with varying amounts of pain involved.

Every once in a while, though, a decision is made that causes real big problems, and sticks around much, much longer than you’d expect.

Just like how IBM engineers were only thinking about that first megabyte of RAM when designing how the Intel 8086/8088 would work in the first PCs, Apple engineers were only thinking about that first 16 MB, since that’s all the Motorola 68000 processor used in earlier Macintoshes could handle without any hacks.

A 68000 processor with 16 MB of RAM, and a 8060 with 1MB

Apple engineers also wanted to solve a classic memory management problem – how do ensure that the memory a program asked to use is actually done with it? Multitasking was still in its early days – a difficult thing to do on a Motorola 68K processor anyway – and you needed some way to make sure each program plays nice with the memory they’re given, and gives it back to the system when they’re done.

The 68K could use up to 16 MB, which amounts to a 24-bit address bus (2^24 bits = 16777216 bytes). The native data size – the “word” size – for a 68K is 16 bits, which means it would take two words, or 32 bits, to represent a spot in memory. This address – the pointer – had an extra 8 bits available for basically whatever you wanted to use them for. On the Mac, they used these 8 bits to flag blocks of memory as “locked” or “purgeable”, so that the garbage collector, a process that cleans up RAM, knows to leave it alone (“locked”), or that it’s safe to be cleaned up if needed (“purgeable”).

However, technology progresses. The 68020 came out which could address 4GB of memory and, with a 32 bit address bus, needed all 32 bits of that memory pointer. Memory prices started dropping. Users wanted more RAM. Apple advertised that their machines could handle more RAM. But Apple couldn’t open the floodgates to all this RAM, because these hybrid (24 bit address + 8 bit garbage collection data) memory pointers, when turned loose on a system that expected all 32 bits of a memory pointer to point to an actual address, would crash horrifically.

A program hands a 68020 a hybrid address, and the 020 hits the program in the head with it

Apple had to force their operating system to operate with 24 bit addresses until they could get everything using these hybrid addresses cleaned up, and this took quite a long time, almost up until Apple switched from 68K processors to PowerPC processors in the late 90s.


Changelog

  • 2021-02-01: Initial post
  • 2021-02-10: Add link to IBM PC memory map post

The Amiga: What the heck is NoFastMem?

January 22, 2021

Young Bamboo using an Amiga: “What the heck is NoFastMem?

The Amiga was a marvel of computing at release, with a custom set of processor chips that took over audio, video, and I/O from the CPU, allowing the computer to do so much more than other machines of the era.

The Amiga Original Chipset - Agnus, Denise, and Paula - all working hard.

These custom chips - Agnus, Denise, and Paula - made the Amiga the Amiga, and when the Amiga first came out, all of the RAM in the machine was made accessible to them, to really show off the machine’s potential. The RAM these custom chips had access to was called Chip RAM, ‘cause the custom chip Agnus, and not the CPU, managed access to that memory. My first real computer, an Amiga 500, came with 512KB of Chip RAM. Back then, this was a lot, but, as with all things computers, memory needs steadily grew, and the 512KB it was released with in 1987 quickly became insufficient.

A program looks at Agnus and the 68K process, wonder who to allocate RAM from

All Amigas supported memory expansions of various types. Even the original Amiga 1000 could be upgraded to about 10MB of storage. Memory on the Amiga came in two types: Chip RAM, which Agnus managed, and Fast RAM, which only the CPU had access to. Since the custom chips couldn’t access Fast RAM, programs that could use it could move data in and out much more quickly without Agnus standing in the way.

I had an A501 trapdoor expansion in my Amiga 500, which provided an additional 512KB, bringing the machine up to a whopping 1MB! When you booted the machine, it showed the 512KB of Chip RAM and 512KB of Fast RAM…but in my case, it wasn’t technically Fast RAM. The trapdoor expansions sat on the same path the custom chips used to access normal Chip RAM, but without replacing Agnus with a newer version, the trio couldn’t use it. I had more RAM, it was treated as Fast RAM by AmigaOS, but it was actually “Slow” RAM, since Agnus still controlled it.

Over the years, there were improvements to the custom chips and CPUs to allow more Chip and Fast RAM, eventually reaching 2MB Chip and 16MB Fast with the final Amiga, the Amiga 4000T. These computers could handle more and more applications and bigger, more complex games as time went on.

Bamboo: “Pretty impressive, huh?” The NoFastMem icon appears. “Oh, right, NoFastMem”

See, some really really old Amiga software didn’t have any clue how to handle that Fast RAM being in the system, and, since the operating system and CPU provided almost no memory management whatsoever beyond “play nice”, poorly written software could tell the OS to write anywhere in RAM and it would do so, with disastrous results. If the computer’s reporting back 1MB of RAM, and half of that is actually Fast RAM, that software could make some very poor assumptions.

NoFastMem is a resident program that disables all Fast RAM in the system while it’s running, even the “Slow” Fast RAM. You only get access to Chip RAM, however much that may be. That means you can run that older software without problems, and then you can stop NoFastMem to get all of your memory back when you’re done. Neat, huh?

Bamboo makes a heart around the Boing ball on his shirt

Changelog

  • 2021-01-22: Initial post

Learning a new programming language - The animation!

July 12, 2020

It took a while, but I finally finished my first animated short for Rabbit with 1000 Repos. This is for one of my first comics, Language Learning.

As with most of my art, it was done using a lot of open source software:

  • Krita for the hand-drawn animation and assets
  • Audacity for recording and cleaning up audio
  • Papagayo for breaking down audio into mouth movements
    • I forked the C++ version and merged in a ton of commits from others over the years. Before I start on the next animation I’ll get a proper release done..
  • Inkscape for titles
  • Synfig for assembling the animated pieces into rendered scenes
  • Kdenlive for assembling the scenes into the finished video

Now that I have a solid process for making animated pieces using the current state-of-the-art in open source art tools, I’ll be splitting time between making comics and animations.

Three favorite hobbies?

June 22, 2020

June 2020 Notes

This was done in the pre-pandemic times, and with the inability to go anywhere except to the store and to exercise, they’ve become more important than ever. Having a creative outlet outside of work, where you Make A Thing, helps to refresh you for when you go back to work. Plus, it’s something fun to talk with your coworkers about (if you want).

I still plan on working on my Ralsei cosplay. I have a few small tweaks to it so that it’s ready for future, in-person conventions (or innovative online ones!).

The Word 'Just' in Code Reviews

June 10, 2020

Notes

“Why didn’t you just…” is a phrase I’ve worked very hard to eliminate from code reviews, for the benefit of others. For those of us with loud inner critics, having it written to you in a review can imply:

  • You didn’t think through the problem well enough. That may be 100% true, and the point of code reviews is to think through the problem more with help from others, but now I think you think I’m an idiot, and what could be a learning or teaching moment has made me a bit less receptive to the information.
  • You should have known better not to do that. Maybe I had looked into snakey and decided not to use it. Or that was a new thing in snakey and my knowledge of the library is out of date. In this case, a code example going along with the comment is a huge help. Show me what you’re thinking by writing some code, and it could help massage even a straight “Why don’t you just…” in a great “A-ha!” moment for one or both of you.

Remember, rogerf really thinks Bamboo will find these improvements useful. They’re not being a jerk within the rich fiction of this comic. But that doesn’t mean anything when an inner critic gets involved.

Additionally, rogerf was probably trying to soften the blow and make Bamboo feel less upset. In code reviews specifically, this is where a code example, provided within the comment and without making someone ask for it, can be much more effective.

“What do you think about” is a phrase I’ll often use in these contexts, because if they had thought about it, then cool, you already know! If not, cool, now we’ve both thought about it and we can discuss it!

There’s a lot of other ways the word “just” can be used, and there’s discussions online about how trying to govern the use of this word, especially in the workplace, could be damaging. In the context of code reviews specifically, my own experiences and conversations have shown that there are much better alternatives than the word “just”, and they trigger inner critics a lot less quickly.

Transcript

Bamboo receives a code review comment notification

Reviewed by rogerf_:I think you’ll find these improvements useful!

rogerf_: Why didn’t you just use the function from snakey instead of reimplementing it here?

“Inner Critic”: Why didn’t you just do it right the first time, Bamboo? Why did you just waste their time on your crappy code, Bamboo? Why didn’t you just do the research, Bamboo? Why did you just show everyone how bad a developer you are, Bamboo?