Thiago Cafe - Programming is fun !  

Welcome!

2022-04-02 12:05:00

What I learned after 20+ years of software development

How to be a great software engineer?

Someone asked me this question today and I didn’t have an answer. After thinking for a while, I came up with a list of what I try to do myself.

Disclaimer: I don't think I am a great engineer, but I would love to have listened to that myself when I started my career, over 20 years ago.

I will divide this in parts, non-technical and technical

2020-11-18 17:44:28

Conversation in social network times

Has it happened to you guys as well?

2020-05-22 10:54:25

How to write a Code Review

There is always those quite obvious things such as "don't be a jerk". Those are not the ones I will be talking now.

I want to talk about what I learned in those many years reviewing code and getting my code reviewed.

Change the perspective

Whoever wrote the code you are reviewing thought hard about that code. Hardly someone just writes carelessly some code, so if something is not clear, instead of saying the implementation is wrong or not ideal, try to understand and ask questions to clarify why it was done the way it was.

2020-05-12 17:20:00

Developing in Rust using Visual Studio Code

Two of the best features when using an IDE are auto completing and debugging. Fortunately, we can have both with VSCode.

Install Rust

Go to rust website and follow the install procedure

Then use nightly channel to get the latest version of the toolchain.

 # Install nightly toolchain
 $ rustup toolchain install nightly

 # Set nightly toolchain as default
 $ rustup default nightly
2020-03-15 22:17:54

Loading libraries in C++ on Linux

This is that kind of code that we don't write all the time, so let's remember the different ways to load and create libraries on Linux

There are 3 ways a library can be used by an application

  1. Importing a static library
  2. Static linking a shared library
  3. Dynamic loading a shared library

We are going to show all the forms in this article

2019-06-14 20:58:28

Epoll interesting links

Now that I am working with Go, I was going deeper in Go network APIs and found that Go implements epoll in its library - or, I don't need to do syscalls myself.

Searching for some information, I ended up finding two very interesting articles about epoll internals that clarify some interesting points and I'd like to share (and keep to myself)

Some important context:

  • There are two other ways to check for events
  • select (very commonly used with sockets)
  • poll
  • epoll is a faster alternative, specially if you have lots of file descriptors to read from
2019-06-14 21:05:08

Manual error handling

A common problem of Object oriented languages is the overuse of Exception. You never know which exceptions can be thrown and the error handling is super hard. How many times we see catch blocks that catch everything (Exception or Throwable) and do nothing specific ?

How Go solves this problem?

Go solves this problem having no Exception. However it has it's own problems because of that. Let's see a piece of code that is very error prone

2017-11-15 01:32:29

How many days have I lived ?

In a dinner conversation, my youngest daughter was curious about how many days had she lived so far. I told her that it is easy to calculate for a baby but not for her, though I could easily implement it.

She was still curious, but when I told her that I'm more than 1000 years days old (she guessed a bit more than 10), excited, they asked me to implement right away!

Am I getting old ?

2017-09-10 10:42:42

Having fun in life!

I was talking to a friend about cellular automata using Conway's Game of life as an example. Curious again after so many years that I've read it, I read again carefully the wikipedia page and I found it fascinating.

What is the better way to learn more? Implementing! However I do not want to implement it in a boring way. I want to have interesting features. Let's first talk a little bit about this 0-player fascinating game.

2017-05-01 21:36:12

Math - practicing sum

My daughters were using a website called xtramath to practice sums. It's a very nice website were lots of different sums are shuffled and asked - with time to answer, which works nice to memorize, but not to calculate.

Thinking about that, I decided to write an alternative to it without timeout and quick to write.

2017-02-24 07:50:11

Bingo - shuffling the balls

This christmas was way different than the previous christmas. I moved from Brasil to Canada and for the first time I was away from my family, but with some very good friends.

Some of those friends play Bingo during x-mas night, instead of exchanging gifts and we played - my daughters loved! So, today out of nowhere, she came up with the idea of playing bingo. She built some bingo cards and she wanted me to play the numbers.

hum... We don't have balls, but we have a computer. So I decided to write a python script to shuffle the balls.

It should shuffle them, but with some interesting requirements.

2017-02-24 07:50:11

Spammers attack !

So I thought that writing a completely custom blog system would keep me away from spammers. Oh! terrible mistake. I wrote a very simple commenting system, without concerning about spam attacks and voila. I started receiving lots of spam in every single post.

Temporarily I'm disabling comments.

UPDATE: They're enabled again !

Any comments, please reach me on twitter - @thiedri

Cheers!

2016-09-29 23:01:56

Class proxy in D - Remote invoke

I was thinking to myself some other day how could I do a wrapper for any class for, make it remote invokable or maybe auditable ?

For this, I'd like to have the following:

  • Runtime coupling - No, nay, never ! It MUST be validated in compile time
  • Easy syntax
  • Totally generic code
  • In D, because I'm learning this language and I want to keep comfort zone away
2016-09-13 22:29:42

Comment support added !

Many visits on those last months. My parents visited me, my bother and sister-in-law visited me. We all had lots of fun, but my blog was forgotten for some time, but...

Now we have comments !!!!

2016-07-02 14:25:22

New features and a bit about D

I've written a considerable number of features since I listed the So far good progress! I already wrote the following features:

2016-06-28 00:25:23

Blog basics

I think that before entering in any specific feature, is interesting to show how the basic http server was made.

Is it really from scratch ?

Yes and No.

2016-06-27 00:25:23

Statistics - first feature !

I was asking myself what will be the next feature. Right now I have the implemented:

  • Post list - raw
  • Post view - very basic
2016-06-25 00:25:23

Welcome!

First, let me introduce myself.

I'm a brazilian author of two other blogs, Simply C++ and Blogaro! and passionated about development and programming languages.