This is jazz party, your weekly celebration of java script and the web. If you like this show, you love the changes, its news on mono interviews, on some talk show. That's a lot like jays party. Now i'm thinking about IT find us by a searching for the change log wherever you listen the podcast big taker partner at flight I O launch your APP in five minutes or less all around the world. Learn how f light I O kay, hey, IT is part time.
Okay, friends, one thing i'm obsessed with now is using notion A I. Yes, i'm a notion user, a power. You would say I use IT for myself.
I use IT for change log and IT, just so effective to organize everything. And with the addition of notion A I IT is a single toll doit. All searches across notion, other apps generates my style.
And unless as PDF and images, and can share with me about anything, now you may know notion as the perfect place to organizer tasks to track or have is to right beautiful dogs. And all the things you could do with notion, but adding notionally with the context of your work, is simply revolutionary. And unlike special tools or legacy sweets that have you between six different apps, notion is seamless, ly integrated, infilling, flexible.
And yes, IT is beautiful on the eyes. And yes, I am obsess with notion AI because I can pretty much ask IT anything is just there for me. It's superfast and is relevant to all of the stuff I have inside notion.
You can try notion today for free when you go to notion 点 com flash party, that is all lower case letters. Notion 点 com slash G S party, try the powerful, easy use, and we use a link your support in the show, which is awesome. Notion don sas party.
Hello, party people. I'm jered, your internet friend, and i'm joined today. Bye, half of the teen behind an awesome document called the nine node.
Pillers, maybe you heard of them. Taya is here. what's? Tao.
very happy to be here again. Everything is absolutely fantastic. Tic, I just came back from island for the no, just close submit.
Nice, always the last to have human tail. Frequent guest here on J, S. Party and a first time guest, natalia video, who is the lead owner, the java script D, X and dev tools at azure. Natalya, welcome as well.
Thank you. Thanks for having me here and very excited.
I'm excited about this document, this piece of work you all put together because I think it's excEllent for giving people foundations on building node apps in a proper enterprise ready way. We're diving to hopefully online pillars. I might take them out of order because some of them are very generic and I think applied to many kinds of applications.
And then there's some like no specific ones. I loved a hit, the generic ones first. So we make sure we get to all those and then looked back around. And you may disagree with me on that, matteo, but we'll get into that.
I do agree with you. I actually, you do OK. Let's get started. Let's get started.
So first, let's hear about quickly how this came together. You have four people writing a document whose idea is this?
Why do we write IT excepted, or how to go? The main idea was, was mine. And we started to in the a lot of ideas about, like you may be, I been doing this as for a long time, and helping doing companies, doing consulting before when I would be for platform tic, my start up, I started to, I did consulting for a long time.
And basically I collected a lot of bad, bad experience on what companies do wrong with no G. S. And then I decided, well, I there's a lot of bad open onions out there. Okay, so maybe we should spread good opinions.
So what can I do about that? okay? And I said, well, if I just write them, then maybe I just, my opinion, just take a group of people to write them, okay? And therefore, uh, here we are. At the beginning, I think they were less than than nine, five. We stated with .
a lot of number.
We have nine and nine and a good number.
As a good number, especia literally nine node pillars. Tell me, how do you get involved?
Well, i've been collaborating with my tail for for a while already. I was since I joined assure, but I think a little bit earlier, also following him because of his work in the technical sterling committee. And I been working with no J S.
For very long time, actually an enterprise for more than a decade, I said web must take off the time way before that. That wasn't with no J, S, but anyway, with java script. T, and yeah, I ve also seen everything, all the beat falls, all the beds, all the goods, actually leading the consultants.
Y at the front and team or the department with a consultant back in the day with we've leading enterprises during a lot of stuff that yeah basically ruin their applications and try to inform people how to not make the same mistakes they did and wait, right? Because i'm not gonna say I never made any mistakes. I probably made a lot of the mistakes are trying to avoid people to make in the future.
sure. You can't really know good until you've known bad. You know like you've made the mistake and you like all that's not good. Let's not do that anymore. This is very much the hard one learning process, and not all of us have to go through that every single time.
Of course, certain things you have to learn on your own, but if you can clean from people who have made the mistakes, how to avoid them in the first place, then you're ahead. And so glad that you all put your knowledge into this nine pillars. Now I want to take them out of order, but are they ordinal like that one through nine? And once the most important meeting.
or marketing decision on the orders of them, there might be something that comes before the others, but it's mostly put on what would resonate more for people of the building that year.
So i'll will read through them very quick. We will then discuss as as we see fit, no way we're going to comprehensive and cover all nine extreme depth. That's what the document is for.
So of course, to our listener, if you've learned something from this conversation, go dive deep into that and pull out some gems. But the nine node pillars, one do not block the event loop. Two, monitor node specific metrics s and act on them.
Three, use node L T S versions in production for automate testing, code view and conformance as much as possible. Five, avoid dependency creep. Six d riskier dependencies.
Seven, avoided global variables config or single tens. Eight handle areas and providing animal logs, and nine use aps specifications and automatic generate clients. There you have these folks, nine pillar of a good enterprise ready, no js apps.
Now I think some of these are good for pretty much any application. I think some of these are no specific meteo. Did you agree with me? I couldn't hear you disagree with me on .
the I absolutely OK. Some of them are. So this is something to say. Okay, some of them are like the principle might be genetic, right? But a lot of the content within the section is no specific.
So while the principle might be genetic, the content in there is no specific example on how to implement that principle. So they were worth mentioning anyhow. So let's start .
with the ones that I think you're the east generic and we can dive into all the note details, and those are the ones like avoid dependency creep. This is number five for you all. And certainly that to me is like a universal thing for all offered development.
Avoid dependency creep. Same more italia. Do you see do you disagree what you think about this particular pillar of no .
J S S people that work with me? No, i'm i'm a hate are sometimes because I try to avoid the baLances at all costs. And of course, you're not going to reinvent the will and write whatever it's already written and maintained by other people.
And you know that it's reliable and you can add to your code base. But I think that we can i'm going to to say wee because it's it's a next system problem. We tend to add dependencies where we don't need them. We tend to not consider the cost of maintenance.
We tend to not consider the cost of being tied to a piece of code that somebody else is leading or a has control over the road map of yeah and that that's something that we need to keep under control and that's what we are tired. And that's you're absolutely right. That's not only a javascript of a system problem, it's a software development or web development general program. But ah it's a very, very important saying to keep in mind yeah .
and I ve ve spoken with hundreds and thousands of depth and we all kind of agree on this and yet we all find ourselves with on wheeled defendants cy, on a tail. Maybe the question becomes like how we agree that we should, but how do you actually decide? How do you do that?
That is a tube that is a very important thing to say. Okay, N, P, M, the community, and N P M, i've solved the problem that plugged the industry for decades. They how to use software that scale and this is, you know, but you know, whenever you there is, you know a big problems to solve, you need to say, okay, be careful what you wish for.
And now we have no modules full of, full of modules that maybe we use, maybe we don't, maybe we could get, we can get without. okay? And there are few things to say.
A lot of the time, some of the modules might not be necessary anymore because there are we have been nothing aps to know js core for a long time and also we ever been the web has been nothing A P S. itself. And therefore you know um let me make clear example.
Fetch is a fantastic spec, is a fantastic A P. I. Everybody loves fetch, okay? But whenever I open an enterprise code ways, most of the time I see anxious.
I missing unting. I'm pointing in an example and I love actus. I like actual. okay. I'm just saying 是 it's an example or the recently they still use the request module。 Now I just want to check how many time that request module, which has been deprecated ages ago, is still used every single day OK because it's actually a very good number. The request module is still doing load and seventy million times per week.
Okay, wow, that's the standing.
And it's been deprecated for five years, five years, these things being deported and is still being downloaded at seventeen million times per week. Okay, this is my this is the problem that some you need to keep those APP condenser and trying to reuse them a but you know, being, you know, smart in in you, what like makes you choices. What you do today, what you do two years OK things changes.
And you need to keep your code base liquid. In that sense, you can put things in stone. And a lot of team put things in stone and said, we, this is our cat and we decided three years ago, but you don't need this anymore, we decided three years ago and the staff engineer said, so .
yeah, this is why we are big proponents of web platform, right? Because, yes, first of all, go and check what's there that's that's future proof and then go and find that someone else were when when that's not support IT natively.
Are there hissings or best practices that you can give regarding dependency election or that choice to go search in pm versus just coding something? Is there a certain size or a difficulty level of a feature where you say, you know what, grab a dependency like festive y for instance, here you are gonna. I should go. Role on my own routing and H, D, P stuff for you say, Polly, grab, specify. Most likely you .
probably show this a lot of fun.
I probably would if I had a time, you know, because I do IT. I like, I did, you see? yeah. So I mean, how do we, that moment, that thresh hold, how do I decide, like you grab something verses, I should just build this.
I tend to not use the write code. So if I find something that makes stand, use IT. O, K, I use, I use IT from A, B, the cat. The question is, my standards, per usual, pretty high.
And therefore, I am like, whenever I use something, my question is, okay, if I adopt this, will I be able to maintain this thing? And this is the question everybody needs to ask. They adopt a piso software.
Especially a company, okay, if the thing is more, the answers always, yes, if thing is big, then you need to ask, okay, I cannot maintain this. If I not maintain, then who can and how can I get them access? And you know then he gets to, you know, we who I need to pay essentially the company yeah okay.
And this is important company versions. Individual developers is is a different mindset. You you need to reason about the long term stability of your project.
So if there is a problem and you can not know to solve what to do, i've recently been very, very, I I am in a fork tranz y so I most a lot of the time I like a module. Maybe I am. I necessary agree the, uh, some of the traces of the containers. And I doesn't IT fix IT make IT my own and that's IT fair.
Well, that leaves us to our next when we could definitely do a whole episode on this topic. And our next pillar actually is on the same topic, which is d risk your dependency. So mattell, you're kind of talking about dependency, your risk, you forget, and maintaining yourself.
Yes, larger the dependence, I think larger the risk. There are some things you can look at with regards to blast factors, for instance, like how likely is this to get abandoned but d risking your japanese natta a this is pillar number six. Speak to that point.
You know, in enterprise specifically, I think that one of the suggestions are, seems we would like to encourage stakeholder to do is to get more people involved in open source because you cannot understand the risks of using code that you are not involved with.
So if you're using X, Y, C, or you you decide you're going to be using X, Y, C module, go and investigate about IT, get involved, understand the the activity in the three point, understand the the security concerns that people may have brought forward for certain choices, design choices, architectural choices. And that's one way of the risky. And the other one is making sure that you understand that cold base, the turing integrating, because you're going to have to deviate, you're going to have to maybe make the decision of catching something.
You and if you have to do that, you probably want to contribute back at upstream, right? So everybody benefits from from um whatever you have solved, whatever problems you have solved. But yes, definitely getting to know the code that you're going to use. It's a and and then keeping a nie on again on system at large, whatever vulnerability you're going to having a dependency IT might be a Victor to access other parts of fear application, right?
Yes, yeah. Let me make A A very simple example here. As all you are full of, you know, express have been reputed the project at the changing leadership.
And one of the things that the new leadership did as soon as as they got on the on the driving seat was to publish a flurry of C. V S. Now a lot of people have known of thus of those cv the busy for a long time.
And what was the problem? Well, because the project was not really was not a good position. So this is one of the important things to look at is this problem.
Well, maintain are the maintainers can can do that. Tools can help you a lot like tools. I'm not talking talking about tools, but tools is the minimum.
But you need to go now. You need to go do more than the tools we are tools, tools help a tools help after the problem happened. Tools are like and and and and this is the famous men of the dark tape. Okay, and that on the on there, okay, but uh, you need to look at the problems beforehand .
most of the time and attention is statement around getting to know the code and to the risk. Gets another maintainers gets another team behind the thing, you know hop in their issues and say hi or just read about their the reasons for their motivations, who they are, why they built IT know what they're some people just put their intensions. I applied to maintain this for the next ten years or this was me catching my own IT.
It's free for you to use, but i'm one with IT. Like those kind of things are very useful to know in order to the risk. So get to another code, but also get to know the team or the individual.
You don't have to have a be on a nickname basis with them like mateo and I are, for instance, my festive y maintainer. But I know a lot, you know I know the team behind festival and that gives me confidence in the project. so.
Friends, i'm here with a friend of mine, like a grannis cofounder and C, E, O of work. O, S, we're big fans of work. Cos here.
Michael, tell me about off kit. What is this as that work? Why do make IT working?
West has been building stuff in authenticating for a long time since the very beginning, but we really focus initially on just interprets above le sign on sample authors. But a year to into that, we heard from more people that they wanted all the off stuff covered factor of password off you, blocking passwords that have been reused. They wanted off with other third party systems.
And they wanted really work with us to handle all the business logic around time to other identities, provisioning users and even more advanced, like road baste, to access control and permissions. So we started talking about that more, how we could offer IT as an API. And we realized we had this amazing experience with radix, with this, this API really that the components system for building front and experiences for developers, radix is downloaded tens of millions of times every month for doing exactly this.
So we glew ed those two things together, and we build off kit. So off kit is the easiest way to add off to any APP, not just next year. If you're building a rails APP or geno APP up express APP or something, IT comes with a hosted logging box so you can customize that.
You can style IT. You can build your own log experience to its extremely module er, you can just use the back in A P S, in a headless fashion. But out of the box, IT gives you everything you need to build a serve customers, and it's tied into the workers platform.
So you can really, really quickly add any enterprise features you need. So we have a lot of companies to start using IT because they anticipate they are going to grow market and want to serve enterprise and they don't want to have to rearchitects. They're all stack when they do that. So it's kind of a way to like future proof your off system for your future growth. And we have people that have done that, people that started off and like i'm just kicking the tires and in ah and they go close coin base or disney or united airlines or you like a major customer and instead of saying, oh no, sorry, we don't have any new enterprise things and were going to rebuild everything, just go into the worker st dash for and check .
a box and you're done a size on the fact that offset is just awesome or something is that is free for up to one million users. Yes, one million monthly active users are included in these other gates. So use IT from day one. And when you need scale to enterprise, you're already ready too easy to learn more at off cat dot com or of course, a work O S 点 com。 Big fans check IT out women users for free wow works dot com or off kit 点 com。
Another good pillar of many applications. Number seven, avoid global variables, config or single tens. Now, this was yelled at me very loud by my university professors, and I didn't really know why.
But I like, global are evil. Global are evil. And like, okay, I won't use them.
And here we are years and years and years later, and you all are say, and don't use global or avoid them, say, why? why? why? why? why? So they're so handy. They are useful, they so easy. Who wants to .
take that one? I since here, hitting yourself.
hitting something .
on his head, as I thought, I, this is insane. okay? The amount of javascript application on nog s that are full of global, the stick databases in the global cup, the stick, you know, they do require through how the system back and forth without any possible control of how the data, how the project is booted inside up is everywhere, okay, code bases that an absolute becomes an absolute mess in no time because, you know, oh, I need some data that's part somewhere.
Oh, I just exporting from my module and then required up then I don't know, ten thousand interaction later, the code base is intaking able. And now it's a problem of note and you know and no, that makes the older problems and therefore you need you know whatever else to fix IT and turn IT into you know, movie from jassy to that yeah something that but reality is you you probably did not apply any structure to your code. This come from the history of javascript OK.
On the broker, we can use lobs, okay? One global one user, one global OK other on on node. Probably not. okay. And then in order to support this pattern, we have to invent all sort of things to make IT, you know uh, feasible for user to use global without having actual globs so that they can have a nice ax and a nice x called having global.
Now okay, for some framers, but the reality is we have a lot of a syn clock magic behind IT to make IT up and popular frameworks. Ers, as if you want the headers of a request, you can just call the header. Ers function important from a market.
You get the headers. Fantastic, right? How come like to make that happen? okay? There is a lot of state being handled behind the scene, so the right request get the right others. And it's a lot of complexity behind lot of performance that being lost by providing these kind of developer experience, okay? Most of because developers loves global, okay?
And it's it's so convenient.
It's if you want to avoid if you want to avoid this kind of stuff, don't do IT, okay? The other problem is no one equals production. This is another one of mine.
Uh, I don't know. Italia, you want to talk to talk a little bit about this disaster. No, that we production .
same to tell you.
I think that to you, you are very good at explaining why know them shouldn't be used. And I would like you to elevate on that. But I would think that I really like that you made a distinction about was the use of global in the Brown or the use of global in O G S in the server.
That's the different stories. And we've seen a lot of our engineering on the browser side to manage state, which I would just wanted talk about because i'm gonna. But but that's for another type right through uh, another episode. But yes, it's very, very important to not polluted to understand Scotts right before you start right before you start right into a scrip. And I got at a lot of also of people angry at me for saying that before you learn frameworks, straight to learn to those mechanics of a jealous script.
Yeah, right. Well, tail is on the very interesting, which is, I think, how we get into this mess is that what works in the small does not work in the large. And what he said was a thousand iterations later or something like that or it's like when you started IT made sense in that small little.
This is just a single file. I'm just run a little node server. I'll have a global for my data base, and we find and IT is fine at that scale of code.
And then we take that and we just like one by one, add to, add to and we kind of grow these organic applications out of a single file and a thousand iterations later, you have a huge mess on your hands, and you did not think about the structure ahead of time when I was small, and comes back to bite on. And of course, blame the entire tail, said, but we get, I mean, that happens a lot. IT happens a lot.
And so yeah, how do we avoid IT? Well, you have to kind of know what you're ABS going to turn into eventually, and maybe the structure of top, or just avoid them all together or set no equals production at all times. This is what this document says.
But why? Well, they know that production is one of the biggest example of this pattern fAiling spectacular OK. Some time ago, long time ago, a friend of my tim goswell decided to add, no dam equals no. They don't have environment variable IT to a library connect. I don't know you everywhere are doing javascript when when doing know with connect.
Remember connect and I know him. We ve had him on the show, but lots be a boy. don't. So feel free to fill in the gaps.
fine? okay. So connect was the processor of express very early days. Okay, by the way, team, because, hi, you are a great you did a fantastic job. You a fantastic job for the community. So i'm started to put you on the spot for this thing.
But he created at this idea of, you know, we need to have this library make some different choices between the development environment and the production environment, which makes an absolutely, it's a great idea, okay? We need that. We need that.
No any APP these days as the development mode and a production mode. okay? 没有, this is great.
Idea is great. Then something possible happened, a few people thought over, that's an environment. So I can, ada staging environment figure of my data, be selected by. And that's the disaster happening because they also, people think that the environment is a server running somewhere. The java keep people think the environment is my computer and is is basically a big language barrier, big language problem of another lap of two terms with two completely meanings.
So to resolve that, you just set a production at all times everywhere.
Yeah, don't use IT. And that is a specific conflict that use that library, don't use use that module please, guys. You, you, you will make yourself you think you have begin being in trouble.
There's a lot of people using IT by way. How then do you go about achieving the same goals of like, well, it's differed in death and is out there in the real world.
Oh, you can use whatever you want, really. You can even use no that in with that specific meaning, but then you have true meaning that either that or production IT is no staging okay, because then your staging makes nothing okay, because a lot of libraries in the coast stem will react to that specific react will react the specific real, specifically OK. And it's if you don't set IT, you will get very different results. So you need to always set IT for your final for your when you are deployed gona server. That needs to be always set even if if you're staging environment, yeah well, that wise, your stage c violence is not equal to your production environment and then you are in trouble.
I've actually fAllen to that exact trap or at a stage environment, but I had to set the environment to production in staging in order to get IT to look like production. I can't set to staging because things don't work. So I can feel what you're saying.
I have felt IT. And I agree with IT single tens. Same story, different thing, right? So pretty much the same, I think we can skip that one.
Let's move on entirely less. We don't get to online and I become a liar. Number eight, handle areas and provide meaningful logger.
This just sounds like, you know, breathe, eat food, but once foot from the other. But sometimes we have to state the obvious, and often times as device, we're in a hurry. We have things to do, features a ship, and we have a propensity, I limit, to be a little bit lazy sometimes.
And we know that error is not going to happen very often. What's the big deal? Nota, you anna, kick off on this topic, handle eras and provide meaningful logs.
Even if if the error happens once, that's IT right. But just, yeah, just once. I think IT can't IT.
We are not good sometimes at handling errors all the way from the data. The A P, I, the application. So we should start they are very low level and go up. And of course, you need to create meaningful logs in order to simplify your life at the time of divagation.
But also because because we're build in applications that are going to interact with users, right? And you also want to hand pass that to the client and and make sure that everyone understands what's going on at all times, it's essential. Error handling is like a set like like breeding for developer IT should come naturally, should be top of mind. And there were a second salt and certainly .
part of a replication and not too big of a person to admit that i've just pointed on irs plenty of times throughout my twenty plus years of coating. Most of time when I don't do something with the error is because I just don't know what to do. I was like, what what am I going to do if is actually error?
I don't know. Council that log error and move on. But do you have advice on air handling? I guess it's very contextual. So maybe you can give genre advice, but have you ever come across the situation and you're like, I don't know if it's errors here.
what do we do? The biggest problem is knowing that somebody would catch your errors, like especially with long a promise chains and longer think await. You need to know that somebody at the end catching your things, holding the bag, beauty, yeah.
The other point is implementing a Graceful shutdown pattern. It's very important for your application most of the time unless you don't want specifically don't want to do that. But I would not get into the case. So when an error happens, okay, and it's not caught, IT will crash your system. IT will crush your your node server.
What you want to do, you want to try to line as Graceful ly as possible, which means typically stop accepting new connection, stop accepting new request process what you have in flight, okay, and then IT and then okay, but don't you know otherwise? If you have ten connections running at the same time and you cut them. They will not get anything in their hands.
So that typical is a problem, like a lot of people solve this problem. I H i'm just using running j in my lambda and I fixed IT. They pay for that's a fix. But tother wise, you probably want to close with Grace.
You want to. You see that often, just this, this lack of Graceful exit out .
there all the time, really implemented incorrectly, which means all the time .
is IT hard. I seem like chat P, T, can do that for you.
Chat P, T can not, you no 是要 做 的 呢。
K.
what's good is a module linked. So what if the module, then you're good. But h there, there is a few other cases that you need to keep into your head when doing these things. And I and played well with that, you know, with the is on a lot of the other.
right? So the the more the story here is N P. M. Install close with Grace, the mother you .
talking about close with.
Yeah, there you go. One more dependent to hear you go ahead.
This is a good one. This is this is one that we allow.
okay. Um you also have a subsection here about what to do. You won't get into that because sometimes you're logging too much, sometimes you're logging not enough.
There's air, there's log levels. It's very detail, but not sure we want to open that kind warm here on the show. What do you think? Read the document? Yeah.
read the document.
Read the document. Let's move on. Pillar number nine, use API specifications and automatically generate client. This is a very opining ated one because you know automatic generated clients can be not so awesome at times.
But what if you don't like the A, P, I back? What A P, I spec should I use? Why can't I just hand a role thing all jays on anyways? Who wants to pick this one up? Because I think I agree with you, but I can see myself skipping this one in my own application.
Do you work alone all the time?
Because I I yes, that's why I I skip a lot of ceremony because I do. So yeah, not your target audience.
because this is for enterprise. So acts you are going to agree on, on what the shape looks like of the API. There is not that's true.
So don't ask me anything I say. I'm coming from the andy side. Go ahead. Tell us you need contracts. You need to have an agreement right on what it's going to say. And you, I assume, and you don't want to have to just invent that every time.
right? And you want to be consistent across your many A P S. right?
You want to use the same patterns. You want to make sure. You want to use the same exceptions. You want to make sure that you are that anybody that comes to work where you will understand right away how to to create that connection, server client or server server water.
So how do I pick a spec? There's open A P I. There's graphical for me.
It's OpenAI. But I think this is something we don't necessarily agree with.
Motel o might might be agreement.
But yeah, I open A P. I yeah, I say .
open A P. I look .
at that. What do you say?
I want to say graphical out. I just get I just wanted to have some .
disagreement on the show. I like honest IT IT really depends on the application. You can really just use something.
I just use something and then how to generate the clients. So what do we use on that side? I think there's probably propriety solutions. There's by lots of ways you .
can do that done I A maybe bias stopping him, but we are working on an open source generator and meter. A P, I shapes saying at microsoft disco types back, it's a tool to yeah defined an aspect and generating .
code is yeah .
type spect that I actually i'm gonna be speaking about the upcoming conference type type script. Paris, so yeah word we're just rolling IT out.
Cool scoop that one up for the show, not as well types back that I O material. You sign off on this. Do you do .
something I am I, to be honest, or might to do this, to play with that OK. I am more of, uh, open A P. I.
fine. Genetically, most of them from the ma. And it's all integrated well and nice.
okay? I also really like graphics too, depending on the you know on what we need to do as as part of the the implication is the use case, okay? So there is certain things that are Better expect as a graphic.
If you don't know how the data will be created, probably is the bright choice. If you have a variety of different clients and you know teams are disconnected with each other, otherwise, say open, if I can be, is actually pretty good. So IT depends on on the company, on on the use case, depends on the business, depends on a lot.
No, once I was fit all in in that discussion, just do something i'd like at some point. I was, I was chatting. And every single time, because of the process that they had the body that to do, they needed to add one more. I P, I call as a in from the consuming front from a company, was consulting with IT, took them four hours.
wow. Like it's .
literally money burned, like you're literally burning money. And I like something, you know, this is something that a computer should do. No, maybe even charge, but that can be even going to the point of if I need to enroll IT, i'd probably try to change you because because IT seems you know a lot of work to a lot of busy work. okay. I'm not delivering anything of any that point.
Yeah I don't want to hide, act the conversation of the pillars, but we we also rote them because working in enterprise, you understand how this is something that stakeholders, like economic buyers, like the the ones have proved in the time of developers need to understand. Because sometimes developer go and say, I need X, Y, C time because I need to write the specification, because I need to write error handling and so like, no, no, no, you just need to get the feature done and roll IT out. And no, because that's gonna do more money, you're gna be do you have the idea that you're going to be faster in the kid, but then you're gonna have to solve a lot of problems that to the ends want to yell with at the design, specification and architecture. Decision's face, which is an error in the arrow back to .
the same i've been repeating for years now, which is slow down to go faster. And it's difficult to get that across, but it's one hundred percent. The way to do software is slow down to go faster.
Well, lets go faster now. We ve reached the end. There's one more generic one. But i'm going to say IT for the very last because we don't want our listeners to fall asleep on us. Now talking about .
testing was a friends and party people. I am here. I'm sitting with deny grant cofounder and CEO of jam.
One of new sponsors, j dev is lik bug reports that dev's s is just too easy. Get jam for free today at jam that dev. So dane, how do you explain what jam is and how that helps teams be more effective?
Jam is the fastest way to capture a bug in a way that developers can debug IT faster. It's a browser pluggin that hooks into dev tools.
So when anyone on your team spots a bug, they can one click capture what happened on the stream plus everything in devitts council logue network requests session information and IT grabs IT in tool link that when you open up the ticket, you have every single thing you need to debug g, you don't have to ask a single follow question. This is ames who want to spend their time building new features, not fixing old ones. I think that the most impact a software engineer can have is on building the future for their customers, is on making things easier.
It's building what's next. And so we want to make sure that you're not spending your whole afternoon just trying to retro a bug. Instead, you've everything you need to just get started.
Okay, friends, go to jam that dive and learn more about what jam is doing for teams to make bubby reporting and all that funds of super easy, super fast. Get jam for free today. Jam that dev again, jam that dev.
Let's go back now to i'll call the no specific ones oh maybe not necessarily no specific more node specific back to the top. Number one, do not block the event loop course. Other things have event loops, but no IT certainly does as well. Yeah, this seems like a good one to put in, number one. So we wants to kick off on this topic.
Well, do not block the event loop is one of my favorite, but I can be a cat face, okay, if like most people do not realize on the develop works. And that's the reason why the number one, to be honest, when that is your call is executing, you are not receiving any doing any idea that they keep part of the event of. And other people don't understand that and they don't think that, that is a problem.
So they don't think that I don't know if something takes fifty million seconds of C P, U. Time to get done. This is always pretty fast.
You super fast to my machine. Outcome is super slowing production. Second, and a fifty million seconds, okay, means that you know.
You can do twenty request per second on a single machine. Now is twenty request on a single machine fast as low? And that's the point.
And and but if I try locally, fish me saying so was fast. Okay, like I was a few of those debates. okay. And and then it's that's the major problem.
Oh, you can solve IT do IT there is a lot of tricks and their listed there, but that might the genetic parties be aware that a problem? And if you think that you know most of the time is the the solution to your performance issue is the most obvious one. You have architected your application bra and you need really think your system so that .
he doesn't lock .
the I agree with you, I think that there are several people trying to IT d ate the community on how the event look works because it's so essential to right everything in javascript understanding how how in any logic, of course, how the stuck works in how things smooth forward or get stuck and why and and how to make sure you're not causing those blocks. But yeah, essentially also my favorite winner is their .
low hanging fruit. In terms of the haw, I know that the dog has the details, but is there like a common thing that people are always doing was just not understanding the event loop itself is the common thing.
not understanding the how how IT work exit coning, right?
We'll get out their folks and understand the event loop and you will save yourself a lot of pain. This might hold to be .
that because you understand your event loop, you might make different choices in the labor's that you're going to use because most of the time the problem is in your choices, you make choices. You thought something that was very good according to some parameter, then you learn something else, and then you see, och, maybe I made a mistake. Okay, well, at least you know .
now and you can .
fix IT that goes to one of your bullshit ts there in terms of things you can do is monitor event loop utilization. And you point out a few tools you can use in order to understand, you know, if you have no event problems currently and you pull in a dependency and now you have event lute problems, that's a pretty clear reaction to that. And if you're monitoring that, then at least you can see when that thing explodes and our slows down.
Yeah, I think you had suggested some tools.
We are moving essentially to pill number two, which is a good cycle. Yeah ah marty or not specific matrix and of them okay. The biggest number, like whenever i'm very often called to, can you for me why not just process keep crash hing okay or having good performance what you know what are you using to monitor and away the performance your system while i'm using genetic metics provided by, well, you know you're driving, you know with with you're trying to make choices of your road with a blind food.
So what you expect you crash, okay, you try to drive with the right you you looking at the wrong things, you're literally not watching what you need to be watching. And that's essentially what this principle about, specifically the event with the event, you need to know if you have energy application production, you need to know about what's the health of your and actonel IT. If you don't act on IT your rude and that you know you have no traffic and you have no users. And if you have no traffic, no users.
nothing happens.
I felt I built a few .
websites like that. No traffic and no users.
Yeah, no resources.
yes. Yeah, just everything along nicely. No, the load ever.
Just a little. What are the key matrix to watch? What do you care about and and know that? What are the key metrics?
Well, I said eventually motorized is these new methods that we had the recently most people done know about IT read study guys is basically a percentage of event loop that is processing events. Okay, IT gives us A A very immediate number. Then we want memory, but not at access.
Residents of size don't use that. That's orrible metric. okay? You need to keep an eye on that.
But to be honest, that's not the important one. The important one is abusive. S ept tal, because no. J S, we do all the memory that you give IT to hit.
If you, if you take note, you say, okay, not use one gig OK, yes, but yeah, I do. I D follow, I D follow of IT, okay ah, but then IT manus IT IT man, we've been all of IT with chrome. Okay, when you open a lot of chrome taps, each one of them can gig. Meg, right? It's about, anyway, truck how much much how much of that memory is actively used, OK truck .
that got to so when your noserags arts IT is going to allocate for itself a certain amount of memory and IT may be over allocated by a lot, I can say i'm using one gig by to RAM.
No, it's not like that is more you have one gig, you know typically happens in this way. Okay, you have a chunk of your application. You can name IT, uh H A part of application that allocates a lot of memory. Okay, that memory does not get cleaned up very quickly.
And then basically they got this collector of the eight thinks, well, you know, cleaning this thing up is going to take a lot of time so i'm going to park he there and you know, maybe in later that we have time to clean up and then, but there is memory available in the system. It's free. I can just get IT so I get more memory. It's very lazy. Backman.
so and then he all.
yeah that man right prefers to prefer instead of cleaning up, you know, IT looks like a to some extent looks like a teenager that prefers to you do something else than cleaning up your appropriate today.
Get some new clothes out there is clean the ones early on the ground.
It's exhAusting to be cleaning up. So i'm going to just you sweat out there free for me.
There you go. So the key there is heap used versus heap total. You're going to get less information out of the resident set size, which is unfortunately also R S S, but not really simple indication, of course, in context, that is not confusing.
But for us just talking about IT, perhaps IT is and of course, like you said, the event loop utilization, that's by the the big one. And then of course, CPU usage like overall processor being used, right? My typical stuff there.
All right. Let's move on to piller. Number three, use node lts long term support versions in producing this one seems like to me as the most enterprise of them all. But the alias got the face palm going on, thinking, people should just do this.
And yeah, I have seen so many instances of, you know, your your, I know, nice that is not working, then you go check what version of now they're using IT, of course, fifteen, seventeen, nineteen. But why is this?
But why, why I can answer that? I mean, because because you know that no one had something fancy in IT that I wanted to use.
right? That's right, but not in production right until it's releasing L T S.
So how what does L T S give us over non L T S? For those who don't know how, not just released .
all first several, the recycle, the long term support, which eighteen months .
right now it's and current version in six months then is supported for .
another two and .
half years after a hf OK.
But they only get um twelve months out of that as active L T S which means IT gets backwards of new features and and things is great and not .
L T S gets something like I think you wrote seven months.
six months, seven months, seven months. One month is I will call IT six months.
but seven months, months.
six months at six months plus one month of Grace time in which we also .
fix security OK. The slow.
yes, for the low folks. But to be honest, I would just cut IT. I would actually remove that if, if I, if I don't act, would like IT.
Yes, if you are the node release.
D.
D, F, L or something, you just ask that. But you are not right. So L T S, long as port, you get benefits like reduce risk breaking changes, enhance security, improved stability.
And I tell you just says, why not? Why not just use that one and get all of the goodness in production? First of the sixth or seven months, one six months of the tails in .
charge and there's also the people that use L, T, S, but they use IT for ten years, right? And so there, and so there on version day. Now, don't do that.
Keep your .
versions up to eight.
I go now, how is node with backwards compatible? I get new aversions of my breaking major changes all the time is at a huge pain then. But to upgrade what your guys is experience there.
I maintained the thing. So I can't, to be honest, we try not to break anyone.
Most of them too close to you, to you.
I close to you. I am I open up, but I if if we do and we are sorry.
but you need to consider there's going to be a point when you cannot all are backwards compatibility because otherwise you would never introduce any innovation changes in the specification. Like how do you do that? There is no way, right? You have to it's one thing or the other.
right? You want to innovate, you want to change.
you want to get that, that's the problem.
Get that types care support in there.
No, that's not breaking.
No, no, it's not breaking .
up because you don't use IT because you use a flag note to use rise.
That's right. It's up .
in so a group so fell like a personal .
g against .
solo all the way he's in .
the fig walking the .
figure at me on the type type stuff. So come on what no.
no. But I I am A T. I on the and .
I only have three job script users here. I'm also not on team type script, but mostly because mico host is not here in nick nessy is the biggest typescript fb way you could possibly imagine. And so we can't have that much agreement on the pot.
So I just take I just refused to use IT for that principled stance, prime only. And the fact that I don't like ceremony, and like you said I earlier, I of in death. So I don't need all of the hockey dorry team oriented things, you know which leads us to our last pillar, which is also generic.
But I let her for last because you know it's like eaten your broccoli although general tip on broccoli, if you don't like IT actually eat first because IT when is cold? It's even worse right when it's warm, at least. So here we are, automate testing, code review and conformance.
Oh, that's three pieces of rockley. why? Why do I have to do IT? Can we just kip that one to you?
A testing production?
要 了 要 了, as right as right.
If you care about your job, if you care about your job, don't do that as a good genetic principle of light highgate.
If you care about your body, you eat the broccoli, right? So I hear it's good for you.
Tell you what you take on.
you don't have to love IT.
but do you have to I don't love IT. I am not the way like I I am the person that always find somebody how to write the tests because I don't love the local, but you have to do IT and that no way around that.
What's the conformance part of this code? review? understand? test? You understand conformance.
Oh, you need to have you need to have .
standards.
You need to have well, yes, but you also you have to have conventions. So yeah, you you need to have conventions, you need to have standard. You need to any internal standards to your company that you agreed to, that put everyone in the same page on how we're going to do this, how we're going to write this. I were going to understand each other when we're writing code. I am .
reviewing IT, right?
How can you review something? If you don't know what's right and what's wrong.
then this is the world of tooling, right? Like tools help a lot with this. Otherwise IT would be like a bunch of little picky code reviews of saying, hey, we don't put our semi coins there, whatever.
So like linter style guides, pretty. Ca, also probably some bigger architectural documents where you decide here's how we're going to. We're not going to use single tins. We're not going to we're going to read deny node pillars, stuff like that.
Yeah, we're not gna book 点 文字。
Can I block the event loop? You have some sort of a chance that all team does that stand up, right? We will not block the event like, but simple and writing times on the talk, work on the family, right? So that were to the end of the nine pillar, a pretty job cover.
Of course, the details are what matter and they are in the dock. So we didn't want to just read the dock to all talk about IT. What about pillars that didn't quite make IT? I'm sure this is a clever or of process. I know you went from four or five up to nine, but certainly there was like a tent and 10 and all they are like, why not put in that in there? But are still good advice, getting thing left on the editing room floor that are still worth bringing up.
Very opinion once I think you type script could be a pillar in a sense. But but, but do you want to do you want to make people english like even yourself? No right. Yeah that we we said yourself, yes, but we didn't say, please don't use valid versions of nod s, which should be appeal and that's common sense, right?
We hold. Um I on time escape I .
want to be provocative OK I really like I time to join the experience of writing type cape one building, working with the team and building an application. I absolutely think that the author's ship story from a manta prospect, somebody automated N B M.
It's so much Better with javascript and writing the types as an manually that you know it's just like, okay, no, i'm probably not doing that like it's it's the old ship story so hard, right? IT IT makes maintaining these things so much harder. I can maintain a lot of the models can maintain because he just put java tain not a lot of in me.
But yeah that's probably my if I wanted to put IT as as an advice, I would you know that so required times he requires out of tooling around IT to make IT usable and that he gives you a lot of benefit. So that's true. But if I maintain tainted with a very little time, optimizing for time consumed is very often. Have you looked .
in the jsr the dino folks new registry and they're trying to make IT super easy to public type c pt packages.
It's it's a great step into the right direction. I have I think are essentially these that means less types scape of options and less um you know by the ability in the testing in the tooling and sons of all. It's a great step.
okay? It's ah we have a few note message to to deal with at the moment. unfortunate.
Have I have a option? O K, I mean it's great for library authors for dependency thors, right? But in your application, you still need to transfer, right? So you still need .
and yeah if you're .
an application.
absolutely.
So Daniel.
yeah, I think the sales pitch currently is on package offers. Is two package offers more then you're regular active who still, like you said yes, has the bill tools anyway? Very cool if you come to the end, anything left unsaid, anything you guys want to shout out or a link to in the show.
Now it's how to connect a horse platform. Matic is where you'll find the blog post. You also find IT in our show notes.
But anything else? I want to thank all to the other two waters. Okay, this Michael and James.
Now then everybody review this bad part of fit. It's been collaborate, collaborate efforts. okay? Yeah, that's probably my might take.
I want to make a key part, something very important that was not said. There has been a clear moment there movement there on supporting their maintainers financially. This is very important and that's been very something called the open source fridge. And I want to recommend major companies to contribute either a developed time or money to the maintenance of the common. Doesn't mean joining the pledge, but you need essentially everything use a lot of open source.
And if you have a critical piece and source that you rely on, sending some um money to the maintainers usually helps them a lot or even just give them a job and an opportunity to do that work as part of your team. No, that last part is more important because a lot of big companies do not put consider open or public open source as part of their promo packs, which is a huge, huge problems for a lot of people that wants to do this kind of good open source work. Look, i'm doing all this work, but this is not getting me any benefits at my job.
So why the heck am doing IT? And at some point, you get burned out and everything goes to you goes all bad. So that's probably my my last take. So please consider sponsor help, see how you can make the life for your maintainers easier, okay, and not try to be vampire and sucking the blood out of them and burn them out.
Well, said the toy. Any final words from you.
you know know. Second, that that pledge from market and also get get involved, get involved in open source very well.
Well said. Well, on behalf of tao an and and I don't thank you for listening to this episode of jays party. All the links to all the things are in your show notes shout out also to the other.
Collapse on the dock, I think, is an excEllent resource for the entire community. Thank you for writing that. I'm Jerry. This is the body and .
take next one 拜。
All right, that is jays party for this week. thanks. Having with us, did you know we are having a year and merge sale? All like merge is discounted while supplies last.
Get yourself or someone you care about some new threads for up to forty percent off at merch that change log up com big thanks once again to our partners at flight I O two or long time sponsors at century use code change log s on A N plan the freak on MC our shows wouldn't bump the same without you next up on the pod, nick and cable are back from react U. S. While there they had some great conversations which we are packaging up and will have ready for your year holes next week.