Blog
Bio
The Technician
No Imperfections Noted
The Jeff and Casey Show
Jeff and Casey Time
Casey Muratori
Seattle, WA
The Milky Climax
"I was masturbating, and I found a lump."
Original air date: June 23rd, 2014
Subscribe. If you’d like to have the latest episode of The Jeff and Casey Show delivered fresh to your computer every Monday, you can check out our list of RSS feeds and other subscription options here.
Transcript
Jeff:
Hello, everybody. Welcome to the Jeff & Casey Show.
Casey:
Hello, and welcome to another exciting edition of the Jeff & Casey Show.
Jeff:
Yes.
Casey:
Which I think at this point we have established… I mean, the consensus, let’s say, among the general public is that this is one of the finest podcasts that is currently airing or perhaps that has ever aired.
Jeff:
I see. Yeah. Well, we’re worldwide famous from this podcast.
Casey:
Absolutely. Yes. Well, when I walk down the street… I don’t know about you, Jeff, but when I walk down the street, they’re like, “Hey, you’re the guy on that podcast.” Now granted, since it only was video for season 3, it’s only once I start talking and talking very loudly like I do on the podcast that they realize that it’s me. And they’re like, “You’re the guy who was yelling about that thing the other day.”
Jeff:
Right.
Casey:
And I’m like, “Yes, I was.”
Jeff:
And they say, “I don’t want an autograph. I’m gonna press the sound recorder and do that.”
Casey:
“I want a voice-ograph.” That’s right. Yeah. Well, it’s like, you know, it’s like Carl Kasell’s voice on your answering machine. They want me to scream at their inbound caller.
Jeff:
Yeah. It’s true. Well, so you can tell that we’re quality podcasters because we drink Thai iced teas which is full of milk so it’s actually terrible for a show…
Casey:
It’s mucilaginous, yes.
Jeff:
For a voice show… But we do it anyway because we do do these rituals…
Casey:
Yeah. It’s lubricating. It lubricates the words, Jeff.
Jeff:
Oh, okay. You find lubrication.
Casey:
Obviously, at some point, the mucus overwhelms the system and that’s bad. But at that… You want the magic hour. You want the magic mucus time.
Jeff:
Oh, okay. I see..
Casey:
Where things are lubricating the words that are coming out.
Jeff:
In a couple hours, it’s gonna be really bad.
Casey:
Right. But we’ll be done.
Jeff:
Right now, we’re in the sweet spot.
Casey:
We won’t be podcasting. We’re in the sweet spot. Or we’re… We’re not, actually. We just started drinking these Thai iced teas so 45 minutes into this podcast, you are in for a treat, listeners.
Jeff:
Oh, I see.
Casey:
You are in for a treat because the milky sounds of the Jeff & Casey Show are going to reach their crescendo, their peak.
Jeff:
Right, their milky peak.
Casey:
Their milky peak…
Jeff:
Right.
Casey:
The milky peak of the Jeff & Casey Show, ladies and gentlemen. Not yet achieved but coming soon.
Jeff:
Milky peak is a good…
Casey:
Band name?
Jeff:
No. Name for this show. Because I’m going to talk about a milky peak of mine.
Casey:
Whoa, okay. That just went somewhere that I did not want to go, I think. I’m not sure yet but…
Jeff:
You know about this but we can talk about this because I think this is an interesting topic…
Casey:
Okay.
Jeff:
Which is…
Casey:
Can I say one thing first?
Jeff:
Yes.
Casey:
So when we came over here to start doing the podcast, we’re doing this in your kitchen/dining room area, whatever you want to call that. I picked up a piece of lettuce off the floor.
Jeff:
Yes. I don’t know what…
Casey:
And I pretended to eat it…
Jeff:
Oh, my God.
Casey:
Ad you freaked out, right?
Jeff:
Yeah. I thought you ate it. You kinda palmed it…
Casey:
Yeah, it was just clever…
Jeff:
And you kinda put it in and palmed it and I was like… Aah… For a minute there, I completely shit down.
Casey:
So I wanted to take that opportunity to say something that I’ve been meaning to say on the podcast for a while which is that I realized… You know how there’s a term germophobe. I think it was popularized by a Seinfeld episode or something where… I don’t really know but it’s, like, someone who’s really afraid of germs perhaps more so than they should be.
Jeff:
Okay.
Casey:
And I think we haven’t talked about this perhaps on the Jeff & Casey Show with reference to the old RAD bathroom where someone was leaving…
Jeff:
Yeah, yeah, yeah…
Casey:
Like… They were leaving paper towels near the door…
Jeff:
Well, we just found a pile of paper towels…
Casey:
And we assumed they must’ve been…
Jeff:
And then you figured out one day, like…
Casey:
Yeah.
Jeff:
We have a germophobe because he’s using a paper towel to open the door and just opens and drops…
Casey:
Drops it so he doesn’t have to touch the handle.
Jeff:
Yeah, exactly.
Casey:
So one thing that I was realizing about myself recently, and it’s… So, I think part of the process of becoming an adult…
Jeff:
Okay.
Casey:
Right… There’s all these things associated with that, none of which actually happen, like becoming more mature and all that shit. Like, I don’t see people doing any of those things, including myself. So I feel like there’s a lot of selling you a bill of goods about what becoming an adult means.
Jeff:
I see.
Casey:
Because all this shit they tell you that becoming adult means, no adult have done this, right? They’re not being more rational. They’re not being less selfish. Just go look at your average politician and tell me that there’s something about [inaudible 4:05] it’s not true, right? But one thing that I think has been true at least for me about the process of becoming adult has been realizing the number of things that I assumed were normal, that everyone did but that actually are things that only I do.
Jeff:
Okay.
Casey:
Or that only a small subset of people do it.
Jeff:
Okay. That’s an interesting definition. Okay.
Casey:
That’s actually stuff that you just… You are thinking about this in a way that other people aren’t necessarily thinking about it and then learning about how they think about it, right?
Jeff:
Okay.
Casey:
And so, one of the things that I was wondering about (so I thought I’d talk about it in the podcast) was I keep track of where I believe all bacteria and germs and stuff to be.
Jeff:
Okay.
Casey:
So for example, let’s say that you are to take some chicken out of the refrigerator.
Jeff:
Alright.
Casey:
In my mind, there is a mental map from that point forward of all possible ways in which chicken contaminants could have spread to other surfaces that are in the room, right?
Jeff:
Oh, okay. Yeah, I do a bit of that.
Casey:
Yes.
Jeff:
When I’m unwrapping meat, I’m like…
Casey:
Yeah.
Jeff:
“What have I touched this with?”
Casey:
Exactly.
Jeff:
Like, if I turn this steak over with a fork, I don’t eat with that fork because that’s, like, pre…
Casey:
Yes, right. Exactly. It’s been… Thing… But then, I always track this. So for example, one thing I might do is if there’s boiling water, I’ll just dip the fork into the boiling water for a few seconds to sterilize it and take it out.
Jeff:
Oh. Alright.
Casey:
So it’s not like a germophobia, per se. It’s related. It is a fear… It is a mental process that’s trying to avoid germs but it’s like some kind of weird game I play where I try to keep track…
Jeff:
It’s germ awareness.
Casey:
It’s germ awareness.
Jeff:
Yeah.
Casey:
Yes.
Jeff:
Germ awareness.
Casey:
So I was wondering how many other people do this and to what degree they do this. Like, every time I blow my nose, now there’s just a whole new germ map. It’s like, everything is germy and I’ve got to wash my hands or do whatever. But…
Jeff:
I do the thing when I’m walking down the street and somebody coughs. I instinctively hold my breath…
Casey:
Hold your breath? Yeah. ‘Cos it’s in the air now, you can’t see it.
Jeff:
And then depending on the person…
Casey:
Yes.
Jeff:
Their socioeconomic status, like, how beat down they are…
Casey:
How bad is this germ…
Jeff:
How bad is this germ… I might hold my breath for, like, 20 paces ‘til I get to the end and you’re like…
Casey:
Yeah.
Jeff:
Yeah. Which is getting harder in my neighborhood because it’s just a full mental map.
Casey:
Oh, your neighborhood is a disaster. Okay, so the thing I was gonna say is this then leads to stage 2 of this mental process which is germ optimization.
Jeff:
Okay.
Casey:
And what that is is let’s say you have put yourself, for some reason, into a situation where you know that your hands may have germs on them.
Jeff:
Alright.
Casey:
I will then try to chain the maximum number of other things that will get germs on my hands operations together to keep the number of handwashes that I have to do lower.
Jeff:
Oh, okay. I don’t do that.
Casey:
Does that make sense?
Jeff:
I don’t like my germs to mix.
Casey:
I just want to go… I fully load the germ…
Jeff:
I see.
Casey:
And then, wash so that I can do different things like that. That is how I roll. Now, maybe that’s dumb but that’s how I do it. No germ optimization for you?
Jeff:
Well, no. normally, I complete a germy task and then I re-clean… And then I reestablish my sterile zone.
Casey:
Okay.
Jeff:
And then I start a new task.
Casey:
Okay.
Jeff:
I don’t like those guys to mix.
Casey:
Okay.
Jeff:
I don’t know what’ll happen.
Casey:
Alright. So anyway, I just wanted to put that out there.
Jeff:
Well, that’s good because. . .
Casey:
You can ruminate…
Jeff:
Yeah.
Casey:
You can write in. Let me know on Twitter…
Jeff:
What your systems are…
Casey:
@CMuratori or you can write to Podcast@JeffAndCaseyShow.com. Tell me how you think about germs and whether you do germ awareness, germ optimization, germ phobia, what’s your germ status, so that I can get a little bit of a better feel.
Jeff:
Okay. Get a map out there…
Casey:
Now, on to your milky peaks.
Jeff:
Well… So the milky peak actually has to do with optimization.
Casey:
Okay.
Jeff:
Okay. So as you know, I’m getting married soon. And as part of one of the things in the show is I’m making a little video game, a small, little [ PicSmart ] game…
Casey:
Right. Yes.
Jeff:
That…
Casey:
And by show, you mean the wedding. The people at home, the listeners, do not know that the wedding is a show.
Jeff:
Yeah, yeah. It’s a weird little show, like, whatever…
Casey:
Right.
Jeff:
A little performance thing because, like, most of Dawn’s friends are performers, so they were…
Casey:
Yes.
Jeff:
Yeah.
Casey:
Right.
Jeff:
Anyway, part of this is there’s going to be a little videogame in the middle that we play.
Casey:
Yeah.
Jeff:
And it is a game that a hundred people will watch being played. They don’t play. The point is Dawn and I play and they yell instructions at us.
Casey:
Right.
Jeff:
So it is completely… It is 100 people see it. They see it for 3 or 4 minutes…
Casey:
Yes.
Jeff:
And then it will never be used again.
Casey:
Well, you could post it.
Jeff:
Yeah, I could post it. I could do something. But the idea… The important part about this in terms of the optimization part that I’m going to go into is the fact that, A, it’s taken about 12 days…
Casey:
Right.
Jeff:
Which means, it’s cost a fucking fortune in terms of…
Casey:
Yeah. Oh, [ anyone would know ]. Yeah.
Jeff:
Yeah, like aside from that, set that aside.
Casey:
I would say 12 days is optimistic but whatever.
Jeff:
Yeah. Well, I would say 12 full days of working. That’s spread out over about 3 and a half weeks.
Casey:
Yeah.
Jeff:
But it’s still a lot of time. And it is the thing of, like, you do when you do one of these games, you’re just like… Especially if you don’t have a game that you can just adapt really quickly, like, “Hey, the first week is just getting shipped [inaudible 9:34]
Casey:
Also, you did not download, like, Game Maker Studio…
Jeff:
No, right.
Casey:
Or Unity or something…
Jeff:
Right. I just went and wrote it. Yeah. I find that those kinds of things, for me, personally…
Casey:
Are too aggravating and…
Jeff:
The aggravation is high enough that the win I got from saving time…
Casey:
Yeah.
Jeff:
And this feeds into what I’m going to talk about and that also feeds into this part of becoming an adult…
Casey:
Okay.
Jeff:
Of understanding yourself in a way…
Casey:
Right.
Jeff:
Understanding the ways that you are and the ways that you get done within there is important especially as a programmer for, like, “Hey, you have these particular things that distract you or if you have these particular things that, when you do, you’re more effective.
Casey:
Right.
Jeff:
Once you get to the point where you can identify those and use those like, “Hey, writing something in a particular language like C is very low level might be a slow thing to do.”
Casey:
Right.
Jeff:
But it’s more psychologically comforting to me…
Casey:
Right.
Jeff:
Which makes it a more effective thing for me…
Casey:
Right.
Jeff:
Even if there was a high level language out there that was, like, [inaudible 10:40]
Casey:
Because if you had a language that would be 8 times faster to program in but you will only program in it for one hour before raging out for the rest of the day and storming out of your office…
Jeff:
And worse…
Casey:
Whereas if you program C, you’ll spend 8 hours on it…
Jeff:
Yeah.
Casey:
Those were neutral and one made you feel better. So it’s like, you know…
Jeff:
And it was a longer time, maybe, but it also doesn’t bleed into other things like, “I’m not going t get so enraged that I’ll stop and then go get mad at an employee or something…
Casey:
Right, right. Yeah.
Jeff:
It is a satisfying annoyance about… It’s the right level, for me, personally. So anyway. There’s very few people that’ll see this. No one will care about what it was written in. How it works…
Casey:
I think the most important part here, if I can anticipate what we’re going to talk about. More importantly, no one will ever download or store this game, more importantly. I would say… I suspect I know where we’re going with this discussion.
Jeff:
Yeah.
Casey:
And I feel like…
Jeff:
Well, okay, there’s parts of it…
Casey:
The important thing here is this is not going to be distributed on the internet…
Jeff:
Right.
Casey:
Over, say, a 2,400 [inaudible 11:47] modem, let’s say.
Jeff:
Right. Well, there’s parts of that in there, too. But I mean, there’s other things like, “Okay, so hey, I’m writing this thing. I’m using STP image [ to low PNG’s ]…”
Casey:
Yeah.
Jeff:
It loads in a byte order that Windows doesn’t use.
Casey:
Right.
Jeff:
It uses the other byte order. And so, like, the normal thing to do there would just be run it, write like the 4-line loop that just byte reverses the thing.
Casey:
Yeah.
Jeff:
But that, for me, is a really hard thing to do psychologically. It affects me in a time…
Casey:
Okay.
Jeff:
So like, writing that and then knowing that’s happening bothers me.
Casey:
Okay.
Jeff:
So the start of my story is the fact of, like, “Alright, then I went into STP image…”
Casey:
Okay. Now, I should point out, for example…
Jeff:
Yeah.
Casey:
That I do have some code that uses STP image. And I wanted the image upside down. I wanted it flipped.
Jeff:
Okay. Yeah.
Casey:
Right? And so, I wrote the 4-line loop that flips the image.
Jeff:
Yeah. [ I can’t do it ].
Casey:
We know which kinds of programmers… ‘Cos I was like, I could not care less about this because eventually, when I’m loading these things out of resource, I will have pre-processed it. So I’m like, “I’m not gonna spend any time on that 4-line loop.” You, on the other hand, you’re like, “Oh, no. Oh, no, no. No, you don’t.”
Jeff:
Yeah. Well, so…
Casey:
“This shit’s gotta be handled at the head…”
Jeff:
So the first part, the first thing I changed in STP image was exposing…
Casey:
Wait. The first?
Jeff:
Yeah, there’s a whole set.
Casey:
Okay.
Jeff:
The stages are first off, I went in and made… Instead of using it as a C file, I included it as an inc file so that I can call in to the local…
Casey:
But that’s how… It’s kinds of made to work that way, isn’t it?
Jeff:
No, STP image is a C file. It’s not an included H like some of Sean’s other stuff.
Casey:
Really?
Jeff:
Yeah. So changed to an inc file. And so, I could call some of the things that were static in there because I didn’t want to call the main STP image because it does a switch on the type of file and then that drags in the JPEG and decoder that TIFF all those…
Casey:
Whoa, whoa, whoa, wait…
Jeff:
Wait. I’m gonna give you the stages. So step 1…
Casey:
I’m speechless here.
Jeff:
Okay.
Casey:
So STP image…
Jeff:
Yes.
Casey:
The code size for STP image…
Jeff:
Yes.
Casey:
Was concerning you?
Jeff:
Oh, yeah.
Casey:
Now, this is a small piece of code.
Jeff:
Yeah, yeah.
Casey:
There’s not much in STP image.
Jeff:
That’s a pretty big piece of code.
Casey:
But you were like, “I am nervous about the executable bloat…”
Jeff:
I’m not worried about the bloat. I know I’m not ever going to have a Photoshop file…
Casey:
Okay.
Jeff:
In my thing.
Casey:
Alright.
Jeff:
In that code in there.
Casey:
Alright.
Jeff:
Alright, so anyway…
Casey:
Okay.
Jeff:
So I call in there so I can call [ STPIPNG ]. So I just call the decoder. Call the decoder…
Casey:
Okay.
Jeff:
And it’s become… And then I start… I’m like, “Okay, it’s [ byte ] reverse. Alright.” So then, I add a thing where you can specify the byte order. You can specify the byte order the things come out.
Casey:
Okay.
Jeff:
Which is a small change to the PNG code because PNG already starts out as [ plainer ] and then just merge…
Casey:
That’s what I was gonna ask. So basically, you can do this essentially for free because PNG was already [ plainer ] so it wasn’t like it’s going to just basically do the same fucking 4-line loop…
Jeff:
Right, exactly.
Casey:
It’s like… Okay. ‘Cos I was concerned… I was wondering whether you were talking about literally just a cache win or whether it was actually an op win but it sounds like an op win, actually, because you can just do it for free.
Jeff:
Yeah. So that was the first step. The second step was realizing that he goes into an output buffer and then he passes you the output buffer back…
Casey:
Okay.
Jeff:
Right. But I have a buffer that is already sitting there that I need it to go into.
Casey:
Okay.
Jeff:
So then, I made one that uses my output buffer.
Casey:
Okay. Yeah, that’s right, because you decided to use the graphics powerhouse that is GDI for your graphics output, right?
Jeff:
I did.
Casey:
So you were basically shoving this into a [ dib ] section or something.
Jeff:
Yeah, but I mean, it would be the same thing if I was using D3D like, you know, you’d [ lock and put it in there ].
Casey:
Well, no… So, one of the interesting things now… I mean, if you’re using D3D perhaps but with open GL now…
Jeff:
[ With ] GL, you just subtext image and send it. Yeah.
Casey:
Yeah. And it wants it that way because you don’t want to do driver sync point. And since memory’s so cheap… So STP’s actually totally fine for that except for the fact that you have to find a way to get a [inaudible 15:55] allocator or whatever.
Jeff:
Right, right, right.
Casey:
But other than that…
Jeff:
Right… And that was another part…
Casey:
You can [ pound to find ] [inaudible 15:59]
Jeff:
If you did as an inc file which was how I started down this path was first off, having it [inaudible 16:05]
Casey:
I also use it as an inc file.
Jeff:
Yeah.
Casey:
I didn’t realize… I didn’t think there was anything I had to do to do that but…
Jeff:
Yeah. You don’t have to do anything, really.
Casey:
Okay.
Jeff:
I mean, it is just a C file. And using it as an inc just means it’s in there.
Casey:
Yeah.
Jeff:
You have to make some things… If you want to tie into a lower level, you’ve got to make some things un-static and whatever.
Casey:
Okay.
Jeff:
So then, I did the byte order. Then I did the buffer. And I was like, “Well, he’s allocating a buffer for the internal planes, as well…
Casey:
Right.
Jeff:
But I could do that where you don’t need to have both allocated. So that went in there. So it used…
Casey:
Wait what? Are you reusing this…
Jeff:
Reusing the same buffer with one extra scan line offset so it goes… And puts it upwards from there.
Casey:
This is so Bink… You’re Binking STP image…
Jeff:
No, this is part of…
Casey:
Yes.
Jeff:
Sean and I were talking about this today because he’s giving me shit about this.
Casey:
I’m not giving you shit. I’m laughing.
Jeff:
No, I mean, it’s fine to give somebody shit. I’m like, I understand this about myself. Like, getting a game in the cute… Like, it looks gorgeous. Like, the PixelJam guys did some wonderful art. It looks beautiful. And it’s cute and everything. I get zero satisfaction out of that part of videogames. Making a videogame and then the game being done…
Casey:
I see. Okay.
Jeff:
I don’t… There’s just nothing about it to me that feels satisfying in and of itself. It’s like… So it’s how right it is…
Casey:
Yes.
Jeff:
Like, how…
Casey:
I was not giving you shit. I was just laughing at the fact that you did that…
Jeff:
No, no. It’s shit worthy.
Casey:
No, no, no. I actually don’t think it’s shit worthy. So in my dream world, right, in the world where somehow everything just goes exactly the way that I want it to, that is how all software would work.
Jeff:
Oh, I see.
Casey:
Meaning, all software would actually… We would have essentially…
Jeff:
So we’d be back in, like, 19--… Maybe we’d be in 2001-level software but it would all be super…
Casey:
No. Like, in my world, we solved the… Like, we had a much more concerted effort on the compiler front and, like, basically, what code gen was was shit that does what you just said to code. So like, code was described at a slightly higher level. And then there were these, like, super hardcore solver algorithms that ran overnight or whatever the fuck and they figured out all this shit, like even more than you can do. They just do crazy shit where [inaudible 18:33] you would literally have no idea what’s going on. But it’s like, it reused this byte and then the [ carry flag ] was set so it… Right? Like it just… It did everything you could possibly ever have done. That is how I wish things would work. But really, the way they work now is that none of that happens unless someone like you takes the time to go and do whatever amount of time they have on some section…
Jeff:
One little piece of thing…
Casey:
That they can make it up to that level, right? But we’re never… There aren’t enough you’s going around to have software generally executed at that level.
Jeff:
Or it is just… Again, since it’s psychological, there’s enough people out there who get satisfaction out of, like, “Hey, I shipped something.” And that’s less satisfying… I mean, that is nice to me, to ship. But it is nicer to me that it’s just right. Not right… I’m not saying right in like a correctness but in like a “for me, it just feels right”, like, it’s like…
Casey:
I see it more holistically than that. Like, I don’t… ‘Cos I don’t care that much psychologically about it in any kind of abstract sense. I see it as just more like… You know, like, literally everything we do costs carbon. Like, every extra cycle you spend to do something is actually power that isn’t going to be spent doing something else. When we get up to fully renewable energy, this may not be true anymore, right? But all of these things have a cost. And not only do they have a cost there just in terms of the power that’s used to actually do these things but they have a cost in another way which is that if we had super powerful, much more optimized software, it could have meant… And of course, we probably wouldn’t do this because we’re asses but, like, we could’ve slowed the pace of hardware updating. You know what I’m saying? Like in other words, the fact that people were refreshing their CPU’s so often and they refreshed their phones so often takes a tremendous toll on the environment in terms of garbage…
Jeff:
Oh, I see.
Casey:
In terms of by-products of the manufacturing processes, in terms of the excavation of the materials used to build them… Like, there’s a whole cost to inefficiency. It’s not just optimization for optimization’s sake or optimization because we wanted this game to run faster.
Jeff:
Right.
Casey:
The culture of inept software development actually has a pretty huge cost in real terms. And I mean, granted it’s true that probably as a race, we would have just done more and not not use the energy but it still, in my mind meant that we could’ve done more at the time. I don’t know.
Jeff:
Yeah. Well, I mean, like Sean’s… Like STP image is quite fast for what it does. It’s not like it’s unoptimized code. The things that I was working on, they were based on the fact that I had very specific use case and makes it… I mean, there are some things that I think that even he would probably change in the STP API that would allow some of these things of why the buffers work and stuff…
Casey:
Sure.
Jeff:
Would be generic enough that, you know, some of these things wouldn’t be necessary but those are also things that… You know, there’s a zillion people that use STP image now. And so, there’s a lock in there that’s just… That he has that I don’t. So I’m not trying to say like, “I did this better than Sean,” or anything at all because I wouldn’t have had the patience to write it in the first place.
Casey:
Oh, yeah.
Jeff:
The point is this…
Casey:
Well, there’s no better…
Jeff:
But I…
Casey:
Code rarely is about better. It’s like, the more passes that you have of good programmers, on something, the better it’ll get. So like, Sean does X amount of work and then you come along and do Y amount of work. And now, it’s an X+Y quality thing, hopefully. Unless the people are working at cross purposes, in which case you get a mess. But assuming that people are actually improving…
Jeff:
I would definitely… I don’t know whether that applies in the specific case. But in general, I totally believe that’s true ‘cos when we would pass things around at RAD, working on an optimization problem…
Casey:
Yeah.
Jeff:
When Abrash was there, for example. Abrash would work on it. [inaudible 22:38] would work on it. I’d work on it. And it’d pass around. It would always get faster. I don’t know if they’re… And I think that we even joked about this on a podcast in the first or second season…
Casey:
Okay.
Jeff:
Of like, this point of, “I don’t know when it stops getting better when somebody finally…”
Casey:
Goes, “Okay, enough…”
Jeff:
Or they’re just like, “No, this can’t… This is just what it is.”
Casey:
Alright.
Jeff:
But… In any case, that was just one thing I did with STP just for loading. And it didn’t… And whatever… That was like whatever… But I wanted to talk about what I was working on these last couple days because this is an example of me being insane and it actually having an odd actual payoff.
Casey:
And now, you said at the beginning of the podcast that this was a milky peak.
Jeff:
This is a…
Casey:
I’m interested to know how you make this a milky peak.
Jeff:
Well, milky peak means…
Casey:
Oh, it means something, does it?
Jeff:
Like, this afternoon, I had my little orgasmic thing where I figured out what was happening. I was like, “Oh, my milky optimization peak.”
Casey:
Okay. So what you meant more, if I may slightly modify the phrase to make it perhaps more accurate although you haven’t said what it is yet but it sounds like what you’re describing is not a milky peak. It’s a milky climax, if you will, right?
Jeff:
Okay, milky… Yeah… Well, a peaking, that’s how I always saw the word peak.
Casey:
Okay.
Jeff:
Alright. So anyone that works on games that are small pixel art-y games or just small games with limited graphics, the thing that you quickly realize is that sounds dominates the size of your thing.
Casey:
Right, right.
Jeff:
It just ends up being the thing.
Casey:
Because normally, the visual data has a much bigger payload…
Jeff:
Yeah.
Casey:
But if you have pixel graphics, they compress…
Jeff:
Yeah.
Casey:
So dramatically…
Jeff:
Well, and also interestingly, if you have a little movie and you’re moving the characters with code and animations that re hitting triggers and stuff, you might have a movie that’s 40 seconds long…
Casey:
Right.
Jeff:
That the code plus the data combined is a K…
Casey:
Yeah.
Jeff:
But audio, even very compressed audio, is gonna be a megabyte for those 30 seconds or whatever it is. Anyway, so…
Casey:
Unless like you said… I mean, we talked about this before. Unless you go the same route with your sound. If your sound is Chiptunes, then it’s super tiny, as well, because it’s just using FM Synth and…
Jeff:
I would love… That is that internal frustration that…
Casey:
Okay. You know you could’ve done that.
Jeff:
I know that there’s still a possibility there. I’m just not a musician so I can’t take the songs that I want to use and do that to myself.
Casey:
Okay. I see.
Jeff:
If I would, this would’ve been MIDI already.
Casey:
Okay.
Jeff:
If I knew how to do that, that would’ve been there.
Casey:
I see. So you had one climax but now you’re kind of… You can’t figure out how to get yourself up to a second milky peak of milky…
Jeff:
That’s the tantric milky climax that I see that’s out there, tantalizing, but I’m like… I can’t get that.
Casey:
Okay. Alright.
Jeff:
But anyway, this peak…
Casey:
It’s an S&M… That’s an S&M peak, a sound and music peak…
Jeff:
I see.
Casey:
That you can’t hit without… Someone will have to come and help you with your S&M…
Jeff:
Right.
Casey:
Okay.
Jeff:
So, I had all my graphics were built in the executable. It did [inaudible 25:46] with the executable. I [inaudible 25:47] with RAD Lib C which is our tiny Lib C.
Casey:
Okay.
Jeff:
And so I had this nice perfect…
Casey:
Are you building with the default library turned off?
Jeff:
Yeah.
Casey:
Good for you.
Jeff:
So I’ve got… I’m down to very minimal.
Casey:
How hard is that to do these days, by the way? The last thing I shipped with no external library was the Granny Suite of things…
Jeff:
RAD Lib C, over the years, it runs great with 2008. For 2012, there’s more complicated stuff going on. And I haven’t done that yet. And I have not done the 64-bit version of RAD Lib C which is harder because you have to do some… There’s more work there to set up.
Casey:
And is a lot of that… So how much of that… I don’t know if you’ve looked at it yet so I may be asking questions that you can’t answer but how much of that is actually 64-bit platform issue where, like Windows is [ forcing ] this upon you? And how much of that is MSVC’s compiler sucking balls and so you have to deal with all kinds of special stuff that it expects you to have set up?
Jeff:
It’s the C Compiler side of it.
Casey:
Okay. So if you compile with LLVM, your own code or something, and didn’t have I try to require anything… Like, if you could produce your own binary stuff, this would not be an issue.
Jeff:
Correct.
Casey:
It’s strictly because MSVC is sucking balls again.
Jeff:
MSVC… There’s a little bit of security stuff in that you now have to have the special code [ page ] like region stuff for security things.
Casey:
Oh, yeah?
Jeff:
Yeah. That’s a pain in the butt.
Casey:
What does this entail?
Jeff:
Well, for some stuff that we did with MASM…
Casey:
Okay.
Jeff:
Building with this switch means that we needed to put little markers… I’m going by 3-year old memory but there were markers inside the assembly that you did a marker and a marker and then you did a segment with a special name and then you listed those two segment sizes so that if an exception happened inside there, it doesn’t just pull the plug on your app because you want… Like, in one of our assembly routines, if it crashes, it triggers the normal crash debugging that happens when an app crashes…
Casey:
Okay.
Jeff:
So that it unwind the stack and gives you the thing.
Casey:
Yeah.
Jeff:
If you don’t have that in there, 64-bit thinks something terrible or nasty…
Casey:
It thinks a virus is doing some nastiness or something?
Jeff:
Or something and then it just… Part of the security suddenly just pulls the plug. So we had to put these things…
Casey:
So just to be clear, so that’s more for debugging… If a code is working properly and doesn’t crash, you’re okay? But it’s only if, like… During development and it’s crashing a bunch of times, you wouldn’t even know [inaudible 28:17]
Jeff:
There’s one other place that’s a little tricky and if you do structure exception handling, not C++ exception handling…
Casey:
Right, but Windows…
Jeff:
But try, you know, the lower level one…
Casey:
Right, Windows structure exception handling…
Jeff:
Yes. That one, you also have to do some weird marker stuff.
Casey:
Right, right. Yeah.
Jeff:
Because you… And in fact, we don’t use __try. We made our own because using the __try pulls in a lot of weird stuff from C runtime. So I was like, “No, we’ll just make one that does it with the exception handle hook thing and do all that stuff…”
Casey:
Right, yes. ‘Cos you could look for your own marker or whatever you wanted…
Jeff:
Yeah, and then [inaudible 28:56] you back to where you were. Getting that working in 64-bit is a lot harder. That’s why [ I haven’t bothered with it ].
Casey:
Okay.
Jeff:
Okay. So anyway, so now, I’m down to this lovely… It’s like a 148K…
Casey:
Okay.
Jeff:
And it’s solely the code…
Casey:
Alright.
Jeff:
And even of that, like, the code itself is… To compile… If I make my PNG compiler which are just… My PNG compiler does the pre-multiply, some clean-up, and then it also turns it into inc file so that it’s included… It’s part of the executable, right?
Casey:
Okay.
Jeff:
Does that make sense?
Casey:
It does.
Jeff:
So all my PNG’s are just built right into there. And they’re 90% of it. So the thing normally is 20K…
Casey:
So 148K is code plus graphics?
Jeff:
Yes, everything’s in there nicely placed.
Casey:
Just no sound?
Jeff:
No sound.
Casey:
Got it.
Jeff:
It had sound.
Casey:
Yes.
Jeff:
Just uncompressed sound.
Casey:
Okay. These are WAV files?
Jeff:
There are just uncompressed WAV files. And all of them are Chiptunes and just real low sound effects so you can slide the sample [ rate way the ] fuck down just to begin as a pre-compresion.
Casey:
Okay.
Jeff:
Just like… Alright, my stuff is almost all 4 kilohertz, sometimes 8…
Casey:
Whoa.
Jeff:
Sometimes 2…
Casey:
Whoa.
Jeff:
Like I just, like, listen to them and go, “Okay, that’s fine.”
Casey:
Wow.
Jeff:
But I mean, it’s all… Like, it’s the kind of thing… Actually, there is two of the Chiptunes that go from 8 kilohertz to 4, makes it sound more in tune in life…
Casey:
Better?
Jeff:
Like an 8, it’s… Anyway, so I…
Casey:
Well, one of the things with Chiptunes, obviously, is the style is intentionally going for this nostalgia Pacman game feel or whatever. And so, in some level, you need a certain degree of low fidelity…
Jeff:
Right.
Casey:
Like, you are trying to evoke low fidelity. And perhaps, having a low sample rate makes your ear feel more nostalgic in that way…
Jeff:
Right.
Casey:
Because you hear that weird sound that you just get from incomplete sampling reconstruction.
Jeff:
And actually, even at that rate with no compression, that same bit rate of being very low…
Casey:
Yeah.
Jeff:
MP3… I tried out with… Because we have an MP3 decoder… I didn’t want to drag in all the log.
Casey:
MP3, you can’t even set to…
Jeff:
No cranking it way down there, it’s… And it sounds terrible. OGG also sounded weird.
Casey:
Yeah.
Jeff:
And I was like, “I’m not gonna link in OGG.” You could probably use the new CELT or whatever they call their new stuff.
Casey:
I don’t know anything about that one.
Jeff:
Yeah. Their new one’s actually supposed to be very good. But the point is that for the style of what I wanted to do… Sorry, there’s this huge cargo ship right out the window here that’s distracting me. Look how the ferry had to go all away around them to avoid that. The cargo ship’s so enormous.
Casey:
It’s big but… I mean, it’s not that unusual.
Jeff:
It’s full of [inaudible 31:45] for America.
Casey:
Alright, ignore that.
Jeff:
It’s so close, though.
Casey:
Nobody cares. They can’t see that. They’re listening to the podcast and you’re talking about things they can’t see.
Jeff:
Alright, anyway… So I start adding sound. And even with this and using that kind of format is better than the highly compressed ones. And I was like, “Alright, this is fine.”
Casey:
Yeah.
Jeff:
I add, like, 3 songs. And I’m at… Now my executable’s 1.2 megabytes…
Casey:
Alright…
Jeff:
Just poof…
Casey:
Okay. [phone ringing in background]
Jeff:
This is very unprofessional. It’s probably the cargo ship captain…
Casey:
Are you telling me that you didn’t even turn off your fucking cellphone?
Jeff:
No, I didn’t.
Casey:
That is where we’re at? Where are you going?
Jeff:
I’m throwing it on the bed so if it rings again…
Casey:
This is one of the worst podcasts we’ve ever done.
Jeff:
No. Alright…
Casey:
How did you manage to go from having a podcast where I specifically said, at the opening of the podcast, that this was probably one of the finest podcasts on record of the Jeff & Casey Show…
Jeff:
No, this is like a slice of life. This is life.
Casey:
And now, you have… Right in the middle of the podcast…
Jeff:
Life.
Casey:
Hold on a second. At the 32-minute mark, not only do you start talking about something outside the window that the people can’t even see but then your cellphone goes off.
Jeff:
Well, we’re not on the milky peak yet. Let’s… Because we’ve got another…
Casey:
This is terrible.
Jeff:
We’ve got another 15 minutes before the milk kicks in.
Casey:
I can’t believe this is happening. This is ridiculous.
Jeff:
So anyway, I’m up to a megabyte.
Casey:
Okay.
Jeff:
And I’m like, “Ugh, fuck. This is gonna be huge by the time I add all the sound and music.”
Casey:
Okay. How much sound and music did you have to add?
Jeff:
There were 3 more levels and then the sound effects.
Casey:
So something like 4 megabytes or 5 megabytes?
Jeff:
4 or 5 megabytes, yeah.
Casey:
Alright.
Jeff:
That’s what I was thinking, maybe more.
Casey:
And you’re staring this down and going, “How will we ever…”
Jeff:
Well, it was already 1…
Casey:
5 megabytes of data…
Jeff:
Yeah, exactly.
Casey:
On to its… Do you know how many floppy disks that will take?
Jeff:
This is…
Casey:
That is 4 3__…
Jeff:
This is why this is…
Casey:
I’m sorry, 3__…
Jeff:
Right.
Casey:
[ Just so I don’t forget ], 5__ would be way more than that. How much was in 5__?
Jeff:
1.2.
Casey:
3__ you could do 1.4.
Jeff:
And 5__ were 1.2.
Casey:
Really?
Jeff:
Yeah.
Casey:
Oh. I always thought they didn’t hold much…
Jeff:
They were originally 360.
Casey:
Okay. Then they beefed ‘em up?
Jeff:
Then they kept beefing ‘em up.
Casey:
Okay. Alright.
Jeff:
It’d actually be interesting if you made floppy disks now with how good our material science is.
Casey:
Oh, right. How much we could fit in…
Jeff:
Like, oh yeah, on that 1.4…
Casey:
Right, right…
Jeff:
We could do this and… I mean, flash drive’s, 32 gigabytes in a [inaudible 34:18]
Casey:
Well, material science-wise, I assume… I mean a floppy…
Jeff:
It’d be many terabytes if that was at flash density.
Casey:
Am I wrong… Well, ignoring… But it’s not flash technology. So what I’m thinking is it’s basically a harder disk [inaudible 34:34] right, if what a floppy disk is, right? I mean, it’s just a disk of magnetic media.
Jeff:
Yeah.
Casey:
So I assume that a floppy disk would hold similar to a hard disk of that size which is actually huge for a hard disk, right?
Jeff:
Yeah.
Casey:
I mean, hard disks aren’t normally that big. But of course, hard disks are stacked.
Jeff:
Yeah.
Casey:
So if it was thin…
Jeff:
They also spin fast. But I guess the spin is just for the speed.
Casey:
That’s the speed that’s not the density, though, I don’t think. Anyway, moving on…
Jeff:
But anyway, alright, so I was looking at that and going, “Well, I can’t use a higher… MP3 or OGG, they sound shitty. What I can do is ADPCM compress that even at 2 kilohertz, it’s gonna give me 4 to 1.”
Casey:
Okay.
Jeff:
And so, I do that.
Casey:
Alright.
Jeff:
I’m like, “Oh… Great.”
Casey:
So now, what we expect to be a 5-megabyte footprint has shrunk to a 1 point something megabyte footprint, potentially?
Jeff:
What I’m guessing…
Casey:
Something like this…
Jeff:
Right. But I get it ADPCM is working all this.
Casey:
Alright.
Jeff:
And I continue working on the game over the next two weeks. And that was 2 weeks ago.
Casey:
Right. Just doing levels and cleaning up shit and…
Jeff:
Just getting it all done and I wrapped it all up last night.
Casey:
Alright.
Jeff:
So I have it. And I go, “You know what, let me just take a look at the executable.” I’m like, 3.2, and I’m like, “Eh, well, there it is.”
Casey:
Alright, it’s a bit puffy.
Jeff:
Yeah. And then, so I was like…
Casey:
That’s not fitting on a floppy.
Jeff:
And then I was like, “Well, wait. Let me… What… If I 7-Zip this…
Casey:
Okay.
Jeff:
If I 7-Zip it and it goes all the way down to 800k.
Casey:
Oh…
Jeff:
I’m like, “Fuck!” And I’m like, pissed. And I’m like, “Oh, my God.” So then, I’m like, “Alright, let me run something not as sophisticated,” because 7-Zip has a lot of media filters in it.
Casey:
Oh, it does?
Jeff:
Yeah.
Casey:
Okay.
Jeff:
So like, “Let me try something,” so I’m like… [36:20] my RAD LZ thing which does no pre-conditioning, just run it. And it’s like, you know, 785K.
Casey:
Oh.
Jeff:
And I’m like, “Ugh, fuck me.” So then I’m like, “The sound must be more compressible than I thought.”
Casey:
Well, why can’t you just zip your sounds, then?
Jeff:
Well, wait. Let me… That’s what I do.
Casey:
Oh, alright.
Jeff:
Let me finish the story.
Casey:
Okay.
Jeff:
So then, I’m like, “Alright, well, okay. Let me look. It must just be more compressible.” So I look through… Just hex edit the executable and I’m [ paging up ] the [inaudible 36:48] and there’s these long runs of zeros. I’m like, “Fuck. Alright, well there’s just places where there’s silence and whatever. And probably, the sounds are clipped at the end of every song as tightly as it could.”
Casey:
Exactly, right. Okay.
Jeff:
And so, I make the sound baker, the thing that compresses, that turns them into inc files, too, because they’re included just like everything…
Casey:
Of course, true.
Jeff:
So, that I make clamp off the end.
Casey:
Alright.
Jeff:
And that gets me from 3.2 to 3 point…
Casey:
That’s not gonna be much…
Jeff:
You know, 3.0. I’m like, “Alright, that’s just fucked…”
Casey:
Long runs of zeros aren’t that common. They don’t take up that much space.
Jeff:
And only at the end of the files, certainly, too…
Casey:
Yeah. That’s not gonna…
Jeff:
So I’m like, “Eh, that’s fucking weird.”
Casey:
I mean, you should do it but it’s not…
Jeff:
And then I’m like, “Alright, well, it just must be these sounds are just… Have lots of intermediate quiet spots and are very repetitive so they LC well…”
Casey:
Yeah.
Jeff:
So I’m like, “Alright.” So I ask Sean. I’m like, “Sean, I notice in the PNG thing…” PNG is actually a pretty simple format.
Casey:
Yeah.
Jeff:
It’s just delta from the previous thing…
Casey:
But it’s got a zip on the end, yeah.
Jeff:
But it has zip on the end. So I’m like, “Can I call it?” And he’s like, “Yes, what the fuck are you doing?”
Casey:
Yeah.
Jeff:
Give me all this normal shit that he’s giving me, like, “Why are you doing this?” I’m like, “Because I like it.”
Casey:
Yeah. Now, I’m surprised at this point. Very surprised that you didn’t sit down and write a dictionary compressor. That would’ve been my first guess. Well, I would’ve thought that you would’ve gone… This would be the perfect opportunity to implement a [inaudible 38:14] encoder, right?
Jeff:
So here’s the thing…
Casey:
That is what I thought you would do.
Jeff:
I have RAD LZ.
Casey:
Okay.
Jeff:
I could’ve just plugged that in.
Casey:
Okay.
Jeff:
And I thought about that.
Casey:
Right.
Jeff:
But then, I thought, “That’s 8K of new code.” And Sean’s is sitting there, I’d have to replace them both.
Casey:
Right.
Jeff:
Because if I knew… If I had 2 of them doing the same thing…
Casey:
That would drive you nuts.
Jeff:
That’s more buggy.
Casey:
Okay.
Jeff:
And I came really close to replacing deflate in the PNG because I’m baking the PNG’s anyway…
Casey:
Okay. So, you don’t need it to be PNG, right?
Jeff:
I don’t need…
Casey:
It can be whatever you want…
Jeff:
It can be whatever I want. I can just use the pre-conditioner and run my own compressor on it. And I emailed Charles about that. Anyway, but I’m not gonna do that.
Casey:
No. Oh, my God.
Jeff:
So, okay… So then…
Casey:
Okay.
Jeff:
So he goes, “Yes, there is but why the fuck…” I’m like, “Alright, awesome. This is great.” So I download Z Lib just…
Casey:
Why?
Jeff:
I need something to compress it as part of my baking process.
Casey:
Oh, okay.
Jeff:
So I get that installed, run it, and it works perfectly which is awesome.
Casey:
Alright.
Jeff:
And compress it… And I’m like, go in there and I drop from, like, 3.2 to 2.9…
Casey:
So not that much…
Jeff:
Not that much…
Casey:
Not that much…
Jeff:
It’s about what you normally get with sound before I was, like, compressing the executable.
Casey:
So the compression is what? And then… You said your compression was 7-Zip and then what was the other thing you compressed it with?
Jeff:
Just RAD LZ or LZ compressor…
Casey:
So your LZ compressor was doing a much better job than Vanilla Zip for some reason.
Jeff:
Yeah. And we are better than zip, normally…
Casey:
But not that…
Jeff:
Nothing’s that much better.
Casey:
Yeah.
Jeff:
So I’m like, “Alright, what the fuck is going on?”
Casey:
So something weird… Window size or something [ that is ] wrong.
Jeff:
So then, I’m looking at all this stuff and I finally find out that my inc file generator generates a couple things — Generates some defines of, like, “here is the compressed size”, “here is the ADPCM block size”, “here’s the rate”, “here’s the --”… It makes those [inaudible 40:15]
Casey:
Alright.
Jeff:
So that, you know, the encoder… I mean, so that the program can use that.
Casey:
Right, right, yeah.
Jeff:
[inaudible 40:21] Hey, it just refers when you say start, you know, Jeff… It looks at Jeff… It does a macro thing that looks for Jeff_rate…
Casey:
Right.
Jeff:
Which is supposed to be an [inaudible 40:32] somewhere as part of the [ baker ]. So I’m looking at that carefully and I’m like, “I don’t see what’s wrong here. This is odd.” Finally, it takes me a minute or 2 to find it. I notice… So I take the audio…
Casey:
Alright.
Jeff:
I normalize it.
Casey:
Alright.
Jeff:
I cut off the zeros that are at the end.
Casey:
Yeah.
Jeff:
I then ADPCM it.
Casey:
Yeah.
Jeff:
And then I zip it.
Casey:
Alright. Wait, but you don’t zip all of them together?
Jeff:
No, I don’t pre-zip everything so, like… And that made me think larger window but, like… The larger LZ window but, whatever…
Casey:
Okay. That seems like a mistake but okay. Because we were talking about only a 5-megabyte footprint total. My thinking is might as well chain it all together into one big thing.
Jeff:
Oh, my PNGer that I’m going to… That…
Casey:
Right.
Jeff:
After this game is done…
Casey:
Yeah, yeah, yeah…
Jeff:
I’m just gonna make the PNGer that runs all the prediction…
Casey:
Right.
Jeff:
Puts all of them into a big file.
Casey:
Right.
Jeff:
Compresses them all together with one LZ… Yeah, that’s what I’m gonna do, definitely, anyway.
Casey:
Yeah.
Jeff:
’Cos there’s probably 5K to get there with all the character sprites being [inaudible 41:39]
Casey:
Well, my assumption, too… Although I don’t really know PNG very intimately as a format, my assumption, too, is that you could write a packer that was aware of that and puts similarly colored sprite art into the same… Like, you could probably reduce the palette sizes a lot by packing things into, like, pages that were all similarly-colored or whatever…
Jeff:
If I replaced the deflate with something that was aware of the 2-dimensional nature of the data…
Casey:
Yeah, yeah, yeah…
Jeff:
So that, like, jump acts that were very similar aligned didn’t cost more. . .
Casey:
Right. Yeah, yeah, yeah.
Jeff:
You’d stomp it.
Casey:
Yeah.
Jeff:
That’s what I almost did.
Casey:
Okay. Next time. When you celebrate your anniversary, let’s say..
Jeff:
Well, when I do…
Casey:
And you need to make an application…
Jeff:
Another game, yeah.
Casey:
An anniversary application…
Jeff:
Yeah.
Casey:
Then you can tackle this problem.
Jeff:
I think I’m gonna tackle that problem… I’ve got some things that I’m backed up on that I need to do anyway. But I think I’m gonna tackle that problem, anyway.
Casey:
You need to release a free library that’s like “Jeff’s pixel artist tools” because there’s so many pixel art people out there. You should totally do that.
Jeff:
I’m going to do the pack… Yes, I’m going to do that.
Casey:
Yeah.
Jeff:
For the art stuff, anyway. That’s what I’d start… Yeah, anyway, so I finally look at it… And after…
Casey:
Yeah. So what’s the punch line?
Jeff:
So [inaudible 42:55] And I realize… I look at the stupid definition of [ unsigned care bits equal bracket ], and I was using the uncompressed field. It was using the uncompressed length.
Casey:
Oh.
Jeff:
So it was the compressed data and all the…
Casey:
[inaudible 43:11] smaller, really, yeah…
Jeff:
It just… So the amazing thing was…
Casey:
Right, right, right…
Jeff:
Is because there’s… If any zeros at all…
Casey:
So that’s why you were seeing all the zeros.
Jeff:
Exactly.
Casey:
Yeah, yeah, yeah.
Jeff:
So it was literally like, I took that and then, like… So now, I can go back and see zip now buys me… It got me down from 3.2 down to 830…
Casey:
Right.
Jeff:
And if you remember, 780 is what a good compressor did.
Casey:
Right.
Jeff:
So that’s now…
Casey:
So we’re good.
Jeff:
I’m down to it.
Casey:
Alright.
Jeff:
So I can now, if I want, go take zip back out. I probably won’t.
Casey:
Right.
Jeff:
Because that’s I think buying me maybe 20K. It’s not buying me that much but…
Casey:
Right.
Jeff:
Anyway, the important thing… The funny thing about this was it’s all pointless.
Casey:
So the milky climax was actually kind of really…
Jeff:
Well, no. The milky climax was just as good. And here’s why. Normally, I have the milky climax and I just get to the milky climax and I’m like, “Oh. Well… I did. I made the executable smaller. No one’s gonna care.”
Casey:
Alright. Okay.
Jeff:
But this time, in the effort of trying to get that milky climax…
Casey:
Right.
Jeff:
It found a legitimate just bug…
Casey:
Right, right… Yes.
Jeff:
Now, that bug did not turn into anything but a bigger executable.
Casey:
Right.
Jeff:
But there was no reason for the bug to be there. And if I use this stupid inc maker for however long, it would have that bug because I never would have bothered to see it.
Casey:
Yeah. No, you wouldn’t.
Jeff:
So it was funny that…
Casey:
Right.
Jeff:
Being completely pointless…
Casey:
Yes.
Jeff:
Did find an actual problem.
Casey:
Okay.
Jeff:
Which was… Now again, you could argue that, like, somebody that’s more enlightened would have found that bug because they would’ve just questioned why it wasn’t getting smaller…
Casey:
Okay, right…
Jeff:
But it is… At least… A lot of people wouldn’t I think have looked at the executable size at all.
Casey:
Right, right, right. So this is kind of like, you know, “I was masturbating and I found a lump”.
Jeff:
Yes! Exactly.
Casey:
It’s like… You know, it’s like…
Jeff:
“I was jerking off and I found…”
Casey:
“… Testicular cancer. And we went to the doctor and he was able to remove it and it was fine.”
Jeff:
And I stopped it in time. This is exactly what this is.
Casey:
Right.
Jeff:
This is exactly what that process was.
Casey:
Yes.
Jeff:
I was…
Casey:
So now, the milky climax has saved you from having to have a testicle amputated or worse, Jeff…
Jeff:
That’s right… So I mean, when I started and wanted to talk about this a couple days ago on the podcast…
Casey:
Okay.
Jeff:
I was just gonna say, like, this process of doing this pointless stuff…
Casey:
Right, right…
Jeff:
Because really, working on the game doesn’t give me any satisfaction. It’s this stuff.
Casey:
I see.
Jeff:
That’s what feels good to me.
Casey:
Yeah, yeah.
Jeff:
Even though no one cares.
Casey:
No one cares.
Jeff:
Right. But that’s what I liked. And talking about Sean about this when, you know, he’s like, “Well, this is what people do, they get bogged down in technical details and don’t ever finish the game.” I’m like, “I don’t care if I… I mean, I’m gonna finish the game but I don’t care about shipping lots of stuff, like in that way, like…” So there is that one part of that I just kind of enjoy.
Casey:
And this is… To me, there’s…
Jeff:
So good or bad… I mean, there’s a good or bad… He was talking about it more in terms of, like, “Dude, you’ve just gotta do this so that you’re more effective.” I’m like, “That’s effectiveness as defined for what my psychology is which is part of that…”
Casey:
You already have… I mean, you are a wealthy individual who runs a successful business. It’s not like you’re some Indian in a garage somewhere who’s like, “How am I gonna eat next time?”
Jeff:
Oh, yeah…
Casey:
So it’s like…
Jeff:
Yeah.
Casey:
You have the luxury of focusing on what you want to focus…
Jeff:
It is totally true that I have a completely unfair thing…
Casey:
Well, no, I wasn’t saying unfair…
Jeff:
No, but it is.
Casey:
I was saying more like… So in some sense, the advice that Sean was talking about is good advice for certain people. If the thing is you have to ship this game or you won’t be able to eat next month or you’ll have to go back and start doing something that you don’t want to do…
Jeff:
Or if you want to ship a lot of games…
Casey:
Or whatever… But there is value in people who can take the time to do stuff like this. In taking the time to do stuff like this, provided that then that code can get you somewhere, right?
Jeff:
Yeah.
Casey:
Like, if you do put up a thing that’s like, “Hey, here’s this cool thing I wrote that packs all your stuff together and you can use it or whatever,” that’s, like, very valuable. And no one else is going to take the time to do it. And that was good. Like, that’s good for everybody in a holistic sense, not just because it was satisfying to you. So I think there is some value there. But what I was going to say is this is again one of those things that interest me from a technological perspective much like we’ve been talking about, kind of a running theme in the podcast this season, which is that I am very interested in ways in which we can create systems for people like you to help people like me and so on. Like, I’m never gonna do half of that stuff, right? And that doesn’t mean that I like shipping stuff that is super not optimal. Like, I don’t want to make this whatever it is utility that’s super un-optimal. I want the really optimal one. But I’m not going to go do all that work to, like, actually get it going, right? And one of the problems that we have right now is the ability to effectively merge those 2 styles in projects is extremely limited. Like, pretty much the only way to have that happen is if you and I directly work together on the project. Like we do with Bink or something where it’s like, “Okay, I’ll go do this thing and get this thing done,” and it’s like, “Here’s a working version.” And then you can go, “Okay. I see. I’m gonna go make it do these [ shwizzles ] and have this stuff and work in work in one buffer or whatever,” right? Like, with the blur stuff. It’s like, “Here’s a working thing but this is not gonna be the final thing. This is just to prove that we can do it,” and then a pass comes along after that to make it better and then a pass after that to make it better and so on and so forth, right? And so, that works. But it’s interesting to think about it at a deeper level and go — Are there ways that we can make new languages, new compilers, new IDE’s, I don’t know what it is, right? But that allows us to work separately. Like, I can make stuff that combines together without our prior collaboration on it because you see that happening in a shit way in stuff like Python or something. Someone writes, like, a thing that goes and gets a URL and returns the HTML that was from it or whatever. And then a Python programmer comes along and calls that. And that was a very good leveraging of those things because the Python programmer was like, somebody doesn’t really know programming that well maybe and couldn’t have written that whole library. And the other person was not someone who was going to do whatever this [ programmer ] was gonna do. So they, like, came together to solve a problem.
Jeff:
Right.
Casey:
But the results in those systems like Python and Ruby and all those sorts are these [ piggy ], disgusting, slow, terrible programs, right? And it would be interesting to know how do we push past that? How do we get to the point where we can have the same sort of synergy but the result is a very efficient program that’s close to the optimal rather than one that is, like, so far from optimal that it’s laughable (which is kind of where we are now). And that kind of interests me because although it sounds like a very difficult problem, I feel like we could make… I feel like there’s progress that could be made there, right?
Jeff:
Yeah.
Casey:
If we care about it…
Jeff:
I think there’s lots of things that could be done to make that stuff nicer. So there’s a lot of examples wherein library code like STP libraries or like RAD libraries where you have to make calls that are non-optimal…
Casey:
Yeah.
Jeff:
Just because the way to do it that is optimal is either really awkward or almost impossible with the way that things work or so error-prone by most people that it’d be bad.
Casey:
Yes.
Jeff:
So there’s certainly things like, oh, hey. When you go to write the pixels out, if you could supply like here’s the lambda that takes RGB…
Casey:
Right, right, right…
Jeff:
You don’t want to have a call back in every pixel. That’s ridiculous.
Casey:
Right, right, right. Yes.
Jeff:
But here’s the code that runs with that and you do that now with some horrible macro that you couldn’t debug and also doesn’t let you ship in binary…
Casey:
Yeah.
Jeff:
It has all these other problems. So certainly, there’s thing that do it.
Casey:
Yeah.
Jeff:
I think the biggest thing, at least for me in terms of when you’re faced with something like this is just tools that let you even know what’s going on. Like right now, I had this big executable…
Casey:
Right, right, right…
Jeff:
And I’m like, “Wait, that doesn’t make sense. Where are all those zeros?”
Casey:
Yeah.
Jeff:
And then you’re like, “Well, let’s see. I did a dump in. That told me…”
Casey:
And they’re super arcane, right?
Jeff:
But I include all that stupid OBJ’s in one… I mean the incs in all one file. So that doesn’t tell me anything.
Casey:
They’re super arcane. And like, one of the things I remember Carmack posted about a long, long time ago was, like, “I want to make a tool that visualizes map files so I just know where the fuck everything is when I compile something.” ‘Cos like, it’s true that right now you build an executable and you have no idea… Like, the general process is you see the results but you have no idea how the executable is laid out, where the stuff went in it, any of that stuff. It’s totally opaque to you.
Jeff:
Yeah.
Casey:
You don’t know even… You may have an idea of what parts of your code are taking up the size of your executable. You really don’t know…
Jeff:
Yeah.
Casey:
And one of the interesting things about that is that’s a trivially solvable problem. It’s just not things that tools focus on. So in the Microsoft Visual Studio ID or something. There isn’t just this Window that’s showing you parallel with your code here’s where in the map in went and how big it was and did it split out in multiple places or, you know…
Jeff:
Well, also just even things like, “Here’s a symbol…”
Casey:
Yeah.
Jeff:
“What’s its memory range?”
Casey:
Yeah, yeah…
Jeff:
It’s a small thing but like…
Casey:
It’ll get loaded here and here’s what… You know, blablabla…
Jeff:
They’re all stupid… And they’re stupid… And there’s some little hacky utilities to do some of this but either, A, they’re working off map files which change…
Casey:
Yeah.
Jeff:
I mean, we have map [ file parsers ] and [inaudible 53:00] and it’s a nightmare.
Casey:
They need to be integrated into the compiler. It has to be a thing that’s known. It’s part of the tool [ thing ].
Jeff:
I mean, just… I mean, here’s a small thing. Go into anybody’s code. Sneak it in there. Just type [ “static care Jeff” 90 megabytes… ]
Casey:
Right. Yeah.
Jeff:
That’s it.
Casey:
Yeah.
Jeff:
That will not change the size of the executable…
Casey:
Right.
Jeff:
But you’ve now added 90 megabytes to the…
Casey:
Right. And they will never know.
Jeff:
They will… I guarantee you, they won’t know.
Casey:
No.
Jeff:
And it’s… Like that is a problem with our tools…
Casey:
Yes. And it should be immediate… That should have been immediately obvious. Like, the net… The instant that compiled, there should have been this big old blob. And you go like, “What the fuck is that?” And you click on it and you go, “Oh…”
Jeff:
Yeah. I mean, and you have to do some things like you might have to put a [inaudible 53:41] on it to also convince the compiler that like…
Casey:
Yeah.
Jeff:
[ Don’t dead data ]…
Casey:
Right, [ dead code eliminated ]…
Jeff:
But even dead code, a lot of times, you’re surprised when you actually go through and do that. And figuring that out post… Like, Charles has been doing that with Oodle. It’s like, unwinding it so that you can predefine, like, “I’m gonna be using these 4 codecs and once I do, then I can use Oodle normally…”
Casey:
Okay.
Jeff:
And then if you don’t do those, they don’t get linked in.
Casey:
Okay.
Jeff:
Finding that, especially in C++, [inaudible 54:15] oh that, oh, refer to that… And then that thing took the address of this function…
Casey:
Right.
Jeff:
Which has a branch on type that calls these and you’re like…
Casey:
Right, right, right…
Jeff:
“Ugh, there’s no way to see…” ‘Cos they don’t have any… And again, that’s another thing that it’d be super nice if the compiler just wrote out DOT files that you could just dump into…
Casey:
Yeah.
Jeff:
You know, ‘cos we have… What’s that visualize, the one that I always use, the one that draws the graphs…
Casey:
Oh, the Graphviz thing?
Jeff:
Is it Graphviz?
Casey:
I don’t know. It’s, like, an AT&T product or something you know…
Jeff:
Well, it’s free. You can just download it.
Casey:
Yeah. It’s free but it was like AT&T [inaudible 54:52]
Jeff:
Okay. Anyway, you just feed it a DOT file. A DOT file and you’re like… And it is… They did the nice thing of like, it tries to do something with your files almost [ no matter what ].
Casey:
Yeah, yeah.
Jeff:
So if you say Jeff [ arrow ] Casey, Casey [ arrow ] Bob, you’ll get three circles.
Casey:
Yeah.
Jeff:
And with an arrow pointing, like, very simple…
Casey:
Yeah.
Jeff:
So the compiler could very easily just, right at the time, this symbol, its owner was this…
Casey:
Yeah.
Jeff:
Just [inaudible 55:20] and it’s… You don’t have to… The cool thing about the Graphviz is you don’t have to pre-sort those and do, like, a nice array of, “Well, this refers to this.” Like, you’re just dumping the text…
Casey:
And it’ll figure it out. Yeah.
Jeff:
And it sorts it all out and builds the graph for you.
Casey:
Yeah.
Jeff:
So if you could write out a DOT file from every link and see that, I between everyone would be surprised.
Casey:
That’s kind of cool. But again, it’s not quite as useful because I really want an explorer. Like, I hate to use the term be Microsoft always puts it on something that actually doesn’t really let you explore anything. But I really want a real thing like that where it’s like, “Here is the actual physical layout of the thing and I can, like, inspect — You know, go in and drill down and go, “Okay, what’s in there? What’s in here? Okay, now, [inaudible 56:05] me out to the people that refers to. Show it to me as the graph. Show it to me as a blocked diagram,” you know…
Jeff:
Yeah, that would be cool.
Casey:
I want that. I want the whole thing…
Jeff:
Also like, “I want to look at it by file.”
Casey:
Yeah, I want to see everything…
Jeff:
This is the code. This is the data. This is the [inaudible 56:18]
Casey:
Well…
Jeff:
Alright.
Casey:
I think we have concluded your milky climax here. We’re running out of time in this episode of the Jeff & Casey Show.
Jeff:
Right. Yes.
Casey:
If you have a milky climax that you have recently experienced where you just coded all over the place and it was great, felt fabulous…
Jeff:
And then you found a lump…
Casey:
And you found a lump…
Jeff:
You find something else…
Casey:
When you have found the lump… Well, even if you haven’t… If you just had a nice milky code climax that you would like to talk about or rather to have us talk about, you can email us at Podcast@JeffAndCaseyShow.com and we will try to address it on a future episode if we can.
Jeff:
That’s right. Well, thanks, everybody.
Casey:
Thanks for listening and we’ll catch you next week.
Jeff:
Thanks.
Site design and technology © Copyright 2005-2014 by Molly Rocket, Inc., All Rights Reserved.
Contents are assumed to be copyright by their individual authors.
Do not duplicate without their express permission.
casey muratori
the jeff and casey show - season 4 - episode 18
prev
next
mollyrocket.com