<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ahmed Zeno</title>
    <description>The latest articles on Forem by Ahmed Zeno (@jadzeino).</description>
    <link>https://forem.com/jadzeino</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F279328%2Fb6a69714-b791-48a7-99b4-bc22029f9ba0.jpg</url>
      <title>Forem: Ahmed Zeno</title>
      <link>https://forem.com/jadzeino</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jadzeino"/>
    <language>en</language>
    <item>
      <title>A Day at AWS Summit Hamburg 🇩🇪 – Innovation, AI, and Unforgettable Experiences</title>
      <dc:creator>Ahmed Zeno</dc:creator>
      <pubDate>Fri, 06 Jun 2025 20:19:28 +0000</pubDate>
      <link>https://forem.com/jadzeino/a-day-at-aws-summit-hamburg-innovation-ai-and-unforgettable-experiences-dpn</link>
      <guid>https://forem.com/jadzeino/a-day-at-aws-summit-hamburg-innovation-ai-and-unforgettable-experiences-dpn</guid>
      <description>&lt;p&gt;Yesterday, I had the pleasure of attending the &lt;strong&gt;AWS Summit in Hamburg, Germany&lt;/strong&gt;, and it was an experience to remember. The event was impeccably organized, drawing a diverse crowd of tech enthusiasts, startups, industry leaders, and cloud innovators. The atmosphere was electric, filled with curiosity, collaboration, and cutting-edge technology.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fivx55k3bbchxa56gwnnu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fivx55k3bbchxa56gwnnu.jpg" alt="AWS Summit Hamburg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Dominant Theme: Artificial Intelligence &amp;amp; Generative AI
&lt;/h3&gt;

&lt;p&gt;As anticipated, &lt;strong&gt;Artificial Intelligence (AI)&lt;/strong&gt; was the centerpiece of the summit. From keynotes to breakout sessions, the discussions revolved around how AI and &lt;strong&gt;Generative AI&lt;/strong&gt; are transforming industries. AWS showcased tools like &lt;strong&gt;Amazon Bedrock&lt;/strong&gt;, &lt;strong&gt;SageMaker&lt;/strong&gt;, and &lt;strong&gt;AWS Inferentia&lt;/strong&gt;, which are making it more accessible for organizations to build, train, and deploy AI models at scale.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2397twvebyizfz86q5iz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2397twvebyizfz86q5iz.jpg" alt="The Dominant Theme: Artificial Intelligence"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the standout sessions was &lt;strong&gt;"Gen AI in action: From POC to business value"&lt;/strong&gt;, highlighting real-world applications of generative AI and its tangible benefits for businesses.&lt;/p&gt;

&lt;h3&gt;
  
  
  🚗 How BMW Is Using Agentic AI with AWS — A Glimpse into the Smart Factory
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsnacjflzeypvavoqo4dz.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsnacjflzeypvavoqo4dz.jpeg" alt="BMW Is Using Agentic AI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the most fascinating enterprise use cases I came across at the AWS Summit was from &lt;strong&gt;BMW&lt;/strong&gt;. They’re not just using AWS for infrastructure — they’re building &lt;strong&gt;AI-powered, agent-driven systems&lt;/strong&gt; that are transforming how their factories work.&lt;/p&gt;

&lt;p&gt;BMW is working with &lt;strong&gt;Agentic AI models&lt;/strong&gt; — basically, AI agents that can &lt;strong&gt;reason, plan, and act independently&lt;/strong&gt; across complex industrial environments. These aren't just chatbots or simple automations. Think of them as intelligent assistants that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Monitor factory equipment in real time&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Analyze potential production issues before they happen&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Coordinate logistics&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Even suggest optimizations on the fly&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of this is made possible through AWS services like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS IoT&lt;/strong&gt; for device connectivity&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Amazon SageMaker&lt;/strong&gt; for training AI models&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bedrock&lt;/strong&gt; for integrating foundation models securely&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And &lt;strong&gt;Step Functions&lt;/strong&gt; to orchestrate these AI agents with logic flows&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was incredible to see how BMW is bringing the concept of the &lt;strong&gt;“smart factory”&lt;/strong&gt; to life — using AI agents to create self-optimizing, adaptive, and resilient manufacturing lines.&lt;/p&gt;

&lt;p&gt;The most impressive part? These systems aren’t just internal — BMW is designing them to be &lt;strong&gt;scalable and modular&lt;/strong&gt;, so they can be applied across different factories and workflows worldwide.&lt;/p&gt;

&lt;p&gt;This is what Agentic AI looks like in the real world. Not hypothetical. Not futuristic. Just smart, pragmatic AI that actually gets things done.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff5if7e8iy6faykylcu3y.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff5if7e8iy6faykylcu3y.jpg" alt="Kubernates"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚽ Bundesliga &amp;amp; AWS: Revolutionizing Football with AI
&lt;/h3&gt;

&lt;p&gt;A particularly fascinating case study was presented by the &lt;strong&gt;Bundesliga&lt;/strong&gt;, Germany's premier football league. They demonstrated how they're leveraging &lt;strong&gt;AI and image processing&lt;/strong&gt; through AWS to enhance both player performance analysis and fan engagement.&lt;/p&gt;

&lt;p&gt;By utilizing real-time video analysis, the Bundesliga can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Track player movements with precision&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generate tactical insights for coaches and broadcasters&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create personalized match highlight reels&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Offer interactive 3D replays for fans&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This integration of AI is not only transforming the way the game is played and analyzed but also how it's experienced by millions of fans worldwide.&lt;br&gt;
you can know more on this &lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/W4ajDcLzWXk"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  🕹️ AI-Powered Kicker Table: A Glimpse into the Future
&lt;/h3&gt;

&lt;p&gt;One of the most intriguing demos I encountered was an &lt;strong&gt;AI-powered kicker (foosball) table&lt;/strong&gt;. At first glance, it appeared to be a standard game table, but a closer look revealed a mounted camera equipped with real-time image processing capabilities.&lt;/p&gt;

&lt;p&gt;This setup could:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Detect ball movement&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Count passes and shots per player&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Analyze player strategies and reaction times&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While it was a fun and engaging demonstration, it served as a powerful example of how &lt;strong&gt;image processing and AI&lt;/strong&gt; can be applied to various industries, from manufacturing to healthcare, by providing real-time analytics and insights.&lt;/p&gt;

&lt;p&gt;Watch demo&lt;br&gt;
  &lt;iframe src="https://www.youtube.com/embed/r9Uhfoj7dOI"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  🛍️ Transforming Online Shopping with AI Avatars
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feq0jcc4tsmee9lzl2ukh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feq0jcc4tsmee9lzl2ukh.jpg" alt="Transforming Online Shopping with AI Avatars"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another groundbreaking innovation was showcased by the &lt;strong&gt;AWS Lab&lt;/strong&gt;, presenting a new approach to online shopping experiences. The demo allowed users to upload a full-body photo or video, and the AI would generate a personalized avatar.&lt;/p&gt;

&lt;p&gt;For instance, imagine a 20-year-old named Sara uploading her photo. The AI would create a video of Sara trying on different outfits, showcasing how each garment fits and moves. She could easily switch between clothing items—be it dresses, jeans, or accessories—by simply dragging them onto the canvas. Within moments, a new video would be generated, displaying Sara in the selected attire.&lt;/p&gt;

&lt;p&gt;This technology has the potential to revolutionize e-commerce by providing customers with a more interactive and personalized shopping experience, reducing the uncertainty of online purchases.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎥 Watch the Shopping Experience Demo
&lt;/h2&gt;

&lt;p&gt;Here’s a short clip I took from the AWS Lab booth showing how the AI generates a digital avatar trying out clothes:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/PLN86qDi7kQ"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  🎉 Exceptional Event Planning &amp;amp; Entertainment
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6rykfjax5m5xdedflypt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6rykfjax5m5xdedflypt.jpg" alt="Event Planning &amp;amp; Entertainment"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Beyond the tech showcases, the event organizers went above and beyond to ensure attendees were entertained and well-catered to. Some memorable highlights included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A &lt;strong&gt;giant spinning wheel&lt;/strong&gt; installation, symbolizing the idea of being "in the cloud," offering attendees a fun break and photo opportunity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Various games and activities, from classic &lt;strong&gt;arcade games like Pac-Man&lt;/strong&gt; to &lt;strong&gt;AI-based VR gaming experiences&lt;/strong&gt;, providing a blend of nostalgia and innovation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An array of food options, including &lt;strong&gt;ice cream trucks&lt;/strong&gt;, &lt;strong&gt;doner kebab stands&lt;/strong&gt;, &lt;strong&gt;croque vendors&lt;/strong&gt;, and a variety of sweet treats, ensuring everyone was well-fed and energized.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A unique booth featuring a &lt;strong&gt;comic artist&lt;/strong&gt; who would draw attendees as characters and print them as stickers—a delightful keepsake from the event.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feihmvay2r7augvx9o10k.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feihmvay2r7augvx9o10k.jpg" alt="comic artist"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And, of course, no tech event is complete without &lt;strong&gt;swag&lt;/strong&gt;. The summit didn't disappoint, offering a plethora of branded merchandise that attendees were excited to collect.&lt;/p&gt;

&lt;h3&gt;
  
  
  🌱 Startups Leading the Charge
&lt;/h3&gt;

&lt;p&gt;The startup ecosystem was vibrant, with numerous emerging companies showcasing innovative solutions built on AWS infrastructure. Some notable mentions include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GreenMetric&lt;/strong&gt;: Utilizing AI to optimize urban traffic flow and reduce emissions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;VoiceBridge&lt;/strong&gt;: Offering multilingual real-time support through LLM-powered speech translation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;NeuroVisionTech&lt;/strong&gt;: Enhancing workplace safety using computer vision and predictive analytics.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;VividLoop&lt;/strong&gt;: Delivering ultra-personalized e-commerce journeys through real-time behavioral data.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These startups exemplify how cloud technology and AI are empowering new businesses to innovate rapidly and scale efficiently.&lt;/p&gt;

&lt;h3&gt;
  
  
  💬 Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Attending the AWS Summit Hamburg was an enlightening experience. It was inspiring to witness firsthand how AI and cloud technologies are being harnessed to drive innovation across various sectors. The event seamlessly blended informative sessions with engaging activities, making it both educational and enjoyable.&lt;/p&gt;

&lt;p&gt;Kudos to AWS and all the organizers for orchestrating such a memorable event. I'm excited about the future of technology and look forward to seeing how these innovations continue to evolve.&lt;/p&gt;

&lt;p&gt;If you're exploring AI, computer vision, or building with AWS, I'd love to connect and exchange ideas!&lt;/p&gt;

&lt;h1&gt;
  
  
  AWSSummit #AWSHamburg #AI #GenerativeAI #ComputerVision #Innovation #Startups #Ecommerce #CloudComputing #TechEvents #DigitalTransformation
&lt;/h1&gt;

</description>
      <category>aws</category>
      <category>ai</category>
      <category>hamburg</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The Trickiest Interview Question I Never Saw Coming</title>
      <dc:creator>Ahmed Zeno</dc:creator>
      <pubDate>Wed, 28 May 2025 10:22:20 +0000</pubDate>
      <link>https://forem.com/jadzeino/the-trickiest-interview-question-i-never-saw-coming-lbn</link>
      <guid>https://forem.com/jadzeino/the-trickiest-interview-question-i-never-saw-coming-lbn</guid>
      <description>&lt;p&gt;I remember that once i had a job interview where things were going well, and then came the last question — the kind that really sticks with you.&lt;/p&gt;

&lt;p&gt;The interviewer leaned back and asked,&lt;strong&gt;"So, how many windows are there in Berlin?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Caught off guard, I looked at them and asked, &lt;em&gt;“Windows like Windows vs Mac, or windows like doors and windows?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;They laughed and clarified, &lt;em&gt;“Windows like windows and doors.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;At that moment, I realized this wasn’t about windows at all. It was a test — not of my general knowledge or trivia skills — but of &lt;strong&gt;how I handle ambiguity&lt;/strong&gt;, &lt;strong&gt;how I think&lt;/strong&gt;, and &lt;strong&gt;how I break down problems with missing data&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So, I took a deep breath and started doing what I do best: breaking it down.&lt;/p&gt;

&lt;h3&gt;
  
  
  Here's how I approached it:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Assumption 1&lt;/strong&gt;: Berlin has about 4 million residents.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Assumption 2&lt;/strong&gt;: Let’s say 3 people on average live in one apartment — that gives ~1.33 million residential units.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Assumption 3&lt;/strong&gt;: Each apartment might have around 6 windows. That’s ~8 million residential windows.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But that’s just the beginning.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Non-residential buildings&lt;/strong&gt;: Offices, schools, government buildings, fire stations, train stations — these might account for 30-40% of the total built area.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Assumption 4&lt;/strong&gt;: Let's assume 40% of total windows are in non-residential buildings. So that’s another ~5.3 million windows (40% of the total so far, 8M / 0.6 * 0.4).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then there’s more:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Car windows?&lt;/strong&gt; Berlin has over 1 million registered vehicles. Assuming 6 windows per car on average, that's another 6 million windows.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Buses, trains, trams&lt;/strong&gt;: Public transport counts too. Let’s roughly add another 2 million.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By then, I was sketching all of this out with pen and paper — no Mac calculator, no fancy tools. The interviewer smiled and said, &lt;em&gt;"There’s no right answer."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I landed on &lt;strong&gt;around 24 million windows&lt;/strong&gt;. Could be off by a lot — and that’s okay.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why do interviewers ask questions like this?
&lt;/h3&gt;

&lt;p&gt;They’re not testing if you know the number of windows in Berlin. They’re testing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Can you stay calm under uncertainty?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can you estimate based on assumptions?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can you &lt;strong&gt;explain your thought process&lt;/strong&gt; clearly?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do you get flustered or do you &lt;strong&gt;start building a solution, even with limited info&lt;/strong&gt;?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This type of question is common in product roles, data, consulting, and tech interviews — where problem-solving is core to the job.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to structure your answer to questions like this:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clarify the problem&lt;/strong&gt;: Ask what kind of "windows" we’re talking about.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Make clear, reasonable assumptions&lt;/strong&gt;:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*   Population

*   Household size

*   Window count per unit

*   Non-residential ratio

*   Cars and public transport

*   Other structures (warehouses, greenhouses, etc.)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Break it into categories&lt;/strong&gt;: Residential, commercial, transport, public buildings.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Estimate with numbers&lt;/strong&gt;: Don’t aim for perfect. Just reason it out.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Summarize your result&lt;/strong&gt; and acknowledge the margin of error.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Final thoughts:
&lt;/h3&gt;

&lt;p&gt;If you ever face a question like this in an interview, don’t panic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remember:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It’s not about being right. It’s about &lt;strong&gt;how you think.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stay calm. Start with assumptions. Break it down.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Be transparent in your logic and walk them through your reasoning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don’t rush. It’s okay to take a minute to think or even sketch.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The real test is: &lt;strong&gt;Can you make sense out of chaos?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was one of the most fun and challenging moments I’ve had in an interview — not because I knew the answer, but because I had the chance to show how I solve problems when there’s no clear path forward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;What’s the most unexpected interview question &lt;em&gt;you’ve&lt;/em&gt; been asked?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>interview</category>
      <category>programming</category>
      <category>criticalthinking</category>
      <category>questions</category>
    </item>
    <item>
      <title>🧠 AI Agents Are the New DevOps: How Autonomous Agents Are Redefining Software Engineering</title>
      <dc:creator>Ahmed Zeno</dc:creator>
      <pubDate>Fri, 23 May 2025 09:50:24 +0000</pubDate>
      <link>https://forem.com/jadzeino/ai-agents-are-the-new-devops-how-autonomous-agents-are-redefining-software-engineering-11fd</link>
      <guid>https://forem.com/jadzeino/ai-agents-are-the-new-devops-how-autonomous-agents-are-redefining-software-engineering-11fd</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;TL;DR: AI agents are no longer just hype—they’re becoming the autonomous co-pilots of software development, testing, deployment, and operations. Think ChatGPT meets Jenkins, but smarter, faster, and way more autonomous.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;🚀 The Rise of AI Agents&lt;br&gt;
If 2023 was the year of generative AI, 2024–2025 is shaping up to be the era of autonomous AI agents—software entities capable of reasoning, planning, and executing multi-step tasks with little to no human input.&lt;/p&gt;

&lt;p&gt;What is an AI Agent?&lt;br&gt;
An AI agent is a system that can:&lt;/p&gt;

&lt;p&gt;Perceive its environment (e.g., system logs, user feedback)&lt;/p&gt;

&lt;p&gt;Reason about what actions to take&lt;/p&gt;

&lt;p&gt;Act autonomously based on goals&lt;/p&gt;

&lt;p&gt;In short: They don’t just answer questions—they do things.&lt;/p&gt;

&lt;p&gt;Imagine asking your agent:&lt;br&gt;
“Deploy this app to production, monitor for issues, and rollback if errors spike.”&lt;br&gt;
And it actually does all of that. 🔥&lt;/p&gt;

&lt;p&gt;🛠️ The DevOps Evolution: From Pipelines to Autonomous Workflows&lt;br&gt;
Traditional DevOps tools (like Jenkins, CircleCI, ArgoCD) are built around static pipelines. But today’s environments demand dynamic, self-healing, and proactive systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq36syc9fd4nmpt5pxi3k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq36syc9fd4nmpt5pxi3k.png" alt="AI Agent Stack" width="792" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“What if your next junior developer wasn’t a person, but an AI agent that commits code, debugs, and writes tests — autonomously?”&lt;/p&gt;

&lt;p&gt;🤖 What Are AI Agents?&lt;br&gt;
AI agents go far beyond simple chat-based assistants. They're self-directed entities powered by LLMs (like GPT-4.5 or Claude 3), and they perform complex software engineering tasks like:&lt;/p&gt;

&lt;p&gt;Cloning a repo&lt;/p&gt;

&lt;p&gt;Setting up environments&lt;/p&gt;

&lt;p&gt;Making code changes&lt;/p&gt;

&lt;p&gt;Writing &amp;amp; executing tests&lt;/p&gt;

&lt;p&gt;Opening PRs with documentation&lt;/p&gt;

&lt;p&gt;These agents follow structured workflows and use tools like:&lt;/p&gt;

&lt;p&gt;🛠️ Code interpreters&lt;/p&gt;

&lt;p&gt;📦 Package managers&lt;/p&gt;

&lt;p&gt;🔍 File system readers&lt;/p&gt;

&lt;p&gt;🧪 Testing frameworks&lt;/p&gt;

&lt;p&gt;🔗 GitHub APIs&lt;/p&gt;

&lt;p&gt;They’re like mini-developers, but tireless, reproducible, and scalable.&lt;/p&gt;

&lt;p&gt;🧬 The Agent Stack&lt;br&gt;
Here's what a modern AI Agent stack might look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+-------------------------+
|        User Input       |
+-------------------------+
|       Task Planner      |
+-------------------------+
|  Reasoning LLM Engine   |
+-------------------------+
| Tool Executor (Python)  |
| Terminal / GitHub API   |
+-------------------------+
|       Memory Store      |
|   (Weaviate / Redis)    |
+-------------------------+

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Popular frameworks fueling this include:&lt;/p&gt;

&lt;p&gt;🦜 LangChain&lt;/p&gt;

&lt;p&gt;🕸️ AutoGen&lt;/p&gt;

&lt;p&gt;🔧 AgentOps&lt;/p&gt;

&lt;p&gt;⚡️ SuperAgent&lt;/p&gt;

&lt;p&gt;🚀 Real-World Use Cases&lt;br&gt;
Pull Request Automation&lt;br&gt;
AI agents review PRs, suggest changes, or even make hotfixes directly to codebases. GitHub’s Copilot Workspace is a notable example.&lt;/p&gt;

&lt;p&gt;DevOps &amp;amp; CI/CD&lt;br&gt;
Automating infrastructure changes and deploying via agents that “understand” Docker, Kubernetes, and cloud APIs.&lt;/p&gt;

&lt;p&gt;Codebase Refactoring&lt;br&gt;
Ask an agent to “convert this repo from JavaScript to TypeScript” — and watch it go to work.&lt;/p&gt;

&lt;p&gt;Legacy Code Understanding&lt;br&gt;
Agents can read through monolithic codebases and generate modern documentation or refactor code to modular microservices.&lt;/p&gt;

&lt;p&gt;🔥 Why Is This Trending?&lt;br&gt;
AI agents have crossed the hype-to-reality line. Recent improvements in:&lt;/p&gt;

&lt;p&gt;Long-context LLMs (100K+ tokens)&lt;/p&gt;

&lt;p&gt;Tool calling &amp;amp; function chaining&lt;/p&gt;

&lt;p&gt;Multi-agent collaboration (a “team” of agents)&lt;/p&gt;

&lt;p&gt;Custom tool integrations&lt;/p&gt;

&lt;p&gt;...have enabled these systems to become practical — not just theoretical.&lt;/p&gt;

&lt;p&gt;🧑‍💻 Hands-On: Create a Simple AI Dev Agent&lt;br&gt;
Here’s how to build a minimal AI coding agent using LangChain + OpenAI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install langchain openai

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { initializeAgentExecutor } from "langchain/agents";
import { OpenAI } from "langchain/llms/openai";
import { SerpAPI } from "langchain/tools";

// Init model
const model = new OpenAI({ temperature: 0 });
const tools = [new SerpAPI()];

const executor = await initializeAgentExecutor(tools, model, "zero-shot-react-description");

const result = await executor.call({
  input: "Generate a Python function to fetch weather data using OpenWeatherMap API",
});

console.log(result.output);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🚀 Result: You get fully working code and docs, generated through reasoning.&lt;/p&gt;

&lt;p&gt;🧭 Future Outlook&lt;br&gt;
AI-first Engineering Teams: One senior + a fleet of agents.&lt;/p&gt;

&lt;p&gt;Human-Agent Pair Programming: IDEs like VS Code integrating live agent assistants.&lt;/p&gt;

&lt;p&gt;Open-Source AgentOps: Managing fleets of agents like we do with Kubernetes pods.&lt;/p&gt;

&lt;p&gt;AI Agents   LLM-powered autonomous tools for complex tasks&lt;br&gt;
Key Frameworks  LangChain, AutoGen, SuperAgent&lt;br&gt;
Use Cases   Coding, refactoring, PRs, DevOps&lt;br&gt;
Future Trends   Human-agent collaboration, AI-native engineering stacks&lt;/p&gt;

&lt;p&gt;🎯 Closing Thoughts&lt;br&gt;
Autonomous AI agents are not here to replace developers. They are here to elevate your workflow — freeing you from boilerplate and giving you superpowers.&lt;/p&gt;

&lt;p&gt;Are you ready to deploy your first AI dev agent?&lt;/p&gt;

&lt;p&gt;Let me know in the comments or connect with me on GitHub — I’d love to hear how you’re using AI agents in your stack.&lt;/p&gt;

&lt;p&gt;📌 Bonus Resources:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/microsoft/autogen" rel="noopener noreferrer"&gt;Microsoft AutoGen&lt;/a&gt; – Multi-agent framework for building collaborative AI agents.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.langchain.com/" rel="noopener noreferrer"&gt;LangChain Docs&lt;/a&gt; – Documentation for building with LangChain's agent and tool abstraction.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.langchain.com/" rel="noopener noreferrer"&gt;AgentOps Playground&lt;/a&gt; – A platform for testing, managing, and deploying AI agents in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.agentops.ai/" rel="noopener noreferrer"&gt;OpenDevin (Open Source AI Dev Agent)&lt;/a&gt; – An open-source project to build an autonomous developer agent that works with your local environment.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>autonomous</category>
      <category>agents</category>
    </item>
    <item>
      <title>🚀 Why You Should Definitely Use Next.js in 2025 — From MVPs to Production</title>
      <dc:creator>Ahmed Zeno</dc:creator>
      <pubDate>Thu, 15 May 2025 08:49:12 +0000</pubDate>
      <link>https://forem.com/jadzeino/why-you-should-definitely-use-nextjs-in-2025-from-mvps-to-job-interviews-1mif</link>
      <guid>https://forem.com/jadzeino/why-you-should-definitely-use-nextjs-in-2025-from-mvps-to-job-interviews-1mif</guid>
      <description>&lt;p&gt;Whether you’re building the next unicorn startup, revamping an enterprise-grade dashboard, or simply trying to land that dream frontend job — Next.js has your back. With its latest updates, Next.js is not just a framework — it’s your best friend in modern web development.&lt;/p&gt;

&lt;p&gt;🌟 What Makes Next.js So Special? Next.js started as a React meta-framework focused on SSR (server-side rendering). Fast forward to 2025, it’s evolved into the de facto standard for serious frontend work — used by everyone from indie hackers to Fortune 500s. Why?&lt;/p&gt;

&lt;p&gt;Zero-config, full power: Routing, image optimization, SEO, and more baked-in.&lt;/p&gt;

&lt;p&gt;Hybrid rendering: Choose SSR, SSG, ISR, or client-side — per page or even per route segment.&lt;/p&gt;

&lt;p&gt;App Router: File-based routing meets server components, layouts, and streaming.&lt;/p&gt;

&lt;p&gt;First-class TypeScript support: No boilerplate, no hassle.&lt;/p&gt;

&lt;p&gt;Fast refresh + DevTools: Live updates, debugging, and profiling made joyful.&lt;/p&gt;

&lt;p&gt;🧠 What’s New in Next.js 14 &amp;amp; 15? The latest versions are nothing short of game-changing. Here are highlights:&lt;/p&gt;

&lt;p&gt;✅ Server Actions No more complex APIs for simple logic. Handle mutations directly in your server components. Clean and secure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'use server'
export async function createPost(data) {
  await db.insert(data)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📂 App Router &amp;amp; Layouts Full control over route nesting, layouts, and page structure.&lt;/p&gt;

&lt;p&gt;Nested layouts = maintain state between pages.&lt;/p&gt;

&lt;p&gt;Streaming = faster loading experience.&lt;/p&gt;

&lt;p&gt;React Server Components = less JavaScript sent to client.&lt;/p&gt;

&lt;p&gt;⚙️ Turbopack (beta) Webpack is out. Turbopack is in. It’s fast, Rust-based, and native to Next.js. Goodbye long build times.&lt;/p&gt;

&lt;p&gt;🖼️ Image &amp;amp; Font Optimization Image optimization is now automatic and even smarter. Font loading is faster and privacy-friendly (no Google Fonts call if local).&lt;/p&gt;

&lt;p&gt;🧪 Middleware and Edge Functions Want personalized experiences at scale? Edge middleware lets you run logic close to your users for geo-based rendering, A/B testing, auth, and more.&lt;/p&gt;

&lt;p&gt;💼 Why Next.js Is a Job Hunter’s Secret Weapon Here’s why adding Next.js to your resume is like adding rocket fuel to your job search:&lt;/p&gt;

&lt;p&gt;Most companies already use it — so you’re job-ready on day one.&lt;/p&gt;

&lt;p&gt;It proves you’re “beyond just React” — you understand routing, rendering strategies, and performance.&lt;/p&gt;

&lt;p&gt;Great for portfolio projects — fast setup, beautiful DX, and SSR for SEO (recruiters will actually find your site!).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq47powo75dl3y6u4v0lj.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq47powo75dl3y6u4v0lj.webp" alt="compare next.js vs Vite.js vs CRA" width="785" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🛠️ Why It’s Perfect for Both MVPs and Large Projects For MVPs: You get routing, API routes, Tailwind, and deployment to Vercel — out of the box. You’ll ship in days, not weeks.&lt;/p&gt;

&lt;p&gt;For Complex Apps: Advanced data fetching, modular architecture, caching, edge logic, internationalization — it scales as you do.&lt;/p&gt;

&lt;p&gt;🌈 Ready to Level Up? Let Next.js Be Your Superpower Next.js is more than a framework. It’s your shortcut to performance, polish, and professionalism. Whether you’re freelancing, interviewing, or scaling your app to thousands of users — it’s built to help you succeed.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>react</category>
      <category>mvp</category>
      <category>frontend</category>
    </item>
    <item>
      <title>The “Dead Horse Theory”</title>
      <dc:creator>Ahmed Zeno</dc:creator>
      <pubDate>Thu, 15 May 2025 08:43:30 +0000</pubDate>
      <link>https://forem.com/jadzeino/the-dead-horse-theory-23n</link>
      <guid>https://forem.com/jadzeino/the-dead-horse-theory-23n</guid>
      <description>&lt;p&gt;The “Dead Horse Theory” is a satirical metaphor that illustrates how some individuals, institutions, or nations handle obvious, unsolvable problems. Instead of accepting reality, they cling to justifying their actions.&lt;/p&gt;

&lt;p&gt;The core idea is simple: if you realize you’re riding a dead horse, the most sensible thing to do is dismount and move on.&lt;/p&gt;

&lt;p&gt;However, in practice, the opposite often happens. Instead of abandoning the dead horse, people take actions such as:&lt;/p&gt;

&lt;p&gt;Buying a new saddle for the horse.&lt;br&gt;
Improving the horse’s diet, despite it being dead.&lt;br&gt;
Changing the rider instead of addressing the real problem.&lt;br&gt;
Firing the horse caretaker and hiring someone new, hoping for a different outcome.&lt;br&gt;
Holding meetings to discuss ways to increase the dead horse’s speed.&lt;br&gt;
Creating committees or task forces to analyze the dead horse problem from every angle. These groups work for months, compile reports, and ultimately conclude the obvious: the horse is dead.&lt;br&gt;
Justifying efforts by comparing the horse to other similarly dead horses, concluding that the issue was a lack of training.&lt;br&gt;
Proposing training programs for the horse, which means increasing the budget.&lt;br&gt;
Redefining the concept of “dead” to convince themselves the horse still has potential.&lt;br&gt;
The Lesson:&lt;/p&gt;

&lt;p&gt;This theory highlights how many people and organizations prefer to deny reality, wasting time, resources, and effort on ineffective solutions instead of acknowledging the problem from the start and making smarter, more effective decisions.&lt;/p&gt;

</description>
      <category>management</category>
      <category>startup</category>
      <category>programming</category>
      <category>business</category>
    </item>
    <item>
      <title>Difference between POC, Prototype, Pilot and MVP!</title>
      <dc:creator>Ahmed Zeno</dc:creator>
      <pubDate>Sun, 07 Feb 2021 19:55:53 +0000</pubDate>
      <link>https://forem.com/jadzeino/difference-between-poc-prototype-pilot-and-mvp-ion</link>
      <guid>https://forem.com/jadzeino/difference-between-poc-prototype-pilot-and-mvp-ion</guid>
      <description>&lt;p&gt;We are using this terms in our meetings or workshops, Sprint planning and Features discussions. and i noticed that a lot of people don't understand the difference between them so i decide to shade some lights and explain them quickly here. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Proof of concept(POC)&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7qhtgq6o1n3a5ctue4cf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7qhtgq6o1n3a5ctue4cf.jpg" alt="Alt Text" width="800" height="355"&gt;&lt;/a&gt;&lt;br&gt;
A proof of concept often involves a small exercise to test the real-world potential of an incomplete idea. This isn’t about delivering the idea, but demonstrating whether it is feasible. It should be used in the early stages when you first have an instinct about an idea. A proof of concept shows if a product, feature or system can be developed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;for example,&lt;/strong&gt; We had a request from our marketing team where they where using some tool to manually upload some images and videos to some marketing partners (Facebook for example) and their request was to find a way so we automate the process without the need to the user interaction and authentication of the 3rd party. the proof of concept was written code to test the FB Api to allow a user agent code to behave on behalf of the normal user.&lt;br&gt;
we wrote simple code do a couple of test and then proofed that its working and its possible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Prototype&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffv8oq1z6i53e6kqjltzz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffv8oq1z6i53e6kqjltzz.jpg" alt="Alt Text" width="800" height="413"&gt;&lt;/a&gt;&lt;br&gt;
A prototype is the visible, tangible or functional manifestation of an idea, which you test with others and learn from at an early stage of the development process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;for example&lt;/strong&gt; , We wanted to develop a tool for our marketing department, they were not sure about what they really need, also we didn't want to start developing on un-certin and sold ground, so we decide to give them Prototype where we used simplified UI tool and relay on Browser database(IndexedDB), where we able to give them a version that they can use to verify what they really want.&lt;br&gt;
By doing so , we where able to put every stakeholder involve in this App on the same page and giving him the ability to demonstrate his needs and concerns.  &lt;/p&gt;

&lt;p&gt;Prototypes should be used when you have a hypothesis about a solution, but there is still uncertainty about how it looks, feels and works. Insights from testing can then be used to improve the idea. By developing and improving the prototype, you can maximise what you learn and refine your idea. This helps you move from a version with little detail or functionality (like a rough draft that illustrates the idea) to a version with much more detail and functionality (giving test-users a better sense of how it works).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Pilots&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvov9l9nwdh7ek439i7sf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvov9l9nwdh7ek439i7sf.jpg" alt="Alt Text" width="661" height="300"&gt;&lt;/a&gt;&lt;br&gt;
Pilots are often used as the first stage of a new policy or service rollout.&lt;br&gt;
Pilots should be used when you believe you have an effective solution and are looking to iron out the creases and understand how it works in reality. By offering a partially implemented concept to a limited segment of users, it is possible to see what actually happens.&lt;br&gt;
This is useful when preparing to scale a solution to a wider group. Pilots, however, are ultimately measured by success or failure, and there is usually only room to make minor tweaks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Minimum Viable Product (MVP)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An MVP allows you to accelerate your learning about a possible solution whilst using minimal resources. It does this by testing only the essential core of your concept (rather than the full solution) with real users in practice. This means that you can find out early on if there is an actual need or demand for the solution, what is working and what isn’t, and make any adjustments accordingly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;for example,&lt;/strong&gt; Game development companies do a lot of MVPs where they do tests on specific amount of populations or users. to study and Analysis possible Future products in an early stages. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Proof of concepts and prototypes are usually developed and tested within a controlled environment – such as in a workshop or lab workplace – although some prototypes are tested out in the field. Pilots and MVPs, on the other hand, are usually tested in the real world.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;this table show the usages criteria&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fy51k8sxlk8okllofxdy4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fy51k8sxlk8okllofxdy4.png" alt="Alt Text" width="800" height="572"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;references and credits goes to this nice Artikel here: &lt;a href="https://www.nesta.org.uk/blog/proof-of-concept-prototype-pilot-mvp-whats-in-a-name/" rel="noopener noreferrer"&gt;https://www.nesta.org.uk/blog/proof-of-concept-prototype-pilot-mvp-whats-in-a-name/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;i hope this explanation might help you with your next project.&lt;br&gt;
thanks&lt;/p&gt;

</description>
      <category>poc</category>
      <category>prototype</category>
      <category>pilot</category>
      <category>mvp</category>
    </item>
    <item>
      <title>Console/Terminal Messages styling done right. Introducing CHALK</title>
      <dc:creator>Ahmed Zeno</dc:creator>
      <pubDate>Wed, 27 May 2020 17:40:09 +0000</pubDate>
      <link>https://forem.com/jadzeino/console-terminal-messages-styling-done-right-introducing-chalk-2fje</link>
      <guid>https://forem.com/jadzeino/console-terminal-messages-styling-done-right-introducing-chalk-2fje</guid>
      <description>&lt;p&gt;Did you face a situation where you wanted to show console messages with different colors ?&lt;/p&gt;

&lt;p&gt;Yeah it can be done easily in the browser!&lt;/p&gt;

&lt;p&gt;example,On Chrome &amp;amp; Firefox you can add CSS in console.log messages&lt;/p&gt;

&lt;p&gt;like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log('%c%s','background: #c7c7c7; color: #fdfd10; font-size: 24px;' , 'This could be you warning message with Gray background');

console.log('%c%s','background: #222; color: #13ff1c; font-size: 24px;' , 'This could be you Success Message with black background');

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhicy3l8s2uw7a4vhb7ap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhicy3l8s2uw7a4vhb7ap.png" alt="better console debug" width="800" height="126"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NICE....&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0iuq65qq6sn814f4xeup.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0iuq65qq6sn814f4xeup.gif" alt="nice console" width="478" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can wrap it as a function that takes the console message type and apply styling before logging that :-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const logMessage =(message, mType) =&amp;gt;{
  let color    = "black";
  let bgColor  = "white";
  let fontSize = "12px";
     switch (mType) {
         case "warning":  
              color = "yellow";
              bgColor = "Gray";
              fontSize ="30px";
              break;         
         case "info":     
               color = "gray";
               bgColor = "cyan";
               fontSize ="30px";
              break;
         case "error":   
              color = "red";
              bgColor = "blue";
              fontSize ="30px";
              break;
         case "success":  
              color = "green";
              bgColor = "pink";
              fontSize ="30px";
              break;
     }

     console.log(`%c${message}`, `color:${color}; background-color:${bgColor}; font-size:${fontSize};`)
}

logMessage('Test Warning Message:', 'warning')
logMessage('Test Info Message:', 'info')
logMessage('Test Error Message:', 'error')
logMessage('Test Message Success:', 'success')

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnnxec1x3roqfqve9b58a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnnxec1x3roqfqve9b58a.png" alt="nice console" width="637" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another nice way to console complex data is to use the console.table:-&lt;br&gt;
Lets say that you have an object and you wanna check it in the console in an understandable nice way then the console table is the answer&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const employee ={name:"Ahmed",age:"36",country:"Jordan"};
console.table(employee); 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flh1za5zk1q6u6yx1jiqe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flh1za5zk1q6u6yx1jiqe.png" alt="table console of object" width="800" height="208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OK ok... thats cool and nice but what about the terminal ?&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhzu5eibp9jpju9qhcvmm.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhzu5eibp9jpju9qhcvmm.gif" alt="cool" width="500" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Will Meet CHALK ,&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/chalk" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/chalk&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fw947mhc01sn9n935fd0b.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fw947mhc01sn9n935fd0b.jpeg" alt="Alt Text" width="331" height="152"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A very nice npm package that allow you to style the console messages&lt;br&gt;
it support nested styling.&lt;/p&gt;

&lt;p&gt;really easy to use: just import the package and call chalk.neededColor&lt;br&gt;
inside your console.log() statement&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const chalk = require('chalk');
console.log(chalk.blue('Hello world!'));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;it allows for a lot of stuff&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ft35jyacg2znqb6pyofsh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ft35jyacg2znqb6pyofsh.png" alt="Alt Text" width="747" height="104"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;// Combine styled and normal strings&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;log(chalk.blue('Hello') + ' World' + chalk.red('!'));&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;// Compose multiple styles using the chainable API&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;log(chalk.blue.bgRed.bold('Hello world!'));&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;// Pass in multiple arguments&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;// Nest styles&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Its Also allow you to define your own them , just like what did we do with our previous logMessage function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const chalk = require('chalk');
//define message type and reuse them whenever you want
const warning = chalk.bold.yellow;
const info = chalk.bold.blue;
const error = chalk.bold.red;
const success = chalk.bold.green;

console.log(warning('Warning!'));
console.log(info('Info!'));
console.log(error('Error!'));
console.log(success('Success!'));

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;here is an example of last message of my terminal today&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flrdmt7tlw2onytiznyy7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flrdmt7tlw2onytiznyy7.png" alt="Alt Text" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope You Like it&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg4ix1aj0rzeqqqz0mzug.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg4ix1aj0rzeqqqz0mzug.gif" alt="Alt Text" width="504" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>terminal</category>
      <category>styling</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Writing A Nested Checkbox Component with React / React-Admin</title>
      <dc:creator>Ahmed Zeno</dc:creator>
      <pubDate>Sat, 02 May 2020 13:22:27 +0000</pubDate>
      <link>https://forem.com/jadzeino/writing-a-nested-checkbox-component-with-react-react-admin-1hb5</link>
      <guid>https://forem.com/jadzeino/writing-a-nested-checkbox-component-with-react-react-admin-1hb5</guid>
      <description>&lt;p&gt;so i was searching for a quick plugin to show nested checkbox for my react project and unfortunately most of what iv'e found wasn't as i was expecting, at-least for my needs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8febpyc591aej48kxwge.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8febpyc591aej48kxwge.gif" alt="Alt Text" width="1024" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;i wanted to create a checkbox with network name and its has instances as children checkboxes , if u click on the network it will work as a toggle button to select all instances within this network, while you still have the option to select instances individually and if all instances were selected change the network to checked u know the usual toggle behaviour.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2bmpa1aqdg6awzqhzgyo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2bmpa1aqdg6awzqhzgyo.jpg" alt="Alt Text" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;so i decide to write a quick one and thought it might be handy for some of you guy.&lt;/p&gt;

&lt;p&gt;ill show 2 nested checkbox here one using react with redux and the 2nd will use a react-admin component&lt;/p&gt;

&lt;p&gt;first ill create some dummy data:-&lt;br&gt;
this is an array of objects that have network and instances&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const networks = [{
        name: "Network_A",
        id: 1,
        instances: [{
                id: 0,
                instanceName: "Instance_1"
            },
            {
                id: 1,
                instanceName: "Instance_2"
            }
        ]
    },
    {
        name: "Network_B",
        id: 33,
        instances: [{
                id: 0,
                instanceName: "Instance_1",
            },
            {
                id: 1,
                instanceName: "Instance_2",
            },

            {
                id: 2,
                instanceName: "Instance_3",
            }
        ]
    }
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;ok cool now what ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;lets write our class and call it &lt;em&gt;CheckboxesGroup&lt;/em&gt;&lt;br&gt;
the class will use some ready controllers from material-ui&lt;/p&gt;

&lt;p&gt;like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react'
import FormLabel from '@material-ui/core/FormLabel'
import FormControl from '@material-ui/core/FormControl'
import FormGroup from '@material-ui/core/FormGroup'
import FormControlLabel from '@material-ui/core/FormControlLabel'
import FormHelperText from '@material-ui/core/FormHelperText'
import Checkbox from '@material-ui/core/Checkbox'
import {PropTypes} from 'prop-types'
import { Field } from 'redux-form'

class CheckboxesGroup extends React.Component {
    static propTypes = {
        name: PropTypes.string.isRequired,
        instances: PropTypes.array.isRequired
    }

    constructor(props) {
        super(props)

        this.classes = {
            root: {
                display: 'flex'
            },
            formControl: {
                margin: '3px',
                float: 'left'
            }
        }
        const networkName = props.name

        const instances = props.instances.map(item =&amp;gt; {
            return {name: item.instanceName, value: false}
        })

        this.onChange=props.onChange

        this.state = {
            networkName,
            checkedAll: false,
            instances
        }
        this.handleChange.bind(this)
    }

    render() {
        const {checkedAll} = this.state
        const checkboxes = this.state.instances.map(i =&amp;gt; {
            const instanceName=i.name            
            return (
                &amp;lt;FormControlLabel
                    style={{width: '200px'}}
                    control={
                        &amp;lt;Field name={`${instanceName}`} type="checkbox" component={renderInnerCheckboxField} label="instances" checked={checkedAll || i.value} onChange={this.handleChange(i.name)} value={i.value.toString()}/&amp;gt;

                    }
                    label={i.name}
                    key={i.name + i.value}
                &amp;gt; &amp;lt;/FormControlLabel&amp;gt;
            )
        })
        const networkName=this.state.networkName
        return (
            &amp;lt;div className={this.classes.root.toString()}&amp;gt;
                &amp;lt;br /&amp;gt;
                &amp;lt;FormControl
                    component="fieldset"
                    className={this.classes.formControl.toString()}
                &amp;gt;
                    &amp;lt;FormLabel
                        component="legend"
                        style={{fontWeight: 'bold', fontSize: '20px'}}
                    &amp;gt;
                        {this.state.networkName}
                        &amp;lt;FormControlLabel
                            label="Select All"
                            control={
                                &amp;lt;div&amp;gt;
                                    &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;
                                    &amp;lt;Field name={`network ${networkName}`} type="checkbox" checkboxes={checkboxes} component={renderCheckboxField} label="Sellect all in" checked={checkedAll} onChange={event =&amp;gt; {
                                        this.setState({
                                            checkedAll: event.target.checked
                                        })
                                    }}/&amp;gt;
                                &amp;lt;/div&amp;gt;
                            }
                        /&amp;gt;
                    &amp;lt;/FormLabel&amp;gt;
                    &amp;lt;FormGroup style={{display: 'flow-root'}}&amp;gt;
                        {checkboxes}
                    &amp;lt;/FormGroup&amp;gt;
                    &amp;lt;FormHelperText&amp;gt;
                        --------------------------------------------------------------------------------
                    &amp;lt;/FormHelperText&amp;gt;
                &amp;lt;/FormControl&amp;gt;
            &amp;lt;/div&amp;gt;
        )
    }

    handleChange(name) {
        const _this = this
        return function(event) {            
            const instances = _this.state.instances.map(i =&amp;gt; {
                if (i.name === name) {
                    console.log(event.target.checked)
                    return {name, value: event.target.checked}
                }

                return i
            })

            _this.setState({
                ..._this.state,
                instances
            })
            setTimeout(
                () =&amp;gt; {                    
                    _this.onChange(_this.state)
                },
                500
            )
        }
    }
}


const renderCheckboxField = (props) =&amp;gt; {
    const { input, label, meta} = props
    console.log("...custom   ",props)
    return (
        &amp;lt;Checkbox
            label={label}
            {...input}

        /&amp;gt;
    )}
const renderInnerCheckboxField = ({ input, label, meta: { touched, error }, ...custom }) =&amp;gt; {

    return (
        &amp;lt;Checkbox
            label={label}
            error={!!(touched &amp;amp;&amp;amp; error)}
            helperText={touched &amp;amp;&amp;amp; error}
            {...input}
            {...custom}
        /&amp;gt;
    )}
export default CheckboxesGroup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;now you can call it inside you form or any render component&lt;br&gt;
in my case i put it inside a FormTab like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;FormTab label="Networks &amp;amp; Instances"&amp;gt;   
   {networks.map(network =&amp;gt;
       (&amp;lt;CheckboxesGroup {...network} source="networks" key={network.name} /&amp;gt;)
   )}

&amp;lt;/FormTab&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;but after this one i realised that i was complexing things up so , idid a quicker one with simple components from react admin&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fii2gubm7b9sp4obgj84k.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fii2gubm7b9sp4obgj84k.gif" alt="Alt Text" width="500" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and here is the one for &lt;strong&gt;react-admin&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react'
import {CheckboxGroupInput} from 'react-admin'i
import {FormSpy , useForm} from 'react-final-form'
import {BooleanInput} from 'react-admin'

const Instance = ({record}) =&amp;gt; {
    return (
        &amp;lt;div key={record.instanceName} className="instances"&amp;gt;
            {record.instanceName + ' - ' + record.name}
        &amp;lt;/div&amp;gt;
    )
}


const SelectAllBtn = props =&amp;gt; {
    const {network} = props
    const form = useForm()
    return (
        &amp;lt;BooleanInput
            label={network.name}
            key={network.id}
            source={`network.n_${network.id}`}
            onChange={e =&amp;gt; {
                let instances = []
                if (e) {
                    instances = network.instances.map(i =&amp;gt; i.id)
                }

                form.change('networks.n_' + network.id, instances)
            }}
        /&amp;gt;
    )
}

export const NetworkInstances = ({gameNetworks}) =&amp;gt; {
    if (gameNetworks) {
        return gameNetworks.map(network =&amp;gt; {
            if (network.instances.length &amp;gt; 1) {
                return (
                    &amp;lt;div key={network.name}&amp;gt;
                        &amp;lt;FormSpy&amp;gt;
                            {props =&amp;gt; {
                                return (
                                    &amp;lt;SelectAllBtn
                                        network={network}
                                        form={props}
                                    /&amp;gt;
                                )
                            }}
                        &amp;lt;/FormSpy&amp;gt;

                        &amp;lt;CheckboxGroupInput
                            source={`networks.n_${network.id}`}
                            choices={network.instances}
                            optionText={&amp;lt;Instance /&amp;gt;}
                            key={network.id}
                            id={`n_${network.id}`}
                            label={network.name}
                        /&amp;gt;
                    &amp;lt;/div&amp;gt;
                )
            }

            return (
                &amp;lt;CheckboxGroupInput
                    source={`networks.n_${network.id}`}
                    choices={network.instances}
                    optionText={&amp;lt;Instance /&amp;gt;}
                    key={network.id}
                    id={`n_${network.id}`}
                    label={network.name}
                /&amp;gt;
            )
        })
    }

    return &amp;lt;div /&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and just like the previous one you can use it  directly in the render&lt;br&gt;
function with passing the source or the api call&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;FormTab label="Networks &amp;amp; Instances" path="networks"&amp;gt;
                        &amp;lt;NetworkInstances
                            gameNetworks={networks}                            
                        /&amp;gt;
&amp;lt;/FormTab&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you have any questions feel free to ask me &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F96lf3kz935775pr36j6f.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F96lf3kz935775pr36j6f.gif" alt="Alt Text" width="401" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>checkbox</category>
      <category>nested</category>
    </item>
    <item>
      <title>How To Cache Your Javascript Functions ? Meet the Memoization Technique!</title>
      <dc:creator>Ahmed Zeno</dc:creator>
      <pubDate>Thu, 02 Apr 2020 17:31:00 +0000</pubDate>
      <link>https://forem.com/jadzeino/how-to-cache-your-javascript-functions-meet-the-memoization-technique-2i2l</link>
      <guid>https://forem.com/jadzeino/how-to-cache-your-javascript-functions-meet-the-memoization-technique-2i2l</guid>
      <description>&lt;p&gt;&lt;strong&gt;First : what was the problem today ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzxd48l9ijz572qvyi7kp.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzxd48l9ijz572qvyi7kp.gif" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I had a simple React-Admin form with a Text Input Component (That writes the UserName) and some other components, and this Text input had a validate function which was calling an api and checking if the entered UserName wasn’t already taken.&lt;/p&gt;

&lt;p&gt;The problem was that whenever I changed other component values the validate function was triggered , because this is how react admin form works.&lt;/p&gt;

&lt;p&gt;And i wanted to have a function that cache the entered username locally and only do the api call if the username wasn’t checked already.&lt;/p&gt;

&lt;p&gt;In  normal situations this is no problem , you can just manipulate the time to call the validation for example when your component loses focus like using onBlure listener.&lt;/p&gt;

&lt;p&gt;However as i said before the react admin behaves in a different way, so i was reading around and i end up reading about Function Memoization&lt;/p&gt;

&lt;p&gt;And i thought i should share with you guys what i found and how it worked for me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So what is Memoization Technique?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F030hn7f2gk993cwix1b8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F030hn7f2gk993cwix1b8.gif" width="1024" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls and returning the cached result when the same inputs occur again.&lt;/p&gt;

&lt;p&gt;Well i found this great article from this great Author &lt;strong&gt;Divyanshu Maithani&lt;/strong&gt;&lt;br&gt;
On freecodecap.org you can check it here &lt;a href="https://bit.ly/3dIfunv" rel="noopener noreferrer"&gt;https://bit.ly/3dIfunv&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;who I am quitting and using some examples from his article to help spread the knowledge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does this mean?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Memoizing in simple terms means memorizing or storing in memory. A memoized function is usually faster because if the function is called subsequently with the previous value(s), then instead of executing the function, we would be fetching the result from the cache.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ok, show me some examples!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lets say that you have a function that return the factorial of a number&lt;br&gt;
Lets call it &lt;strong&gt;getFactorial&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function getFactorial(n) {
    // Calculations: n * (n-1) * (n-2) * ... (2) * (1)
    return factorial
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great, now let’s find&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;getFactorial(50)&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;The computer will perform calculations and return us the final answer, sweet!&lt;br&gt;
When that’s done, let’s find&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;getFactorial(51)&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;The computer again performs a number of calculations and gets us the result, but you might have noticed that we’re already repeating a number of steps that could have been avoided. &lt;/p&gt;

&lt;p&gt;An optimized way would be:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;getFactorial(51) = getFactorial(50) * 51&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;But our function performs the calculations from scratch every time it’s called:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;getFactorial(51) = 51 * 50 * 49 * ... * 2 * 1&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Wouldn’t it be cool if somehow our getFactorial function could remember the values from its previous calculations and use them to speed up the execution?&lt;br&gt;
Here’s what a simple memoized function might look like&lt;/p&gt;

&lt;p&gt;// a simple function to add something&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const add = (n) =&amp;gt; (n + 10);
add(9);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;// a simple memoized function to add something&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const memoizedAdd = () =&amp;gt; {
  let cache = {};
  return (n) =&amp;gt; {
    if (n in cache) {
      console.log('Fetching from cache');
      return cache[n];
    }
    else {
      console.log('Calculating result');
      let result = n + 10;
      cache[n] = result;
      return result;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;// returned function from memoizedAdd&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const newAdd = memoizedAdd();&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;



&lt;p&gt;&lt;code&gt;console.log(newAdd(9)); // calculated&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;



&lt;p&gt;&lt;code&gt;console.log(newAdd(9)); // cached&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some takeaways from the above code are:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F66hz3nkvl9tx9d6rom00.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F66hz3nkvl9tx9d6rom00.gif" width="1024" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;---  memoizedAdd returns a function which is invoked later. This is possible because in JavaScript, functions are first class objects which lets us use them as &lt;a href="http://eloquentjavascript.net/05_higher_order.html#h_xxCc98lOBK" rel="noopener noreferrer"&gt;higher order functions &lt;/a&gt; and return another function.&lt;/p&gt;

&lt;p&gt;---  cache can remember its values since the returned function has a &lt;a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Closures" rel="noopener noreferrer"&gt;closure&lt;/a&gt; over it.&lt;/p&gt;

&lt;p&gt;---  It’s essential that the memoized function is pure. A &lt;a href="https://medium.com/javascript-scene/master-the-javascript-interview-what-is-a-pure-function-d1c076bec976" rel="noopener noreferrer"&gt;pure&lt;/a&gt; function will return the same output for a particular input no matter how many times it’s called, which makes the cache work as expected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So how to write a generic memoized function ?&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const memoizedFunction = (fn) =&amp;gt; {
  let cache = {};
  return (value) =&amp;gt; {    
    if (value in cache) {
      console.log('Fetching from cache');
      return cache[value];
    }
    else {
      console.log('executing and fetching results');
      let result = fn(value);
      cache[value] = result;
      return result;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can pass your function to this memoizedFunction .&lt;br&gt;
In my case, my function was like this:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const alreadyExists = async value =&amp;gt; {
   return dataProvider
       .getOne(username, {id: value})
       .then(({data}) =&amp;gt; (data &amp;amp;&amp;amp; data.id ? 'UserName Already Exists' : null ))
       .catch(error =&amp;gt; {
           console.log(error)
       })
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const memoizedUsername = memoizedFunction(alreadyExists);
const validateUsername = [required(), minLength(3),memoizedUsername]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;SimpleForm
   toolbar={&amp;lt;CreateToolbar /&amp;gt;}
   redirect="list"
   validate={validateTimeframe}
   validateOnBlur
   submitOnEnter={false}
  &amp;gt;
  &amp;lt;TextInput
       source="voucherCode"
       validate={validateUsername }
   /&amp;gt;
.
.
.
&amp;lt;/SimpleForm&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;So for example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; console.log(validateUsername(SuperHero));
  // calculated and will return null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; console.log(validateUsername(SuperHero));
  // cached and will return UserName Already Exists
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; console.log(validateUsername(username1234));
  // calculated  and will return null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Is memoization same as caching?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes, kind of. Memoization is actually a specific type of caching. While caching can refer in general to any storing technique (like &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching" rel="noopener noreferrer"&gt;HTTP caching&lt;/a&gt; ) for future use, memoizing specifically involves caching the return values of a function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the limitation of Memoization?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmbjhfrrphej8yzrc2vtc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmbjhfrrphej8yzrc2vtc.gif" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;--- In order to memoize a function, it should be pure so that return values are the same for same inputs every time.&lt;/p&gt;

&lt;p&gt;--- Memoizing is a trade-off between added space and added speed and thus only significant for functions having a limited input range so that cached values can be made use of more frequently.&lt;/p&gt;

&lt;p&gt;--- It might look like you should memoize your API calls however it isn’t necessary because the browser automatically caches them for you. See &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching" rel="noopener noreferrer"&gt;HTTP caching&lt;/a&gt; for more detail.&lt;/p&gt;

&lt;p&gt;--- The best use case I found for memoized functions is for heavy computational functions which can significantly improve performance (factorial and fibonacci are not really good real world examples).&lt;/p&gt;

&lt;p&gt;--- If you’re into React/Redux you can check out reselect which uses a memoized &lt;a href="https://github.com/reactjs/reselect#creating-a-memoized-selector" rel="noopener noreferrer"&gt;selector&lt;/a&gt; to ensure that calculations only happen when a change happens in a related part of the state tree.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>cache</category>
      <category>memoization</category>
    </item>
    <item>
      <title>Can we assign css to dynamic Generated Classes? YES we can</title>
      <dc:creator>Ahmed Zeno</dc:creator>
      <pubDate>Thu, 27 Feb 2020 08:48:32 +0000</pubDate>
      <link>https://forem.com/jadzeino/can-we-assign-css-to-dynamic-generated-classes-yes-we-can-3bo9</link>
      <guid>https://forem.com/jadzeino/can-we-assign-css-to-dynamic-generated-classes-yes-we-can-3bo9</guid>
      <description>&lt;p&gt;I have a class called .form-123 where the number changes every time the screen is refreshed. Is there a way to define this field (say background-color or margin) in the CSS?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Yes it is possible just by using CSS only, and there is 3 ways to do that&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn3hhu4a6exgac0n3jqkg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn3hhu4a6exgac0n3jqkg.gif" alt="Alt Text" width="245" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option #1 - Match by prefix value&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use CSS Class selector ^="class" which select all elements whose class is prefixed by "form-"&lt;/p&gt;

&lt;p&gt;example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[class^="form-"] {
  background: red;
  height: 100px;
  width: 100px;
  margin: 10px 0;
  display:block
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="box-123"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;span class="box-124"&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;article class="box-125"&amp;gt;&amp;lt;/article&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ft3n505wekhfiruzvey2z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ft3n505wekhfiruzvey2z.png" alt="Alt Text" width="324" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option #2 - Match by contains at least one value&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use another CSS class selector *="class" (equivalent to CSS attribute selector) which select all elements whose class contains at least one substring "form-".&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[class*="form-"] {
  background: red;
  height: 100px;
  width: 100px;
  margin: 10px 0;
  display:block
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="form-123"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;span class="form-124"&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;article class="form-125"&amp;gt;&amp;lt;/article&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ft3n505wekhfiruzvey2z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ft3n505wekhfiruzvey2z.png" alt="Alt Text" width="324" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option #3 - Add an additional class to the element, then both those elements will have the class' CSS attributes:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.form-123 {
  background: blue;
  height: 100px;
  width: 100px;
  margin: 10px 0;
  display:block
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;extra-class {
  background: blue !important;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fn86liu5cybe5toqivu2q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fn86liu5cybe5toqivu2q.png" alt="Alt Text" width="120" height="112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzeou5bw0tw3bjo83n2rg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzeou5bw0tw3bjo83n2rg.gif" alt="Alt Text" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>javascript</category>
      <category>html</category>
    </item>
    <item>
      <title>How To Check if a Text Have Weird Characters</title>
      <dc:creator>Ahmed Zeno</dc:creator>
      <pubDate>Tue, 03 Dec 2019 18:20:52 +0000</pubDate>
      <link>https://forem.com/jadzeino/how-to-check-if-a-text-have-weird-characters-1im6</link>
      <guid>https://forem.com/jadzeino/how-to-check-if-a-text-have-weird-characters-1im6</guid>
      <description>&lt;p&gt;&lt;strong&gt;So how to know if ur text have strange characters or not ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I've got a bug ticket from our QA says that the text style doesn't display as it should be when the language is Japanese.&lt;/p&gt;

&lt;p&gt;In the beginning I tried to check the css and played around to find a css solution that supports all browsers and i thought it might be a font issue , then i realised that i need to do some changes on the code, so i decided i should check if the text has this weird cases(alphabets) or not.&lt;/p&gt;

&lt;p&gt;so I wanted to do a quick a check if my text include Japanese characters and i ended up using this code.&lt;br&gt;
It usages regular expressions&lt;/p&gt;

&lt;p&gt;regex = /[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B/g; &lt;br&gt;
var input = "ビッグファームへようこそ！"; &lt;/p&gt;

&lt;p&gt;if(regex.test(input)) {&lt;br&gt;
    console.log("Japanese characters found")&lt;br&gt;
}&lt;br&gt;
else {&lt;br&gt;
    console.log("No Japanese characters");&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foifzzmyd1bdyubunfokt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foifzzmyd1bdyubunfokt.png" alt="Alt Text" width="800" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And it worked for me and I started to understand the issue ,but what if u want to check the other languages like Chinese, Deutsche, Russian …….etc&lt;/p&gt;

&lt;p&gt;Ive tried to write another RegExpr and use the .test() with it to get the result&lt;/p&gt;

&lt;p&gt;var format = /[ !@#$%^&amp;amp;*()_+-=[]{};':"\|,.&amp;lt;&amp;gt;\/?]/; // ^ ^ document.write(format.test("My@string-with(some%text)") + "&lt;br&gt;"); document.write(format.test("My string with spaces") + "&lt;br&gt;"); document.write(format.test("MyStringContainingNoSpecialChars"));&lt;/p&gt;

&lt;p&gt;And this one was also good,&lt;br&gt;
The anchors (like ^ start of string/line, $ end of string/line and \b word boundaries) can restrict matches at specific places in a string. When using ^ the regex engine checks if the next subpattern appears right at the start of the string (or line if /m modifier is declared in the regex).&lt;/p&gt;

&lt;p&gt;Same case with $: the preceding subpattern should match right at the end of the string.&lt;/p&gt;

&lt;p&gt;but it's also include the spaces and counted as strange character so what to do:-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fswh0uukusb1mprrj9k0q.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fswh0uukusb1mprrj9k0q.gif" alt="Alt Text" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By removing the anchors, and the quantifier *. The * quantifier that would match even an empty string, thus we must remove it in order to actually check for the presence of at least 1 special character (actually, without any quantifiers we check for exactly one occurrence, same as if we were using {1} limiting quantifier). &lt;/p&gt;

&lt;p&gt;After some searching for such an issue found article that talking about this issue and it was like this :- &lt;/p&gt;

&lt;p&gt;The important thing , you have to define what is the strange or special characters for you :-&lt;/p&gt;

&lt;p&gt;All chars other than ASCII chars: /[^\x00-\x7F]/ (&lt;a href="https://regex101.com/r/WV51jG/3" rel="noopener noreferrer"&gt;demo&lt;/a&gt;)&lt;br&gt;
All chars other than printable ASCII chars: /[^ -~]/ (&lt;a href="https://regex101.com/r/WV51jG/4" rel="noopener noreferrer"&gt;demo&lt;/a&gt;)&lt;br&gt;
Any printable ASCII chars other than space, letters and digits: /[!-\/:-@[-`{-~]/ (&lt;a href="https://regex101.com/r/WV51jG/2" rel="noopener noreferrer"&gt;demo&lt;/a&gt;)&lt;br&gt;
Any Unicode punctuation proper chars, the \p{P} Unicode property class:&lt;br&gt;
ECMAScript 2018: /\p{P}/u&lt;br&gt;
ES6+:&lt;/p&gt;

&lt;p&gt;/[!-#%-*,-\/:;?@[-]_{}\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65\u{10100}-\u{10102}\u{1039F}\u{103D0}\u{1056F}\u{10857}\u{1091F}\u{1093F}\u{10A50}-\u{10A58}\u{10A7F}\u{10AF0}-\u{10AF6}\u{10B39}-\u{10B3F}\u{10B99}-\u{10B9C}\u{10F55}-\u{10F59}\u{11047}-\u{1104D}\u{110BB}\u{110BC}\u{110BE}-\u{110C1}\u{11140}-\u{11143}\u{11174}\u{11175}\u{111C5}-\u{111C8}\u{111CD}\u{111DB}\u{111DD}-\u{111DF}\u{11238}-\u{1123D}\u{112A9}\u{1144B}-\u{1144F}\u{1145B}\u{1145D}\u{114C6}\u{115C1}-\u{115D7}\u{11641}-\u{11643}\u{11660}-\u{1166C}\u{1173C}-\u{1173E}\u{1183B}\u{11A3F}-\u{11A46}\u{11A9A}-\u{11A9C}\u{11A9E}-\u{11AA2}\u{11C41}-\u{11C45}\u{11C70}\u{11C71}\u{11EF7}\u{11EF8}\u{12470}-\u{12474}\u{16A6E}\u{16A6F}\u{16AF5}\u{16B37}-\u{16B3B}\u{16B44}\u{16E97}-\u{16E9A}\u{1BC9F}\u{1DA87}-\u{1DA8B}\u{1E95E}\u{1E95F}]/u&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvyfu41cpzz6vwre12t0c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvyfu41cpzz6vwre12t0c.png" alt="Alt Text" width="300" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>Taming the React Admin Dependency Fields</title>
      <dc:creator>Ahmed Zeno</dc:creator>
      <pubDate>Tue, 03 Dec 2019 15:10:52 +0000</pubDate>
      <link>https://forem.com/jadzeino/taming-the-react-admin-dependency-fields-4pfg</link>
      <guid>https://forem.com/jadzeino/taming-the-react-admin-dependency-fields-4pfg</guid>
      <description>&lt;p&gt;Today ticket was to add an (owner name and email fields) in one of our tools.&lt;/p&gt;

&lt;p&gt;those owners will come from Cognito-pool that exist within the backend. aside from this a default value should be used and this one comes from the already signed-in User(owner) on the front-end.&lt;/p&gt;

&lt;p&gt;I know it sound like hHaaaa&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd7p9v7yuybe6wezmih86.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd7p9v7yuybe6wezmih86.gif" alt="what...?" width="480" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This tool allows you to create a campaign that is used by our marketing team, where they set campaign that holds infos like expanses partners and a lot of other infos.&lt;/p&gt;

&lt;p&gt;The campaign was built using react-admin platform&lt;br&gt;
&lt;a href="https://marmelab.com/react-admin/" rel="noopener noreferrer"&gt;https://marmelab.com/react-admin/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which is a great open source frontend Framework for building admin applications running in the browser, on top of REST/GraphQL APIs, using ES6, React and Material Design. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figio29oso0jc9i8jt8jx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figio29oso0jc9i8jt8jx.jpg" alt="Alt Text" width="800" height="629"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fil0g5ucxqzfw7iz2indd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fil0g5ucxqzfw7iz2indd.jpg" alt="Alt Text" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The only problem that I usually face with this platform is the BIG documentation and it's most of the times not clear to me where to start and how a specific component really works, what is the params and how it its working under the hood, but after a while I start liking this platform.&lt;/p&gt;

&lt;p&gt;Basically the more you use it the more you will realise its fitting and has almost everything you need.&lt;/p&gt;

&lt;p&gt;Back to the main task: so i need it to create 2 fields owner name and email and the email should be set automatically once you select the owner name and not to forget the default values incase there was no data or incase of creating new campaign.&lt;/p&gt;

&lt;p&gt;In our case the owners was coming from the cognito-pool and not from a database&lt;/p&gt;

&lt;p&gt;So I implemented a REST API called list-owners where this one use a lambda function on the backend that reads the cognito pool and return a list of users &lt;br&gt;
As the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
[
   {
       id: '123',
       name: 'Ahmed Zeino',
       email: 'azeino@company.com'
   },
   {
       id: '124',
       name: 'John doh',
       email: 'jdoh@company.com'
   }
]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the front end ,&lt;/p&gt;

&lt;p&gt;React admin allows you to use a lot of viewing fields components  such as &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;An example of the usages if AutocompleteInput is like this:-&lt;/p&gt;

&lt;p&gt;const choices = [&lt;br&gt;
    { id: 123, owner_name: 'Ahmed Zeino', email: '&lt;a href="mailto:azeino@company.com"&gt;azeino@company.com&lt;/a&gt;' },&lt;br&gt;
    { id: 124, owner_name: 'John Doh', email: '&lt;a href="mailto:JDoh@company.com"&gt;JDoh@company.com&lt;/a&gt; ' },&lt;br&gt;
];&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;All of these components have some common properties like the source and reference.&lt;/p&gt;

&lt;p&gt;The reference is the path that the api will look for and in our example its /owners as we set this in the rest api.&lt;br&gt;
    This will do the request and return the response that has the array of owners&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
   {
       id: '123',
       name: 'Ahmed Zeino',
       email: 'azeino@company.com'
   },
   {
       id: '124',
       name: 'John doh',
       email: 'jdoh@company.com'
   }
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The react-admin component will use this as a source of data (choices in the AutocompleteInput component ) &lt;/p&gt;

&lt;p&gt;React admin will inject this data directly with component , without the need to use choices&lt;br&gt;
And the component should display nicely the owners name list.&lt;/p&gt;

&lt;p&gt;But the problem lies in the way that you need to display the email on a side field  based on the selected owner name , even if there is no relation between those two.&lt;/p&gt;

&lt;p&gt;So what to do ?&lt;/p&gt;

&lt;p&gt;I solved this by splitting the problem into 3 parts&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I need to display a list of owner names and a TextField that display the email.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I need to be able to pass the data coming from the api /owners to those two components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I should be able to set the default values to these  2 components incase of the first load and in case there is no data yet.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;so i did the following :-&lt;/p&gt;

&lt;p&gt;I created a custom components called OwnersInput , this component will do the query of the rest api and pass the data to the sub components &lt;/p&gt;

&lt;p&gt;  and   &lt;/p&gt;

&lt;p&gt;I wrapped the   with a  thats allowing me to check the current form fields and allowing me to dispatch a change event that will change specific field of the form.&lt;/p&gt;

&lt;p&gt;I'll put the component here and write more explanations on it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const OwnersInput = ({
   label,
   source,
   reference,
   optionValue,
   user = {},
   formName = ''
}) =&amp;gt; {
   const {name: defaultUser} = user
   const {email: defaultEmail} = user

   return (&amp;lt;Query type={GET_LIST} resource={reference} payload={ownersPayload}&amp;gt;
           {({data}) =&amp;gt; {
               return (data &amp;amp;&amp;amp; (&amp;lt;div&amp;gt;
                           &amp;lt;AutocompleteInput
                               translateChoice={false}
                               choices={data}
                               allowEmpty
                               label={label}
                               optionValue={optionValue}
                               source={source}
                               validate={validateOwner}
                               defaultValue={defaultUser}
                           /&amp;gt;
                           &amp;lt;FormDataConsumer&amp;gt;
                               {({formData, dispatch}) =&amp;gt; {
                                   const email = getEmail(
                                       formData,
                                       data,
                                       defaultEmail
                                   )
                                   if (
                                       formData &amp;amp;&amp;amp;
                                       formData.owner_email !== email
                                   ) {
                                       console.log('CHANGING EMAIL')
                                       dispatch(
                                           change(
                                               formName,
                                               'owner_email',
                                               email
                                           )
                                       )
                                   }
                                   return (
                                       &amp;lt;TextInput
                                           source="owner_email"
                                           label="email"
                                           defaultValue={defaultEmail}
                                           disabled
                                           style={layout}
                                       /&amp;gt;
                                   )
                               }}
                           &amp;lt;/FormDataConsumer&amp;gt;
                       &amp;lt;div/&amp;gt;)
               )
           }}
       &amp;lt;/Query&amp;gt;
   )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When creating this component i am giving it the init user name and email which is already saved in the state - on the front side (based on logged user) and thats how i am creating the default name and default email&lt;/p&gt;

&lt;p&gt;I am also passing the reference as reference="owners" &lt;br&gt;
And also the formName ,so i can do the dispatch on the right form&lt;br&gt;
The component will do the query using GET_LIST&lt;br&gt;
For the initial value u can pass it  as defaultValue={defaultUser} inside the component&lt;br&gt;
The get email function will check for the form field owner_name and it will grab the needed email after it compare it with the data , if not it will return the default email&lt;/p&gt;

&lt;p&gt;Here is the usages inside a create page:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;OwnersSingleInput
                    reference="owners"
                    label="owner"
                    optionValue="name"
                    source="owner_name"
                    formName="createForm"
                    user={user} // injected from the state
                /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope it was a clear and simple explanation ,otherwise feel free to ask me.&lt;/p&gt;

&lt;p&gt;just run &lt;code&gt;npm run myscript&lt;/code&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>aws</category>
      <category>serverless</category>
    </item>
  </channel>
</rss>
