On december 2021, I realized coding was the thing I wanted to do in life. From that point I began learning and developing my skills on any area I found interesting or useful. In the following articles I analyze the different projects I've tried until now.
When I decided I wanted to start programming I didn't even know what objects were. My first project was a Minesweeper game where I used only the knowledge I had aquired in the few computer subjects I had at collage, which included basic python syntax and some notions on matplotlib.
The result was a very unergonomic and unoptimized but actually playable game in which you must introduce the coordinates of the cell you want to dig or mark as a mine through the terminal. There is also a difficulty selector at the beggining and a menu (pressing enter) that allows you to select marking bombs or exiting the game. Also, it's in Spanish.
The map is just a color mapped matplotlib pixel canvas in which each pixel corresponds to a cell and the color indicates the number of mines around it.
Once I finished my first game I began learning some "actual" python programming. This lead me to object oriented programming as well as GUI libraries.
With those two things in mind I recycled the first version functions and introduced them as methods of a processor object that executes all computations. I also used the Tkinter library to create a difficulty window and a game window which are still poorly encapsulated and strongly coupled with the processor. This made everything quite labouring but, of course, I didn't notice at that point.
I created a separate main file to execute the game, beggining my path towards modularization.
This time the game was much more player friendly as everything can be done through the graphic interface. It is almost errorsless, although sometimes it isn't able to say if you have already won.
Finally, I added a functionality so winners could save their names in a text file. This way it could be possible to include a database in the future.
After learning some Java I started understanding more about how objects work, so I tried to put it to practice by creating another game. This time I decided to go with something that would be active even with no player interaction.
Tetris was my choice. This time the object oriented part was much more depurated, modularization and orthogonality are not great, but decent. Of course, the game is far from optimization from a design point of view. Better usage of data structures and design patterns would be necessary for any more complex application, but it works better that one could expect.
At the beggining of March I started getting atracted by the internet and, in particular, web developing and design. I read J.N.Robbins Learning Web Desing. The book introduced HTML, CSS and a bit of JavaScript.
Quickly I knew I had to build my own website to publish my projects and progress. And here you are, reading some months later. I plan on mantaining the page as long as I keep learning, and I hope that moment doesn't come.
Satiated of games, I decided to try some brute computational force and code a program to solve things based on trying. A friend sugested sudokus, so there I went. Should I assume the person reading these articles knows what a sudoku is and how is it solved? The basic idea is filling a 9 by 9 grid with numbers from 1 to 9 so they only appear once in every row, column and 3 by 3 square.
The program is able to create and solve a given sudoku. The same algorithm is used for both actions. It runs through the empty cells and tries to put a random number between 1 and 9, if that number is already on the row, column or square, it repeats the process until it gets it right. If no number fits, it means something went wrong on the previous numbers, the sudoku is discarded and started again. This is repeated until it gets a complete correct sudoku.
Every program should have an interface, and using the console didn't convince me. This time I decided to get over Tkinter and go with something more fancy. After some research I found the Qt software, much deeper than Tkinter. It was originally designed for C++ (which future me would appreciate) but was adapted to python using the module PyQt5.
My interest in the C programming language
Although Python is my preferred language and the one I handle the best, I have a great atraction to C. I like getting to the root of things, and top level languages may not be very clear on what's really going on at machine level. For this reason I think learning C would led me to a more realistic understanding on computers and "machine code".
On this path, I read "The C Programming Language", by Brian W. Kerninghan and Dennis M. Ritchie. Along with some YouTube courses, I got to the heart of the language and, with it, to a much deeper understanding of memory, compilation, execution and many other computing concepts.
C is a very simple but has almost infinitely uses. Along with this I dove into the data sructure field (graphs, stacks, queues, linked lists, binary trees...). What I did was building some function modules for interesting usages. I list some of them below, of course they are not meant to be used in meaningful ends, they're just for academic purposes.
The first one allows to evaluate, integrate and draw on terminal (very clumsy) mathematical declarated functions. Playing with "graphics" on the terminal always seems fun.
The second contains modules for working with data structures. There is a module for linked lists and another one for .
After these projects I'm confident to say I'm fluent working with pointers and memory management, as well as with data structures.
The next thing is updating to C++ which I'm currently learning via some books and courses by October 2022.