MDL {Oct 2020}

MDL {Oct 2020}

My developer's life... Maybe the best description should be "what I did this month”, too expected for the title. In this type of article, I would like to share with you my experiences of last month, maybe nothing special, but it is a sort of logbook used to summarize and write down my activities and my feelings.

Events

My October started with HacktoberFest, this is my first time with this type of "fest" and it consists of creating four or more PRs for any open-source project and, in the end, the first 70000 users with the maximum PRs accepted will win a t-shirt or can plant a tree. During my experience, I saw a lot of fake pull requests only to achieve the award, for fake I mean something that doesn’t really matter with the project, for example, fix English in “README”. Instead, after a week they restricted PRs for only repositories tagged "hacktoberfest" or for issues with that tag in order to reduce spam. The purpose of encouraging open-source contributions is nice but I hope next year will be more guided with something like a tutorial or how to approach specific projects, in this way any people can make a real contribution.

For the first time, I spoke about GitHub Actions during an internal remote technical session of my company, here you can find the video (Italian). It was a strange experience for me because during a remote event I can't see other people's faces and it is something like talking with myself during a shower.

With another friend we opened a slack workspace for Embedded and Linux developers, we know there are many platforms or groups but our purpose is to schedule one meetup every month to keep in touch with users and discuss new features or do workshop sessions together... If you wanna enjoy here there is an invitation link. (I love communities)

Projects

I participated in refactoring and reviewing activities of the open-source editor/simulator for electronics circuits called SimulIDE. You can find here the project. In my opinion, the code is not the best I have seen until now but it works and I hope the community contributes to improving it because I think it is a valuable Qt project.

I worked on "arduino-connector" for a while in order to improve the project tests system, it's an interesting project that works as a daemon on a Linux machine (x64, rpi...) and through the Arduino online dashboard you can manage the machine, you can see packages, docker images, containers and some stats about networking ram... Obviously, you can also deploy the sketches but it wasn’t my purpose. I hope they can do a release as soon as possible with all of our PR merged.

I have started working with another team on a new project written with google GoLang, this project is interesting because it manages different services into the same board. In this team, I found skilled senior developers that can control all the system architecture and software domain design. I also discovered the usage of Grafana combined with Prometheus to visualize all metrics collected from the software, and in my opinion, metrics are a symptom of a well-structured project. I hope to improve day by day my Linux embedded and Go skills during these scrum sprints.

After my workday and during the weekend I have started working with a friend on a “domotic” project for a garage. We have built a BSP for his Variscite board with Yocto and seems to work very well even if Variscite manages its dependencies in a very strange way for me. For the user interface, we have built Qt software and we have integrated a device watcher to automount USB for the future update of the application. During the software building on Ubuntu 20.04, I discovered that the Yocto "thud" version is only tested on Ubuntu 18.04 so after many compile errors, I decided to create a dedicated environment for BSP development with Buildroot or Yocto. You can find the dockerfile in this repository and after building run a container using `docker run -it -v $(pwd):/home bsp-env-18.04` in order to mount your local folder in the container.

In my project "qTsConverter" that converts Qt translations files (ts) into other formats, I refactored the code in order to switch from Qt test suite to CTest. One of my teammates showed me an easy way to run tests without any other overkill structure with CMake files. Seems working very well but I need to improve my skills with this kind of test system. Meanwhile, I set up a new GH Actions for formatting CMakeFile.

Replacer is a project that I started for learning Go and it is a command-line tool that allows changing names in an easy way with some cool rules. Specifically, I added the possibility to convert all files from snake case to camel case. Maybe some tests for this feature need some improvements.

I struggled with authentication stuff in this project. OAuth2 concepts are something new for me, and I think that creating an unofficial client could be a good way to start working with API and web things like this. I found another project written in Go that emulates a discord client as the first-mentioned and it allows us to log in with username and password, I absolutely take a look inside that code.

I created a QML item model here for trying to emulate the behavior of the mobile home page, it's a simple bunch of code but maybe I can evolve it in a sort of library.

I started learning Rust, more seriously than before, I mean through the advent of code 2019, here link to my repository, I'm at day3, the problems proposed are very cool because they force you to use a large part of the language (string, number, algorithm...) and you have to refactor old code while the problem evolves.

Books

I finished "Peopleware", important reading for every manager and all people who should manage other people. The book talks about the human side of software development and this important point of view is often underestimated: happy people always work better. In this book there is a part regarding music and development, I report this quote: "Many of the everyday tasks are done in the serial processing center of the left brain. Music will not interfere. The creative leap involves the right-brain function. If the right brain is busy listening to "1000 Strings" on Muzak, the opportunity for creative leap is lost.". The image of the devs with music, mics, and other cool stuff is only in a fantastic world, I love music but maybe it depends on what music you listen to, volumes, and other variables while writing code. I will think about it.

I also finished "Test Driven Development", which is all about tests, a very good book, in the first part shows how to develop and refactor the code while requirements changes. Honestly, I skipped the chapter regarding the xUnit example, but the last part maybe is the real value of the book because Kent illustrates many TDD patterns, how to approach the first test, assertions, and also the positive feedback loop with stress-tests-errors. He suggests creating a test list in pseudo-code and starting with a simple case first, assert first, mock test, and other patterns that I don't want to spoiler :)

Articles

Sadly this month I found only one article that deserves a mention, it’s about some GCC flags useful for analyzing memory usage like "–print-memory-usage" or "-fstack-usage", but I prefer to link here the complete article for more details.

Videos

Another cool thing I discovered on YouTube is some video from "Sapienza" university, very interesting to attend some lessons in different fields explained by good teachers. For now, I’m following a simple playlist of computer science only because I leave university and this is a sort of watching what I miss... :P.

I also watched a sort of tutorial of a bunch of hours about Docker and Kubernetes, very well done introduction, these two tools have strong interoperability, for now, I just used Docker as a reproducible environment for running and testing applications. I hope to understand how to take advantage of this directly in some projects.

Tips&Tricks

I found a cool VsCode configuration for my development workflow with "Coverage Gutters" extension to visualize with different colors which code is covered by tests and which not. The visual impact is more immediate than a coverage percentage because you can see properly the code branches. I added another configuration to run tests with a shortcut.

// keymap

    {
        "key": "ctrl+t",
        "command": "go.test.cursor",
        "args": {
            "flags": [
                "-v"
            ]
        },
    },
    {
        "key": "ctrl+k",
        "command": "go.test.package",
    
    }

// settings


    "go.coverOnSave": false,
    "go.coverageDecorator": {
        "type": "gutter",
        "coveredHighlightColor": "rgba(64,128,128,0.5)",
        "uncoveredHighlightColor": "rgba(128,64,64,0.25)",
        "coveredGutterStyle": "blockgreen",
        "uncoveredGutterStyle": "blockred"
    },
    "go.coverOnSingleTest": true,



In the past I tried to use "git bitsec" but I found a lot of problems on my repository because my merge method works using a specific merge commit and when you use this type of git command if the command selects the wrong commit you could have a problem with intermediate commits. I resolved changing commit by hand but I hopped only through merge commits, maybe using rebase and different merge methods the problem doesn't exist but it’s too late to change this.

Do you need to compress big files? Maybe to send it over the network? Try to use UPX.

Other thoughts

I wanna spend the last paragraph writing about social networks, I'm not addicted, I subscribed to Facebook but I left it because I no longer found interesting content, all sponsored, many groups unused and all-new generations are on Instagram. I'm on Instagram, I use it only to stay updated about my friends and if I leave it I have a feeling to be disconnected from other lives. As a developer I'm enough isolated then I think to keep it for now. I'm thinking about opening a Twitter account but maybe I will follow the same people as LinkedIn and I will twist more or less the same things, then I'm not sure... I quit also from Telegram because I love communities and obviously I had many programmers chats, then I was feeling burnout with this additional "load", I have already Slack, Discord, Reddit and my brain can't hold up other direct messages. During this period I watched "The social dilemma" and I was scared about all of this shit, I know that is a necessary evil because all services need data in order to work well but the scared faces of those developers talking about that are very impressive. Maybe we need some rules using social, and I consider myself an old guy because when I was 13/14 maybe there was a Nokia 3310 or N70, our problems were not the stories or how likes we had, our problem was the number of characters for a message because the bundle was 100 messages/month... I see young boys addicted to like, stories, followers, nothing real, and all tracked by FAANG.

Thank you if you have read until here. I wanna thank all the people that have contributed and participated with me in any of these experiences. If you wanna discuss something that happened during my month don't hesitate to text me or share with me your experiences/suggestions here in the comment... Cheers :)

Guerra

要查看或添加评论,请登录

Federico Guerinoni的更多文章

社区洞察

其他会员也浏览了