The Geremia project is finished.

Photo by Mathew MacQuarrie on Unsplash

Let’s start from the beginning.
There will be some repetitions in this post. I have already written about Geremia, and this post summarizes the project itself.

The origins

I am an avid reader and love Marco Vichi as an author. The main character of Vichi’s books is a policeman named Franco Bordelli. In one of the novels, Bordelli receives a skull as a gift from the forensic pathologist he works with. The novel takes place in the 60s, and, at that time, it was not illegal to have a real human skull. Bordelli places the skull on one of the kitchen shelves, and in all subsequent novels, it is common to find him talking to the skull.
I found it an exciting idea, but I wanted to twist it. Let’s give some life back to the skull using modern technology.

Sourcing the skull

In 2023 it would be ridiculous to look for a real skull (I’m kidding if you ask yourself if I’m insane.) Amazon could help. I wanted an actual size skull with a moving jaw and enough space in the cranium to hold the electronics I was thinking of. It also had to be realistic. After some research, I bought an anatomic model of a skull (https://www.amazon.it/gp/product/B007S9ZES4/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1) When the skull arrived, it looked perfect. It looked real, had enough space for the electronic circuits, and had a movable jaw.

What should it do?

My idea was to build a notification device connected to my personal computer. The skull would play a choreography each time a notification should arrive. I was thinking about a basic choreography: open and close the jaw, blink two LEDs representing the eyes, and play a notification sentence with a creepy voice.

How could I accomplish that?

As soon as I started thinking about the idea, I realized an Arduino board would be perfect for this project. I could easily connect two LEDs to two ports of the Arduino board to drive the two LEDs, use another port to drive a servo motor and connect an MP3 player to play pre-recorded sentences.
I had an Arduino Leonardo and a servo motor I could try using.
I put together a breadboard circuit to test the basic idea.
In the first place, I wanted to test each segment of the choreography alone. Test the two LEDs, move to the test of the servo motor, and finally, test the MP3 player.
The first problems started to reach the surface:

  • The skull jaw is tied to the cranium with a strong spring. When I tested the servo motor on the breadboard and simulated the spring tension, I quickly noticed that my servo motor was not enough. I had to buy another servo motor with high torque to be sure to be able to move the skull jaw. (https://www.amazon.it/gp/product/B09KZ8VTNB/ref=ppx_yo_dt_b_asin_title_o05_s01?ie=UTF8&psc=1)
  • The new servo motor introduced a new problem. When the servo motor moved with a load attached to simulate the spring tension, the Arduino board randomly resets itself for no apparent reason. I understood that in electronics, there is never “no apparent reason.” The Arduino board was resetting because the servo motor was drawing too much current from the board that I was powering through the USB port. A quick search on the Arduino board instructed me to use an external power supply with a voltage regulator to transform voltage from 12V DC to 5V DC. Please note that I did not know electronics at all, apart from some basic notions from the past. I just copied a circuit from the internet and tested it on another breadboard with a multimeter.
  • The Arduino board I used was not powerful enough to stream content from my PC, so I used an MP3 player instead. I found an extremely cheap MP3 player from China. The first component I received was refusing to work, and I could not understand why. I wired it as the manufacturer explained and used some Arduino test code from the manufacturer. No way, it always refused to work. I searched for the answer to the problem on Google and found out that there are non-working clones of these cheap devices, and I just got one of those. I bought an original DFPlayer Mini, and all the problems went away. (https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299)
    The picture below will show the very first working breadboard.
    On the back, you will notice an oscilloscope. During these months, I got intrigued with electronics and hardware hacking. I borrowed the oscilloscope from a friend who was not using it anymore for another project, but that’s another story.
Breadboard schematic

Building the Arduino shield

I planned to build an Arduino shield to snap on top of the Arduino Leonardo. The
The shield had to have LED connectors, the servo motor, and the MP3 player speakers. Again, this was the first time I had built something like this. I did not know how to solder, and I did not know anything about board routing. I bought some Arduino proto shield empty boards (https://www.amazon.it/gp/product/B093ZB5M1B/ref=ppx_yo_dt_b_asin_title_o02_s01?ie=UTF8&psc=1) and started the design. I confess I used Affinity Designer to draw the circuits. I know every electronic engineer out there will already be laughing loud.
I also gave a try to Kicad, but I failed miserably. The only thing I was able to accomplish was to draw the schematic of the circuit. Again, something I never did before. It may not be correct.
Ok, I will make you laugh again at me. Here is a picture of the schematic:

Schematic

The idea was to draw the schematic on Kicad, design a proto-shield PCB and then get it printed by a service like PCBway or similar. Too much complicated for my brain. I confess I gave up on day two.
It took me four different iterations to get a working proto shield, but I was extremely satisfied when I saw that everything was working as expected.
Below is a picture of the proto-shield with all the devices connected and ready for testing:

Proto-shield

The software

This was something I felt much more comfortable with.
The idea was simple. One application running on my PC polling services for potential notifications and communication with Geremia over a serial port connection. A simple machine state to take care of everything.
These were the basic requirements:

  • I wanted to use Python as a programming language. Perfect for a quick and dirty project.
  • Finally, I wanted a self-contained application that should not run from the command line. I did not wish to have a terminal window on my desktop. The perfect place would be an application sitting in the taskbar. The rumps Python library was up to the task (https://rumps.readthedocs.io/en/latest/). It also offers the option to create a standalone application, which I wanted.
    The software on Arduino was a different story. As you may know, Arduino is not multi-tasking or multi-thread. This was a huge problem to deal with because I wanted all of the choreography parts to play at the same time.
    We do not have multi-tasking or multi-threading, but we can simulate it. The protothreads Arduino library solved the problem (http://dunkels.com/adam/pt/).
    The Arduino application is made of a few threads:
  • One thread will monitor the serial port and respond to commands from the PC.
  • The servo motor thread will make the servo motor move when needed.
  • The left LED and right LED threads will make the LEDs blink.
  • The MP3 player thread will make the board play a sound when there is a notification.
  • The DFPlayer thread will monitor the MP3 Player status to change the status to idle when an MP3 file has finished playing.
    In principle, it looked easy, but it needed a lot of tweaks since the protothreads library imposes many limitations.
    It took more time than expected.
    The final result is acceptable even if you have to pay the price regarding fluidity in the choreography.

Assembling

I had the proto-shield and the software ready. It was about time for the brain implant to Geremia.
The first issue is insufficient space for the new servo motor to fit in Geremia’s cranium. The original servo motor I planned to use was much smaller than the new one.
The only option I found was to place the servo moto on the base holding Geremia. Sounds good, but I need to find a way to keep it in place and ensure the servo motor torque will not move when there is action. I designed it and printed it on my FLSun Q5 3d printer. I never modeled anything in 3d. I installed Fusion 360 on my PC to do it. It is free for personal use.
I looked at a few tutorials on YouTube, and finally, I could print the servo motor base and holder. I was surprised by the power of technology. I could create something from scratch and have it on my desk in minutes with a few cheap things. Unbelievable.
Here are a few pictures of what I designed and a picture of the finished item.

Mounting Bracket Design
Mounting Bracket

I spent the following thirty minutes assembling everything in Geremia:

Assembly

Final result

Here is a video of Geremia playing a notification for new mail.

What’s missing?

  • I still need to fine-tune the software on Arduino and my PC.
  • I need to place a heat sink on the LM7805 voltage regulator since running the servo motor tends to become quite hot.
  • Hide the servo mounting base and bracket.

Final considerations

I started the project thinking it would be simple, but that was different. I had to solve various problems along the journey, which sometimes was difficult.
The great thing is that I have learned a lot during the process.
Finally, I made it, which is a great thing.

Apple Vision Pro

Photo by Dainis Graveris on Unsplash

Yesterday I was looking at the Apple WWDC event, where they unveiled the Vision Pro.

During the event, I was thinking:

  • There is not a single flat surface on the Vision Pro hardware. Everything is curved. I went to sleep with a prayer for the hardware engineers that will have to make the Vision Pro production ready. Best of luck, guys. As a side note, Apple will be unable to produce the headset at a very high volume.
  • Apple said that they applied for more than 5000 patents for the Vision Pro. That’s an incredibly high amount. Only those companies with the economic power of Apple could sustain such an effort. We can count them on the fingers of one hand.
  • Tim Cook, and his colleagues, never used the term Metaverse.
  • The narration of the house where the Vision Pro was pictured left me bittersweet—big houses, high-quality interior design, extreme minimalism, and tidiness. I am looking around at my home right now, and it does look like what Apple was suggesting as the Vision Pro environment.
  • 3.499 US dollars is costly.
  • No sign of potential interaction between users wearing the Vision Pro. They showed how you would look like a human while interacting with other humans without the Vision Pro, but no idea of how it will behave when two people wear the hardware in the same room.
  • Tim Cook said: “One more thing!”
  • No mention of AI. Yeah, he talked about machine learning, but not in the context of interaction with a chat. 
  • We must wait at least six months to see the device in stores. I hope they will try to eliminate the ugly external battery, even if it will be tough.
  • I feel like it is like a technology showcase.
  • Thinking about what they showed us, Apple imagine us using the device: on a chair, in front of a flat surface, on a plane seat, and while lying in bed.

Revenge of the clones

Photo by Ben Szymanski on Unsplash

While working in Geremia, the talking skull, I needed to find a simple MP3 player that I could drive from the Arduino Leonardo board. An MP3 player was the simplest solution. A device that is easy to operate via a virtual serial port and not expensive.

After some research, I ordered a couple of DFPlayer Mini for 3.07 US dollars each.

Truth said I destroyed both of them in the first two iterations of the Arduino Proto Shield. No big deal, they are not expensive. Since I wanted to progress in the project, I needed a few more devices as soon as possible. I looked on Amazon and found an offer to buy five for 8.4 US dollars. That price would make 1.68 US dollars for each unit. 

The courier delivered the package; I installed the unit on my proto shield and started playing with the software. You can use many libraries for this MP3 player with Arduino, and the logic is straightforward.

The device is very cheap, and it has limitations. You will have to name the files on the microSD card carefully, ensure there will be no other files apart from MP3 files, and (!!!!) load the files on the card in the same order of their naming.

After half an hour of tinkering, I could play MP3 files on the microSD card.

From a software standpoint, I needed to ensure that the finite-state machine on Arduino was keeping the state BUSY until the specific MP3 file had finished playing. I wrote another proto-thread to monitor the state of the BUSY pin on the DFPlayer Mini. The pin will be low if the player is busy doing something and high if the player is idle.

No way, it was not working at all. Erratic behavior every single time. I checked the wiring, the soldering, and the power levels, but I had yet to find a way to get through. I also connected the device to a logic analyzer to look at the behavior of that pin. I could not find a solution. I searched the net to see if someone else had the same problems and found a solution.

Someone wrote that there are DFPlayer Mini clones with many issues, some of which were similar to those I was experiencing on my device.

Now, wait! A clone for a five-dollar device?

Yes, that’s the case.

After downloading and installing a DFPlayer mini analyzer sketch for Arduino, I had confirmation that the device I was using was a clone. Many of the functionalities that an original device should have were not working on my device.

I had bought cheap clones of a cheap device.

Lesson learned: there will always be a clone hunting you.

Geremia is not multi-tasking

Photo by Mathew MacQuarrie on Unsplash

Over the weekend, I made some significant progress with Geremia, my talking skull project. I was able to finish the print and assembly of the servo motor mounting bracket, and to my surprise, it worked perfectly. I attached the bracket to the back of the skull and used a short string to connect the servo arm to the jaw. The movement was smooth and responsive, even with the short lever.

One minor issue I need to address is finding a reliable way to make this connection in the final assembly. However, I’m confident that this is a problem I can solve quickly.

After finishing up with the hardware, I returned to the software side of the project. I have been working with two finite-state machines, with one running on the Arduino Leonardo and the other on my MacBook. The PC software is written in Python and communicates with the Arduino board via a serial connection.

The PC software monitors Geremia’s health at specific intervals and checks for new events to be notified via the talking skull. When there is a new notification, the software sends the notification over the serial port to Geremia, which then takes the appropriate action. This includes flashing the two LEDs, moving the skull jaw, and playing an MP3 file specific to the notification type.

The challenge with this setup is that everything needs to run in parallel to make the action appear natural. Unfortunately, Arduino does not support multitasking or multithreading, given the limited hardware resources available. However, there is a solution available – I imported the protothreads library, which simulates multithreading via software.

Modifying my source code to incorporate protothreads was not a significant challenge, although there are a few things to be careful about. For example, you cannot declare local variables in protothreads, so you need to use global variables or static variables inside the proto-thread. Additionally, it’s essential to avoid synchronous functions inside the proto-thread, like using the delay() function. Instead, you need to use PT_SLEEP(), which is part of protothreads.

I have five proto-threads in my application, which include one for the left LED, one for the right LED, one for the servo motor, one for the MP3 player, and one for the serial communication. It’s exciting to see how Geremia’s brain has evolved to be multitasking, even though it wasn’t originally designed to be.

I still need to perform some more testing on the finite-state machines to ensure everything is working as expected. Nonetheless, I’m thrilled with the progress I’ve made so far and can’t wait to see what else I can accomplish with Geremia.

Playing with a Netgear WNCE3001 

Photo by Wim van ‘t Einde on Unsplash

While I was working at the proto-shield development for Geremia, I found myself getting more and more interested in electronics. At the very same time, I found intriguing the intersection between hardware and security.

It was about time to give it a try. 

While trying to sort out the clutter in my drawers, I found an extremely old Netgear WNCE3001 WiFi repeater. It is more than five years old and no longer helpful. What about trying to tear it apart and play with it?

I took it to my desk and started to remove the plastics. That was easy since I had an iFixit kit. I ended up with the motherboard, and a quick inspection revealed that an RTL8196C-GR Realtek microprocessor powered the device and that a nice MX25L3206E CMOS flash was on the other side of the motherboard.

A deeper inspection of the motherboard revealed six pins without any text on the motherboard. Those may have been a JTAG or UART connection.

I picked up my multimeter, powered up the device, and measured the voltage from those pins. I quickly found the ground pin and noticed a varying voltage from another pin. That started to look like a serial interface.

A few months ago, I picked up a second oscilloscope for a little bit more than a hundred bucks and connected one probe to those two pins. After a few seconds of looking at the screen, it was obvious that it was a serial connection.

A few calculations from the scope measurements and I found out it was a 38400 bps serial connection. I connected those two pins to a USB TTL-UART converter and fired up a serial terminal on my Mac. I could quickly look at the boot sequence on my PC screen. A few minutes later, I found the RX pin on the device, and I have a working serial connection between the repeater and my pc.

It was interesting to notice that the boot sequence ended with my terminal in a working shell with root privileges.

I now have a root shell on a Linux box.

I looked around the file system and closely at the boot sequence. In a few minutes, I found my WPA2 key in plain text. 

Even if I knew nothing about hardware hacking and electronics, that was extremely easy to find.

I also wanted to explore the CMOS Flash, trying to dump its content. I had a Buspirate lying around and used it to dump the firmware. The SPI protocol is relatively easy to understand, but, in this case, you don’t need to know it since the Flashrom utility deals with it for you.

I could not read the flash chip while it was on the motherboard. I had to desolder it. No big deal; I would trash the device at the end of the experiment.

After the memory dump, I used binwalk to extract the files from the dump file.

No more exciting things to do with this device.

I could not define this device as the most secure one out there.

Maybe the next time I could try to get one of those cheap security cameras and look at what’s in there.

I am (still) surprised by technology

Photo by Robin Glauser on Unsplash

During the last weekend, I made some steps towards the realization of my talking skull, Geremia.

I completed the client ad server application that will drive the skull. A straightforward state machine that will poll different resources on the Internet and that will notify the Arduino board sitting in the skull to perform actions related to the notification (i.e., blink the LEDs that play the role of eyes, play an MP3 file to simulate speech and activate the servo motor to make the skull jaw move.) The server and the client are connected over a simple RS232 interface.

That was a couple of hours of coding.

It was about time to figure out how to install all of this stuff into the skull. There is enough space to host the Arduino board and the proto shield I assembled. Unfortunately, I could not fit the servo motor, no matter what I tried. There needs to be more space, and giving the servo motor a stable installation would be challenging. I used a DM996 servo motor because the spring holding the jaw is pretty strong, and I needed something with high torque. This is also why I had to implement a voltage regulator circuit on the proto shield while dealing with the Arduino 12 Volt external power supply, but this is another story. 

My first thought was to abandon the moving jaw feature of Geremia. Thinking about it, I realized that it was the coolest feature of the skull, and I didn’t want to drop it simply because I could not find a viable solution. This is when you feel sad because you can’t resort to your father, that was a remarkable mechanical engineer. We could have had some great fun working on this. Again, this is another story.

I started thinking about a possible solution. After some time, I found that the only solution was to host the servo outside the skull, anchored to the skull base.

I grabbed my Remarkable and started drawing, not like a mechanical engineer but more or less like a first grader. After some time, I thought I had a solution. The servo motor would be visible behind the skull, but I can cover it with something. Geremia would look very cool with a fancy scarf.

I have my design ready, but how can I build it? I found that Fusion 360 is free for personal use. I have never used any 3D modeling software in my entire life. I downloaded it and installed it on my Mac. I grabbed a caliper I bought in China decades ago and started to make measurements on the servo motor and the skull base. I added the relevant quotes to my terrible drawing and was ready to model it on Fusion 360. It was mostly made of boxes with four holes to anchor the servo motor.

I viewed a couple of tutorials on YouTube on how to use Fusion 360, and a couple of hours later, I had my design ready.

I saved the file and opened it with Ultimaker Cura to print it on my FLSun Q5 3D printer. I adjusted a few parameters to strengthen the object and launched the print. Sunday morning, the print was finished. I need a few screws and nuts, and I will be able to assemble them with the servo.

While I was having lunch, I was thinking about what I did, and I was surprised. It is incredible what you can do with technology today. Knowledge is available to everyone with an internet connection. Twenty-four hours before, I didn’t know anything about 3D design, and now I have something I designed sitting on my desk. 

This is highly fascinating, at least to me.

Electronics is hard!

Photo by Vishnu Mohanan on Unsplash

I have been very quiet in the last few months—too many things on my desk and too little time to manage them.

Nevertheless, I have made some progress on Geremia, my talking skull.

I have finally assembled a working Arduino Proto Shield to be placed on top of an Arduino Leonardo.

It has not been an easy journey. As I could have imagined, electronics is complex, at least for me. I had to learn many things before putting my hands on the soldering iron.

To name a few, voltage regulators, SPI protocol, power, and ground rails.

I have spent much of my free time learning and am happy with my achievements. Connecting my proto shield to the Arduino Leonardo, uploading my test sketch, and seeing the lights turn on, the servo motor spinning, and MiniDF Player play mp3 files have been an emotion.

From my point of view, software is much easier than hardware. I made at least five tries while building the proto-shield. I understood that trace routing is a fine art in electronics. 

It has been fascinating, though. So fascinating that I ended up with hardware hacking as yet another personal project. I have been messing around with an extremely old wireless repeater. With a few bucks, I bought the necessary hardware and started playing. Extremely fun. Finding the UART and JTAG connection and connecting those to my PC with microprobes was quite fun.

Getting a root prompt from an embedded device is fascinating. I also found out how much insecure these devices are. In a few minutes, and without breaking the device, I got my WiFi WPA2 password.

That said, I have to move to the next step for Geremia. Writing the software. This will be fun, and I feel very comfortable with this. A mix of Arduino code and Python to make Geremia and my PC talk over a serial port.

Hopefully, it will not take a lot of time.

The final step is going to be complicated. Placing the two boards, the eyes, and the speaker, in the skull will be easy. Hosting the servo motor and efficiently connecting it to the jaw will be different. I will design something in Fusion 360 and 3d print it on my FLSun Q5 3D printer.

Anyway, as with everything else, electronics is hard if you don’t know anything about it.

Down the rabbit hole, again…

Geremia

I have always been a great fan of Marco Vichi’s novels. The main character, commissario Bordelli, is intriguing. In one of the last novels, Dr. Diotivede, a pathologist, gives a human skull to Bordelli as a Christmas gift. The skull is then named Geremia and lives in commissario Bordelli’s kitchen. Ok, a little bit weird, I agree.

I could not resist doing the same, so I headed to Amazon and treated myself to a full-sized skull to keep on my desk as a headphone holder. Same name, Geremia.

A couple of weeks ago, I looked at Geremia and said to him, “Hey, you look dead. We should do something about that.”

Since we are in 2023, adding a couple of LEDs for his eyes, an mp3 player to make him speak, and a servo motor to make his jaw move according to the audio file played would be easy. I played a bit with Arduino in the past, which would be the perfect choice for this kind of project. I reached into my drawers and took out everything I already had. I used circuit.io to design the electronic circuit and wrote a state machine on Arduino Sketchin to make Geremia talk with my PC over a serial port. The idea is to use Geremia for notifications.

And then it started. The circuit worked perfectly on the simulator, but I was missing a voltage regulator, a few capacitors and resistors, a good servo powerful enough to move the jaw, and a prototyping board… It started. I have spent too much money on Amazon in the past few weeks to gather all the needed pieces. Now the prototype is sitting on my desk, working.

I will transfer the prototype to an Arduino Proto Board in the next few days. But, wait, I do not have a soldering station… buy one… Well, you get the point; I could not stop.

In the meantime, I browsed YouTube to get some knowledge of electronics. I found a guy who built a 4 bit computer completely on breadboards. I already know which is going to be my next personal project. For the time being, I am having fun reading “Digital Computer Electronics,” which talks just about that.

I am the product, no more

Photo by Roman Martyniuk on Unsplash

It is quite funny, but the reality is that it is incredible to realize that social media is not free anymore.

Twitter wants eight bucks a month to let me use MFA and other features that will give me the famous “blue check.”

Facebook and Instagram want twelve bucks a month to give me the “blue check” and more visibility for my posts.

So, at the end of the day, they want all of my personal data and my money as well.

The Internet is becoming a wild place.

A quick and dirty test

Photo by Artturi Jalli on Unsplash

I found myself in the position of writing a small command line Python tool for one of my colleagues. Something pretty simple. Get a contacts list from a Google Sheet and create Lead objects on Salesforce. 

Easy stuff. It should not require more than a couple of hours, testing included.

I decide to take a test with this.

I would not write a single line of code.

I describe every single function in the application as a comment and let GitHub CoPilot do the coding for me.

Well, It took twenty minutes to have the application up and running—a few tweaks here and there, mostly on prompts and error messages.

The exciting thing is that those functions are written using my programming style. Honestly, I would have written those functions in the same way. It must be said that GitHub CoPilot has access to all of my private repositories, most of them coded with Python, so it is pretty easy to guess my (not so pythonic) programming style.

It’s not the tool; it’s your brain

Photo by Josh Riemer on Unsplash

I was browsing our Slack channel this morning. I entered one of those and found a reference to useGalileo.ai. 

The basic idea of this service is to write a sentence that describes the UI design you need, and it will provide you with a complete UI design that you can edit later in Figma. 

I guess that out of the box, you could think: “The designer job is going to die!”

Read the previous sentence carefully. There is a verb: think. 

That’s the key.

The most important responsibility of a designer is to think, not to build a nice-looking UI design. That’s the last part of any project, like 10% of the total work. It is pure execution. Be careful; I am not talking about the design language you will use in your UI design. I am talking about asset production.

If there is something that, in a more or less smart way, can cut off production time, that’s welcome. I would be keen to pay for it. 

The reality is that the designer’s work is being able to write that sentence. And that’s where the talent resides. And the money too 😉

A blog in 2023?

Photo by Cristian Siallagan on Unsplash

I have written a couple of times about why correntedebole.com still exists.

It costs me a few hundred bucks every year. I could find some cheaper hosting, but I am comfortable with who I am right now, and I can also run some personal things over there that are not profoundly exposed. 

From time to time, I have to argue about this approach. These are the most common comments I get:

  • It is a waste of money.
  • There are dozens of spaces where you can write for free.
  • Having a personal blog does not make any sense in 2021, 2022, or 2023…

Yes, it costs me money to run the blog. I need hosting space and an SLL certificate. The point here is that it is my own space. I administer it, and I can run the software I like the most on it. 

Yes, there are dozens of spaces where I can write for free. LinkedIn, Facebook, Medium, and Twitter, just to name a few, where I republish what I write on Corrente Debole. 

There are big disadvantages to doing so:

  • Not in every place what I write is going to be mine. 
  • If they are free, they probably monetize my writings somehow. I am still fine with the current terms, but these terms may change over time.
  • I have to comply with the Terms and Conditions of the site where I write. I have never had issues with those, but again, those terms may change, and I want to be free to publish whatever I want.
  • Those free space may change their attitude towards users, and it is their absolute right to do so. Again, I want to be free. Look at what happened on Twitter in recent times.
  • Does it make sense to have a blog in 2023? The answer is definitely yes.

So, as far as I will have the money to keep Corrente Debole alive, it will continue to exist.

On being laid off

Photo by David Clode on Unsplash

Being laid off sucks. I have gone through it, and it definitely sucks.

You are being laid off even if you have successfully reached your goals.

I still remember every minute of that day as if it were today.

I remember the people around me not being able to look into my eyes as I walked away. The removal process had already begun in their minds.

I remember driving home with my card boxes, trying to figure out how to tell my significant one I no longer had a job. 

At least it was a human being telling me I was fired. If you consider a General Counsel a human being, he was a human.

I did not sleep that night, but I remember that I got out of bed thinking: “Well, your loss. I know what I am worth. Fuck you.” 

It was tough.

The news spread fast. After a couple of days, I started receiving offers from other companies. I decided to take six months off before thinking about my next move.

I understand how thousands of people feel when they are fired from big tech companies. The numbers are impressive. It is estimated that more than 107.000 people lost their job between 2022 and 2023. 12000 by Alphabet, 18.000 by Amazon, 3740 by Twitter, 9090 by Salesforce, 4100 by Cisco, 11000 by Meta, 10000 by Microsoft, and 3900 by IBM, to name a few. If you are strong enough, you can read the numbers here.

It is interesting to look at how these big tech companies laid off people. Some of them disabled physical access to the workplace, others just fired an e-mail, others held an all-hands meeting, and others locked out people from their work accounts or locked their company’s personal computer.

If you are going to fire thousands of people, is there a “correct” and “fair” way to do it? Every company I cited before has critical assets they need to protect when an employee is fired. Think about it multiplied by thousands.

No, there is no good way to do it.

It is also interesting to notice that while you are firing thousands of people, you are running an event with a concert from a celebrity, or you just announced a 10 billion dollar investment in another company.

Corporate inconsistency.

So, do companies have to have a soul? That is not the case. The distance between how companies represent themselves and how they really are is still abysmal. This is true for every company size.

There must be hundreds of managers that had to make a decision on who and when. Did it hurt? I don’t know. I have been there, and it is the most challenging thing I have ever managed. As I remember the day I was fired, I remember the day I fired someone. 

Being laid off sucks. 

What I can say to those people is to look ahead. I went through it, and it was not easy, but it was the only way.

If I can help any contacts, even with a friendly chat, do not hesitate to get in touch. 

WiFi is looking at you

Photo by Misha Feshchak on Unsplash

You can detect people’s location in an area with WiFi coverage since years ago. Retailers were looking at it to understand customers’ behavior in their stores. Triangulation over airwaves is not new.

I came across a research paper: Dense Pose From WiFi.

An interesting read.

The basic idea is to determine human pose using inexpensive hardware like WiFi routers.

Here’s what you can do:

Given three WiFi transmitters and three aligned receivers, we can detect and recover dense human pose correspondence in cluttered scenarios with multiple people.

The researcher states that they can do this with a couple of WiFi routers at around 60 US dollars. Interesting.

You can easily detect and monitor people’s behavior using video cameras. It is as cheap as the solution documented by Carnegie Mellon University researchers. The main difference is those video cameras come with more significant privacy problems. People can be identified and tracked over time. Something, I guess, is intended.

The WiFi solution can be considered much more privacy aware than video cameras.

While I was reading the paper, I was impressed by the result. Just look at the pictures in the document to understand the potentiality.

I am impressed by what you can achieve using inexpensive hardware and open-source software. If you have the knowledge, you can build advanced systems that, a few years ago, were available only to big companies and government agencies. 

This is really exciting to me. 

Here’s the link to the original document: Dense Pose From WiFi

Debugging Streamlit with PyCharm

Photo by path digital on Unsplash

Streamlit is a Python package that allows you to build beautiful dashboards from Python without the need for a deep knowledge of front-end development. This is my case. I have never been interested that much in front-end development. I was, and I am a backend developer type.
Since I am playing with different data coming from our systems, I found Streamlit incredibly useful for organizing and visualizing the data I collect. You can run your dashboard locally and deploy it in the cloud when you need to share it with others in your organization.
I love PyCharm, which I use for my Python development.
As for every application, you need some debugging to ensure you are doing the right thing.
When you develop locally, you run a local Streamlit, dedicated web server. How can you debug my script in PyCharm?
I spent some time thinking about it and found a solution that may be helpful to other people out there. This will work in Visual Studio Code as well, but I didn’t try it since I don’t love Visual Studio Code so much.
You can add a Run/Debug configuration to PyCharm like the one you see below:

PyCharm – Add Run/Debug Configuration

Now you can set your breakpoints in the script and debug it as you usually do in PyCharm.