Category Archives: Sideband

Sideband #47: POV-Ray 101

Sideband MachineBy all indicators (page reads, Likes, comments), most of my readers don’t find POV-Ray quite as interesting as I do. That’s too bad, because I’ve finally decided on a theme for this blog. It’s going to be all-POV-Ray all the time! Think of the fun we’ll have!

Yes, of course I’m kidding. Anyone who knows me at all (hello, have you met me?) would know better. Me, one topic? It is to laugh. Out loud. (Honestly, I don’t know how mono-topical bloggers do it.)

But I do promise this is the last post—for now—about POV-Ray. We’ll just swing by the gift shop, and then move on to other things.

Continue reading


Sideband #46: POV-Ray 101

Take a seat!

Take a seat! (click for big)

As promised last time, my simple tour of POV-Ray continues with some examples a bit more interesting than an abacus stone or a box with holes in it. Time to move beyond a bunch of teal-colored spheres! (How about a bunch of hunter-green cones?)

I think it’s nice to have a place to sit while I lecture, so I’m going to use my digital woodworking set to provide a bar stool (and maybe a beer). The beauty of the virtual world is that , well, free stools (and maybe beers) for everybody.

Because I don’t just make a stool. I make a thing that makes stools.

Continue reading


Sideband #45: POV-Ray 101

Sideband ElectrodeRecently I took you on a tour of a virtual theatre I “built” to help illustrate a post about light and color. It’s virtual because it wasn’t built with wood or metal or rock, but only with 100% natural electrons grown in the U.S.A. (free range; no pesticides or antibiotics).

I also showed you some smaller objects I built with the same tool: a freeware ray tracing application, called POV-Ray. The application is a “rendering engine.” It takes your design and renders it as a 3D image, complete with textures, shadows, reflections and a variety of other life-like effects.

Today I’m going to take you down into the engine room!

Continue reading


Sideband #44: CG Theatre

Sideband ElectrodeBack on my first Sideband post, I wrote that, “Sideband posts are miscellaneous thoughts that accompany the main thread of posts. Think of them as small paths that meander off the main road. Some branch off, go a short ways and die after a short while. Others are scenic trails that follow along the main road.”

They never quite achieved that vision, so this year one goal is getting Sidebands back on track with that original “mission statement.”

And I’m going to start with fun topic: computer-generated 3D images!

Continue reading


Sideband #42: Half Time

Tonight’s sky holds a half-moon that looks somewhat like the picture on the right. Can you tell me, just by the picture, is the moon getting bigger or getting smaller?

Of course the moon isn’t really changing size. We use the shorthand “bigger” and “smaller” to refer to how much of the moon we see. Or more properly, how much of the moon is illuminated by the sun. Or even more properly, how much of the moon’s surface facing the Earth is illuminated by the sun.

You can see why we often just say it’s getting “bigger” or “smaller!”  Or we can use the terms waxing (getting bigger) and waning (getting smaller).

So can you tell, from the picture, is the moon tonight waxing or waning?

Continue reading


Sideband #41: CS Jokes

I close the first round of CS101 articles with some of my very favorite CS jokes. Sure, they’re esoteric, but they’re also really funny. Thing is, you may have to trust me on that.

Binary

I have a sign in my cube:

There are 10 types of people…
Those who can count in binary,
and those who can’t!

It garners two reactions. Some people just walk away puzzled. Some people look puzzled for just a moment and then they crack up.

It’s a joke that works if you know binary. Then it’s pretty funny, but if you don’t, you won’t and I’m not sure explaining it can make it funny. You may finally understand it, but I’m not sure it’ll be funny.

At least I don’t think it will. Let’s try.

Short and sweet, 10 is the binary number for 2. In binary, the two-digit number one-zero is not “ten” (meaning ten), but “one-zero” (meaning two). In any base, the number “10″ has the same value as the base. In octal (base 8), the number “10″ means eight. In hexadecimal (base 16), “10″ means 16!

So the sign is really one of those “two types of people” jokes, but you have to be one of the types of people mentioned to get the joke. I like it because it’s self-referential; the joke is the thing it’s joking about.

So… funny?

COBOL

There’s an even more esoteric joke I thought was hysterical the first time I saw it. Finding this one funny requires knowing three certain computer languages…

Lou: “Did you hear they invented an object-oriented version of COBOL?”
Bud: “Oh, yeah? What’s it called?”
Lou: “POST-INCREMENT-COBOL-BY-ONE”

Trust me, it’s hysterical if you know C++ and COBOL. They may both start with ‘C’ (in fact one of them starts with ‘C’ in two senses), but they’re nothing, and I mean nothing, alike.

Explaining this one would be tough, and I’m not sure there’s any payoff. You’d need to know a bit about the C language and its object-oriented version, C++ (C plus plus), and you’d need to have some feel for another language, COBOL.

There is, by the way, a wry observation about the C and C++ languages that hinges on the hidden reference part of the COBOL joke. Specifically it has to do with what C++ really means and what that suggests about the values of C and C++ compared to each other.

Unix

My all time favorites are a pair of Unix jokes:

Unix is user-friendly… it’s just picky about its friends.
How’s my programming? Call 1-800-DEV-NULL

(That first one is a nice mini-tutorial on it’s and its!)

So there ya go; some really esoteric computer programmer jokes!


Sideband #40: Chessboard of Rice

I recently mentioned a parable about grains of rice and a chessboard. If you were industrious enough to try your own interweb search for [parable 64 squares grains] you might be ahead of me. Or you may have known the parable already. For the rest of you, here’s the deal.

Stripped of the narrative, it’s about taking a chessboard and placing a single grain of rice in the first square (in some versions, it’s a grain of wheat). In the second square, place two grains of rice—double the amount in the first square. In the third square use double the grains of the second square. For each square on the chessboard, use twice as many grains of rice as used for the previous square.

I’ll come back to the punchline, but I stripped the narrative. Let me redress that matter. I was going to tailor my own from the whole cloth, but I decided to look around to refresh my mind about the pattern and instead found an off-the-rack number that looks just great. It’s recently minted, and it’s called The Power of Compounding. I couldn’t put it better myself, so I didn’t.

If you would like to dig deeper on your own, you can start at the Wikipedia article that discusses it: Wheat and chessboard problem.

Here’s the punchline: if you could pour grains of rice for all 64 squares on the chessboard, you end up pouring a total of 18,446,744,073,709,551,615 grains of rice.

If that number sounds familiar, you may have been reading this blog. That number is 18 exabytes (18 giga-giga-bytes), which I first mentioned writing about loading a lot of movies on a very large disc drive. Specifically, that is the number of unique addresses you get with 64 bits: 18 exabytes.

Actually that is one less than the number I mentioned. That number ended with 616; the number above ends with 615. The difference is that here we’re not counting the empty chessboard with no grains of rice. In previous talk about 64 bits, all 64 bits being off (all chessboard squares empty) is the number zero, which I’ve also mentioned before. The parable skips the empty chessboard and starts with one square, one grain of rice.

We can think of the chessboard as a binary number. Each chessboard square is one bit. The amount of rice that is poured for a square (twice the amount used for the previous square) is the value of that bit. Each added bit is worth twice as much rice as the bit before it.

As the parable mentions, at first the doubling doesn’t seem to amount to much: 1, 2, 4, 8, 16, 32, 64, 128… At eight squares, even after doubling seven times, we’ve just broken 100. We can pause here to note that the total amount of rice poured is 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255. That is the sum of the bit values.

Let me draw the connection to binary numbers more clearly. If a square has rice poured on it, that bit is “on” (is set to “1″). If there is no rice for a square, that bit is “off” (is set to “0″). In the parable the squares are set progressively. No square is ever reset to off once filled. From a binary number point of view, it progresses like this: 1, 11, 111, 1111, 11111, 111111, 1111111, 11111111. The last one represents eight squares filled with grain, each one holding twice as much as the one before.

If we imagined sweeping away the rice from the middle four squares and leaving the rice in the two end squares on each side, we’d have 1 + 2 + 64 + 128 = 195 grains of rice. The binary number represented by the squares now is 11000011. (I haven’t said anything about which way is which on the bit strings. For now it doesn’t matter.)

As the parable also mentions, after a while the doubling becomes serious. 16 thousand, 32 thousand, 64 thousand, 128 thousand, 256 thousand. Wait, that’s a quarter million, and we’re only 18 squares in! By 25 squares we hit 33 million; at 30 squares we cross the billion mark. At 40 squares we reach trillion (million million), and at 50 squares we’re over 1000 times beyond that. By 60 squares, we’ve got over 1 billion billion grains of rice, and we reach the final count four squares later: 18,446,744,073,709,551,615 grains of rice.

The interweb returns varying numbers for “how many grains of rice in a pound.” The number goes as low as 16,000 to as high as 29,000. One source measured it at 22,680.  Short grain rice would have a higher number of grains per pound; maybe as much as three or four times.

Let’s assume 30,000 grains of rice in a pound and see what we have on the chessboard.

Well, that’s 307,445,734,561 tons of rice. The Empire State Building weighs in around 370,000 tons, so there’s almost 1,000,000 times as much rice.

One million Empire State Buildings worth of rice.


Sideband #39: “Star Trekking It”

As a quick Sideband sidebar to the Star Trek holodeck article just published, I want to mention a metaphor I use to refer to a common science fiction fan phenomenon. The metaphor has a label: “Star Trekking it.”

A while back I mentioned another metaphor: “doing a Boston.” This is like that. It’s a specific reference applied to a general situation. In this case, the metaphor is a general idea in a specific context: explaining away ridiculous stuff in Star Trek.

And make no mistake, Star Trek needs plenty of explaining!

Continue reading


Sideband #38: The Next Hill Over

Imagine standing on a very tall hill in middle of a thick forest. Your hill is tall enough to take you above the trees; when you look out over the trees, you can see for miles around you. Ahead you can see another hill sticking above the trees; this is your goal.

You want to reach that hill.

A question arises; you are asked, “How long will it take to reach yon hill? What will you need along the way?”

If you stood in a flat, empty field and looked across at your goal, it would be easy to answer the question. You have some idea how long it takes to walk a distance across a flat, open ground. The time it takes is just a function of distance to cover.

You can see any potential obstacles, so you can plan to avoid them if possible or bring along resources (boots, ropes, ladders, cleats, whatever). And you can calculate the time either choice is likely to add to the trip.

It’s just common sense: It’s easy to plan a journey when you can see the territory ahead.

The problem is that the forest conceals your path. It might be as easy as just walking down your hill and making a bee-line for the next hill; no problem, there might even be a beaten path. Or there might be rivers or ravines to cross. There might even be dragons. You can estimate the best case, problem-free, straight path. But any unknowns you encounter are most likely to increase the travel time.

After you’ve conquered a few forest paths you begin to get an eye for the lay of the land. You begin to get a feel for the kinds of obstacles you’re most likely to encounter. That makes you better at using rules of experienced thumbs to calculate better travel estimates.

But you still never know when there be dragons there.

I’ve used this metaphor to explain why estimating the time for any project can be tricky if it involves exploring new territory. And the thing is, software development is likely to explore new territory. Invention is often a project requirement, and experience does make you better at guessing what lies ahead.

It’s not a bad metaphor about life: Invention is often a requirement; experience makes you better at guessing what lies ahead.

What’s the ancient saying about experience? “Experience is a comb life gives you after you lose your hair!”


Sideband #37: Joining the Group

A recent Saturday Morning Breakfast Cereal comic set off “Ah, Yes!” bells today. It explains graphically and precisely why I’m so allergic to trendy:

from SMBC by Zach Weiner

Or as great Groucho Marx so famously put it, “I refuse to join any club that would have me as a member.”

Actually, that’s not entirely true. There are some clubs—not the kind referenced in the cartoon—that I would join. I’m just not one to jump on a mass band wagon. I have deliberately tried to live life per the Robert Frost poem, The Road Not Taken. (“And that has made all the difference.”)

I’m just not one for mass movements and large crowds. I’m not anxious about being in a crowd; it’s more that I find crowds (and often people in general) irritating (for exactly the reason indicated on the graph above). For almost two decades now I’ve held “Wednesday Night @ the Movie” (although it hasn’t always been on Wednesday).

My pals come over, chat, drink my beer, and then we go to the last show at the local theatre. Often we see a new movie (sometimes one that came out the previous Friday) as a “private showing.” We have the entire theatre to ourselves. It’s wonderful!!

In fact, it’s Wednesday, and the guys will be showing up soon. I just wanted to post that great cartoon! It speaks to me, it does. And it speaks of me!


Follow

Get every new post delivered to your Inbox.

Join 369 other followers