Skip to main content

I'm from Durango, México. The most important thing in the world for me is music, is my passion. I play piano and guitar, also I'm a compositor (lyrics and songs), the artist that I admire to play piano is Yiruma and my biggest achieve in the world will be meet Leonel García, because I admire all of his work as a musician.
I'm studying Mechatronic engineer, as every mechatronics in my gereration, because of Iron Man movies.
My hero in real life is my girlfriend, that sounds kind of weird but is true, I admire her so much, she's smart, is patient, dedicated, she's emotionaly strong and always has a smile in her face, no matter what. And also I've another hero but, it's in Ci-Fi, Iron Man.
My favorite author is: John Katzenbach, because I like the "thriller" books. He involves you a lot into history, and he doesn't have compassion in some books

Gonzalo Mata

¿Qué ciclo es mejor y en qué casos? - C++

1 min read


Esto es como un resumen. Recapitulando las tres maneras que vimos a lo largo del semestre para hacer ciclos: Form while y do-while. En el siguiente video hago comentarios de lo que a mi parecer es mejor opción utilizar cierto tipo de ciclo para aprovechar al máximo las características de cada uno, etc... Espero que le entiendan y que les ayude el video! :D



Gonzalo Mata

Coding Conventions - C++

1 min read

Hola! Mastery08 es acerca de la mejor manera de programar, hace ahorrar tiempo, es agradable a la vista, te pierdes menos a la hora de hacer cambios además de tener un orden y control sobre el código para así hacer todo correctamente, más rápido y mejor.

Dejaré el video aquí donde explico un poco acerca de esto además que en la descripción del video en Youtube hay un link para ir a una página donde se explica mas a fondo los coding conventions.


Gonzalo Mata

Uso de "switch" como condicional - C++

1 min read


En este caso hice un video para explicar como podemos usar la función "switch" como un condicional cuando tenemos bastantes opciones por tener.

La estructura contiene como parámetro el valor condicionante con el que vamos a trabajar y dentro de los casos van las instrucciones que queremos que realice en caso de que la condición se de.

Dejaré un video donde trabajo con un ejemplo y una breve explicación para poder entender como usar un switch para condiciones múltiples.


Gonzalo Mata

Creación y uso de matrices - C++

1 min read



Para comenzar; una matriz es lo mismo que un arreglo pero bidimensional y la estructura es casi la misma que el arreglo. La función de una matriz es guardar valores al igual que vectores y arreglos. 

La estructura de una matriz al declararla es la siguiente:

tipo nombre_de_la_matriz[espacio_unidim][espacio_bidim];

Hay que tener en cuenta que lo que va entre corchetes al momento de declarar la matriz es el número de espacios que tendrña la misma. Y al igual que en arreglos y vectores los valores iniciales son 0.


Dejo aquí un video en mi canal de Youtube donde explico brevemente como declarar una matriz y un ejemplo de uso (guardar valores e imprimir un valor dentro de una ubicación específica).

Quisiera mencionar que en el video tengo un error en mi programa, los ciclos for deben de comenzar en 0 y la condidion debe ser (i<lin) y (j<col) correspondientemente.

Gonzalo Mata

Creación de archivos C++ y cómo ejecutarlos en la consola.

1 min read

Hola, la mastery01 es acerca de crear archivos en C++, los cuales se pueden crear a través de cualquier editor de texto, al momento de guardar el archivo (código) debemos de agregar la extensión ".cpp". Ejemplo:


Y para ejecutarlo tienes que realizar lo siguiente:

Compilar: g++ nombre_del_archivo.cpp

Ejecutar: ./a.out (Mac OS y Linux) /a.exe (Windows)

Hice un video muy rápido (Mac OS) tomando como ejemplo un código que imprime "Hello World."


Gonzalo Mata

Sudoku - Final project C++

2 min read

Hi! This blog post is about make a review of all the work realized on the project in the last weeks of commits on GitHub, write, save compile and run code...


I'll explain to you how I found information to help me to do this stuff, so, besides to go of the teacher's office and search in google, I asked also to some friends (Jose Luís, Osvaldo, Fernando). And how's work with my partner Ale.

The first week working in the project was kind of hard because I didn't undertand the base code very well, so the first thing that I did was to write the "about sudoku" and "rules" functions because those are the easiest ones. Then, I went to the Ken`s office to ask about what does each function without the two that Ale wrote. After that, I started to write the "writenumbers" function asking to the user the line and the column where he/she wants to write the number of him/her choice (between 1 to 9). Inside this function I called two more functions; 1 to check line and column and the second to check each 3x3 grid. After we have that end, Ale added some colours to the menu options and I did it with the board making the original numbers in red, the 0's in the normal colour and the user numbers in green as is especified on the page of sudoku. The last thing that I did was the "restartsudoku" function (it is asked by ken as well).

Working with Ale is... I don't know, I think that she needs to have initiative and to know what is what we need to do and make a mentality that we need to do only the things that it is asked. In general was good because she got done everything that she has to do and when I did changes she inmediatly was asking me about how the changes works.



This is the link to my code at Github.

Gonzalo Mata

Cars !

1 min read


Hey!, finally I've done my wsq16 wich is about read file and do stuff with it. There's something that helped me a lot! and it is the code of Eduardo Tostado, you can check it; also the Ken's page about cpp reference which we can use it in exams helped to me a lot to do this WSQ and, of course the book. The chapter 15 explains ecerything about how to read files in code.


Here's my code at Github, enjoy!


Gonzalo Mata

Quiz 11

1 min read


That question 2 made me crazy with that thing of "string.find" but here it is...


Question 1:

Question 2:

Gonzalo Mata

Quiz 10!

1 min read

Hello! Here's my  

I'll leave you here in my post some links that helped me to solve this. The first one was the reference from Ken's page available during our exams.

I did the quiz only with vectors and I'll do it with arrays soon and I'll upload it...


This one helped me to remember how to add values to a vector

This helped me to remember how to do some interesting things with vectors, is my video for mastery23 which is creation and use of vectors.

Also the reference that Ken already give us about dot Product if you don't remember it from Fisica remedial.


And finally here is my link to the code already in GitHub


Question 2


Here a picture with my terminal running the examples that Ken gave us in the post of the quiz:


Gonzalo Mata


1 min read

Here's my screenshot of the ecos that I've already respond