A "Code Smells: Hall of Fame" meetup
Usually, I try to attend interesting events and meetups in the city. It broadens my horizons and helps me to keep up with the industry. However, it’s hard to find time for all of them. A recent meetup, organized by the Barcelona JUG, was an event that you literally couldn’t miss. That was a talk by Victor Rentea - “Code Smells: Hall of Fame”.
If you've never heard of Code smells, they are different code characteristics that might indicate deep problems with the code or its design. The term was coined by Kent Beck and popularized by Martin Fowler in his seminal Refactoring book. Code smells are not bugs or errors, but the places that you should pay more attention to. So, you better be familiar with some of them (at least, with the 22 smells from the book).
Victor presented the code smells in three different categories: core, OOP, FP. Some of the presented smells were the classic ones. Some of them were totally new for me. What I really liked about the presentation is that it was crammed with code examples. This is very valuable when you have to listen or discuss abstract things and issues.
After the presentation, I got a chance to participate in a small after-party talk with Victor Rentea and the guys from the JUG community. That was a fascinating discussion! We even tested different AI tools to find a solution to a tricky performance problem. 𝐒𝐩𝐨𝐢𝐥𝐞𝐫: Only the right prompt can help the AI come up with the right solution (or help to find the right direction). So, when you play around with a piece of code, it’s not enough to ask the AI once about the code. It seems it's better to ask it several times and from different perspectives.
Besides the new code smells, the main takeaways from the presentation were the idea of semantic richness and some insights about multiple relationships between psychology and programming 😎