Ionică Bizău

Programmer, Pianist & Organist, Jesus follower

How I npm

I write a lot of code every day, publishing my code on GitHub and npm. Each tiny package I create does something, and in most of the cases it's a module which can be used in other applications. 🍀

💭 What is npm?

In case you don't know, npm is the default package manager for Node.js. Note that there we can publish modules which are not Node.js specific.

Its name stands for * need pray more* (or nuclear pizza machine, or npm's pretty magical etc etc).

Read more »

What to Do When Your Website is Broken

Our job as developers is to break and fix stuff every day. Sometimes, some of us even do it on production servers. But during emergencies, they just tend to apply a quick fix which may not actually fix anything at all— in fact, it could even make things worse.

On some days, it works! But it's still very dangerous:

website is broken
This is a good example of fixing a bug on production with a happy ending. [[source]](http://imgur.com/vWkPc1m.)

These things happen. But when they do, how can we address these issues with confidence and in the best way possible?

Read more »

The Amazing Tangram Square

I was 7 years old when I first found out what the Tangram Square is. I saw it in a Maths book and I quickly started to have fun with it.💫

The Tangram is a Chinese geometrical puzzle consisting of a square cut into seven pieces:

  • 2 large right triangles
Read more »

How to write a web scraper in Node.js

Sometimes we need to collect information from different web pages automagically. Obviously, a human is not needed for that. A smart script can do the job pretty good, especially if it's something repetitive. 💫

scrape-it

When there is no web based API to share the data with our app, and we still want to extract some data from that website, we have to fallback to scraping. 💥

This means:

Read more »

Pi Day, Raspberry Pi and Command Line

Everyone knows (or should know) what the Pi number is. Basically, its value is defined by the division of a circle circumference to its diameter. That's the Pi number! The nice thing about it is its irrational nature. That means it has a lot an infinity of decimals.

Usually, Pi is approximated as 3.14. And today is 14th of March! So, happy Pi day! :)

I have a Raspberry Pi computer around, and I was thinking to use two of my libraries to create something nice: displaying the Raspberry Pi's logo and the Pi number in the command line: it's funny how it basically stands for Raspberry Pi (the raspberry image and the pi number). I wanted one more thing: using the pi number decimals in the output characters. Here's the result (see below how I did it):

How I did it

Read more »

How I ported Memory Blocks to modern web

Playing computer games is a lot of fun. Playing games improving brain function and performance is even better. The first computer game I ever played was one of these. ⚡️

It happened when I was 6-year-old. I visited a friend in the neighboring village. There were not so many computers in those days but my friend had one. He asked me to play a computer game he thought I would enjoy. And I did! It was my favorite computer game at the time (back in 2001).

The game I played was Memory Blocks, which is part of the Symantec Game Pack, created by Charles Timmerman—founder of Funster and author of over 90 puzzle books.

Since then I did a lot of things. One of them is that I became a web developer. So, I thought: it should be interesting to bring this Windows game back to life and everyone will be able to play it in their browsers (on any platform). Many people love oldies. Not long time ago I created a COBOL bridge for Node.js and the feedback was amazing.

Read more »

How to convert JSON to Markdown using json2md

I love and use both JSON and Markdown in my projects. Each npm package requires a package.json file which is obviously written in JSON format. Also, good projects have good documentation. My favorite language for writing docs is Markdown.

json2md

But I don't really write Markdown files. I do write docs, but they are stored in the code (JSDoc comments). I automated the process of generating Markdown docs using Blah. However, sometimes these documentation templates are not enough.

That's why I created json2md which is the bridge between JSON and Markdown languages. Integrating this package with my Blah templates, I can write custom things in the final documentation result using JSON inputs in my package.json (or another JSON file).

How to use

Read more »