You're listening to syntax with it. Tastiest web development treats out there. Just grab yourself in and get ready. Here's Scott Zilinski and West Boss who welcome to syntax and happy new year.
Happy 2020. This episode is going live January 1st. Wait, what are we recording it? December 16th, so you're new me.
Love that thing. New year, new me. Today we got a potluck for you. All kinds of awesome questions around JavaScript and CSS and hosting applications and soft skills.
It's got a good one for you. So stay tuned. We are sponsored by today Kyle Prince lose freelancing course, which is available at studyweb development.com forward slash freelancing dot HTML and log rocket, which is logging in session replay for your JavaScript apps. We'll talk about them partway through the episode with me as always is Mr.
Scott Delinsky. How you doing today, Scott? Do it good. I'm you know what?
To be entirely honest, I felt a little, a little slow with the past couple of episodes. I'm feeling a little bit more revitalized. 2020 feeling really charged got some caffeine in the system and I'm excited for this year. I'm excited for this month.
I'm excited for this episode. So Macro to micro. I'm all ready to go. What about you?
I am doing pretty good. This is the last week before Christmas holidays and my daughter's got a half day on Friday. So I've got like four and a half days to wrap up my year. I've got five million emails to reply to invoice.
Yeah. And things like that. Just trying to button everything up this year. Yeah.
I'm feeling a little stressed out in that same way, trying to get everything where it needs to be. And I just looked outside and it's suddenly a winter wonderland outside. It was like beautiful. And now it's absolutely coming down.
Snow's coming down Colorado. Yeah. Colorado, man. Wild, wild weather here.
Let me tell you. Let's talk about the weather for a little bit longer. Now, let's get into this Pollock episode. The first question is from Tim Moranda and Tim asks, Tim asks really good questions by the way, I think we've gotten several of Tim's questions.
I recognize his name from a few other pollocks, but he asks, when you run an audit, like Lighthouse on a website, do you run the audit on each page? Have you found an app or a hack to run the audit over the entire site or multiple pages? So yes, when you do run Lighthouse, it's just running it on the one page that you're running it on. Typically, you're going to want to run those on, you know, the main pages as far as running it on everything.
Oof. I know that would be very difficult for me personally because level of tutorials has a lot of pages, right? We have like, let's say 2000 plus tutorial videos and blog posts and little pages and stuff that would require off. So to be able to have an audit automatically run on each page automatically seems really, really kind of tough.
You know what? I don't know. But the things like Lighthouse, these are good things to run, maybe like in the development process once or twice. You don't need to be running these things continuously and really staying hounding on it.
Usually it gives you a set of checklists and you solve those issues and a lot of times those issues are solved for the entire application. So it's something you want to be cognizant of, but maybe not something you need to be really intense about. That said, we just have an episode on GitHub Actions and we had an episode, well, I guess we haven't had an episode on Cypress yet, but maybe that's a tool that could be baked into your continuous integration via GitHub Actions, something else, or maybe it could be baked into your end-to-end testing with something like Cypress, to be honest, I have no idea. It just seems like a possibility.
Yeah. I think what would be really cool is if you could run Lighthouse or whatever you're using on the pages that were changed, like you should be able to figure out what pages changed in this pull request and then only run it on those pages. I'm just looking online here. There is a NPM package called Lighthouse Batch.
We'll allow you to run it on multiple pages. And there's another one that will allow you to run it in parallel. But certainly if you've got, I don't know, 80 pages, that would take quite a while. I think with these tools, I'll just run it on the homepage.
And then if you know, it's like a significantly different page, there's a lot of extra code or functionality on that page, then I'd probably run it on there. I found one called Lighthouse Action. That's a GitHub action. There you go.
That's it. But I don't know if it does exactly that. I would need to look at this a little bit more, but definitely something interesting there. Yeah.
You would need some sort of custom code that would figure out based on whatever CMS you're using, what pages have changed, what pages have been touched. Like, and you could, if it was like a next app, if a component lower down the tree changed, then you'd need to rerun it on the parent page. So maybe somebody out there has a solution for that. I would almost want to do it like a custom list of pages to run.
Like here are the pages because I don't need to run on every tutorial. You just need to run on one tutorial page, one specific one listing, one that. So then you can't necessarily have it be super odd. Well, you need it a list and have it go here.
But interesting idea. Cool. Next question we have here is from potbelly font pig. Question, what makes a font?
Good. I stumbled upon this website. Haleyphige.fun.com. It's in four slash fonts.
It's H-A-L-E-Y. We should probably make sure this is an appropriate website before retreating it or sharing it with. I've been to it. It is very appropriate.
Um, where she says her first font was not good, but it looks perfectly usable to me. What are when you are picking fonts for web apps? How do you judge the fonts is entirely subjective? Um, I think there's a couple of things probably to it is how readable is it at a large in a small use case?
So if you make a font very small, is it still readable? Um, I know that there's some fonts that are very hard for, um, what's the disorder that you have where, um, yeah, yeah, there's a lot of fonts that are hard for people with dyslexia to read. So I don't really know what makes a good font and what doesn't. That's not really my, my area there, but it's got to have any thoughts on this?
Yeah. You know what? I mean, I looking at this, especially when she, she says this is her first font. It's not very good, but it holds a special play.
I'm on the font website, by the way. And what's interesting about this font is it looks really good to me too. No, the difference between a font looking good and a font looking good to the person who created it, they could be saying this isn't good because perhaps it doesn't fit with the things that they've learned about typography as they've grown as a designer or potentially there's little issues here there with the kerning or the flow of the fonts. But a lot of this to me personally would seem like it's just a matter of taste and a matter of skill in their own work rather than, like, I mean, you sometimes you look at your code and the code might seem perfectly reasonable to somebody on train.
I, but somebody who's also looked at this might say, Oh, this could be better in these ways. I bet that's the same way with creating fonts to me. All of these fonts on this site look super dang good. I love all of them, especially the one Sniglet.
It looks like it was inspired by Katamari Damasi, which is favorite of mine. So this looks great. I love a lot of this stuff. Check out this page if you haven't.
A friend is also good. Wow. Very good. Yeah.
I think also what makes a good font is that it has upper and lower case has accents available. You can't just think like most English doesn't have accents, but pretty much every other language does. Some fonts will account for letters that come after it. So if you have an A and E, they'll give you that cool thing.
Even like one of my favorite fonts, which is Radnika. I use a Radnika next. I use that on my JavaScript, beginner JavaScript.com course. And if you inspect the AVA of JavaScript, you'll see that I just wrapped a span around it and had a really bumped down the letter spacing because the like the weird case where an A and a V and an A all came together, there was just these like massive gaps in between each of the letters and like, that looks awful.
So I had to like go in and kerning in JavaScript sucks because you just have to wrap a span around each of the letters and bump it around. Yeah. Where was that? There was a plugin for that where I wrapped automatically wrapped.
What was that? I've written it a hundred times before. I call it Sparan wrap. Oh, nice.
Where it just it splits your letter. There was one that was made by, I think, the Sandra of Mady that automatically wrapped each one with a letter with its own class. We used it all the time back in the jQuery plugin. Okay.
Cool. So let's get into this next one from Adam K. And it's as a solo founder, speed is essential. So Adam is a speed demon.
What's faster building your own components using a theme or using a framework? Well, if you were just looking into what's the fastest, like number one, the fastest, I think the fastest is using your own framework that you've written yourself. Why is that the fastest? Cause you're, if you've written your own framework and it encapsulates everything that you might need to do, then you know how to use it really well.
Cause you wrote it and you probably have used it before. That's probably number one, the fastest to me. Second most being using any other framework like tailwind or bootstrap or something like that, those are going to be very fast, especially if you have worked with them before and know it. If you don't know it, you're not going to be as fast.
That's to me, a speed is like the number one, most essential thing. That's it to me. But I don't think speed is number one, the most important thing. But yeah, that's another conversation, I think.
Yeah. My, my course back and I built a foundation because I wanted speed. I wanted to slap this thing together and get it up really quickly. And now we regret it because now whenever I want to like modify one of my course cards, I don't have like a course card I can work on.
I've got 15 different classes that I have to like overwrite on each of them. So a long term, a short term, getting it up and running, just ship it. Absolutely. That's the fastest, not writing tests for your JavaScript.
That's much faster than actually writing tests. Long term is going to bite you in the butt for things like that. Unless you do it properly, obviously you can approach any of these frameworks properly. But if you're just thinking like, I just need to get something up long term, and that might not matter.
You might not care about long term. You might just care about getting it up and running. So if you do long term care about it, I would recommend writing your own anything because we recently rewrote the entirety of the CSS for level up tutorials. And we did so starting fresh from a design system perspective.
And we redid the design system in Figma, did it all out and then rewrote all the components. And let me tell you, right now we could not be any faster at things to the site because everything has a component. It all works the exact way it should. Here's a layout, here's a card, here's whatever.
It all fits together like a perfect little system that we designed it to do. And to me, that is really essential. I don't even have to look up any sort of documentation because I wrote it along with Eric and designed it. So I'm very about writing your own thing.
But in the same regard, that isn't the fastest. It's just the fastest after that framework has been written itself. All right. Uh, next question we have here is from Tim.
Hey guys, love the show. Thank you, Tim. I've never been a tea drinker, but lately I've been wanting to start drinking hot tea in the afternoon instead of coffee. I know Scott is a tea guru.
What would your suggestion be for starting out? This is a great question. That's, I think all of us probably drink a little bit too much coffee and Scott knows the stuff here. So lay it on us.
Scott, how do you, what would you suggest someone getting into tea? There's a lot of variety in tea from black teas down to white teas, right? So you go, uh, black is the strongest, most caffeine, strongest flavor, uh, white, the least amount of caffeine, the, I don't want to say the least amount of flavor, but then maybe the more subtle of flavor. And then you have stuff in between, you have yellow teas, which is a little bit more.
You have green teas, which is more than that. You have oolongs, which have their own characteristics. There's so much variety in teas, not to mention the amount of fruit or, or flavoring you can add to them. My one suggestion would for tea would be to stay away from something like T.
Vanna, where everything is just like filled with sugar. Uh, they just add a bunch of sugar to stuff. So I wouldn't go crazy. Cause those are, those are delicious by all means, but they're not when you miss the characteristics of the tea, but you also just don't need that much sugar in your life, especially from something like tea.
I personally, uh, my favorite teas are all Chinese green teas. Um, I like some Taiwanese oolongs. I like some, some interesting stuff. I think you need to try teas and don't be afraid of them.
If you don't like it, uh, don't worry about it. Start buying teas in small quantities rather than large quantities until you like really find something that you like, because there's some very different characteristics. For instance, uh, who are teas are like fermented dark teas and it was going to be really strong and very smoky and they can almost have some like real earthy qualities that a lot of people don't like. So if you try one of those and think it's going to be representative of all your teas, it's not going to be the case.
Now last year, uh, my brother got me this cool little subscription to a place called Sipsby, uh, you know, one of those box services type things, uh, where they send you some stuff and I found it to be really pretty good. You give it, uh, some qualifications to say, okay, these are the kind of flavors I like this is the stuff I might be interested in. This is how much I know about tea, right? You could say, I don't know anything.
And what they do is they send you a box of four different teas and I found it to be pretty reasonable. The, the teas were all good that I got from there. They get them from several different places. It's a loose leaf tea.
You drop it in. Um, so I would suggest stick with loose leaf tea, you know, use a filter or whatever, because the teas are high quality, uh, find some service that allows you to try your test out tiny amounts of teas or just go to your local loose leaf tea store. We have some amazing ones here in Colorado. I'm a house representative.
That's my favorite tea shop. Uh, they do a lot of great testing, but, um, yeah, buy small quantities and try a bunch of different teas. Chinese greens are where I'm at. It's really hard because there's so many different varieties of flavors.
But if you have specific flavors, you want, feel free to hit me up on Twitter. And I can do my best to point you in the right direction. Next question is from Michael Reed. Uh, he, he also let us know that it's Reed as an RED, not red, like you read a book because it's, uh, yeah.
Thank you, Michael. Uh, is it worth bundling JavaScript for websites that aren't using a framework, i.e. WordPress or CMS websites, the company I work for uses several or uses a large enterprise CMS and our JavaScript is just a minified mash of several different JS files, most of which are several hundred lines of spaghetti code. It would be nice to break up all these files and sort a modular way and have the added benefit of using battle so we can write modern JS.
However, the output of bundle JS seems massive. Won't that hurt performance on page lip? Hmm. This is a tough question for me, uh, because I haven't worked in CMS websites enough recently to know the right answer.
Like if I have, that's one of the reasons why I'm reaching for a headless situation because you get a lot of those benefits, right? The code flitting, um, but then again, you're, you are at the issues of a front end framework. The question is saying like we already minify it, right? But if we bundle it, it's huge.
I don't get that. I don't get that either because if they're minifying it, that's doing a process to it. So like in that case, why couldn't you use Babel to transform it before you minify it, right? Yeah.
Your bundle is not going to be any bigger than the code that you write unless, unless what's happening is that you have seen some sort of bundle or that's including every sort, every single polyfill under the sun. So I don't know. I don't think so. Like, they absolutely, you should, you should be bundling your code.
Um, and then that opens you up to using things like Babel and all kinds of really neat stuff. So when I wrote a lot of Drupal, we always use Gulp on the backend to do the, the compiling. So are you compiling your CSS? What are you doing for your CSS?
Is there a build tool, Grut Gulp, one of those? If you're using one of those, then you could probably throw Babel in there too. I can't imagine you have that much JavaScript in a CMS based website that's being thrown. I don't know.
That's like, like the only time I ever had that much JavaScript is when you're including a bunch of libraries or doing full front end stuff. So this is, yeah, this is a tough answer. I think, but yeah, you should probably be using a bundler in my opinion. It shouldn't be that difficult if you're already using something to compile your CSS.
You know what's the show I want to do in the New Year? I guess it is a New Year by listening to this is like for years, we've been saying HTTP two will stop us from bundling. And like the whole idea behind HTTP two is that the request to the server for like eight JavaScript files and 14 CSS files will only make one request. So like it doesn't matter if you have a thousand script tags on your page and people have been saying that forever.
And I'm kind of sitting here and been like, can we do that now? Or like, why are we still bundling? I heard HTTP two is going to kill a GraphQL too. Well, there was article on that.
Now HTTP three is out. Whoa, can we just jump to what is this? What is that HTTP thing? It is Angular.
So like, and like most servers are supporting this already. So I don't know like I don't know enough about this space. I'm sure somebody listening does you can tweet us or maybe we'll find someone to come on the show and explain is that actually true? Like even like the reason why people think it's going to kill GraphQL is because you will be able to make multiple requests to like, let's say you've got a component that hits your API endpoint 14 times and that will fire off 14 different requests.
Apparently that'll be fine with HTTP two. But I haven't actually heard anybody just doing that and saying it's fine. So I'd be curious to see what that looks like. I'm curious as well.
I'm very curious. I'm also curious about becoming a better freelancer. One of our sponsors today is study web development.com. Now studywebdevelopment.com has this really cool bundle, which is everything you need to know to master freelancing.
And it has been taken by over 2,000 students. It's really super cool. And let me tell you, there's a ton of stuff in here, including a freelancing and beyond ebook, CSS and HTML templates, a private Slack and Facebook community, portfolio templates, client questionnaire, which is something you can give your clients before starting a project and SEO checklist to make sure that you are giving your clients everything that they possibly could need. There is a ton of stuff, including lifetime updates.
I can't even tell you exactly how many things are in this. And there's actually going to be some new additions to this bundle as well, including a legal contract. So you don't have to pay a lawyer to write a contract for you. CSS spice Chrome extension, which is actually pretty cool.
It's a Chrome extension that helps you inspect and copy CSS from other websites and a brand new ebook called web design and beyond, which is focused on equipping you to create the most effective websites to get results for your clients. So head on over to studywebdevelopment.com and use the coupon code syntax for 25% off the bundle. Again, that is the coupon code syntax is studywebdevelopment.com. Thank you so much for a study web development to .com for sponsoring.
Next question we have from Sky Dog. What's up Sky Dog? Yes, Sky Dog. Uh, there are one, one critique.
Sky Dog asks a really good question here. I'm just going to say that up front. Uh, but Sky Dog missed opportunity of smelling dog D A W G D. D A to.
Oh, what is that? We just have, well, dog, man. Dog, like dog, dog, dog. Dog is true.
We, we do get a lot of these questions that are, um, phrase this way. Anyway, Sky Dog, hey guys, I love this podcast. So flipping much. Thank you for, for watching your language dog.
I love how you do your best to keep the content fresh and current as well as interesting. And let's be honest, fun. Thank you, dog. I know both of you put out a ton of content and both together.
Individual. I'm curious to see if you listen to any other podcast there in the land, any other types of content that you consume to hone in on your skills and pay the bills. Thanks. Oh, and peace.
All right. So I listen to a lot of podcasts, but very few tech podcasts. But just because I don't know, I think that's why we made this podcast. I didn't particularly enjoy a lot of these podcasts because they, they're not all that exciting or interesting and the audio is often awful on them.
But the tech ones I do listen to, I listen to shop talk show, not all of them, but quite, quite a few of them. Um, of course, where it also has a really good one called the Code Pen, um, Code Pen podcast, whatever the Code Pen podcast is called. I really enjoy that one. And then I just listen to mostly things about getting scammed.
I'm a big fan of the, uh, heist podcast that has every week. They talk about different heists that they have. I used to listen to the mixer G podcast, which is a really good one for having stories from people who have sold a business or grown a business or things like that. I don't listen to it all that much anymore.
Cause I listen to it for, I don't know, like six years or something like that. And it's, it's starting to get a little bit repetitive for me at least, like not, no, no shade thrown on the podcast. It's just, I'm in a different spot in life right now. So those are kind of ones I have.
And just, I've been listening to the dream that's got sick back the other day. Ooh, season two. And also I figured out they had a, like in between season that went into Lula row with that leggings. Oh, that was good one.
Yeah. That was great. So that's me. What about you?
Um, I, so okay. Yeah, I, I added ones that are tech and tech adjacent here because I always give my, my sick consider podcast that are not. And so I listened to the react pad, the react podcast with fantastic, fantastic. Uh, he is the man, I suppose.
Uh, he, no, I really love react podcast. Uh, not just because I've been a guest there, but it's really one of my favorite, uh, really just great shows, great guests and always learned something. Andy hackers, uh, which we featured Cortland on the show as well. Andy hackers absolutely love it.
He hackers. I think I learned so much from different founders there. Um, just about growing their businesses and just what they should be doing. When I listen to this, also tech adjacent is a Kimbo by Seth Godin and it's.
Yeah, it's a good one. Yeah. A Kimbo is fascinating because it's a marketing sort of that type of podcast, but in a little bit more of an abstract way, I found it to be very about provoking in a way I really enjoy. I also really liked command line heroes, command line heroes tells sort of the history of different programming topics from the creation of Linux, all sorts of stuff.
I really liked command line heroes. Uh, I continue to listen to that. So I don't listen to a ton of tech podcast. Like I said, I listen to a ton of hockey podcasts and comedy podcasts and then a bunch of podcasts about, uh, apparently scams and swindles.
So yeah, that's my wheelhouse. Oh, that's next question is from Kareem Hussein. And this is, uh, what are your thoughts on blazer? Blazer, uh, is it a good move to be an early adopter of a framework like this?
Or should you focus on one that are already in fully released state, like react or view, et cetera. Also, I want to say that you guys are keeping me company in the car back and forth. The office, thank you for an awesome podcast. B are from Sweden.
Ah, thank you, Kareem. Um, okay, thoughts on Blazer. One, I had to, oh, I had to Google Blazer. Uh, you've been told about Blazer before, right?
It's come up before on the podcast. Blazer, for those of you who don't know, is build a client web apps with C sharp from Microsoft. Now, let me tell you the amount of C sharp I've ever in in my entire life is a whopping zero. Uh, so I'm not reaching for blazer simply before, because I don't know anything about C sharp.
I literally know nothing about it other than that. It exists as a programming language. And this thing runs through web assembly. So it looks cool, I guess that said it's not really that enticing to me because of the technology.
I'm not going on my way because I don't use what it says here. Blazer is a feature of ASP.net, the popular web development framework. Okay. I don't use ASP.net.
I don't, I never use.net. I don't use C sharp. This is not in my wheelhouse at all. And I probably wouldn't reach for it.
That said, it's my Microsoft. I mean, it's got some backing behind it. And if you're a C sharp person and you are interested in an order, you work in.net, this seems like a great thing to use here. I just don't ever do anything like this.
Yeah. I would have written this off as silly a couple of years ago, but there's a number of different things out there. What's that other language that you compiles down to JavaScript, but you write your reason, you write, okay, no, there's a couple of different things out there like this, where you write in either a different language or you write in this new custom language we have and it will compile down to JavaScript. And I think that's really cool.
And I think it's really neat that people are always constantly reevaluating it. Be like, Hey, wait, is JavaScript the best for this thing? And it might not be like, we might not be writing JavaScript in, or might not even be writing TypeScript in five years, you know, it would go a lot slower than five years, probably 10 years. So maybe check it out.
I just did a quick scan of the website and just from looking at it, it gives me a very corporate feel. They link off to like Telerik stuff, which is they always have like a, they used to have that like Kendo UI, which was like a super expensive UI library for JQuery, things like that. So I think this probably has a good spot in like the corporate land where you have a lot of developers that know C sharp and love C sharp and love approaching things in the Microsoft D way. So I would give it a shot, but like I haven't really heard all that much about it.
So I would let's see on GitHub. We're also not like in tune with ASP.net crowd though. I think we figured that out that we're certain there's some communities we're definitely not in tune with as much as we probably should be. No, I mean, it looks cool.
I wish I had a little bit more information on something like this. I would stick with something like React. But if you're a SP head or a C sharp head, yeah, I mean, sure, do try it out. Depends on what you're productive with, to be honest.
Yes. All right. I would like to ask how you make yearly subscriptions in a website specifically Scott does yearly subscription. Also, how do you give a lifetime locked yearly subscription?
Yeah, that's interesting. So how do subscriptions work? You want to give us a rundown how that works in your platform? Yeah.
So I've set up a couple subscriptions via Stripe or via Prayintree, but typically subscriptions work this way. You have it depends on how you work, but typically you're selling some sort of access like a role level, right? We had a whole episode on roles and roles can determine who has access to what, right? So what you're doing is you're simply selling the toggle to make somebody a pro or a premium user, right?
And then that gives them different credibility on the site or credentials, credibility. So here we have checkout form, like you typically have any other checkout form. It has a product, which is a subscription in most of your different services, whether you're using something like brain tree or Stripe or even a subscription service based SAS, you have a product that's actually specifically for a subscription. And guess what?
All of that reoccurring billing, all of that holding onto users often. And they're, what's it called? Their tokenized payment form. All of that stuff is held at the payment processor.
OK, so you buy a product. It tells Stripe or brain tree, whoever that this person signs up and that you are authorized to charge them at whatever interval you have made it clear. And the payment processor holds onto that token and holds onto that authorization. It's all been authorized.
OK, so because it's all been authorized, you don't need to hold anything in your own personal database. And I would strongly prefer not to, to be honest, I don't want to be responsible for credit cards or no credit card numbers, stuff like that. It's stored in your database. Correct.
Because people always ask me, can you remove my credit card information from your database? I don't have it. Brain tree just simply has an authorization to charge you. OK, so that's what happens.
It basically comes in and says, yes, the charge was successful. The charge was successful. Then you go ahead and you apply that role, you give them access. And then from that point, everything else is basically web hooks.
So your website will receive messages from the payment processor. In my case, it's brain tree. Brain tree sends my website a message that says this customer account number has been correctly charged or this customer is about to be charged or this customer charge was failed. And there's a whole ton of different messages.
Let me tell you. There's like 40 different messages and you don't have to respond to all of them. Because some of them don't really matter. Like I don't have trials.
So I have to deal with any of the trial web hooks. But based on whatever web hook is coming in, then you didn't have to just accordingly. For instance, if the payment has failed three times and the user subscription is canceled, I will be getting a canceled subscription web hook message. And with that message, it has a customer ID.
I look up that customer ID and the database with the results of the web hook and remove their permissions accordingly. And then I update their user account with the updated information that has come via that web hook. So this is often to the billing land and the web hook sends messages. It's charging.
You don't have to worry about the timing. You don't have to worry about storing data and any of that hard stuff. You just simply have to worry about what happens when they purchase, what happens when they cancel all these specific events. So we should say real quick, a web hook is like an opposite of a fetch request.
So instead of you pinging stripes server and asking for information, stripe will ping your server. So the way that you set it up is you give Striper or Braintree or whatever you give them URLs and you say, when this happens, ping this URL with a payload of information. And then Scott has code on his server that will act accordingly. I use that as well with any time there is either suspected or a suspected fraudulent payment or there's actual fraud or someone has charged back something.
It will immediately go and lock that person's account. So while we can sort of get that sorted out, so that's a web hook because they file or stripe will tell me that there's something going on and that will hit my hit an endpoint on my API, authenticate it, and then go ahead and lock down that user's account. Yeah, I have, I should say I have a, an endpoint, like a specific endpoint online server that's only used for the web hook. I have one for my stripe, web hook, one for my Braintree web hook.
So you do have to create those server side routes to accept those web hooks. And when somebody subscribes on like the 14th of the month, do you just charge them? Like if it's monthly, do you just charge them on the 14th of every month then? Yeah.
So it's not like a pro rated. Yeah, I do personally. Yeah, it's not pro rated. A lot of the payment processors, they give you the opportunity to do whatever you want.
So you could say always charge the first of the month. And I just think it's easier to not have to do that, right? So you have the flexibility and specifically with Braintree, like the thing I kind of hate about Braintree is that they make it very flexible, but at the same regard, because it's flexible, you have to do everything yourself. And that can be really frustrating.
For instance, when you cancel a subscription, you can't just say cancel because that like cancels it outright. So what you have to do is with Braintree, you just say, oh, cancel this. And I mean, straight, straight be safe, cancel the subscription and stripes is OK. I got you at the end of the term, we're going to do everything you need to do to cancel the subscription with Braintree.
You have to set the total amount of billing dates to be one plus what the current amount of billing dates is. And then you have like, it's like, you have to do all that stuff yourself. And if you goof it up, or if for some reason the data isn't correct, but the data isn't there, there's just no safeguards in the system. They cancel it, removes all the information.
And then you have to do all the stuff you need to do to make sure that you're able to get that from Braintree. That's for the most part, they give you the things that you need to be able to handle any of those situations. And what do you do when I'm sure this gets really complicated where someone uses like a coupon for that year, and then like the next year, how does that work? Do they get that same rate or they turn to porn?
Things like that. This is a hot topic for me because I kind of learned my lesson on this one in the past. The language was very explicit in the Black Friday sales. And it would say you get this price off of the first year of the subscription.
And it was very explicit. And that's what it was. But I get so many people that said, I just got a rate increase. And I feel bad about it because I didn't want that to be deceptive at all.
That's just how I chose to run the sale. So if you did get charged that like a more amount for the second year, like I will refund the difference in say you up for life because this year what we did for the Black Friday sale, as we said, this is your Black Friday price for life until you subscribe. So you have the option to say either. And I just happened to make a bad choice on that two years ago.
So I changed the language about it this year and I changed the actual process because it was too confusing. I think a lot of the times you get the flexibility to do any of this stuff. You have a thing about here on refunds to refunds for the most part of just work through Webhooks. If I do a refund or a cancel on my end, it sends a Webhook message saying they're canceled.
I don't have to worry about the user roles or anything. What if they want to refund like four months into 12 months? There is a check box in Braintree to prorate it. Okay.
And same with Stripe is as way better about all of that stuff. You could count on if there's something that exists. Stripe has done it better than Braintree. But Braintree definitely just checkbox prorate and it figures all the date time stuff out for you.
Thank God. Wow. Interesting. Very, very complicated.
It's much easier for me. Buy it. It's complicated. Yeah.
And I'm implementing enterprise accounts right now. And that's even more complicated because you think about who owns the account, what you have access to the payment method. Like there's just a lot there. It's such a pain.
I'm getting that as well right now. And the enterprise is really interesting because they want lots of like functionality to like see if their employees are taking the course and not like that. I don't have that yet. And they're asking for it.
And I'm like, I don't want to build that. But also like they're buying like thousands of licenses from me. So yeah, it's a it's a you know what is also tough. Yeah.
Yeah. Yeah. South for the winner is like these go in South and Denver right now. And the best way to determine if your code is gone south is to use a tool like log rocket.
Unfortunately, I guess rockets don't really fly south. They go straight up. But log rocket is the tool in the service that allows you to get a handle on the errors and bugs that are happening in your site in the most visual of manner. Let me tell you I'm a visual person.
So this is the kind of tool for me specifically because I like to see what went wrong. I don't just want the error log which you do get. But what you do get is a session replay a video replay that is scrubble along with the network requests along with your Redux store along with any sort of console errors. You get all of that.
And anytime an error is happened on your site, you can see that. Now one thing that we like to do on our own implementation of log rocket is attach an identity to a user. And so that way when a bug comes in, we can see that bug happen on what specific user actually triggered that bug and then we can see what they did to make it happen. And if you want to try a log rocket yourself, head on to log rocket.com forward slash syntax and you'll get 14 days for free.
So check it out. Let me tell you this thing is super duper cool. Absolutely love this service. All right.
Next question here is from be. So be I feel like other developers code is always shorter, better structured and easier to read than mine. Any tips or resources on writing good clean JavaScript code or any functional programming language. My this is often referred to as the gap in design is the gap between your aesthetic.
This is like sort of a loose interpretation of the gap. But it's a difference between your your tastes and what you're capable of producing. I guess is the easiest way to say it. And so I often felt this way.
A lot of times I'd see especially in the one of those sites like Code Kata or those ones where you'd you'd do code challenges and I would produce this behemoth that's 30 lines of code and then you see somebody figured that out in one liner with a dot map and a reduce or something and you just say, huh, I'm feeling really, really bad about myself. But the important thing is that we're all on a journey here to learn code. And specifically we're always on the journey to improve. If you're not looking at the code you wrote last year and thinking, Oh, what was I thinking?
I could do that so much better right now. Then I don't know if you're progressing enough because I do that all the time always feeling like I learned so much or gotten so much better. Any refactor of my code always feels like the code is so much better. So one thing I would recommend is to read code from those kinds of sites.
I like those code Kata challenges. You can read those things, those code tests, see other people's solutions and don't just look at the solution and say, Oh, okay, it works. But actually look at what they're doing and why and see if those kind of things really take the time to understand it because the more time you put into understanding the reason behind it, the better opportunity you'll have to make those same decisions yourself in the future. No, another thing I really love myself is the clean code JavaScript repo on GitHub.
I've referenced it several times. I live by this thing. I absolutely love it taught me a lot about functional programming in general. But it mostly taught me about writing good clean JavaScript code.
And I absolutely love this repo. So check this thing out. I'll link to it in the show notes. Yeah, I think with this kind of thing, especially if you're just learning, it sounds like you are just learning.
Don't sweat it. You just have to make it work. However, it is that you can because if you're just trying to like if you're just like stressing out over like, Oh, I could do this in less code or I can make it more beautiful. You just don't know how to do that yet and you'll get better and better as you write more code and the resources.
I'm going to plug my own stuff because I think it's legit good. You just need to watch other people code and read other people's code. And I think we'll go doing my JavaScript 30 course is good for this because we're in the headspace of saying, OK, we've got this array of objects and now we need to filter them and attach it, make each one into a div and then attach event listeners to the button inside. And you're like, OK, I'm in the headspace.
These are three things that we need to do. How would I do it? And maybe try to go do it yourself and then see how I would do it. Certainly mine is not the best way.
Mine's not the only way I get emails all the time for people being like, why didn't you do it this way? And like there's thousands of different ways to do things. And mine is just one way that I thought was a good way when I recorded the video and you'll learn a lot about that. And you also learn not to really sweat about that kind of stuff as much anymore.
Just watch other people code and look at other people's code like Scott said and you'll get better over time. And like Scott said, also, it's just a constant change of, oh, I would rewrite this thing over and over and over again. This is one of the reasons why I love refactoring so much. You know, it's a meme at this point, how much I love refactoring.
But honestly, I love looking at old code and being like, you know what, this thing could really be so much more elegant with every dues with a map, whatever. So, you know, that's just me. Next question we have here is from Brian. Both of you have CMS backgrounds, Scott, which was with WordPress when you were moving.
When you moved to freelancing, did you build for clients using a CMS or did you create a custom admin interface for clients to manage their own site? You mentioned some headless WordPress in the past, but what was the norm? Thanks for the great show. Okay, absolutely.
Don't create your own thing. This was a big thing back in the day and I have worked on tons of custom K-PHP CMSs because everybody out there thought we could make this own custom CMS that our clients would love and we could charge them 50 bucks a month to actually use it. And WordPress went out over that. And I think we're also starting to see that now where there's a whole bunch of headless CMSs.
And I don't think that that has been finalized yet in terms of like, what is the one that everybody is going to be using? So, if you're doing freelance, absolutely don't build your own CMS. You're just going to be reinventing the wheel in terms of file uploads and drag and drop reordering. Like, just I'm thinking you upload six photos to a field and drag and drop reorder them and then add captions to each of them.
That would take you like three years to code that yourself. Don't do it yourself. Absolutely use something off the shelf. Yeah.
I know one thing I do stand for with this is not creating something custom, but not necessarily customizing what's there, but limiting. Your users options. So specifically, I don't, I know this is possible in WordPress in different ways. Drupal makes this very easy, but I always would whenever I would pass off a site to somebody, you have one person, maybe that's techy who can have access to everything, right?
This is the administrator. But a lot of the times the people who would pass off a Drupal site to somebody else wouldn't realize that that person is going to get very confused if they load up Drupal's back end and see a thousand different options. So I personally always took the extra time to really fine tune permissions, but also the display stuff within Drupal. If someone's a blog post editor and all they need to see is blog posts, then do not give them access to the other stuff, the anything, right?
Give them access to what they need to have and give one person the ability to have access to everything else. Because then it is a custom backend as in it's customized to what those users are needing, but it's all built in in the same system. You don't have to worry about the whole custom code aspect. So definitely something that I highly recommend is really fine tuning those permissions before passing it off.
Ain't nobody want to have a whole big list of Drupal stuff or WordPress stuff in front of them if they don't know what it is. All right, last question. Hey, Scott and Wes, you are obviously very successful with your course careers. Yes, thank you.
But do you miss client work? If people for some reason ever stopped buying your courses, which they won't know you're crazy. No, would you go back to client work? And this is from Andre McNamara.
No, this is a tough one for me because I love doing the course development. If I didn't get paid for it, I would love to create more free content. I love making courses. So it would be really tough for me.
You know, one thing I don't like about doing client and freelance work specifically is I don't like having to keep track of all that stuff myself being a manager of myself for client communication, whatever. If I worked at an agency, I would be okay. I would be fine having somebody else as a project manager, somebody else to just say here, push this code here, do this stuff here or whatever. But to be honest, I've grown so accustomed to working on my own code projects the way I like to, being able to explore and whatever, I would have a hard time going back to that life.
That said, I would probably just pick up the agency work like I did before and I would crush it just like I did last time. So yeah, the one thing I miss about client work is the ability just to start fresh, especially because the types of things that I was working on was mostly I would come into a company and build something either by myself or with their team. And then we would hand it off to internal team to be maintained, which is a dream because maintaining software is not as nearly as fun as just creating it from scratch and beginning to choose all the technologies and stuff like that. So I certainly miss that aspect of it.
If I were to stop selling courses, would I go back to it? Probably. I probably would also try my hand at creating some sort of application product. Yeah.
Product something like that. Something I haven't really done and it's somewhat appealing to me. There's always this idea in the back of my head to like productize my course platform, which I'm not going to do. Don't email me about it.
Everybody. It's us. But one day mine would be better. Mine would be better for that.
Why? Because I don't know. I'm just joking. I don't know.
I got to back it up. Okay. I was just trying to pump up my course platform less in. You didn't want to go along with it.
Oh, no. Sorry. I wasn't having that. I would probably like go down that route of building some productizing something like that.
It would be pretty good. But yeah, I definitely do miss client work every now and then. But I think I could go back to no problem and be pretty successful at it. Yeah.
If I were to say, do I like working on client sites or level up tutorials more? I definitely like working on my own thing more even though I happen to refactor it all the time. But just because I have this huge sense of ownership and pride over this thing that has been my baby for so many years now that like I will, you know, do anything for the site. I worked so hard on the site, whereas like a freelance project, if you get it, you don't always have that and you're just like, all right, this thing's going to be out of my hair in a month anyway.
So let's just get it. Knock it out rather than this like full on ownership or something. I guess if you have a long term client and agency or something or long term client, you can definitely get that, but it's not going to be the same as your own course or your own platform overall. All right.
Let's move into some sick pics. What do you have for me today? Sick pics for those of you know, no, this might be a first episode. Sick pics of the stuff that we picked that we like could be anything.
A lot of times it's podcasts or YouTube channels or something. This is a TV show and this is a TV show based on a series of other shows. So I'm going to call out one specifically, but all of the shows in this series are fantastic. I absolutely love Ariel America.
You know, I spelled Ariel like the font in here for some reason instead of Ariel like above. Like the fish. Yes, like the fish fish. You mean they're fish, aren't they?
Yeah, I guess so. But how many times you ever heard somebody be like, oh, yeah, that fish. Let me tell you, Ariel America is basically just like, I don't know if they're drones or helicopters. They're above shots of every single different thing in the United States, different states, different.
There's one on just Yellowstone. I recently watched one on Alabama. I've never been to Alabama, but why I can't I've driven through Alabama. I've never hung out in Alabama.
Let me tell you, I learned a lot about Alabama from this thing. There's so much going on in our country of the United States is where I live that I don't want to say out. I'm going to either way. There's so much going on that you don't know about that is absolutely fascinating to see from an aerial perspective from all of the different nuances of the different states.
I'm a huge fan of the Michigan episode as well as the Colorado episode, as you can imagine, totally not biased in either of those declarations. But check this show out. It's on the Smithsonian channel. I get it on YouTube TV, but it should be available in a lot of different places.
And if America isn't your thing, if you're like, screw America or just a gentler version of that, there's also a whole bunch of other stuff. Let me see what else is there. Yeah. So if you're not into learning about the states, there's Ariel Ireland, Ariel Britain, a whole bunch of these.
It seems like they got their whole thing figured out in terms of like what works with these, but there's so many different ones and they're fantastic. And I highly recommend this. I'm going to stick pick an iOS app that's called streamer for Chromecast. So one of the biggest downsides to having iOS is that if you want to mirror your phone, you have to do it to an Apple TV, which I don't want an Apple TV.
I got Chromecast everywhere. My family has Chromecast and often what happens when we visit my family like this past weekend, I was on my parents' place and we're looking for somewhere to rent for March break down in Florida. And what happens is like I'll bring up the app and I'll just be scrolling through listings and I want to show the four or five other people in the room. What's on my phone and you can't mirror your phone to a Chromecast.
You have to mirror to an Apple TV. However, there's this app that came out. I don't know when it came out, but it's awesome. It takes advantage of the screen recording feature in iOS.
So it takes a screen record and it immediately pipes it into a Chromecast. So it enables just like perfect screen mirroring from an iOS device to a Chromecast device or even the Google Home with a screen. And this is amazing. I'm so happy.
I tweeted out and I got 5,000 Android people being like, yeah, we have that already. And it doesn't go into the operating system. It's one click away. iOS makes you download an app and click like eight things to get it.
Yeah, Android rolls in there. So it wasn't even possible at all. Like this is a bonafide hack in order to get it to work, but it works great. I'm so happy to actually have it up and running.
So check it out. It's called Screamer for Chromecast. Nice. Yeah.
I must have I used the Android functionality for that all the time. So I've been missing that my iPhone. Yeah, you should get it. I got so many people tweeting me being like, why would you need that?
Or some guy was like, why don't you just do a video and then play the video back? And I was like, that's not what it is. The same thing. Yeah, I know.
I know. But I love it. I'm so happy to have this. Cool.
Shameless plugs. I'm going to shamelessly plug my beginner JavaScript course is at beginner JavaScript.com. It is the fun exercise heavy approach to learning modern JavaScript from scratch. A whole bunch of people go through already.
It's a big course. So like I had a wait a couple of weeks to get like the first reviews from people. I also see people jumping around just to the things that they want, which is, which was my hope with this course. You just like, I need, I need help with hoisting and functions.
And I also want to do all of the exercises just to learn a little bit more. And then you see people jumping around, which is cool. So check it out. Beginner JavaScript.com use coupon code syntax or an extra 10 bucks off.