Programming Throwdown - COBOL and Mainframe Computing
Episode Date: September 28, 2017Did you know that there was a programming language co-invented by a consortium of government offices and top businesses (at the time)? Today we talk about that language: COBOL, and also discu...ss the mainframe computers of that era that ran COBOL. Show notes: http://www.programmingthrowdown.com/2017/09/episode-70-cobol-and-mainframes.html ★ Support this podcast on Patreon ★
Transcript
Discussion (0)
programming throwdown episode 70 cobalt and mainframes take it away jason hey everyone um
so you know we actually we get a lot of emails of people saying, hey, can you advertise, you know, our new, I don't know, energy drink or something.
We don't actually get energy drink.
I just don't want to call anyone out.
And we don't everything we advertise or everything we talk about, I should say, are things we legitimately use.
We don't just I think the word is shill.
We don't just shill for people um and it's kind of part of proving that um i uh i was on udacity because i was uh interested in
uh game theory plus reinforcement learning so uh for people who don't know i did my phd in
reinforcement learning and i've also been just really fascinated with game theory and now those two things are actually starting to come together so game theory
has advanced to the point where economists don't know what to do um and we'll talk about that a
little bit and reinforcement learning has gotten to the point where like uh machine learning
engineers are kind of stuck and they actually come right together.
And they're both kind of on this crash course. So I put that into YouTube just to kind of see,
you know, what I would get, you know, what people are thinking about that. And I got a Udacity course. It was actually the last video in the machine learning course
was the first result. And basically it was Michael Littman, who's pretty
famous in the reinforcement learning community. And he's like, yeah, we don't know how to solve
this. He's like, here's some ideas, but I have no idea. So it didn't really help me that much.
Actually, the ideas were some pretty good leads. But it was pretty cool that like Udacity is pretty
pretty integrated in YouTube and all that. But basically, just to kind of fill everyone in,
so when you think about game theory,
you think about sort of these two-player zero-sum games.
Like, for example, or maybe not always zero-sum,
but for one person to win, the other has to lose.
And so, for example, there's this game called Matching Pennies.
Actually, Matching Pennies isn't zero-sum.
Oh, there's like Prisoner's Dilemma is one.
Prisoner's Dilemma also isn't zero-sum,
but this idea where there's these two people,
and they both get put in two separate rooms
and some you know invest imagine you and a friend commit some crime together and they put you in
two separate rooms and they say okay you know you need to confess and if you confess then we're
going to give you less time in jail uh if you don't confess and we find you guilty, you're going to get hammered, right?
So if you confess, like let's say Patrick and I are in this situation.
We rob a bank or something.
We get busted.
We're in two separate cells.
And I say, yep, you know, I did it.
And Patrick says, yep, Jason did it.
Then I'm in big trouble. I'm going to take like
the entire, I'm going to be the perpetrator and I'm going to be the instigator. And I'm
going to get this huge sentence and Patrick's going to go free. Right. And vice versa. Right.
If we both say, yeah, we did it, then we'll get a little bit of a sentence. Like we'll get a
reduced sentence for being honest. And if we both say none of us had anything to do with it, then the police have no evidence and we get off, let's say, scot-free. That's the best, right? We might go to there because it's hard for us to trust each other.
Like if I say, you know, actually, sorry, the best is for us both to say we did it and then we both get a reduced sentence.
If we both say we didn't do it, then we both get a pretty long sentence.
So we both want to say we did it.
We both want to say we committed the crime together.
And then we kind of will both get some punishment, but not that big a punishment because we admitted it.
But the danger is if I say, yeah, I did it, hoping that Patrick's going to do the same.
Patrick could just say, you know, I didn't do it.
And I get the full sentence
so if patrick knows that i'm admitting guilt if he knew that then he would obviously just say i
didn't do it and he would get off right um and so game theory that's kind of one example of like
one of these complicated situations right like if you don't have any communication with the other
person then you have to like just deeply trust them or you just say, you know, I didn't do it and hope that they do the same thing or not do the same thing.
But just it puts you in what's called a Nash equilibrium, which just means that if I say I didn't do it, then that's and Patrick says he didn't do it.
That's sort of the best we can do with no
information anyways it's a little bit kind of you know it's a complicated subject there's a lot of
super interesting work on it um but then there's this question of what happens when you have three
players um and it turns out when you have three players or a non-zero-sum game like that prisoner's dilemma things get really really really
complicated um it's almost as if think of it like this like it's pretend like you didn't know what a
for loop was and so you're writing like you know you have to sort 10 numbers and you actually do
it by writing all the instructions like you do a bubble sort like writing all the instructions. Like you do a bubble sort, like literally all the
instructions, like an unrolled for loop, because you don't know what a for loop is. And then all
of a sudden they say, okay, now you have to sort 10,000 numbers, right? Without a for loop, like
you're kind of in trouble, right? And that's kind of where economists are with, you know, multiplayer
game theory is they think about things at this kind of level of detail,
but it's hard to sort of abstract that,
and it's hard to, like, scale that out, let's say, right?
On the other side of the fence, there's reinforcement learning
where they can easily handle, like, huge games.
Like, you could play chess, or you could play Go,
or you could play one of these games where there's just like you know millions and millions of different ways the game
could be played and it still works but reinforcement learning only works on two player zero sum games
like go is an example like there's two people and then at the end of Go, one person wins and the other person loses.
There's no in between. You can't like both win or anything like that.
And so as soon as you go to like a three player game or something like Prisoner's Dilemma where both people could win if they choose certain strategies,forcement learning doesn't really know what to do there.
And so there's sort of this sweet spot
where when you have these kind of complicated games,
like imagine a three-player game of Go or something like that.
Nobody really knows how to solve that.
The game theory people can't scale up,
and the reinforcement learning people don't know how to handle three players.
And so it's just this hole.
And this is something kind of like super fascinating and i've been kind of really diving
deep on it um and uh you know it's just i think it's kind of amazing that so many kind of research
papers are are out in the open now you don't have to like i don't know patrick do you remember this
when you had to like subscribe to science direct or you had to use a login from the university library to read research
papers i didn't do it often but yes i do remember when it was much harder to get stuff yeah i was
like yeah buy this research paper for 50 you know that was curated with government money it's like
they finally kind of stopped a lot of that um and so it's it's it's pretty
awesome that that with between like udacity youtube you know free and open research papers
that uh you know you can dive deep on almost any topic and that's sort of what i'm binging on right
now um did you take any like game theory courses or any like was it part of like microeconomics
or anything like that i'm sure it was talked about in some economics course, but I never, I was always sort of
self-learning and reading about it.
It isn't talked about that much.
Yeah, same here.
I mean, we had a, we had a, well, I had a game theory course in grad school, but other
than that, I mean, I kind of elected to take that.
But yeah, in general, it's a topic that is actually super interesting.
I mean, anytime you have any type of negotiation or there's an auction, like you're on eBay
buying something, there's game theory at play there.
One kind of really interesting game theory problem is called the Keynesian Beauty Contest.
Have you heard of this?
I think you were the one who told me about this.
I might have now
is this the one where everyone votes on like who is the prettiest person and you get a chance of
winning if you voted for the person who ended up being the prettiest person uh close so the way
it works is uh i think you have the right idea but it's it's not the prettiest it's actually
the person in the middle. So everyone picks a number
between one and let's say a hundred. And if you get the median, you get a thousand dollars.
So there's going to be some people who will call them like level zero people. These are people who
are just going to pick a random number. Like they're not going to really know what to do.
Right. And so let's assume
that everyone's a level zero person. Everyone's just picking random numbers from one to a hundred
and you want to pick the median. Well, you're going to pick, you know, 50, right? Because
there's going to be a whole range of numbers and you're going to pick the one in the middle.
But there's going to be some people who are going to think the same way that you just did.
So there's going to be a group of people who are all going to pick 50. And what that's going to be some people who are going to think the same way that you just did. So there's going to be a group of people who are all going to pick 50.
And what that's going to do is that's going to, you know, make the middle go lower.
Right. So if there's actually sorry, it can't be 50.
Let's say it's the bottom one third or something.
So a bunch of people are going to pick 33.
And that's going to make the middle kind of go lower, which is going to make the median go lower, which means if everyone, for example, if half the people pick 33 and half the people pick just any number, then you want to pick something less.
I think it's like 25 or something.
You can calculate what it is.
But then you can keep kind of doing this.
You can keep saying, doing this you can keep
saying oh there's going to be some people who are going to think two steps ahead and so i should
think three steps ahead or i should try and figure out how many people are going to think two steps
ahead and yeah this this whole stuff is super fascinating and it turns out whenever you're
dealing with like auctions or these type of like financial negotiations, the stock market, stuff like that,
all of it has sort of the game theory kind of built in. Like there's agents who are, you know,
calculating all of this. There's all the quantitative trading is based on this.
And it's definitely worth checking out. I'm going to post a link to the YouTube video,
the audacity, that part of the, not the end
of the course where I went, but, but the part that starts talking about game theory.
And it's actually Michael Littman, who is a super genius and another gentleman who I
don't remember his name, but he's a, he's actually a pure economist.
And the two of them together talk about game theory and reinforcement learning.
And then together they just hypothesize what to do you
know now that they've crashed into each other um so yeah check it out i think for game theory one
of the things for me is and this doesn't exactly fall into the economic standpoint but understanding
that each actor in some situation that you might encounter in work or life or whatever has a
different perspective they're viewing and they're trying to make their own decisions
based on what you're doing just like you are trying to make a decision based on what they're
doing yeah actually you you hit the nail on the head so like the uh the current like best idea
for solving this problem where let's say you have like a good example of this is there's
this game called dota defense of the ancients and it's a it's a five versus five game on the
computer and there's there's people who are trying to uh you know have an ai play that game but you
can imagine you know ai you know robots playing soccer or or uh uh AI people really playing any type of team game like Counter-Strike or Team
Portress or something. None of these AIs are really any good because they can't really cooperate.
And it turns out the way to sort of get the cooperation and the multiplayer is there's a
technique now called neural fictitious uh self-play which sounds kind
of weird but basically uh um it's as you said you know you are trying to do what's best for you
but you also keep a mental model of all your opponents and you play the best response to their
to what you expect them to do so you know for example, if you know there's this amazing chess move,
but you also know that your opponent has never played that move before,
given that circumstance, then you're not going to plan for that.
You're going to assume that he's going to miss it again,
and you're going to play the best response to what you think he's going to do.
And so it kind of gets into this keynesian beauty contest where like if you do that but you know he's going
to do this and then it kind of it ends up being this sort of recursive thing um but yeah that's
kind of where the state of the art is right now is in like this opponent modeling and all that
makes sense i yeah i wish i had a more academic i should probably become
more academically rigorous about my understanding of game theory but maybe it would help or maybe
it wouldn't i'm not sure like as far as like a practical day-to-day life like you talked
previously you recommended a book on sort of negotiation and it's clear how that applies
day-to-day do you think studying more game theory theory oh man studying
more game theory in an academic sense past you know sort of a peripheral superficial understanding
do you think that has benefits to like how actually stuff happens out in society i think um i think I think the high-level concepts, yes.
So in other words, this idea that there's going to be some group of people who are going to think one step ahead, some are going to think two, three, four steps ahead.
And that the interesting part is trying to figure out what fraction of the population is going to think so many steps ahead.
So then you could build sort of like the meta system.
Like I feel like that can translate into real life.
So in other words, the very high level concepts
where you don't need to really understand a lot about information theory or anything,
like the high level concepts, I would say yes.
But they're also kind of like being developed as we speak so
um no one has yet written like you know a layman's guide to this stuff so yeah probably unless you
really want to geek out it's probably not the type of thing like you'd probably be better off
reading the negotiation book but if you wanted to know if you ever wondered like
why things remember i was talking about this earlier like why things cost what they do
that's still this is actually kind of just a continuation of that fascination um and so uh
i think this is a big part of that um and so if you're interested in economics maybe another way
of putting it is if you're a machine learning person check this out because there's this whole field of economics that you need to catch up on and if you're an economist
it's exactly the same but in reverse right fair enough so yeah all right on to the news
yeah first news is a free book so i was just uh did you say free i did did. Free. And it's not even a Keynesian beauty contest.
Everyone gets it for free.
Annotated algorithms in Python.
So I followed the programming subreddit and I came across this.
It's pretty cool.
I skimmed through the book.
It has a lot of really interesting stuff.
It's similar to, I have a book from Sedgwick called uh algorithms and c++ that i've had for
you know super long time this is very similar in that it covers you know a lot of the same
algorithms um and it you know the code is is documented and there's also you know you know
paragraphs describing describing the solutions right in general i think python's a better
language for kind of explaining things um so so this is probably
a better book than the one i have and it didn't cost a hundred dollars it's totally free so check
it out you can get a pdf of it it's it's a long book i mean when they say it's a full book it is
um 388 pages so uh it's the real deal um You could probably get a physical copy.
I don't know how much that would cost, but it would be worth grabbing one of those.
Otherwise, feel free to thumb through the PDF.
It's totally free.
Nice.
My link is, oh, I mean, this is terrible, I guess, just having, this is not really a news story.
But this, if you type in, let's see if you type in interactive bloom filter maybe google can do it otherwise the link will be in the show notes but
this is a little well you wouldn't call them a widget anymore like a applet but um and this is
a javascript application demonstrating how a bloom filter works um but i thought it was two things
one an interesting
opportunity to mention to people about bloom filters um and a second thing i thought it was
a pretty good thing so this is one at a website jason davies presumably by a person named jason
davies um right and if you search interactive bloom filter it'll come up on google i think
the second hit for me otherwise the link is in the show notes. And what a Bloom filter is,
is if you think of a hash map, which is you have some array and you take some object that you want
to put in the array and you hash it in some way and you put the object at the index in the array
that was the result of your hash function so if you've never
heard of hashing before that probably made no sense and if you never heard of hash mouse before
it was probably not a great explanation but essentially you have a big list of places in
your array and you put an object in somewhere in that list and then there are ways of handling
things like collisions like what happens if two things can hash to the same result,
especially if you imagine having only like two elements in your array,
even if you have a really great hash function,
you still only have two results.
So you're sort of modulizing whatever your result is down to only two.
And so your chance of collision if you
have one object in is you know 50 percent um and so what happens is that as the table gets more and
more full you have to grow it because you need to make sure these collisions don't happen because
they degrade your performance um and you limit how much stuff you can hold in memory
so what if you want so so i've never seen a bloom filter before so i might totally
be embarrassing myself here but i think the idea correct me if i'm wrong is that
you don't need to like actually look up a value so the difference between a bloom filter and a hash
map is a hash map but don't spoil it no don't spoil it oh okay okay sorry i'm just figuring
it out now so i'll let you finish okay sorry um not to interrupt you uh the but to interrupt you
um so if you if you imagine you're building this hash map a lot of people have done this and this
is great because it provides constant time lookup of your object right so now imagine if you had you know um a bunch of records in a database
and say there was way too many to fit in memory but you still wanted to somehow keep track of
which things were in your database so that you didn't have to perform the expensive database
lookup just to see if something with a given id exists. And Bloom filters are the solution to that
or a solution to that,
which is to say,
if you have,
maybe you have, you know,
a hundred million potential objects
in your database
and you don't know which ones
and it's, you know,
cost you seconds to go over the network
or to go to disk
to read them out of the database.
You're stuck with this simultaneous problem of
it's expensive to check
and it's too big to just hold all of the values in memory.
And what a Bloom filter does is they take the items
that you know are stored in your database,
hash them, not once, but in three different ways.
And there's kind of different ways of doing,
producing three different hashes
or however many different hashes or however many different hashes but producing multiple hashes and then setting a
boolean flag and a bigger a big hash map there's just a boolean saying true or false and you just
start hashing all of the items that exist on your disk and you just hash them into this this hash map
and what happens is you will get collisions or you know it's very probably get collisions but you're not worried about it when someone comes in to say ask a question of the
thing that you're i guess this is sort of like a cache you know hey do you have object foo you hash
object foo and if you have trues in the hash map for the three hashes of foo then what you can say is maybe but if you don't
have three matching in this case three is the example they have here in this demo so i'm saying
three but it doesn't have to be three but say you've hashed through three different ways and
it didn't match you don't have those three entries and you in fact as long as if you're missing any
one of them in your bloom filter then you go go, Oh, actually, I know for certain, I don't have that there. Because if you did have it, you would have those
three entries in your Boolean map. And the reason you can only say maybe, if they're there is
because you could have had collisions from multiple other different features that produce those
entries in the hash map. And so you don't know for sure, but based on the parameters of the hash map,
sort of how many collisions happen,
how many of the entries have the Boolean flag set,
you can, you know, sort of a priori up front,
you can know how likely if you say yes,
is it to be true.
And the more willing you are, that's see that the more willing you are that's awesome
the more willing you are to accept false positives the more compact your bloom filter can be the
smaller memory footprint you need if you want it to be yep sorry oh yeah so the bloom filter in the
example here is what like i think size of like 50 or something yeah i i would have to count it but on that order yeah so basically i uh
i put in just three words i put cat dog and dart and uh um and then i just asked whether a was
there and it said no because a hashed to three completely different cells than any of those words
and i said aa and i said aa and by aa there was like one collision but then the other three
were empty so it knew that aa couldn't be there and then i kept going and going and going i don't
even know how many a's i'm up to probably 100 or 50 a's or something and it still has not even once
been able to found one of these strings where all three of those cells are filled in it's pretty amazing right so
you can find you know of course there exist bad cases so if you're talking about non sort of i
don't i'm not going to get into the academic definition but if you're talking about like
non-random queries like your queries have patterns like this can be much worse um but for just sort
of like because you can basically you can you could get a collision
on your very first try so if you imagine sort of cat and dog happen to hash to the same three values
then then you're just screwed right even though you only tried twice that can't happen just the
probability of it happening is low yeah i mean if you like assuming nothing about the hash function
right like yeah the probability of that happening
is let's say there's 50 cells then it's it's uh what 47 1 over 47 times 46 or something like that
but yeah it's extremely low but the more you'll notice if you play so usually everybody should
check this out so if you don't know about bloom filters i've never had the opportunity to use one
before but i always sort of keep them in the back of my mind that like,
this would definitely be helpful if you ever needed it.
Yeah, that seems awesome.
And if you sort of play with the example, what you'll learn is the more things you put in
the hash map, the more collisions you get, the more likely it is that
when you query it, you'll get back a probably there.
This is one of these things like, you know, I always am fascinated with just how unbelievably
fast databases are. And this is probably one of the techniques that they use, right?
I mean, it can be used for lots of things. Like I've seen it used a lot of distributed apps,
you can imagine, want to do this kind of behavior because if you're making a request
over the network that's very expensive and a high latency and so you'd rather much rather have it in
memory but you can't sort of hold all the data in your memory that doesn't work one thing i noticed
if you put in 13 z's um it only points to one cell i guess it's because the three different
hashes all have the same thing
but i mean that's that was something very specific um but i think you could also for
things in which a collision is low cost you could sort of also use this as your only data store
so like imagine imagine saying like i want to don't want to pay a lot to, to keep track
of all of the articles Jason has read on the New York times, not a promotion for the New
York times website, but, but like every time that Jason has a cookie and I'm only allowed
to store, you know, I have no idea if this is how cookies work, but, uh, let's just invent
a fictitious scenario for now.
You know, if, if I want to store that uh in the or so not
in the cookie but in the database back end for the new york times every time i saw jason's ip address
or his cookie uh key like i i want to only you know allocate 64 bytes to holding jason's entry
then every time he reads an article i could take the url of the article and put it in a bloom
filter and just keep putting it in and putting it in. And over time, if I want to recommend him articles he's not yet read,
I could consult the Bloom filter and say, has Jason read this article yet? Yes or no.
And if it says probably yes, it's not very expensive to me because if I exclude it from
my list, it's really not a big deal. It's not a bank, right? I'm just sort of like,
but the great
news is there are many many many visitors to the new york times and i sort of know that i don't
have to pay a huge cost or figure out like oh after a year i should delete my users because
up front you're saying for a very compact representation i know i can hold this for all
the users i'll ever encounter and know throughout all history all articles they've ever visited
without having to, like, phase stuff out of the cache or not or whatever.
Yeah, right, right.
That's a great idea.
In a sense, it's a little bit privacy-preserving too,
although, you know, not quite.
Oh, I don't know that it's primarily used for that purpose,
but yeah, I can kind of see that.
Yeah, I mean, it's loosely, I mean, it's a little bit more,
it's more privacy-preserving but yeah you can kind of see that yeah i mean it's loosely i mean it's a little bit more it's it's more privacy preserving than just storing in
plain text but yeah i wouldn't it's probably not cryptographically safe or whatever yeah but i'm
and then you're right also lots of databases like key value stores and things things where you have
some data in a cache in memory and some on disk but you you have to kick stuff out of the cache
eventually but you sort of hate to lose the fact that you knew that that did exist.
Yeah, right, right.
Yeah, this is super cool.
Everyone should go to this URL.
One thing, I do include the show notes when we post the update.
So if you follow us on iTunes, the show notes should be in the or on any podcast viewer.
The show notes should be in the podcast notes. You just tap the
URL and it'll take you straight to our show notes for that episode. Then you could tap this URL in
the notes and go to the Bloom filter. Everyone should check it out. It's really cool. Don't do
it while you're driving, but if you're on a bus or something, or you're at home, when you get home,
check out the, this Bloom Filter JavaScript thing.
It's pretty cool.
Yeah, my news, second news is OhMyZSH, which is almost a tool of the show.
But, you know, it's kind of weird making ZSH a tool.
But OhMyZSH is pretty awesome. Basically, I'm not one of these people
that really cares that much about,
let's say, Bash or ZSH or
C-Shell. I feel like they're all more or less
the same.
But OhMyZSH
adds a ton of
functionality to ZSH.
And I actually switched from
Bash to ZSH just because of this.
So someone that I used to work with showed this to me.
It does so many cool things.
Like the tab completion is incredibly clever.
If you put, let's say, the middle three characters of a directory when you're doing LS and you hit tab, it'll figure it out.
There's a bunch of kind of of nice to haves like uh when you're inside of a
github repository it tells you what branch you're on in the prompt um it colors a bunch of things
like ls and things like that automatically um it uh yeah it has a ton of really awesome features
like uh um another really good one is uh it has a bunch of different themes so if you want kind of different
color themes if you you know want like a prompt that's pretty easy on the eyes like a font color
that's pretty easy on the eyes and that theme will kind of percolate into like all the other
commands right so when you do ls you know it'll of fit that theme. So definitely check it out.
The other thing is it'll do kind of this really cool tab completion.
It'll actually, if you type in the name of a binary,
and then you do like dash dash tab,
it'll actually run that binary with dash dash help,
and then it will try to extract the command line parameters,
and then it'll autocomplete.
Or if you do, you know, get dash dash, what's the example? And then it will try to extract the command line parameters. And then it will autocomplete.
Or if you do git dash dash.
What's the example?
Or like git add dash dash b or something like that.
It will resolve that to branch or something.
So it will resolve command line parameters for you.
It does all sorts of other cool stuff.
I don't know if there's equivalents for other shells.
Maybe there is, like an OhMyBash or some equivalent, right?
But I guess the high-level thing here is check out these things.
They're really powerful,
and I feel like they've really increased my productivity pretty significantly.
So OhMyZSH is literally a one-liner um i mean you have to
change your your default shell to zsh and then you run this one line command and uh boom you have
this whole thing um it also auto updates um which is kind of dangerous i think about it but uh
yeah that does scare me i do use it but that also does scare me yeah i never really thought about
the consequences there.
I'm sure you can turn it off.
You have to trust that they... Yeah, that's true.
And then you have to trust that they know what they're doing otherwise.
But yeah, I've been using it for a few months now,
and I'm a big fan.
It's pretty cool.
I guess I missed out because for news,
is something I came across,
but it's actually a legit actual tool,
but it's not a software tool.
I don't know.
Maybe I should have been a tool of the show.
So this is the Curta Calcul so i came across this through a weird sequence of events i had sort of known about it for a little while like in the back of my head i'd kind of seen it
um and then there were simultaneously i saw someone created a 3D printed version of this mechanical object.
Ooh, nice.
And then also Adam Savage, now that the guy from Mythbusters,
they no longer do Mythbusters, has this channel on YouTube, Tested.
And they covered this.
The 3D printing thing that I had previously separately seen,
the guy who 3D printed it printed one for Adam Savage
that he unboxed on tested um and so that reminded
me about it anyways so the kurda calculator is also known as i think they call it the pepper
mill calculator and this is a non-electronic calculator it just blows my mind thinking about
it um and what you have is this tube that is maybe a couple inches in diameter you know i'm
using we probably should use metric but i i i'm not it's not at hand uh do you want to estimate
the metric size of it jason uh let me check okay anyways so something that is roughly about
handheld and it looks sort of like a pepper mill uh And at the top, there's a little handle
that you turn and grind just like you would.
It is about five centimeters in diameter.
Okay.
And probably a little more than that long.
And so what you have is a series of windows
and displays, sliders and knobs
that allow you to, on kind of one part of the two this is gonna be horrible
you should check out the pictures but one part of the tube you sort of set you know kind of like
the input for your calculation then on the top there's a set of displays that give you the output
of your calculation and then through a sequence of kind of throwing some switches and turning the
the grinder crank uh you can perform multiplication
multiplication division addition and subtraction um whoa cool on this calculator one of these
still or no uh no no they stopped making them uh when they basically got devastated by tiny little
you know pieces of silicon that did the same thing so early electronic calculators with like sort of discrete
components and presumably even vacuum tubes and stuff were very expensive and fragile but then
eventually you sort of had commoditized calculators and it put a ruin to these beautiful objects
although these were popular all the way through the 1980s that's surprising um so check them out
if you've never seen one before i think they're quite expensive to buy in working condition
hundreds of dollars kind of thing
and it's just fascinating to me and I don't
think today we'd probably be like
this is terribly slow but at the
time being able to multiply
I think it's like sort of 8, 9 digit
numbers with sort of 11 digit
running sum was incredible
and to be able to do it pretty
efficiently and so if you've
never seen one of these before check it out to me with as a uh computer scientist by trade software
engineer by trade um i'm always fascinated with intricate mechanical objects and this is sort of
some sort of pinnacle of mechanical complexity uh the all the moving pieces the gears the fact
that you're doing this we're going to talk about this it sort of goes along with cobalt in a way
but doing decimal arithmetic where you sort of have like the number nine multiplied by the number
seven and you need to be able to do that and display it in several different windows that have
essentially 10 sided discs that you know pop into the right rotation when you
it's just crazy it blows my mind like how do you even sit down and design start to design
something like this i think it's one of these things where like you really have to have a good
background in like number theory so actually i was playing a game so just to recap we did a few
interview episodes and that's why now we have probably 10 tools of the show all in one show.
But I was playing this game called Human Resource Machine.
Did you play this?
I have not.
It's on my list of, like, I should buy this and play it.
So, yeah, just for people who haven't heard about this game,
basically you're given an assembler with very few instructions,
and you have to complete different tasks,
like sort a list or add one to every number that you can input.
And the thing about this that's really cool is if you have a background in CS,
if you have a bachelor's degree in CS even,
you can blow through this game.
You'll know everything.
If people don't have a background in CS, it's really cool
because it kind of walks you through how to do all of these things using just a very
few instructions and also it gives you an environment where you know there's a right answer
um and but then it's got these challenge modes uh one of the challenge modes is do it in the
fewest instructions possible um and that is really, really interesting.
Another challenge mode is basically do it as quick as possible.
So in other words, at runtime, you want to step through the fewest number of instructions.
That's also really fun.
But this is one of those things where if you have kind of a good background in number theory,
you could probably figure out a way to do these multiplications using very few instructions
and i feel like that's kind of necessary when you're when each instruction is like you know
a physical thing that has to happen i want to know how you just make all of the sheer number of
meshes meshing gears and cylinders and precisely engineered and it looks like it still cranks rather easily like
that's crazy to me yeah are you gonna 3d print one so the 3d printed one is printed slightly
bigger than the one i i really want to but i've found that my appetite for 3d printing things
with lots and lots of pieces is very low because i tend to get like halfway through so i recently tried to print uh this is
off topic but they have a 3d printable transmission model with different gear ratios and so it's sort
of like an automatic transit transmission except it doesn't automatically switch gears
oh i guess just like a regular transmission not an automatic transmission oh got it anyways and
i was like wow it's amazing so i like spent all this time printing it suffered a couple you know failed prints but eventually got
it out of print and then realized i think it was not like i think it was not uh exactly square
my printer or something at the time and so all the gears didn't mesh and like i had spent all
this time printing it and then i think it wasn't quite right and i didn't know how to exactly how
to fix it it wasn't obvious and it was just really frustrating to have spent all this time printing it, and then I think it wasn't quite right, and I didn't know exactly how to fix it. It wasn't obvious, and it was just really frustrating to have spent all that time,
and then it wouldn't go together.
That sounds terrible.
Yeah, so I would love to print this.
Like, in my mind, yes, I'll print this, but I don't know if I'll ever have.
I would print the first three or four things and then be like,
oh, I see how this works.
I don't want to put the rest.
Next.
Cool, yeah, maybe I'll give it a shot i've been kind of itching for something to print but yeah i have a
feeling well look at the assembly manual and uh sort of collaborate for the 3d printed one there's
like a thingiverse um group or whatever where they discuss assembling it um i think there's only been
a few other people to be able to do it besides the inventor.
I think it's a pretty complicated thing.
So check it out before committing to it.
Okay, yeah, no.
If it's not very simple to assemble,
I generally am not very good at mechanical stuff.
I mean, just look at the picture of how many parts there are inside of it
if you Google Curta calculator.
Anyways, it's not going to be easy.
So I'm on Wikipedia, and yeah, it doesn't have a breakout of it,
so I can't tell.
It just looks complicated from the outside though.
I'm sure if you search Curta calculator exploded,
you will not want to print it anymore.
You will find a 3D printer on fire.
Yeah.
Okay.
Anyways.
All right.
So yeah, let's, we're falling a little bit behind, but we'll make this.
Okay, here we go.
We'll speed it up.
But book of the show book, my book of the show is, uh, it's actually just a biography
of Claude Shannon, who's a pretty famous mathematician.
And I guess you could say computer scientist, although it was really kind of ahead of his
time there.
Um, but, uh, uh, but yeah, check it out.
It's actually, I found this from a Medium blog that I follow.
And it's actually the people who wrote the biography actually wrote a blog post talking about their process of, you know, because this is written posthumously, right?
And so is that the right way to say it?
Posthumously?
Not humorously. I think it's pos-humorously? Not humorously.
I think it's post-humorously.
Post-humorously.
Anyway, so they, after laughing, they decided to write this autobiography.
And so, they covered, like, they actually went to his house.
They did an unbelievable amount of research.
Like, they're super passionate about Claude Shannon and these people.
And they did a ton of research for years're super passionate about Claude Shannon these people and they did a
ton of research for years and years and years um I haven't actually read the autobiography I just
or the biography I just got it um but just reading the blog post I was already you know
you put on my to-do list immediately because they it's an unbelievable effort and the other thing is
Claude Shannon bucks the trend of sort of modern day success stories.
You know, like, you know, they always say, oh, modern day people are organized. Modern day people are always going to the gym.
Modern day people are super hyper focused. And he kind of bucks all of that. Like he's not focused at all.
He also abandons ideas and then comes back to them like 20 years later and so this guy's like
like it sounds like he just has a limitless memory and and uh things are just incubating
all the time and it's just an incredibly uncertain environment um um you know there's all of a sudden
he's like oh something from 17 years ago now makes sense. And he just starts working on it and it's just completely chaotic, like totally risky,
no plan.
It just sounds kind of, it just completely goes against all.
If you were to pick up like a, you know, a self-help book written by a CEO, this would
go against everything.
Um, but yet this person was insanely successful and i just find that
fascinating also you know someone who's pretty disorganized like it kind of was sort of a ray
of hope that people were kind of like cluttered and uh clutter minded uh still have a chance um
but it's just cool to see to see this person just go about life like in a very different way i mean he'd like invent the bicycle like a new type of bicycle and then he'd like you know create this
new kind of math equation and then he he so claude shannon's most famous thing is his work on entropy
which is that's kind of ironic actually now that i think about it um but it's yeah like he came up
with the information theory and entropy and the idea that, you know, let's say you have a long string, but it's all A, A, A, A, A.
That's actually pretty simple.
And even if you add more A's, it doesn't necessarily really become more complex.
Right.
That's that's a gross simplification of his work.
But but, you know, he covered a lot of these, like what really is information?
What is entropy? What is is complexity stuff like that um so yeah check out this book and it's it's not written for computer scientists so it's so anyone should be able to
pick it up and read it um and i'm looking forward to uh to going through it his stuff comes up a lot
in communication stuff if you ever do like networking yeah yeah you hear
about stuff a fire upon the deep by verner vinci i feel like i already talked about this book but
it's probably just because i read it a while ago and talked about it at work um so a fire upon the
deep is i've heard i've had this recommended to me you know numerous times by various people
it's uh been around for a while i think it was written in the nineties. And so it's not a new science fiction book, but it is part of what
ultimately became a series, although I've only read this first book. And I, I, I think it's
decently well-contained and it is sort of sci-fi from the level of um you know very uh alien concepts so uh in fact i actually had a little bit
of trouble getting into the book initially um and just because of like how alien one of the sort of
storylines in the book really is i try not to spoil things i won't spoil it um but basically
about people moving around in space and encountering alien species and some of
the stuff that happens um and there's a lot of just like very strange things that happen um i
sort of believe last this is kind of funny because i've read several books between but i had to pick
one um but i think last time i talked about the three body problem and similarly had this thing
like this is very sort of strange and different um And this book had a similar feel that things just feel foreign in them.
And it's sort of an interesting part of reading science fiction.
And maybe this is what I read the most.
Maybe other forms of fiction also have similar things.
But just reading something that is talking about, you know, putting you in sort of the perspective of an alien that has nothing to do with you.
That's just so dissimilar from humans.
Obviously, it's still. That sounds like very tough to write yeah it is and and obviously like you know sort of bias
because fundamentally they have some form of communication because the author still has to
describe it um in some way and some pattern of thinking and in reality you know life could be
very very different than that in these stories but it would be really hard to write from their perspective or whatever like writing from the perspective of a plant is
or a tree would be super tricky um yeah right but anyway blah blah this is a side topic um
this book is good i i don't probably give it like five out of five but a solid four out of five this
is a good read i thought it was really nice and i think it you know a lot of people this was a very uh important work to them they they really recommend it so it
was definitely worth reading um it's definitely not what i would say is sort of light reading
um it wasn't easy to sort of breeze through it was sort of tough and crunchy to get through but
i enjoyed it so is this part of a series or no yes it is okay um the first one this is the first one yeah
um i don't know much more about the rest so same thing as the three body problem is part of a
series but i'm not sure this is always the tough thing about starting into series as you read the
first book but you're kind of signed up that you knew it was a series you got to keep going because
some of them just have like dramatic cliffhangers like they're really just one giant book split into three parts um fortunately for
the three body problem and this one i don't really feel like that was the case like they didn't end
on some giant nothing is wrapped up um but you could tell sort of where the next books would go
yeah that makes sense so you're not signing up to have to read the whole series if you don't want
yeah that's that's great this is uh a little
bit off topic but remember well just in general i absolutely hate it when they set up like these
huge cliffhanger endings um and especially when it's not great in the first place and you kind
of know that it's this series isn't really going to even survive but then there's a cliffhanger so
you don't get the closure at the end anyway you're talking about like tv series yeah yeah i was thinking about actually the super
mario brothers movie watching that when i was like eight years old and i was like even as an
eight-year-old it's like this movie's kind of terrible and then they're like a you know bowser
ran away it was like to be continued it's like nope nope oh man well so cool so uh if you like those books claude
chanin i'm actually reading uh or i guess listening to on audible so um you can get
an audible trial if you go to audibletrial.com slash programming throwdown and uh you could
pick up the claude chanin book totally for free and uh also the
fire on the deep is on audible oh nice i say read but i actually just listen to it i just say read
because it's too confusing i think i'm gonna start doing that too yeah i'm gonna i'm gonna
it's sort of weird but it's nobody's business that like like it's the same if you read or listen to
an audiobook like and if you say i listen to this book people are going to be like what and you have to explain if you just say i read this book it's like yeah no yeah yeah i agree
and i think it should just unless you say like i listened to and it was like a magazine or something
with pictures like that would be weird but yeah right normal course i just say read uh you can
also sponsor us on patreon uh the link is in the show notes or search programming throw down on
patreon and thank you a shout out to all those people there's been an uptick
in them all the people sponsoring us on Patreon
so thank you for your continued support
yeah it's getting close to Christmas
for Christmas we take the money
that's left over that we haven't spent on
trying to grow the show or trying to maintain our server
or stuff like that and
we give it in free t-shirts
actually we've gotten a decent
amount of Patreon subscribers so I think maybe what we'll do this year we'll still in free t-shirts. Actually, we've gotten a decent amount of Patreon subscribers.
So I think maybe what we'll do this year, we'll still give some t-shirts and then we'll give the rest to charity.
So if you have a cool charity, send us an email or post on the comments or something like that.
I have my child's college fund.
Patrick's P.W.
Oh, the P.W. P.W. The Patrick Wheeler Personal Wealth Fund. the the the uh patrick's pw oh the pwpw the patrick wheeler personal wealth fund
sorry that is a joke we will not be donating no that's not how that works
we will not be donating to the pw squared tool of the show um tool this is my tool the show is
topic my tool the show is bit, which is pretty cool, actually.
This is really fun.
It's using something called WebTorrent, which people should also check out.
But BitChute is like YouTube, but there's not really any server.
So the way it works is when you go to upload a video,
you can choose to serve your own
video or not, right? And then what happens is when someone goes to watch, let's say, your video,
they can actually get it from you or from anybody else who happens to be on BitChute and has a copy
of your video. So as soon as one person watches your video,
they then become a server as long as they're on the website. And so it's all done in JavaScript,
like on the client side. So you're basically running BitTorrent, but on your browser.
And if you go to WebTorrent, I think it's webtorrent.io or webtorrent.com, you can actually
see a visualization of this. But even cooler, you just go to bit shoot and it just kind of feels
like youtube but it does not feel like youtube i just went what do you mean i mean it feels like
in the sense that there's a bunch of videos that you can watch yes um i don't know i mean
and there's no search i guess is there no but also just like the sort of like i don't know. I mean, there's no search, I guess, is there? No, but also just like the sort of like, I don't know, I guess maybe because I go to YouTube so much, it's now curated to my tastes.
But I don't know what generic YouTube is.
But the production value of generic front page YouTube videos is generally pretty good.
Yeah, actually, you hit the nail head.
I should preface this by saying this is like looks like stuff people would be stuff people would be – people would get takedown notices from YouTube for.
Yeah, yeah.
That's actually a really good point.
This is like – I found this to be a tool to show because it's kind of a cool technology.
Okay.
Like I just – like I found it was cool that like functionally it's just like a bunch of videos,
but it's like running off like maybe one machine on AWS or something.
Like the idea that like there's not really a backend for this.
But you're right.
And I guess it's a tool in the sense that you could upload a video
and give that link to a bunch of people.
And I guess presumably it would work.
Although I guess your machine also has to be.
That's a great tool.
I don't know.
Yeah, this is actually a terrible tool.
My real tool this show is OhMyZSH, and this should be my news.
But anyway, I just thought this was really cool.
I mean, I didn't really think it was possible to have BitTorrent running in your browser.
I thought that's, like, you know, I didn't really, like, I don't even really understand.
I mean, you know, I'm definitely not a web developer, you know, expert or anything.
But I don't really understand how you can make connections to other people in the browser, like besides the server.
I just figured there was just a fundamental rule that you could not do that.
That seems like something that could be abused or something.
But, I mean, this is living proof that not only can you do that, but these people have built basically the functionality of YouTube
without actually holding any of the videos, which is pretty wild.
We should also say we probably don't endorse any of the videos that are on this.
Oh, yeah, yeah.
Because most of these seem very conspiracy theory.
Actually, you know what?
Here's what I'm going to do.
In the show notes, I'm actually going to put WebTorrent and not this site okay i actually know nothing about this site i only
was linked to it from web torrent i see so my new tool of the show is web torrent you can go to
web torrent.io and it actually when you go to web torrent.io, it starts playing a video and you can actually, but on the left, you can actually see you connecting to these other random people
and them actually giving you the video.
So yeah, go there instead.
But it's pretty wild.
Yeah.
All right.
Yeah.
I mean, that is cool.
That's crazy.
Yeah.
I just want to give that preface that like we can't vouch for the content on that website.
Yeah. I just, I scrolled through some of it and it's it's pretty weird so yeah let's so yeah we're uh we're not
gonna make that up all right my tool of the show is a gadget on ios by korg although i also saw
they released this on mac this week sorry uh android and linux and windows people uh that's basically sorry everyone
um but this is so also i'm warning this is very it is expensive but it does go on sale
and um for the kind of thing it is like you can do this is a music app um where there's a bunch
of synthesizers and a sequencer and tracks and you can do even audio recording if you want.
There's really sort of like a powerful tool.
And if you go and listen to some of the music people are producing on this app,
it's just absolutely astonishing.
But for me, I don't know.
I have this weird, like I wish I was a musician, but I'm not.
But I also don't have the discipline to teach myself an instrument.
Okay.
And so I like to play it being a musician.
Like I have this idea it would be cool to have like, you know, a piano in the house.
But then I'm going to have this giant piano and I don't know how to play.
And I know I won't learn how to play.
I'm a terrible person.
Anyways.
It's probably a huge learning.
I mean, I'm the same way.
I don't know any instruments.
But I imagine it takes an extraordinary amount of time to learn how to play something so i have
tried i mean i took piano lessons when i was younger um and i ran into some problems that
i just don't like i didn't have good rhythm and i didn't sort of stay diligent enough or
you know maybe if there had been youtube it would have been more engaging at the time
um but but anyways it doesn't matter.
So this all started because I have this weird thing about synthesizers.
I just love the way synthesizers work.
And the way that I love the Curta calculator is this mechanical object.
Oh, that makes sense.
These analog synthesizers, they're just these boxes full of knobs and plugs.
And especially if you don't know about modular synthesizers,
specifically Eurorack modular synthesizers,
check it out.
There are basically these panels that mount in a wall
and you take quarter inch instrument jacks,
sort of like fat headphone jacks,
and you plug them in between all these different modules.
It's literally plug and play.
And one might make random voltages going up and
down and another you know has knobs for a filter and you have all these different things and you
end up making sounds like weird sounds cool sounds sounds that sound like instruments
it just all these various things uh anyways i just i just think and specifically i wanted my tool of the show to be the the pocket operator uh which
is by teenage engineering which is something that is like a pcb that looks just like uh and we
talked about credit calculators i guess it kind of goes with it but it looks like a calculator
but it actually is this sort of toy but also really cool um synthesizer that is uh it's still a little expensive for what it is but
you know for these kinds of things it's not very expensive and it has these buttons that you push
and if you listen to the audio demos it just makes these cool sounds and it seems like something that
people kind of just play with and make these cool sounds i know if i play with it would be kind of
loop it terrible that's right you know loop it and you know make you know change if it goes or um you know and play sort of notes on it uh all these different things and
they also make other things this teenage engineering check them out but that was couldn't
be the tool of the show because it's a physical thing and i wanted to have a piece of software
so i have this core gadget you can play around on which is what i do or make serious music
if you're into that kind of thing, check it out.
It's kind of cool what people are doing.
Yeah, I actually have the iCorg.
Yeah, sure.
Which is a different app.
It's probably a simpler version.
But very, very similar.
Yeah, yeah.
Yeah, yeah.
It's super fun.
It was a little expensive.
I think it's like $20 on the App Store, which is, you know, a lot for an app.
Yes.
But yeah, I actually made some MP3s that like, I mean, it's like, you know a lot for an app yes but uh uh but yeah i actually made some
mp3s that like i mean it's like you know uh again like techno music made by someone who has no
talent so it sounds good to you and your mom would say well is that what you kids are into these days
um yeah exactly so yeah so similar to what i my experience i think this is 40 not on sale
occasionally it goes on sale to 20 um but yeah i i play around with every so often um and pretend that i know how to make music
and it's cool yeah and you can actually save an mp3 and send it to your friends and stuff like
that and i would never do that but but you might i mean if you make some awesome music feel free
to send it our way i'm happy to listen to your music which is probably better yeah let's have like a contest let's see whoever makes the coolest mp3 um and and and links it to us like
either soundcloud or email us the mp3 or something um we can maybe make it the intro of the next show
or at least the outro because if we get all terrible results we'll pick the least terrible
and put it as the outro we'll commit to it we'll commit we'll definitely make it something um we could probably make it the intro some people out there have got to be good
musicians someone's gonna send us something awesome and then i'm just gonna feel terrible
about myself no if someone sends us something awesome we will just replace our intro like
permanently um but uh we have a pretty cool intro the bnr pilot is pretty awesome so it's gonna be
tough it's been good for six years yeah it's been going forever but yeah maybe it's time for a change so yeah someone uh
try sending it send us some cool intro music and uh and change programming throw down forever
that's true yeah leave your mark on the show all right um cool after after all that
cobalt we have to go fast cobal mainframes. We'll kind of jump through this.
So yeah, so COBOL. So basically, COBOL is fascinating.
It's used by so many people, even today.
It actually started as an initiative through the Department of Defense and kind of a consortium of companies.
And,
uh, the reason to create COBOL was that,
uh,
you know,
it was that time where people were sort of inventing a lot of languages,
right.
Um,
um,
you,
you kind of see this actually,
this has gone,
this has happened multiple times and it's almost a happening again right now,
or maybe a couple of years ago where memory,
how like all of a sudden we had
TypeScript and we had CoffeeScript and we had like 10 different way closure script we had all
these different ways to basically write JavaScript or that would somehow compile to Java transpile to
JavaScript right so this is the same kind of thing right right? This, you know, in the, in the 60s,
maybe even earlier in the 50s, it's an explosion of languages, right? I mean, it's Fortran 57,
you know, Lisp was coming out around that time. A ton of languages were being invented.
And, and the issue is it was costing, the other thing is these languages were being built for specific machines.
It's like, you know, if you want to
use this machine, you have
to write everything in, you know, Fortran
57. And it's like,
oh, you know, I wanted to buy the latest machine,
but that machine requires me to write everything in Lisp.
And it's like a huge undertaking, right?
So,
these people got together and they decided to
make sort of... they felt like if
they got enough all these big players at the time like ge phillips ibm and the government you know
department of defense etc that they would just make the ultimate programming language and it
would be done and people could just write in cobalt and they'd never have to rewrite it again
obviously that hypothesis was completely busted.
I mean, in hindsight, I mean, you look at today, there's JavaScript, there's C++, there's
Java, there's Python.
So this idea of one language to unify them all didn't really pan out.
But at the time, you know, that was a perfectly rational hypothesis.
I mean, it only makes sense in hindsight, right, that that isn't the right thing to do.
And so they made COBOL.
Actually, as of 2012, which is the latest data I could get,
over 60% of organizations are still dependent on COBOL to some degree,
which is enormous.
I mean, if you go and work for a company, let's say a large company,
that it's more likely than not
that you will have to see some COBOL.
Not that you will have to see,
but that the company you're at has to.
That's true.
Yeah, that's true.
It's mainly used for financial services.
I know in a previous job,
there was somebody who had to
interface with uh like a credit card um company so basically like let's say you have your credit
card it's capital one or you have a chase card you have the amazon card or what have you um there's
a lot of different sort of let's say brands but there's there's really like three or four kind of
let's say back ends so in other words you might have a capital one card
but it's really visa right um so there's someone who had to interface with i think it was either
visa or mastercard one of these and um um and it was all in cobalt now this was they had a they
had a specification so you know on our side we didn't have to write cobalt but looking at the
specification it was obvious that the people
on the other side that it was all COBOL um you know everything was fixed with text and stuff
like that um just like you know column zero through ten are going to be the name of the
account and stuff like that um another really kind of interesting footnote in COBOL is is uh
COBOL was like ground zero for the y2k problem um now this
was i guess 17 years ago so there might be people listening to this actually there's definitely
people listening to show who weren't even born when the y2k project was a problem wow yeah dude
way to way to bring it home but for people who don't know or don't remember, you know, in the year 2000, there was
a big problem with computers, which is computers up until then, many of them had been using two
digits to represent the date. So imagine, you know, your bank, every day they're calculating
interest and they're giving you, you know, a fraction of a penny every day. And at some point
it becomes a penny and you get an extra penny in your savings account.
Now, all of a sudden, it goes from December 31st of 1999, or let's say 99, to January 1st of 00.
So if you only use two digits to represent the day, what that means is you just went back 100 years back in time.
And so that same bank that's giving you, you know, a tiny bit of a penny every day, all of a sudden they just drain your bank account.
Like they're like, you know, you made, you know, negative half a penny of interest, you know, for, you know, 100 years.
And so, you know, you had, you had a $500 in your bank
account and it's gone. Right. And so the Y2K problem was this belief that there's so many
computers, all of them are using two digits for the year that, you know, even if one of them
isn't updated or some program isn't updated, it's just going to cause total havoc, right?
And COBOL, because, you know, and we'll get to this, there's like,
COBOL, like, you know, the number of decimals is kind of intrinsic to the language. And so many COBOL programs have been written assigning just two numbers for the year,
that COBOL was a big part of the Y2K problem. And it required a massive amount of work
to, you know, get everyone on a four digit year in time. And the long story short, just to finish
it off, you know, everyone fixed, all the major stuff was fixed. I don't honestly even know of
one thing that went wrong that was in any way significant um that i remember and uh yeah
just basically nothing happened but you know it nothing happened because of an extraordinary
amount of effort went in you know before the year 2000 to make that fix so the basic functions
of cobalt are that it has procedures You do compile it as opposed to it being interpreted.
And that it's statically typed for objects,
but the perimeters themselves are just duck types.
So, I mean, to be fair, I guess this set of things
is not that much different from most of the languages we use today.
But, yeah.
Yeah, I mean, the only big difference is
if you pass a number into a function that takes a string, it'll convert it to a string for you and vice versa.
That's kind of unique.
Actually, I can't really think of any language that does that.
Yeah, I guess that's true.
Yeah, now that I think about it.
That is pretty special.
Feature or bug, you decide.
Yeah, sure.
I feel like actually that's probably more harm than good.
But yeah, it's definitely unique.
Another unique feature is this idea called picture clauses,
which somehow like kind of combines classes with S per an F.
So it's sort of like you basically say, you know,
I want to take in a string and I want to, you know, kind of whenever
a string enters this function, it comes out, let's say, formatted as a date.
But instead of calling sprintf every time you want to do that, it's sort of this object
that kind of holds the string, you know, in this new state for you.
And it's kind of, you can kind of, you know, pass that sort of like this date converted string.
You can pass that around to different functions
and things like that.
Yeah, I mean, currently, you know,
COBOL is up to COBOL 2014.
But, you know, the vast majority of the updates in COBOL
have been to basically modernize it for the platform.
So like, for example,
nowadays they're following the IEEE standard.
So, you know, what happens if you divide by zero?
What happens if you have zero over zero, right?
Like, how are these handled?
Yeah, exactly.
Like, all of that, you know, COBOL used to do its own thing.
You know, I used to actually have a software floating point implementation,
and they kind of scrapped all of that.
Yeah, so it's a lot of like,
how do we run our COBOL code on a MacBook or something like that, or the latest Intel machine or something?
That's been the majority of the changes. Uh, you know, plurality of software managers, um, said they're
either moving off COBOL already or they would if, if it was, if it was cheaper, but it's just too,
too expensive to migrate all that code, which is kind of interesting. You know, it's, uh,
I mean, if it's, if COBOL is any indicator of the future, you know, there's a lot of job security because, you know, there's constantly things being written in different languages.
And so you need that expertise forever, effectively.
So, yeah, I don't really know.
I mean, what do you think, Patrick?
Do you think that this is like a one-time thing because it happened when computers were so young? Or do you think that this phenomena of always needing a COBOL engineer,
that that's going to happen for every language?
I think there's precedent for that being a thing.
But I mean, for something like COBOL,
there's enough people using it, enough lines of code written,
enough support that support continues.
A lot of projects will die off.
So if you're writing in something, I'd i'd hate to use an example so i won't but i'll use an example
k there's actually a language k that okay so at some point you get too few people using it
so unless your specific use is so valuable and impossible to get off of basically you're not
going to find someone who's going to maintain the compiler or maintain an os and even if you run an old compiler on an old os eventually your
hardware is going to be replacing and you're going to run out of people who make those kinds of
processors anymore so imagine like all of the systems that were like apple computers used to
run on power pcs at some point your thing that was running on a power pc that doesn't have an intel based compiler an x86
compiler um you that power pc you're gonna pay more and more to get replacements and eventually
one day they're gonna run out you're not gonna be able to get a you know parts for your power pc
computer um and if your language never had an x86 compiler you're faced with this like paying a vast sum of money
to get someone, you know,
it's probably more expensive
to get someone to port their compiler
than to just rewrite your application
at that point or whatever.
So for things where there's not enough of an install base,
I don't think you end up with this happening
at sort of the limit.
Right, right.
But for some things,
there's enough of a, that's not true. Like, because for cobalt maintaining the compiler makes a lot of sense because there's
so many people using it you're dividing up that resource cost amongst all of those people yeah
it makes sense i think uh for any language let's say for any language we talked about in the show
except for that show we had on esoteric languages but but for any other all the other you know 60
some odd languages we've covered or maybe 50 some odd languages i would say any of them will survive
like survive insofar as if you specialized in any of them you know you'll be needed let's say 20
years from now but the question is one of sort of, I guess, supply and demand that if, you know, so the specialists are still needed.
But the question is, like, is it like is or is the team you're working on valuing that stuff?
So if you're like the only, you know, it's the classic example, I guess, of do you always I don't know if it's actually true. There's like two surviving Picasso paintings and some person buys both and destroys one because one is worth much more than the two together.
Oh, yeah. Marginal cost.
So if you sort of say that like you're the only cobalt expert in the whole entire world, you probably charge a lot of money.
But if there are lots of cobalt experts and it's maintenance, not new development.
And so people sort of don't need that much work
or don't value it that highly and they're already sort of saying they're price sensitive is one of
the reasons they're not moving off then like the question is is it lucrative enough for you to
continue doing it and that's a question each person has to make on their own yeah yeah totally
yeah i think that's a good point like uh you know if like for example like coffee script was kind of
a really big thing now i mean there's still using CoffeeScript, but it's much less popular.
And so, yeah, I think, as you said, it's a supply-demand thing.
Like, if a bunch of people get super hyped about some language and then it falls off the face of the earth, that's kind of the worst because now there's so many people who are experts and not enough kind of work to do yeah so cobalt um often is although it can be done
on other stuff often is used in uh alongside of running the cobalt code on a mainframe oh i said
that poorly anyways uh and so the idea here is we wanted to also briefly talk about mainframes
which is nothing something we've not talked about before and it's not something i personally have
much experience with although i have used them a couple times oh really wait hang on how have you used them
because i've never even seen one i've i've not seen it but so i mean i worked uh i did intern
at a company that did back-end banking software and so all this stuff was run on mainframes and
so you had uh i guess you'd call it a terminal emulator to the mainframe.
And it's like very strange.
And, you know, it's something if you've never done before, it seems sort of weird.
But in just, you know, just to go to high level, so people sort of have some amount of background.
This is by no means an in-depth covering of either of these topics. But about mainframes is that you want, you know, sort of a single system that has very efficient throughput as a single system,
but it's also very reliable.
So if you imagine instead of having like a distributed database,
if you wanted to say,
I want a machine that just has a very giant amount of Ram and a really fast
processor.
And I want to do things that's like every customer in my bank has a,
you know, entry in my ledger that's stored in this giant memory database. And I want to,
you know, give everyone the interest their account accrued each night. And so for each night,
I want to go through all of my customers and, you know, figure out how much interest they've earned,
update their account. I want to do it. And this is where the batch comes in i want to do it fast so i'm doing it on a mainframe that specializes this
kind of work and i'm doing it batch processing which sort of says i want to do all of these
things together but i want each of them to be atomic so if i sort of you know get jason's you
know bank account amounts and calculate his and for this it's not important but you know calculate
his interest and then i want to update it I want that to happen atomically. So
in that case, you're only doing one thing, updating a single number. But if you were
updating multiple things, you would want them to sort of all either happen or not happen in case
of a problem. So that if you do run into an issue, you don't have someone's account left in a bad
state. IE, you know, I was able to left in a bad state, i.e., you know,
I was able to withdraw money and get cash out of the ATM and my bank account balance didn't go down.
Right, right.
You know, and that would be bad because the bank lost money, that money disappeared and they don't know where it went. That would be horrible. And so they need systems that are reliable
and a method of executing that you know sort of also
has this redundancy built in um and all computing used to be done on these i guess mainframes was
sort of like kind of the only way of doing things and people would sort of time share on these
mainframes and there would be jobs and each job would be executed and the next one and then the
next one um but now it's sort of different it's often used in these
you know i want redundancy i don't want redundancy in that two different computers
are sort of both working on this task and you know hopefully it'll work which is a lot of you
know like if i go to we talked about before like if you go to the new york times and some part of
it doesn't work it's bad but no one's like out tons of money or,
or,
or,
you know,
dying because of it.
Um,
but if you're in a bank,
you really don't want to not know.
And it's,
it is actually true that it's pretty difficult to coordinate across systems to
get that reliability.
You have to see this in the,
uh,
you see that member,
that article of people who could figure out how to duplicate items in games?
Like, there's this thing where someone would know sort of where the boundary of the zone is.
Like, it's not visible, but they just kind of know from the code.
They're like, you know, I'm in World of Warcraft zone A, but if I take one step over, I'm in zone B.
And they would actually give an item to their friend and then just take this tiny step, I'm in zone B. And they would actually give an item to their friend
and then just take this tiny step from zone A to zone B.
And it would actually end up with two items
because the give command would fail in the second zone,
but at the same time it would pass in the first zone.
And now there's two copies of that item.
And obviously when you're dealing with real money, you can't do that.
So a mainframe would kind of avoid
that. And so I mean, I'm not
sure, you know, again, this is not my area of expertise.
I don't hear of a lot of
new development happening in
sort of like great new features of mainframes.
But I'm absolutely sure that
tons and tons of new code gets written every
year that work on mainframes
in this
case yeah also you know one thing we haven't really talked on and again it's not really my
background but um is report generation for the purposes of auditing for the purposes of people
to do overview um and not just in banking actually in lots of different software engineering fields
report generation is very important um but mainframesframes and COBOL are two things that very
specifically you want to roll up like I want to know how much money is in a given branch of a
bank and I want to know you know how many current deposits do I have how many you know the accounting
balance sheet right you want to be able to get reports of where every penny is and where it's
coming from and where it's going to and you need to generate those each night and check them for consistency it be reliable
and redundant and backed up all of those things i mean a lot is at stake and so that's the realm
where you find these things yeah that makes sense i mean i think one of the things that really killed
the mainframe is paxos so pa Paxos is this like, I guess
algorithm. Oh, we do not have time
to get into that. Yeah, yeah, we can't
cover it. We're already running super late.
But it basically allows a lot
of machines to coordinate.
And I think we've actually talked about it in the past.
Maybe we have a consensus algorithm.
If you search Paxos on our site, you can find it.
If not, maybe we'll cover it in the next show.
Send us an email if you want us to cover Paxos.
But I think that really is what killed the mainframe market
because all of a sudden now a group of computers
could kind of do the same thing.
All right, cool.
So, yeah, that's COBOL, mainframes, game theory,
all sorts of cool stuff, algorithms and pythons.
We had a lot of stuff to cover this episode.
I hope you guys appreciate it.
Sorry it went a little bit long, but we had a ton of content.
It's been a long time.
It's been almost, what, three months since we had a non-interview show.
So we had a lot we wanted to tell you about.
And thank you again for all of your support.
Looking forward to only a few months until Christmas, we start giving away some t-shirts.
So if you haven't signed up on Patreon, go ahead and sign up. Even if you can only give a dollar,
that's totally fine. You can give a dollar and end up winning like a $20 t-shirt. It can happen.
So thanks for all your support. Check out the books of the show,
tool of the show, and send us
all your feedback.
The intro music is Axo by Binar Pilot.
Programming Throwdown is distributed under a
Creative Commons Attribution Sharealike
2.0 license.
You're free to share, copy, distribute, transmit the work, to remix, adapt the work, but you
must provide attribution to Patrick and I and share alike in kind.