Rooftop Ruby Podcast

20: Literal Metaprogramming

Episode 20

Collin and Joel discuss leaving the cloud, password management, security, and metaprogramming.

Follow us on Mastodon:

Show art created by JD Davis.

Collin:

Hey, Joel, uh, how are you?

Joel:

I'm good. Yeah.

Collin:

What? Uh, you know, I think it's time for me to leave the cloud. I was thinking about this. Um,

Joel:

As in, like, personally?

Collin:

yeah, you know, I just feel like I should be running my own hardware. No, I I, uh,

Joel:

You can run

Collin:

I saw a video where somebody was, um, was talking about that blog post and, uh, I thought it was, I don't know, it just made me, and then I was also, I think, tooting too much that day, uh, which isn't that good for your mental health, and, um, and then I was like, maybe it's time for me to leave the cloud today, just like for that day. Um,

Joel:

What are your thoughts on that?

Collin:

oh, on that, on leaving the cloud, uh, probably makes sense for certain people at like certain sizes and whatnot, right?

Joel:

Yeah, I think it does.

Collin:

Like, I, I, uh, I know people who've done that, and then most, some of them, most of them have moved to, like, Linode or DigitalOcean or whatever, um, but, you know, it's, it seemed, I think that blog post was a little strange, he did acknowledge that it wouldn't make sense for everybody, like, if you're a startup, you probably just Does it would be weird. Um, but

Joel:

not even talking about moving to... Lino or digitization? He means, um,

Collin:

oh yeah, he means like buying their own servers. Yeah. Yeah. Um, I know Marco Armit used to do that back when he was running Insta paper, but now all this overcast stuff is online node and he's, he, he loves it. Yeah. They were moving from AWS to their own servers. So I don't know, like, isn't AWS pretty expensive? Like. Comparatively.

Joel:

comparatively, I don't think it's that exp Well, compared to running your own hardware,

Collin:

I meant like compare compared to like line out or something. I thought it was a little it could get a little more out of hand

Joel:

I don't, I don't know. I

Collin:

yeah, because isn't it based on I don't know. I could be wrong because I've

Joel:

think it's, I think it's fairly competitive.

Collin:

Okay. Yeah.

Joel:

it depends on what services you're using, but like, I think e C two is comparable.

Collin:

Yeah, I guess it's that, uh, they're, you know, it's unclear exactly what their scale is, right? Um, because like, they don't say that they just say like millions. Um, it's, it's bigger than I think it

Joel:

it, it's absolutely huge and, and it's totally the right choice I think for them. Like they, like they can employ a team of people to do this and still save a lot of money.

Collin:

Yeah, they seem to make a lot of money. They can probably afford to do the transition, which I'm sure is like, it seems like a big upfront cost cause they had to buy all these servers. Um, but yeah, it seems like for a certain size, like I, you know, I think they're probably smart people who can like do math and figure that out for themselves. Uh,

Joel:

kind of weird that they moved from their own hardware to the cloud in the first place. Like that, I don't know how that ever was a good decision at their scale. Unless...

Collin:

you know, maybe it's one of those things where, you know, it, uh, it had certain promises. And like those are real of that, you know, if they have to scale up quickly, uh, you know, he says, you know, we can scale up really quickly in like two weeks, right? Like, but I think that works for them and it's probably why it would be a good decision for. The 37 signals folks is because, uh, I don't think they're having explosive growth. They probably have slow, you know, moderate to slow growth. Yeah. So like if you were a startup and you were doing, you know, you need to be able to scale up or down very quickly. It seems like where if you are a company that's having kind of Very predictable growth over time. It makes sense to me. Um, but yeah, I guess you definitely have to have some.

Joel:

It makes sense once you're paying so much for cloud that you could afford to buy hardware and pay people to maintain it. Like multiple people. Because you can't have one person on call all the time.

Collin:

Yeah, I think they have that. And then also, you know, when you buy your hardware, you're not like hosting it in your office, right? You're hosting it out of, uh, one of these co location centers. And so I think they're doing a lot of that probably. Uh, although you still need like a sysadmin to admin the sys probably, I guess, but as far as, I don't know, uh, if like a hard drive goes out or something like, I bet they, you know, that's probably fairly handled. I would think that's what you pay them for.

Joel:

Yeah.

Collin:

Yeah, anyway, um, oh, I was excited about this and I thought I'd just mention it because maybe other people would find this useful too. I've been keeping my passwords. I went off one password when they went to Electron. I don't know, I just didn't like the app as much and I wanted to see what the Apple thing was. But. So I've been using iCloud passwords for a while, but the main downside of it is if I do need to use a different browser, it doesn't, the passwords aren't there. Uh, so I don't know if you heard this, but they just released a extension for that. So you can do it in Chrome or whatever now, which I think is

Joel:

Oh, that's awesome.

Collin:

Yeah. So I think that makes it a lot more competitive for me since I can run it in other browsers. Uh, I don't know. Do you use a password manager like that?

Joel:

Yeah, I st I still use 1Password. I'm I'm pretty disappointed by 1Password 8 as well. It's like, it's just not as good. But, um, I I think I don't know if does does iCloud Keychain support sharing vaults and things like that?

Collin:

That's a new feature that's coming very soon.

Joel:

Oh, okay. That would that would be a huge... Huge improvement. Do they even have an app though? Because like keychain access is

Collin:

No, it's not keychain access. It's in settings. It's just in settings

Joel:

Right

Collin:

Or it's in Safari. You can get to it from either direction, but it's it's pretty

Joel:

feel like I feel like they could give Like they could make keychain into a proper app and have like a one password like Experience for it, but but like obviously apple style And it would be really popular

Collin:

Yeah, I think they should keep keychain the way it is because there's like advanced, you know You do more than passwords in keychain. So

Joel:

well, that's that's keychain access

Collin:

Yes, I think they should make a iCloud passwords app that is a separate app like 1Password and call it passwords.

Joel:

Yeah, yeah. That's, that's kind of what I mean. Um, yeah, like a, like a consumer facing, friendly password management app. Rather than trying to, like, just make it a, a screen in some settings page. Like, that's not where, where passwords belong. Mm

Collin:

for sure. Um, I do. I think they added some APIs this year for working with passwords and other apps. I don't, I haven't looked into it, so I don't know if it gives you like the access that you could build that app as a third party. But. If so, I think someone will definitely do it.

Joel:

hmm. Mm

Collin:

You know, they'll build one password, but it sits on top of iCloud passwords. I think someone will definitely do that.

Joel:

Yeah, one thing that I haven't really looked into is their, like, How they, how they store passwords, that kind of scheme for encrypting and managing your, your passwords and the secrets, because I know that one password uses, like, they have the, I can't remember what they call it now, it's like the account key, something like that, um, used to be called the secret key, uh, and that's like basically a randomly generated password, That you have to store somewhere. Um, they suggest you print it out on a piece of paper And it's also stored on all of your devices and then they combine that with Your master password the the main password that you remember and together They form the encryption key that actually decrypts your your your vault so, um I don't think apple has anything like that

Collin:

yeah. Well, they,

Joel:

having, having the security beyond the password that you remember for encryption, if that makes sense,

Collin:

yeah, I think that, I mean, there is no way to get to that data if you lose that password, but yeah, they don't have like a second thing other than like two factor.

Joel:

unless, unless you can brute force the memorized password, right? Which if you can memorize it, you can probably brute force it.

Collin:

That's

Joel:

And unless you're, you know, remembering a very long password, the thing I loved about 1Password. 1Password. Is, and I still use one password I think is great. I just don't like the app. Um, is that you, it, you absolutely couldn't brute force it because like, unless you had someone's device and it was unlocked and you had access to this account key, or you had the piece of paper that had the account key written on it, cuz then you could brute force the, the bit that you remember. Um, but yeah, I, I'm, I'm interested to see like what their approach is to that.

Collin:

Yeah, I would have to look into it. I do know, I mean, I assume it's reasonable, but, Cause like, Apple,

Joel:

don't know.

Collin:

Apple takes that stuff pretty seriously.

Joel:

kinda, but also, they kinda don't. Like, the way that they encrypt messages, uh, like, it doesn't, I can't remember the specifics now,

Collin:

It's that, uh,

Joel:

it doesn't have perfect forward secrecy. Is that right? So, so basically they, they do an exchange, they exchange encryption keys, and then every message is encrypted using the same key. I think it's something like that, whereas, um, with Signal, um, it has basically two mechanisms. It has, uh, every time that you receive a message, you hash forward the key that you have. And every time you send a message you hash forward the key that you have, so you'd start with an encryption key. Then you hash that encryption key and throw away the old one. And you just do that on both sides. And then every single message you send is sent with a different encryption key that's hashed forward. And then the other thing that they do in Signal is for every three messages that are sent back and forth you're actually exchanging an entirely new key. So, um, like it's that, it's that kind of thing that I don't think Apple are doing anything, anything close to that.

Collin:

not. I think, They may have changed this. I think maybe they did, and it was announced, um, that at least it used to be. I think that, uh, you were end to end encrypted with messages, but if you used iCloud key chain, that was not. But I think that might not be the case anymore. I think they might have recently, uh, changed that. And so, uh, yeah, I would assume. I mean, any kind of security stuff you do right, uh, to be more secure is going to be like a balance between. I mean. convenience and, uh, security, right?

Joel:

hmm. Mm

Collin:

And I think the balance for an app where they're basically only selling features, security, like, like, uh, the one you just mentioned signal, um, to me, like, of course, you know, uh, they would err more on the side of security than convenience. Uh, Because that's the only reason they exist. Um, you know, Apple's going to have to be a different place. Cause I don't think you can put something like signal, uh, in front of every consumer, but you know, I assume it's, I don't know one, I don't think anybody's trying to hack me. And two, I think that, uh, you know, I think it's reasonable. I think if somebody gets my password, it's cause I got fished or something,

Joel:

I mean,

Collin:

never happened that I know of.

Joel:

it is like, it's not like they're, they're able to just like go and look up and read your messages in plain text, but, um, I, I think that they could be. Like using, like, there is no reason why they couldn't implement the signal protocol for iMessage, for example, rather than hand rolling their own, you know, public key based, like, simple encryption

Collin:

Yeah. Yeah, they definitely can't just read your data. I don't think very easily. Um, and also just like company wise. I know from experience that they take that part very seriously. Like if you are an app developer, right? Like on reminders, we could not have said like, like we were working on trying to fix very specific bugs for certain things. We could see that there were, we could see like there were issues, but If we got to the point where we're like, all right, can we get the user data to do this? We had to figure out a way to, uh, like encrypt it. So it made things like, uh, I think we wanted to do something with machine learning at one point. Uh, and the best way to do that would be like get a lot of data. Because the idea I think was probably something like suggest the thing that they would have done next or whatever. Uh, usually. And. You need, you know, for machine learning to do that, you need a lot of data. And I think we tried things like, I don't, I might not be remembering exactly, but I think we tried things like we would encrypt the reminder titles and all of that. And then. Uh, so we just have like a hash or whatever, and then we would try and do something to like determine patterns or something like this, and that did not work at all as far as I remember

Joel:

Well, that, that wouldn't work from a security... Like perspective either if you if you can determine patterns about the hashed encrypted

Collin:

oh, this wouldn't be to be stored. This would be internal to build the model.

Joel:

Oh, I see.

Collin:

to get that data we couldn't just and this is only for internal users even so like people who work at Apple We could not even just for people who work at Apple be like, can we go get this data? They'd be like you have to how are you gonna anonymize it? How are you gonna whatever and then you're allowed to have it for this long and it would be like two weeks It'd be like a really short time. Uh, and so they take that part pretty seriously, too But yeah, I don't know. I yeah, maybe they could just do what signal does I don't know enough about

Joel:

it's certainly for messaging. I think they could. The problem with their thing is if someone gets access to your phone for a few minutes. Okay. and are able to get hold of your encryption key for iMessage, right? They can not only read all of the past messages that you sent, because there's no hashing forward at all, right? So if they've if they've recorded over the wire, encrypted messages, and then they get hold of your key, they can decrypt all historic recordings of your messages based on that key. And then, they, what they can also do is continue to listen to these encrypted messages being transferred, and, and decrypt them going forward. So the, the, the two mechanisms I mentioned. That signal has, it means that you couldn't go back even one message and you could only go forward at maximum, like three messages because they, they do a new Diffie Hellman key exchange like all the time. So. I think, I think that that kind of thing, like they, they totally could do. But I, I, I'm not trying to like dig Apple. I think they make significantly more effort on this kind of thing than any other big tech company, like massively more. Um, I love that how, like when they do machine learning, that kind of thing, it's always on device. So for example, like finding people in your photos, they. Like all of the face recognition and everything is done on device. I think that's such a great idea. They also have essentially all of these wonderful, like very, very excellent pieces of hardware around the world that they can use to do that. So they don't have to run it on Linux servers. Um, so I think that's pretty awesome. I love the idea of like, when your laptop is asleep, it can be processing and like doing machine learning stuff for you in the background.

Collin:

Mm hmm.

Joel:

Um, And also, I think,

Collin:

cause they also built into the Apple Silicon, like they have cores that are for that or whatever.

Joel:

and they have efficiency cores, right, so

Collin:

they able

Joel:

they can even, like, take all night to do something, but not use very much power because there was no rush.

Collin:

Yeah, it's pretty

Joel:

Um, I think that's awesome.

Collin:

I mean, I think the Apple silicon stuff is so cool. Uh, just that, you know, I don't know. It makes sense for them because they were implementing back when they had like the T2 chip or whatever. Um, like that seemed more complicated, uh, than just having, you know, a system on chip that you make. Um,

Joel:

Yeah, it also means, and I, I hope that they do this, um, I think they might have even announced that they're going to do this, But it means that, like, they could encrypt everything that goes into iCloud. Like, your photos could be encrypted in iCloud, and then they're just decrypted on the device that you have. Because that's where all the processing happens.

Collin:

They do some

Joel:

one else could do that.

Collin:

Yeah, yeah, yeah, for

Joel:

Like, there's, there's no way Google Photos could ever do that. Because all their, all their AI tech is built around... The cloud, and not around, and this kind of ties, ties back in with our like, cloud, leaving the cloud conversation, but,

Collin:

Yeah, I mean notably Google stuff with things like if I type in dog and I want to see dogs to my photos

Joel:

yeah,

Collin:

it works a lot better. I think because they are training against millions and millions of users, but Yeah, so that's the tradeoff, right? Like Apple stuff is like 80% as good at that. Usually I feel like, but it is, uh, much more secure. So it's like, you know, what do you care about? I guess.

Joel:

right, they must do, they must do their, like, train their models on some, like, set of images that they've collected, but not, like, not from customers, I guess, from,

Collin:

No, there's, there are sets I think you can buy. Uh, you can pay like you can pay for to train your models. I'm pretty sure that's what they do.

Joel:

right,

Collin:

Yeah.

Joel:

yeah, cool, Mm hmm.

Collin:

yeah, machine learning is neat. It's. It seems it's, it was easy for me to do the like, Oh, here's a cool trick I could do when you have, uh, like in the little class I took with them where it was like, you know, all kind of prepared data. So it's like, Oh, it's like magic and then actually trying to do, it feels much more difficult.

Joel:

hmm. Yeah. Yeah, have you, have you ever, um, written any, like, basic machine learning algorithms?

Collin:

no, I

Joel:

Like, done anything like that? I, I've...

Collin:

like a heuristic kind of thing

Joel:

Uh, I'm not

Collin:

tracking patterns,

Joel:

Yeah, that, I guess so, yeah. I, I remember I did read... I read a book on Swift.

Collin:

hmm.

Joel:

Um, and... I don't really know Swift very well at all. But I did read this book, and it was like, basically, an introduction to the Swift programming language by showing you a bunch of different, like, computer science y things, and there was some machine learning stuff in there that I found very interesting. I can't remember at all how it works, but,

Collin:

I remember this. Was it in a Swift Playground kind of thing?

Joel:

uh, I'll try to find it on

Collin:

Yeah, yeah. Um, because I remember it made my...

Joel:

book.

Collin:

Okay, it was definitely a different thing, but I had a Swift Playground thing where they were like, we implemented, you know, a neural net in Swift Playgrounds or something. Uh, yeah, um, yeah, stuff's all very cool. It doesn't, uh... I mean, it doesn't seem like there's a lot of Ruby things for it. It seems like it's mostly in Python. Um, but, I don't know, kind of a shame, but also maybe not, I don't know, not such a big deal. Uh,

Joel:

I kind of do, I, I do want to spend a bit of time, like, just seeing if you can build like a very basic version of something in, in, like some kind of machine learning thing in Ruby, just to get a better understanding of how it works, because I don't really understand how these things work at all.

Collin:

I mean, I don't think, I mean, isn't the thing that like the people who make them don't always understand exactly how they work.

Joel:

They don't understand why they work, but they understand... Like, these are the data structures you need, and you need to, like, pass them through these all of these methods. And you end up with this model, and if you, like, do certain things with it, it produces this result. They don't know why, necessarily. Yeah.

Collin:

Yeah, that's, I think that's right. Uh, well, Jupyter, I mean, if you wanted to play with machine learning stuff, but use Ruby, like Jupyter notebooks, I think can do Ruby and it like translates somehow it has some kind of a bridge, I think maybe, um, if you wanted to write a machine learning algorithm in Ruby, I have no idea. I'm sure somebody has done that, that you could probably find prior art to, to look at.

Joel:

Yeah. I think there are, like, bindings out to various different machine learning libraries that you can use in from Ruby. But, um... It would be, it would be interesting to actually just try to write some very basic stuff in Ruby, just as a learning thing for me. Um, the, the book I mentioned, um, it's Classic Computer Science Problems in Swift, uh, that I read. And I just remember it had a few, like, a few, like, interesting machine learning algorithms in there. Um, and, and it, because it's a simple, small book, they were broken down, so they're so small.

Collin:

I love small books.

Joel:

yeah.

Collin:

I wish every program book was less than 200 pages. I'd read a lot more of them.

Joel:

Yeah, I don't, I, I really like the long programming books if they, if they are interesting, um, I think there's a place for a programming book that kind of, I guess, keeps you really engaged and, um, walks you through something, but then there's also a place for a programming book that is more of a reference thing and just covers everything, um, there are some books I wish were longer. Like, uh, the book that I typically go back to for reference for Ruby, um, is a book called The Well Grounded Rubyist, and it's a great book. This book I wish was bigger, not

Collin:

Hm.

Joel:

Like I, I want it, I want it, this is the book to, that to me covers, is meant to cover everything you can do in Ruby, right? And like, I don't necessarily want to read the whole thing through, I have. But. Um, that's because I really want to learn everything there is to know about Ruby. But, um, every language should have this kind of, like, reference book, I think. And, um, that one could be huge, as far as I'm concerned.

Collin:

Yeah, I mean, I think you can have different book, a couple books for different people, you know? Like the C programming language K&R book is like 180 something pages long and it covers The whole language at the time that they wrote it and has a lot of examples and things

Joel:

Mm hmm.

Collin:

You know, but there are also books on C that are like 700 pages long. So Probably for different people, right?

Joel:

Yeah.

Collin:

So I need I want to put a sound effect here, I don't know if I will but A new, A new literal feature just dropped recently. Hm. Mm hmm. Mm

Joel:

Yeah, I mean, this one's very, very, very basic. Um, I have... So I've been implementing... Well, I've been, I've been using literal at work and converting a bunch of different things to, to use it, um, went out to like something like 750 uses of the literal, literal attributes things. Um, but there are a handful of classes that have like manual initializers still. And one of those classes was, um, uh, decorator. And basically it. It's a class that inherits from SimpleDelegator, and it would take the, as an argument to the initializer, the object to decorate, and then it had some, like, additional, like, arguments that the decorator needed to store. And so the implementation was basically define initialize to take the object and these arguments, call super with the object, and also set these other arguments into instance variables. That was incompatible with literal attributes because you can't call super with a specific subset of parameters when literal is defining your initializer. So, um, yeah, I, I added literal decorator to literal itself. Uh, that basically uses literal attributes to set that object. Um, so you can then just like define additional attributes and it kind of plays nicely. Um, the advantage though is Um, you can actually, so the way you use it is you, you, you would say like class, uh, you know, thing decorator, and then you inherit from literal decorator, but you then, in parentheses, say the type of the thing that you're allowed to decorate. Um, so it's like using a generic type, and then that actually causes a... Class to be generated that has the attribute for the object that is like specifically typed to that generic type that you set. So you can say, I'm only interested in decorating things of this type. And then, um, it will make sure that if you try to create one of those decorators with a different Mhmm.

Collin:

Mm hmm. Right. That, that makes sense. Um, well that's cool. And I think that kind of leads into another thing I wanted to ask you about. Which is, uh, I've been reading this book. Uh, it's an older book, I guess. There's a lot of really good Ruby books that were written like ten years ago. And... I don't know if people sleep on them, but I feel like maybe they do, which is that, you know, like it's basically all still valid and kind of works. Um, like it hasn't, language hasn't changed that much. And it's, you know, it's things like where you can leave out like the, like the, when you do like the keyword argument, if you have a variable name, the same thing, like you can leave it out. Like, it's a lot of stuff like that, that is different from these books that I found. And that's pretty minor. Um, So I've been reading this, uh, metaprogramming Ruby book, and the reason I wanted to ask you about is this. I get, like, there's not anything in here so far where I'm like, oh, I didn't know you could do that at all, right? Like I see it and I'm like, yeah, I understand that you can do that, but it seems as though that sort of thing, right? Uh, things classified under. The category of metaprogramming is a tool that you reach for more naturally, where like, I don't always jump, I, I don't always see it, I feel like as much as you, and I was, I was curious, like how you built that sense and how you know when to apply, you know, apply that versus do something else.

Joel:

That's a, that's a really good question. I think. I think it's like a gradual thing, um, and I guess you need to have several different things in place. You need to know these features exist, um, like pretty fam like, they need to be pretty familiar. Um, so, learning, like, reading, reading a book like The Well Grounded Rubyist, for example, that highlights all of these features, uh, and, for example, tells you, You know, these are all the hooks that you can use, like, like a hook for when a class is extended by another class, or when a module is included into another class, or into a class, or something like that. Um, like, having just a kind of vague awareness of all of the features, and what they could do, like, in there, and then, How you apply that to a problem, I guess is, is kind of like the way I always approach it is just, Oh, I wish I could do this and then look at the code and see, is there a way I could make that actually work? Or like, maybe I'll have to tweak it just a little bit, but usually you can just, you can kind of just write the code that you want to write and then, and then try to figure out like, well, in order to Have, like, I don't know, this thing, that object needs to respond to that because I'm kind of calling a method here. Right. Um, and I kind of just try to do that and it's, I don't know, I don't know if there's anything, anything else to add to that, except the more you do it, the more you kind of, I don't know, get, get a sense of, of what might be possible.

Collin:

Yeah, I think this is an area where, uh, working in other languages previously and more that have, you know, some support for some of this stuff, but like Ruby has like a lot of support for metaprogramming and it's very easy to do in Ruby. Um, like Objective C had, I think, pretty much all the same stuff, but it was not. Are a lot of the same stuff, but it was not, um, you know, it was not easy to do. You had to like, you had to import like there's a runtime file that manages, you know, runtime. h that manages the, uh, is the header that manages the runtime, uh, you know, it's where that code is. And so there is an API for that, but it's all in C. It's not Objective C. So there's not. You know, you, there's not something just like define method, whatever, and then like, do it, you have to do all of this and see, and it's sort of, it's sort of difficult, um, and people tended to stay away from it, uh, and so, yeah, I think maybe coming from languages where some of this was less common is probably why, like, my brain doesn't always connect to it immediately, like, I just think of a different way you would do it,

Joel:

Mm-hmm.

Collin:

and what's funny is that there's, But there's still aspects of metaprogramming that I will reach for a lot, because I think that those are the parts in like Objective C or whatever that were, that you could do just as easily or close to, and so like those I will think of a lot. Um, so, I don't know, that's, I'm going to keep reading this book, maybe I'll finish it in the next week or two. Um, I don't think I'm as fast of a reader as you, but maybe I'll, I'll finish it in the next week or two, and then we can, we can talk about it more. And maybe we could, um. I mean, you're a pretty good resource, but maybe we could find somebody else who, who is maybe we can find the guy who wrote this book. I don't know. Um, you know, somebody like that who's, uh, you know, written about this a lot or something and then talk to them. Um,

Joel:

Have I told you I'm working on a metaprogramming book?

Collin:

you have, and I was going to say, I'd, I'd prefer to read yours cause you wrote it, but, um,

Joel:

still a long way from being

Collin:

yeah, it doesn't exist yet. So that's, that's the main issue. Yeah. Mm hmm.

Joel:

The, the thing that I'm trying to do in, in my book is, first of all, provide very similar to what already exists in this, um, other book you mentioned, um, metaprogramming Ruby, um, which is like a reference for all the things you can do. Um, but more up to date, but I think with, I think there are a few more, like, ways of showing, ways of, like, integrating multiple techniques together. Like, if you use this technique with this technique with this technique, you can do this thing together that's, like, actually really, really cool. Um, so trying to, like, one part of the book is actually just... me going around and finding all of these examples that I see in, in code, and then I just add them to this folder in, um, in Ulysses. And the idea is that eventually I should be able to hopefully organize them into some sort of cohesive collection. Um, but yeah, it's, it's, it's, it's a lot of work. Writing a book is incredibly difficult.

Collin:

I, okay.

Joel:

I don't know if it's for me, but I'm, I'm trying.

Collin:

I can get up to about five or six hundred words in a blog post, and I kind of peter out, um, so I

Joel:

I'm really struggling with is how to structure it, like, especially when you have a lot of different concepts that depend on each other. So, like, trying to, it's trying to figure out, like, what is the, the concept I can start with that doesn't have too many dependencies, and then gradually work up and build up until... Um, you know, the concept you're trying to explain is built based on ones you have already explained as opposed to ones that you have yet to explain. Um, but yeah, I'm, I'm excited to, to try to, to do this, but, um, yeah, there's, there, there are a lot of things that are not covered by this metaprogramming book that I think kind of, sort of count as metaprogramming, um. So one example is like coercion duck types, as I've called them, um, and this is like if you put a star behind something or two stars behind something or an absence behind something, that thing is then coerced into a hash or a proc or an array. Um, And there's, there are methods that you can use to make your object support that, right? So as long as you implement to proc, then whatever object you have, uh, you can put an ampersand behind it and, and pass it into a method as a block. Um, and I think this is kind of, I don't know, it's, it's hard to say whether that's a metaprogramming technique. It's certainly something you can do to provide a really cool interface for your, for your object.

Collin:

I mean, it seems

Joel:

or like an object that, yeah, yeah, yeah, it's, it's totally metaprogramming adjacent. Um, like custom enumerables, not really metaprogramming, but, but also like really underexplored, I think, in, in books, um, on programming, that kind of thing,

Collin:

Yeah, it's, um... Yeah, I'm, I have faith in you, you could write a really good book on this, but also, yeah, I'm sure it's really hard. Uh, I've never, I think I was contacted once to update a book, or help on a book, and I became aware of how much work it was going to be, and I immediately told the publisher, people, like, very early, like, in like, after like one meeting, I was like, I don't think this is for me.

Joel:

yeah,

Collin:

This seems like a lot. Um, I think it was also on a topic that I wasn't very familiar with. It was like something with the game programming or something that it's like. It wasn't like really up my alley. So I think it also that might have been the reason why.

Joel:

I think if I ever had a, an opportunity of like, A few, like, several months where I'm not working, and I could just, like, focus on it, I think that would be much better. Um,

Collin:

yeah, an opportunity.

Joel:

well, like, this is what happened when I got laid off from Shopify, and I was able to, like, I spent, like, seven months, basically, full time working on Flex. And, um, if I was able to do that with a book, I think I'd be able to do it, but, like, it's... Yeah, finding time outside of, outside of work to actually work on hobby projects is incredibly difficult,

Collin:

Yeah, for

Joel:

moment.

Collin:

For sure. Um, it's incredibly difficult no matter what, actually, because, you know, motivation is hard. Um, and I dunno, it's, yeah, it's, it's difficult, I think. Um, what else did we have? Do we have anything else? I mean, I think that kind of covers that stuff. I had one other thing we can talk about next week. Um. Oh, you and I have some emails going that we don't have to get into the details of, but I think there's exciting, exciting ideas afoot, uh, for some guests and some other stuff. So, uh, you know, I think we'll have some really good guests on soon in the next few weeks. And, um, that we've been lining up, uh, which is great. And also, uh, you know, maybe other stuff where we have to, we have to see that will be cool. Um,

Joel:

Yeah, this kind of goes back to the not having very much time. We, um, at the, at the start of the show, I think we made a bit more effort to try to line up guests. Um, and... Then lately, no, I also, we were like ahead, we had, we had a couple of episodes banked, and then I went on holiday, and we ended up getting behind, and we like, we were a few days late on releasing something, and now it's basically like, every single week, we

Collin:

Yeah, we do it, and then I

Joel:

and we're like, hey, so what are we gonna talk about today? Um.

Collin:

I mean, I've been, I have been like making a little outline of like, here's some things we can talk about, like, before we talk. And I do think that I think it does make the show better when we do that, um, versus not having literally anything, uh, you know, but that's, that's the thing about something like, uh, you extemporaneously and that sort of thing on a podcast, which I think we've both gotten like A lot better at, right? Like we're both pretty good at it now. Um, and that, you know, it takes practice, you know, uh, yeah. And scheduling is hard, but, um, you know, I just put something out of mass on though, on the other hand, and we have like You know, two to four that are like, you know, we can get in probably soon. So it's also not that hard if I just like do a little bit of like work. Um, but anyway, uh, so yeah, that's all going on. And then, uh, yeah, I guess besides that, you know, if you like the show, please hit that. You know overcast star tell your friends on twitter or you know mastodon I say twitter because we aren't on twitter. So we need other people to do it for us. Um, so we can become a sensation Uh, I don't know how many people are on twitter anymore Um, I heard it dropped a lot But uh in the meantime, you know, I don't know just tell people about the show. It's a really good show And we will talk to you next week.

People on this episode

Podcasts we love

Check out these other fine podcasts recommended by us, not an algorithm.

Fresh Fusion Artwork

Fresh Fusion

Jared White
Ruby for All Artwork

Ruby for All

Andrew Mason & Julie J
Code with Jason Artwork

Code with Jason

Jason Swett
IndieRails Artwork

IndieRails

Jess Brown & Jeremy Smith
The Ruby on Rails Podcast Artwork

The Ruby on Rails Podcast

Elise Shaffer and Brian Mariani
Remote Ruby Artwork

Remote Ruby

Jason Charnes, Chris Oliver, Andrew Mason
YAGNI Artwork

YAGNI

Matt Swanson
GemRuby Show Artwork

GemRuby Show

Lucas Barret
The Bike Shed Artwork

The Bike Shed

thoughtbot
Rubber Duck Dev Show Artwork

Rubber Duck Dev Show

Chris & Creston