ADDI: It looks like tech is working so I say we just roll with it. Cool, let's do it. Alright so we do not have a name for this series yet, so I'm going to go with we do not know what we are doing. And then we will take it from there and see if it sticks or not. We will do quick introductions real quick, and then get into chatting with Anna. I am Addison Berry. I am the CEO for Osio Labs, and we are the creators of heynode.com. Which is a website that has an entire course of tutorials on data brokering with node. Currently all of the entire course is free, you just have to sign up with an account and you can learn to your heart's content with all of that stuff. So that's for me. Blake? BLAKE: Yeah hi, I am Blake Hall and I am one of the developers at Osio Labs and also a trainer. ANNA: Hello my name is Anna Mykhailova I am an associate Director of Technology at Kalamuna and also I do a couple of articles on Hey Node. So that was exciting. ADDI: Yeah, and it was super helpful. Thank you. And she does lots of other super helpful stuff I want to put out there. But we are going to focus on Node stuff today. So, I know that you are also a Drupal developer, so I am curious how you actually got started using node? Or which came first? ANNA: Well that was actually surprising, Drupal brought me to node. Because at some point all developers stopped writing CSS and using Compass to compile Sass, and so switched to the node compilers and this is where I first started actually using node. I kind of touched node a little bit in college, where a professor assigned me to do web socket applications. So that way we could run a node server and put web sockets in Drupal, but that was just fun. But I never thought that I would be using it in real life. Then I got into Drupal, I was kind of doing a lot of Drupal backend, and suddenly node creeps back up into my life. And brought [indiscernible] compilations and this is where we started kind of diving into more complicated stuff with node. And then suddenly Drupal entered the era of decoupled and components and other things and this is where we started thinking of running Drupal but also a node application. And then it's evolved into the situation where Drupal is used as a CMS and we're using something like Gatsby on the node stack to actually host the static version or more hydrated version of it. So that's when node came into my life. ADDI: Cool, awesome. So what was it like for you learning node? I know you said you had touched on it a little bit in school, but you didn't really have to use it until you were doing real work. So what was that experience like for learning node, was it easy or hard? ANNA: It wasn't very hard. I find that you know node is very special, because you can't think—like people start thinking of it as a library like as another JavaScript library but it is not. It's really like node people don't really understand that before you start learning it it is not just a JavaScript library, it is like – it's almost like another programming language that has its own server capabilities, it has a lot of concepts that you need to learn that eventually differ from what you're used to, like a lot of things that I think in the instance of asynchronous, and that's the biggest strength. Instead of trying to write things in like this sequential order, you have to rely heavily on the callback, and the on promises and other concepts that are typically new to standard developers. So that's what is hard, is kinda shifting your mind with how you write and organize your code from like this and that and that and that, the more synchronous and then anticipation of certain results and then attaching the callbacks based on those results. That was a learning curve, and also the new concepts like streams and events. I know hooks are mostly like you know similar to events and also events in Drupal 8, but a lot of events in node are done in a very robust way with all the event loop cycle is another thing. So in order to really understand when code is going to be executed you need to kind of dive really deep into it, and play with it. Otherwise you will not know what is going on, so that was really hard to just kind of reach into a different way. Or different sorts for them I guess. ADDI: Yeah yeah, for sure. Does any of that ring true for you Blake? BLAKE: Yeah for sure. I think it's a very good point to notice that is definitely more robust than just sort of your typical JavaScript library, it's more like an entirely different programming paradigm and once you kinda wrap your head around what is going on and how you need to structure things, it is pretty cool how much you can do with it. That's for sure. It's different. That's the truth. ADDI: Cool, so Anna is there—through that process I guess even since then, hasn't there been anything that you found particularly tricky or hard to actually figure out? Like I need to do this thing, and it just seems really hard or complicated or impossible within node? ANNA: Well, I think it depends on your tasks. So a lot of things are harder at first when you start node and I find that often promises are hard for me, especially like not a simple promise but when you start you know organizing them in chains and trying to use utilities and Promisify. This is what's hard, to kind of figure out how to change them the right way, then you start Googling broken promises. [Laughing] so that is what is hard for me is to just make sure that it works, because sometimes I find that promises have thrown very cryptic errors, like that cannot be attached to this or like okay, what does it really mean I find you know that PHP errors are less cryptic and tells exactly what broke, but with node it's a little bit of work digging. And another problem is sometimes it breaks, and it returns this underlying layer of C++ that is broken because like a lot of processes under the node, behind, like under the hood, are written in C++ and it starts spilling those errors out and they have completely unrelated things and there's something wrong with the dependency or something like that. But those are hard to figure out, and sometimes it's like sometimes I don't know what you need. Just tell me what you need, I think debugging is probably the hardest thing. BLAKE: That is true regardless of programming language or environment any time you are in a new situation, debugging is always sort of tricky. ADDI: Especially when don't know what you're looking for because it's so new. BLAKE: Yeah exactly I think one of the things you kind of hinted on Anna, was that the dependencies that you are working with and node are much different because the libraries themselves tend to be so small. And releases come out so fast that fairly often you can have an issue with the dependency and the error message that you get doesn't necessarily point you to the place that is experiencing the problem. So it's sort of a little misdirection going on. ADDI: Do you, I guess this could be a question for both of you, but like for figuring out and debugging and weird errors other than Google, is there any other way to do it? Other than Google? Like how do you debug it? ANNA: I typically start—and this is not the best practice or science at all— I just start copy and pasting that into Google and hoping that somebody in StackOverflow or somewhere else just got the same error and say oh that's that dependency and then phew and I just update but if I see a bunch of C++ errors that are very cryptic very big it is typically a hint that there is a dependency problem so the first thing I do is I just delete the local package.log, and I run npm install one more time and see if that is just like bringing all the fresh dependences and that fixes it. Or npm audit just go over everything and fix that, sometimes it works. And sometimes it doesn't. But I feel like it's almost like installing new dependencies is almost like as if you cleared caches in Drupal or something. You can't always do that, but like sometimes that's just the first helpful step. If that doesn't help then yes, lots of googling and lots of time just looking through the issues for different dependencies since they have them on GitHub to see if somebody noticed anything. Also switching to a different version of node is possible sometimes like all of the projects I find, I have like latest version, but I also have node version management on my machine and like if I start compiling and if it doesn't I typically go a couple versions down to see if people didn't include version restriction in the installation and found what I was supposed to use. And I find that like if I get down to 11 or 10, that typically starts compiling. But not always the case, but that's kind of some tips that I use. ADDI: Cool. Thanks. So when you were learning or now as you continue to try to learn things like about node, do you have some resources that you've just found useful to figure it all out? ANNA: I find that node really misses big robust courses, but a lot of people just like to talk on video on how to do that. I know that there are some resources like LinkedIn Learning but those are mostly, you know, quite expensive and not everybody has access on a day-to-day basis. So, I tend to go with node documentation and StackOverflow for day-to-day problems because I think everybody does but also like GitHub, issue queues, are very very helpful. If you want to learn something like a concept, medium is a very good resource as well. People post a lot of interesting articles there, but as a problem I think with node it is so broad that it has so many things in it that you don't really know what you need to learn. You're just like start learning and it's like oh my God, I have to learn this, this and that and often you don't know where to start. So in order to find the good article or you know the good tutorial, you actually need to know what you're looking for. That's not always the case. Not specifically. ADDI: Yeah. Yeah knowing what you don't know is like the primary problem to learning. Just anything, anything that it is, right? It's like I had no idea what I'm supposed to be learning. And then you don't know the right word to even Google it. Like I know I need to do this thing, but you're totally using the wrong words and then your Google results are totally useless until you stumble across something in your like Oh that's what they call it. Now finally, finally I can go find that thing. Yeah. I am also curious. Do you have other folks around you using node as well? In terms of like working through problems together, or you mostly like on your own in the node sphere? ANNA: We use node on our- almost all of our projects, at Kalamuna but we also have a lot of – well not a lot, some share of static sites that are compiled just through node. Because we have our kalastatic installation that is built on node So we do have people in the community I'm also in touch with the community on TwigJS, I don't know if you know what that is. But that basically it is a compilator of Twig but in JavaScript. So it helps applications build in node that don't require PHP to compile Twig templates and for example compile Drupal themes into this node application which is very good. So, it is very useful that there is a big community around it like the Drupal community that is around this problem, but they also are great ones and you know it's related questions because it's all kind of interconnected. So yeah I'm fortunate to have people to be able to help and yeah, that's really helpful always. ADDI: Yeah totally awesome, awesome cool thanks. Super useful information. That is all the questions I have unless anybody else has something else that they want to chat about? Thank you so much Anna, this was totally cool. I am so excited about this.