Episode Transcript
Available transcripts are automatically generated. Complete accuracy is not guaranteed.
Speaker 1 (00:01):
Hello everyone and
welcome to another episode of
Code and the Coding Coders whoCode it.
I'm your host, drew Bragg, andI'm joined once again by Mr Joe
Mazzalotti.
If you haven't listened toJoe's previous episode before, I
highly recommend you go backand do that.
But for anyone who hasn'tlistened to that episode and
doesn't want to go back now, Iwill have Joe do a quick
introduction For anyone new tohim.
Joe, please introduce yourselfto the listeners.
Speaker 2 (00:24):
Hi everyone.
My name is Joe Mazzolotti.
I am a Hotwire Native developer, consultant, content creator I
guess you want to call it that.
Do a blog, youtube, all thatstuff, newsletter.
And I just got back fromspeaking at RailsConf on a
workshop and will be also atRailsWorld doing a talk on
(00:44):
HotWire Native there as well.
Speaker 1 (00:46):
So Joe knows how this
works, since he's a repeat
coding coder, but anyone new tothe show.
The way this is going to workis I'm going to ask Joe three
questions.
I'm going to ask him what he'sworking on, what kind of
blockers he has.
If he doesn't have a currentblocker, he can talk about the
most recent blocker he had andthe steps he went about to solve
it.
And then the last question, mypersonal favorite, is what is
(01:06):
something cool, new orinteresting that you've recently
learned, discovered, built?
It doesn't have to be codingrelated, but this is code and
the code encoders who code it.
So it totally can be Withoutany further ado, because there's
lots to get into with you.
Always, joe, what are youworking on?
Speaker 2 (01:23):
So, the stuff that
just finished, which I'm super
excited about, is my book onHotwire.
Native is with the not the copyeditors, but the layout editors
right now.
So that is the last step of thebook before it hits the printer
and on Monday I'm supposed tohear back from them.
(01:43):
I give them one big thumbs upthat everything looks good,
unless I find some minor tweaks,and it goes to the printer on
Tuesday or Wednesday of nextweek, which is really exciting.
It's been two years since Istarted writing that, so that is
kind of the big relief there,which has been fun.
But what I'm working on now issomething called Ruby Friends.
(02:06):
It's rubyfriendsapp and thiswas inspired from RailsConf.
Everyone had their badge atRailsConf that had a little QR
code on it, which I thought wasawesome.
It was like scan this QR code,maybe get someone's email
address or social profiles andstuff to keep in touch.
But the way that it wasimplemented by the badge maker
(02:28):
or whatever was that it openedup your address book with that
person's phone number and it wasjust a little too much for me.
It was a little too aggressive.
Like I met someone for thefirst time six minutes ago, I
don't really want to add yourphone number to my address book.
Sure, that's a littleaggressive, so I didn't end up
(02:51):
using it very much.
But I realized that I saw peoplescanning the QR codes the whole
time and then kind of gettingfreaked out.
So I was like, well, what ifthis was just a little bit
lighter touch?
What if, when you scanned a QRcode, it was a couple of links
that you provide, maybe asentence about what to talk to
you about at the conference,your picture, so people remember
who you were when they see youthe last conference you were at?
Like things like that.
(03:12):
That would just help fosterrelationships a little bit
better and kickstart them pastthat awkward icebreaker phase
where it's like hi, I'm Joe,what do you want to talk about?
And it's like, oh cool, it saysright here that you like here
that you do cool stuff withSQLite.
Tell me about that.
(03:32):
And now someone's five layersdeep and you just met this
person.
So I'm building that.
It's a Rails app, ios app is inthe App Store and working on
Android now, which has beenreally fun.
Speaker 1 (03:39):
Yeah, I think that's
a great idea.
I mean, the Ruby community isawesome.
There is always that little bitof awkward.
How do we start thisconversation?
But to a lesser degree in theRuby community, because we're
all just friendly, yeah, but itis, without a doubt, the number
one question that comes upanytime.
New people are like we ask hey,what do you want to know about
(04:01):
going to conferences?
New people are always like well, how do you talk to people?
How do you know what to talkabout, how do you engage?
And it's like well, this soundslike a perfect solution to that
.
It's like these are the thingsto talk about with me.
And I really like that lastconference idea too, because
that's a really good way ofgoing.
Where do I remember you from?
(04:21):
And, instead of having thatweird back and forth, be like oh
, I remember you from thisconference where we talked about
X and that is a very cool idea.
So was that just an experiencethat you had with RailsConf, or
was that people talking abouttheir experience?
How did that idea go from?
Meh, okay, this is a thing tolet's build an app.
Speaker 2 (04:44):
It was primarily from
me being from scanning
someone's qr code and just beinglike I want to keep in touch
with you but I don't want tocall you or text yeah, sure, I
want your email address.
I want to follow you on twitteror whatever.
I want to maybe connect withyou on linkedin, and I saw
people doing it at theconference, like scanning QR
(05:06):
codes and being like, oh, itgoes to my address book.
It showed the exact emotionsthat I was feeling from it of
this is done well or this is theright approach, but it's
implemented the wrong way.
For me, for developers Likemaybe at a business or a sales
conference, a phone number isthe right choice, but as a Ruby
developer, I'm not texting myRuby friends, right.
(05:28):
I'm talking to them over emailor on Blue Sky or tweeting at
them or something about aquestion that I want public.
It's a different relationship.
And if it goes six months ayear and I'm still still talking
to that person, like, yeah,maybe then I'll text them or
whatever, but that's not.
I just met you, let's do this.
(05:49):
At least that's how I felt.
And yeah, as of this morning,there's over, I think, almost
like 400 profiles on the site,which is really exciting, and
people are using it.
For someone used it at a localmeetup the other night, which
was fun.
I ran a local event in Portland.
That was, the four of us justgrabbed a coffee and one person
was already on it, which wascool.
They like scanned my QR codeand then someone next to me I
(06:12):
scanned theirs, and then thefourth person created an account
and we all hacked on some NFCscanning for the app together as
well, which was really cool.
So the idea is like, instead ofa QR code, you could actually
just tap your phone to a badgeand it would open in the app
that person's profile, which iswild because you don't even have
(06:32):
to like unlock and open thecamera and point it.
It's just like you just tapsomeone's badge and you have
their profile right there.
So it's even less friction thana QR code.
I'm excited to get that outbecause I think it's something
that is unique on the market.
These exist, these make afriend at a conference type
things, and they're mostlycentered towards sales folks and
that type of conference, butthere's nothing specific for the
(06:53):
developer or even the Rubycommunity.
Speaker 1 (06:56):
I'm sure there's a
lot to it outside of just cool.
We have an idea for an app andwe build the app.
And now what that would bewhere, like, yeah, I can build
this, but getting it intopeople's hands I feel like
you're almost the right guy todo that.
You have a fair amount ofexperience building stuff and
(07:17):
then getting it to people.
Last time we were on the show,you were doing Rails devs, which
was pretty successful.
You got a lot of people hiredthat way, and that was really
cool.
You got a lot of people hiredthat way, and that was really
cool.
You want to talk a little bitabout what happened to Rails
devs and anything you learnedfrom doing Rails devs that you
think you can apply to RubyFriends.
Speaker 2 (07:36):
So Ruby Friends
started as a for fun thing.
Maybe there's an angle that Italk to conference organizers
and they pay to have itintegrated into their badges or
whatever, but like right nowit's kind of just a for fun
thing for the community.
Maybe it'll be open source, I'mnot sure.
Rails devs was more of abusiness and for those that
(07:58):
haven't heard earlier this week,so the end of July I shut down
Rails devs.
I announced that it'll beshutting down and on August 15th
it will be no more.
The decision to do that afterrunning it for over two years
almost three years there wasreally hard.
It was a really hard decision.
But I did it for two bigreasons.
(08:21):
The first one was that when Ilaunched Rails devvs we were in
a very different market withhiring, especially in the Ruby
community and the Railscommunity, and there were more
developers than there were jobsto get their profile in front of
(08:47):
businesses and for businessesto save money on hiring fees by
just finding the person andconnecting with them and then
taking a small cut instead of a25, 30% cut that a recruiter
would.
And the market has changed.
There are way fewer Ruby andRails jobs out there right now
for full-time gigs and thebusiness model of RailsDevs was
to take a hiring fee percentageto keep it afloat.
And it made good money.
(09:07):
It made over almost $250,000 inthose years.
It was no joke.
But the problem now is that toshift it towards where the
market is, which is morepart-time and consulting and not
W2, but 1099 employees.
I don't want to shift thebusiness model and try to
pigeonhole all the developersthat are in it looking for
(09:28):
full-time work to then be justexpected to do part-time work.
And it felt dishonest for me tokeep it running when there
isn't a paid customer.
This month, for the first timesince the business started, this
is the first month that itwon't bring in revenue.
In all the years that I've beenrunning it, every single month
I've had a paying customer or asigning fee, and this is the
first time that no one is paying.
(09:50):
So I was like, okay, if I'mgoing to do it, now is a really
good time, because this is theleast upset people are going to
be.
So that was the big reason.
The second one is that, even ifit didn't take a lot of time
for me to manage and run, itstill took non-zero and I don't
want to focus on something thatis not best for the users that
are using it anymore and notbest for me.
(10:12):
So I'm focusing on whatsupports my family and what
brings in money, which is myconsulting business, my bridge
component library that's paidand the book and all that stuff
things that actually can supportmy family, not I have and don't
want to get rid of.
Speaker 1 (10:28):
It is definitely
something sad to see go.
I'm sure even more for you,having built it from nothing,
but totally understand thereasonings and the rationale
behind shuttering it.
What are maybe not businessmarketing, since they're two
different apps, but going fromno one knows what Rails Devs is
(10:50):
to people are using Rails Devs.
What are potentially some ofthe things that you learned that
you think might help make Rubyfriends?
I mean, you said there'salready people using it and
there's already people on it, soyou already have some
visibility there.
But is any of that because youalready know how to market from
Rails devs or is it more organicand here's things that you
(11:11):
might do?
Is there any crossover there?
Speaker 2 (11:14):
I think that one of
the things that really helped
with getting Rails devs off theground was that folks could
create their profile and shareit with the world.
And the same thing is happeningwith Ruby Friends.
Developers are getting in there, they're adding their profile,
they're adding all their linksand they're saying here's my
Ruby landing page, essentially,and they're posting it on social
(11:35):
media.
They're putting it in their biosometime, which is really cool
to see.
And something very similarhappened with Rails devs at the
beginning, where developers werejust so excited to have a
public profile for this type ofstuff.
Obviously, the goal there wasdifferent, because they were
getting hired right.
The end goal was that they weregetting hired.
The end goal with Ruby friendsis that they're going to have
(11:57):
friends at conferences.
For some folks, that's waybetter someone who's happy at
their job.
It's interesting how the marketis bigger for Ruby friends than
it was for Rails devs, and notjust because it's Ruby versus
Rails, but because everyone whois in the community could be on
Ruby friends.
Only folks that wanted a job orwanted to get hired or didn't
(12:20):
you know, were okay, their boss,knowing that they were looking
for work, could be on Rails devs.
So I think that the market isactually bigger, but is there a
way to monetize this and turn itinto a business?
I don't know.
I have a lot of ideas.
We'll see.
Right now, it's just been a lotof fun.
I want to get all of thefeatures on iOS and Android out
(12:42):
the door.
I've only been working on thisfor like three weeks at this
point, so it's been fast Redscumwas not that long ago.
Yeah, if it ever becomes abusiness and I end up paying my
render bill every month, that'sfine, but I've already used it
myself and gotten value from it,so I broke even there already.
Speaker 1 (13:01):
I know you've talked
a lot about in your own social
profiles.
I've heard you on otherpodcasts talking about it, so I
don't want to rehash thoseconversations completely, but I
would be remiss if I didn't justask about the book.
I'm excited for it.
I think it's the end of august,right that it should be
(13:24):
physically going out.
I have it on pre-order.
I'm excited because I'm stillphysical books.
I've tried eBooks.
I just can't do it.
I've tried so hard.
Very excited for it.
So you've been working on itfor two years.
What has been, I don't know,the most challenging, the most
rewarding, the most interestingpart of writing a book, this
(13:46):
book.
Speaker 2 (13:48):
The most interesting
thing is working with Pragmatic
Bookshelf.
They're my publisher for thisand one of the most interesting
things is that I write the bookin Markdown with some special
XML tags the PDF, the webversion, the physical print book
(14:16):
and they have this hugeproprietary thing that I can't
really even say more of about.
It's like under NDA.
It's wild.
But what's been so fascinatingfor me is that I've always owned
my own tool chain.
I've always published to a blog.
That's like written with Jekyll, or I'm doing button down for a
newsletter and it's just markeddown or what have you To have?
To use someone else's buildchain and to use SVN versus Git
(14:40):
has been this like whole layerof what the F on top of writing
the book.
That has been really fun tolearn and pick up.
That's been really interesting.
The most surprising thing washow much of this book I had in
my head before I started writing.
I've been doing Hotwire Native.
(15:01):
I've been doing it for sevensomething years Hotwire Native,
Turbolinks Native.
When I started writing, thefirst six of 10 chapters just
fell out of my mouth essentiallyand into my hands.
I have been thinking about thisand writing about it and doing
this for so many years that Igot the first drafts of the
(15:22):
first couple of chapters done ina few months and everything
else was editing and screenshots.
And Hotwire Native went to a1.1 release during that time so
I had to redo an entire chapter.
Android Studio was updated, so Ihad to redo all my screenshots
like always things like that.
Ruby was updated four times.
Rails 8 came out, so likethere's all these things that I
(15:42):
had to do during the process,but that first just word vomit
of pretty coherent text was soinspiring to get me that zero to
one and I was in beta veryquickly, like compared to how
long I expected to be out of,like pre beta, like before
anyone could actually see it.
So I don't know if anyone'sthinking about writing a book.
(16:06):
If you have a lot to say andyou could write a lot about it,
like go for it.
Lot to say and you could writea lot about it, like go for it.
But I can't imagine taking anylonger than two years because I
am so ready to have it on mybookshelf.
Speaker 1 (16:19):
It's been so long.
So you just mentionedtechnology changes pretty
quickly, which caused a lot ofedits for the book.
What, if any, is the plan for,as Rails continues to release,
ruby continues to release Kotlin, swift, the other technologies
(16:40):
that are adjacent to the bookcontinue to grow.
Like, is it a okay, every yearwe'll cut a new release with
just a couple of tweaks, or isit no, you're on your own for
figuring it out, or we'll waituntil they're super major?
Like, is there a plan and, ifso, what?
Speaker 2 (16:56):
so prague's been
doing this my publisher for
decades.
At this point, like, yeah, likethey have their own plan for
like they're writing books abouttechnology.
They know this stuff changesand what we've decided on for
this book is that every timethere's a feature or like a new
(17:16):
language or framework or gem orwhatever introduced, there is a
version attached to it for thebook and the idea is that book
not in its current state, butlike that book with those
versions will always be correct.
Because you know that you'rerunning rails 8 0, not 8 1, not
8 0, 1.
It's like it's running rails 80.
(17:37):
Or you know, whatever theversion number is, we're running
hot wire native 1.2 on ios.
1.2.1 just came out, I thinkyesterday, and it doesn't
introduce a breaking changethat's related to the book, but
like, if you're on 1.2.1, well,you're not running the version
that's with the book.
So things might be differentand there's no guarantee.
(17:57):
So that's the first step.
The second step is whenbreaking changes are introduced.
Every single page has a link atthe bottom on the PDF to report
errata and that page will sayhey, here are all the breaking
changes since Ruby, whateverx,was released.
Here are the breaking changesthat Hotwire introduced at this
version.
(18:17):
You can also type in manuallyif you're on the physical book,
but there is a RADA that isreported, reproduced and then
outlined on the site, so that'skind of like a living document.
That's the stop gap for thephysical book owners until the
next version is released,because the PDF, if there's a
breaking change, the PDF willget updated.
If it's a couple lines ofdifference, like, we'll just
(18:40):
update the PDF and release a 1.1or whatever.
Long term, there will mostlikely be a second edition of
this book in maybe it's a year,maybe it's two years, maybe it's
when Hotwire Native 2 comes outor whatever, but I don't see
this being the last version ofthis book.
Speaker 1 (18:59):
How drastically in
your experience, since you are
the Hotwire Native guy, in yourexperience thus far, how drastic
are the changes when a newversion of it's a long list
right, it's Rails, it's Ruby,it's Kotlin, swift, it's the
Android Studio, oh yeah, x tools, I guess I don't know, I don't
(19:21):
do when those things change howdrastic.
I know you had to update thebook so that it was current, but
how much A whole chapter'sworth, a couple of pages worth,
like how drastic changes arehappening in this ecosystem yeah
.
Speaker 2 (19:38):
So let's start low
level and go up.
Ruby none like recent versionsof ruby.
There's nothing really fancythat's happening that I had to
change at all.
Swift is pretty stable.
There hasn't been anythingreally new there.
A bunch of new stuff wasreleased recently and like the
(19:59):
next one is going to be Swift 6,which breaks a lot of stuff
with concurrency, like twothings happening at the same
time and threads and stuff.
But I'm hoping that willactually all be handled
internally in like the Hotwirenative library.
So all you have to do is sayI'm running Swift 5 or Swift 6
and that'll be fine.
Kotlin 2.0 came out not too longago, so I made sure to update
(20:20):
to Kotlin 2, which was nice, andI did that before I started the
Android project, which may saveme a lot of configuration
issues.
But then we start to get to theones where actual changes were
made.
So Rails was updated a fewtimes during this and I don't
think I had any changes that Ihad to apply, which was crazy.
(20:41):
Like if I had created a projectwith a new Rails 8 generator, I
would have gotten like the PWAstuff and the authentication and
all that built in.
We're not doing a PWA.
I rolled my own authenticationto show the shortfalls of it and
how to improve it.
So that didn't matter.
And we're using Noticed forsending push notifications, so
(21:02):
the action notifier not that itdeals with iOS or Android like
wasn't an issue.
So the Rails update didn'treally matter either.
The Rails update didn't reallymatter either.
Hotwire Native was bumped from1.0 to 1.1, 1.1.2, 1.2.
(21:27):
Eventually 1.2 introduced awhole new layer of managing tabs
, so I have an entire chapter ontabs.
That entire chapter had to berewritten, the whole thing.
And like I knew that it wascoming, I built the Hotwire
Native one for iOS.
Like myself, as a maintainer ofthe library, I knew it was
coming, but I had to write it asif it wasn't out yet because I
didn't know when it was going tobe released.
So that was kind of rough.
But the worst part was that Istarted writing this book before
(21:50):
Hotwire Native came out.
So when I started writing thisbook it was still technically
Turbo Native.
So the pitch that I had toPrague was Turbo Native for
Rails developers, blah, blah,blah, blah.
So halfway through, maybe sixto nine months through writing,
the book, hotwire Native comesout, is public.
I have to not only rename allthe files, all the things from
(22:12):
Turbo to Hotwire.
But I have brand new conceptsto cover and things to explore
and that was almost a fullrewrite of the book because so
much changed from Turbo toHotwire In a good way.
I got to delete a lot of stuffbecause Hotwire Native handles a
lot of the stuff for you now.
In a good way I got to delete alot of stuff because Hotwire
Native handles a lot of thestuff for you now.
(22:33):
But I pretty much started over.
Speaker 1 (22:35):
Wow, that's wild.
Speaker 2 (22:37):
Yeah.
Speaker 1 (22:38):
Not fun, yeah,
especially with something like
as cohesive as a book.
You don't just write a chapterand then move to the next
chapter and the other chapter isjust gone.
You build on top of eachchapter.
Each chapter potentially canreference the other.
Any breaking change in achapter might influence
countless others, so that's wild.
Speaker 2 (23:00):
So a little bit of
insider knowledge here.
Each chapter adds a feature tothe apps.
So one adds authentication, Oneadds push notifications, One
adds modals and stuff like that.
But each chapter you'rebuilding one app, so you're
building on the previouschapters 100% Like.
You can't just open chapter sixand like do chapter six.
(23:21):
You could take the code fromchapter five because I have it
all public and you can justdownload the source code and
start there.
But you need that as a startingpoint because it's referencing
all the other stuff in the book.
As a starting point becauseit's referencing all the other
stuff in the book which made forthe first time in my life, my
Git history actually mattered.
I had to have perfect commitsbecause each commit said chapter
(23:42):
one, checkpoint one, blah, blah, blah, chapter one, checkpoint
two.
And then I had a script thatwalked through each of those
commits and created a snapshotin time of the entire code base
in a folder.
So if at any point in time youcould say, hey, I'm on chapter
four, checkpoint three, I openchapter four, checkpoint three,
folder.
I have the Rails app, the iOSapp and the Android app at that
(24:05):
current state that I can thenplay with or kick off with, or
compare it to, my local version.
So no matter where you pick upthe book, you can have a
reference point, but you've also, if you get stuck or have a
typo or whatever or misssomething, you have it all as
the safety net every step of theway.
I think there are 70 somethingcommits throughout the book.
So I got really good atinteractive rebasing.
Speaker 1 (24:28):
Really good.
I was going to say, if youweren't already, you got really
good with Git through thatprocess.
Speaker 2 (24:34):
A lot of interactive
rebasing.
Speaker 1 (24:36):
Yeah, it's funny
because you hear I'm writing a
book and you wouldn't think likeI'm also writing an app.
I'm also getting ridiculouslygood at Git.
I'm also learning SVN nowbecause why not when this
proprietary markup converter?
It's just because, why not whenthis proprietary markup
converter is just so funny to belike, yeah, writing a book, you
just write it, right, yeah.
Speaker 2 (25:01):
And that's what I was
like I wanted to do.
Right, I still, even though Ilearned all that and I had to do
all that, I still did way lessand focused way more on my
writing than if I'dself-published it, Because if I
self-published it, I would stillhave to do all of that, but
then I would also have to worryabout finding an editor and
finding a copy editor and alayout person and a designer and
publishing it and findingsomeone to publish.
(25:22):
All of these things that Pragueis doing for me, that I
definitely did not want to dealwith.
Speaker 1 (25:29):
I do want to change
gears a little bit.
You brought it up in your introyou just recently gave a
workshop at the last RailsConfon unsurprisingly Hotwire Native
, but you've also spoken atconferences before.
This isn't necessarily yourfirst Roto.
Was this your first workshop?
Speaker 2 (25:47):
This was my first
workshop at a conference.
Speaker 1 (25:49):
Yeah, okay, I know
you had done some workshops on
your own.
I was referring to conferences.
So I remember having theconversation with the program
committee about like hey, whattalks would make for good
workshops, and I saw yours andknow your experience.
Now I'm interested in real timelive, putting you on the spot.
(26:10):
What do you think about givingconference talks versus giving
conference workshops?
Speaker 2 (26:18):
I have a lot of
different points of view, so
I'll start from the audience.
The.
What I taught, I think, was waybetter for a workshop for the
audience.
They were able to follow alongand build an iOS and an Android
app in those 90 minutes and walkaway with something that they
(26:38):
had on their machine, that theywrote the code for, and that is
not what you can expect from atalk, no matter how good your
talk is Like, no one is going tobe live coding with you.
So, from an audienceperspective, I think that they
walked away with a ton of thestuff that, matt, like the
muscle memory they walked awaywith.
Oh, I actually feel comfortablein Xcode, or I know that this
(27:01):
little button is supposed to beover here in Android Studio and
not over there like in my IDE.
You know that I write my Rubyin, so I think that was
extremely effective for what Itaught, which was how to get
started.
I do think that they left withmore questions than when they
came, though.
Speaker 1 (27:20):
Well, I mean to to be
fair, it's a pretty deep topic.
I almost wouldn't expect thisto be like that.
Everyone walked away from the.
I know everything there is toknow about hotwire native now,
but like I definitely justopened up cans of worms there.
Speaker 2 (27:35):
The tricky part is
that I told everyone in slack,
like, make sure you have xcodedownloaded, make sure of android
studio, and a lot of people did, but, but some people didn't,
and I had a hard drive that Ijust passed around that had both
on it, like had Intel version,had a Mac or Silicon version,
and I think like seven or eightpeople were able to download it
from that.
The problem is like as soon asyou open Android Studio, when
(27:56):
you create a project, it has todo a bunch of networking to
download dependencies, thingsthat you can't expect someone to
do on their own.
So what?
I think the worst part was that, no matter how good the hotel
Wi-Fi was, if you have 45 peopledownloading something at the
same time like a couple hundredmegabytes each at the same time
(28:17):
it's going to be a badexperience.
So that was really toughbecause, short of spinning up
our own network in the room thatwe were in, I don't know how we
could have made that better.
And that's the stinky partabout doing native development
is like you need to do Android,you need to do iOS and you have
to have those IDs open and theyhave dependencies.
(28:37):
So that was a little rough,because I'm not sure how many
people actually made it past theandroid studio install, because
there's the first person whodownloaded it, got all the
bandwidth and like good luckeveryone else.
From my perspective, preparingfor a workshop especially that
workshop versus preparing for atalk was like one% as difficult,
(29:00):
because I have done thisworkshop in some shape or form,
online or to local groups or tobusinesses as they hired me for.
I have done most of that.
I could do that with my eyesclosed at this point.
So you got a cheat code.
Yeah, like in terms of okay, somy Rails world talk.
(29:21):
Two years ago, I spent90-something hours preparing for
it, for this talk, for thisworkshop, I think I only spent
15 hours.
That is a drastic difference interms of a talk versus a
workshop, and I love to spendless time and get the same value
out of it.
Of course, absolutely samevalue out of it, of course, but
I also think, if I'm thinkinglong-term, I got a lot of
(29:44):
developers in that room thatwill go on and make their own
apps, which is great.
I taught them how to dosomething new and exciting that
day.
But for my business.
I want to be talking to theCTOs, the founders.
I want them to hire me to haveme build the apps for them.
So there's also conflictingbusiness of doing a workshop
versus a talk because of justwho is going to be listening the
(30:06):
most.
So short answer I loved it.
It was great to do a workshop.
It was way less pressure for me.
I'm glad I got to go to Phillyand not pay for a ticket or a
hotel.
I can't complain about that.
I had some great cheesesteaks.
For my business is a workshopthe best thing to do?
I?
Speaker 1 (30:23):
don't know.
Speaker 2 (30:23):
Maybe not, but it was
fun to experiment with and it
was fun to try.
Speaker 1 (30:35):
Yeah, I wonder how
many of those devs might bring
the Hotwire native basicknowledge back to their job that
will springboard.
Hey, we should build native appbecause we can actually do it.
Hey, let's bring Joe in to getthe whole team up to speed or to
get us past the.
This is the easy part, I wonder.
Yeah, we'll have to check in alittle bit and see if any.
I assume you like when you takeon a new client, they tell you
(30:55):
where they met you or heard ofyou from.
So I'd be interested to see ifthat workshop does end up
helping the business.
Speaker 2 (31:03):
Me too.
I totally agree this was anexperiment, like I have
assumptions on it, but who knows, maybe this will actually be
that those were all leaddevelopers who are now leading
their Android, ios projects andthey need me to come in and help
them.
Like a free workshop in apublic space was a new
experience for me.
Free in terms of the people whogot there didn't pay for me to
teach them something, they paidfor the conference.
(31:25):
So, talking six months, talkinga year and see if anyone found
me that way.
Speaker 1 (31:30):
So the next question
on the docket, now that we've
covered a lot of the things thatyou're working on or have
recently worked on, what is ablocker that you currently have
or, given everything that wejust talked about about, what is
a blocker from one of thosethings that you had that would
be good to talk about?
Speaker 2 (31:48):
I have on the ruby
friends app.
I have like a really smalladmin dashboard and it just kind
of sums up some databasecolumns and I was like, oh,
there's this many people on itand there's been this many
friendships and this manyconfirmed users and I wanted
wanted to do page tracking, Iwanted to do analytics, but I
also didn't want to add GoogleAnalytics.
(32:10):
I didn't need something even asintense as Simple or Fathom or
whatever, and I wanted tocontrol everything.
So I experimented with kind oflike my own version of Ahoy,
with like my own version ofserver side tracking.
But then I realized that Ahoyis actually extremely inaccurate
now because of Rails defaultprefetching.
(32:30):
So Rails 8 prefetching is on bydefault.
If you hover a link, it makes aget request Because it's a
server.
Ahoy will count that as a visitand then when they actually
click the link, they'll load itfrom the cache and your server
won't be touched at all.
So it's like do I want todisable prefetching just to use
Ahoy?
I don't think so, and right nowaccuracy doesn't really matter.
(32:53):
So I was like going back andforth about all these different
solutions and finally it wasjust like you know what, what if
I just built it on my own?
What if I just built it on myown?
What if I just built it?
And I ended up having aJavaScript stimulus controller
that on every page loadessentially posts to analytics
slash track or something likethat Analytics slash events.
(33:15):
And what I got stuck on for areally long time was how to
uniquely identify the userwithout associating them with a
real person.
I didn't care that like userthree visited these pages.
I just wanted to know that auser visited these set of pages,
but I wanted to count uniques,so I needed a way to uniquely
(33:36):
identify them.
On the client side, I didn'twant to use IP addresses, you
know all that stuff.
So that's where I was stuck fora very long time just trying to
figure out a way that wasprivacy focused, hopefully
didn't require me to do a GDPR,whatever banner across the
bottom for cookies and stuff.
And yeah, it took a long timeto get through that with feeling
(33:58):
happy about that.
Speaker 1 (34:00):
So what are you doing
?
Speaker 2 (34:05):
feeling happy about
that.
So what are you doing?
So I have this stimuluscontroller and what it does is
it writes a with the crypto notcrypto, like crypto in
JavaScript, like first partycrypto it can generate a UUID
that's random.
So I generated a random UUIDand then I write it to session
storage.
So this is now public.
Someone could open up theircookies and they could see it.
(34:26):
They're not encrypted oranything.
It's just like in your sessionstorage of like a random GUID, a
random GUID, and then when auser requests a page, I check if
that is there and if it isthere, I then don't generate a
new one and I pass that alongwith the request and then I
rotate that every 30 days so auser would not be considered
(34:49):
unique 30 days later or whatever, which I felt like was a pretty
good way to just like give thema little bit more privacy.
I don't want to track someoneacross that long.
I might even drop that to aweek.
And on the server I track twothings.
I track a page view model,which is a path, and account.
So every time a page view ishit, I just increment that count
(35:09):
with a dot increment call,which is pretty cool because I
never used that one before fromactive storage, which actually
does an increment under the hoodwith SQL, not just a find and
update or whatever.
And then I have a page viewvisitor model which associates a
path with a day with a uniqueID from the user, so a user can
(35:31):
only track one view per page perday.
Like I have a unique constrainton that, which is perfect.
I only care about daily uniquesto a specific page.
If you visit the same pagetwice, I don't need to track
that twice.
So it actually has this reallynice balance of like.
Okay, this page was visited byseven users unique users on this
day, and then also this pagewas visited 42 times.
(35:55):
So I get page views and I getunique views.
And then I started adding UTMsand I have a little dashboard
that I actually just tweetedabout today that has the last
like 48 hours of analytics inthere and it's just enough to
know the vanity metrics thatgive me an endorphin rush.
Speaker 1 (36:14):
Sure, sure.
I love hearing that kind ofstuff where you kind of started
the whole thing off with, like Iwas stuck on this for a few
days and then the solution justsounds so simple, it sounds so
straightforward, it's notcomplicated, it's not overly
verbose or overly engineered,it's just simple.
And it's the weirdest part inour jobs.
(36:35):
I struggle with this still,close to a decade later, of like
it took me so long to get tothis very simple answer.
The work that I ended up doingdoes not reflect the time I
spent figuring this problem out.
I love hearing it, but at thesame time, it's maddening how
much that happens.
Speaker 2 (36:56):
Yeah it's very true.
I think it's like if you don'tcount the migration and the
models, which have justvalidations on them, they don't
even think there's any scopes.
It's 40 lines in a controllerand 40 lines in the stimulus
controller, like that's it.
And then most of that code isactually around generating that,
that session variable with thecrypto thing.
(37:17):
Because I can't use a cookie,because a cookie would have
taken two lines of code, becauseI could have said an expiration
date Right.
But if I put it in a cookie then, according to my limited
research, I would have neededthe cookie banner and all that
stuff, and because it's I don'tknow, I'm probably wrong about
that, but maybe not.
So, yeah, I totally agree.
It's like days that's even dayswith going back and forth with
(37:38):
chat, gpt.
That's not even just days of mealone banging my head on it.
I'm like pair programming withsomeone the whole time.
Well, what about this?
Well, what about that, whatabout this?
And it still takes that long.
I probably had five solutionsthat technically worked before I
got to this one, but they wereso complicated or they were
(37:58):
using some third-party gem thatI didn't really need to have, or
they had trade-offs like Icould have slapped Ahoy on this
and be done in five minutes, butthen I would have had all the
inaccuracy from prefetch.
It's all about trade-offs,right.
Speaker 1 (38:11):
Yeah, that's so much
of our job, right, it's just
balancing those trade-offs,figuring out what works best.
Wild, that's a good blocker.
That is a fantastic answer, Ithink.
Yeah, good takeaway it doesn'tmatter what the blocker is.
Find that simple answer andyou'll be frustratedly happy.
Speaker 2 (38:32):
I wish I didn't spend
this time but.
I'm so happy, I did I amcurious for those that are
listening if this would behelpful or just interesting to
see as either a blog post or avideo walking through the code,
because I feel like there's justa lot of little things in there
that on their own are so easyto understand, but when it's all
(38:53):
together, you're like oh, it'slike, oh, I got it, I got it,
and I'd be curious to see whichmedium would be better to
explain that in.
Speaker 1 (39:00):
I would be interested
to watch a video, just getting
it out in the.
I can confirm.
I'm pretty sure I speak for abunch of people.
Yes, I want to know more, yeah,what the best medium is.
I don't know.
I think videos for me, justbecause I spent so much time
with GoRails when I was learningRails.
(39:21):
Definitely, I think videos islike oh, you have a video on
this Instead of having to read ablog post, let's go.
But yeah, listeners, there's away to reach out.
There's a link that you cansend me a text directly and I
can get it to Joe.
Or you can reach out to Joedirectly and let him know.
If you have an opinion or apreference, hit us up, because
that is a content creatordilemma, right Of how I probably
(39:44):
had to do both.
What content?
Yeah, right, it's probably thesafest way to make sure it hits
everybody, yeah, okay.
So my favorite question isalways what is something cool,
new or interesting that you'vegot going on, that you've found
that you're loving that you'vegot going on that you've found
that you're loving that you'rebuilding?
You're not allowed to use RubyFriends app because we already
talked about that.
Speaker 2 (40:09):
But other than that,
what is something that you want
to share?
I know I want to talk about NFCscanning and stuff.
So May I went on a guy's tripwith three of my best friends
from college and we went up toCanada and did some hiking, did
some mountain biking and justkind of hung out.
Right.
It was great, got away from myboys, my two kids for a little
(40:30):
while, had a long weekend and aswe were biking, we were like we
all really like biking butwe're not too serious about it.
So we decided to sign up for acentury.
A century is a 100 mile bikerace, that's a lot of miles.
It's like a marathon, right,it's like it's like the
equivalent of a marathon, Ithink.
So over the past few weeks I'vebeen getting really into cycling
(40:53):
and I have a hybrid like acouple hundred dollar bike from
REI, which serves me totallywell, but I'm starting to
realize how limiting it is andhow I won't be able to ride it
for a century.
So what I am excited to startlearning is all of the many ways
(41:14):
that I can spend lots and lotsof money on unnecessary bike
equipment and accessories and gofrom there, because I just
looked up prices of the bikesthat were recommended to me and
they are about an order ofmagnitude more than I want to
spend.
But you know, I have the pricesand until May, so I do have
some time, definitely have a lotof time, and I figure I'm just
(41:34):
going to start saving up for itand get a real awesome bike to
use there and probably justspend way, way too much time
researching on the perfect stuffto only be told, hey, this
one's 10% off and just grab thatone off the shelf.
Speaker 1 (41:47):
Yeah, probably, Bikes
are crazy, can be crazy
expensive.
I've done some mountain bikingwith a friend who was a downhill
mountain biker not professionallevel, but he did it a fair
amount.
He had multiple bikes andmultiple bikes cost more than my
first couple of cars.
They get crazy, they're crazy.
It's so funny that you bringthis up because at RailsConf I
(42:10):
talked to multiple people whowere super into biking and
talking about it, Sandy Metz iswell known for being super into
bikes.
And what is it about engineersand biking?
Because I like mountain bikingbut I prefer trail running.
But there's a lot of bikers inour community.
Speaker 2 (42:26):
Yeah, there is.
I'd be curious to see if thatis a Ruby thing or if that is a
programmer thing.
My guess is that it's aprogrammer thing.
You know you can give yourselfthe excuse that you're getting
exercise, which you definitelyare but you can spend hours and
days and weeks tinkering withyour bike.
It's like tinkering with codethat you know isn't going into
(42:46):
production, right, you can justdo whatever you want to it.
You can tinker around with yourbike as long as you want.
You can switch how the brakesfeel or where your your shifting
is aligned, or just get newshifters entirely, or like
change your gear ratio or getnew tires, for it's like endless
combinations and accessoriesand equipment.
It's just like how much can youoptimize, but also how much can
(43:09):
you have fun tinkering?
I think that there's a lot ofthat with trail running.
Speaker 1 (43:12):
It's like you got a
pair of shoes yeah, I got shoes
and like how I carry my waterand my fueling.
I definitely spent way too muchtime tinkering with how do I
get calories while I'm running.
Speaker 2 (43:24):
Yeah, that makes
sense.
It's another thing to tinkerwith, right, but when I am doing
this ride I'm going to alsohave to figure out the whole
calorie thing, because I've runhalf marathons before but never
a marathon, so I'm familiar withthe taste of gels.
Yeah, I can't do.
Speaker 1 (43:43):
Yeah, I have done a
couple of ultra marathons oh wow
, it's a trail running.
I've done 250ks of 50 miler andI attempted 100k, which is the
only time that I have notfinished a run.
100k oh my yeah, it's a lot.
My recommendation is look intoa company called Tailwind, not
(44:07):
the CSS framework Familiar, Iknow it's familiar.
Look into Tailwind in both lives, because Tailwind CSS is
awesome, but also Tailwind thefuel it's a completely drinkable
calories and electrolytes andvarying levels.
And that was after too manyhours of tinkering and playing
(44:30):
with and gut bombing on thetrail.
I never had a problem withTailwind.
Speaker 2 (44:34):
Okay, I'll check it
out so yeah, definitely check
that out.
Speaker 1 (44:37):
That's cool.
Okay, you said you wanted totalk about it and I want to talk
about it too, so, if you havetime, the nfc tapping.
I was like what are you talkingabout?
Speaker 2 (44:48):
that scared me the
nfc tapping like yeah nfc
tapping that sounds so cool it'sso cool and it's so easy.
I never knew, okay.
So if you have an iphone Idon't know about android, sorry,
I'm still figuring that out butif you have an iphone and your
phone is unlocked and you putyour phone on an nfc that is
encoded with a URL, your phonepops up the URL at the bottom as
(45:12):
a notification.
Speaker 1 (45:13):
I think Android works
the same way.
Okay, awesome.
Speaker 2 (45:16):
So right there you
have an entry point into a
website with no configuration oranything, it's just a URL.
So I have these.
Speaker 1 (45:27):
That looks like about
the size of a credit card.
Speaker 2 (45:30):
It's solid black.
It probably is like what youwould use if you worked for a
big bank or something and youhad a tap to get into the door,
right like your key card.
Yeah, it's that, and it's nfcwritable and readable.
I downloaded an app called nfccool and wrote a url to this nfc
and now if someone taps it withtheir phone, they get the the
Ruby friends URL right to myprofile.
(45:51):
They open it from their lockscreen, it goes to the web the
magic of the internet.
I don't have to do anything,there's no configuration, it's
just.
It opens a URL.
It's just like scanning a QRcode.
The real magic comes in is thatI can register those URLs as
universal links on bothplatforms, which means if they
have the apps installed, thatURL will not go to the web but
(46:14):
will go right into the app andpush that screen onto the stack.
So now and that requires somenative stuff and some web stuff
so now I have this integrationwhere users can write their own
NFC.
So all someone has to do is buyan NFC thing.
These are a dollar, $2 each.
They buy one of these, they cando whatever they want to it.
They can slap a sticker on it,they can wear it as a necklace.
(46:34):
I have the app Write that NFCas a URL and now anyone walking
around, whether they have theapp installed or not, can just
take their phone and tap thatNFC and they now have that
person's profile without anyprevious.
Not even knowing what Rubyfriends is, they can just tap
that.
So all of a sudden now it'sthis like acquisition strategy
(46:56):
also, where folks are makingfriends and spreading the app
with this social degree becausethey're acquiring new users.
For me Sounds like a disease.
Speaker 1 (47:06):
The phrasing is
unfortunate post pandemic, but I
get it yeah.
Speaker 2 (47:11):
So it opens up this
just like world of.
I don't have to have say tosomeone like, oh, you want to be
Ruby friends, all right, cool,go to the app store, download
the app, sign up and then, like,you can friend me.
It's like no, tap this littlenecklace or this bracelet that I
have and it just opens thebrowser and everyone has a
browser on their phone.
So I'm really excited aboutthat.
(47:31):
It's kind of where you knowtitle back, it's the magic of
having a Hotwire native app thatis really just a wrapper around
your Rails app, because 90% ofthat magic is the fact that it's
a website.
The only part that's nativeabout that is the deep linking
into the app and that's justcool, right, it doesn't actually
provide maybe you're signedinto the app, maybe that's the
better experience, but for themost part, it's just like taking
(47:54):
advantage of existingtechnology that our phones can
scan nfc's and open urls.
Speaker 1 (47:59):
So really excited
about that the really important
follow-up question is that inthe book?
No, oh, definitely not right.
We're definitely gonna need ablog post about it then.
So what I'm doing?
Speaker 2 (48:11):
I'm building out the
nfc reader straightforward
couple lines of code.
The nfc writer is the harderpart because there's a lot of
errors to handle, like thedevice and the tag could be
different.
So what I'm doing is I'mextracting all of the generic
implementation of the nfcintegration into a bridge
component and I'll put thatbridge component on my bridge
(48:32):
component library.
So bridge components dot dev is, I think it's like six, 15, 20
components that you can justdrop into your Android and iOS
app and some of them are freeand some of them are paid and
push notifications, qr codescanning, location tracking, all
that stuff.
You just copy paste it intoyour Hotwire native app and you
have those features.
So this will be another one ofthose.
(48:53):
It's like oh, I need NFCinteraction, let me just use the
NFC component.
So I'm just working on nowmaking it bulletproof for other
folks, not just for myimplementation, that's so cool.
Speaker 1 (49:03):
How much data can an
NFC tag hold when you you tap it
?
Is it like restricted to just aURL of X size, or like could
you put other data on there ifyou wanted?
Speaker 2 (49:15):
I don't know the
exact number, but it's not small
, like there's a fair amount ofdata that you could store in
there.
I know that you can also storemultiple entity types, like a
URL and text and an image orblah, blah, blah, blah, blah.
But like a URL and text and animage or blah, blah, blah, blah,
blah.
But when you get into that, youneed special readers to cycle
through those.
Essentially and unless, atleast on iOS, the only way it
(49:43):
will show up on your lock screenis if it is a URL and only a
URL.
So if you have other dataencoded in there, it won't give
you, like, the whole experience.
Other data encoded in there, itwon't give you the whole
experience.
But if you're building your ownNFC reader and you need to
store metadata or a barcode typestuff, you can just do all of
that.
It's pretty much a black box.
Speaker 1 (49:59):
That is so cool.
It's funny because NFCs exist.
They have for so long, andevery time someone says they're
doing something cool with it,I'm like why aren't we using
this technology more?
I know it sounds so cool.
Speaker 2 (50:12):
now you got my brain
swimming with ideas, not good
it's fun and they're just likeit's just a piece of plastic,
right like it's a credit card.
It looks exactly like a creditcard I'm holding in my hand and
I could.
You have no idea what's on thisyeah, you have no idea.
Speaker 1 (50:28):
Is there anything
else before I let you go,
because I know we're coming upon time.
I want to respect your time butalso give you the opportunity
to talk about anything, will Isee you at?
Railsworld, not at Railsworld.
I will be on vacation with thefamily.
Next conference I will be at isRocky Mountain Ruby in Boulder,
colorado, which I'm pumped for.
Great conference, yeah, thatsounds like a lot of fun.
Speaker 2 (50:50):
I'll be at Rails
World and I was trying to go to
Irina's conference down in SanFrancisco because I'll actually
be in San Diego that weekend,but we're going to be there for
the holidays so I'm like I can'tswing it off.
But yeah, sure We'll catch upat a conference in the future.
Speaker 1 (51:06):
Absolutely.
Speaker 2 (51:07):
You can find me on my
website, mazzalotticom.
I got the blog, the newsletter,the link to the Bridge
Component Library link to thebook, all that stuff link to
socials, so just check me outthere and best way to keep in
touch is through my newsletter.
I respond to everyone.
Speaker 1 (51:22):
Awesome, great.
Well, it was awesome having youon the show again.
It sounds like we already havean excuse to catch up in another
six months to a year, so we'llget that scheduled and we'll
check in with you again soon andlearn about all the other cool
things that you're working onAwesome.
Well, thanks for coming on theshow, joe, really appreciate it
and listeners.
I'll see you in the next one.