Recent Posts
Archives

Archive for the ‘en-US’ Category

PostHeaderIcon [VivaTech 2021] Emmanuel Macron : Championing European Scale-Ups and Innovation

Abstract

At VivaTech 2021, French President Emmanuel Macron joined a panel of European scale-up CEOs to discuss the future of Europe’s tech ecosystem. In a 66-minute conversation, Macron emphasized the need for a robust financial ecosystem, streamlined regulations, and a unified European market to support scale-ups. The panel, featuring leaders from Believe, Aledia, Neuroelectrics, and Klarna, highlighted Europe’s potential to lead in innovation through ethical, sustainable, and citizen-centric approaches. This article explores Macron’s vision for fostering European champions, addressing challenges in funding, regulation, and talent, and positioning Europe as a global tech leader.

Introduction

In June 2021, VivaTech, Europe’s premier startup and tech event, hosted a landmark panel featuring French President Emmanuel Macron alongside CEOs of leading European scale-ups. Moderated by Nicolas Barré of Les Échos, the discussion showcased Europe’s burgeoning tech landscape through the lens of companies like Believe (digital music distribution), Aledia (LED displays), Neuroelectrics (neuroscience), and Klarna (fintech). Macron articulated a bold vision for transforming Europe into a hub for innovation by strengthening its financial ecosystem, reducing regulatory barriers, and embracing a distinctly European approach that blends science, ethics, and ambition. This article delves into the key themes of the panel, weaving a narrative around Macron’s call for speed, scale, and sovereignty in European tech.

Building a Thriving Tech Ecosystem

Believe: Scaling Digital Music

Denis Ladegaillerie, CEO of Believe, opened the panel by sharing his company’s journey from a three-person startup in his living room to a global leader supporting 850,000 artists across 50 countries. Believe, which recently went public via an IPO, aims to dominate digital music distribution by offering artists transparency, better economics, and digital-first expertise. Ladegaillerie credited France’s Next 40 and French Tech initiatives for creating a supportive environment for its Paris-based IPO, noting Europe’s rising prominence as the second-largest music market by 2028. He urged Macron to foster more IPOs by attracting talent, educating investors, and building a pipeline of listed companies to create a virtuous cycle.

Macron responded by emphasizing the need for a robust financial ecosystem to provide liquidity for investors through mergers and acquisitions (M&As) and IPOs. He highlighted France’s Tibi Initiative, which redirected 6 billion euros of institutional savings to tech investments, unlocking 20 billion euros for the sector. Macron proposed scaling this model to the European level, encouraging banks and insurers to invest more in tech equity and fostering cooperation with large corporations for M&A exits. He stressed that successful IPOs like Believe’s enhance Europe’s credibility, attracting analysts and investors to fuel further growth.

Aledia: Industrializing Deep Tech

Giorgio Anania, CEO of Aledia, brought a deep-tech perspective, focusing on energy-efficient LED displays poised to revolutionize augmented reality (AR) within five years. With experience across startups in the U.S., U.K., Germany, and France, Anania praised France’s supportive environment, particularly BPI France’s assistance in choosing France over Singapore for Aledia’s manufacturing plant. However, he highlighted Europe’s lag in capital access compared to the U.S. and China, where “infinite money” fuels rapid scaling. Anania posed three questions to Macron: how to match U.S./China capital access, accelerate European reforms within three years, and simplify regulations for small companies transitioning to industrial scale.

Macron agreed that “speediness and scale” are critical, advocating for a European strategy to attract U.S. and Chinese investors by positioning Europe as business-friendly and innovative. He proposed rethinking procurement to favor startups over “usual suspects” in deep-tech sectors like energy, mobility, and defense, citing SpaceX’s disruption of aerospace as a model. Macron emphasized that deep tech is a matter of European sovereignty, warning that missing the current innovation wave could leave Europe dependent on U.S. or Chinese technologies. To support industrialization, he committed to streamlining regulations to ease the growth of small companies like Aledia.

The European Way: Science, Ethics, and Impact

Neuroelectrics: Innovating in Healthcare

Ana Maiques, CEO of Neuroelectrics, shared her Barcelona-based company’s mission to modulate brain activity for conditions like epilepsy and depression. Demonstrating a cap that monitors and stimulates brain signals in real time, Maiques highlighted Neuroelectrics’ FDA breakthrough designation for reducing seizures in children non-invasively. She emphasized Europe’s potential to address healthcare challenges—mental health, aging, and neurodegeneration—through responsible innovation. Having scaled her company to Boston, Maiques asked Macron how the “European way” could attract the next generation and how the pandemic reshaped his healthcare vision.

Macron described the European way as a unique blend of science, ethics, and economic ambition, resilient to globalization due to its ability to navigate complexity. Unlike the U.S., which prioritizes market efficiency, or China, Europe embeds democratic values and ethical considerations in innovation. He argued that sustainable business requires regulation to protect human rights and prevent unchecked data exploitation, citing the risks of private platforms controlling brain data or insurers using it to discriminate. Macron positioned Europe’s General Data Protection Regulation (GDPR), Digital Markets Act (DMA), and Digital Services Act (DSA) as frameworks for ethical innovation, ensuring transparency and citizen trust.

On healthcare, Macron identified education and healthcare as key investment pillars, advocating for personalization and prevention through AI and deep tech. He highlighted France’s centralized healthcare data as a competitive advantage, enabling secure, innovative solutions if access is managed transparently. Post-pandemic, Macron saw innovation as critical to shifting healthcare from hospital-centric models to citizen-focused systems, reducing costs and preventing chronic diseases through personalized approaches.

Disrupting with Purpose

Klarna: Fintech and Open Banking

Sebastian Siemiatkowski, CEO of Klarna, represented Sweden’s vibrant tech scene, with Klarna’s 90 million users and $45 billion valuation disrupting retail banking. He praised Macron’s business-friendly leadership but criticized Brussels’ slow and ineffective regulations, particularly on open banking and GDPR. Siemiatkowski argued that GDPR’s cookie consent overload (142 lifetimes daily) fails to enhance privacy, while open banking regulations fall short of enabling data mobility to drive competition. He urged Macron to push for consumer-centric regulations that foster innovation and position Europe as a global leader.

Macron defended GDPR as a necessary foundation, ensuring legal accountability and consumer awareness, but acknowledged that regulations blocking innovation are counterproductive. He candidly admitted governments’ reluctance to fully embrace disruptive models like Klarna’s, which can eliminate retail banking jobs. Macron clarified his dual role: supporting innovation that adds new services without destroying jobs, while balancing economic and social priorities. He cited Singapore’s open banking success as a model, suggesting that forward-leaning regulation could attract investment and create jobs, but emphasized the need for European players to lead disruption to maintain sovereignty.

A Call for Speed and Sovereignty

Macron concluded by reiterating the urgency of building a single European market, lifting sectoral barriers, and replicating France’s Next 40 and FT 120 initiatives at the European level. He committed to prioritizing these goals during France’s EU presidency in early 2022, aiming for concrete results. Macron underscored the political dimension of innovation, framing it as a matter of sovereignty to ensure Europe develops its own champions and technologies. By fostering trust through regulation, attracting global capital, and empowering startups, Europe can seize the current wave of innovation to shape a sustainable, ethical future.

Conclusion

The VivaTech 2021 panel with Emmanuel Macron and European scale-up leaders was a powerful testament to Europe’s potential as a global tech hub. From Believe’s digital music revolution to Aledia’s deep-tech displays, Neuroelectrics’ brain health innovations, and Klarna’s fintech disruption, the panel showcased diverse visions united by a commitment to impact. Macron’s vision—rooted in speed, scale, and the European way—offers a roadmap for building a resilient ecosystem. By strengthening financial markets, streamlining regulations, and championing ethical innovation, Europe can lead the next decade’s technological wave, ensuring sovereignty and prosperity for its citizens.

 

PostHeaderIcon [VivaTech 2021] Tech to Rethink Our Workplace at VivaTech 2021

Abstract

At VivaTech 2021, a 29-minute panel titled “Tech to Rethink Our Workplace” explored how technology is reshaping work post-pandemic. Featuring Victor Carreau, CEO of Comet Meetings, Marie Barbesol, co-founder and Chief Evangelist of Klaxoon, and David Gurle, founder of Symphony, the session addressed the shift to hybrid work, employee empowerment, and cultural transformation. Carreau emphasized redefining offices as collaboration hubs, Barbesol showcased tools for remote teamwork, and Gurle highlighted secure communication in regulated industries. This article synthesizes their insights, examining how technology, trust-based management, and flexible work models are crafting a new workplace paradigm.

Introduction

The COVID-19 pandemic accelerated a workplace revolution, forcing organizations to embrace remote and hybrid models. At VivaTech 2021, Europe’s leading tech event, the panel “Tech to Rethink Our Workplace” convened innovators leveraging technology to navigate this shift. Victor Carreau of Comet Meetings reimagined physical workspaces, Marie Barbesol of Klaxoon introduced collaborative tools for remote teams, and David Gurle of Symphony addressed secure communication for financial institutions. Their 29-minute discussion highlighted the pandemic’s lasting impact: a move toward flexible, trust-based, and technology-driven work environments. This article explores their solutions, the cultural shifts they enable, and the future of work.

The Pandemic’s Workplace Impact

A Paradigm Shift

The pandemic disrupted traditional work, with millions transitioning to remote setups overnight. By March 2020, companies faced technical failures—clogged VPNs, downed servers—exposing the fragility of pre-COVID systems. The crisis, as Gurle noted, was a “booster,” accelerating digital transformation and proving employees could work effectively from anywhere. This shift empowered individuals to demand flexibility, challenging rigid office-centric models.

Lasting Trends

Panelists identified enduring trends: hybrid work combining remote and in-person collaboration, increased environmental awareness through reduced commuting, and asynchronous work allowing personalized schedules. These changes, catalyzed by necessity, opened opportunities for better work-life balance, global talent access, and reduced carbon footprints, aligning with broader societal goals.

Klaxoon: Empowering Remote Collaboration

Technology Overview

Marie Barbesol, co-founder of Klaxoon, shared how their suite of collaborative tools, launched in 2015, addresses inefficient meetings. Klaxoon’s apps enable seamless teamwork, from workshops to project management, ensuring inclusivity and decision-making. Pre-COVID, Barbesol observed that 50% of meeting attendees hesitated to share ideas, and only one in four meetings ended with decisions. Klaxoon’s platform counters this with structured, engaging formats. During the pandemic, Klaxoon offered free access, onboarding ten times more users, and launched a virtual whiteboard in September 2020, integrating templates and video for remote collaboration.

Impact and Evolution

Klaxoon’s growth—from a 4-square-meter booth at VivaTech 2016 to a major stage in 2021—reflects its relevance. The pandemic revealed flaws in traditional work methods, prompting Klaxoon to adapt. Managers sought ways to coordinate without endless video calls, while teams needed visual tools to stay aligned. Barbesol highlighted three lessons: remote work requires new methods, asynchronous collaboration boosts efficiency, and reduced travel fosters environmental responsibility. Klaxoon’s tools enable global talent integration and creative, reactive teams, redefining teamwork.

Cultural Implications

Barbesol emphasized maintaining strong company culture through regular synchronization (daily or weekly rituals), cross-team collaboration to avoid silos, and feedback as “the breakfast of champions.” These practices ensure alignment and inclusivity, critical in hybrid settings where remote workers risk disconnection.

Comet Meetings: Redefining the Office

Technology and Philosophy

Victor Carreau, CEO of Comet Meetings, argued that the traditional office is “dead,” but workspaces remain vital for collaboration and socialization. He broke work into three components: production (individual tasks, best done remotely), collaboration (team efforts, often requiring physical presence for complex tasks), and socialization (building bonds that enhance loyalty). Comet Meetings offers modern venues in Paris, Brussels, and Madrid, designed for productivity and creativity, and “Hospitality by Comet,” which transforms corporate offices into collaboration hubs with tailored services.

Impact and Vision

Carreau’s vision positions “meetings as the new office.” Post-COVID, offices must prioritize high-quality engagement over daily attendance. Comet’s venues provide cost-effective, inspiring spaces for one-day meetings, while Hospitality by Comet helps landlords and companies rethink real estate. The pandemic validated remote production, reducing office space needs—Gurle noted Symphony cut its New York office capacity by 50%—but Carreau stressed that physical spaces remain essential for meaningful interactions, provided they are exceptional.

Cultural Shift

Carreau advocated for trust-based management, moving away from command-and-control models. He warned that companies reverting to pre-COVID norms risk losing talent, as employees now prioritize flexibility. Comet fosters culture by increasing virtual touchpoints during full-remote periods and ensuring “amazing” in-person meetings, aligning teams around shared values despite physical distance.

Symphony: Secure Collaboration in Regulated Markets

Technology Overview

David Gurle, founder of Symphony, detailed their role as a digital transformation partner for financial institutions, where strict regulations govern communication. Symphony’s cloud-based platform ensures secure, recorded interactions, critical when non-compliance risks billions in fines. During the March 2020 lockdown, Symphony supported clients like JPMorgan, enabling 250,000 employees to go remote overnight when competitors’ tools failed. The platform’s scalability and compliance features ensured business continuity.

Impact and Adaptation

The crisis transformed financial services, with Gurle noting a cultural shift toward individual choice. Employees, having proven remote efficacy, resisted imposed office returns. Symphony’s reduced office footprint—averaging two employees weekly in New York—reflects this trend. Gurle sees the crisis as an opportunity, fostering a culture of empowerment and flexibility that boosts productivity and loyalty.

Future Innovations

Gurle, with 25 years in collaboration tech, predicted immersive technologies—augmented and virtual reality, spatial audio—as the next frontier. These will recreate in-person experiences remotely, enhancing engagement. Symphony’s regulatory expertise positions it to lead in secure, innovative communication, aligning with the market’s demand for advanced hybrid solutions.

Cultural Transformation

Trust and Empowerment

All panelists emphasized trust-based management. Gurle highlighted “management by objective,” where empowered employees take ownership, increasing motivation and productivity. Carreau warned that without this shift, companies risk talent attrition, as candidates now demand work-life balance. Barbesol’s feedback-centric approach ensures individuals feel valued, fostering loyalty in hybrid settings.

Maintaining Connection

Carreau stressed shared values and frequent touchpoints—virtual or physical—to sustain culture. Barbesol advocated cross-team synchronization to prevent silos, using Klaxoon’s visual tools to connect on-site and remote workers. Gurle noted that reduced commuting frees time for family and asynchronous work, enhancing quality of life and environmental responsibility.

The “COVID Company”

Gurle introduced the “COVID company” concept: fully remote organizations with periodic, high-quality in-person engagements. This model, echoed by Carreau’s “meetings as the new office,” prioritizes flexibility and meaningful connections, potentially redefining corporate structures. Barbesol’s decade of remote work validates its feasibility, offering a blueprint for others.

Challenges and Opportunities

Management Resistance

Carreau identified outdated management as the “elephant in the room.” Command-and-control styles hinder hybrid adoption, risking talent loss. Companies must embrace trust and flexibility to remain competitive, a challenge requiring cultural and structural change.

Technology Integration

Barbesol and Gurle emphasized leveraging existing screens for visual collaboration, transforming workplaces into “visual offices.” Future innovations, like holography, require investment but promise immersive experiences. Symphony’s cloud-based approach and Klaxoon’s rapid product launches demonstrate technology’s role in overcoming remote work barriers.

Talent and Productivity

The shift empowers employees, with candidates demanding balanced lifestyles, as Gurle noted. This drives productivity and loyalty but challenges companies to adapt. Comet’s focus on exceptional meeting experiences and Klaxoon’s inclusive tools ensure engagement, critical for retaining talent in a competitive market.

Future of Work

Non-Linear Workweeks

Carreau predicted a “non-linear week,” where employees choose when to collaborate in-person, work remotely, or travel, prioritizing mindfulness. This flexibility reduces commuting and environmental impact, aligning with Barbesol’s observations on sustainable work practices.

Immersive Collaboration

Gurle’s vision of augmented and virtual reality will bridge physical and remote divides, creating immersive collaborative spaces. Klaxoon’s visual whiteboard and Symphony’s secure platform lay the groundwork, with innovation poised to enhance hybrid experiences.

Trust-Based Cultures

All panelists foresaw trust as the cornerstone of future workplaces. Barbesol’s feedback-driven approach, Carreau’s value-centric meetings, and Gurle’s empowerment model will define cultures that prioritize individual agency, fostering resilience and innovation.

Conclusion

The VivaTech 2021 panel “Tech to Rethink Our Workplace” illuminated a transformative moment for work. Klaxoon’s collaborative tools, Comet Meetings’ reimagined offices, and Symphony’s secure platforms address the hybrid era’s demands, empowering employees and fostering trust. The pandemic proved flexibility’s viability, but management must evolve to sustain it. As technology advances—toward immersive, inclusive solutions—the workplace will become more human-centric, balancing productivity with well-being. VivaTech’s platform amplified this call to action: embrace trust, leverage technology, and build workplaces that inspire.

 

PostHeaderIcon [NodeCongress2021] Can You Change the Behavior of a Running Node.js Process From the Outside? – Vladimir de Turckheim

Runtime modifications to live applications represent a fascinating frontier in Node.js engineering, where traditional redeployments yield to dynamic interventions. Vladimir de Turckheim, a seasoned Node.js collaborator, delves into this realm, demonstrating techniques to alter process conduct without code alterations or restarts. His session reveals the debugger’s untapped potential, transforming it from a mere inspection tool into a conduit for real-time behavioral shifts.

Vladimir begins with a relatable scenario: a bare-bones HTTP server lacking logs, emblematic of hasty development oversights. Rather than refactoring and redeploying, he advocates injecting logging logic externally, leveraging Node.js’s signal-handling capabilities. By emitting SIGUSR1, the process enters debug mode, exposing a WebSocket endpoint for remote connections— a feature ripe for production diagnostics, as Vladimir notes in his Screen blog contributions on memory leak hunting.

Harnessing the DevTools Protocol for Introspection

Central to Vladimir’s methodology is the Chrome DevTools Protocol, the backbone of Node.js debugging. Forgoing graphical interfaces, he employs programmatic access via the inspector module, querying V8’s heap for object introspection. This low-level API enables pinpointing instances—like an HTTP server’s singleton—through prototype traversal and property enumeration, yielding object IDs as memory pointers.

Vladimir’s live demo exemplifies this: post-debug activation, a secondary Node.js injector script evaluates expressions remotely, first globalizing a patching function on the process object for universal accessibility. Subsequent calls invoke this function on the server instance, swapping ‘request’ event listeners with wrappers that prepend console logs—capturing methods and URLs—before delegating to originals. This monkey-patching preserves event emission order, ensuring seamless augmentation.

Such precision stems from protocol commands like Runtime.evaluate and Runtime.callFunctionOn, which execute snippets in the target’s context. Vladimir cautions on cleanup—releasing object IDs and closing sessions via inspector.close—to avert leaks, underscoring the approach’s suitability for controlled environments with SSH access, where administrative privileges mitigate security risks.

Practical Implications and Beyond Debugging

While ostensibly a code injection showcase, Vladimir reframes the talk as a tribute to DevTools’ extensibility. Beyond logging, it facilitates bespoke profilers or heap dumps for elusive issues, bypassing UI limitations in IDEs like VS Code. For production, this enables non-intrusive observability, aligning with Screen’s mission of code-agnostic server hardening.

Vladimir concludes by encouraging custom tool-building, from granular CPU sampling to event tampering, all grounded in the protocol’s robustness. His narrative not only equips attendees with actionable dark arts but also elevates debugging from reactive firefighting to proactive mastery, fostering resilient Node.js ecosystems.

Links:

PostHeaderIcon [Devoxx France 2021] Overcoming Impostor Syndrome: Practical Tips

At Devoxx France 2021, Aurélie Vache, a Google Cloud expert and CNCF ambassador, delivered an inspiring session titled Tips pour combattre le syndrome de l’imposteur (YouTube). This non-technical talk tackled impostor syndrome, a pervasive feeling of self-doubt and illegitimacy despite evident success. Aurélie shared personal anecdotes and seven actionable strategies to combat this mindset, resonating with developers and tech professionals. Aligned with Devoxx’s emphasis on personal growth, the session empowered attendees to transform fear into strength, fostering confidence and community.

Understanding Impostor Syndrome

Aurélie began by gauging the audience’s familiarity with impostor syndrome, noting its growing awareness since her first talk in 2019. She posed three relatable questions: Do you fear asking “dumb” questions? Do you feel comfortable mentoring juniors but not peers? Do you worry others will “unmask” you as a fraud? Many raised hands, confirming the syndrome’s prevalence.

Impostor syndrome, Aurélie explained, is a distorted perception of one’s abilities, where individuals attribute success to luck or others’ efforts rather than their own competence. First identified in women, it affects both genders, with 70% of executives and many developers experiencing it. It manifests as a critical inner voice, whispering, “You’re not good enough” or “You don’t belong”. Aurélie shared her own struggles, admitting she felt unqualified to give this talk, yet used humor to dismiss these “nonsense” thoughts, setting a positive tone.

Celebrate Achievements and Learn from Mistakes

The first strategy is to acknowledge your knowledge, skills, and victories. Humans excel at self-criticism but struggle to recognize strengths. Aurélie advised listing accomplishments, such as solving a tough bug, and documenting them via mind maps to engage both brain hemispheres. She emphasized that no victory is too small and that mistakes are learning opportunities, not failures. For example, recalling a debugging triumph can counter the inner voice’s negativity, reinforcing your competence.

This practice aligns with cognitive behavioral techniques, helping reframe negative thoughts. Aurélie’s transparency about her doubts made the advice relatable, encouraging attendees to start small, perhaps by noting one achievement daily, to build self-awareness and confidence.

Build a Supportive Network

The second tip is to surround yourself with supportive communities, peers, and mentors. Aurélie credited her involvement with Duchess, a women-in-tech group, for helping her overcome self-imposed limits and achieve goals she once thought unattainable. Communities provide a safe space to share fears, reducing isolation. She also recommended learning from mentors or role models, acknowledging that no one knows everything—a liberating truth.

During Q&A, an attendee highlighted how pair programming within communities fosters mutual growth, reinforcing this strategy. Aurélie’s emphasis on collective strength resonated, encouraging attendees to join meetups, user groups, or online forums like Stack Overflow to find their tribe.

Share Knowledge and Contribute

Aurélie’s third strategy is to share knowledge and contribute, even if you feel “less qualified”. Writing blog posts, speaking at meetups, or contributing to open-source projects can boost confidence. She advised starting small—perhaps sharing internally at work—then progressing to public platforms or conferences. Other avenues include teaching kids at coding workshops or tweeting new learnings, as Aurélie did with a Kubernetes tip that resonated widely, proving even “obvious” insights have value.

An audience member echoed this, noting that sharing, even if you’re not the “best,” fills gaps left by others, enhancing visibility and confidence. Aurélie’s call to action—create and share content—empowered attendees to overcome perfectionism and contribute meaningfully.

Embrace Feedback and Positivity

The final strategies focus on mindset shifts. Tip four: seek constructive feedback over external validation, starting with topics you’re comfortable with. Tip five: engage in pair programming to learn collaboratively without judgment, as clarified during Q&A when addressing misconceptions about it being evaluative. Tip six: focus on positive feedback, like supportive colleagues, rather than dwelling on negativity, such as a harsh 2019 Devoxx comment that took Aurélie a month to process. Tip seven: accept that you can’t master every skill (e.g., Rust, Go, serverless) and view weaknesses as growth opportunities.

Aurélie shared a personal rejection from a master’s program due to poor interview performance, yet she thrived in tech, urging attendees to persevere beyond credentials. An attendee’s anecdote about Dan Abramov’s public admission of knowledge gaps reinforced that even experts don’t know everything, normalizing impostor feelings.

Transforming Fear into Strength

Aurélie concluded by framing impostor syndrome as a source of humility, a valuable trait for developers. Admitting “I don’t know” fosters collaboration, as others share similar doubts but fear speaking up. The syndrome, she argued, isn’t a flaw but a catalyst for growth, pushing you to learn, share, and help others. Referencing its mention in The Big Bang Theory, she destigmatized the topic, encouraging open dialogue.

Q&A discussions highlighted real-world challenges, like toxic colleagues amplifying impostor feelings, and Aurélie advised seeking supportive environments to mitigate this. Another attendee suggested companies avoid overselling candidates as “experts,” which can exacerbate impostor syndrome on new projects. Aurélie’s mantra—“You are legitimate”—left attendees empowered to embrace their worth.

Hashtags: #ImpostorSyndrome #PersonalGrowth #AurélieVache #CloudBees #CNCF

PostHeaderIcon [Devoxx FR 2021] IoT Open Source at Home

At Devoxx France 2021, François Mockers, an IoT enthusiast, delivered a 32-minute talk titled IoT open source à la maison (YouTube). This session shared his decade-long journey managing over 300 open-source IoT devices at home, likening home automation to production IT challenges. From connected light bulbs to zoned heating and sunlight-responsive shutters, Mockers explored protocols (ZigBee, Z-Wave, 433MHz, Wi-Fi) and tools (Home Assistant, ESPHome, Node-RED, Ansible, InfluxDB, Grafana). Aligned with Devoxx’s IoT and cloud themes, the talk offered practical insights for developers building cost-effective, secure home automation systems.

IoT: A Growing Home Ecosystem

Mockers began by highlighting the ubiquity of IoT devices, asking the audience how many owned connected devices (00:00:30–00:00:45). Most had over five, some over 50, and Mockers himself managed ~300, from Philips Hue bulbs to custom-built sensors (00:00:45–00:01:00). He started with commercial devices a decade ago but shifted to DIY solutions five years ago for cost savings and flexibility (00:00:15–00:00:30). His setup mirrors production environments, with “unhappy users” (family), legacy systems, and protocol sprawl, making it a relatable challenge for developers.

IoT Protocols: A Diverse Landscape

Mockers provided a technical overview of IoT protocols, each with unique strengths and challenges (00:01:00–00:08:15):

  • ZigBee: Used by Philips Hue and IKEA, ZigBee supports lights, switches, plugs, motion sensors, and shutters in a mesh network for extended range. Devices like battery-powered switches consume minimal power, while plugged-in bulbs act as repeaters. Security issues, like a past Philips Hue hack allowing remote on/off control, highlight risks (00:01:15–00:02:15).
  • Z-Wave: Similar to ZigBee but less common, used by Fibaro and Aeotec. It supports up to 232 devices (vs. ZigBee’s 65,000) with similar mesh functionality (00:02:15–00:02:45).
  • 433.92 MHz: A frequency band hosting protocols like Oregon Scientific (sensors), Somfy (shutters), and Chacon/DIO (switches). These are cheap (~€10 vs. €50 for ZigBee/Z-Wave) but insecure, allowing neighbors’ devices to be controlled with a powerful transceiver. Car keys and security boxes also use this band, complicating urban use (00:02:45–00:04:00).
  • Wi-Fi: Popular for startups like Netatmo (weather, security), LIFX (bulbs), and Tuya (garden devices). Wi-Fi devices are plug-and-play but power-hungry and reliant on external cloud APIs, posing risks if internet or vendor services fail. Security is a concern, as hacked Wi-Fi devices fueled major botnets (00:04:15–00:06:00).
  • Bluetooth: Used for lights, speakers, and beacons, Bluetooth offers localization but requires phone proximity, limiting automation (00:06:00–00:06:30).
  • Powerline (CPL) and Fil Pilote: Protocols like X10 and fil pilote (for electric radiators) use electrical wiring but depend on home wiring quality. Infrared signals control AV equipment and air conditioners but require line-of-sight and lack status feedback (00:06:45–00:08:00).
  • LoRaWAN/Sigfox: Long-range protocols for smart cities, not home use (00:08:00–00:08:15).

Open-Source Tools for Home Automation

Mockers detailed his open-source toolchain, emphasizing flexibility and integration (00:08:15–00:20:45):

Home Assistant

Home Assistant, with 1,853 integrations, is Mockers’ central hub, supporting Alexa, Google Assistant, and Siri. It offers mobile apps, automation, and dashboards but becomes unwieldy with many devices. Mockers disabled its database and UI, using it solely for device discovery (00:08:30–00:09:45). It integrates with OpenHAB (2,526 integrations) and Domoticz (500 integrations) for broader device support.

ESPHome

ESPHome deploys ESP8266/ESP32 chips for custom sensors, connecting via Wi-Fi or Bluetooth. Mockers builds temperature, humidity, and light sensors for ~€10 (vs. €50 commercial equivalents). Configuration via YAML files integrates sensors directly into Home Assistant (00:10:00–00:11:45). Example:

esphome:
  name: sensor_t1_mini
  platform: ESP8266
api:
  services:
    - service: update
      then:
        - logger.log: "Updating firmware"
output:
  - platform: gpio
    pin: GPIO4
    id: led
sensor:
  - platform: bme280
    temperature:
      name: "Temperature"
    pressure:
      name: "Pressure"
    humidity:
      name: "Humidity"

Node-RED

Node-RED, with 3,485 integrations, handles automation via low-code event-driven flows. Mockers routes all Home Assistant events to Node-RED, creating rules like bridging 433MHz remotes to ZigBee bulbs. Its responsive dashboard outperforms Home Assistant’s (00:12:00–00:14:00).

InfluxDB and Grafana

InfluxDB stores time-series data from devices, replacing Home Assistant’s PostgreSQL. Mockers experimented with machine learning for anomaly detection and room occupancy prediction, though the latter was unpopular with his family (00:14:15–00:15:15). Grafana visualizes historical data, like weekly temperature trends, with polished dashboards (00:15:15–00:15:45).

Telegraf

Telegraf runs scripts for devices lacking Home Assistant integration, sending data to InfluxDB. It also monitors network and CPU usage .

Ansible and Pi-hole

Ansible automates Docker container deployment on Raspberry Pis, with roles for each service and a web page listing services . Pi-hole, a DNS-based ad blocker, caches queries and logs IoT device DNS requests, exposing suspicious activity.

Security and Deployment

Security is critical with IoT’s attack surface. Mockers recommends:

  • A separate Wi-Fi network for IoT devices to isolate them from PCs .
  • Limiting internet access for devices supporting local mode .
  • A VPN for remote access, avoiding open ports .
  • Factory-resetting devices before disposal to erase Wi-Fi credentials .

Deployment uses Docker containers on Raspberry Pis, managed by Ansible. Mockers avoids Kubernetes due to Raspberry Pi constraints, opting for custom scripts. Hardware includes Raspberry Pis, 433MHz transceivers, and Wemos ESP8266 boards with shields for sensors (00:19:45–00:20:45).

Audience Interaction and Lessons

Mockers engaged the audience with questions (00:00:30) and a Q&A , addressing:

  • Usability for family (transparent for his wife, usable by his six-year-old)
  • Home Assistant backups via Ansible and hourly NAS snapshots
  • Insecure 433MHz devices (cheap but risky)
  • Air conditioning control via infrared and fil pilote for radiators
  • A universal remote consolidating five protocols, reducing complexity
  • A humorous “divorce threat” from a beeping device, emphasizing user experience

Conclusion

Mockers’ talk showcased IoT as an accessible, developer-friendly domain using open-source tools. His setup, blending ZigBee, Wi-Fi, and DIY sensors with Home Assistant, Node-RED, and Grafana, offers a scalable, cost-effective model. Security and automation align with Devoxx’s cloud and IoT focus, inspiring developers to experiment safely. The key takeaway: quality data and user experience are critical for home automation success.

Resources

PostHeaderIcon [DevoxxFR 2021] Maximizing Productivity with Programmable Ergonomic Keyboards: Insights from Alexandre Navarro

In an enlightening session at Devoxx France 2021, Alexandre Navarro, a seasoned Java backend developer, captivated the audience with a deep dive into the world of programmable ergonomic keyboards. His presentation, titled “Maximizing Your Productivity with a Programmable Ergonomic Keyboard,” unveils the historical evolution of keyboards, the principles of ergonomic design, and practical strategies for customizing keyboards to enhance coding efficiency. Alexandre’s expertise, honed over eleven years of typing in the Bépo layout and eight years on a TextBlade, offers developers a compelling case for rethinking their primary input device. This post explores the key themes of his talk, providing actionable insights for programmers seeking to optimize their workflow.

A Journey Through Keyboard History

Alexandre begins by tracing the lineage of keyboards, a journey that illuminates why our modern layouts exist. In the 1870s, early typewriters resembled pianos with alphabetical key arrangements, mere prototypes of today’s devices. By 1874, the Sholes and Glidden typewriter introduced a layout resembling QWERTY, a design often misunderstood as a deliberate attempt to slow typists to prevent jamming. Alexandre debunks this myth, explaining that QWERTY was shaped by practical needs, such as placing frequent English digraphs like “TH” and “ER” for efficient typing. The addition of a number row and user feedback further refined the layout, with quirks like the absence of dedicated “0” and “1” keys—substituted by “O” and “I”—reflecting telegraphy influences.

This historical context sets the stage for understanding why QWERTY persists despite its limitations. Alexandre notes that modern keyboards, like the iconic IBM model, retain QWERTY’s staggered rows and non-aligned letters, a legacy of mechanical constraints irrelevant to today’s technology. His narrative underscores a critical point: many developers use keyboards designed for a bygone era, prompting a reevaluation of tools that dominate their daily work.

Defining Ergonomic Keyboards

Transitioning to ergonomics, Alexandre outlines the hallmarks of a keyboard designed for comfort and speed. He categorizes ergonomic features into three domains: physical key arrangement, letter layout, and key customization. Physically, an ergonomic keyboard should be orthogonal (straight rows, unlike QWERTY’s stagger), symmetrical to match human hand anatomy, flat to reduce tendon strain, and accessible to minimize finger travel. These principles challenge conventional designs, where number pads skew symmetry and elevated keys stress wrists.

Alexandre highlights two exemplary models: the Keyboardio Model 01 and the ErgoDox. The Keyboardio, which he uses, boasts orthogonal, symmetrical keys and accessible layouts, while the ErgoDox offers customizable switches and curvature. These keyboards prioritize user comfort, aligning with the natural positioning of hands to reduce fatigue during long coding sessions. By contrasting these with traditional keyboards, Alexandre emphasizes that ergonomic design is not a luxury but a necessity for developers who spend hours typing.

Optimizing with Programmable Keyboards

The heart of Alexandre’s talk lies in programming keyboards to unlock productivity. Programmable keyboards, like the ErgoDox and Keyboardio, emerged around 2011, powered by microcontrollers that developers can flash with custom firmware, often using Arduino-based C code or graphical tools. This flexibility allows users to redefine key functions, creating layouts tailored to their workflows.

Alexandre introduces key programming concepts, such as layers (up to 32, akin to switching between QWERTY and number pad modes), macros (single keys triggering complex shortcuts like “Ctrl+F”), and tap/hold behaviors (e.g., a key typing “A” when tapped but acting as “Ctrl” when held). These features enable developers to streamline repetitive tasks, such as navigating code or executing IDE shortcuts, directly from their home row. Alexandre’s personal setup, using the Bépo layout optimized for French, exemplifies how customization can enhance efficiency, even for English-heavy programming tasks.

Why Embrace Ergonomic Keyboards?

Alexandre concludes by addressing the “why” behind adopting ergonomic keyboards. Beyond speed, these devices offer comfort, reducing the risk of repetitive strain injuries—a concern for developers typing extensively. He shares his experience with the Bépo layout, which, while not optimized for English, outperforms QWERTY and AZERTY due to shared frequent letters and better hand alternation. For those hesitant to switch, Alexandre suggests starting with a blank keyboard to learn touch typing, ensuring all fingers engage without glancing at keys.

His call to action resonates with developers: mastering your keyboard is as essential as mastering your IDE. By investing in an ergonomic, programmable keyboard, programmers can transform a mundane tool into a productivity powerhouse. Alexandre’s insights, grounded in years of experimentation, inspire a shift toward tools that align with modern coding demands.

PostHeaderIcon [NodeCongress2021] Introduction to the AWS CDK: Infrastructure as Node – Colin Ihrig

In the evolving landscape of cloud computing, developers increasingly seek tools that bridge the gap between application logic and underlying infrastructure. Colin Ihrig’s exploration of the AWS Cloud Development Kit (CDK) offers a compelling entry point into this domain, emphasizing how Node.js enthusiasts can harness familiar programming paradigms to orchestrate cloud resources seamlessly. By transforming abstract infrastructure concepts into executable code, the CDK empowers teams to move beyond cumbersome templates, fostering agility in deployment pipelines.

The CDK stands out as an AWS-centric framework for infrastructure as code, akin to established solutions like Terraform but tailored for those versed in high-level languages. Supporting JavaScript, TypeScript, Python, Java, and C#, it abstracts the intricacies of CloudFormation—the AWS service for defining and provisioning resources via JSON or YAML—into intuitive, object-oriented constructs. This abstraction not only simplifies the creation of scalable stacks but also preserves CloudFormation’s core advantages, such as consistent deployments and drift detection, where configurations are automatically reconciled with actual states.

Streamlining Cloud Architecture with Node.js Constructs

At its core, the CDK operates through a hierarchy of reusable building blocks called constructs, which encapsulate AWS services like S3 buckets, Lambda functions, or EC2 instances. Colin illustrates this with a straightforward Node.js example: instantiating a basic S3 bucket involves minimal lines of code, contrasting sharply with the verbose CloudFormation equivalents that often span pages. This approach leverages Node.js’s event-driven nature, allowing developers to define dependencies declaratively while integrating seamlessly with existing application codebases.

One of the CDK’s strengths lies in its synthesis process, where high-level definitions compile into CloudFormation templates during the “synth” phase. This generated assembly includes not just templates but also ancillary artifacts, such as bundled Docker images for Lambda deployments. For Node.js practitioners, this means unit testing infrastructure alongside application logic—employing Jest for snapshot validation of synthesized outputs—without ever leaving the familiar ecosystem. Colin’s demonstration underscores how such integration reduces context-switching, enabling rapid iteration on cloud-native designs like serverless APIs or data pipelines.

Moreover, the CDK’s asset management handles local files and images destined for S3 or ECR, necessitating a one-time bootstrapping per environment. This setup deploys a dedicated toolkit stack, complete with storage buckets and IAM roles, ensuring secure asset uploads. While incurring nominal AWS charges, it streamlines workflows, as evidenced by Colin’s walkthrough of provisioning a static website: a few constructs deploy a public-read bucket, sync local assets, and expose the site via a custom domain—potentially augmented with Route 53 for DNS or CloudFront for edge caching.

Navigating Deployment Cycles and Best Practices

Deployment via the CDK CLI mirrors npm workflows, with commands like “cdk deploy” orchestrating updates intelligently, applying only deltas to minimize disruption. Colin highlights the CLI’s versatility—listing stacks with “cdk ls,” diffing changes via “cdk diff,” or injecting runtime context for dynamic configurations—positioning it as an extension of Node.js tooling. For cleanup, “cdk destroy” reverses provisions, though manual verification in the AWS console is advisable, given occasional bootstrap remnants.

Colin wraps by addressing adoption barriers, noting the CDK’s maturity since its 2019 general availability and its freedom from vendor lock-in—given AWS’s ubiquity among cloud-native developers. Drawing from a Cloud Native Computing Foundation survey, he points to JavaScript’s dominance in server-side environments and AWS’s 62% market share, arguing that the CDK aligns perfectly with Node.js’s ethos of unified tooling across frontend, backend, and operations.

Through these insights, Colin not only demystifies infrastructure provisioning but also inspires Node.js developers to embrace declarative coding for resilient, observable systems. Whether scaling monoliths to microservices or experimenting with ephemeral environments, the CDK emerges as a pivotal ally in modern cloud engineering.

Links:

PostHeaderIcon [KotlinConf2019] Exploring the Power of Kotlin/JS

Sebastian Aigner, a developer advocate at JetBrains, captivated KotlinConf2019 with his deep dive into Kotlin/JS, the JavaScript target for Kotlin. With a passion for web development, Sebastian showcased how recent advancements make Kotlin/JS a compelling choice for building web applications. From streamlined tooling to seamless JavaScript interoperability, he outlined the current state and future potential of Kotlin/JS, inspiring both newcomers and seasoned developers to leverage Kotlin’s paradigms in the browser.

Simplifying Development with the New Gradle Plugin

Kotlin/JS has evolved significantly, with the new Kotlin/JS Gradle plugin emerging as the cornerstone for browser and Node.js development. Sebastian explained that this plugin unifies previously fragmented approaches, replacing deprecated plugins like kotlin2js and kotlin-frontend. Its uniform Gradle DSL simplifies project setup, offering sensible defaults for Webpack bundling without requiring extensive configuration. For developers transitioning to multi-platform projects, the plugin’s compatibility with the Kotlin multi-platform DSL minimizes changes, enabling seamless integration of additional targets. By automating JavaScript environment setup, including yarn and package.json, the plugin empowers Kotlin developers to focus on coding rather than managing complex JavaScript tooling.

Mastering Dependency Management with npm

The JavaScript ecosystem, with over a million npm packages, offers unparalleled flexibility, and Kotlin/JS integrates effortlessly with this vast library. Sebastian highlighted how the Gradle plugin manages npm dependencies directly, automatically updating package.json when dependencies like React or styled-components are added. This eliminates the need for separate JavaScript environment setup, saving time, especially on non-standard platforms like Windows. Developers can import Kotlin libraries (e.g., coroutines, serialization) alongside JavaScript packages, with Gradle handling the JavaScript-specific versions. This unified approach bridges the gap between Kotlin’s structured ecosystem and JavaScript’s dynamic world, making dependency management intuitive even for those new to JavaScript.

Bridging Kotlin and TypeScript with Dukat

Interoperating with JavaScript’s dynamic typing can be challenging, but Sebastian introduced Dukat, an experimental tool that converts TypeScript declaration files into Kotlin external declarations. By leveraging TypeScript’s de facto standard for type definitions, Dukat enables type-safe access to npm packages, such as left-pad or react-minimal-pie-chart. While manual external declarations require tedious annotation, Dukat automates this process, generating headers for packages with TypeScript support or community-contributed definitions. Sebastian encouraged early adoption to provide feedback, noting that Dukat already powers browser and Node.js API wrappers. This tool promises to simplify integration with JavaScript libraries, reducing the friction of crossing the static-dynamic typing divide.

Enhancing Testing and Debugging with Source Maps

Testing and debugging are critical for robust applications, and Kotlin/JS delivers with integrated tools. Sebastian demonstrated how the Gradle plugin supports platform-specific test runners like Karma, allowing tests to run across browsers (e.g., Firefox, headless Chrome). Source maps, automatically generated since Kotlin 1.3.60, provide detailed stack traces for Node.js and interactive debugging in browser DevTools. Developers can set breakpoints in Kotlin code, inspect variables, and trace errors directly in Chrome’s console, as shown in Sebastian’s pong game demo. Gradle test reports further enhance diagnostics, offering HTML-based insights into test failures, making Kotlin/JS development as robust as its JVM counterpart.

Optimizing with the IR Backend

The upcoming Intermediate Representation (IR) backend marks a significant leap for Kotlin/JS. Sebastian outlined its benefits, including aggressive code size optimizations through dead code elimination. Unlike the current backend, which may ship the entire standard library, the IR backend, combined with Google Closure Compiler, reduces zipped file sizes dramatically—down to 30 KB from 3.9 MB in some cases. Faster compilation speeds, especially for incremental builds, enhance developer productivity, particularly in continuous build scenarios with Webpack’s dev server. The IR backend also supports platform-agnostic compiler plugins, simplifying multi-platform development. Sebastian noted that pre-alpha IR support in Kotlin 1.3.70 requires manual exports due to its closed-world assumption, urging developers to explore early releases.

Looking Ahead: WebAssembly and Framework Support

Sebastian concluded with a glimpse into Kotlin/JS’s future, highlighting potential support for ECMAScript 6 modules and frameworks like Angular and Vue.js. While JetBrains provides React wrappers, extending first-class support to other frameworks requires addressing their unique tooling and compilers. The IR backend also opens doors to WebAssembly, enabling Kotlin to target browsers more efficiently. Though no timelines were promised, these explorations reflect JetBrains’ commitment to aligning Kotlin/JS with modern web trends. Sebastian’s call to action—trying the Code Quiz app at the Kotlin booth and contributing to Dukat—emphasized community involvement in shaping Kotlin/JS’s evolution.

Links:

PostHeaderIcon [KotlinConf2019] Simplifying Async APIs with Kotlin Coroutines

Tom Hanley, a senior software engineer at Toast, enthralled KotlinConf2019 with a case study on using Kotlin coroutines to tame a complex asynchronous API for an Android card reader. Drawing from his work integrating a third-party USB-connected card reader, Tom shared how coroutines transformed callback-heavy code into clean, sequential logic. His practical insights on error handling, debugging, and testing offered a roadmap for developers grappling with legacy async APIs.

Escaping Callback Hell

Asynchronous APIs often lead to callback hell, where nested callbacks make code unreadable and error-prone. Tom described the challenge of working with a third-party Android SDK for a card reader, which relied on void methods and listener interfaces for data retrieval. A naive implementation to fetch device info involved mutable variables and blocking loops, risking infinite loops and thread-safety issues. Such approaches, common with legacy APIs, complicate maintenance and scalability. Tom emphasized that coroutines offer a lifeline, allowing developers to wrap messy APIs in a clean, non-blocking interface that reads like sequential code, preserving the benefits of asynchrony.

Wrapping the Card Reader API with Coroutines

To streamline the card reader API, Tom developed a Kotlin extension that replaced callback-based interactions with suspend functions. The original API required a controller to send commands and a listener to receive asynchronous responses, such as device info or errors. By introducing a suspend getDeviceInfo function, Tom enabled callers to await results directly. This extension ensured referential transparency, where functions clearly return their results, and allowed callers to control asynchrony—waiting for completion or running tasks concurrently. The approach also enforced sequential execution for dependent operations, critical for the card reader’s connection and transaction workflows.

Communicating with Channels

Effective inter-thread communication was key to the extension’s success. Rather than relying on shared mutable variables, Tom used Kotlin channels to pass events and errors between coroutines. When the listener received device info, it sent the data to a public channel; errors were handled similarly. The controller extension used a select expression to await the first event from either the device info or error channel, throwing errors or returning results as needed. Channels, with their suspending send and receive operations, provided a thread-safe alternative to blocking queues. Despite their experimental status in Kotlin 1.3, Tom found them production-ready, supported by smooth IDE migration paths.

Mastering Exception Handling

Exception handling in coroutines requires careful design, as Tom learned through structured concurrency introduced in Kotlin 1.3. This feature enforces a parent-child relationship, where canceling a parent coroutine cancels its children. However, Tom discovered that a child’s failure propagates upward, potentially crashing the app in launch coroutines if uncaught. For async coroutines, exceptions are deferred until await is called, allowing try-catch blocks to handle them. To isolate failures, Tom used supervisorJob to prevent child cancellations from affecting siblings and coroutineScope blocks to group all-or-nothing operations, ensuring robust error recovery for the card reader’s unreliable USB connection.

Debugging and Testing Coroutines

Debugging coroutines posed initial challenges, but Tom leveraged powerful tools to simplify the process. Enabling debug mode via system properties assigns unique names to coroutines, appending them to thread names and enhancing stack traces with creation details. The debug agent, a JVM tool released post-project, tracks live coroutines and dumps their state, aiding deadlock diagnosis. For testing, Tom wrapped suspend functions in runBlocking blocks, enabling straightforward unit tests. He advised using launch and async only when concurrency is needed, marking functions as suspend to simplify testing by allowing callers to control execution context.

Moving Beyond Exceptions with Sealed Classes

Reflecting on exception handling’s complexity, Tom shifted to sealed classes for error handling. Initially, errors from the card reader were wrapped in exceptions, but frequent USB failures made catching them cumbersome. Exceptions also obscured control flow and hindered functional purity. Inspired by arguments likening exceptions to goto statements, Tom adopted domain-specific sealed classes (e.g., Success, Failure, Timeout) for each controller command’s result. This approach enforced explicit error handling via when statements, improved readability, and allowed result types to evolve independently, aligning with the card reader’s diverse error scenarios.

Links:

PostHeaderIcon [KotlinConf2019] Kotlin Coroutines: Mastering Cancellation and Exceptions with Florina Muntenescu & Manuel Vivo

Kotlin coroutines have revolutionized asynchronous programming on Android and other platforms, offering a way to write non-blocking code in a sequential style. However, as Florina Muntenescu and Manuel Vivo, both prominent Android Developer Experts then at Google, pointed out at KotlinConf 2019, the “happy path” is only part of the story. Their talk, “Coroutines! Gotta catch ’em all!” delved into the critical aspects of coroutine cancellation and exception handling, providing developers with the knowledge to build robust and resilient asynchronous applications.

Florina and Manuel highlighted a common scenario: coroutines work perfectly until an error occurs, a timeout is reached, or a coroutine needs to be cancelled. Understanding how to manage these situations—where to handle errors, how different scopes affect error propagation, and the impact of launch vs. async—is crucial for a good user experience and stable application behavior.

Structured Concurrency and Scope Management

A fundamental concept in Kotlin coroutines is structured concurrency, which ensures that coroutines operate within a defined scope, tying their lifecycle to that scope. Florina Muntenescu and Manuel Vivo emphasized the importance of choosing the right CoroutineScope for different situations. The scope dictates how coroutines are managed, particularly concerning cancellation and how exceptions are propagated.

They discussed:
* CoroutineScope: The basic building block for managing coroutines.
* Job and SupervisorJob: A Job in a coroutine’s context is responsible for its lifecycle. A key distinction is how they handle failures of child coroutines. A standard Job will cancel all its children and itself if one child fails. In contrast, a SupervisorJob allows a child coroutine to fail without cancelling its siblings or the supervisor job itself. This is critical for UI components or services where one failed task shouldn’t bring down unrelated operations. The advice often given is to use SupervisorJob when you want to isolate failures among children.
* Scope Hierarchy: How scopes can be nested and how cancellation or failure in one part of the hierarchy affects others. Understanding this is key to preventing unintended cancellations or unhandled exceptions.

Cancellation: Graceful Termination of Coroutines

Effective cancellation is vital for resource management and preventing memory leaks, especially in UI applications where operations might become irrelevant if the user navigates away. Florina and Manuel would have covered how coroutines support cooperative cancellation. This means that suspending functions in the kotlinx.coroutines library are generally cancellable; they check for cancellation requests and throw a CancellationException when one is detected.

Key points regarding cancellation included:
* Calling job.cancel() initiates the cancellation of a coroutine and its children.
* Coroutines must cooperate with cancellation by periodically checking isActive or using cancellable suspending functions. CPU-bound work in a loop that doesn’t check for cancellation might not stop as expected.
* CancellationException is considered a normal way for a coroutine to complete due to cancellation and is typically not logged as an unhandled error by default exception handlers.

Exception Handling: Catching Them All

Handling exceptions correctly in asynchronous code can be tricky. Florina and Manuel’s talk aimed to clarify how exceptions propagate in coroutines and how they can be caught.
They covered:
* launch vs. async:
* With launch, exceptions are treated like uncaught exceptions in a thread—they propagate up the job hierarchy. If not handled, they can crash the application (depending on the root scope’s context and CoroutineExceptionHandler).
* With async, exceptions are deferred. They are stored within the Deferred result and are only thrown when await() is called on that Deferred. This means if await() is never called, the exception might go unnoticed unless explicitly handled.
* CoroutineExceptionHandler: This context element can be installed in a CoroutineScope to act as a global handler for uncaught exceptions within coroutines started by launch in that scope. It allows for centralized error logging or recovery logic. They showed examples of how and where to install this handler effectively, for example, in the root coroutine or as a direct child of a SupervisorJob to catch exceptions from its children.
* try-catch blocks: Standard try-catch blocks can be used within a coroutine to handle exceptions locally, just like in synchronous code. This is often the preferred way to handle expected exceptions related to specific operations.

The speakers stressed that uncaught exceptions will always propagate, so it’s crucial to “catch ’em all” to avoid unexpected behavior or crashes. Their presentation aimed to provide clear patterns and best practices to ensure that developers could confidently manage both cancellation and exceptions, leading to more robust and user-friendly Kotlin applications.

Links: