DEADLINE EXTENDED! Apply now for early-stage funding through the Softeq Venture Studio. Application is now due by Saturday, June 3rd.
Every year at Softeq, we enjoy coming up with a unique Christmas gift for our clients. Given that innovation is one of our core cultural company values, it can’t be something standard or off the shelf. For example, we can’t just send a flat 2D Christmas card…for the past 20+ years the Softeq Christmas card has been a 3D pop-up card. This year’s card is a Tree Delivery Truck.
It’s also an opportunity for me to get a little creative, dabble in some artwork (our marketing team does most of it), write some poetry for the card in the box, and sometimes do some programming, which was the case this year.
Part of the fun and challenge of the gift is creating something that’s different or interesting while staying below the gifting requirements of most businesses. Over the years we’ve given Thinking Putty, Kinetic Sand, magnetic Bucky Cubes, a wooden Soma puzzle cube, a Bluetooth enabled Sphero ball, a programmable Arduino credit-card sized game, a remote-controlled Hexapod robot, a 3D puzzle sphere, and many more. All of them are branded with the Softeq logo in some creative way. Sometimes they are electronic and high tech, and sometimes they are low tech and puzzle oriented.
The last 12 years of Softeq Christmas Gifts
I love gadgets and puzzles, and for inspiration we start by looking at whatever new gadgets I’ve added to my desktop collection over the year. We also think back to the ideas we had in previous years that were runner-ups, and perhaps make better sense this year, either due to cost or timing or theme. Sometimes the gift also has a connection to my past, which was the case with the Soma cube. I remember having a plastic Soma cube when I was growing up, and we found a company in Florida that could make us a nice wooden version, complete with a wood case and engraved on top with our logo for our 20th anniversary.
Our long term clients now look forward to this gift each year, and even collect them. Some keep them on their desks as a desktop gadget, and others bring them home to their kids. Adults and kids alike should get at least one fun toy for Christmas! If it brings a smile to someone’s face, we’ve succeeded.
This year’s gift also has a personal meaning to me. As a child growing up in Minnesota, I have fond memories of playing Cribbage with my Gramma Smith at their Wisconsin lake house (which they built themselves, by hand), and with my high school friends in Minneapolis, Minnesota. Later I brought a foldable cribbage board with me to Florida and introduced Cribbage to my friends as we traveled to various high school competitions. I’ve found that while many people have heard of Cribbage, not many have played it, as it’s more common in the Midwest.
Softeq Cribbage Board
Given the fact most of us have been in lockdown at home with our families, it made sense to us that our gift this year should be family oriented. We went back to our wooden puzzle supplier in Florida, who was able to create a foldable Cribbage board with pockets inside for pegs and cards. We added a few bags of Cracker Jacks for some nostalgia and it’s fun in a box!
Of course, we’re Softeq, and we couldn’t just have an ordinary set of cards. So we created a custom box and custom card backs around our cultural value of Innovation, and highlighted the recent launch of the Softeq Innovation Lab in Houston.
The card box and backs feature our cultural value of Innovation and our new Innovation Lab
We could have stopped there, but we wanted the faces to reflect Softeq as well. We settled on a design from a small company in Sofia, Bulgaria, where each card rank is a different programming language, and the code reflects the rank and suit of the card in some way.
We customized the design to make it our own. It was fun for me to return to my 8086 Assembly Language roots (one of the first languages I taught myself) and write some code for the 2’s rank. It’s actual working code.
8086 Assembly was one of the first languages I taught myself
Another fun card to make was the 5’s, where we selected an esoteric programming language called Befunge. I know over a dozen programming languages but I haven’t learned a new language in awhile, so I enjoyed this little exercise. The purpose of Befunge was to create a language that was difficult to compile (why? because why not?). Unlike most languages, which compile line-by-line in sequence from top to bottom, Befunge is two-dimensional and the program execution can flow forward, backward, up, and down throughout the code.
Befunge was designed to be hard to compile
First, let’s just look at what’s readable in this code. The 02*20*1997 is a line of math, but it’s also the founding date of Softeq when we received our official registration from the State of Texas on February 20, 1997. Similarly, the +++2020 is math but represents the current year (one we won’t forget for quite awhile), and “Softeq Innovation” is just a readable comment. I wanted some readable elements to the code and wanted the numbers to mean something visually more than just the math.
But let’s dig into how this little program works. The arrows (in magenta, < ^ > v) control the direction of execution. Starting at the top left, the challenge of this first line of code is to use our date of incorporation and add some math to it so that we arrive at 53, which is the ASCII code for the number “5” and the rank of this card. It starts by pushing the zero and two onto the stack, and then multiplies them together (02* = 0*2), so now we have 0 on the stack. We again push two and zero onto the stack, and again multiply them (20*), so we’re still at zero. Lastly, the 1997 numbers are each pushed onto the stack, and we start our math. We multiply the 9 and 7 for 63, and then subtract that from 9 to get -54, then add the 1 to get -53, and finally subtract from our previous zero to get 53. The comma “,” operator outputs the value to the screen, and ASCII 53 results in displaying “5”.
02*02*1997*-+- looks like (2*0)-(1+(9-9*7)) as a normal math formula. Note the first zero from 0*2 just stays on the stack and isn’t used in the formula, although we could have added one more “+” to add it in as it wouldn’t have affected the final number. We’ll actually use that zero though to end the program later.
This is where Befunge gets interesting. The v moves the program flow to the second line, and the < changes the direction so now we’re moving right-to-left. We take the 2020 and add the four numbers together with +++ (2+0+2+0) to get 4. But before we finish with the calculation, the v again moves us down a line and the < keeps us moving to the left. The main reason for this change in direction is to move the program flow around our Softeq and Innovation comments. There’s no comment indicator in Befunge like in most languages…comments are just put into sections of the code that aren’t executed, so we simply move the code around them.
Here’s the path of execution for the program
On this line, we push an 8 and then multiply it with our 4 from the previous line, resulting in 32. The comma , operator outputs this to the screen, and ASCII 32 is a space character. The v moves us down another line, and the > changes our direction now to the right.
We multiply 25* for 10, which is ASCII for Line Feed, and then push a string of characters onto the stack. If you read this string backwards, you’ll get a hint of what we’re about to do here. The colon : operator duplicates the last value on the stack, so now we have two H’s, and the v moves us down, where we’re about to start a loop.
Because this is Befunge, we will literally loop on the page. The underscore _ operator pops a value off the stack, which is one of those two H’s, and if the value is not zero, execution moves to the left, where the comma , outputs the second H, and the colon : again duplicates the latest value on the stack, which is now the letter e. The v, >, and ^ arrows now loop us around back to the underscore _ and the process repeats. The second e is popped off the stack, and it isn’t zero, so we again move left, where the first e is now output via the comma , operator and the colon : duplicates the a, and around we go again. We stay in this loop until all letters are output, and then that ASCII 10 line feed, and we reach our zero from the beginning of the program. The underscore _ evaluates the zero, and since it is zero we move right instead of left, ending the loop. The @ operator means “end the program”.
The final output to the screen from this bit of code is “5 Hearts”…the rank and suit of this card. Easy, right? ☺ Thankfully you don’t need to know any of the programming languages to play with this deck of cards, as the rank and suit are clearly shown.
If you want to write some of your own Befunge code, or try to run the code on this card and step thru the program, check out this HTML5 Befunge interpreter.
We hope you enjoy playing the game of Cribbage with some friends or family over the holidays, or at least enjoy some Cracker Jacks. We wish you and yours a very Merry Christmas!
Christopher A. Howard
Founder and CEO, Softeq