Retrospective from week 1 of #100daysofcode
I decided to up my skills in Software engineering using Rust language and Web3 concepts as well through a challenge of 100 days of code. The rules of the challenge can be found at https://www.100daysofcode.com/. I have been covering whatever is possible in 1 hour after work.
However, since I code for my day job my rules vary slightly, which is trying to use that one hour for understanding the concept to a decent level of depth or to produce a code snippet to understand the implementation of the concept.
Day 1/100: Reading a file in rust
This project is quite simple and it is something that is present in the rust language book itself, but I added a little twist to the problem, The idea was to understand file reading operations and perform counting of the occurrences of a word on the file it was reading.
Day 2/100: HTTP server
This project was to develop a small HTTP server using the Axum framework of rust. Since I am an ML engineer who works with products on the cloud and web technologies, I felt that this was the right project for me that could set some context and understand the level of difficulty learning the language. I failed in producing working code this day, however, the understanding of handlers, async, separation of the endpoint, and adding multiple endpoints was the learning.
Day 3/100: Getting back to the basics
I had worked with rust a little before which meant I knew absolute basics like declaring variables, understanding ownership of variables (a concept in rust that makes the language more memory effective). But, I still didn't know the control flows and also the impl blocks which implement methods for struct data structures. The problem I did on this day took an input struct of 2 numbers and then built a calculator using impl.
Day 4/100: Solidity Introduction
Since rust is not the singular focus of this learning program I changed focus a little bit and moved on to solidity and eth and what best to understand the concepts of solidity other than cryptozombies (https://cryptozombies.io/en/course/) it is a fun way of teaching complex blockchain concepts by the development of a game.
Day 5/100: Traits and interfaces
Traits is a very critical concept that can abstract away the simple methods and functions that other programming languages present in the form of classes. So I spent a little over 2 hours on this day first reading the rust book to understand traits and differentiate them with classes. But then I came across this wonderful talk at the rust Linz meetup on youtube
I will write a separate blog on this to explain the concept in 5 levels from a kid to an expert.
Day 6/100: Cryptozombies part 2
So a crypto zombie was created but had no function. On this day the crypto zombies were able to infect other non-zombie populations.
Day 7/100: Enums and pattern matching
In web application development Enums play a huge role in the data modelling phase to understand the inputs and outputs, So I took some time to understand this concept and also the concept of pattern matching. Pattern matching is a very manual way of looking at the possible options and performing some function or returning some value. I also attended my first rust meetup from Linz rust where I learnt quite a bit about error handling in rust.
Day 8/100: Enums and Pattern matching implementation
A very eye-opening day in terms of meeting the expectations of theory and the world of implementation. A small pattern matching problem took a lot of time to complete because of the simple errors that I was doing.
An observation that I had was rust compiler is very helpful and instead of just showing the error message it also suggests a remedy for the error, This is something that I have not seen in any programming language yet.
To keep in touch with what challenges I will be doing in the future as a part of #100daysofcode you can follow me on
Twitter: for everyday updates
Medium : For weekly or Bi-weekly updates