<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Giovanni Cappabianca on Medium]]></title>
        <description><![CDATA[Stories by Giovanni Cappabianca on Medium]]></description>
        <link>https://medium.com/@giovanni.kappa?source=rss-79bbd6b5ecd5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*DsFaQxvPjLLiJpu0bYIv-g.jpeg</url>
            <title>Stories by Giovanni Cappabianca on Medium</title>
            <link>https://medium.com/@giovanni.kappa?source=rss-79bbd6b5ecd5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 13:07:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@giovanni.kappa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I Built My Wedding RSVP Website with AI and AWS (for €0)]]></title>
            <link>https://medium.com/@giovanni.kappa/i-built-my-wedding-rsvp-website-with-ai-and-aws-for-0-fb5800266e3b?source=rss-79bbd6b5ecd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb5800266e3b</guid>
            <category><![CDATA[weddings]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[github-pages]]></category>
            <category><![CDATA[kiro]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Giovanni Cappabianca]]></dc:creator>
            <pubDate>Sun, 22 Nov 2026 11:33:36 GMT</pubDate>
            <atom:updated>2026-11-22T11:33:36.776Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gvM4V4-DKHMjckS7" /><figcaption>Photo by <a href="https://unsplash.com/@stills_byliz?utm_source=medium&amp;utm_medium=referral">Liz Morgan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>It All Started with a Request from the Bride</h3><p>Planning a wedding involves making hundreds of decisions: choosing the venue, organizing the menu, managing the guest list, arranging the tables, and dealing with countless other details.</p><p>As a computer engineer, I thought I could simplify at least one of those tasks: <strong>collecting RSVPs from our guests.</strong></p><p>My first idea was straightforward. Create a Google Form, share the link, and collect responses in a spreadsheet.</p><p>Problem solved.</p><p>Well, not quite.</p><p>My future wife had a different set of requirements.</p><p>She wanted guests to access everything directly from their smartphones, without creating an account, entering credentials, or being redirected to an external service such as Google Forms.</p><p>The experience had to be simple, accessible, and integrated into our wedding website. Since weddings already come with more than enough expenses, I added one more requirement:</p><p><strong>The entire solution had to cost €0.</strong></p><p>That was the starting point of a small technical experiment: building our wedding website through vibe coding with Kiro and using AWS to handle the backend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*2MT9zCtOpRBXmU-qCDFcww.jpeg" /><figcaption><em>The mobile-friendly RSVP form, designed to let guests confirm their attendance and share dietary requirements without creating an account or leaving the wedding website</em></figcaption></figure><p>What initially looked like a simple form eventually introduced some familiar software engineering challenges: API security, bot protection, data persistence, email delivery, and infrastructure lifecycle management.</p><h3>From Vibe Coding to a Working Website</h3><p>For this experiment, I decided to use <strong>Kiro</strong>, an AI-powered development environment, to help generate and refine the application.</p><p>The idea behind vibe coding is to describe the desired behavior in natural language and let AI generate much of the implementation. This can significantly accelerate development, especially when building relatively small applications.</p><p>But generating code is only one part of the process. The first challenge was translating my wife’s requirements into an actual user experience.</p><p>I chose a lightweight frontend based on HTML, CSS, and JavaScript, hosted on GitHub Pages.</p><p>The website included practical information about the wedding, directions to the ceremony and reception, and an RSVP form where guests could confirm attendance, specify the number of participants, select menu preferences, and report food allergies or dietary requirements.</p><p>Everything was accessible from a single website, without requiring authentication or opening an external form. GitHub Pages was particularly suitable because it provides static website hosting without requiring me to manage a web server.</p><p>However, there was one limitation.</p><p><strong>A static website can display a form, but it still needs a backend to validate, process, and store submissions.</strong></p><p>That is where AWS came into the picture.</p><h3>Designing a Small Serverless Architecture</h3><p>I decided to build the backend using AWS serverless services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*D-bcZHE2FYZA_3ARTALWpQ.png" /><figcaption><em>The serverless architecture behind the wedding RSVP website. GitHub Pages hosts the frontend, while AWS API Gateway, Lambda, DynamoDB, and SES handle submissions, security checks, data storage, and email notifications. Google reCAPTCHA v3 provides an additional layer of bot protection.</em></figcaption></figure><p>Serverless does not mean that servers disappear. It means that the cloud provider manages the underlying infrastructure, allowing developers to focus on application logic instead of maintaining servers.</p><p>For a wedding website with limited traffic and a relatively short lifetime, this approach was particularly appealing.</p><p>The architecture consisted of a few components, each with a specific responsibility.</p><ul><li><strong>Amazon API Gateway</strong> served as the public entry point. It exposed an HTTPS endpoint that the website could invoke when a guest submitted the RSVP form.</li><li><strong>AWS Lambda</strong> executed the Python backend code. It validated incoming requests, verified security tokens, applied application-level rate limiting, and coordinated the other services.</li><li><strong>Amazon DynamoDB</strong> provided a managed NoSQL database. I used two tables: one to store RSVP submissions and another to maintain request counters associated with client IP addresses.</li><li><strong>Amazon Simple Email Service (SES)</strong> handled email notifications, allowing me to receive RSVP details without constantly checking the database.</li><li><strong>Amazon CloudWatch Logs</strong> collected application logs, which were useful for investigating errors and understanding backend execution.</li><li><strong>AWS SAM and CloudFormation</strong> allowed me to define and deploy the infrastructure through code rather than manually configuring every resource in the AWS Console.</li></ul><p>The main request flow was:</p><ol><li>A guest completed the RSVP form on GitHub Pages.</li><li>The browser generated a Google reCAPTCHA v3 token.</li><li>The browser sent the RSVP data and token through HTTPS to API Gateway.</li><li>API Gateway invoked the Lambda function.</li><li>Lambda verified the token with Google, checked the IP-based request limit, validated the submission, and stored the response in DynamoDB.</li><li>Lambda used SES to notify the administrator.</li></ol><p>At this point, I had a functioning serverless application. But making the website work was only the beginning.</p><h3>Challenge #1: No Login, but What About Bots?</h3><p>One of the bride’s non-negotiable requirements was that guests should not need an account.</p><p>From a user experience perspective, this made perfect sense. From a security perspective, however, it introduced a problem. Without authentication, the RSVP form was publicly accessible. Anyone who discovered the endpoint could potentially submit a response, including automated bots.</p><p>And while the idea of having hundreds of unexpected guests at our wedding was amusing, I preferred to keep the guest list under control.</p><p>To reduce automated submissions, I integrated <strong>Google reCAPTCHA v3</strong>. Unlike traditional CAPTCHA mechanisms that ask users to identify traffic lights or select images, reCAPTCHA v3 can operate without interrupting the user experience. It generates a token that the backend can verify through Google’s service. The verification response includes a risk score ranging from 0.0 to 1.0, with higher scores generally indicating interactions considered more likely to be legitimate.</p><p>In my implementation, the frontend generated a token when the guest submitted the form. The token was then included in the request to the backend. Lambda called Google’s verification endpoint and accepted the token only when verification succeeded and the score was at least <strong>0.5</strong>.</p><p>An important architectural decision was to validate the token on the backend rather than trusting the browser. Client-side checks alone can be bypassed, particularly when an attacker interacts directly with a public API. Of course, reCAPTCHA is not a perfect security boundary. It cannot prove that a guest is genuinely invited, and sophisticated automated traffic may still pass its checks. But it added a useful layer of protection without making the RSVP process more complicated.</p><h3>Challenge #2: Protecting a Public API from Excessive Requests</h3><p>The next concern was the public API itself. Even with reCAPTCHA, API Gateway remained reachable over the internet. Someone could generate repeated requests, potentially increasing backend invocations, database activity, and operational costs. This mattered because one of my original requirements was to keep the solution free.</p><p>So, I introduced two complementary mechanisms.</p><h3>API Gateway Throttling</h3><p>At the API Gateway level, I configured a request rate limit of <strong>2 requests per second</strong>, with a burst limit of <strong>10</strong>.</p><p>This provided a first layer of traffic control before requests reached the Lambda function. The throttling mechanism was designed to limit excessive traffic across the API, although AWS treats these limits as best-effort targets rather than strict guarantees.</p><h3>Application-Level Rate Limiting</h3><p>I also implemented a second mechanism inside Lambda. For each request, the backend extracted the client’s IP address and used a dedicated DynamoDB table to maintain a request counter.</p><p>The default configuration allowed <strong>10 requests per minute per IP address</strong>.</p><p>If an IP exceeded that threshold within the current time window, the application returned an HTTP 429 response, indicating that too many requests had been received.</p><p>The backend also saved the client IP alongside each RSVP submission for technical traceability.</p><p>API Gateway throttling helped reduce the volume of traffic reaching the application while DynamoDB-based rate limiting attempted to identify repeated requests from the same source.</p><p>There were limitations because IP addresses are not reliable user identifiers. Multiple guests may share a public IP address, and the same person may use different addresses. Furthermore, the application-level counter used separate read and update operations, meaning that simultaneous requests could produce race conditions.</p><p><strong>The system was designed to keep working even if the rate-limiting check failed</strong>: if the database rate-limit check failed, the request was allowed to continue. For a small wedding application, these were compromises I accepted. For a production system exposed to potentially hostile traffic, I would consider stronger controls and atomic counter updates.</p><h3>Challenge #3: Amazon SES and the Sandbox Restriction</h3><p>I wanted to receive an email whenever someone submitted an RSVP. Amazon SES appeared to be the obvious solution. It is a managed AWS service that allows applications to send emails programmatically.</p><p>At first, I considered sending confirmation emails directly to guests as well but I encountered an important constraint: <strong>Amazon SES operates in a sandbox environment by default.</strong></p><p>While an account remains in the SES sandbox, it can send email only to verified recipient addresses or domains, apart from the SES mailbox simulator. To send emails freely to unverified recipients, an AWS account must request production access.</p><p>For a temporary wedding application, I decided that requesting production access was unnecessary. Rather than expanding the email-sending capabilities of the account, I adapted the application workflow. I kept SES in the sandbox and configured it to send notifications only to my verified administrator email address.</p><p>Whenever a guest submitted the form, Lambda generated an email containing the RSVP details. If the guest provided an email address, the backend also prepared a personalized response and emailed that draft to me. I could then forward the message manually.</p><p>This was not a fully automated communication workflow, but it was sufficient for our needs. It also illustrates an important engineering principle:</p><p><strong>Sometimes the simplest solution is not to remove a technical constraint, but to adapt the workflow around it.</strong></p><p>Keeping SES in the sandbox allowed me to avoid an additional approval process while preserving the core functionality.</p><h3>Infrastructure as Code: Building with the End in Mind</h3><p>Another decision was to manage the backend using Infrastructure as Code. Instead of creating each AWS component manually, I used AWS SAM and CloudFormation to describe the resources in a deployment template.</p><p>The template defined the Lambda function, API Gateway configuration, DynamoDB tables, IAM permissions, logging configuration, and the relevant SES identity resource.</p><p>AWS SAM simplified the definition and deployment of the serverless application and CloudFormation managed the resulting infrastructure stack. This made the environment reproducible, easier to understand and provided a structured way to manage the application’s lifecycle.</p><p>There was one thing I knew from the beginning: <strong>This application had an expiration date.</strong></p><p>Our wedding was scheduled for August 30, 2026. After that date, the RSVP backend would no longer serve a practical purpose and I did not want to leave unused AWS resources running indefinitely.</p><h3>After the Wedding: Decommissioning the Backend</h3><p>On August 30, 2026, we got married. Once the celebrations were over, the RSVP application had completed its job. It was time to shut down the backend.</p><p>Because the application infrastructure was managed through CloudFormation, I could initiate the deletion of the stack. CloudFormation handled the deletion of the resources declared in the application stack, subject to the usual resource dependency and retention rules.</p><p>There was one important exception in my environment: <strong>the Amazon S3 bucket used to store the deployment artifacts.</strong></p><p>During deployment, packaged application artifacts were uploaded to S3 so that AWS could deploy the stack. That bucket was separate from the application stack and therefore was not deleted when I removed the stack through CloudFormation.</p><p>CloudFormation manages resources according to their stack ownership. Deleting an application stack does not automatically remove external infrastructure that was created or managed separately, so the deployment bucket required separate lifecycle management.</p><p>The experience reinforced that infrastructure management should include not only provisioning and deployment, but also decommissioning.</p><h3>The Trade-Offs: What This Architecture Did Not Solve</h3><p>The final application met its main requirements, but I would not describe it as a perfect or production-grade implementation. Several design choices involved deliberate compromises.</p><h3>Guest Identity</h3><p>Because the website did not require authentication, the backend had no reliable way to verify that a submission came from an actual invited guest. reCAPTCHA helped distinguish potentially automated traffic from legitimate-looking interactions, but it did not establish guest identity.</p><p>A more robust alternative would have been to issue unique invitation tokens or personalized RSVP links. That would have introduced an additional layer of validation without necessarily requiring users to create accounts. For this project, I prioritized accessibility and simplicity.</p><h3>Response Integrity and Duplicate Submissions</h3><p>Each RSVP submission was stored in DynamoDB with a unique identifier.</p><p>This made it possible to retain individual responses, but it did not prevent the same family from submitting the form multiple times. The application did not enforce uniqueness based on a verified invitation identity. That meant responses could require manual reconciliation.</p><p>A stronger approach could have used invitation-specific identifiers, conditional database writes, or a dedicated process to update an existing RSVP rather than creating a new one.</p><h3>Data Protection and Privacy</h3><p>The application collected personal information, including guest names, email addresses, IP addresses, and potentially food allergies. To protect this information, the DynamoDB tables were not publicly accessible. All database operations were handled by the AWS Lambda backend using IAM permissions. This architecture prevented direct database access from the frontend and reduced the risk of exposing guests’ personal information.</p><p>Protecting data from unauthorized access is only one aspect of privacy. Other important considerations include collecting only the information necessary for the event, limiting how long it is stored, and deleting it when it is no longer needed.</p><p>Since the application was designed for a temporary event, decommissioning the backend after the wedding was also an opportunity to remove the associated data.</p><h3>Email Notification Reliability</h3><p>There was another limitation in the notification workflow. The backend stored the RSVP in DynamoDB before attempting to send the email through SES.</p><p>If the email notification failed, the RSVP remained stored in DynamoDB and the application could still return a successful response. While this prevented notification errors from affecting successfully stored submissions, it also meant that a successful RSVP did not guarantee email delivery.</p><p>For a more robust application, I would introduce an asynchronous notification mechanism, potentially using Amazon SQS, with retries and a way to track failed deliveries. For our wedding, keeping the database as the primary record and email as a secondary notification channel was an acceptable compromise.</p><h3>So, Did It Really Cost €0?</h3><p>Yes. For my specific deployment and usage, the infrastructure did not generate an additional bill. However, that does not mean the same architecture is universally free.</p><p>GitHub Pages can provide free static hosting under its applicable conditions, while AWS services such as Lambda, API Gateway, DynamoDB, and SES have their own pricing models and free-tier allowances. The actual cost depends on factors such as the AWS account, region, service configuration, traffic volume, and applicable free-tier eligibility.</p><p>In my case, the limited number of guests, the relatively short lifetime of the backend, and the available free usage allowances kept the operational cost at zero. I would therefore describe this as a <strong>zero-cost outcome</strong>, rather than a guaranteed zero-cost architecture.</p><h3>What Vibe Coding Actually Taught Me</h3><p>Before starting this project, I expected the most challenging part to be implementing the website. Instead, Kiro helped accelerate much of that work. The more interesting challenges emerged around the application.</p><ul><li>How could I keep the user experience simple without introducing unnecessary security risks?</li><li>How could I expose a public API while limiting potential abuse and unexpected costs?</li><li>How should I handle a managed email service whose operational constraints did not match my initial design?</li><li>And how could I make sure the infrastructure was properly decommissioned once its purpose had been fulfilled?</li></ul><p>These questions have little to do with how quickly an AI assistant can generate Python or JavaScript. They concern architecture, security, operational constraints, and technical judgment.</p><p>Looking back, the most valuable part of the experiment was not that AI helped me write the code. It was the opportunity to combine AI-assisted development with practical cloud architecture decisions, from the initial requirements through deployment and eventual decommissioning.</p><p><strong>Vibe coding made the implementation faster. Engineering judgment made the solution fit its purpose.</strong></p><p>And perhaps the most important result of all?</p><p>Our guests could confirm their attendance directly from their phones, without creating an account, opening Google Forms, or worrying about the technology behind the website. Which, from the bride’s perspective, was probably the only requirement that truly mattered.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb5800266e3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From a Lecture to WhatsApp Voice Messages]]></title>
            <link>https://medium.com/@giovanni.kappa/from-a-lecture-to-whatsapp-voice-messages-963ee87df024?source=rss-79bbd6b5ecd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/963ee87df024</guid>
            <category><![CDATA[whisper]]></category>
            <category><![CDATA[ai-model]]></category>
            <category><![CDATA[edge-ai]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[speech-recognition]]></category>
            <dc:creator><![CDATA[Giovanni Cappabianca]]></dc:creator>
            <pubDate>Sat, 14 Nov 2026 18:03:45 GMT</pubDate>
            <atom:updated>2026-11-14T18:03:45.009Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How a question from my sister turned into an experiment with Whisper on Android.</em></p><p>“How can I get a transcript of a lecture?” my sister asked me. She had a recording and wanted to go back over what had been said. With a transcript, she could search for a word, reread an explanation, or find a passage without jumping back and forth through the audio.</p><p>I started looking on Hugging Face for a model I could download and run on my computer. That’s how I discovered Whisper, the speech recognition model released by OpenAI. It came in a multilingual version, so I could try it with recordings in Italian straight away.</p><h3>The first prototype</h3><p>I wrote a small Python app. You picked an MP3, chose where to save the result, and clicked a button. The app produced a text file with timestamps. If a sentence looked wrong, I could jump to that point in the recording and listen again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*ThAfYjCdS7YBdGN3whVK3Q.jpeg" /><figcaption>The first desktop prototype, built with Python and Tkinter</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L9aquYEiSjHw5RXxeoibww.jpeg" /><figcaption><em>A timestamped transcript of an Italian physiology lecture generated by the prototype</em></figcaption></figure><p>The transcript was uneven. Some sentences read well, while others sent me back to the recording. For a lecture, having searchable text was already a step forward. As I tested the prototype, I thought of another situation where even an imperfect transcript could come in handy right away.</p><h3>A voice message you can’t listen to</h3><p>When I get a voice message while I’m out without headphones, I usually leave it for later. The same thing happens when I’m at dinner with other people. I can glance at a text, but playing a voice message would interrupt the conversation and let everyone nearby hear it. And sometimes all I need to know is that we’re meeting half an hour later.</p><p>I wondered whether I could run the same speech recognition engine on my phone. The idea was simple. Tap <strong>Share</strong> on the voice message, choose the app, and read the transcript. That’s how <em>Vocali offline</em> started.</p><p>WhatsApp already offers on-device transcription. As of November 2026, its official help center lists Italian for iPhone, while the Android page still leaves it off the list. Italian has appeared for some Android beta users, so availability can vary. Building a separate app gave me a way to transcribe Italian on Android, try different models and decoding strategies, and work with audio files from outside WhatsApp too. <a href="https://faq.whatsapp.com/241617298315321/?cms_platform=android&amp;helpref=search">Android help center</a> · <a href="https://faq.whatsapp.com/241617298315321/?cms_platform=iphone">iPhone help center</a> · <a href="https://wabetainfo.com/whatsapp-is-rolling-out-new-languages-for-voice-transcriptions/">Android beta rollout</a></p><p>The app also accepts voice messages shared from Telegram. Telegram has its own transcription feature, with a limited weekly allowance for free users and unlimited transcription through its paid Premium subscription. With <em>Vocali offline</em>, I can share audio from either app and transcribe it on the phone without a Telegram subscription. <a href="https://core.telegram.org/api/transcribe">Telegram’s transcription limits</a> · <a href="https://telegram.org/blog/similar-channels">Telegram’s voice-to-text announcement</a></p><h3>From computer to phone</h3><p>I built the Android app in Kotlin and used whisper.cpp to run the model. The app offers two versions of Whisper. <strong>Base</strong> comes bundled with the app and is the faster option. <strong>Small</strong> is a separate download. It takes up more space and uses more resources, but it can do a better job with some words.</p><p>I made a deliberate choice to run the entire transcription on the phone. Voice messages can contain personal details, and I wanted to turn them into text without sending the audio to a server. Once the model is on the device, the app works without an internet connection. The phone does the work, so speed and battery use depend on the device.</p><h3>Building the Android app from a browser</h3><p>I didn’t have administrator rights on my PC, so I needed a way to compile the app without installing development tools on it. I put the project in a GitHub repository and opened it in <strong>GitHub Codespaces</strong>. That gave me a VS Code editor and a terminal in the browser, where I could edit the project, commit changes, and push them to GitHub. <a href="https://docs.github.com/en/codespaces/developing-in-a-codespace/using-github-codespaces-in-visual-studio-code">GitHub Codespaces</a></p><p>Each push triggers a <strong>GitHub Actions</strong> workflow on a separate Ubuntu runner. The runner sets up Java and the Android build tools, including the NDK and CMake for the native code. It fetches whisper.cpp and the Base model, then runs the Gradle build. When the job finishes, I can download the APK from the Actions tab and install it on my phone. All the build tools run on GitHub, so I can do this from the browser without installing anything on my PC. The phone handles the transcription locally. <a href="https://docs.github.com/en/actions/how-tos/manage-workflow-runs/download-workflow-artifacts">Downloading build artifacts</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*eEu-jn5VFllIqfDSTsUb2w.jpeg" /><figcaption>Vocali offline transcribing an Italian voice message directly on an Android phone using Whisper Small</figcaption></figure><h3>What I still want to test</h3><p>I built three versions of the app to find out what I could improve, one change at a time.</p><p>I started with <em>greedy decoding</em>. At each step, Whisper picks the most likely next token and moves on. That gave me a baseline for both accuracy and speed.</p><p>For the second version, I switched to <em>beam search</em> with a beam width of three. Beam search changes how Whisper makes its first attempt. The decoder can keep up to three candidate sequences at each step, giving a less likely choice a chance to lead to a better-scoring sequence. I wanted to see whether that would help Whisper get more words right in tricky passages, and how much extra time it would take.</p><p>The third version uses the same beam search and keeps the model in memory after the first transcription. When I transcribe another voice message with the same model, the phone can skip reloading it. That let me test a separate question about everyday use. How much time can I save when several voice messages come in a row?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LhXQ8D3TsV5Xv4sqn_U8QA.png" /><figcaption><em>Greedy decoding picks the most likely token at each step. Beam search with k = 3 keeps up to three candidate sequences, so a weaker first choice can lead to a higher-scoring sequence. The probabilities are illustrative.</em></figcaption></figure><p>In one of my first tests with Whisper Base, I transcribed a voice message about a meeting in my building. The speaker said <em>millesimi</em>, the Italian term for each owner’s share of the property, expressed in thousandths. Whisper wrote <em>illesimi</em>. A few seconds later, it got stuck repeating the same syllable. I could still follow the gist, but I had to go back to the recording to make sense of an entire passage.</p><p>That gave me something concrete to measure. My next step is to transcribe a set of voice messages by hand, then run the same recordings through all three versions of the app on the same phone, using the same Whisper model each time. I’ll use <strong>Word Error Rate (WER)</strong> to compare them. It counts how many words the app gets wrong, leaves out, or adds, relative to the number of words in the reference transcript.</p><p>I’ll also record how long each version takes to produce a transcript, both on the first run and on subsequent runs. That should help me answer two questions. Does beam search reduce errors enough to justify the extra wait? And how much time does keeping the model in memory save when I transcribe several messages in a row?</p><p>I’ll pay particular attention to names, addresses, and times. If a transcript gets “nine” wrong in “meet me at nine,” that’s one word error in the score. For the person reading it, it can change the whole plan.</p><p>Have you worked with Whisper? I’d love to hear what made the biggest difference in your setup. If you’ve run it on a phone or used it to transcribe Italian, which model and settings gave you the best balance between accuracy and speed?</p><p>Sources</p><ul><li><a href="https://github.com/openai/whisper">Whisper</a></li><li><a href="https://huggingface.co/openai/whisper-small">Models on Hugging Face</a></li><li><a href="https://github.com/ggml-org/whisper.cpp">whisper.cpp</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=963ee87df024" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI saves time. But do we still have time to think?]]></title>
            <link>https://medium.com/@giovanni.kappa/ai-saves-time-but-do-we-still-have-time-to-think-cc112464c04e?source=rss-79bbd6b5ecd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc112464c04e</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[critical-thinking]]></category>
            <category><![CDATA[human-oversight]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[eu-ai-act]]></category>
            <dc:creator><![CDATA[Giovanni Cappabianca]]></dc:creator>
            <pubDate>Sat, 07 Nov 2026 13:42:30 GMT</pubDate>
            <atom:updated>2026-11-07T13:44:18.405Z</atom:updated>
            <content:encoded><![CDATA[<p>What happens when AI allows us to complete our work in half the time? Do we use the time saved to make better decisions, or are we simply expected to produce twice as much?</p><p>This question emerged during a discussion in an AI Act course held at my company. What initially seemed to be a debate about productivity gradually became a broader reflection on human responsibility and oversight.</p><p>Generative AI promises to improve productivity by automating repetitive tasks and supporting increasingly complex activities. Its adoption may also introduce risks, including opacity, biased outcomes, excessive reliance on automated recommendations and, in certain applications, threats to fundamental rights.</p><p>The European Union’s AI Act establishes a risk-based regulatory framework intended to support innovation while protecting health, safety and fundamental rights. Its requirements vary according to the characteristics and intended purpose of AI systems, with particularly demanding obligations for high-risk applications.</p><p>But regulation raises an important practical question: even when human oversight is required, do organisations give people the time and resources needed to exercise it effectively?</p><p>In this article, I explore that question by connecting the AI Act’s human oversight requirements with three possible ways AI could reshape the allocation of human working time.</p><h3>Human oversight</h3><p>The AI Act does not establish a general principle that every use of AI must be manually checked by a human. Article 14(1)-(3) introduces specific human oversight requirements for high-risk AI systems, proportionate to their risks, level of autonomy and context of use.</p><p>The concept of human oversight had already been explored in the European Commission’s <em>Ethics Guidelines for Trustworthy AI</em> (2019) — section “1.1 Human agency and oversight”<strong>(2)</strong>, which identify three possible approaches:</p><ul><li>Human on the loop (HOTL) — Humans can intervene during the system’s design phase and monitor its operation. The AI system may operate autonomously, while human supervisors retain the ability to identify problems and intervene when necessary</li><li>Human in the loop (HITL) — Humans have the ability to intervene in every decision-making cycle of an AI system. This approach allows direct human involvement in individual decisions, although such intervention may not always be practical or necessary</li><li>Human In Command (HIC) — humans retain overall governance authority over the AI system. This includes determining when and how the system should be used, establishing operational boundaries, assessing its broader impacts and deciding whether to override its outputs or discontinue its use.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C3hudJa2iPJSWELa3w7ssQ.png" /><figcaption><strong>Figure 1 - Three approaches to human oversight in AI systems. </strong><em>These approaches are described in the European Commission’s Ethics Guidelines for Trustworthy AI (2019). They provide a conceptual framework for human oversight but are not formally established as separate regulatory categories under the EU AI Act.</em></figcaption></figure><p>However, defining a human oversight model is not enough to guarantee meaningful supervision.</p><p>Article 14(4) of the AI Act addresses several practical capabilities, including monitoring system performance, recognising automation bias, interpreting outputs and overriding or interrupting the system when necessary. Article 26(2) further requires deployers of high-risk AI systems to assign oversight to people with the necessary competence, training, authority and support.</p><p>This raises an organisational question that goes beyond the explicit wording of the regulation: can human oversight remain effective if employees are expected to supervise an increasing number of AI-assisted decisions without sufficient time to assess them <strong>critically</strong>?</p><p>Consider a person required to approve dozens of AI-generated recommendations under strict deadlines. The approval process may formally involve a human, but this does not necessarily mean that each recommendation receives meaningful scrutiny.</p><p>In other words, <strong>human involvement should not automatically be confused with effective human oversight</strong>.</p><h3>AI changing the allocation of cognitive resources inside an organization</h3><p>During the class, we discussed a recurring concern. What could AI bring to our everyday work? Imagine our working time as being divided into three main activities</p><ul><li><strong>Strategic thinking</strong>. The core of decision-making. We analyse the context and the available data, challenge our current understanding of a topic, and decide how to approach the problem we are dealing with</li><li><strong>Execution.</strong> The practical phase in which, once we have decided what should be done, we actually implement it: writing code, preparing an essay or a report, connecting cables, painting a wall, and so on)</li><li><strong>Control.</strong> The phase in which we review what has been done, identify mistakes or potential pitfalls and verify whether the final result meets our expectations. This is one of our main lines of defence for the quality of what we deliver</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*rSpiBZ4avjfl33RrC6YEJg.png" /><figcaption><strong>Figure 2 - Three possible scenarios for AI-driven productivity. </strong><em>Conceptual illustration, not to scale. The three phases are simplified representations of activities that may overlap and occur iteratively. These scenarios represent possible organisational choices rather than inevitable outcomes of AI adoption. Please note that Scenario B illustrates a potential reinvestment of AI-generated time savings, rather than a guaranteed improvement in decision quality.</em></figcaption></figure><p>(A) Baseline: human working time is distributed across strategic thinking, execution and quality control.</p><p>(B) Cognitive augmentation: AI-assisted execution frees up time that can be reinvested in strategic thinking and quality control.</p><p>(C) Productivity-Driven Oversight compression: AI-assisted execution enables additional tasks, while the time allocated to strategic thinking and quality control remains unchanged.</p><p>Without AI (<strong>Scenario A — Baseline (No AI)</strong>), a certain amount of time is allocated to each of these phases. Even without AI, some execution activities can be delegated but when we remain accountable for the final outcome, strategic thinking and quality control still require our attention.</p><p>Now imagine introducing AI mainly to optimise the execution phase. The obvious question is: “<strong>How should we use the time that AI saves?</strong>”</p><p>In the best-case scenario, that time is reinvested in strategic thinking and control. We could analyse problems more deeply, make better decisions and reduce the probability of errors reaching the final stage (<strong>Scenario B — Cognitive Augmentation</strong>).</p><p>Organisations are generally under pressure to increase productivity, revenues and margins. This creates another possible scenario (<strong>Scenario C — Productivity-Driven Oversight Compression</strong>): because AI allows an activity to be completed more quickly, employees or teams are simply assigned more activities. The implicit reasoning becomes: “<em>If AI helps you do this faster, you should not need the same amount of time to do it. Therefore, during the same working hours, you should be able to produce more</em>“.</p><p>Imagine an analyst who used to review 10 reports a day. With the help of AI, they can now review 40. If the total time available for quality control remains unchanged, the average review time per report falls from 10 minutes to just 2.5 minutes. More outputs, less oversight time per output.</p><p><strong>Productivity-driven oversight compression</strong> does not necessarily lead to weaker oversight. Its impact depends on the reliability of automated checks, the complexity of decisions and the organisation’s ability to allocate human attention where it matters most. However, when the number of AI-assisted activities increases without a corresponding adjustment in strategic thinking and quality control, employees may face a growing cognitive workload. They are expected to assess more decisions within the same working hours, potentially increasing cognitive fatigue and reducing the depth of individual reviews. The relationship between decision volume, fatigue and decision quality remains complex and context-dependent<strong>(3)</strong>.</p><p>A possible counterargument is: “<em>Then let AI support the control phase as well</em>”.</p><p>But this raises another question: <strong>who oversees the controller</strong>?</p><p>Automated controls can themselves be tested, validated and monitored. The challenge is not to manually verify every automated check, but to establish when human intervention is necessary and who remains accountable for the overall process.</p><p>We could then ask AI to contribute to strategic thinking as well. But at what cost?</p><p>Consider a financial analogy. If you invest your own money, you may rely on someone else’s advice, analysis or recommendations. Do you want that person, or an algorithm, to make the final decision on your behalf? Or, do you still want to retain the ability to question the recommendation and make the final judgement yourself? This leads directly to the problem of <strong>automation bias</strong>: our tendency to rely excessively on automated recommendations instead of critically evaluating them.</p><p>The issue is not simply whether AI should participate in execution, control or strategic thinking. The deeper question is whether humans retain <strong>enough time, competence and cognitive capacity</strong> to meaningfully <strong>supervise the system.</strong></p><p><strong>The Real Question Is “How do we use the time saved?”</strong></p><p>During the discussion, one colleague raised an ironic but thought-provoking question: <em>“If everyone becomes more productive, who will consume all the additional products and services?”</em></p><p>This observation opens a broader economic debate about how the benefits of AI-driven productivity will be distributed. Higher productivity could lead to increased profits, lower prices, higher wages, shorter working hours or changes in employment. None of these outcomes is inevitable and our discussion also revealed a more immediate organisational challenge.</p><p>If AI enables us to execute tasks faster, we have an opportunity to devote more attention to strategic thinking, critical evaluation and quality control. Yet organisations may choose to use that same time to increase the volume of work instead.</p><p>Both approaches may improve productivity, but they do not necessarily produce the same quality of decisions or human oversight.</p><p>The AI Act recognises the importance of effective human oversight for high-risk AI systems. But the effectiveness of that oversight also depends on how organisations design their processes, distribute responsibilities and support the people expected to exercise control. Perhaps the question should not simply be how much time AI can save us, but what we choose to do with that time.</p><p><strong>If we use AI to accelerate execution, are we also investing enough in the human capacity to question, verify and take responsibility for the results?</strong></p><h3>Bibliography</h3><ol><li><a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?qid=1789762469647&amp;uri=CELEX:02024R1689-20260727">https://eur-lex.europa.eu/legal-content/EN/TXT/?qid=1789762469647&amp;uri=CELEX:02024R1689-20260727</a></li><li><a href="https://digital-strategy.ec.europa.eu/en/library/ethics-guidelines-trustworthy-ai">https://digital-strategy.ec.europa.eu/en/library/ethics-guidelines-trustworthy-ai</a></li><li>Maier M, Powell D, Murchie P, Allan JL. Systematic review of the effects of decision fatigue in healthcare professionals on medical decision-making. Health Psychol Rev. 2025 Dec;19(4):717–762. doi: 10.1080/17437199.2025.2513916. Epub 2025 Jul 1. PMID: 40591577.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc112464c04e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Karate in My 30s Helped Me Rewrite an Old Story]]></title>
            <link>https://medium.com/@giovanni.kappa/how-karate-in-my-30s-helped-me-rewrite-an-old-story-4c4d2a95fb86?source=rss-79bbd6b5ecd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c4d2a95fb86</guid>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[redemption]]></category>
            <category><![CDATA[self-discipline]]></category>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[karate]]></category>
            <dc:creator><![CDATA[Giovanni Cappabianca]]></dc:creator>
            <pubDate>Tue, 29 Apr 2025 21:10:50 GMT</pubDate>
            <atom:updated>2025-04-29T21:10:50.993Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4SXBlX63bqTSoRJr" /><figcaption>Photo by <a href="https://unsplash.com/@alci?utm_source=medium&amp;utm_medium=referral">Alci Alliata</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>A Brief Chapter, a Teacher, and a Choice of My Own</h3><p>As a child, I had a brief stint in karate. It didn’t last long, and for years I blamed my father for letting me quit. But the truth is, at just nine years old, I was the one who made that decision.</p><p>I still remember the class where the teacher gave me a serious scolding. His intent was to motivate me, but for a kid my age, it was overwhelming. I left in tears.</p><p>The teacher, determined not to let me quit, urged my father to bring me back to the next lesson. But seeing how shaken I was, my father chose not to force me. And so that brief adventure ended.</p><p>I didn’t stand still. I tried volleyball, which, in hindsight, was a good choice. Karate is a solo discipline, while team sports taught me the value of collaboration. Over the years, I kept changing activities — swimming, dancing, weight training — always searching for something that felt right. Until, like for many, everything stopped with the arrival of COVID.</p><p>During the toughest months of the pandemic, I found ways to stay active. I began doing bodyweight exercises in my small room. I was living in a big city, sharing the apartment with others, and using the common areas for workouts wasn’t easy. But as I grew more confident with the movements, I fell in love with them. I built a new routine: three workouts a week, flexible and adapted to my days. Sometimes early in the morning, sometimes before dinner. There was something powerful in the simplicity of those movements — a little space of freedom within the chaos of the world.</p><p>When the grip of the pandemic began to ease, something inside me woke up. I felt the need to try karate again. Like an unfinished work that deserved to be completed. So, nearing thirty, I put on the Gi and white belt once more — as if I were closing a circle, or maybe opening a new one.</p><h3>What Drove Me Back</h3><p>Many people, upon hearing I’d taken up karate again, asked me why. I never had a satisfying answer. One morning, I decided to pause and try to put into words what I felt.</p><p>I reread the fundamental principles of karate: <strong>perseverance, respect, sincerity, character, and self-control</strong>. And then I understood.</p><p><strong>Perseverance</strong> is something I’ve tried to apply to my studies — year after year, facing each exam session with all I had, rain or shine, without leaving exams behind.</p><p><strong>Respect</strong> is a cornerstone of how I relate to others. I believe every healthy relationship is built on recognizing differences and protecting each other’s space — without manipulation. But I also recognize a struggle: setting boundaries, expressing how I feel when someone crosses a line. Karate became a tool for that: not to seek approval at all costs, but to have the courage to express myself and build more authentic relationships.</p><p><strong>Sincerity</strong> isn’t about saying whatever comes to mind without filters. That’s brutal honesty — what some call “truthicide” — an openness without emotional regulation that ends up hurting others. True sincerity is purity of heart and transparency. It’s about showing who you are without wearing a Pirandellian mask.</p><p>As for <strong>character</strong>, I feel I have much to cultivate. According to psychoanalysis, character is shaped by the blend of our nature and environment. It’s what makes us optimistic or cautious, generous or reserved. I see it as a scale of justice — with my needs on one side, and those of others on the other. Balance isn’t found, it’s created every day. In training, this balance is tested constantly.</p><blockquote><em>“You’re passive,” my teacher once told me. “Your stance is disadvantaged.”</em></blockquote><p>Sometimes, it takes just a misaligned leg to render a technique ineffective. It’s a matter of millimeters, but also of awareness.</p><p><strong>Self-control</strong> is the art of managing emotional responses. It’s choosing fruit over dessert, a book over television, training over the couch. It’s feeling broken inside and not letting it show — learning to be stronger.</p><h3>My Karate Journey: Learning to Learn</h3><p>At my first lesson, I showed up in a simple tracksuit. I felt like a fish out of water — awkward and out of place. I tried to hide the discomfort by throwing myself into the warm-up exercises.</p><p>Inside, a voice whispered: <em>“What are you doing here? Wouldn’t it be better to do something else?”</em></p><p>I’ve since learned to silence that voice.</p><p>The first benefit I experienced wasn’t physical — it was mental. A core belief shattered: the idea that learning must follow a linear path, theory before practice. In the dojo, the approach was different:</p><p><strong>“Here’s the exercise. Do it.”</strong></p><p>A childlike invitation — to mimic, observe, and imitate. But copying isn’t enough. The details escape you.</p><blockquote><em>“Your foot isn’t positioned right. Straighten it.”</em></blockquote><blockquote><em>“Your hand is bent wrong.”</em></blockquote><blockquote><em>“Spread your legs more.”</em></blockquote><blockquote><em>“Why is your head tilted? Straighten up.”</em></blockquote><p>You try to remember it all, but you still mess up. So you focus on one thing. When that works, you add the second — and forget the first.</p><p>It’s frustrating. But that’s how it works. The body needs time. Only <strong>repetition over time</strong> turns those details into something you own.</p><p>The teacher knows this. Patiently, they add complexity like a sculptor refining a statue.</p><blockquote><em>“When you jump, bring your hands to your hips to load, then release downward as you land.”</em></blockquote><blockquote><em>“Use hip rotation to generate energy — make it descend.”</em></blockquote><p>Then there’s <strong>breathing</strong> — an entirely separate form of training. Inhale when receiving, exhale when attacking. But one of the most fascinating concepts I discovered was that of the <strong>“living hand” and the “dead hand.”</strong></p><p>In karate, every strike is paired with a pullback motion — <em>hikite</em> — of the opposite arm. It might look like an escape move, but it’s actually what gives <strong>speed and power to the next strike</strong>, creating torque, like a physicist’s lever.</p><p>Over time, I began to <strong>gain control over my body</strong>. I learned how to shift my weight to deliver a blow without losing balance. The teacher’s corrections — hip use, arm angles, reaction to strikes — were essential. The technique suggested in our class?</p><p><strong>“Focus on one detail at a time.”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wxx33TWlr5TDAYSN" /><figcaption>Photo by <a href="https://unsplash.com/@tanzadeh?utm_source=medium&amp;utm_medium=referral">Allen Tanzadeh</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The <strong>kata</strong> is a fight against imaginary opponents, but they feel real.Each sequence follows a codified rhythm of blocks and counterattacks.</p><p>The latest one I performed at a regional tournament was <em>Pinan Godan</em>, the fifth kata of the Wado-Ryu style. After my performance, the teacher gave me three notes:</p><ol><li>I pulled my right wrist too far back when returning from an attack position.</li><li>I hunched during a rotational jump.</li><li>My arms were too stiff during double blocks, compromising stability.</li></ol><p>How to improve?</p><p><strong>Redo the kata slowly</strong>, focusing only on the first point. Repeat it, feel it, correct it. Then move to the next.</p><p>Karate doesn’t ask for perfection. It asks you to <strong>stay</strong>, to <strong>observe</strong>, to <strong>correct</strong>.</p><p>To <strong>learn how to learn</strong>.</p><p>But to grow, technique isn’t enough — you must learn to read the moment.</p><h3>Maai: The Invisible Dance of Distance and Timing</h3><p><strong>Maai</strong>, the concept of distance and timing, determines <strong>when and how</strong> to attack or defend. You don’t learn it by repeating empty movements, but by <strong>truly facing an opponent</strong>.</p><p>I learned this when, during sparring, I kept getting too close. I’d enter the attack zone without striking and ended up blocking from bad positions — or just taking the hit.</p><p>One day, someone told me, bluntly:</p><blockquote><em>“If you move in and don’t attack, then why move in at all?”</em></blockquote><p>A simple piece of advice — but hard to apply.</p><p>Just lifting my elbows to start an action made me tense and short of breath. I feared getting hit… and also hurting my partner.</p><p>Over time, I began to <strong>pay attention to distance</strong>. I stopped charging forward recklessly. I watched, waited, tried to read the opponent. I’m not a powerhouse — but now I feel more in control. Especially of <em>when</em> and <em>how</em> I move.</p><p>In this dynamic, karate teaches three timing principles:</p><h3>The 3 Principles of Combat Timing</h3><p><strong>Go no Sen (後の先) — Reacting at the right moment</strong></p><p>You respond after seeing the opponent’s attack. It’s about <strong>intercepting</strong> the movement with calm and clarity, turning defense into precise counterattack. Ideal for those with great control and composure.</p><p><strong>Sen no Sen (先の先) — Anticipating the attack</strong></p><p>You move <strong>during</strong> the opponent’s action, reading their intent just as it takes form. A strategy used by aggressive, experienced fighters who can read timing instinctively.</p><p><strong>Sen Sen no Sen (先々の先) — Preempting the attack</strong></p><p>You act <strong>before</strong> the opponent even attacks. It’s about imposing your rhythm and forcing them to react — <strong>taking the initiative</strong> before they do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J2DuCm4WqLByaY-e" /><figcaption>Photo by <a href="https://unsplash.com/@grstocks?utm_source=medium&amp;utm_medium=referral">GR Stocks</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Never Start Defeated: The Most Important Lesson</h3><p>During one class, our <strong>senpai</strong> introduced the idea of <strong>bunkai</strong> — breaking down kata into practical self-defense moves.</p><p>He showed us an application: receiving a gyaku-tsuki punch, grabbing the opponent’s wrist, and turning it into a joint lock on the elbow.</p><p>Then he asked:</p><blockquote><em>“Do you see anything wrong with this?”</em></blockquote><p>I replied:</p><blockquote><em>“Maybe the initial wrist grab. If the attack is fast, it’s hard to block and grab at the same time.”</em></blockquote><p>His response hit me harder than any punch:</p><blockquote><em>“If we assume we can’t grab the wrist, then most of what we’re doing has no practical value. Never start defeated. In every fight, no matter your level or theirs, you both have a 50/50 chance. But if even you don’t believe in what you’re doing, you’ve already lost.”</em></blockquote><p>That was a revelation.</p><p><strong>There are no useless techniques — only ineffective execution due to lack of belief. Every fight starts on equal ground. If you give your opponent a mental advantage, you’ve already lost.</strong></p><p><strong>Conviction makes technique work.</strong></p><p>And this goes far <strong>beyond the dojo</strong>.</p><p>How many times have our parents told us to give up?</p><p>How many times were we called crazy for wanting to change something — at work, in life?</p><p>If we gave in to every critique, we’d never launch our own “attack pattern” toward what we believe in.</p><p><strong>Believing doesn’t guarantee success. But not believing guarantees defeat.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c4d2a95fb86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Test-Driven Development: Why Does It Matter]]></title>
            <link>https://medium.com/@giovanni.kappa/test-driven-development-why-does-it-matter-acaf2137b4bd?source=rss-79bbd6b5ecd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/acaf2137b4bd</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[tdd]]></category>
            <dc:creator><![CDATA[Giovanni Cappabianca]]></dc:creator>
            <pubDate>Sat, 07 Dec 2024 09:59:43 GMT</pubDate>
            <atom:updated>2024-12-07T10:04:11.097Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“Stop. What are you doing?”<br>“I am just trying to implement the method that allows us to perform the state machine transitions”<br>“you can’t. You haven’t written yet the test. How can you implement it if you do not know how to test it?”</blockquote><p>If I had a dollar for every time I had this conversation with a patient and outgoing colleague during my last business trip to the U.S., I would be quite wealthy by now</p><p>I was assigned to a software development project in the energy industry. The software consisted of a set of microservices that together allow for the monitoring and control of energy resources, such as battery energy storage systems (BESS) and photovoltaic meters on a site. Approaching an ecosystem of microservices requires you to deal with a lot of configuration files, modules, and classes, and without a map, you might feel really lost.<br>Fortunately, I was not alone. In this learning process, I had the chance to participate in the development alongside the principal engineer of this product. Parenting is akin to paternal shadowing, where a more experienced colleague devotes time to guiding you in the work you need to do. It was like learning by doing, with a fast track to the goal.</p><p>Our aim was to develop an adapter that would contain the rules for interacting with a new BESS.<br>Since I was young, I have always liked to read the instructions before starting to do something. My parents thought I was insane when, after unboxing a new toy, I would always read the manual before starting to play with it. My instinctive thought when I joined the team was to naively ask: “Is there any documentation available?”. “Yes, of course” he replied, pointing to the IDE where a testing class file was open. I tried to clarify my request: “I was referring to a knowledge base where the structure and behaviors of the components are described”. “Please, before going too far, answer this question: does your customer prefer working software or well-documented software?” The answer was trivial, and he continued with his assertion: “The testing code is your documentation. The design of the software is embedded within its testing code. Are you familiar with Test-Driven Development?”.</p><h3>What is testing driven development</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3Ya675VRO8dFb3gw" /><figcaption>Photo by <a href="https://unsplash.com/@homajob?utm_source=medium&amp;utm_medium=referral">Scott Graham</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Test-driven development is a software engineering technique that requires writing tests before writing the code to be tested. With testing driven development you start from the end. You focus on the outcome expected, on the “what” instead of the “how”. You can start to think about how to implement something only after you have run your testing scenarios.</p><p>The first testing execution must always fail. My senior colleague called this the “red area”. The testing code output panel shows a red circle in a white X with a reason. It is failing and you should get out of this red area by implement or fixing your code going towars. It is like diving into the water and holding your breath. You can not hold your breath for a long time, so you should not stay in the red area so much time. It means that you should divide your development tasks into small chunks easiest to test rather than implementing something too big. REach the surface, recharge you lungs and then you can dive again with the next task.</p><h3>Test-Driven Development Applied to Making a Dessert</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gnuoWZPIcIzTqC4R" /><figcaption>Photo by <a href="https://unsplash.com/@12tones?utm_source=medium&amp;utm_medium=referral">Olga Petnyunene</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If we think about it, it is like making a dessert, with a slightly difference in the process. Instead of writing down the steps of the recipe, we would prefer to describe how the dessert should look to meet our expectations. Are we making a tiramisu, a popular Italian dessert? Well, the first test we can envision is to ensure that the dessert contains ladyfingers; the second test checks that the eggs have been properly pasteurized, and the third test measures the concentration of sugar in the portion to ensure it is balanced for the palate. A fourth test might even involve checking for the presence of cocoa dusting on the surface. For desserts, it is difficult to have such equipment unless one is in a laboratory with the proper instrumentation. With code, the proper instrumentation is available: all that is lacking is the developer’s patience in starting by configuring the tests first and avoiding a bulk approach. It may raise eyebrows to consider testing for cocoa dusting as well, but I assure you that with code, nothing can be taken for granted. Continuing with the kitchen comparison, imagine that you have tools and ingredients that can have a state condition; temperature is one example. You can misconfigure the temperature for egg pasteurization, resulting in eggs that become an omelet instead of creamy and perfect for pairing with mascarpone and coffee. Let’s consider the expiration of ingredients. We often overlook it, but when we are at the supermarket counter, we unknowingly perform an initial unit test by asking, ‘Is this food expired? If not, when will it expire?’ We ensure that the expiration date is after the date we plan to prepare the dessert, thereby excluding potential input ‘state’ errors from our process.</p><h3>The Impact of This Approach on My Personal Experience</h3><p>In my academic studies, I learned about this development process paradigm and completed some exercises using it. However, when I joined software projects in the business world, it was not a common practice. Sometimes, the teams I joined avoided dealing with unit testing, delegating the relevant checks to integration and user acceptance testing.<br>Before realizing that you missed an algebraic operation on values or a parameter in the log probe, the downside is that you have to wait for:</p><ul><li>your code pipeline execution or you local budling process to finish,</li><li>your testing environment to be up and running or your local instances to start</li></ul><p>With Test-Driven Development, you do not need to compile all the microservices to check if a function in a single microservice behaves as specified<br>In addition, when you reach the green area, there is still room for improvement. You can shift your focus to code refactoring, strengthened by the fact that you can prove your changes have not misaligned the code’s behavior by re-running the unit test suite.<br> <br>From a human perspective, changing the way you do things is not an instantaneous transition. It requires humility and the acceptance of what others are passing on to us so that it can become our own.</p><h3>Closing remarks</h3><p>I hope I have conveyed the importance of unit testing in our world through this allegory. Unfortunately, it is undervalued in several IT environments due to strict time-to-market constraints. What we often underestimate is the cost of lacking testing when we release ‘faulty’ software into our production environment. A study conducted by RTI for NIST (1) reported that the cost of inadequate software testing infrastructure in the financial services sector exceeds $3 million.</p><p>I am truly grateful for all the techniques he showed me and for the effort he made to share his experience. What I miss from those intense sessions is the satisfying conclusion when our glances met to say, “We can call it a day.”</p><p><strong>Sources.</strong><br>(1) <a href="https://www.cse.psu.edu/~gxt29/bug/localCopies/nistReport.pdf">https://www.cse.psu.edu/~gxt29/bug/localCopies/nistReport.pdf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=acaf2137b4bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Write your thesis in LaTex — A beginner guide]]></title>
            <link>https://medium.com/@giovanni.kappa/write-your-thesis-in-latex-a-beginner-guide-9795ef5b2a35?source=rss-79bbd6b5ecd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9795ef5b2a35</guid>
            <category><![CDATA[thesis]]></category>
            <category><![CDATA[markup]]></category>
            <category><![CDATA[thesis-writing]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[latex]]></category>
            <dc:creator><![CDATA[Giovanni Cappabianca]]></dc:creator>
            <pubDate>Fri, 12 Jul 2024 21:28:44 GMT</pubDate>
            <atom:updated>2024-07-12T21:28:44.448Z</atom:updated>
            <content:encoded><![CDATA[<h3>Write your thesis in LaTex — A beginner guide</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZUshCHu_PiVTM2g3Anxmpg.jpeg" /><figcaption>photos on Pexels (by <a href="https://www.pexels.com/it-it/@mikhail-nilov/">Mikhail Nilov</a>)</figcaption></figure><p>I know, maybe on the net you can find thousands of guides about configuring and using LaTex(1). At first I thought that this article could have been pointless but then I noticed how much I struggled to recall all of the syntax structures after 7 years passed by my thesis. Recently I had to remove the dust on my LaTex basic skills since I helped a friend of mine in using this tool to have its thesis well formatted and ready to be printed, without messing with:</p><ul><li>pictures and tables to drag and drop,</li><li>summary and citations to update</li></ul><p>Helping one does not mean I can not help other students on the net, so, Why do not share this information retrieval and my recent experience in this blog?</p><h3>Brief Introduction to LaTex</h3><p><strong>What is Latex.</strong> Latex is a a system for high-quality technical typesetting(2). It is intended to a scientific audience although it can really improve your way to produce an essay in other fields.</p><p><strong>Why LaTex.</strong> If you need to write a long technical document focusing on content and instructing a software on how it should appear your writing and math formulas, this tool can really help you to achieve this.</p><h3>Pre-requirements and relevant notes on this guide</h3><p>In this brief set of instructions I am using a windows 11 PC. I do not ensure that this steps would run on other platforms. This guide help you to create the ground to write a thesis, not a scientific paper. Since the information reported on this article are based on my personal experience, it should not be considered professional advice on LaTex product so use it at your own risk.</p><h4>Process step by step</h4><ol><li>Download and install miktek(3) and check for updates to install LaTex package <a href="https://miktex.org/download">https://miktex.org/download</a></li><li>Download and install texmaker(4) <a href="https://www.xm1math.net/texmaker/download.html">https://www.xm1math.net/texmaker/download.html</a></li><li>Create a folder which will host the following content:</li></ol><p><strong>frontmatter/frontmatter.tex</strong>. This is the first page that you can use as a cover of your thesis.</p><p><strong>frontispiece/frontispiece.tex</strong>. This is an illustration facing the title page of your thesis.</p><p><strong>dedication/dedication.tex</strong>. This is the file where you can write a short and inspiring quote of you choice</p><p><strong>abstract/abstract.tex</strong>. In this file you can report your abastract</p><p><strong>appendices/</strong>. This is a folder where you can put all of the appendices of your work, including glossary</p><p><strong>ack/ack.tex</strong>. Here you can insert all of your thanks to your dearest one and the most supportive person you met in your life, that help to achieve your objective. Commons sense suggests to express gratitude to your advisor.</p><p><strong>figure/</strong>. This is the folder where you are going to save your pictures</p><p><strong>content.tex.</strong> This is a page where you can specify how to show your table of contents. in our scenario we only put the following line content</p><pre>\tableofcontents</pre><p><strong>thesis_master_page.tex</strong>. This file will contain the base structure of your thesis</p><p><strong>packages.sty</strong>. This file would contain all of the packages and setup your machine to compile your LaTex thesis with all of the material needed</p><p><strong>ref.bib</strong>. It will contain your bibliography list that you can cite in your thesis.</p><p>4. Insert in your thesis_master_page.tex file the following content</p><pre>\documentclass[13pt,a4paper,oneside]{book}<br>\usepackage{packages}<br>\usepackage[backend=biber]{biblatex}<br>\usepackage{multicol}<br>\usepackage{colortbl}<br>\addbibresource{ref.bib}<br><br>\linespread{1.5}<br><br>\begin{document}<br>  <br>\include{frontmatter/frontmatter}<br>\input{frontispiece/frontispiece}<br>\input{dedication/dedication}<br><br><br>\pagenumbering{roman}<br><br>\include{abstract/abstract}<br>\include{content}<br>\include{figure}<br><br>\pagenumbering{arabic}<br><br>\include{chapter/cap1}<br>\include{chapter/cap2}<br>\include{chapter/cap3}<br>\include{chapter/cap4}<br>\include{chapter/cap5} <br>%\include{chapter/cap6}<br><br>%\appendix<br>\begin{appendices}<br>\include{appendices/Glossary}<br>\end{appendices}<br><br><br><br>\addcontentsline{toc}{chapter}{Bibliography}<br>\printbibliography<br> <br>\include{ack/ack}<br>\end{document}</pre><p>As you can see, there are commands which start with a backslash and commented text with ‘%’ character. At the beginning you find the packages declaration. If you are familiar with programming, it’s like telling to LaTex which dependencies it should solve. Then, we add the bibliography, the frontmatter, the frontspiece, your quote, your abstract and your summary of content and figures. These pages would be numbered in roman and would not contribute to the counting of your chapters (expressed in arabic).</p><p>Afterwards, you would find the chapter, the appendices, Bibliography and finally the thesis acknowledgments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*XbyQTpQN0xyvzGkfdy2Mqg.png" /><figcaption>This is an overview of what you should see on texmaker when you open you thesis_master_page.tex file</figcaption></figure><p>5. Insert in your packages.sty file the following content. You can open it with an external editor (like notepad). Please align the language package to the language you want to adopt in your thesis.</p><pre>\usepackage[italian]{babel}<br>\usepackage[T1]{fontenc}<br>%\usepackage[latin1]{inputenc}<br>\usepackage{lmodern}<br>\usepackage{graphicx}<br>\usepackage{geometry}<br>\usepackage{chngpage}<br>% To edit a single page<br>\usepackage{eso-pic}<br>% package to maximize the log on frontespiece and frontmatter pages<br>\usepackage{makebox}<br>\usepackage{textgreek} %package to write in Greek (useful for math formulas)<br>%\usepackage{natbib}<br>\usepackage[utf8]{inputenc} % accents<br>\usepackage{csquotes} <br>%\usepackage[backend=bibtex,style=numeric-comp]{biblatex}<br><br><br>%maths<br>\usepackage{amsmath, amssymb, amsthm, epsfig, epstopdf, titling}<br>%extension of utterances<br>\usepackage{amsthm}<br>% compile analytic indexes<br>\usepackage{makeidx}<br><br>%tables<br>\usepackage{array}<br>\newcolumntype{P}[1]{&gt;{\centering\arraybackslash}p{#1}} % centrare<br><br>\usepackage{floatrow}<br>\DeclareFloatFont{tiny}{\tiny}% &quot;scriptsize&quot; is defined by floatrow, &quot;tiny&quot; not<br>\floatsetup[table]{font=footnotesize}<br><br>%figure<br>\usepackage{float}<br><br>% code<br>\usepackage{xcolor}<br>\definecolor{antiquewhite}{rgb}{0.98, 0.92, 0.84}<br>\definecolor{beaublue}{rgb}{0.74, 0.83, 0.9}<br>\definecolor{lavender}{rgb}{0.9, 0.9, 0.98}<br>\definecolor{lightgoldenrodyellow}{rgb}{0.98, 0.98, 0.82}<br>\usepackage {listings}<br>\usepackage{enumitem} % to use enumeration<br>\usepackage{color}<br>\lstdefinestyle{mystyle}{<br> basicstyle=\footnotesize,<br> captionpos=b,<br> numbers=left,<br> stepnumber=1,<br> showstringspaces=false,<br> tabsize=1,<br> breaklines=true,<br> breakatwhitespace=false,<br> frame=single,<br> backgroundcolor = \color{lightgoldenrodyellow}<br>}<br>\lstset{style=mystyle}<br><br>\usepackage{epigraph}<br><br>%landscape image<br>\usepackage{wrapfig}<br>\usepackage{lscape}<br>\usepackage{rotating}<br><br>%chapter references<br>\usepackage{hyperref}<br>  <br> %appendice<br> \usepackage[toc,page]{appendix}<br> \addto{\captionsitalian}{\renewcommand{\appendixtocname}{Appendici}}<br>  <br>\geometry{a4paper,top=3cm,bottom=3cm,left=4cm,right=3cm}</pre><p>6. Change default compilation settings of texmaker in “Options → configure texmaker” and in “quick compilation” select the second choice: “PdfLaTex + Bib(la)tex + PdfLaTex (x2) + View Pdf”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*liw4x8rlwduDCZRDrezZUg.png" /></figure><p>7. On the first compilation run, some popup will show up asking you to confirm the installation of dependencies. Just confirm them and let it do the work for you</p><p>8. Compile all the other files based on your university guidelines on how your thesis coverage should appear</p><p>9. If everything works, you should see on your right a first view of a pdf with your thesis skeleton. You can start to write your thesis using chapters. I suggest to complete a first draft of your thesis before writing your abstract. The abstract contains the keyword of your work that would be indexed by your university and other search engine (if published on the net) to find it out. It is a recap of your context and overall outcome so it would be easier to write near the end.</p><p>Speaking of the end, I will end this article with a few snippets and recurrent scenarios you might face during your writing.</p><h3>Common scenarios</h3><h3>Citation</h3><p>in your ref.bib file you can insert paper, books, online articles. There are specific keywords and attributes you can use to fill in them and some sites, like google scholar, allows you to easily copy and paste it in “bibtex” format. I just copy here an example of reference structure you . Consider that texmaker can also help you to insert this</p><pre>@article{helmig2020audit,<br>  title={An audit of oral administration of Angusta{\textregistered}(misoprostol) 25 $\\mu$g for induction of labor in 976 consecutive women with a singleton pregnancy in a university hospital in Denmark},<br>  author={Helmig, Rikke B and Hvidman, Lone E},<br>  journal={Acta Obstetricia et Gynecologica Scandinavica},<br>  volume={99},<br>  number={10},<br>  pages={1396--1402},<br>  year={2020},<br>  publisher={Wiley Online Library}<br>}</pre><p>Some Attributes are not compulsory, so if you do not have pages, volume, or other deafult attributes listed above or proposed by texmaker template feel free to delete them.</p><p>You can cite in every part of your document a bibliography item using this command</p><pre>/cite{helmig2020audit}</pre><h3>Numbered and bullet point lists</h3><p>They would have the same structure: a begin and an end. Numbered list</p><pre>\begin{enumerate}<br>\item I am the first item of a numbered list<br>\item I am the second item of a numbered list<br>\end{enumerate}</pre><pre>\begin{itemize}<br>\item I am the first item of a bullet points list<br>\item I am the second item of a buillet points list<br>\end{itemize}</pre><h3>Insert a figure</h3><p>With this script you will tell to LaTex: “dear Latex, please absolutely make this png picture appears here. I do not accept other position”.</p><pre>\begin{figure}[H]<br>\centering<br>\includegraphics[scale=0.4]{figure/your_picture.png}<br>\caption{your awesome caption}<br>\label{fig:my_picture_label}<br>\end{figure}</pre><p>If you do not have this strict constraint and you would like only to suggest to place an image here (whenever possible), you can use the lower case ‘h’ letter</p><pre>\begin{figure}[h]<br>\centering<br>\includegraphics[scale=0.4]{figure/your_picture.png}<br>\caption{your awesome caption}<br>\label{fig:my_picture_label}<br>\end{figure}</pre><p>With “scale” you can resize your figure whereas with label you can reference your figure with the following snippet</p><pre>(Fig. \ref{fig:my_picture_label})</pre><p>Notice how it is essential to have your assets, like pictures, located in the same folder “figure”. You can save a lot of time without looking for your pictures in your local drive.</p><h3>Build and insert a table</h3><pre>\begin{table}[H]<br>	\centering<br>	\def\\arraystretch{1.5}<br>	\begin{tabular}{|P{3.5cm}|P{4.5cm}|P{4.5cm}|}	<br>		\hline <br>		A1 &amp; A2 &amp; A3 \\<br>		\hline <br>		B1 &amp; <br>		B2 &amp; <br>		B3 \\<br>		\hline <br>		C1 &amp; <br>		C2 &amp; <br>		C3 \\<br>		\hline <br>		D1 &amp; <br>		D2 &amp;<br>		D3 \\<br>		\hline <br>	\end{tabular}<br>	\caption{Ryour caption}<br>	\label{tab:my_table}<br>\end{table}</pre><p>What should you change in this snippet to re-use it? Well, in the fourth row, if you have a table with more of 3 columns you should add as many P{4.5cm} as your columns are. Bear in mind that you need to cover them with vertical bars. Every line is boundaried by hline string whereas the &amp; character separates columns.</p><p>you can reference your table in the text using the following code</p><pre>\ref{tab:my_table}</pre><h3>Some characters in bibliography are not accepted</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*lPxcMtp3Xu_fl5DLjWUdVA.png" /></figure><p>It happened to me a few times. The first time I spent a lot finding out which was the “guilty” character to change, but then I find out this online tool that helped me to speed up this process. This tool takes in input a sentence and for every character gives you its unicode format. You would notice it since the compiler would refere to it as a unicode <em>U+XXXX</em></p><p><a href="https://w3c.github.io/xml-entities/unicode-names.html">https://w3c.github.io/xml-entities/unicode-names.html</a></p><p>Hope you find this essay in accordance with your expectations.</p><h3>Sources and comprehensive list of links reported in this article</h3><p>(1) <a href="https://www.latex-project.org/">https://www.latex-project.org</a></p><p>(2) <a href="https://www.bates.edu/mathematics/resources/what-is-latex/">https://www.bates.edu/mathematics/resources/what-is-latex/</a>, <a href="https://www.colorado.edu/aps/sites/default/files/attached-files/latex_primer.pdf">https://www.colorado.edu/aps/sites/default/files/attached-files/latex_primer.pdf</a></p><p>(3) <a href="https://miktex.org/">https://miktex.org/</a></p><p>(4) <a href="https://www.xm1math.net/texmaker/">https://www.xm1math.net/texmaker/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9795ef5b2a35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IoT Platform monitoring: how to]]></title>
            <link>https://medium.com/@giovanni.kappa/iot-platform-monitoring-how-to-abb1ef72d806?source=rss-79bbd6b5ecd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/abb1ef72d806</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[metrics]]></category>
            <dc:creator><![CDATA[Giovanni Cappabianca]]></dc:creator>
            <pubDate>Fri, 05 Apr 2024 17:04:13 GMT</pubDate>
            <atom:updated>2024-04-05T17:16:46.050Z</atom:updated>
            <content:encoded><![CDATA[<p>During an electronic engineering lesson in my college my teacher said</p><blockquote><em>An engineer is a compromise artist.</em></blockquote><p>He was talking about compromise in electronic circuit design. Never did I think that this sentence would have truly applied to my day by day decision making process. When you face business and design constraints, you should outweigh pros and cons in every situation. A solution that could fit into a problem and meet your constraints. When it comes to monitoring a platform, although you can find plenty of formal methods and best practices, In this essay I summed up what I have encountered in our Internet of Things platform and tried to depict them in a taxonomy of software probes and application metrics</p><h3>Taxonomy of software “probes” in an IoT Platform</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*g4LiNwm6OvnKXLncMX0A-w.png" /><figcaption>Architectural view of a standard IoT platform with “software probes classes”</figcaption></figure><p>Recalling the architectural view of a standard IoT platform, we can distinguish three main “software” probes classes:</p><p><strong>Field class software probes.</strong> They help you to collect data about devices operativity, connectivity, power consumption and its internal status. Logs about local protocol interactions, commands received from platform, telemetry messages gathered and sent to the platform, errors on establishing connection, retrieving local system data are some example of what you can measure.</p><p><strong>Product class software probes</strong>. Your product probes can give you insights on device availability, system, broker and other components load (How much latency did your platform introduce in message delivery last month?), system usage (How many times devices registration occur in month?).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*EFgu26vrJSFflwJj6Kpwwg.png" /><figcaption>examples of device availability monitoring strategies</figcaption></figure><p>Device availability can be measured based on their protocol. If a protocol is connection oriented, it means that you can monitor device connection status. Just take into account that a fixed connection would consume device and platform resources. It is like having a continuous process executing in background without effectively doing nothing than telling the platform “Hey, I’m connected”</p><p>Otherwise, if a protocol does not allow connection, it means that you can monitor message rate. Sure, you can avoid resource consumption, since communication with platform is established only to send telemetry messages. However, Your perception on disservice decrease since it depends on message rate.</p><p><strong>Extension class software probes.</strong> They would track and monitor your interactions with third parties systems. An example of extension class probe is a log which tells you how much time does it take to get an acknowledgement from a third party system. You can use them to perceive:</p><ul><li>how many and which API calls did you receive last hour from your third parties system</li><li>How many errors did your connector components face and when they occured.</li></ul><h3>Application metrics. What you need to keep an eye on</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1XxgcytUoRuEE3TJ" /><figcaption>Photo by <a href="https://unsplash.com/@lukechesser?utm_source=medium&amp;utm_medium=referral">Luke Chesser</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Device availability trends</strong>. Imagine that your customer service team ask you at a certain time to check the number of device available on a business service. You access your IoT monitoring platform and see that on <strong>1.000</strong> registered devices, only <strong>200</strong> are connected. “Oh no, there are only <strong>20%</strong> of available devices on this project. We are ruined”. This assumption is wrong since your business did not tell you that they registered in a row all of the devices in your platform in a lab environment but then delivered and installed only a percentage of them on sites. If you keep track of what is connected and what is not connected since a certain date, you may be aware of what your devices are doing. Just take into account that you can also be supported by an alarm system, which can record fast lifecycle events happening in a certain time interval and directly alert your customer service team without your intervention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uu_rJ_rc5vFJc7c0" /><figcaption>Photo by <a href="https://unsplash.com/@nasa?utm_source=medium&amp;utm_medium=referral">NASA</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Devices geolocation.</strong> Suppose you have an outage in production environment. If you are an Application maintanance service team manager your inbox would be filled in with emails and your team member available phone would be on fire. The most common question to gain a glimpse of the impacted end customers would be: “May you please tell us where is this disservice located?”. If you have latitude and longitude of your devices you can trace a perimeter of your service issue and relate it to a local telecommunication problem in a specific country or city.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b0cyPS-c4AcTayyq" /><figcaption>Photo by <a href="https://unsplash.com/@joelfilip?utm_source=medium&amp;utm_medium=referral">Joel Filipe</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Firmware version</strong>, software version and cloud component software version. Your Software is like a building which requires a maintanance plan. A building designer introduce this plan to ensure preservation of a building functional characteristics, efficiency and economic value. Like Fixtures, Sanitary and water installations, without proper intervention on every layer of your software you can have damages which can cause a service distruption or an economic damage. Operating system, Software Runtime and their libraries are your monitoring target. You must be sure that their support is not expired and you must periodically arrange update tasks.</p><p><strong>Commands sent to devices.</strong> Which command has been sent to a device? When? Which outcome did you obtain? If everything went wrong, where should we check to perform troubleshooting? These questions appear during an analysis session and answer them is worth it. Hell is paved with wrong payload commands or commands sent to a device when it was not availble to receive them.</p><p><strong>Your devices and platform admin user credentials</strong>. If you are using certificates bundle for your device consider their expiration dates as something to oversee. Service continuity is threatened by missing devices certificates renewal before their expiration.</p><p><strong>Devices message rates</strong>. Whether you are using a cloud provider managed service or a self-managed service to accept and receive messages from your devices, you should be aware of their incoming peak rate and their size. For every message, there is a feature which is triggered after a message arrives in your platform. If there is not any business value in what your are executing is an overhead you can cut. One way to deal with high incoming rate is to put “troublesome” devices in a blacklist deactivating temporary their credentials. Please be sure that this action and their recipients are agreed with your customer, avoiding unwanted harmful acts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7f11BDsthokUIggL" /><figcaption>Photo by <a href="https://unsplash.com/@jccards?utm_source=medium&amp;utm_medium=referral">Marek Studzinski</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Your cloud environment costs</strong>. Last but not least, keeping track of what you are consuming in terms of instances, pay-per-use service charges is a way to estimate your return of investment or the cost par message ratio. This can help you in your next proposal offer for a customer, giving some insight on expected costs based on incoming data or devices to register. Just as important, distinction between no prod and prod environment is really helpful since you can evaluate which components you can turn off in your test environment when not needed.</p><p>As you can see, I did not add in the above list telemetry messages collected from field. Log ingestion is expensive and you would like to trace only relevant events in platform. Publish operation or connection events are relevant to monitor service health trend. In contrast, message payload content retention did not add value to your analysis scope. What makes telemetry data valuable is their final usage. Your message must be retained in another dedicated tool and your IoT platform main task is to forward incoming messages in compliance to data consumers time constraints. A payload belonging to a message delivered is like an order fulfilled. You can focus on the pending ones delegating your end application to evaluate their fairness.</p><p>Trying to get a comprehensive oversee of your IoT platform can be a demanding challenge but <em>compromise </em>on what you should address is reachable.</p><p>Thank you for taking time to read this essay. I am curious about your views on this topic. Please feel free to leave a comment on this IoT platform monitoring overview</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abb1ef72d806" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IoT Architecture Design: a solution architect approach]]></title>
            <link>https://medium.com/@giovanni.kappa/iot-architecture-design-a-solution-architect-approach-ffb25319f3d1?source=rss-79bbd6b5ecd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffb25319f3d1</guid>
            <category><![CDATA[software-requirements]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[iot-platform]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Giovanni Cappabianca]]></dc:creator>
            <pubDate>Sat, 16 Mar 2024 02:14:20 GMT</pubDate>
            <atom:updated>2024-03-16T02:14:20.046Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Intended Audience.</strong> This article aims to introduce to solution architect coming from other IT industry fields an overview of an internet of things (IoT) platform architecture and its recurrent parameters to evalute business requirements.</p><p>A Few words on Internet of things before deep diving on architecture. IoT was conceived between 2008 and 2009, when the number of connected devices outweighed the number of humans on the planet. These devices can support applications designed to solve real problem world in health, safety, energy, transportation and other industries through monitoring, alerting and awareness of process trends and indicators.</p><blockquote><strong>If you can’t measure it you can’t improve it. <br>Peter Drucker</strong></blockquote><p>We can distinguish between two kind of devices:</p><ol><li>devices which are Internet ready, so they can support TCP/IP stack or other wide-range protocols</li><li>devices which are not internet ready. They use other protocols (low range) which do not allow them to connect to the internet</li></ol><p>The latter one can use a gateway device which is accountable for their connection with a remote platform and their data gathering. These gateways can also manages local computation on data, performing aggregation and making decisions. Let us assume that they delegate operative rules to a centralized IoT Platform.</p><h3>A popular centralized IoT architecture</h3><p>As mentioned by Robert C. Martin in Clean Architecture, a “mind blowing“ architecture is a set of components and interactions which put together they shout loudly: “We are an IoT platform architecture”. So there are recurrent patterns you can adopt to design an indisputable application. Just let me make a proposal</p><figure><img alt="Centralized IoT platform recurrent architecture" src="https://cdn-images-1.medium.com/max/681/1*ZEJUzmpKpaLDMrP1gvkcnQ.png" /></figure><p>This is an event based architecture. Field devices send data to the the baseline product and receive commands from IoT platform using a wide range protocol (mqtt, AMQP, Lora WAN, etc). Third party systems consumes data forwarded by IoT plug-in components and send commands, like a control loop</p><p>Blue arrows represents dependency direction whereas black arrow telemetry and commands flows. As you can see, devices and Third parties systems must depend on IoT platform. So, if there is a change on device software, Platform must not be involved. Instead, if there is an update on Platform, Device must be tested to ensure compatibility. It is strongly suggested to keep track of devices software version distribution among fleet installed on field. Platform version compatible with some device software versions ensures that a percentage of devices which mount them would continue to work properly. On the other side, if there is a change on Third party system IoT platform should be unaware of it and must not be impacted by it.</p><p>Outcome of this architecture is to allow IoT platform to dictate operative rules. To give an understanding, your baseline must define how</p><ul><li>gathering and forwarding activities in telemetry and command flows works</li><li>a device should be registered or dismissed on platform</li></ul><p>Unfortunately in several business scenario your supplier requires support to integrate its native payload structure due to economic constraints. Be aware that this custom adaptation can introduce effort cost on your operation team, which should manage it as an exception to standard integration. The best way to deal with these corner cases is to apply Open closed principle. Be open to extension and closed to components changes so add dedicated operative rules for these devices into plugin components, detaching it from your baseline product</p><h3>Dealing with IoT Requirements</h3><p>Which are the key parameters you should consider when it comes to build an architecture? Please find below a list grouped by kind of requirements.</p><p>Parameters and questions to evaluate functional requirements</p><ul><li>Protocols used between sensors and gateway</li><li>Protocols used between internet ready devices/gateway and platform</li><li>Third parties Systems which need to process data collected from field</li><li>Must Message delivery order be preserved? There are end applications which perform computation between values of subsequent messages. A temporal mismatch in messages retrieval can lead to application errors and unexpected behaviour</li><li>How often device Firmware should be updated? We can not assume that devices software are timeless. They mount an O.S. which needs to be patched. They use a software development kit and some libraries subject to support expiration. It varies on device characteristics. Just figure it out and promote a software catalogue management to apply remote patch is required for your business case</li><li>Are there any commands that you need to send to devices? Do you know at which rate do you need to send them?</li><li>How many logs do you need to collect and retain?</li></ul><p>Parameters to evaluate performance requirements</p><ul><li>Number of devices expected</li><li>Message rate</li><li>How much trends every message contains and its average and peak sizes</li><li>Max lead time of message delivery</li></ul><p>With lead time we refer to the interval between telemetry trend sampling time and delivery time on third party system. The Less time your platform requires to process incoming messages and forward them, the better performance you provide but the more you spend on resources involved</p><p>Parameters to evaluate security requirements</p><ul><li>How would devices authenticate to the platform?</li><li>How would a user authenticate to the platform to send commands?</li><li>Are there any regulations on devices or procedure to data treatement (certifications, laws to comply with, etc)?</li></ul><p>Parameters to evaluate economic requirements</p><ul><li>How much operational cost can be borne?</li><li>How much budget do we have to integrate devices on platform?</li></ul><p>Be aware that logs are the most subtle resource which could drastically increase your operational expenditure. Define ingestion and retention policies during requirement phase based on severity accepted by your customer. This is a trade off. The less you collect, the less you can analyse events for troubleshooting but the more you save.</p><p>Some requirements are more relevant than other ones in every initiative. With your customer you should agree on which one must be prioritized.</p><h3>Conclusion</h3><p>In this article I focused on an high level overview of an IoT platform based on my personal experience. I hope you enjoyed it and please if you have any suggestion feel free to share your opinion.</p><p>I intentionally did not cover troubleshooting and monitoring in an IoT platform, which requires a dedicated essay. I will write about it next time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffb25319f3d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What I learnt from my first job shadowing experience in an IT department]]></title>
            <link>https://medium.com/@giovanni.kappa/what-i-learnt-from-my-first-job-shadowing-experience-in-an-it-department-26995adbddad?source=rss-79bbd6b5ecd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/26995adbddad</guid>
            <category><![CDATA[job-shadowing]]></category>
            <category><![CDATA[management-and-leadership]]></category>
            <category><![CDATA[job-training]]></category>
            <category><![CDATA[leadership-development]]></category>
            <dc:creator><![CDATA[Giovanni Cappabianca]]></dc:creator>
            <pubDate>Sat, 03 Feb 2024 16:42:29 GMT</pubDate>
            <atom:updated>2024-02-03T16:42:29.551Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*84mH9trUmGluDxmH" /><figcaption>Photo by <a href="https://unsplash.com/@qrenep?utm_source=medium&amp;utm_medium=referral">Rene Böhmer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Last fall, my firm allows me to attend a shadowing program with a manager of another IT unit. I felt excited about the opportunity and now that I completed this course, I thought that it could be my first medium article where I can share my feeelings and my personal notes on this experience.</p><h3>job shadowing in a nutshell</h3><p>Job shadowing is a type of on-the-job training that allows an employee to follow and closely observe another employee performing the role. This type of learning is usually used to onboard new employees into an organization or into a new role(1)</p><p>The latter one is my scenario. As a guest, I was assigned to an IT manager for 15 hours, distributed along the fourth quarter of 2023. In our first session we have commited ourselves to:</p><ul><li>find out use cases to discuss, where he can give me suggestion to deal with them</li><li>work on my soft skills of negotiation, budgeting and story telling.</li></ul><p>I have been involved in his meetings, having the likelihood to see the way he acts on specific issues and situation. I would summarize in this article the fundamentals we have discussed, hoping you enjoy this first-hand experience</p><h3>Deal with a technology choice</h3><p>In an IT department there are usually teams which may work on conflicting objectives. It depends on their top management strategies, which could have different vision. For instance, there are organizations in which divisions promote a cloud agnostic approach whereas other ones would rather choose an integrated solution offered by a single cloud provider. There are pros and cons in both these approaches. Regardless of your side, my “host manager” shared me these key points to outline when you have to advocate your position:</p><p><strong>time to market.</strong> How much time your solution requires to let other adopt it with integration development, testing and go live? Based on your current performance, you can map it as a requirement to your sponsor. If you have a rodated process of integration and it requires only three weeks, you can suggest your sponsor to adopt a solution available in less than a month.</p><p><strong>Your current and unique features</strong>. Your product might have years of features introduced and managed by previous colleagues that you are not promoting or that you are taking for granted. Be aware of them since they can become your competitor weaknesses and they need to be showed up as strong pros bullet points given at time zero without further costs of developement</p><p><strong>Centralized versus distributed architecture.</strong> Are you advocating a centralized solution? This means that you have more control of your solution, you can more easily comply to your firm cyber standard guidelines and can perform a benchmarking of third parties who are going to integrate with your solution.</p><p><strong>Migration</strong>. Is your solution older than your competitor? Does it support several markets? You can highlight impacts on a solution change, moving all these business processes minimizing service downtime and activities effort. Otherwise, is the oldest solution weak on current business process or may it lack of flexibility in features requested by your potential sponsor? Show how you can figure out this pitfalls accepting to migrate a small subset of stages and data, assessing your performance versus the established solution.</p><h3>Prepare to your boss meeting</h3><p>My “sensei” manager involved me in a pair of so called “dry-run” meeting. With his team, they reviewed in half an hour what they would expose to his division manager: current expenditure, ongoing activities and their progresses.</p><p>A common mistake is that the most relevant slides are often put in the latest part of the presentation, hoping that in that meeting boss can give you attention till the end. My sensei first reflected on what have been showed on previous encounter, then told to put first these forgotten slides.</p><p>Statistic can be incredibly risky since they can help your thesis with consistent data or deny it or instil doubt on achievements. A quick look on “suspicious percentages” led to the question “Why do we have this value?”. This was a method to test the awareness of those numbers and control of your service. If they do not have a prompt reply to a value, a new task to address before top boss meeting was added to the to-do list. Final remark is: “be sure of what you show”. A single detail ignored by your team but caught by your boss can compromise your entire work wether or not you have performed brilliantly in other topics</p><p>In this meeting be also ready to discuss potential issues may arise due to market changes or political/demographic phenomena and what are the first actions already taken to anticipate these risks. You would give your boss a sense of plain control and readiness. In few words, principle here is: “anticipate and not chase”</p><h3>the art of delegation</h3><p>He told me when he was given responsibilities to coordinate small teams on how he would continue to carry on his previous tasks without assigning them to his team members.</p><p>“You think you can have the things done on your own better than other ones who should firstly learn and then try and correct their own mistakes.” He said. “Well, in the long run here’s the phenomena you can see: Toward yourself there is a phenomenon of lack of growth. Toward the people who work with you, there are two reactions:</p><ol><li>people who get demotivated: “what’s he asking for if he wants to do it on his own?”</li><li>people who lean in: “whatever he’s asking, he’s doing it. There’s no point in me going for it.”</li></ol><p>These reactions create stagnation of activities. Everything is fine till there is an unexpected event or peak to be handled. Your team would not be prepared to face it, you will strive to carry on your day by day tasks ensuring same service level and both you and your team does not grow, feeling like drowned by tasks.</p><p>The team must be ”oxygenated” by distributing knowledge. Recognize the extra quid that a team member can give and put him or her in the best condition to share his/her expertise.</p><p>The growth of the team is directly related to the growth of the manager. If you are a manager and invest your time and resources in operational activities, you have no way to lift your head and learn new things. The next step to become a better manager is to learn to trust, making sure that potential errors are checked and bounded. You must set a feedback process to be aligned on the activity and to perform acts of accountability if the person makes a mistake. In risky situations, it is not appropriate to expose a team member and “take the blame personally”. Please pardon the allegory, but it reminds me of daemon slayer pillars (referring to the popular manga and anime), which are ready to shield their team members when situation gets complicated.</p><h3>Your sponsor/customer relationship</h3><p>In our latest session, my “shadower” manager bade me farewell with this latest advice; “Your aim is to become a business partner, leaving your supplier role and by getting into your sponsor key objectives and constraints. This paradigm means that both IT and business teams together find a way to cooperate rather than defend their own interests. A simple way to start this approach is by asking a few questions on how their selling flow works and how your product/service is helping them to achieve this. How many final products/services they would like to sell in a specific amount of time. Which operative business tasks are slowing them down or which specific one is becoming a bottle neck of customer delivery. Although your solution is not affecting this stage, you can share your thoughts respecting other team work and showing genuine curiosity about how other teams provide value. Sure you may create more work but this give your team more visiblity and increase overall performance.</p><p>Finally, be aware of what your sponsor is going to plan or do on next quarter, in current year and in next year. Have no qualms about giving your point of view on a functional process they are designing where you notice high technical impacts you know. They will surely respect your point of view and would ask you to take action.</p><p><strong>sources</strong></p><p>(1) Gartner glossary: https://www.gartner.com/en/human-resources/glossary/job-shadowing#:~:text=Job shadowing is a type,or into a new role</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26995adbddad" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>