Using Chart.js to make and work with Canvas Charts with javaScript

These days I am working out some projects that have to do with analyzing text, and it would be nice to find a way to visualize that data with canvas elements. I was thinking of making my own solution, but I am glad that I have found charts.js as it is pretty much just what I had in mind, and seems to work great when it comes to quickly getting up and running with basic charts.

Still it is not to hard to work out a simple native javaScript solution also, so in this post I will be taking a quick look at chartjs, and will also be writing about a vanilla js option that I slapped together for the sake of this post. Chartjs is a little more than the minimum that is required to create a basic chart, much of what is added on is flashy bulk that might not be needed really. Also it is true that some times I do just need to create my own ways to go about visualizing data. So maybe chartjs is not always the best option depending on the project of course.

Read More

Working with glob patterns in node.js using the glob npm package

If you have been using computers as long as I have you might have by now come across the use of glob patterns as a way to use a * wildcard to represent any string of characters. Although this kind of pattern may not always be a full replacement for regular expressions, I am pretty comfortable with this method of selecting files that fit a certain pattern this way. So it would be nice to quickly go about doing so in a nodejs programing environment.

I could go about writing my own solution for doing so, but why bother putting time and energy into that when there is all ready the popular npm package called simply glob. The npm package glob is a great solution for selecting files in a node.js environment with glob patterns, so lets take a moment to look at some examples of glob in action.

Read More

Cheerio, a server side jQuery like tool to help work with HTML in nodejs

I have been making some personal projects that have to do with working with html in a nodejs environment. Often I am in a situation in which I end up generating html from markdown using something liked marked, or looping over actual html files, in ether case I have raw html that I want to work with in javaScript.

In these types of situations I do not always need to visualize a browser environment in a nodejs environment in order to do whatever it is that I need to do with this sever side html code. I might just want to

I have written a post recently on another node.js solution for this sort of thing called html-to-json, however in this post I will be writing about cheerio. Which is a server side implementation of core jQuery functionality, but I can not do everything that I can do in a browser environment with cheerio so it does have its limits.

Read More

My 100th blog post, How it is going so far.

This is my 100th blog post, and as such I wanted to just write something that is a milestone of sorts in terms of how things are going with this site. So far at 100 posts, it seems like I am just beginning to gain some ground with Google’s Search Engine Result Pages (SERP). The site is Still not getting much traffic, but that is to be expected sense I am still not spaming my content anywhere on social media (yet). Also I am running into many challenges that I need to overcome in order for this site to actually be something of interest to people.

Read More