Posts

Showing posts from January, 2019

Release 0.1: My First Open Source Experience

Foreword Note: This section doesn't talk a lot about the code -- if you're looking specifically for that, skip ahead to the next section. I've always wanted to get into open source development. It seemed like such a cool thing -- programmers from all over the world, working together to create something. Anything . I would browse through GitHub here and there, looking at all the neat things people were doing. Sometimes I'd think about joining in, but I'd always find some reason -- some excuse, really -- to stay away. I was too busy, I didn't know the language, there are already plenty of contributors, I don't know how to use Git, I don't know how to set things up... And so on. Really, I was just finding a way to let myself off the hook and avoid confronting the real issue: I was afraid. I didn't want to make a mistake, I didn't want to make a fool of myself... And I really didn't think I had anything to offer. Logically, I knew th

Understanding NodeJS' fs.mkdtemp()

Despite having used Node.js a lot in the past few years, I've never actually dug deep into the fs library. I've never really needed to dig deep into the fs library -- my Node.js projects have largely been RESTful servers, which pulled JSON objects from a document database (mongoDB, usually). So when I was told to go research a function from the fs library, I was actually a little excited. ...And slightly apprehensive. I haven't had much experience reading code, so I knew finding the information I needed could be a bit tricky. Fortunately, Node.js has some of the most well-organized documentation I've ever seen, so beyond finding a few obscure files, I didn't have too tough a time. So, without further ado, let's get to looking at the function I chose to learn about: fs.mkdtemp(). What is fs.mkdtemp()? fs.mkdtemp() is a function in NodeJS' fs library. According to the official docs , it "creates a unique, temporary directory." Honestly, at