/images/ironmanlogo.png

ItAndWhatever | Samuel Martin

Personal blog to talk about development and IT

Mergesort

Introduction Yesterday I was talking with a teammate about algorithms, and how some people had troubles with them, so I will create this new post to explain how mergesort works. An algorithm to order arrays/lists in O(n*log n) Big O Complexity In case you have not heard about big O notation. I will do a brief resume about it. We usually talk about two types of complexity, space and time. And by default if it is not specified, usually everyone is talking about time.

Saving snapshots for SD card

Introduction Now that I am playing with my Raspberry Pi, I need to use different SD cards for many projects, and I was bored of formatting again and again my card, so I were searching for a more efficient way to switch between my projects and also having backups in an easy way. The solution has been simpler that I was expecting, just make snapshots of the current state in my SD card.

Installing Docker on Ubuntu and how to use it without sudo

Maybe you have heard about Docker, used to package your applications and services into a standardized unit which can be shipped and executed easily in every environment without external dependencies. In this post I want to show you how to install Docker on Ubuntu 16.04 LTS in an easy way, and also how to run it without root privileges. Sounds right? Let’s start. Introduction Developing complex enterprise applications can be tedious when you must mount every external service needed in your new machine, Elastic Search, MongoDB, Rabbitmq, etc.

Syncing a fork in Github

Nowadays it’s essential to manage forks in Github if you want to be a better programmer. Github is widely used worldwide and we should know at least how to use it. A key concept in github is the word ‘fork’. When you create a fork based in an (open-source) interesting project from other people or organization, you are doing a copy of that, linked by github to his parent. Since this moment, the two projects will evolve independently.

First steps with No-SQL MongoDB

It’s easier than what you think to start with a No-SQL database like MongoDB. The first step is to install MongoDB. I am going to install it in Ubuntu 14.04 with these commands: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list sudo apt-get update sudo apt-get install -y mongodb-org If you want to install it with other OS or a specific version you should visit the official page

JavaScript Logical Operators (AND, OR)

Classical logical operators are used with boolean values, and they return the corresponding boolean result. However, in JavaScript, the && (and) and || (or) operator values work in a most peculiar way. When working with different non-boolean types, they convert the left value on a boolean, and depending on the result of this conversion, they will return the original left value or the right one. For example, the OR operator will return the value of its left if this has proved true, and if it was false, then it return the right.