Skip to main content

Posts

Showing posts from September, 2018

Github, Issues, Pull Requests

My Issues with Github and Pulling my hair for it It all started when the venerable node.js implemented promise-based fs module. Shortly after, someone made Filer compatible with the promise-based operation. This is good. except now we need testers to ensure it works as expected. As an exercise in learning how to create issue and pull request on github, we were tasked to jump in and contribute. I chose to create a suit of tests for fs.promises.read() First strand of hair: the Beginning As this was my first time working in a serious project, I wasn't sure how things are organized in this repository, and I wasn't sure how to check if certain tests were implemented or not. I started my adventure in the node.js fs module that shows test coverage , and while it was an eye-opening information, it was unfortunately less relevant to the tasks at hand. So I went back and started opening up the test files in /tests/spec/ instead. I found many tests for the traditional call-back

Node.js, fs, promises

Node.js and fs Node.js provides a general programming environment that utilizes JavaScript to perform logical operations. This allows a web development to be done entirely in JavaScript instead of needing extra languages to perform back-end processes and services. fs is a module in node.js that allows file system operation. This expands the functionality of JavaScript from mere browser language to something that can interact with the file system of the OS. Promises, Promises fs module traditionally used call-back function for its async operations. It has recently introduced Promise object alternatives for more robust programming. Promise object allows easy-to-read chaining of code to address the success or fail state of the given function, among many of its advantages. Practical example - link(2) We will be using link as an example. Link creates hard-links of the existing files. We will assume the following directory structure: ./ - file1 - file2 - file3 Using the cal

Intel Parallel Studio 2019 meet Cygwin

Introduction Intel Parallel Studio provides pre-configured bat to run command line interface using Windows CMD.  The command is called 'icl'. To some, this is satisfactory.  To me, I need a better shell. Cygwin satisfies my need for a UNIX shell.  This post is about setting up a Windows system to successfully compile a simple code using Cygwin and icl, Intel C++. Largely, I had two issues: one minor, quality-of-life issue, the other critical. Quality-of-Life issue The minor issue is that I wanted to simply double-click on the icon to open up a console with appropriate environment.  The provided bat file does that, but for CMD.  I wanted to gear that toward Cygwin bash environment.  The obvious way is to open up the CMD through the bat, and then execute Cygwin.bat from the Cygwin installation folder. To have one-click icon to open up a prepared Cygwin bash console, we must provide appropriate arguments to the shortcut. Method Locate the Intel-provided shortcut fi