<?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 Danilo Del Fio on Medium]]></title>
        <description><![CDATA[Stories by Danilo Del Fio on Medium]]></description>
        <link>https://medium.com/@ddelfio?source=rss-e589e2d93a7f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KdTlax_dPGgAdM6QUFcRiA.jpeg</url>
            <title>Stories by Danilo Del Fio on Medium</title>
            <link>https://medium.com/@ddelfio?source=rss-e589e2d93a7f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 16:57:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ddelfio/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[Redis: Please, don’t call it cache — part 1]]></title>
            <link>https://ddelfio.medium.com/redis-please-dont-call-it-cache-part-1-be92a174afd8?source=rss-e589e2d93a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/be92a174afd8</guid>
            <category><![CDATA[data-replication]]></category>
            <category><![CDATA[redis-enterprise]]></category>
            <category><![CDATA[redis]]></category>
            <dc:creator><![CDATA[Danilo Del Fio]]></dc:creator>
            <pubDate>Wed, 26 Aug 2026 10:28:05 GMT</pubDate>
            <atom:updated>2026-08-26T10:28:05.644Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UCHSXJu1jJkJ-rSl.jpeg" /><figcaption><em>ERA magnetic drum memory, ~1950. CC-BY-NC-SA, by Flickr user </em><a href="https://www.flickr.com/photos/spyndle/1497392167"><em>spyndle</em></a><em>.</em></figcaption></figure><blockquote>This is the first post in a series to try to better understand the features and how powerful and versatile Redis is.</blockquote><h3>Introduction</h3><p>I recently had the opportunity to delve deeper into Redis and use it, and I was pleasantly surprised. For those unfamiliar with it (and I believe there are very few), Redis is an in-memory database so fast and high-performance that it puts other systems around it to the test.</p><p>Let’s dive into some key characteristics and then start practicing with a simple use case.</p><h3>Persistence</h3><p>Although Redis was born as an in-memory database and thanks to this it defines a de-facto standard when we want to manage our data at sub-millisecond speeds, this does not mean that we should lose data in the event of problems with the servers that host it.<br>For this reason Redis provides two different persistence mechanisms: RDB (Redis Database) Snapshot and AOF (Append Only File). Depending on the specific use case, we can use these mechanisms, even together.</p><p>This is very useful for preventing the loss of data stored in RAM when the server shuts down or reboots unexpectedly, for example:</p><ul><li><strong>Server reboots</strong>: If the computer or virtual server crashes or is updated, the data is not erased.</li><li><strong>Rapid recovery (RDB)</strong>: Creates an exact snapshot of the data at regular intervals. It’s ideal for quick backups.</li><li><strong>Maximum data safety (AOF)</strong>: Records every single change made to the data. If the system crashes, you lose very little or no data.</li><li><strong>Use as a primary database</strong>: When you use Redis not only as a fast cache, but to store information that you can’t lose (like e-commerce carts or user sessions).</li></ul><h3>Data types</h3><p>Redis supports a wide variety of specialized data structures. Choosing the right data type optimizes memory usage and maximizes performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EMzO75Bl2MVN-ALd6phaKQ.png" /><figcaption><strong>Explore keys, values, and strings — </strong><a href="https://university.redis.io/course/eqdlpqdoks6tpf/submodule/ijccgu1svw7753/"><strong>Redis University</strong></a></figcaption></figure><blockquote><strong>1. Strings: The most basic Redis type, representing binary-safe sequences of bytes up to 512 MB. They can hold text, serialized objects, or raw binary data.</strong></blockquote><p><strong>Key Operations:</strong> SET, GET, INCR (atomic increment), DECR.</p><p><strong>Primary Use Cases:</strong></p><ol><li><strong>HTML/API Caching:</strong> Storing pre-rendered pages or database query outputs to minimize backend load.</li><li><strong>Session Management:</strong> Storing user session tokens with a Time-To-Live (TTL) expiration.</li><li><strong>Rate Limiting:</strong> Tracking the number of API requests from an IP address within a specific timeframe.</li></ol><blockquote><strong>2. Hashes: Maps between string fields and string values, resembling a basic JSON object or a mini-dictionary within a key.</strong></blockquote><p><strong>Key Operations:</strong> HSET, HGET, HGETALL, HINCRBY.</p><p><strong>Primary Use Cases:</strong></p><ol><li><strong>User Profiles:</strong> Storing structured object-like data (e.g., user:1000 mapped to fields like name, email, and points) without serializing the whole object.</li><li><strong>E-commerce Shopping Carts:</strong> Keeping track of product IDs and quantities selected by a user.</li></ol><blockquote><strong>3. Lists: Lists of strings sorted by insertion order, implemented internally as a linked list. Elements can be added to the head or tail in constant time.</strong></blockquote><p><strong>Key Operations:</strong> LPUSH, RPUSH, LPOP, RPOP, LRANGE.</p><p><strong>Primary Use Cases:</strong></p><ol><li><strong>Message &amp; Job Queues:</strong> Passing background tasks from producer processes to worker processes.</li><li><strong>Recent Activity Feeds:</strong> Displaying the last 10 notifications or posts a user interacted with using a capped list (LTRIM).</li></ol><blockquote><strong>4. Sets: Unordered collections of unique strings. They prevent duplicate values and natively support mathematical operations like intersection and union.</strong></blockquote><p><strong>Key Operations:</strong> SADD, SREM, SISMEMBER, SINTER.</p><p><strong>Primary Use Cases:</strong></p><ol><li><strong>Unique Visitor Tracking:</strong> Logging unique IP addresses or user IDs visiting a site daily.</li><li><strong>Tagging Systems:</strong> Managing association tags for blog posts or products.</li><li><strong>Social Graphs:</strong> Finding mutual friends by intersecting the friend sets of two separate users.</li></ol><blockquote><strong>5. ZSets: Non-repeating collections of strings, where every member is associated with a floating-point score. Elements are automatically kept sorted by their score.</strong></blockquote><p><strong>Key Operations:</strong> ZADD, ZRANGE, ZRANK, ZREVRANGE.</p><p><strong>Primary Use Cases:</strong></p><ol><li><strong>Real-time Leaderboards:</strong> Instantly ranking users by gaming scores or online activity.</li><li><strong>Priority Queues:</strong> Handling scheduled tasks where the task execution time serves as the sorting score.</li><li><strong>Sliding Window Rate Limiters:</strong> Storing timestamps as scores to block abusive traffic within precise, moving windows.</li></ol><h3>Advanced &amp; Specialized Data Types</h3><ul><li><strong>Streams:</strong> Act as an append-only log designed for real-time message handling. They are the go-to choice for <strong>event sourcing, activity tracking, and high-velocity chat applications</strong>.</li><li><strong>Bitmaps &amp; Bitfields:</strong> Allow you to perform bitwise operations directly on string data. They are highly efficient for tracking boolean states, such as <strong>user retention dashboards or daily login streaks</strong>, using minimal memory.</li><li><strong>Geospatial Indexes:</strong> Convert latitude and longitude points into sorted sets. They make it simple to implement <strong>location-based features</strong>, like finding nearby rides or calculating distances between store branches.</li><li><strong>HyperLogLog:</strong> A probabilistic structure that estimates the unique count (cardinality) of a dataset with a fixed, ultra-low memory footprint of roughly 12KB. It is used for <strong>tracking millions of unique website visitors</strong> when an exact count isn’t strictly necessary.</li><li><strong>JSON:</strong> A dedicated structure for storing, indexing, and executing operations on hierarchical, nested data without requiring client-side serialization.</li></ul><blockquote>Redis can also be used as a vector database (we’ll discuss this in detail in future articles), for example in <strong>semantic searches</strong>, <strong>RAG</strong>, and <strong>agentic AI</strong>, which greatly benefit from the extremely low latency it introduces.<br>In this context, Redis operates as an <strong>integrated platform</strong>. This means it can store operational data, cache responses, manage chat sessions, and index vector embeddings, all within the same system.</blockquote><h3>Sharding</h3><p>Another very important concept for Redis (it also applies to other databases), is sharding.</p><blockquote>Redis sharding is the process of splitting a dataset across multiple Redis instances (shards) so you can scale horizontally.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Nq-7FmcBwZJS4AE9" /></figure><h4>How Redis Sharding Works</h4><ul><li><strong>Hash Slots:</strong> Redis Cluster divides the entire keyspace into a fixed number of <strong>16,384 hash slots</strong>.</li><li><strong>Key Hashing:</strong> When you set or get a key, Redis calculates a hash of that key to assign it to one of those 16,384 slots.</li><li><strong>Node Distribution:</strong> Each node in a sharded cluster manages a specific subset of these hash slots, routing client requests directly to the correct instance.</li></ul><h4>When to Use Sharding</h4><ul><li><strong>Memory Limits:</strong> When your dataset exceeds the RAM capacity of a single server or Redis instance.</li><li><strong>High Throughput:</strong> When your operation load goes beyond roughly 25,000 operations per second, making a single CPU core a bottleneck.</li><li><strong>Reduced Blast Radius:</strong> To prevent a single massive database failure from taking down your entire application dataset.</li></ul><h3>From theory to practice</h3><p>After this brief introduction to some of Redis’ features and peculiarities, let’s analyse a simple use case that will help us get our hands dirty.</p><p><strong>Building and Synchronizing Redis Databases</strong></p><p>First, let’s create two databases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AZR8BzULYuO-5T6qnbIB-w.png" /></figure><p>We can use the Redis Enterprise Manager UI or the REST API as described <a href="https://redis.io/docs/latest/operate/rs/databases/create/">here</a>:</p><ul><li>The first database will be a <strong>single-sharded</strong> Redis Enterprise database named source-db with no password and a 2GB memory limit.</li><li>Create a second database named replica-db, with the same configuration as source-db and enable “Replica Of” (use source-db as the source database, as shown in the image).</li><li><strong>Same Redis Software cluster</strong><br>To configure a <strong>Replica Of </strong>database in the same Redis Software cluster as the source database:</li></ul><ol><li><strong>Create a new database</strong> or select an existing database from the Databases screen.</li><li>For an existing database, select Edit from the Configuration tab.</li><li>Expand the <strong>Replica Of</strong> section.</li><li>Select + Add source database.</li><li>In the Connect a Replica Of source database dialog, select Current cluster.</li><li>Select the source database from the list.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Um2qCOL7WC6yixh9J-Q9aw.png" /></figure><p>7. Select Add source.</p><p>8. Select Save.</p><blockquote>We can also use the <a href="https://redis.io/docs/latest/operate/rs/references/rest-api/requests/bdbs/">REST APIs</a> to perform the same operations</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ndbO0QpirUojGsKMKG0SWA.png" /></figure><h4>Excercise:</h4><p>After creating the databases, we’ll write a small script/program using Node.js to:</p><ul><li>Insert 100 values ​​from 1 to 100 into the Redis database on <strong>source-db</strong>.</li><li>Read and print them in reverse order from <strong>replica-db</strong>.</li></ul><p>Redis database replication works by continuously pushing an asynchronous stream of write commands from a primary instance to one or more read-only replica instances</p><h4>How the Replication Process Works</h4><ul><li><strong>Initial Full Sync:</strong> When a replica connects to a primary, it requests a full copy of the data. The primary creates a snapshot of its database using an RDB (Redis Database) file and sends it to the replica. The replica loads this file into memory.</li><li><strong>Command Streaming:</strong> While the primary creates the snapshot, it buffers any new write commands. Once the snapshot transfer finishes, the primary streams these buffered updates and all subsequent write commands to the replica in real time.</li><li><strong>Partial Resynchronization (PSYNC):</strong> If a network drop disconnects a replica briefly, it does not need a full sync. Instead, it uses a circular buffer called the replication backlog to ask the primary only for the specific commands it missed during the outage.</li></ul><h4>Key Concepts</h4><ul><li><strong>Asynchronous Nature:</strong> The primary confirms writes to the client immediately without waiting for replicas to apply them, making the system very fast.</li><li><strong>Read Scalability:</strong> Replicas are configured as read-only by default, allowing applications to scale read throughput by offloading queries from the primary.</li><li><strong>High Availability:</strong> If a primary fails, monitoring tools like <a href="https://redis.io/tutorials/operate/redis-at-scale/high-availability/">Redis Sentinel</a> can automatically promote an up-to-date replica to become the new primary.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4LYEyqRtWkGJMJ7HQwwSAg.png" /></figure><p>The entire code (in one file for brevity):</p><pre>import { createClient } from &#39;redis&#39;;<br><br>const SOURCE_URL  = process.env.SOURCE_URL  ?? &#39;redis://localhost:12000&#39;;<br>const REPLICA_URL = process.env.REPLICA_URL ?? &#39;redis://localhost:12001&#39;;<br><br>/** Creates a Redis client with error handling and reconnection strategy. */<br>function createRedisClient(url, label) {<br>  const client = createClient({<br>    url,<br>    socket: {<br>      reconnectStrategy: (retries) =&gt; {<br>        if (retries &gt; 5) return new Error(`${label}: max reconnect attempts exceeded`);<br>        /* Exponential backoff: 100ms × 2^retries → 100ms, 200ms, 400ms, 800ms, 1600ms, 3000ms (capped)<br>        Benefit: after network outages, clients reconnect gradually instead of all at once (thundering herd).<br>        Linear backoff (retries × 200) reuses same delay; exponential spreads load. */<br>        return Math.min(100 * Math.pow(2, retries), 3000);<br>      },<br>    },<br>  });<br>  client.on(&#39;error&#39;, (err) =&gt; console.error(`[${label}] client error: ${err.message}`));<br>  return client;<br>}<br><br>/**<br> * Parses INFO replication output into a structured object.<br> * Converts raw newline-delimited key:value pairs into a plain object for easy property access.<br> * Uses Object.fromEntries + Array methods to transform string → tuples → object.<br> */<br>function parseReplicationInfo(raw) {<br>  return Object.fromEntries(<br>    raw<br>      .split(&#39;\r\n&#39;)                        // Split by CRLF (Redis protocol line ending)<br>      .filter((line) =&gt; line.includes(&#39;:&#39;)) // Keep only key:value lines, skip empty/comment lines<br>      .map((line) =&gt; line.split(&#39;:&#39;))        // Transform &quot;key:value&quot; → [&quot;key&quot;, &quot;value&quot;]<br>  );                                         // Object.fromEntries converts array of pairs → object<br>}<br><br>/** Logs replication state from the given Redis client. */<br>async function logReplicationInfo(client, label) {<br>  const raw = await client.info(&#39;replication&#39;);<br>  const { role, connected_slaves, master_repl_offset } = parseReplicationInfo(raw);<br>  console.log(<br>    `[${label}] role=${role} ` +<br>    `connected_slaves=${connected_slaves ?? 0} ` +<br>    `master_repl_offset=${master_repl_offset ?? &#39;N/A&#39;}`<br>  );<br>}<br><br>/**<br> * Generator function: yields descending numbers from end down to start.<br> * Generators (function* + yield) are lazy — they compute values on-demand rather than creating<br> * an array upfront. Memory-efficient for large ranges; compatible with Array.from(), for...of loops.<br> * Example: range(1, 3) yields 3, 2, 1 (one per iteration).<br> */<br>function* range(start, end) {<br>  for (let i = end; i &gt;= start; i--) {<br>    yield i; // Pause execution and return the current value; resume on next iteration<br>  }<br>}<br><br>/**<br> * Reads multiple keys from Redis in parallel (not sequentially).<br> * Instead of await client.get(key1); await client.get(key2); ... (100 round-trips),<br> * uses Promise.all() to fire all 100 GETs at once and wait for all results together (~1 round-trip).<br> * Returns array of {key, value} objects for convenient iteration.<br> *<br> * Breakdown:<br> * - Array.from(indices, mapper) converts generator/iterable into array + applies mapper function<br> * - keyPattern.replace(&#39;{}&#39;, i) templating: &#39;challenge:{}&#39; + 1 → &#39;challenge:1&#39;<br> * - Promise.all() waits for ALL promises simultaneously; rejects if ANY fails<br> * - Final .map() pairs keys with their corresponding values by index<br> */<br>async function readKeysParallel(client, keyPattern, indices) {<br>  const keys = Array.from(indices, (i) =&gt; keyPattern.replace(&#39;{}&#39;, i));<br>  const values = await Promise.all(keys.map((key) =&gt; client.get(key)));<br>  return keys.map((key, i) =&gt; ({ key, value: values[i] }));<br>}<br><br>async function run() {<br>  // Destructuring assignment: extract elements from array into named variables in one line.<br>  // Equivalent to: const source = clients[0]; const replica = clients[1];<br>  const [source, replica] = [<br>    createRedisClient(SOURCE_URL, &#39;source-db&#39;),<br>    createRedisClient(REPLICA_URL, &#39;replica-db&#39;),<br>  ];<br><br>  try {<br>    await Promise.all([source.connect(), replica.connect()]);<br>    console.log(&#39;Connected to source-db and replica-db.&#39;);<br><br>    await logReplicationInfo(source, &#39;source-db&#39;);<br><br>    // Write 100 keys in a single round-trip using mSet<br>    const entries = Array.from({ length: 100 }, (_, i) =&gt; [<br>      `challenge:${i + 1}`,<br>      String(i + 1),<br>    ]).flat();<br>    await source.mSet(entries);<br>    console.log(&#39;Wrote challenge:1..100 to source-db.&#39;);<br><br>    await logReplicationInfo(source, &#39;source-db&#39;);<br><br>    // Allow the RE internal syncer to propagate writes to replica-db<br>    console.log(&#39;Waiting 1s for replica convergence...&#39;);<br>    await new Promise((resolve) =&gt; setTimeout(resolve, 1000));<br><br>    await logReplicationInfo(replica, &#39;replica-db&#39;);<br><br>    // Read challenge:100..1 from replica-db in PARALLEL (not sequential).<br>    // This fires all 100 GETs at once via Promise.all inside readKeysParallel().<br>    console.log(&#39;Reading challenge:100..1 from replica-db (parallel):&#39;);<br>    const indices = Array.from(range(1, 100)); // Convert generator [100,99,...,1] → array<br>    const entries_read = await readKeysParallel(replica, &#39;challenge:{}&#39;, indices);<br>    // Destructuring in forEach: extract { key, value } from each object<br>    entries_read.forEach(({ key, value }) =&gt; console.log(`${key} = ${value}`));<br>  } finally {<br>    // quit() sends QUIT before closing; allSettled ensures both close even if one fails<br>    await Promise.allSettled([source.quit(), replica.quit()]);<br>  }<br>}<br><br>run().catch((err) =&gt; {<br>    console.error(&#39;Fatal:&#39;, err.message);<br>    process.exit(1);<br>});</pre><p>In the run() function, we have:</p><pre>const [source, replica] = [<br>    createRedisClient(SOURCE_URL, &#39;source-db&#39;),<br>    createRedisClient(REPLICA_URL, &#39;replica-db&#39;),<br>  ];</pre><p>That let us to create the connections toward the source-db and replica-db, where SOURCE_URL and REPLICA_URL are the URLs to let our node.js app to connect to databases:</p><pre>const SOURCE_URL  = process.env.SOURCE_URL  ?? &#39;redis://localhost:12000&#39;;<br>const REPLICA_URL = process.env.REPLICA_URL ?? &#39;redis://localhost:12001&#39;;</pre><p>So, the <strong>createRedisClient(url, label) </strong>function builds a client for each database (with error handling and reconnection strategy):</p><pre>/** Creates a Redis client with error handling and reconnection strategy. */<br>function createRedisClient(url, label) {<br>  const client = createClient({<br>    url,<br>    socket: {<br>      reconnectStrategy: (retries) =&gt; {<br>        if (retries &gt; 5) return new Error(`${label}: max reconnect attempts <br>                                          exceeded`);<br>        return Math.min(100 * Math.pow(2, retries), 3000);<br>        /* Exponential backoff: 100ms × 2^retries → 100ms, 200ms, 400ms, 800ms, 1600ms, 3000ms (capped)<br>           Benefit: after network outages, clients reconnect gradually instead of all at once (thundering herd).<br>           Linear backoff (retries × 200) reuses same delay; exponential spreads load.*/<br>      },<br>    },<br>  });<br>  client.on(&#39;error&#39;, (err) =&gt; console.error(`[${label}] <br>                                             client error: ${err.message}`));<br>  return client;<br>}</pre><p>In the solution we also have a function to tranform the Redis output into a JSON format:</p><pre>async function logReplicationInfo(client, label) {<br>  const raw = await client.info(&#39;replication&#39;);<br>  const { role, connected_slaves, master_repl_offset } = <br>                                                parseReplicationInfo(raw);<br>  console.log(<br>    `[${label}] role=${role} ` +<br>    `connected_slaves=${connected_slaves ?? 0} ` +<br>    `master_repl_offset=${master_repl_offset ?? &#39;N/A&#39;}`<br>  );<br>}</pre><p>Redis returns the <strong>INFO replication</strong> result as text like this:</p><pre># Replication<br>role:master<br>connected_slaves:0<br>master_repl_offset:12345</pre><p>The parseReplicationInfo function converts those lines into a JavaScript object:</p><pre>{<br>   role: &#39;master&#39;,<br>   connected_slaves: &#39;0&#39;,<br>   master_repl_offset: &#39;12345&#39;<br>}</pre><p><strong>The most important conceptual point is that Redis Enterprise manages “Replica Of” at its platform level.</strong> Therefore, in some Redis Enterprise contexts, a database configured as a replica may still display role=master for its shard via INFO replication.</p><blockquote>Therefore, it’s not a good idea to conclude:<br>role=master =&gt; Replica Of doesn’t work.</blockquote><p>In the classic OSS (Open Source) model, INFO replication is a direct tool for observing the primary-replica relationship. In the Redis Enterprise managed replication model, the database topology and internal synchro are managed differently. Authoritative status must be checked in the Cluster Manager UI, via the Redis Enterprise APIs, or, most importantly, via data verification.</p><p>The app runs this telemetry before writing, after writing, and on the replica after waiting. It’s diagnostic, not the true proof of correctness. The proof is reading the same values ​​from the replica.</p><h4>Writing 100 values ​​to the source</h4><p>The dataset construction is:</p><pre>const entries = Array.from({ length: 100 }, (_, i) =&gt; [<br>`challenge:${i + 1}`,<br>String(i + 1),<br>]).flat();<br><br>// we can use MSET function to set in one shot the entire set of numbers<br>// only because the database in configured with one shard<br>await source.mSet(entries);</pre><p>Array.from({ length: 100 }, …) executes a function one hundred times. Since the JavaScript index starts at zero, the program adds one:</p><p>i = 0 -&gt; challenge:1 = “1”<br>i = 1 -&gt; challenge:2 = “2”<br>…<br>i = 99 -&gt; challenge:100 = “100”</p><p><strong>The value is converted to a string because Redis, at the protocol level, stores sequences of bytes</strong>; numbers are not a distinct type. When we see 1 in Redis, we are typically treating the string “1” as a numeric value using appropriate commands, such as INCR.</p><p>The initial array has the form:</p><pre>[<br>   [&#39;challenge:1&#39;, &#39;1&#39;],<br>   [&#39;challenge:2&#39;, &#39;2&#39;],<br>   …<br>]</pre><p>After .flat(), it becomes:</p><pre>[<br>   &#39;challenge:1&#39;, &#39;1&#39;,<br>   &#39;challenge:2&#39;, &#39;2&#39;,<br>   …<br>]</pre><p>which the client translates into a single Redis MSET command.</p><p>This is efficient. A naive implementation would perform one hundred sequential SETs:</p><pre>for (let value = 1; value &lt;= 100; value++) {<br> await source.set(`challenge:${value}`, String(value));<br>}</pre><p>The number of commands remains 100, but the network roundtrips increase. If the average round-trip time is L L, the approximation is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*f4vB9a12zbQSGwGhHjFElA.png" /></figure><p>With MSET:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*bFYwu2CN882xt8wRhtivJA.png" /></figure><p>So the advantage is particularly noticeable when clients and Redis are on different hosts or networks.</p><p>There is also a positive semantic property: MSET is atomic. Other clients don’t see half the updated keys and half don’t. This doesn’t turn asynchronous replication into a cross-database transaction, but it does ensure local consistency on the source for that command.</p><p>Waiting for replication<br>After MSET, the program executes:</p><pre>console.log(&#39;Waiting 1s for replica convergence…&#39;);<br>await new Promise((resolve) =&gt; setTimeout(resolve, 1000));</pre><p><strong>Replica Of replication is asynchronous</strong>. This means that a positive response to MSET from the source does not automatically mean that the data is already available for consultation by the replica at that same time.</p><p>The one-second wait serves a learning purpose: it prevents the read from starting immediately and failing in an environment with minimal lag. In a local lab or a fast network, this is often sufficient.</p><p>However, it is not a robust guarantee of convergence. If the replication is delayed due to a load peak, a network problem, a resynchronization, or insufficient resources, some values ​​may not have arrived even after one second.</p><blockquote><strong>A production implementation should replace the fixed delay with a conditional check and timeout.</strong></blockquote><p>A conceptual example:</p><pre>for (let attempt = 0; attempt &lt; 20; attempt++) {<br>  const value = await replica.get(&#39;challenge:100&#39;);<br>  if (value === &#39;100&#39;) {<br>    break;<br>  }<br>  await wait(250);<br>}</pre><p>Better yet, you can verify all awaited keys, check the “In sync” status on the Redis Enterprise control plane, expose replication metrics, and decide on an explicit behavior in the event of an out-of-date replica.</p><h4>Reverse reading from replica</h4><p>The most interesting part of the code is:</p><pre>function* range(start, end) {<br>  for (let i = end; i &gt;= start; i - ) {<br>    yield i;<br>  }<br>}</pre><p>This generator function produces values ​​<strong>lazy</strong>:</p><p>range(1, 100) -&gt; 100, 99, 98, …, 1</p><p>A generator doesn’t immediately construct an array with 100 elements: it returns each value as requested. For 100 values, the memory gain is negligible, but the construct clearly demonstrates a reusable pattern over large ranges.</p><p>The indices are materialized here:</p><pre>const indices = Array.from(range(1, 100));</pre><p>The result is:</p><p>[100, 99, 98, …, 1]</p><p>The reading then goes to:</p><pre>async function readKeysParallel(client, keyPattern, indices) {<br>  const keys = Array.from(indices, (i) =&gt; keyPattern.replace(&#39;{}&#39;, i));<br>  const values ​​= await Promise.all(keys.map((key) =&gt; client.get(key)));<br>  return keys.map((key, i) =&gt; ({ key, value: values[i] }));<br>}</pre><p>The function performs three tasks:</p><p>generates the keys challenge:100 through challenge:1;<br>sends one hundred GETs and reassembles the key and value, maintaining the desired order.</p><p>The essential part is:</p><pre>await Promise.all(keys.map((key) =&gt; client.get(key)));</pre><blockquote>Commands are requested without waiting for the result of each GET before starting the next.</blockquote><p>The code uses client-side concurrency and still preserves order, because Promise.all returns the results according to the order of the input array, not according to the chronological order in which the responses arrive.</p><p>The program then prints:</p><blockquote>challenge:100 = 100<br>challenge:99 = 99<br>…<br>challenge:1 = 1</blockquote><p>However, a technical distinction must be made. This is application concurrency, not a single Redis command. The client still sends a hundred GET requests, though it can leverage auto-pipelining or client queuing depending on its implementation. <br>If we want to truly minimize round-trips, MGET would be more straightforward:</p><pre>const values ​​= await replica.mGet([<br>  &#39;challenge:100&#39;,<br>  &#39;challenge:99&#39;,<br>  // …<br>  &#39;challenge:1&#39;,<br>]);</pre><p>MGET returns values ​​in the same order as the requested keys and requires only a single Redis command. For an exercise that wants to show the key and value individually, the current choice remains readable; for pure efficiency, MGET is preferable.</p><h4>Redis possible structures alternatives</h4><h4>List</h4><p>A list could be populated with: RPUSH challenges 1 2 3 … 100</p><p>and read with: LRANGE challenges 0 -1</p><p>Advantages:</p><ul><li>A single key;</li><li>Efficient append;</li><li>Natural pattern for a sequence;</li><li>One primary write and one primary read.</li></ul><p>Limitations:</p><ul><li>LRANGE returns the insertion order, so the app must reverse the result;</li><li>The elements do not have individual logical keys;</li><li>You cannot directly execute GET challenge:42;</li><li>Replication verification is less granular: A list would be a good choice if the requirement is to “maintain an ordered sequence of events” or “manage a queue.” It is not the best choice if each number is a standalone entity that needs to be consulted directly.</li></ul><h4>Sorted Set</h4><p>With a sorted set:</p><ul><li>Write: ZADD challenges 1 &quot;1&quot; 2 &quot;2&quot; 3 &quot;3&quot; … 100 “100”</li><li>Read: ZREVRANGE challenges 0 -1</li></ul><p>Advantages:</p><ul><li>Reverse sorting is performed by the server;</li><li>Range and ranking queries are efficient;</li><li>Excellent model for leaderboards, rankings, sorted feeds, and priorities.</li></ul><p>Limitations:</p><ul><li>Each member is unique.</li><li>Score and member are two concepts where one value suffices.</li><li>Adds conceptual complexity.</li><li>Does not address a real ranking requirement, because the order is known and trivial.</li><li>It is probably the most technically interesting alternative if “printing in reverse order” were a frequent product behavior, not just an exercise constraint.</li></ul><h4>Hash</h4><p>With a hash: HSET challenges 1 1 2 2 3 3 … 100 100</p><p>Advantages:</p><ul><li>A single Redis key.</li><li>Compact fields and values.</li><li>Selective reading via HGET challenges 42.</li><li>suitable for a single entity with many attributes.</li></ul><p>Limitations:</p><ul><li>HGETALL is not an ordered query.</li><li>to print in reverse, sorting is required on the client.</li><li>all elements share the same top-level key.</li><li>observing replication is less intuitive if you want to verify elements as separate Redis keys.</li><li>A hash would make sense if 1–100 were attributes or fields of a single logical document.</li></ul><h4>JSON</h4><p>If RedisJSON were available, you could use a document:</p><pre>{<br>  &quot;values&quot;: [1, 2, 3, 4]<br>}</pre><p>Advantages:</p><ul><li>rich structure, close to the application model;</li><li>possibility of partial queries and updates, based on activated modules;</li><li>natural for nested payloads.</li></ul><p>Limitations:</p><ul><li>not necessary for 100 integers.</li><li>introduces module, serialization, and increased complexity.</li><li>does not inherently improve replication verification.</li><li><strong>This would be oversized for this exercise.</strong></li></ul><h4>Stream</h4><p>A stream could record values ​​as events:</p><p>With a hash: XADD challenges * 1</p><p>Advantages:</p><ul><li>Preserves order and temporal identifier.</li><li>Supports consumer groups.</li><li>Excellent for append-only events and distributed processing.</li></ul><p>Limitations:</p><ul><li>Not a direct key-value store for this case.</li><li>Requires deciding how to read in reverse order.</li><li>Semantics more complex than necessary.</li><li><strong>This is the right choice if the numbers represent events that multiple consumers need to process, not just values ​​to verify.</strong></li></ul><h3>Conclusion</h3><h4>Why not write directly to the replica?</h4><p>Because replica-db must follow source-db. Writing to the source maintains a single authoritative writer and avoids divergence. The expected flow is write-on-source, read-from-replica.</p><h4>Is replication synchronous?</h4><p>No, “Replica Of” replication is asynchronous. There is a window in which the source has already confirmed the write, but the replica may not have received it yet.</p><h4>What does read-after-write consistency mean in this scenario?</h4><p>If a client writes and immediately reads from the replica, it may receive missing or older data. To guarantee read-after-write, you must read from the source for that session, wait for a replica confirmation, or use a design that manages the lag.</p><h4>Why use MSET?</h4><p>It reduces round-trips from one hundred to one and makes the update atomic on the source. It’s suitable because the data is written in batches.</p><h4>Why not use MGET for reading?</h4><p>It could, and it would be more efficient in terms of round-trips. The solution uses Promise.all to show concurrency and maintain key-by-key output. For a concrete optimization, choose MGET.</p><h4>Why does replication show role=master?</h4><p>Redis Enterprise manages replication at the platform level and can show the master role for local shards. In this context, INFO replication is not sufficient evidence against the “Replica Of” relationship; data verification and status in the UI/API are more authoritative.</p><h4>How would you verify replica health?</h4><p>I would check the “In sync” status in the Cluster Manager UI, the lag and syncer error metrics, compare keys or checksums over a significant sample, and issue alerts for unsynchronized replication, latency, or increasing backlog.</p><h4>Why single-shard?</h4><p>One shard simplifies the model. With higher volumes or throughput, you would evaluate multiple shards, key distribution, sizing, and the impact of multi-key operations.</p><h4>What’s the difference between Redis OSS replication and Replica Of in Redis Enterprise?</h4><p>In Redis OSS, you think directly in terms of primary replication and replication commands/protocols. In Redis Enterprise, the relationship can be managed by the control plane and the platform’s internal mechanisms; observability and some topological details differ.</p><h4>What data structure would you use for a leaderboard?</h4><p>A sorted set: score for sorting, member as identity, ZREVRANGE for rankings. Strings are better here only because the goal is to demonstrate independent values ​​and simple replication.</p><h4>Which one would you choose for ordered events to be processed?</h4><p>Redis Streams, with consumer groups, ack, pending entry management, and persistence of logical events.</p><h4>How would you handle transient errors?</h4><p>Exponential backoff, maximum retry count or deadline, telemetry, circuit breaker for a persistent service, and explicit fallback when the replica is not adequately updated.</p><h4>What happens if the source fails?</h4><p>It depends on the topology and the configured failover plan. The presence of replica-db does not automatically mean it can be promoted as a source with the same operational semantics. The disaster recovery plan, RPO/RTO, promotion, client routing, and recovery reconciliation must be defined.</p><h4>Why don’t you use a Redis transaction?</h4><p>MSET is already atomic for this batch. A MULTI/EXEC transaction would be useful if we needed to combine multiple commands with local atomicity requirements, but it wouldn’t make replication synchronous or create a distributed transaction between source and replica.</p><h4>How would you secure a production version?</h4><p>TLS in transit, least-privilege ACLs, credentials in secret manager, restricted network access, database authentication, auditing, backup, monitoring, failover testing, and documented restore procedures.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be92a174afd8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Agentic Revolution: From Passive Tools to Reasoning Partners]]></title>
            <link>https://ddelfio.medium.com/the-agentic-revolution-from-passive-tools-to-reasoning-partners-b66444a2a1b9?source=rss-e589e2d93a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b66444a2a1b9</guid>
            <dc:creator><![CDATA[Danilo Del Fio]]></dc:creator>
            <pubDate>Wed, 17 Dec 2025 09:24:40 GMT</pubDate>
            <atom:updated>2025-12-17T09:24:40.085Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YtzVeh7aDTUG4ZDa" /></figure><h3>The Shift: Beyond Generation: The Birth of Agentic AI</h3><p>The landscape of artificial intelligence is undergoing a profound shift, moving beyond the capabilities of standard Generative AI into the dynamic realm of Agentic AI.</p><p>While Generative AI primarily refers to large language models (LLMs) trained on vast datasets to recognize patterns and generate content based on prompts, it faces inherent limitations such as hallucinations and a lack of grounding in up-to-date facts. To mitigate these risks, developers initially turned to Retrieval-Augmented Generation (RAG) applications, which ground models in specific, factual knowledge bases to improve reliability.</p><blockquote><em>However, the true renaissance began in 2023, when the reasoning capabilities of these models were unlocked, allowing them to break down complex queries into sequential steps and orchestrate tasks rather than simply predicting the next word.</em></blockquote><p>This evolution marks the birth of Agentic AI, a revival of multi-agent systems from the 1990s now supercharged by the cognitive engines of modern LLMs.</p><h3>The Engine: The Anatomy of Autonomous Orchestration</h3><p>At the heart of this revolution is the concept of the autonomous agent, a system capable of handling complex, non-deterministic tasks with little to no human intervention. Unlike a basic LLM feature that processes a single input to produce a deterministic output — such as summarization or sentiment classification</p><blockquote><em>An agent operates within an environment where it must plan, act, and observe.</em></blockquote><p>In a typical agentic configuration, a central orchestrator agent utilizes a language model to decode user intent, reason through necessary steps, and coordinate other orchestrated agents or tools to execute specific tasks. This architecture allows the system to dynamically adapt to evolving contexts and errors, a flexibility that rigid, pre-defined workflows cannot achieve. These orchestrated agents can range from simple database connectors to complex RAG systems, creating a recursive, tree-like structure where agents utilize other agents to solve increasingly sophisticated problems.</p><h3>The Framework: Standardizing Autonomy via the Model Context Protocol</h3><p>The implementation of these systems relies heavily on standardization and interoperability, most notably through the Model Context Protocol (MCP).</p><blockquote><em>The MCP facilitates the modular construction of applications by standardizing how orchestrator agents (MCP Clients) interact with orchestrated agents (MCP Servers), which provide tools, resources, and prompts.</em></blockquote><p>This protocol secures the functionalities offered by agents, such as executable functions or read-only data sources, and enables sampling, where servers can query the clients AI to create intelligent agent chains. This modular approach has led to a proliferation of marketplaces offering specialized MCP Server agents, allowing developers to build complex applications incrementally — starting with elementary connectors and scaling up to advanced analytical systems.</p><h3>The Choice: Architectural Trade-offs: Workflows vs. Agents</h3><p>Despite the excitement surrounding autonomous agents,</p><blockquote><em>selecting the correct system design remains a critical architectural decision.</em></blockquote><p>Designers must weigh the trade-offs between three primary paradigms: single LLM features, structured workflows, and autonomous agents. Single LLM features offer speed and low cost for atomic tasks but lack memory and adaptability. Structured workflows provide predictability and compliance for multi-step processes like insurance claims, where execution must follow a strict path. In contrast, <em>autonomous agents are essential for open-ended problems requiring real-time reasoning and dynamic tool selection</em>, though they come with higher complexity and cost. In practice, hybrid architectures often emerge, combining the reliability of workflows with the flexibility of agents to achieve optimal results.</p><h3>The Future: The Agentic Enterprise: Software as a Reasoning Partner</h3><p>Looking forward, the potential use cases for Agentic AI are vast, particularly in enterprise environments where complex reasoning is required.</p><blockquote><em>By integrating agents with databases such as ERP, CRM, and Supply Chain systems, organizations can automate tasks that previously required human analysis, such as identifying churn risks or optimizing production capacity.</em></blockquote><p>These agents can operate 24/7, handling tasks that require dynamic adaptation to unpredictable contexts. As the technology matures, we may see agents operating continuously in the background, learning from raw sensor data and direct agent-to-agent interactions to understand environments in ways that surpass human comprehension.</p><p>This shift represents not just an improvement in efficiency, but a fundamental change in how we conceive of software: from passive tools to active, reasoning partners.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b66444a2a1b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Composable Commerce from an Integration Prospective]]></title>
            <link>https://ddelfio.medium.com/composable-commerce-from-an-integration-prospective-006066925836?source=rss-e589e2d93a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/006066925836</guid>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[kafka-streams]]></category>
            <category><![CDATA[composable-commerce]]></category>
            <dc:creator><![CDATA[Danilo Del Fio]]></dc:creator>
            <pubDate>Mon, 10 Jun 2024 07:32:25 GMT</pubDate>
            <atom:updated>2024-06-21T08:39:56.756Z</atom:updated>
            <content:encoded><![CDATA[<h3>Composable Commerce from an Integration Perspective</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ct-BEX1EoCN6IB03.png" /><figcaption>License: <a href="https://creativecommons.org/licenses/by-nc/4.0/">https://creativecommons.org/licenses/by-nc/4.0/</a></figcaption></figure><h3>Introduction</h3><p>The nature that today’s customers ask for is seamlessly switched between online and offline experiences. These kinds of requirements push forward the need to figure out the best way to create a real omnichannel experience.<br>This creates a fixed point, a constraint, on the absolute intrinsic need to convey the large amount of data created in the various touchpoints and ensure that this data is synchronized and managed adequately to ensure that our “ecosystem” works perfectly, not miss important information that could cause a sales lose, but instead provides a useful tool to give customers a frictionless and convenient experience.</p><blockquote>Apache Kafka emerges as a powerful solution, offering real-time data streaming and processing capabilities to create a composable architecture for big retail e-commerce.</blockquote><h3>What about Apache Kafka</h3><p>Apache Kafka is nothing more than a distributed streaming platform. <br>Kafka is the ideal option if we need to move a lot of data, store it, and maybe process it. It also allows us to avoid concerns about trustworthiness, scalability, and producer-consumer synchronization issues.</p><p>From this perspective, therefore, our e-commerce platform, the various points of sale, and all the touchpoints that we must manage will provide data and receive them, through event management that will characterize what happened, where, and how, and will provide this mass of data to any other system that needs it. <br>Generalizing (we will see in future articles that it is much more than that), data “is moved” through Topics</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fkj9JH3ZdsBQ%3Fstart%3D1%26feature%3Doembed%26start%3D1&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dkj9JH3ZdsBQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fkj9JH3ZdsBQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1293b6e469c7d0b4980d3f7b8024a0a/href">https://medium.com/media/c1293b6e469c7d0b4980d3f7b8024a0a/href</a></iframe><p>These topics represent a logical “categorization” of data. In this way, the owner of the data has the responsibility of making it available, and those who need to consume them will connect (subscribe) to the right topic, filter and modify the data, according to their needs and at their own pace, without worry about losing data.</p><p>At its core, Kafka is a distributed, highly scalable, and error-tolerant system. Furthermore, in a context where data sorting and not losing it is necessary, Kafka, with its replication mechanisms, event append-mode, and data retention, also provides the right tool in an e-commerce context based on composable architecture, to create new heterogeneous and coordinated services and connect them, accordingly to the ecosystem we are building, to make a sort of replacement of the old services with the new ones (<a href="https://medium.com/@josesousa8/the-strangler-pattern-kill-legacy-like-a-boss-db3db41564ed">strangler fig pattern</a>).</p><h3>Apache Kafka in the Retail World</h3><p>As we already said, Kafka can provide a powerful tool in our hands defining and managing our omnichannel retail solution. <br>Imagine a customer browsing a product online, adding it to their cart, and then completing the purchase at a physical store. Each step generates data events — product views, cart updates, and purchase confirmations. These events can be published to separate Kafka topics. Microservices (or <a href="https://mia-platform.eu/blog/packaged-business-capabilities-pbc/#:~:text=Packaged%20business%20capabilities%20are%20standardized,%2C%20APIs%2C%20and%20event%20channels.">Packaged Business Capabilities</a>), can then subscribe to these topics and perform real-time actions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JpUln9xaxHExWsWk" /><figcaption>Source: Building and Reusing Packaged Business Capabilities (PBC), from Mia Platform</figcaption></figure><blockquote>For instance, a stock management service can be notified of the online purchase, updating inventory levels at the physical store.</blockquote><p>Kafka’s capabilities extend beyond simple data pipelines.</p><h4>Analytics</h4><p>Real-time analytics are enabled by it. Event streams containing customer behavior data can be delivered into analytics engines that are subject-specifically subscribed to. Retailers can now see consumer journeys, spot trends, and instantly customize marketing efforts thanks to this.</p><h4>Fraud detection</h4><p>Additionally, Kafka facilitates fraud detection by enabling real-time analysis of purchase transactions.</p><p>Using Kafka in omnichannel retail has several advantages. Because it guarantees continuous data availability across all touchpoints, it promotes a cohesive consumer experience. Retailers can respond quickly to shifting consumer behavior and industry trends because of real-time data processing. <br>Furthermore, Kafka encourages a composable design by decoupling systems through event streaming, which makes it simpler to incorporate new technologies and react to changing business requirements.</p><h3>Example</h3><p>Certain functionalities are handled by separate microservices in a composable e-commerce ecosystem. <br>Agileness and scalability are encouraged by this architecture. The smooth transfer of data across these services is essential, though.</p><blockquote>This gap is filled by Kafka Streams, which allows for real-time data integration between, for example, the Order Management System (OMS) and Product Information Management (PIM), some other crucial components, and the Point-of-Sale (POS) system.</blockquote><p><strong>Let me explain with a simple flow:</strong></p><ol><li><strong>POS Event Generation:</strong> Every time a sales transaction takes place, the POS system publishes an event, functioning as a Kafka producer. These events usually include timestamps, customer information (if accessible), and comprehensive information about the purchased items (product IDs, quantities, pricing).</li><li><strong>Kafka Topic and Schema:</strong> These occurrences are covered in the Kafka subject “pos-transactions”. It imposes a schema (e.g., product ID, quantity, price, etc.) that specifies the data format of every message.</li><li><strong>Stream Processing and Routing:</strong> As a consumer, a Kafka Streams application subscribes to the “pos-transactions” topic. The data stream is processed and routed in real-time by this program. The data can be filtered, enhanced, or transformed as necessary before being forwarded to the appropriate microservices (or another topic).</li><li><strong>Data Consumption:</strong> OMS and PIM, two downstream PBCs, subscribe to different Kafka topics according to their requirements. The order management system (OMS) may, for instance, subscribe to the “pos-transactions” topic in order to handle order fulfillment and get real-time sales updates. <br>On the other hand, the PIM can be interested in a different subject that compiles sales information for particular products.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Jo-5q5nEP2Vn16GVDPMdQ.png" /><figcaption>Generated with <a href="https://www.eraser.io/">https://www.eraser.io/</a></figcaption></figure><h3>Use Kafka Stream</h3><p>Below you can see a simple example of a Kafka Stream.</p><pre>StreamsBuilder builder = new StreamsBuilder();<br>KStream&lt;String, POSOrder&gt; posStream = builder.stream(&quot;pos-transactions&quot;, SpecificAvroSerde.of(POSOrder.class));<br><br>// Enrich data (optional)<br>KStream&lt;String, EnrichedOrder&gt; enrichedStream = posStream.mapValues(order -&gt; enrichOrder(order));<br><br>// Route data to different topics<br>enrichedStream.to(&quot;oms-orders&quot;, SpecificAvroSerde.of(EnrichedOrder.class));<br>enrichedStream.filter((key, order) -&gt; order.getProductId() != null)<br>              .to(&quot;pim-updates&quot;, SpecificAvroSerde.of(EnrichedOrder.class));<br><br>// Additional processing logic...<br><br>System.out.println(&quot;Stream processing started...&quot;);<br>builder.build().start();</pre><h3>Kafka Stream benefits</h3><ul><li><strong>Real-time Integration:</strong> The POS system and other microservices can exchange data in real-time thanks to Kafka Streams. This facilitates quicker order processing, real-time inventory updates, and customized customer interactions.</li><li><strong>Decoupling and Scalability:</strong> Microservices are autonomous of both each other and the data source (POS). This encourages autonomous development and deployment and guarantees scalability to manage growing data volumes thanks to Kafka Streams.</li><li><strong>Flexibility and Reusability:</strong> Data transformation and manipulation are possible when using stream processing. For different data integrations inside the e-commerce ecosystem, the same logic can be applied again.</li></ul><blockquote>Retailers can create a composable e-commerce architecture that seamlessly combines the point-of-sale (POS) system with other essential components, promoting efficiency, agility, and an improved omnichannel consumer experience, by utilizing Kafka Streams.</blockquote><h3>Conclusion</h3><p>Building a solid and scalable data infrastructure for large-scale retail e-commerce can rely largely on Apache Kafka. Its capacity to manage real-time data streams, guarantee data consistency, and allow for composable connectors gives retailers the edge to offer flawless omnichannel experiences and obtain insightful information that helps them enhance their tactics. Apache Kafka is still essential for success in the era of data-driven commerce, even as the retail industry changes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=006066925836" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Connascence: ovvero come misurare l’accoppiamento dei vostri servizi o moduli software.]]></title>
            <link>https://ddelfio.medium.com/connascence-ovvero-come-misurare-laccoppiamento-dei-vostri-servizi-o-moduli-software-2dbdcb3eb4f8?source=rss-e589e2d93a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2dbdcb3eb4f8</guid>
            <category><![CDATA[loosecoupling]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[connascence]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Danilo Del Fio]]></dc:creator>
            <pubDate>Thu, 12 May 2022 07:03:00 GMT</pubDate>
            <atom:updated>2022-05-12T13:26:21.864Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*5F3r2dRpkcbV3zEPYEYkkA.png" /><figcaption><a href="https://khalilstemmler.com/wiki/coupling-cohesion-connascence/">https://khalilstemmler.com/wiki/coupling-cohesion-connascence/</a></figcaption></figure><h3>Introduzione</h3><p>Creare servizi o moduli software che siano quanto più coesi e che abbiano un basso accoppiamento è diventato un mantra per la suddivisione di una soluzione software in diverse parti e fare in modo che queste parti siano più indipendenti possibile le une dalle altre e che necessitino di poche interazioni tra di esse.</p><p>A volte, però, tale definizione non basta a definirne “i confini” in modo netto, perché l’interdipendenza tra servizi e/o moduli software può dipendere da diversi fattori, siano essi funzionali o meno.</p><p>Iniziamo, per essempio, col dire che ci sono due tipi di “accoppiamento”.</p><h4>Accoppiamento afferente</h4><p>Misura il numero di connessioni in ingresso a un artefatto di codice (componente, classe, funzione e così via).</p><h4>Accoppiamento efferente</h4><p>Che misura le connessioni in uscita ad altri artefatti del codice. Per quasi tutte le piattaforme esistono strumenti che consentono agli architetti di analizzare le caratteristiche di accoppiamento del codice al fine di aiutare nella ristrutturazione, migrazione o comprensione di una base di codice.</p><h3>Definizione di Connascence</h3><blockquote>Two components are connascent if a change in one would require the other to be modified in order to maintain the overall correctness of the system. — Meilir Page-Jones</blockquote><p>La connascence, è una misura di quanto il software che scriviamo sia o meno “accoppiato”, ovvero che il cambiamento di una parte di codice determini il cambiamento di un’altra parte che in qualche modo interagisce con essa.</p><h3>Tipi di <strong>Connascence</strong></h3><blockquote><strong>La Connascence si divide in Statica e Dinamica.</strong></blockquote><p>La connascence statica è direttamente legata al codice che scriviamo e rappresenta un <em>accoppiamento a livello di codice sorgente</em>, mentre quella dinamica si riferisce all’<em>accoppiamento a runtime</em> (che come vedremo è un livello di accoppiamento peggiore).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/0*TGDGHRd0zpoGxbKi.png" /></figure><h3>Connascence Statiche</h3><p>Partiamo da quelle <strong>statiche</strong> che, sebbene possano creare problemi, sono più facilmente individuabili e gestibili.</p><h4>Nome</h4><p>La connascence del nome è quando più componenti devono accordarsi sul nome di un’entità. <br>Facendo un esempio con un linguaggio di programmazione ad oggetti, un primo meccanismo di “accoppiamento” è rappresentato indubbiamente dal nome dela classe e dai nomi dei metodi, per esempio, perché se decidessimo di modificarli, dovremmo modificare anche tutti i riferimenti ad essi.</p><h4>Tipo</h4><p>Le entità, in questo caso, devono essere di un certo tipo univocamente indentificato.<br>Alcuni linguaggi di programmazione “tipizzati”, come Typescript o Java, per esempio, tendono ad evitare che si vada incontro a questo tipo di problematica.</p><h4>Significato (Convenzione)</h4><p>Un valore deve avere un significato univoco, riconosciuto da chiunque acceda a tale valore.<br>Questo problema è evidenziato, per esempio, definendo valori hard-coded, che potremmo evitare ceando costanti che, quindi, porteranno lo stesso valore e lo stesso significato ovunque vengano usate.</p><h4>Posizione</h4><p>L’ordine dei “valori” deve essere riconosciuto dai vari componenti che ci accedono.<br>Questo aspetto è fondamentale, per esempio, nella specifica dei parametri di una funzione. Potremmo avere, infatti, più parametri dello stesso tipo nella firma di un metodo, ma con un significato completamente diverso.<br>Per esempio:</p><pre>updateSeats(String name, String seatLocation);</pre><p>Se la funzione venisse chiamata con:</p><pre>updateSeats(&quot;14D&quot;, &quot;Danilo Del Fio&quot;);</pre><p>avremmo un problema legato alla posizione dei parametri.</p><h4>Algoritmo</h4><p>I vari componenti del nostro software devono concordare su un particolare algoritmo.<br>Un caso comune per questo tipo di connascence si verifica quando uno sviluppatore definisce un algoritmo di hashing di sicurezza che deve essere eseguito sia sul server che sul client e produrre risultati identici per autenticare l’utente.<br>Ovviamente questa soluzione crea un enorme problema di accoppiamento, perché ogni cambiamento all’algoritmo dal un lato deve riflettere un altrettanto cambiamento.</p><h3>Connascence Dinamiche</h3><p>Le connascence dinamiche sono più pericolose e più difficili da individuare e gestire, perché riguardano accoppiamenti a runtime delle nostre applicazioni.</p><h4>Ordine di esecuzione</h4><p>L’ordine con cui dobbiamo eseguire determinate istruzioni è importante e potrebbe creare problemi nell’esecuzione stessa.</p><pre>email = new Email();<br>email.setRecipient(&quot;you@gmail.com&quot;);<br>email.setSender(&quot;me@gmail.com&quot;);<br>email.send();<br>email.setSubject(&quot;whoops&quot;);</pre><p>Come vediamo dall’esempio, sbagliando l’ordine di esecuzione andiamo incontro ad un problema, perché non abbiamo definito un soggetto della nostra email, prima di chiamare la funzione di invio.</p><h4>Timing</h4><p>La tempistica dell’esecuzione di più componenti è importante.<br>Il caso comune di questo tipo di connascence è una race condition causata da due thread in esecuzione contemporaneamente, che influiscono sull’esito dell’operazione congiunta.</p><h4>Valori</h4><p>Si verifica quando più valori sono correlati tra loro e devono cambiare insieme.<br>Considera il caso in cui uno sviluppatore ha definito un rettangolo come quattro punti, che rappresentano i vertici dello stesso. <br>Per mantenere l’integrità della struttura dei dati, lo sviluppatore non può modificare casualmente uno dei punti senza considerare l’impatto sugli altri punti.<br>Il caso più comune e problematico riguarda le transazioni, soprattutto nei sistemi distribuiti. Il problema, infatti, nasce quando definiamo un’architettura con database separati, ma la modifica di un valore in uno di essi deve riflettere quella in un altro database. In questi casi dobbiamo trovare il modo di creare architetture che supportino la cosiddetta “Eventual Consistency” (ovvero basarci sul fatto che i dati saranno consistenti in un momento del futuro).</p><h4>Identità</h4><p>Si verifica quando più componenti devono fare riferimento alla stessa entità.<br>L’esempio comune di questo tipo di connascence coinvolge due componenti indipendenti che devono condividere e aggiornare una struttura di dati comune, come una coda distribuita.<br>Quest’ultimo tipo di connascence è il più complesso da gestire ed è uno dei motivi per cui si dovrebbe creare un database per ogni servizio in una architettura a microservizi. Un database comune sarebbe un enorme fonte di accoppiamento tra i servizi stessi.</p><blockquote>Connascence è uno strumento di analisi per architetti e sviluppatori e alcune proprietà di connascence aiutano gli sviluppatori a utilizzarlo al meglio.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/0*uKqz7LZrvBMR3jiK" /><figcaption><a href="https://medium.com/interviewnoodle/the-notes-for-fundamentals-of-software-architecture-2-9186b65400ae">https://medium.com/interviewnoodle/the-notes-for-fundamentals-of-software-architecture-2-9186b65400ae</a></figcaption></figure><h3>Proprietà di Connascence</h3><h4>Forza</h4><p>Definiamo come forza della connascence la facilità con cui uno sviluppatore può rifattorizzare quel tipo di accoppiamento; alcuni tipi di connascence sono più facili da gestire rispetto ad altri, come mostrato nell’immagine sopra. <br>Architetti e sviluppatori possono migliorare le caratteristiche di accoppiamento del codice effettuando il refactoring verso tipi migliori di connascence (indicato dalla freccia).</p><h4>Località</h4><p>Questa proprietà misura quanto siano vicine le due entità l’una all’altra. <br>Il codice più vicino, ovvero nello stesso modulo, classe o funzione, per esempio, dovrebbe avere forme di connascence maggiori rispetto a un codice più separato (in altri moduli o altre codebase). <br>In altre parole, le forme di connascence che indicano uno scarso accoppiamento quando sono distanti sono molto più innocue quando sono più vicine. <br>Ad esempio, se due classi nello stesso componente hanno una connascence di significato, è meno dannoso per la base di codice che se due componenti hanno la stessa forma di connascence.<br>Gli sviluppatori devono considerare insieme la forza e la località. Forme più forti di connascence che si trovano all’interno dello stesso modulo rappresentano un odore di codice minore rispetto alla stessa connascence dispersa.</p><h4>Grado</h4><p>Il grado di connascence è correlato alla dimensione del suo impatto: ha un impatto su poche o molte classi? <br>Gradi minori di connascence hanno, ovviamente, meno impatto sul nostro codice. <br>Questo porta con se il corollario che, avere un’elevata connascence dinamica non è terribile se hai solo pochi moduli.<br>Il problema è che in genere i repository tendono a crescere, rendendo quello quello che prima era un piccolo problema, molto più grande, con notevoli conseguenze di accoppiamento nel codice, che porta ad un rework continuo man mano che la dimensione della nostra codebase aumenta.</p><p>Jim Weirich, che riportò il concetto di connascence alla ribalta, ci fornisce due consigli:</p><ul><li><strong>Regola di grado (cerchiamo di ridurre il grado di </strong>connascence<strong>)</strong>: convertire forme forti di connascence in forme più deboli di connascence.</li><li><strong>Regola di località</strong>: all’aumentare della distanza tra gli elementi del software, utilizzare forme di conascenza più deboli (nelle architetture a microservizi, infatti, si parla di comunicazione lightweight tra i vari servizi).</li></ul><h4>Conclusione</h4><p>In questo breve articolo ho cercato di dare una chiave di lettura per la creazione e gestione di soluzioni software, delegando a diversi moduli o servizi il più possibile indipendenti, l’implementazione delle nostre logiche di business.<br>E’ necessario, soprattutto al crescere delle dimensioni del progetto, fare in modo che ci sia meno accoppiamento possibile tra le varie parti.</p><p>Raccogliendo le idee intorno ai concetti della connascence, infatti, potremmo essere in grado di identificare, ed evitare, problemi di interdipendenza, per evitare continui rework, perdite di tempo nel refactory del codice e arrivare al punto che il cambiamento di qualche linea di codice abbia regressioni in altri componenti.</p><p>If you want to read the same argument in English, please refer to:</p><p><a href="https://explicitcoupling.substack.com/p/what-happened-to-connascence?s=r&amp;utm_campaign=post&amp;utm_medium=web">What happened to Connascence?</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2dbdcb3eb4f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Curiosity-driven development.]]></title>
            <link>https://ddelfio.medium.com/curiosity-driven-development-f160b3a0dc4d?source=rss-e589e2d93a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f160b3a0dc4d</guid>
            <category><![CDATA[curiosity]]></category>
            <category><![CDATA[comfort-zone]]></category>
            <category><![CDATA[fear-of-failure]]></category>
            <category><![CDATA[discovery]]></category>
            <category><![CDATA[take-action]]></category>
            <dc:creator><![CDATA[Danilo Del Fio]]></dc:creator>
            <pubDate>Wed, 03 Mar 2021 08:02:42 GMT</pubDate>
            <atom:updated>2021-03-03T08:02:42.708Z</atom:updated>
            <content:encoded><![CDATA[<p>When discovery, failure, vulnerability, and curiosity guide our actions and take us out of our comfort zone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KtiHxIOiwzuOnY9YNtaumA.png" /><figcaption>Business vector created by upklyak — <a href="https://www.freepik.com/vectors/business">https://www.freepik.com/vectors/business</a></figcaption></figure><h4>Introduction</h4><p>It’s almost fifty years that I live on this planet and I’m not yet satisfied with what I should have to know.<br>It’s something that leads me every day and almost in every moment.</p><blockquote>I’m constantly worried that I don’t know enough.</blockquote><p>This, at times, creates problems for me, because I can never truly chill, but the real problem is my feelings because of impostor syndrome, which is the idea that you’ve only succeeded due to luck and not because of your talent or qualifications.</p><p>The truth is that this desire to study, to learn new things, and to know, has many more advantages than disadvantages.<br>First of all, this helps me to think that nothing is ever too complex, that it cannot be learned and then, above all, it provides me with the necessary strength to get up every day at 5 am in order to find the time that I need, to learn.</p><p>Someone calls it a “growth mindset”, but I wanted to find a term that was also good for my desire to know different things, even about different topics, of which I can see the affinities. I have called this feature of mine “Curiosity Driven Development”, which, I believe, gives the idea that my personal development is mainly driven by curiosity and nothing else.</p><blockquote>I study and train to make sense of and value my curiosity, not to prove something to someone.</blockquote><p>This leads to the negative part of my mindset, that is, that if I have no desire to learn something it is really difficult for me to put myself in the right mind to learn it because I will get distracted very easily and I will not be able to obtain the results that people expect from me (there would be another post to write down the need to have no expectations or get the idea that something “you should know”).</p><h4>Discovery</h4><p>The first mental mechanism that governs my desire to learn is <strong>discovery</strong>. Discovering affinities, relating topics that seem light-years away, but that in my head have more similarities than differences. This is what drives me to learn new things or focus on something.</p><p>Lately, for example, I’ve been focusing a lot on productivity and efficiency in the company. This is certainly a very much discussed and controversial topic because some schools of thought push us to think that we can help people to give their best, by applying the so-called servant leadership, by putting ourselves at the disposal of people, to try to understand them, removing any obstacles blocking them and coaching them on what they need. <br>Another line of thought and I find myself more in this way of thinking, focus on the environment and on systems that somehow have an influence on people.<br>It is very difficult to change people’s behavior, especially since each of us is guided and motivated by different reasons and beliefs.<br>However, when their environment changes, people will have to adjust and change their behavior to adapt. <br>People, managing themselves, will find ways to adapt to the new environment. Certainly that we may find resistance to change, but it is also true that if we want people to be guided by our own values and beliefs, we must face the risk of losing someone who does not believe the same things.</p><blockquote>We need to attract people who believe what we believe and who are guided by our own values.</blockquote><p>We need to attract people who believe what we believe and who are guided by our own values.<br>This would also lead to implementing a different approach to the so-called HR (I don’t really like the definition “human resources”), because if you create the environment you want in your company and people will align themselves with this way of thinking, they will act in order to convey this information outside the company, and this behavior will help the company to attract talents who recognize themselves in the company’s vision. This gives life to the first screening of the people who would like to come and work for you.</p><h4>Vulnerability &amp; Failure</h4><p>There is a common misconception about vulnerability. As said by the researcher “Brené Brown”, we used to think that vulnerability is a weakness, but in reality, it is quite the opposite.</p><blockquote>Vulnerability is the willingness to show up and be seen by others in the face of uncertain results. There is not a single act of courage that does not involve vulnerability.</blockquote><p>This is true in your personal life as in your work environment. In fact, being vulnerable is the key to creativity, change, and innovation, so if you have created a workplace where vulnerability is not welcome, you have also created a place and a culture without innovation and change.</p><ul><li>What’s wrong with being vulnerable sometimes?</li><li>Is a leader really allowed to be?</li><li>Letting your team know when you feel overwhelmed by a project and need a break is something we can say, if that’s how we feel?</li><li>Is admitting to your people that you don’t have a solution to an urgent problem permissible?</li><li>To apologize when you make a mistake is admitted?</li></ul><p>In my opinion, since we are all human beings, showing our vulnerabilities is a weapon and not a weakness. <br>Showing someone that you are perfect, if you think about it, can create barriers, because if every time I try to talk to you about my weakness or frustration, you answer me making me understand that you can manage everything, or that what I am feeling is only my imagination, you will make me feel alone and wrong, and that is why I consider it essential to show your vulnerability in spite of your position and role, even at the cost of sometimes being uncomfortable for others. <br>Showing that we also feel certain sensations, which then does not mean that we will not do everything to deal with them, but only that we are human, shows the people who talk to us that they can do the same, if they feel vulnerable and this sets the conversation and people’s mood, on a completely different level.</p><p>Another aspect that requires a lot of vulnerability, because it always puts us in an awkward position is innovation. <br>In my life I have always thought I was an innovator, but not because I invented who knows what, or is Elon Musk’s hidden brother, but simply, because I have never been afraid of feeling vulnerable while trying to discover something new for myself, or why I keep failing along the way. <br>We must get used to the idea that if we want to innovate, we will have to deal with failure, because innovation, by definition, confronts us with something whose outcome is uncertain and, if we are not prepared to accept failure, it is better not even try to innovate.</p><p>Have you ever wondered why so many people are always on the safe side? Have you ever faced meetings that should bring innovation (I work in the field of information technology), in which there is inevitably someone who comes up with the phrase “we have always done this”?</p><p>Those are probably the people who love their comfort zone and who, in order not to fail, prefer not to explore new paths or new solutions.</p><h4>Just take the first step</h4><p>Often, if the reason why we don’t do something is fear of failure, or showing one’s vulnerability, it is possible to go beyond these self-imposed limits, taking the first step in the direction that we think will lead us to reach our goal.</p><blockquote>“<em>Do one thing every day that scares you” — </em>Eleanor Roosevelt</blockquote><p>Doing something that scares us or makes us uncomfortable every day, allows us to deal with our fears and vulnerabilities, but allows us to familiarize ourselves with discomfort and, when we finally realize that the fear was only in our head, we will be ready to embrace major changes and this certainly puts us on the right path to be guided by curiosity and our desire to discover new things, instead of the discomfort and fear that will never let us leave our comfort zone.<br>This need is simply due to the fact that our brain, if placed in front of something unknown, tends to insert negative emotions and feelings in the empty spaces that we are unable to fill with rationality, to try to keep us safe.</p><h4>Conclusion</h4><p>Curiosity has always leaded my life, and even now, at the ripe old age of 48, I like to put myself in uncomfortable situations by setting myself ever greater goals. <br>I love discovering new ways to do things, because basically I’m not afraid of failure.</p><blockquote>Danger is Real, but Fear is a Choice</blockquote><p>The only problem, if we want to consider it a problem, which I experience because of my curiosity, is that, being also a multipotential, my interests shift to different things, even very distant from each other, and this means that very often I do not I manage to complete a project that thrilled me the day before.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f160b3a0dc4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stili di Leadership: quando autorità non significa autorevolezza]]></title>
            <link>https://ddelfio.medium.com/stili-di-leadership-quando-autorit%C3%A0-non-significa-autorevolezza-adbc5a83708a?source=rss-e589e2d93a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/adbc5a83708a</guid>
            <category><![CDATA[empathy]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[servant-leadership]]></category>
            <category><![CDATA[leadership-styles]]></category>
            <dc:creator><![CDATA[Danilo Del Fio]]></dc:creator>
            <pubDate>Mon, 18 Jan 2021 08:06:39 GMT</pubDate>
            <atom:updated>2021-01-21T08:20:59.392Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fx24R3LHxPwqrjuI7sUNdw.jpeg" /></figure><p>Potete ascoltare lo stesso argomento sul mio Podcast su Spotify</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fopen.spotify.com%2Fembed-podcast%2Fepisode%2F2jC106BVU4Y8wZ30xy3eaQ&amp;display_name=Spotify&amp;url=https%3A%2F%2Fopen.spotify.com%2Fepisode%2F2jC106BVU4Y8wZ30xy3eaQ&amp;image=https%3A%2F%2Fi.scdn.co%2Fimage%2F9f8ae289fec4b4cffb043c927b648dbdfa2b5755&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=spotify" width="600" height="232" frameborder="0" scrolling="no"><a href="https://medium.com/media/6de150b9da565fc4b1411a5acd9a6fbe/href">https://medium.com/media/6de150b9da565fc4b1411a5acd9a6fbe/href</a></iframe><h4>Introduzione</h4><p>La leadership è un argomento molto dibattuto e tende a diventare quasi stucchevole continuare a parlarne, soprattutto continuando a fare la solita dicotomia boss/leader.<br>In questo articolo vi vorrei parlare, invece, dei vari stili di leadership che è possibile seguire per guidare un team e delle varie peculiarità, i pro ed i contro di ciascun stile, in modo che ci si possa identificare in qualcuno di essi ed imparare ad applicare un particolare stile se si vogliono ottenere dei risultati come leader in particolari situazioni.</p><blockquote>Innanzitutto bisogna sottolineare che alla base di ogni interazione umana ci deve sempre essere rispetto, fiducia ed empatia, perché altrimenti si cade sempre nella situazione, spiacevole, di “usare” le persone e non instaurare un vero rapporto con esse.</blockquote><h4>Autocratico o Autoritario</h4><p>In questo stile di leadership, non ascolti nessuno, e decidi tutto tu. Questo stile, per ovvi motivi, porta raramente a risultati, perché può portare a bassa soddisfazione lavorativa ed affossa il morale. Ho avuto diverse esperienze, nella mia vita di manager che avevano la pretesa di ottenere risultati gestendo il loro team con questo stile. Mi fanno pena queste persone, soprattutto perché bisogna essere ciechi e privi di ogni raziocinio per non capire e non vedere che in questo modo non otterrai mai il massimo dalle persone, anzi, spesso ottieni il contrario, perché le persone, in genere, non amano essere usate. Tale stile può tornare utile solo in situazioni in cui bisogna decidere in fretta o in situazioni di crisi, come nell’esercito, per esempio.</p><h4>Affiliativo</h4><p>Con questo stile cerchiamo di guidare il nostro team creando legami emotivi. Il mantra di questo stile di leadership è:</p><blockquote>Le persone prima dei profitti</blockquote><p>Cerchiamo di creare un clima di fiducia e senso di appartenenza all’interno del team. Questo stile è molto efficace in momenti di stress, aiutando a sollevare il morale attraverso il miglioramento della comunicazione e cercando di creare un ambiente armonioso.<br>Questo stile presenta un lato negativo, perché creando legami emotivi stretti, possiamo trascurare dei problemi di prestazioni, perché tendiamo a giustificare e “coprire” certe mancanze.</p><h4>Burocratico</h4><p>Un leader burocratico tende a seguire un modello da manuale ed, in genere, è molto avverso al rischio. I leader burocratici tendono ad ascoltare gli altri, a differenza , ma mettono sempre al primo posto la politica aziendale e le pratiche passate. In genere questo stile di leadership viene utilizzato in grandi aziende o in ambienti molto regolamentati dove è importante l’’aderenza alle regole. Frasi come “abbiamo sempre fatto così” la fanno da padrone in queste aziende che risentono molto di questo stile rispondendo a fatica ai cambiamenti.</p><h4>Coaching</h4><p>Questo stile di leadership mira ad individuare e far crescere i punti di forza dei membri del team, dedicando tempo a conoscere ogni membro del team in modo profondo (speranze, credenze, sogni, valori). Con questo stile creiamo un ambiente positivo attraverso l’incoraggiamento e la comunicazione libera. Il coaching potrebbe essere frainteso con la micro-gestione, per la vicinanza del leader ai membri del team, e nei casi in cui si abbiano tali sensazioni, sarebbe bene fare un passo indietro.</p><h4>Democratico, Partecipativo</h4><p>E’ uno stile molto simile all’affiliativo, perché si basa molto sulla conoscenza, sulle capacità e le diversità dei membri del team. Un leader democratico tende molto a chiedere feedback ed a costruire una sorta di consenso all’interno del team, che li aiuta a sviluppare la giusta fiducia nella propria leadership. Questo stile potrebbe non essere adatto in situazioni di stress o in quelle in cui si debbano prendere decisioni in fretta, perché lo stile decisionale su cui è fondato, ovvero la partecipazione, potrebbe richiedere troppo tempo.</p><h4>Laissez-Faire, Delegativo</h4><p>Un leader di questo tipo confida che le proprie persone facciano ciò che dovrebbero fare, offrendo una minima interferenza ed una direzione. Tale stile è molto utile nelle startup in cui il founder deve porre fiducia nel team in modo che le persone si possano concentrare sull’esecuzione della strategia aziendale. Questo, per ovvi motivi, è lo stile meno invadente e da vita ad un team responsabilizzato, anche se può ledere lo sviluppo delle persone, perché a volte esse hanno bisogno di un cambiamento di rotta che, purtroppo, non riceveranno da questo tipo di leader, mancando così opportunità di crescita ed incrementando inefficienze.<br>Tale stile può sfociare in un “leader assente”, in cui il leader ricopre il ruolo, ma sono psicologicamente assenti evitando il coinvolgimento. Tali leader prendono valore dall’azienda, ma non ne aggiungono.</p><h4>Emergente</h4><p>Questo è un leader non nominato da qualcuno, ma sviluppa la leadership come risultato dell’interazione col team.</p><blockquote>Influenza e non autorità</blockquote><p>Questo stile si basa sulle relazioni, quindi il leader di questo tipo dovrà essere esperto nello sviluppo, mantenimento e nell’eventuale ripristino delle relazioni.</p><h4>Impostazione del Ritmo, Stimolante</h4><p>Questo leader da l’esempio, tenendo standard elevati per se stesso, nella speranza di essere seguito dal team. Un team motivato e ad alte prestazioni, che apprezza il miglioramento continuo, prospererà sotto la direzione di un leader di questo tipo. Possiamo trovare questo stile nell’esercito, come lo stile autocratico, ma questo stile risulta più efficace. Anche questo stile, come il laissez-faire, è basato sull’autonomia, quindi potrebbe risultare problematico per le persone che richiedono una guida più puntuale e può creare un ambiente in cui le persone si sentano troppo spinte dai loro leader, i cui standard non rispecchiano i propri (molto comune nelle startup).</p><h4>Servant</h4><p>Questo stile è stato coniato dallo scrittore Robert Greenleaf nel suo libro “”The Sevant as Leader” del 1970. In genere, nel business, i leader seguono gli interessi degli azionisti (Shareholder), mentre un servant leader si concentra sulle persone. Questo tipo di leader condividono l’autorità e mette al 1° posto i bisogni degli altri, aiutando le persone a realizzare il loro pieno potenziale. Tali leader sono più preoccupati del benessere della società in cui operano che delle responsabilità funzionali. Nelle aziende che promuovono questo tipo di leadership (Starbucks, Zappos, per esempio), il leader esiste per servire le proprie persone e non il contrario.</p><h4>Strategico</h4><p>Un leader di questo tipo si pone un duplice obiettivo. Portare avanti le attività quotidiane in azienda e capitalizzare le opportunità di crescita. Questo stile di leadership si concentra su mantenere alte le attuali condizioni di lavoro, per accontentare la dirigenza, e attuare il cambiamento organizzativo desiderato. Questi leader, a loro malgrado, lavorano in ambienti instabili, incerti, complessi e ambigui e sono influenzati da fattori esterni (per esempio se aumentasse la mole di lavoro o le responsabilità, rimarrebbe poco tempo per concentrarsi sulle opportunità di crescita). Il focus principale è sulla produttività e tali leader lavoreranno affinché riescano a creare un ambiente in cui le persone siano in grado di prevedere le esigenze dell’azienda, usando, di solito, premi ed incentivi per mantenere alti i livelli delle prestazioni delle persone. <em>A tal proposito è utile sottolineare che è stato dimostrato che l’incentivo economico è tanto più inutile quanto più il lavoro è creativo e soprattutto crea, nella testa delle persone, un meccanismo per cui baso il mio ingaggio su dei “qui pro quo”, in cui cerco un beneficio immediato da quello che faccio o potrei fare.</em><br>Un leader strategico dovrebbe creare una visione, comunicarla chiaramente e guidare la visione nella realtà.</p><h4>Transazionale</h4><p>Tali leader si preoccupano solo del lavoro svolto dalle proprie persone. IN genere fissano degli obiettivi e premiano con un bonus chi li raggiunge. Se lavori per un leader di questo tipo non ci sono ambiguità sul tuo ruolo e le tue responsabilità e questo, per alcune persone, potrebbe risultare demotivante. In questo tipo di ambiente, le persone faranno il minimo indispensabile, perché hanno già la consapevolezza del “valore” di quello che fanno. Per evitare che “il bonus” ed “il raggiungimento degli obiettivi” siano gli unici scopi delle persone, il leader potrebbe utilizzare gesti di apprezzamento, ancora meglio se pubblicamente, per mantenere le persone ingaggiate e motivate.</p><h4>Trasformazionale</h4><p>Tali leader sono concentrati sul miglioramento continuo, spingendo il team fuori dalla propria zona di comfort. Un leader di questo tipo è carismatico, in quanto basa la propria leadership sulla persuasione e sul fascino e riesce a comunicare in modo emotivamente profondo. <br>Le aziende ad alta crescita abbracciano questo stile di leadership, perché riesce a motivare le persone ed aiuta ad ottenere risultati superiori.</p><h4>Visionario</h4><p>Quando si parla di innovazione dobbiamo basarci sullo stile di leadership visionario. I leader visionari risolvono i problemi e si affidano al pensiero astratto per visualizzare possibilità che gli altri non vedono. Tali leader non solo vedono ciò che è possibile, ma sono in grado di veicolare la visione verso il proprio team. Steve Jobs ne è un esempio. Appassionato, di mentalità aperta e creativo, è riuscito ad ispirare una certa cultura dell’innovazione in Apple (ma anche in Pixar). E’ molto importante che un leader visionario sia integrato in un team composto da diversi talenti con diverse competenze, infatti, molto spesso, tali leader preferiscono non essere coinvolti nei dettagli o nell’implementazione della visione, appoggiandosi, appunto ad altri per tale compito.</p><h4>Conclusioni</h4><p>Non esiste uno stile migliore dell’altro, anche se alcuni stili mal si adattano a quello che dovrebbe essere l’ABC della leadership, ovvero il rispetto, la fiducia, l’empatia ed il supporto. Alcuno stili sono più utili di altri in casi in cui sia necessario decidere in fretta, altri quando abbiamo la necessità di aumentare la creatività, il livello di rischio che le persone sono disposte a prendere ed è per questo che è stato coniato il termine di <strong>Leadership Situazionale</strong> ovvero, come dice il nome, adottare lo stile più adatto alla situazione che si sta vivendo e al team che si ha a disposizione.</p><p>A volte le persone hanno bisogno solo di un abbraccio, a volte di indicazioni dettagliate o di critiche costruttive e a volte si tratta solo di lasciarle sole per fare il proprio lavoro e sta al leader avere la consapevolezza di cosa sta succedendo e di cosa hanno bisogno le persone in un certo momento.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adbc5a83708a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Innovation Mindset e Diffusione dell’Innovazione]]></title>
            <link>https://ddelfio.medium.com/innovation-mindset-e-diffusione-dellinnovazione-3b17b23c8a2?source=rss-e589e2d93a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b17b23c8a2</guid>
            <category><![CDATA[empathy]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[mindset]]></category>
            <category><![CDATA[diffusion-of-innovations]]></category>
            <category><![CDATA[think-out-of-the-box]]></category>
            <dc:creator><![CDATA[Danilo Del Fio]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 08:01:44 GMT</pubDate>
            <atom:updated>2020-11-23T08:03:07.555Z</atom:updated>
            <content:encoded><![CDATA[<p>Nel <a href="https://medium.com/p/8d0b4876db28">precedente articolo</a> abbiamo affrontato il tema della cultura, della leadership, la vulnerabilità e delle loro relazioni con la capacità Innovativa.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KDPA8TS5-7ovbLJJ04gKkg.png" /></figure><h4>Innovation Mindset</h4><p>Cerchiamo ora, di raccogliere dei tratti comuni per un mindset di tipo innovativo, il quale ci aiuterà a portare avanti l’innovazione all’interno della nostra azienda. Tali tratti dovrebbero essere:</p><ul><li><strong>Curiosità</strong>: questa è la scintilla che porta all’innovazione. Le persone curiose fanno domande, esplorano possibilità e scavano affondo. Una cultura innovativa valorizza l’apprendimento permanente. Alle persone vengono forniti, il tempo, ed il budget per lo sviluppo personale. In queste condizioni, ci aspettiamo, però, che le persone condividano le informazioni all’interno.<br> Curiosità e creatività vanno di pari passo. Le menti creative sono quelle che si trovano a loro agio a vagare e farsi domande. Leggono molto e spesso prendono qualcosa da un settore che in prima analisi sembrerebbe non correlato, e si chiedono come sarebbe ad applicarlo ad un altro.<br> Come permettiamo alle persone di coltivare le proprie curiosità? Dandogli tempo per pensare. Incoraggiamoli a prendersi del tempo, ogni settimana, per esempio, per leggere, pensare, ascoltare podcast.</li><li><strong>Incoraggiamento</strong>: Bisogna incoraggiare le persone a continuare a chiedere il perché, finché non arrivano alla radice delle cose e alle motivazioni sottostanti.<br> Le decisioni prese conoscendo i dati che ci sono dietro, sono meno rischiose, quindi bisognerebbe fare in modo che le persone abbiano accesso ai dati.</li><li><strong>Empatia</strong>: L’innovazione va affrontata da una prospettiva incentrata sulle persone o sull’utente. Non bisogna fare affidamento solo su quello che pensa il nostro staff o il CDA e bisogna cercare di scoprire di cosa hanno veramente bisogno le persone, facendo domande, sondaggi e cercando di capire in che ambiente si muovono.</li><li><strong>Inclusività</strong>: <strong>La diversità cognitiva è essenziale per innovare</strong>. Ognuno ha diversi punti di forza, prospettive ed esperienze e nessuna vale più delle altre, ma insieme si può formare qualcosa di diverso, di creativo, che senza l’inclusività non si avrebbe modo di creare.<br> Bisogna evitare il “pensiero di gruppo”. Un flusso continuo di nuove prospettive stimolano idee e approcci innovativi.</li><li><strong>Collaborazione</strong>: Bisognerebbe incoraggiare i progetti interfunzionali in modo che le persone si possano esercitare a lavorare in modo orizzontale. Bisognerebbe fare in modo che ogni dipartimento, condivida ciò su cui sta lavorando ed in che modo ciò impatterà sugli obiettivi strategici e sulle esperienze delle persone.</li><li><strong>Visione comune</strong>: Dovremmo fare in modo che le persone si stringano intorno ad una causa comune. I leader devono saper spiegare perché sia necessaria l’innovazione, in modo di non perdere di vista il bersaglio più grande, ovvero, gli obiettivi organizzativi e valore delle persone. Bisogna aiutare le persone ad avere un’idea chiara delle priorità (a lungo termine).</li><li><strong>Coraggio</strong>: L’innovazione non è semplice, ma niente di buono lo è mai. Bisognerebbe:</li></ul><ol><li>Avere coraggio di pensare oltre le norme accettate e la saggezza convenzionale</li><li>Coraggio nel mettere in discussione lo status quo che afferma “abbiamo sempre fatto così”</li><li>Coraggio nel porre domande difficili e scomode.</li><li>Coraggio nell’essere vulnerabili ed accettare il cambiamento.</li><li>Coraggio nel non cercare di andare sempre sul sicuro e abbracciare l’ignoto con una nuova strategia, processo, prodotto…</li></ol><blockquote>L’innovazione fa paura perché puoi fallire.</blockquote><p>Bisogna supportare le persone che siano abbastanza coraggiose da rischiare il fallimento, perché se non lo facciamo, rischiamo di far diventare l’azienda stagnante in cui nulla di significativo migliorerà o cambierà mai.</p><p>Cosa possiamo fare, per agevolare i processi innovativi?</p><ul><li><strong>Sperimentare</strong>: Bisognerebbe provare con dei piccoli progetti pilota. In queste piccole zone sicure si può sperimentare il fallimento insieme. Poi facciamo delle retrospective così da imparare dagli errori e tenere ciò che di buono è venuto fuori.</li><li><strong>Agilità</strong>: Non si possono aspettare 3 riunioni del CDA per ottenere l’approvazione di una idea innovativa (<strong>c’è un detto che dice che è meglio chiedere scusa che il permesso</strong>). La cultura e la governance devono essere abbastanza agili per rispondere rapidamente.</li><li><strong>Impegno a lungo termine per l’innovazione</strong>: Le persone devono sapere che l’innovazione non è l’ultima fissazione dei leader. L’innovazione deve essere incorporata nella cultura organizzativa. Il miglior modo per iniziare è intraprendere piccoli miglioramenti graduali.<br> Bisognerebbe riuscire a praticare le seguenti fasi:</li></ul><ol><li>Ideazione</li><li>Pianificazione</li><li>Test</li><li>Messa a punto</li><li>Riprova</li></ol><p>In questo modo si riesce a mettere a punto una cultura ed i processi che supporteranno i processi di innovazione più grandi.</p><h3>Diffusione dell’innovazione</h3><p>La ricerca sulla diffusione dell’innovazione esamina come le idee vengano diffuse tra gruppi di persone. La diffusione si concentra sulle condizioni che aumentano, o diminuiscono, la probabilità che una innovazione, una nuova idea, un prodotto o pratica, venga adottata dai membri di una data cultura.</p><blockquote><strong>Teoria del flusso di comunicazione a due livelli</strong>: “non esiste un flusso costante di informazioni che va dai media ai destinatari finali, ma tale comunicazione passa dai media ai cosiddetti <strong>Opinion Leader,</strong> ovvero gli individui più sensibili verso certe informazioni e più influenti verso un certo gruppo sociale, poi a loro volta loro veicoleranno le informazioni verso il gruppo sociale di appartenenza o di riferimento.</blockquote><p>Le innovazioni non vengono adottate da tutti gli individui contemporaneamente, invece le persone tendono ad adottarle in una sequenza temporale e possono essere classificati in categorie di cosiddetti adottanti, in base al tempo impiegato per iniziare ad utilizzare la nuova idea.</p><p>È per questo motivo che diventa fondamentale saper individuare la categoria di appartenenza degli individui.</p><p>L’adozione di una innovazione o di una nuova idea è causata dall’interazione umana attraverso reti interpersonali. Se il primo utilizzatore di una innovazione ne discute con 2 persone di un dato sistema sociale e queste due diventano degli utilizzatori che, a loro volta, trasmetteranno l’innovazione ad altre 2 persone, e così via, la distribuzione risultante segue un’espansione binomiale. Tale espansione raggiungerà un suo livello massimo, per poi scendere, seguendo una distribuzione a campana (o gaussiana).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*CLLGCqnc2zd4u4TvkfEw3g.jpeg" /></figure><p>La classificazione che andremo a fare sarà relativa, ovvero una persona avrà più o meno “innovatività” rispetto ad un’altra nello stesso sistema sociale:</p><p>I gruppi sono:</p><ul><li><strong>Innovatori</strong>: Rappresentano circa il 2.5% e sono quelli desiderosi di provare nuove idee al punto da farle diventare ossessioni. Di solito gli innovatori hanno notevoli risorse finanziarie e la capacità di capire e applicare complesse conoscenze tecniche. <br><em>Altre persone possono considerare l’innovatore come avventato ed audace, mentre è proprio l’assunzione di rischi pericolosi che ha un valore per questo tipo di persone.</em> Un innovatore è anche disposto ad accettare una battuta di arresto, quando le nuove idee si rivelano infruttuose.</li><li><strong>Early Adopters</strong>: Rappresentano circa il 13.5% e sono persone che tendono ad essere integrate nel sistema sociale locale, più degli innovatori. Di solito gli early adopters hanno un maggior grado di leadership di opinione. Danno dei consigli ed informazioni richieste da altri utenti sull’innovazione. Gli agenti del cambiamento (che sono le persone che sostengono lo sforzo dell’organizzazione nel realizzare il cambiamento desiderato, superando le resistenze e gestendo i conflitti in modo efficace ed efficiente), cercheranno gli early adopters per accelerare il processo di diffusione.</li><li><strong>Early Majority</strong>: Rappresentano il 34% e sono coloro che adotteranno nuove idee appena prima della media. Interagiscono spesso coi colleghi, ma di solito non occupano posizioni di leadership.</li><li><strong>Late Majority</strong>: Rappresentano il 34% e sono un po’ scettici. Spesso adottano nuove idee solo per esigenze economiche ed in risposta alle crescenti pressioni sociali. Sono cauti nei riguardi delle innovazioni e sono riluttanti ad adottarle finché la maggior parte degli altri non lo farà per prima.</li><li><strong>I laggards (ritardatari)</strong>: Rappresentano il 16% e sono quelli fissati col passato e tutte le decisioni devono essere prese in termini di generazioni precedenti. Di solito tali persone interagiscono tra di loro. Quando un Laggard adotterà un’innovazione probabilmente sarà già superata o sostituita.</li></ul><h4>Conclusioni</h4><p>Nel presente articolo abbiamo cercato di capire il Mindset necessario per Innovare (o abbiamo sottolineato alcuni tratti di esso), e la curva che rappresenta la diffusione dell’innovazione all’interno di un determinato sistema culturale.<br>Anche qui sarà molto importante il ruolo del “leader d’opinione” che, guidati più degli altri dalla curiosità e dall’interesse per le nuove idee e innovazioni, saranno anche coloro che veicoleranno le informazioni verso il loro gruppo culturale di appartenenza.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b17b23c8a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Innoviamo il modo di Innovare]]></title>
            <link>https://ddelfio.medium.com/innoviamo-il-modo-di-innovare-8d0b4876db28?source=rss-e589e2d93a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d0b4876db28</guid>
            <category><![CDATA[company-culture]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[start-with-why]]></category>
            <dc:creator><![CDATA[Danilo Del Fio]]></dc:creator>
            <pubDate>Mon, 16 Nov 2020 08:01:56 GMT</pubDate>
            <atom:updated>2024-04-16T08:10:53.951Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Riportiamo le persone al centro del processo di Innovazione.</em></strong></p><p>Questo articolo è il <a href="https://ddelfio.medium.com/innovation-mindset-e-diffusione-dellinnovazione-3b17b23c8a2">primo di due</a>, in cui volevo analizzare e discutere dell’Innovazione, della sua relazione stretta con la Leadership e la cultura aziendale, per poi parlare, nel secondo articolo, del Mindset necessario per prendere la strada verso un’innovazione a lungo termine ed analizzare “la diffusione dell’innovazione”, per capire meglio a chi bisogna parlare e coinvolgere per primo se vogliamo diffondere nuove idee e innovazioni.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eEu1IG5nILNgIDVQ.jpg" /></figure><h4>Introduzione</h4><p>I leader che ci dovrebbero guidare verso un vero processo innovativo, hanno idea di cosa significhi veramente e di cosa richieda la vera innovazione?</p><blockquote>Lo chiedo per un amico!</blockquote><p>Cominciamo a dire ciò che non è l’innovazione. L’innovazione non è un qualcosa che puoi calendarizzare e dove butti giù una lista di cose da fare.<br>L’innovazione richiede una chiarezza costante di intenti e, soprattutto, <strong>richiede una cultura della fiducia</strong>.</p><p>E’ da questo assunto che partiremo per analizzare a fondo l’innovazione, partendo dalle persone, perché questo è l’unico e solo modo per innovare veramente.</p><blockquote><strong>“L’innovazione richiede leadership”</strong></blockquote><h4>Definiamo l’innovazione</h4><p>Per prima cosa cerchiamo di capire che l’innovazione non è certo l’ultima trovata tecnologica o semplicemente un’app mobile di tendenza.</p><blockquote>L’innovazione è un processo, non un prodotto!</blockquote><p>Tramite l’innovazione cerchiamo di risolvere vecchi problemi in modi nuovi e più efficaci.</p><h4>Il ruolo del leader</h4><p>I nostri famigerati leader devono capire che il loro ruolo è quello di supportare e sviluppare la cultura organizzativa che sia di aiuto alla risoluzione creativa dei problemi, <strong><em>soprattutto ora che la famigerata AI, ci sostituirà, sempre di più, nei lavori ripetitivi e time-consuming</em></strong>.</p><p>Si tratta di supportare una sorta di “economia umana”, che, tramite la fiducia, empatia e apprezzamento, possa guidare l’assunzione di rischi <strong>intenzionale</strong> e <strong>ben intenzionata</strong>.</p><p>Il leader, in qualità di persona influente, dovrà capire se la propria leadership e la cultura della propria azienda alimentano l’innovazione o meno.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jqj1kQsriiJsFceAwHWU0g.png" /></figure><p>L’innovazione non nasce da un giorno ad un altro, essa richiede un ambiente sano, del tempo, una visone e intuizione. <strong>Possiamo paragonare l’innovazione a delle piante di un giardino. Senza un giusto ambiente e senza buone condizioni al contorno, le piante muoiono.</strong></p><p>Le aziende capaci di vera innovazione possiedono anche culture che forniscono una visione condivisa, incoraggiano la risoluzione creativa dei problemi e <strong>forniscono alle persone tutte le risorse necessarie, <em>compreso il tempo</em>, in modo che si possa sperimentare in modo costruttivo</strong>.</p><blockquote>“L’innovazione è fondamentalmente un processo di scoperta…. Il ruolo della del leader è di indirizzare le altre persone su un percorso, non di cortocircuitarlo saltando a una conclusione fin dall’inizio”</blockquote><blockquote>Nathan Furr e Jeffrey Dyer</blockquote><p>I leader, quando si tratta di innovazione, devono prima comprendere la cultura della propria azienda o organizzazione, per capire se rispecchia il proprio credo e poi cercare di diffondere la cultura su coloro che guidano.</p><blockquote>Quindi:<br>La cultura viene fuori dall’azienda e questa influisce su ogni aspetto della sua vita, dalla produttività all’implementazione di un processo decisionale che sia di supporto ad essa.</blockquote><blockquote>A partire dai processi di recruiting e assunzione di nuove persone, la cultura diventa, quindi, un punto di riferimento per ogni aspetto dell’azienda e stabilisce gli standard di comportamento e successo.</blockquote><h4>La fiducia come traino per l’innovazione</h4><p>Quanto più distanti sono gli alti dirigenti e le fila dei ranghi, tanto più è probabile che emerga un ambiente di sfiducia tra loro …</p><blockquote><strong>In un ambiente di sfiducia, l’innovazione è impossibile.</strong></blockquote><p><strong>Per rovesciare una cultura di sfiducia, i leader devono ridurre il divario tra sé stessi e gli altri collaboratori</strong>, mantenendo dei comportamenti atti a collegare in modo concreto, l’attuale cultura aziendale, il cambiamento desiderato e la continuità tra i due.</p><p>Il posto di lavoro richiede, quindi, un’elevata fiducia organizzativa che sarà il traino per una importante responsabilizzazione dei dipendenti, perché:</p><blockquote><strong>Sia la fiducia che la sfiducia sono sia circolari che rafforzanti.</strong></blockquote><p>Il livello di responsabilizzazione dei dipendenti diventa, a questo punto, un potente indicatore del successo di un’organizzazione nel creare o sostenere la fiducia.</p><p>Sebbene i lavoratori siano sempre stati apprezzati per le loro capacità tecniche, esse verranno, sempre con maggiore frequenza, sostituite dalle macchine.</p><p>Ciò che non potrà essere sostituito, sono i “tratti essenziali che non possono essere e non saranno mai programmati nel software, come <strong>creatività, passione, carattere e spirito di collaborazione</strong> — <strong>la loro umanità in altre parole</strong>”.</p><blockquote>In un’economia umana, la fiducia diventa importante e trainante.</blockquote><h4>Il Potere della vulnerabilità</h4><p>Un altro aspetto, spesso messo in secondo piano, ma che ricopre un ruolo importante nella relazione stretta tra leadership e innovazione è la vulnerabilità.<br>Grazie ad un famoso TED Talk del 2010, intitolato “Potere della vulnerabilità”, la ricercatrice Brene Brown, famosa per le sue ricerche sulla vergogna e la vulnerabilità, ci dice che, sebbene la vulnerabilità e la vergogna possano non sembrare rilevanti per una discussione sulla leadership e l’innovazione, in realtà :</p><blockquote>La vulnerabilità è il luogo di nascita di innovazione, creatività e cambiamento.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fmi9Vonr1X_k%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dmi9Vonr1X_k&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fmi9Vonr1X_k%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4cce3c8cb9b7200ce5b300dc38dcb53c/href">https://medium.com/media/4cce3c8cb9b7200ce5b300dc38dcb53c/href</a></iframe><p>Questo perché<strong>, creare è fare qualcosa che non è mai esistito prima.</strong> Non c’è niente di più vulnerabile di quello, perché l’adattabilità al cambiamento è tutta una questione di vulnerabilità.</p><blockquote>L’innovazione nasce dal coraggio di abbracciare l’incertezza e soprattutto farsi una ragione del fatto che potremmo creare qualcosa che non funzionerà.</blockquote><p><strong>L’innovazione non è per i deboli di cuore</strong>. Tuttavia, per prosperare all’interno delle aziende richiede tempo, spazio e una cultura adeguata.</p><h4>Conoscenza, fiducia e potere</h4><p>Nel suo libro <a href="https://www.amazon.it/Leadership-Triad-Knowledge-Trust-English-ebook/dp/B001LRPDDU/ref=sr_1_2?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&amp;dchild=1&amp;keywords=The+Leadership+Triad&amp;qid=1604909698&amp;sr=8-2">The Leadership Triad</a>, Dale Zand stabilisce come la <strong>conoscenza</strong>, la <strong>fiducia</strong> e il <strong>potere</strong> formano un sistema strettamente accoppiato che spinge un’azienda al successo o ne accelera il declino.</p><p>Zand riassume queste relazioni in questo modo:</p><p>Quando i leader possiedono e utilizzano conoscenze pertinenti, le persone si fidano di loro e concedono loro potere, perché hanno fiducia che i leader sappiano cosa stanno facendo. Quando le persone si fidano dei loro leader, saranno incentivati ad utilizzare al meglio anche la proprie conoscenze e accettano l’uso del potere da parte dei leader. In questo modo i leader riescono a guidare le persone verso risultati superiori, utilizzando tutto quel bagaglio di conoscenza che tutti metteranno a disposizione.</p><p>Se combinato con la comprensione di <strong>Brene Brown</strong> della vulnerabilità come “luogo di nascita di innovazione, creatività e cambiamento”, <strong>la fiducia è imperativa</strong> in qualsiasi azienda che fa dell’innovazione il proprio credo.</p><h4>A proposito di fiducia</h4><blockquote>Le aziende ad alta fiducia richiedono leader ad alta fiducia.</blockquote><p>I leader ad alta fiducia “distribuiscono il potere a persone competenti e le incoraggiano a fare lo stesso”. Questa fiducia consente quindi un comportamento cooperativo senza dover ricorrere a misurazioni e monitoraggio che richiedono tempo. Lo stesso vale per la sfiducia: se l’azienda o il management non ripongono fiducia nelle persone, cercheranno sempre nuovi modi per monitorare e controllare le persone e questo comportamento diventa un boomerang, diminuendo la produttività e la capacità di tutta l’azienda di innovare.</p><blockquote>La fiducia è circolare e si rafforza</blockquote><p>I leader che mirano ad aumentare la fiducia nell’azienda devono mostrare deliberatamente un comportamento fiducioso, per esempio, abbassando il livello di approvazione di un report. Ciò indica fiducia nei subordinati e avvia un processo di feedback positivo. <br>Il vantaggio per obiettivi, mission e valori chiari e ben allineati è questo: nelle aziende ad alta fiducia i team collaborano a vantaggio dell’azienda stessa, perché si danno e ricevono fiducia l’uno dall’altro.</p><h4>La relazione tra rischio e fiducia</h4><blockquote>Le persone tendono a rischiare quando sentono la fiducia intorno a loro e non si sentono giudicati per questo.</blockquote><p>I risultati che arriveranno saranno direttamente collegati col livello di fiducia percepito e al rischio che le persone decidono di sfidare.</p><h4>Il ruolo dell’intento e della chiarezza</h4><p>La chiarezza degli obiettivi è essenziale per una cultura dell’innovazione. È solo con una chiara dichiarazione di intenti che un’azienda può sviluppare una cultura della fiducia elevata e creare il tempo e lo spazio intellettuale affinché i dipendenti si assumano i rischi inerenti all’innovazione.</p><blockquote><strong>La vera innovazione è nascosta nella cultura diffusa, non inseguendo i numeri.</strong></blockquote><p><strong>I numeri saranno una piacevole conseguenza della nostra cultura dell’innovazione e non tarderanno ad arrivare.</strong></p><p>Purtroppo, sebbene molti CEO parlino dell’innovazione come una delle strategie chiave della loro azienda, solo pochi di loro la mettono in agenda per lavorarci veramente.</p><p>Il problema è che l’innovazione porta dei risultati (e non sempre scontati), a lungo termine, mentre le aziende viaggiano ormai con obiettivi e KPI raggiungibili sempre in minor tempo.</p><p>Un altro problema è che benché si affermi che in azienda si dica che è possibile commettere errori, perché essi aiutano a crescere, in realtà le persone che ci lavorano, spesso, non hanno questa percezione e questo crea un profondo scollamento tra le varie anime dell’azienda.</p><h4>Partire dal perché</h4><p>In <a href="https://www.amazon.it/Start-Why-Leaders-Inspire-Everyone/dp/1591846447/ref=sr_1_1?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&amp;dchild=1&amp;keywords=start+with+why&amp;qid=1604874310&amp;sr=8-1"><strong>Start With Why</strong></a>, Simon Sinek sottolinea l’importanza della chiarezza di intenti per aumentare sia la certezza che il coinvolgimento dei dipendenti.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F_CBLekm9Xx0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D_CBLekm9Xx0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F_CBLekm9Xx0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e7afb34ccc9852dc7235aa48bb264b8/href">https://medium.com/media/2e7afb34ccc9852dc7235aa48bb264b8/href</a></iframe><p>Dei messaggi coerenti e l’allineamento organizzativo sono essenziali per fornire un intento chiaro, che porta a una maggiore fiducia in tutta l’organizzazione. <br>Sinek definisce questa chiarezza di intenti come il ​​”PERCHÉ” dell’azienda. Egli concettualizza le organizzazioni come costituite da un ‘PERCHÉ’, un ‘COME’ e un ‘COSA’ (the golden circle). <br>Nelle organizzazioni efficaci e innovative il ‘PERCHE’ dell’azienda guida il ‘COME’ (processi), che a sua volta da vita al ‘COSA’ (prodotti, servizi, o risultati), quindi è fondamentale per le aziende non solo identificare il loro scopo principale, ma allineare i loro processi e prodotti o risultati con tale scopo principale. Nelle aziende allineate con obiettivi e intenti chiari, è più probabile che i leader comprendano gli obiettivi organizzativi generali, che potranno, quindi, essere convogliati verso tutte le altre persone dell’azienda. Questo apre le possibilità di innovazione.</p><h4>Fiducia reciproca</h4><p>Quando i leader si fidano dei subordinati (non amo la parola subordinati, ma è solo per chiarire il punto), per comprendere gli scopi e gli obiettivi dell’organizzazione, è più probabile che accettino il rischio dell’innovazione. <br>Quando i subordinati si fidano dei leader, permetteranno il fallimento dello stesso, con una buona intenzione, inerente al tentativo di nuovi modi di risolvere un problema, e questo aumenterà la probabilità che anche loro tentino soluzioni innovative. <br>Al contrario, come osserva Sinek, “quando il PERCHÉ è assente, si produce uno squilibrio e le manipolazioni prosperano. E quando le manipolazioni prosperano, aumenta l’incertezza” e,</p><blockquote><strong>Quando l’incertezza aumenta, il rischio percepito aumenta e la fiducia diminuisce.</strong></blockquote><h4>Un sistema operativo umano</h4><p>L’innovazione richiede tempo, spazio, studio intenso e visione sostenuta. Essere veramente innovativi significa creare qualcosa di completamente nuovo, che richiede rischi. Per assumersi i rischi richiesti dall’innovazione, la cultura organizzativa deve incoraggiare un’attenta assunzione di rischi attraverso la fiducia e l’empatia.</p><p><strong><em>La valutazione della competenza di un leader è direttamente correlata alla quantità di fiducia concessa ai subordinati.</em></strong></p><blockquote>Questa valutazione abilita un sistema operativo umano efficace attraverso la fiducia, l’empatia e la burocrazia ridotta o disabilita un’organizzazione attraverso la sfiducia, maggiori misure di controllo, maggiore paura e vulnerabilità percepita.</blockquote><p>In <a href="https://www.amazon.it/Leaders-Eat-Last-Together-Others/dp/0670923176/ref=sr_1_1?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&amp;crid=3OACHI3LCUL9F&amp;dchild=1&amp;keywords=leaders+eat+last&amp;qid=1604874367&amp;sprefix=leaders+eat+%2Caps%2C184&amp;sr=8-1"><strong>Leaders Eat Last</strong></a>, Sinek affronta le relazioni tra empatia, fiducia ed efficacia organizzativa da una prospettiva di leadership. Sinek sviluppa un concetto di <strong>“cerchio della sicurezza”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p6aH2nkgTKims6ag.png" /><figcaption>Image from <a href="https://blog.thehub.io/blog/how-big-is-your-startups-circle-of-trust/">http://blog.thehub.io</a></figcaption></figure><p>All’interno del cerchio, le persone sono libere dai pericoli della vita organizzativa moderna: intimidazione, umiliazione, isolamento e rifiuto, tra le altre cose. Sinek afferma che il compito principale di un leader è quello di liberare una cultura dai pericoli all’interno dell’organizzazione in modo che l’organizzazione sia in grado di affrontare meglio i pericoli dall’esterno dell’organizzazione.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FlmyZMtPVodo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DlmyZMtPVodo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FlmyZMtPVodo%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/40e6e945bd06086863a20712c332815d/href">https://medium.com/media/40e6e945bd06086863a20712c332815d/href</a></iframe><p>Un passaggio del suo speech, mi ha colpito in modo particolare. <br>La differenza tra la cultura che vige nelle forze armate e quella che di solito è portata avanti nelle aziende è che, mentre ogni soldato è pronto a sacrificarsi per salvare i propri compagni, nelle aziende accade il contrario, ovvero alcuni “leader” (realtà bisognerebbe fare una distinzione tra un leader e chi detiene l’autorità), sacrificano le persone che guidano per proteggere i propri interessi personali.</p><p>Come nota Sinek, la fiducia interna “crea un ambiente per il libero scambio di informazioni, che è fondamentale per guidare l’innovazione”.<br>Un sistema operativo umano, abilitato dalle valute della fiducia e dell’empatia crea una cultura capace di innovazione. Il sistema operativo umano di un’organizzazione, proprio come il sistema operativo di un computer, deve essere costruito, monitorato, mantenuto e regolato per garantire che continui a funzionare come progettato e previsto. Il ruolo dei leader organizzativi è quello di svolgere questi compiti, tenendo costantemente presente che</p><blockquote>“per guadagnare la fiducia delle persone, i leader devono prima trattarli come persone”.</blockquote><p>Le persone devono essere competenti e sicure di sé. Una volta che le persone competenti e fiduciose comprendono la visione e l’intento dell’organizzazione, è responsabilità della leadership “fare un passo indietro e avere fiducia che le loro persone sappiano cosa stanno facendo e faranno ciò che deve essere fatto”. <br>Nelle organizzazioni con forti sistemi operativi umani e pochi meccanismi di controllo, le persone possono infrangere le regole, ma infrangeranno le regole in linea con la missione dell’organizzazione, l’intento della leadership e perché è la cosa giusta da fare per le persone, non per il loro vantaggio personale. Ciò rafforza l’idea che “la nostra fiducia nel fare ciò che è giusto è determinata dalla fiducia che ci sentiamo dai nostri leader”.</p><h4>Conclusioni</h4><p>L’innovazione richiede tempo, visione e comprensione all’interno di una cultura che fornisce una visione sostenuta; incoraggia la risoluzione creativa dei problemi attraverso l’accettazione di rischi deliberati, fiducia ed empatia; e rende le risorse, compreso il tempo, disponibili per la sperimentazione.</p><blockquote>Ricorda: “La vulnerabilità è il luogo di nascita di innovazione, creatività e cambiamento.”</blockquote><p>L’innovazione nasce dal coraggio di abbracciare l’incertezza che una nuova creazione potrebbe non funzionare, il che richiede l’assunzione di rischi. L’innovazione non è per i deboli di cuore. Richiede che le persone sono disposti a correre dei rischi, perché si sentono di avere la fiducia dei propri leader, ed i leader, a loro volta, sono disposti a rischiare tempo, spazio e risorse, perché si fidano che i loro subordinati capiscano gli obiettivi e l’intento di l’organizzazione. <br>La volontà di assumersi i rischi necessari per innovare è impossibile senza una cultura organizzativa abilitata da un sistema operativo umano basato sull’empatia e sulla fiducia.</p><blockquote><strong>Inizia da te</strong>.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d0b4876db28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A proposito di Leadership: come creare un team senza limiti]]></title>
            <link>https://ddelfio.medium.com/a-proposito-di-leadership-come-creare-un-team-senza-limiti-6b4a2b127e87?source=rss-e589e2d93a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b4a2b127e87</guid>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[unstoppableteams]]></category>
            <category><![CDATA[care]]></category>
            <category><![CDATA[team-building]]></category>
            <category><![CDATA[starttwithwhy]]></category>
            <dc:creator><![CDATA[Danilo Del Fio]]></dc:creator>
            <pubDate>Mon, 05 Oct 2020 07:25:38 GMT</pubDate>
            <atom:updated>2020-10-05T07:25:38.914Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lk_BdCHKPnrfxJqYiwpTfQ.jpeg" /><figcaption>why?</figcaption></figure><h3>Introduzione</h3><p>Parlare di “leadership”, di “soft skill” e “intelligenza emotiva” è diventato ormai lo sport nazionale. Ovunque ti giri c’è qualcuno che ti vuole spiegare la differenza tra boss e leader, che bisogna essere se stessi e che le differenze in azienda sono ben accette, perché “sono una ricchezza”.</p><p>Per creare un team di successo, c’è bisogno di un Leader con una visione. Tale visione dovrà veicolare ed attrarre persone che ci si riconoscono e che riusciranno a trasformare in azione.</p><blockquote>Martin Luther King disse “I have a dream” ed ha attratto persone che si riconoscevano in quel sogno e che hanno agito per far si che i diritti dei neri venissero riconosciuti.</blockquote><p>Sembra un’eresia paragonare un uomo che ha cambiato la storia americana, con la gestione di un’azienda ed in generale di un team, ma ci sono parecchi elementi in comune che, se avete la pazienza di seguirmi, cercherò di chiarire.</p><blockquote><strong>Start with Why</strong> dice <a href="https://twitter.com/simonsinek">Simon Sinek</a>.</blockquote><p>Questa è la chiave in tutto ciò che facciamo e portiamo avanti, sia esso legato al lavoro, agli hobby, alla vita privata, o alla famiglia.</p><p>Ogni azione compiuta, ogni decisione, ogni scelta, parte sempre dal nostro modo di essere, di vedere il mondo e dalle nostre precedenti esperienze.</p><h3>Why</h3><blockquote>Se avessi una mia azienda, non assumerei le persone che hanno bisogno di un lavoro, ma assumerei quelle che credono a ciò in cui credo io.</blockquote><p>L’obiettivo deve essere, quindi, non quello di assumere le persone più brave, ma quelle più adatte, perché solo in questo modo troverò persone leali e che si spendono veramente per raggiungere gli obiettivi prefissati e la cosa più importante è che non lo faranno perché gli viene richiesto, ma per loro stessi, perché sono guidati dallo stesso <strong><em>WHY</em></strong> che guida le mie scelte.</p><p>Sembra utopia, ma se ci riflettiamo veramente, il nostro cervello funziona in questo modo. Facciamo più volentieri le cose che decidiamo di fare, o quelle siamo costretti?</p><p>La risposta è tanto banale, quanto importante, perché in realtà i nostri comportamenti quotidiani, ciò che chiamiamo “abitudini”, sono largamente guidate da qualcosa che ha poco a che fare con ciò che vogliamo veramente e molto più da “bisogni effimeri” ed idee che non sono nemmeno nostre.</p><h4>La teoria del tutto</h4><p>Dopo quanto accennato nei paragrafi precedenti, vi potreste chiedere cosa c’entra la creazione, o far parte, di un team senza limiti con il proprio personale “perché”.</p><p>Questo mio associare due mondi che sembrano non avere molte affinità, in realtà parte dal presupposto che i nostri valori, le nostre credenze ed il perché facciamo le cose che facciamo, o pensiamo in un determinato modo, è strettamente connesso alle affinità con le persone con cui collaboriamo che, più ci “somiglieranno” e più sarà facile mettere in piedi una collaborazione proficua.</p><p>Questo significa che se tra i valori di un nuovo collaboratore, c’è soltanto la parte economica, mentre noi crediamo fermamente in ciò che stiamo facendo, non si riuscirà mai a creare un team coeso, un team il cui l’unico obiettivo è creare qualcosa di valore, il cui valore è “riconosciuto” da tutti allo stesso modo, quindi il primo passo da fare per creare un team con la T maiuscola, è scegliere i propri collaboratori non solo considerando le loro conoscenze tecniche, il livello di istruzione o per il fatto che il suo stipendio “rientrerebbe nei parametri stabiliti dall’azienda”, ma soprattutto, dobbiamo sceglierli sulla base delle attitudini.</p><p>La mia teoria del tutto, quindi, si basa sulla consapevolezza e sull’assunto che le persone non daranno il meglio solo perché gli viene detto di farlo, anzi, spesso il risultato è esattamente l’opposto, perché (ho assistito in prima persona a comportamenti del genere), se le persone non si sentono a loro agio con ciò che le viene detto di fare, o rispetto al modo con cui viene a loro detto, o anche semplicemente, se le persone ritengono che tu non sia una persona valida da seguire (da qui nasce l’esigenza di una vera leadership), allora sarà impossibile che ciò che gli chiedi di fare verrà fatto nel “modo migliore possibile”.</p><h4>Leadership</h4><p>Dalle motivazioni personali, dai nostri valori, e da ciò che ci smuove veramente, siamo arrivati a parlare di Leadership che, in effetti, rappresenta una prerogativa e un’esigenza per chiunque voglia guidare un gruppo di persone al successo.</p><blockquote>Ho parlato consapevolmente di gruppo, perché non tutti i gruppi di persone, messi insieme, costituiscono un team e ancora più difficilmente un team si successo.</blockquote><p>La domanda nasce spontanea, quindi. Come possiamo trasformare un gruppo di persone in un team e fare in modo che ognuno di loro dia il massimo per il raggiungimento di un obiettivo comune?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/0*Yg6fzcUg5SQvWoWt.jpeg" /></figure><p>Alden Mills, nel suo libro “Unstoppable Teams”, ci fornisce la sua ricetta per fare in modo che un gruppo di persone si senta parte di qualcosa di più grande, che fornisca ad ogni membro del team la giusta importanza e il giusto coinvolgimento da fargli capire che ogni persona in un team è importante e che non si lascia indietro nessuno (Alden Mill, tra l’altro era un Navy Seal).</p><p>La chiave di tutto nasce dalla nostra disponibilità ad impegnarci a prenderci cura degli altri.</p><p>Sembra banale come concetto, ma ho assistito a situazioni imbarazzanti in cui un “capo” ha inviato delle email, che non fatico a definire minacciose, ai membri del team, in cui gli intimava di lavorare nel weekend, perché bisognava affrontare un problema che era venuto fuori e che bisognava risolvere velocemente.</p><p>Ovviamente, le email sortirono l’effetto opposto. Le persone si sono sentite minacciate e considerate uno strumento per perseguire i propri interessi personali. La cosa che più mi fece drizzare i pochi capelli che ho in testa, è che un Manager di un certo livello non può non sapere che mettere l’ansia addosso alle persone non è una strategia.</p><p>Tornando al libro. L’autore ci dice:<br>Immagina per un momento di essere circondato da persone che non ti lasceranno fallire.</p><blockquote>Quando vedi un ostacolo, loro vedono un’opportunità. <br>Quando hai paura, loro ti supportano. <br>Quando sei stanco, lavorano instancabilmente. <br>Quando sei incerto, ti rassicurano.</blockquote><p>Sinceramente questo è il leader che vorrei essere, una persona circondata da persone, con le proprie paure, le proprie debolezze, con i propri punti di forza e le proprie sicurezze.</p><p>Non aver paura di sbagliare, avere la forza di dire “non ho capito”, poter alzare la mano durante una riunione per dire che la si vede in modo diverso, questo è il team in cui mi vorrei sempre trovare e l’ambiente che vorrei creare per le persone che ho la fortuna di guidare.</p><h4>CARE</h4><blockquote>“No one cares how much you know until they know how much you care.” <br>— President Teddy Roosevelt</blockquote><p>Attraverso un semplice, ma quantomai azzeccato acronimo, Alden Mills ci suggerisce quali siano i quattro pilastri per creare un Team Inarrestabile.</p><ul><li><strong>Connect</strong> : creare fiducia.</li><li><strong>Achieve</strong> : definire una direzione.</li><li><strong>Respect</strong> : creare un ambiente in cui ognuno possa dare il proprio contributo.</li><li><strong>Empower</strong> : fare in modo che ogni persona si senta proprietaria.</li></ul><p>Se il tuo team coinvolge persone, quindi, dovrai costruire relazioni in cui la fiducia, la direzione, il contributo e la proprietà sono gli obiettivi.</p><p>I gruppi nei quali riusciamo a mettere in atto questi obiettivi in modo proficuo, saranno quelli che diventeranno Team Inarrestabili, perché saranno dieci volte più potenti di un gruppo disconnesso di individui che <em>tentano di fare il proprio lavoro durante la giornata</em>.</p><h4>I fattori per la creazione e la guida di un team</h4><p>Per mettere in atto i quattro pilastri visti sopra, bisogna considerare quali siano i fattori che ne determinano l’attuazione, perché ci aiutano a capire, come accennavo in precedenza, perché le persone fanno ciò che fanno ed il come.</p><ul><li>Ti sei mai chiesto come mai, in modo cosciente, decidi di fare una cosa, oppure di non farla?</li><li>Hai mai pensato che non decidere, o lasciare andare le cose, perché “intanto non ci posso fare nulla”, rappresenti una decisione lo stesso?</li></ul><p>La <strong><em>persistenza</em></strong> è ciò che governa il gioco in cui siamo chiamati a giocare e capire quali siano le azioni da intraprendere per fare in modo che le cose accadano veramente, fa tutta la differenza del mondo.</p><p>Partiamo dall’assunto che ogni azione è il risultato di due fattori:</p><ul><li>pensieri</li><li>sentimenti (ovvero quello che sento, che percepisco)</li></ul><blockquote>Questo significa che quello a cui pensi e come ti senti, sono i principali fattori che decidono quale comando vuoi dare al tuo corpo.</blockquote><p>Ovviamente, non abbiamo solo fattori attivanti verso il raggiungimento degli obiettivi, ma è presente anche una “resistenza” che può rallentare o bloccare una nostra azione.</p><p>Per esempio, se volessi giocare a Basket nell’NBA e lo voglio così fortemente da impegnarmi tutti i giorni a raggiungere l’obiettivo, non posso non fare i conti con la mia altezza ed età. Questo non significa che non mi debba impegnare o fare di tutto per raggiungere un obiettivo, perché “ho la scusa” per giustificare il fatto che probabilmente non lo raggiungerò, ma che alcuni obiettivi possono essere irraggiungibili per alcune persone (la base della definizione di un obiettivo è proprio che sia raggiungibile, infatti), mentre altri richiedono solo un po’ più di sforzo.</p><blockquote>Il problema è la battaglia che si svolge nella tua testa, la battaglia tra “posso” e “non posso”.</blockquote><p>I tuoi sentimenti possono influenzare il modo in cui pensi, in particolare quanto tieni a qualcosa.</p><p>Quanto detto prima riguardo ai pilastri “c.a.r.e.”, quindi, essi assumono tanta più importanza quanto più ciò che desideri fare sia importante per te e questo farà si che l’azione avrà la meglio su qualunque pensiero negativo al riguardo.<br>Quello che succede è che molti hanno dimenticato perché si preoccupano, e quando ciò accade smettono di osare e</p><blockquote>Smettono di dare tutto ciò che hanno.</blockquote><p>Quindi, quale è la soluzione?</p><p>Vinci la battaglia nella tua testa e hai vinto l’80% della sfida. Il resto è entrare in azione e continuare farlo finché non avrai raggiunto il tuo obiettivo.</p><p>So che sembra semplice, perché la vita si mette sempre di traverso e la pressione e le distrazioni sono dietro l’angolo. Per non considerare delle persone che ti circondano che potrebbero cercare di impedirti di realizzare il tuo potenziale, questo solo perché:</p><blockquote>Riuscire non è normale e le persone possono essere spaventate o gelose, o entrambe le cose, perché molti hanno un’inclinazione naturale a temere quelle cose che non considerano normali e che non rientrano nella loro zona di comfort e che non possono controllare.</blockquote><p>Le azioni producono risultati e la tua capacità di intraprendere azioni ripetute è la chiave per avere successo. Le azioni ripetute, quindi, chiamate anche <strong>persistenza</strong>, sono quelle che faranno la differenza tra il successo e il fallimento.</p><p>Il problema della persistenza è insito nella considerazione che spesso i passi successivi al primo, danno risultati troppo piccoli da essere percepiti, o magari non danno risultati affatto. E quando ciò accade, ti demoralizzi, perdi energia, ti senti scoraggiato e rischi di mollare il tuo obiettivo ed è a questo punto che ciò che pensi e come comandi il tuo corpo “e quello che senti dentro” deve essere in linea col tuo obiettivo, quindi la soluzione, in questi casi, è dare la giusta attenzione al perché avevi iniziato, al motivo che ti aveva spinto ad iniziare la tua azione e a perseverare per raggiungere il tuo obiettivo.</p><blockquote>E’ il focus che determina l’azione che intraprendi…<br>Quindi, <strong>il focus dirige la tua energia e l’energia ti fa agire.</strong></blockquote><p>I quattro pilastri che abbiamo visto sopra, <strong>C.A.R.E.</strong>, legano i tuoi pensieri e quello che senti in un unico punto focale che aumenta la tua capacità di lavorare ed andare avanti, nonostante le difficoltà.</p><p>Ora ti starai chiedendo cosa il focus, la perseveranza, i pensieri e quello che senti, abbiano a che fare con il Team Building. La risposta è abbastanza semplice, ed è legata all’effetto specchio, che altro non è che il buon vecchio “dare l’esempio”.</p><p>E’ assodato, infatti, che le azioni di un team seguano quelle del leader (che potrebbe non essere quello “designato” a guidarlo, ma di questo ne parleremo successivamente).</p><p>Ciò che stai pensando e sentendo è molto probabilmente simile a ciò che pensano e provano gli altri membri del team. <br>Inoltre, la tua attenzione dirige l’attenzione del team. Questo è fondamentale, perché il focus incanala l’energia per far accadere le azioni. Se perdi la tua concentrazione o non sei chiaro su cosa focalizzarti, le azioni seguiranno questa “confusione” e, indovina, verranno prodotti risultati non chiari da tutto il team.</p><p>I leader devono prima capire che la loro capacità di guidare se stessi … e COME guidano se stessi si riflette su coloro che sono responsabili di guidare.</p><p>Il modo in cui intraprendi le azioni influisce direttamente sul modo in cui il tuo team intraprenderà le azioni.</p><blockquote>Sarà fondamentale capire, quindi, che puoi avere tutte le più grandi intenzioni, ma sono le tue azioni che contano e si rispecchiano nel tuo team.</blockquote><h4>Effetto boomerang</h4><p>Dopo aver parlato di “azione” e di “effetto specchio”, volevo soffermarmi sul vero nocciolo della questione che fa tutta la differenza del mondo, ovvero, <em>se ti prendi cura di qualcuno, esso sentirà il desiderio di prendersi cura a sua volta di te o di qualcun altro</em> (a meno che non si tratti di uno psicopatico che rimane indifferente a questo tipo di attenzioni).</p><p>Prendersi cura di qualcuno è quella voglia genuina di capire se qualcuno ha un problema, ascoltarlo ed interessarsi veramente di quello che ti dice, senza aspettarsi nulla in cambio.</p><h4>Team e relazioni</h4><p>I team non sono altro che un insieme di relazioni che sono state collettivamente e consapevolmente focalizzate sul raggiungimento di un obiettivo comune. <br>Costruire qualsiasi relazione richiede la nostra emozione più fondamentale: prendersi cura delle persone.<br>Il modo in cui dimostri costantemente la tua cura per il tuo team, è il fattore decisivo tra prestazioni medie e prestazioni eccezionali. Quando le persone si sentono ascoltate, capite, tutelate e apprezzate, le persone spostano naturalmente i loro desideri egoistici verso i desideri altruistici che ogni membro del team dovrebbe avere. Una delle principali differenze tra gruppi di persone e team, infatti, è la volontà di ciascuno dei membri di abbandonare le proprie motivazioni egoistiche e adottare un’attenzione disinteressata per aiutare la squadra a raggiungere il suo obiettivo.</p><p>Prendersi cura è un loop continuo, con l’intento di aggiustare il tiro e migliorare sempre. Dobbiamo sempre coltivare questo tipo di attitudine ed i risultati saranno spettacolari, perché i membri del team non si limiteranno a prendersi cura gli uni degli altri, ma porteranno questo tipo di comportamento anche all’esterno, prendendosi cura dei fornitori e dei clienti, creando spesso delle comunità di persone che credono in ciò a cui crediamo noi, con conseguenti ripercussioni positive per tutto il nostro progetto e per le persone che ne fanno parte e che ne vorrebbero far parte.</p><h4>Cerchiamo una soluzione</h4><p>Creare un ambiente in grado di cullare e coccolare questo tipo di comportamenti non è facile e richiede cura e aggiustamenti, ma alla lunga paga e darà i suoi frutti.<br>E’ assolutamente più semplice e meno impegnativo, assumere velocemente e lasciare che le persone se ne vadano altrettanto facilmente, ma a parte il costo che questo “ricambio” continuo può avere sulle casse dell’azienda, il problema principale è che non si raggiungerà mai un livello di fiducia tale da permette la creazione di Team Inarrestabile e anche questo fa tutta la differenza del mondo per raggiungere gli obiettivi che intendiamo perseguire.</p><p><strong><em>A costo di rallentare i processi di selezione, è mandatorio attirare le persone giuste</em></strong>. Questo significa che l’azienda non sarà più demandata alla ricerca estenuante delle persone che coprano una certa casella in un certo momento, ma invertendo le cose, tramite il nostro modo di lavorare, considerare le persone, e la vision condivisa, attireremo chi desidera veramente far parte del nostro progetto e saremo anche sicuri che le persone si spenderanno perché guidate dagli stessi motivi che guidano noi.</p><h4>Conclusioni</h4><blockquote>La Leadership non ha nulla a che fare con un corso che vai a fare ed improvvisamente diventi un leader.</blockquote><p>La leadership è qualcosa di impalpabile, qualcosa che si costruisce giorno dopo giorno, qualcosa che non hai nemmeno idea di quando inizi, ma gli effetti di una vera leadership si vedono dalla fiducia delle persone intorno a te, le stesse persone che un giorno si alzeranno dal proprio letto per una nuova giornata di lavoro e diranno “Io amo il mio lavoro”…e questo fa tutta la differenza del mondo rispetto a “mi piace ciò che faccio”. <br>Se ami il tuo lavoro, se ti senti parte di qualcosa di più grande, se pensi che il tuo contributo sia importante quanto quello di chiunque altro, se sei anche disposto a sacrificare te stesso ed il tuo tempo, per vedere qualcun altro avere successo, allora significa che intorno a te è stata costruita fiducia, è stato costruito un ambiente in cui crescere e aiutare a crescere, un ambiente da cui non vorrai mai fuggire…anche se ti offrono più soldi!</p><p>Vi lascio con un’intervista a Simon Sinek (autore di Start With Why, Leaders eat last, The Infinite Game), che esprime il concetto della Leadership paragonandolo all’amore…</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUZTyvbmW92M%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUZTyvbmW92M&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUZTyvbmW92M%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/52307b44bdfdc5367abbe7bc781fabe9/href">https://medium.com/media/52307b44bdfdc5367abbe7bc781fabe9/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b4a2b127e87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What I learned from reading Robert C. Martin’s Clean Code book]]></title>
            <link>https://ddelfio.medium.com/what-i-learned-from-reading-robert-c-martins-clean-code-book-ca36ec2bd023?source=rss-e589e2d93a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca36ec2bd023</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[best-practices]]></category>
            <dc:creator><![CDATA[Danilo Del Fio]]></dc:creator>
            <pubDate>Mon, 28 Sep 2020 07:07:41 GMT</pubDate>
            <atom:updated>2020-09-28T07:07:41.552Z</atom:updated>
            <content:encoded><![CDATA[<h3>What I learned reading Robert C. Martin’s Clean Code book</h3><h4>Note: This is the English version of my previous post: “Cosa ho imparato leggendo il libro Clean Code di Robert C. Martin”, that you can find here: <a href="https://bit.ly/33VLXm6">https://bit.ly/33VLXm6</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*r9-SaXz-J2VsPHSb.jpeg" /></figure><h4>Introduction</h4><p>In these days of transition from one project to another, I started, with some perplexity to tell the truth, reading the Clean Code book which, as the name suggests, defines guidelines for writing clean code.<br>What does it mean to write clean code? Well, first of all write some code that is clear what it does at first glance. Although we often get pressure to deliver the required software, it is a good idea to write code that does not need to be explained, that you can get your hands on even after some time or that is clear even to those who have not developed that. part.</p><p>Let me be clear, my baseline start to the fact that:</p><blockquote><strong>Done is better than perfect</strong></blockquote><p><strong><em>It is also true that writing “self-explanatory” and “self-documenting” code, requires only common sense and a few simple rules to follow.</em></strong></p><p>In this way the speed with which we are able to release our artifacts is not affected, but it could even accelerate.</p><p>The book focuses on various aspects all more or less important, but which require more or less effort on the part of those who implement code and refer to Java code in its examples, but it can be easily adapted to any programming language you use.<br>This does not pretend to be an exhaustive overview of everything you will find in the book, but a flouring of some of the topics covered in the book.</p><h4>Classes and methods</h4><p>Let’s move, therefore, from advice on variable names that must be “pronounceable” and easily searchable within the code, to class <strong>names that must not be verbs, but names or phrases</strong>, for example WikiPage or Customer. <strong>For methods, however, it is better that they are verbs or sentences containing verbs</strong>, for example postPage:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/0*gRCPQWlnSltTB-NL.png" /></figure><p><em>The first rule of a class is that it should be as small as possible</em>.</p><p>We do not count the lines of code as in the case of methods, but we do count the “<strong>responsibilities</strong>” and the name of the class should help to understand the responsibilities of it.</p><blockquote>In this context, the <strong><em>Single Responsability Principle (SRP)</em></strong> is defined as the condition that a class or module should have one reason, and only one, to change.</blockquote><p>An important piece of advice is that if we overload the constructor, it would be better to use static factory-type methods whose names allow us to describe the arguments with which we want to construct our object. For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UqONSmxWdzRpe0COCeA74g.png" /></figure><p>We can even force this use by setting the corresponding constructor private (as is done in the Singleton pattern, for example).</p><p>Writing our code we must avoid duplication, because in this way we ensure its expressiveness and we can shrink the number of classes and methods.</p><blockquote>Care is a precious resource.</blockquote><h4>Comments</h4><p>Generally, well-documented code is better than one that isn’t, but that’s not always the case.</p><blockquote>The book explains, in fact, how complicated it is to keep comments aligned with the code you write and the fact that it is easy, however, that a comment written at a given moment loses its effectiveness after some time and with the update. of the software, because by refactory the programmer generally does not bother to modify the comment too.</blockquote><p>A separate mention must be made for the commented code, yes, the one that you don’t really know if it has to be deleted or not, because, although during coding it may happen that we have to use this technique to understand if a modification we have made has had the desired effects, it is also true that if it remains of the commented code we would not know if has been commented on for a reason or is just a typo by the programmer who left it.<br>As far as I’m concerned this is one of those situations in which I never know how to behave, because, in general, having absolute respect for the work of others, I tend to never delete commented code, but I believe that this is a very common practice ( apart from some cases that I will talk about in a future post).</p><h4>Test</h4><p>A separate discussion must be made for the tests. In the book it is written:</p><blockquote>Test code is just as important as production code.</blockquote><p>In general, unit tests (ie the tests we do to test a single functionality regardless of where it is integrated), allow for a flexible, maintainable and reusable code. The reason is quite simple. If you have tests that cover a large part of your code, you are not afraid to make changes to the code. Without testing, any small code changes could be a possible bug.</p><blockquote><strong>What makes a clean test? Three things. Readability, readability, and readability</strong></blockquote><p>A good rule of thumb for testing is that we need to test a single concept in each test function.</p><h4>Object Vs Data Structure</h4><p>Objects hide their data through abstraction and expose methods or functions that operate on data, while data structures expose their data and do not have functions that operate on data. I would like to dwell on this point a bit, because long ago I was told that a data structure must also have some logic that operates on them, but my thinking is more akin to that of the book, because the entities that hold the data structures data, in my opinion, should not have the methods to modify them (if not the classic setProperty ()).</p><p>The definition that makes objects and data structures complementary presents us with a dichotomy:</p><ul><li>Procedural Code (code that uses data structures), gives the possibility to add new functions without modifying the data structures on which they operate, while the Object Oriented code allows to define new classes without having to modify the functions.</li><li>The procedural code makes it difficult to add new data structures because all functions will have to change. Object Oriented code makes it difficult to add new methods and functions, because the classes will have to change.</li></ul><p>So what is complex in OO programming is made simple in procedural, while what is complex in procedural code is simple in OO.</p><p><strong>The Law of Demeter</strong>. Demeter’s heuristic law states that a module should not know how an object it manipulates is implemented.</p><p>More precisely, this law says that a method f of a class C should call certain types of methods:</p><ul><li>C.</li><li>An object created by f</li><li>An object passed as an argument to f</li><li>An object contained in an instance variable of C.</li></ul><p>The method must not invoke methods on objects returned by any of the allowed functions. In other words:</p><blockquote>Talk to friends, not strangers.</blockquote><h4>Design</h4><p>A design is considered simple when it follows a simple rule: “run all tests”</p><p>A fully tested system that passes all tests at all times is termed testable. <br>Obviously this is an obvious definition, but very important, in fact<strong> systems that are not testable are not verifiable and probably a system that has not been properly verified should not be released.</strong></p><h4>Concurrency</h4><blockquote>Objects are abstractions of processing. Threads are abstractions of schedule.</blockquote><p>Concurrency is a strategy that allows for decoupling. It allows you to decouple what needs to be done from the moment you do it.</p><p>One of the most difficult problems to manage in concurrency is when several processes (threads) access shared objects and this can create unexpected behavior.</p><p>A possible solution is the use of the <strong><em>synchronized</em></strong> keyword that allows you to protect critical sections that use shared objects. It is important to limit the number of these areas, because otherwise you could run into various problems.</p><ul><li>We may forget to protect one of these critical areas.</li><li>Duplication of our efforts to make sure that everything is protected correctly (violation of the DRY principle: Don’t Repeat Yourself)</li><li>It will be difficult to determine the points in which the system has malfunctions (already difficult in itself to be found).</li></ul><p>The <strong>recommendation</strong> in these cases is to limit access to data that could be shared, taking into account the encapsulation of them.</p><p>By allowing data to be copied, rather than having to access and synchronize shared data, it helps avoid blockages due to this way of managing data. This solution would compensate for the need to create new objects with the consequent overhead of garbage collection.<br>A further recommendation is to avoid using <strong><em>more than one method on a shared object</em></strong>. <br>There might be cases we can’t avoid it. When we are forced to face these situations we have three possible ways of managing:</p><ul><li><strong>Client-Based Locking</strong>: In this case the client sets the lock on a server before calling the first method and takes charge of the lock extending to the last method called.</li><li><strong>Server-Based Locking</strong>: Inside the server we call a method that puts the lock on the server, calls all the necessary methods, and then releases the lock.</li><li><strong>Adapted Server</strong>: We create a proxy that will take care of locking the necessary server methods.</li></ul><p>However, you should always follow a recommendation, namely that you must keep the synchronized sections as small as possible.</p><p>I leave you with a sentence that should be underlined and that actually can make sense in a context such as the drafting of Clean Code.</p><blockquote>To write clean code, you must first write dirty code and then clean it.</blockquote><h4>Conclusion</h4><p>I found the book too slow in some parts, but very interesting and full of ideas in others. <br>I recommend it as a book to keep on the bedside table when you realize that your code is suffering from some problems of effectiveness, readability and maintainability.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca36ec2bd023" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>