url
stringlengths
11
2.25k
text
stringlengths
88
50k
ts
timestamp[s]date
2026-01-13 08:47:33
2026-01-13 09:30:40
https://www.apache.org/
Welcome to The Apache Software Foundation | Apache Software Foundation Introducing The ASF’s New Logo Read Now Toggle navigation Community  Contributor Getting Started Becoming a Committer Code of Conduct Community Resources Community Over Code Events Projects  Projects Incubator Projects Projects Directory Mailing Lists Report a Vulnerability The Apache Attic Downloads  Distributions Releases Infrastructure Status Infrastructure Statistics Learn  Blog How the ASF Works The Apache Way Legal & Trademark Licenses Glossary FAQ Resources & Tools  Developer Information Wiki Issues Slack Self Serve Portal Infrastructure Whimsy Brand Guidelines Project Logos About  About Our Sponsors Corporate Sponsorship Individual Supporters Leadership Members Diversity & Inclusion Newsroom Contact Sponsor Search Software For The Public Good ¶ The Apache® Software Foundation (ASF) provides software for the public good, guided by community over code. Like the enduring oak tree, our projects thrive through the contributions of thousands worldwide. See Projects Our Impact ¶ 290+ Open Source Projects 1300+ Software Releases 9800+ Committers 1140+ Members Our Open Source Projects ¶ The ASF is the home of the world’s most trusted open source projects in data, cloud, search, libraries, geospatial, IoT, and beyond. See All Projects Our Incubating Projects ¶ See All Incubating Projects Incubate a Project ¶ Give your project a neutral, trusted home where communities flourish — with the ASF’s expertise, tools, and support to help you succeed. Incubate Project Everyone is Welcome ¶ At The ASF, contribution is for everyone. Whether code, docs, or ideas — your +1 makes a difference. Come contribute and grow with us. New to The ASF? Start here Upcoming Events ¶ Flink Forward 2026 ¶ Shenzen, China ¶ July 11-12, 2026 Flink Forward is the streaming data event for the future, bringing communities together to learn, network, and share experiences and best practices in stream processing, real time analytics, event-driven applications, AI and real-time intelligence, and the management of mission-critical Flink deployments in production. See Event ❮ ❯ Thank You, Sponsors ¶ The ASF is a 501(c)(3) nonprofit, supported by individual and corporate donors who believe in secure software for the public good and the power of community over code. See All Sponsors ASF Plus One ¶ Explore what’s new at The ASF — from project news to community voices, all in one place. Most Recent Blog Posts ¶ The Apache Software Foundation Announces New Top-Level Projects ¶ Read Post ASF Plus One Newsletter: December 2025 ¶ Read Post ASF 2025 Year in Review: Building for Resilience and Growth ¶ Read Post Plus One Newsletter ¶ ASF Plus One Newsletter: December 2025 ¶ Read Post ASF Plus One Newsletter: November 2025 ¶ Read Post ASF Plus One Newsletter: October 2025 ¶ Read Post Plus One Podcast ¶ Apache Grails: James Fredley and James Daugherty ¶ Listen Now Airflow 3.x and beyond ¶ Listen Now Dave Fisher, VP Tooling ¶ Listen Now Growing Together ¶ From first contributions to global impact, these stories show the strength of our community. Subscribe to ASF Plus One, Our Monthly Newsletter Subscribe Now Apache and the Apache logo are trademarks of The Apache Software Foundation. The Apache® Software Foundation is a 501(c)(3) nonprofit organization. Tax ID # 47-0825376 Donate Community Contributor Getting Started Becoming a Committer Code of Conduct Community Resources Community Over Code Events Learn Blog How the ASF Works The Apache Way Legal & Trademark Licenses Glossary FAQ Projects Projects Incubator Projects Projects Directory Mailing Lists Report a Vulnerability Resources & Tools Developer Information Wiki Issues Slack Self Serve Portal Infrastructure Whimsy Brand Guidelines Project Logos Downloads Distributions Releases Infrastructure Status Infrastructure Statistics About About Our Sponsors Corporate Sponsorship Individual Supporters Leadership Members Diversity & Inclusion Newsroom Contact Privacy Policy Copyright © 2026 The Apache Software Foundation, Licensed under the Apache License, Version 2.0 .
2026-01-13T08:49:45
https://www.algolia.com/de/industries/ecommerce/
Aufbau von Search &amp;amp; Discovery für den E-Commerce | Algolia Niket --> Deutsch English français News DevCon2025 | October 1-2 Learn more Unternehmen Partners Einloggen Login Logout Algolia mark white Algolia logo white <path fill-rule="evenodd" clip-rule="evenodd" d="M1851.78 71.55h50.77c3.26 0 5.9-2.64 5.9-5.9V6.07c0-3.62-3.24-6.39-6.82-5.83l-50.77 7.95a5.902 5.902 0 0 0-4.99 5.83v51.62c0 3.26 2.64 5.9 5.9 5.9l.01.01ZM1764.03 275.47V6.08c0-3.63-3.24-6.39-6.82-5.83l-50.46 7.94a5.912 5.912 0 0 0-4.99 5.84l.17 273.22c0 12.92 0 92.7 95.97 95.49 3.33.1 6.09-2.58 6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72l.01-.02ZM1631.95 142.89c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78 0-36.15 3.17-51.92 9.85-15.59 6.66-29.29 16.05-40.76 28.31-11.47 12.23-20.38 26.87-26.76 44.03-6.38 17.17-9.24 37.37-9.24 58.36 0 20.99 3.19 36.87 9.55 54.21 6.38 17.32 15.14 32.11 26.45 44.36 11.29 12.23 24.83 21.62 40.6 28.46 15.77 6.83 40.12 10.33 52.4 10.48 12.25 0 36.78-3.82 52.7-10.48 15.92-6.68 29.46-16.23 40.78-28.46 11.29-12.25 20.05-27.04 26.25-44.36 6.22-17.34 9.24-33.22 9.24-54.21 0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03h.02Zm-44.43 163.75c-11.47 15.75-27.56 23.7-48.09 23.7-20.55 0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2 0-26.89 5.59-49.14 17.06-64.87 11.45-15.75 27.54-23.52 48.07-23.52 20.55 0 36.63 7.78 48.09 23.52 11.47 15.57 17.36 37.98 17.36 64.87 0 27.19-5.72 45.3-17.19 61.2h.01ZM894.416 104.9h-49.33c-48.36 0-90.91 25.48-115.75 64.1-14.52 22.58-22.99 49.63-22.99 78.73 0 44.89 20.13 84.92 51.59 111.1 2.93 2.6 6.05 4.98 9.31 7.14 12.86 8.49 28.11 13.47 44.52 13.47 1.23 0 2.46-.03 3.68-.09.36-.02.71-.05 1.07-.07.87-.05 1.75-.11 2.62-
2026-01-13T08:49:45
https://www.americanglaucomasociety.net/home
Home - American Glaucoma Society &nbsp;&nbsp; Skip main navigation (Press Enter). Log in Toggle navigation Patient & Family Resources AGS Family Matters Program AGS CARES: Surgical Glaucoma Care Program Glaucoma Basics & FAQs Find an AGS Doctor Low-Cost Glaucoma Care Patient Handouts & Resources Collaborating Organizations Donate to AGS Foundation Ways to Give Our Mission Who We Are Donate Today Our Supporters Meetings & Events AGS Annual Meeting Upcoming Events Meeting Archives Education & Research Clinical Education Fellowship Practice Management Glaucoma News & Statements Resources & Library Share a File Research Grants & Programs Young Glaucoma Specialists (YOGS) Members & Community Become a Member OMIC Career Center My Profile Open Forum Community My Communities Post a Message Member Directory About AGS Mission & Vision Our History Society Governance News & Position Statements Contact Us Log in Find a Doctor Find an AGS Member Donate Today Welcome to the American Glaucoma Society AGS is the preeminent organization dedicated to improving the lives of all people with glaucoma and those at risk by leading the advancement of education, research, health care access, and advocacy. Glaucoma Basics &amp; FAQs'   Donate Today   Become a Member    AGS Family Matters - Glaucoma and Vision Screening Program Don’t Let Glaucoma Be the Sneak Thief of Your Sight You Should Know...Family Matters Learn More Who We Are The American Glaucoma Society (AGS) comprises glaucoma specialists who are dedicated to sharing clinical and scientific information for the benefit of patients, colleagues, fellows and residents. Since the establishment of the Society, the number of members has increased from 13 founding members in 1985 to over 1,600 today, from 17 countries, including members who are currently in glaucoma fellowship training, fellowship trained glaucoma specialists, and scientists active in glaucoma research. Learn More About AGS Connect with Peers The Open Forum Community is your place to ask questions, share content, and learn from each other in a safe, secure environment. Start interacting with other glaucoma specialists today . Access &amp; Share Resources Your AGS membership includes access to surgical videos, podcasts, coding and billing information, the Ophthalmology ® Glaucoma journal, and much more. Start exploring . Earn Points &amp; Badges Posting, commenting, and uploading resources all earn points for your profile. Earn enough points and you'll win badges. The more everyone participates, the more robust our community is. Glaucoma FAQs Patients, get your glaucoma questions answered. Show Me Find a Doctor Search for a glaucoma specialist near you. Search Now Find Low-Cost Care National and state-level patient resources. Explore Resources AGS Family Matters A Glaucoma Screening Program for Family Members Learn More Reap the Rewards of AGS Membership Not a member? Become one today! The AGS offers a multitude of clinical, practice management, advocacy, and networking resources that you won't find anyplace else. Explore our five types of memberships or change your membership level. Become an AGS Member Contact 5034-A Thoroughbred Lane Brentwood, TN 37027 Popular Links Find a Doctor Our Mission &amp; Vision Donate Today Contact Us Member & Community Links Find an AGS Member Career Center Open Forum Legal Terms of Use Privacy Policy Open Forum Community / Listserv Policy Powered by Higher Logic
2026-01-13T08:49:45
https://www.fine.dev/blog/ai-coding-guide#industry-specific-benefits
AI Coding – A Simple Guide for Developers Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back AI Coding – A Simple Guide for Developers Table of Contents Introduction: What is AI Coding The Importance of Context in AI Coding Tips for Providing Better Context Practical Instructions for Providing Context to AI Coding Tools 1. Creating a Knowledge Graph 2. Implementing Retrieval-Augmented Generation (RAG) 3. Copy-Pasting Relevant Code into ChatGPT and Claude 4. Understanding Potential Mistakes Without Proper Context Using AI to Generate Code Incorporating AI Tools into Your Workflow Advice for Front-End Developers Practical Tips Advice for Back-End Developers Practical Tips Use Cases for AI in Coding 1. Automated Bug Fixes 2. Predicting Performance Bottlenecks 3. Large Codebase Refactoring Industry-Specific Benefits Best Large Language Models (LLMs) for Coding 1. OpenAI 2. Anthropic 3. Google Gemini 4. Other Notable Models Choosing the Right LLM for Your Needs Popular AI Coding Tools 1. Fine 2. ChatGPT 3. Replit 4. Devin 5. Cursor Conclusion Introduction: What is AI Coding In today&#x27;s rapidly evolving tech landscape, AI coding has emerged as a game-changer for developers. But what exactly is AI coding? Simply put, it&#x27;s the use of artificial intelligence to assist in writing, optimizing, and managing code. AI coding tools help developers write better, faster, and more efficient code by automating repetitive tasks, providing intelligent code suggestions, and even debugging. This blog will delve into the importance of context in AI coding, how to use AI for generating code, offer practical advice for both front-end and back-end developers, explore various use cases, introduce some of the top AI coding tools available today, and discuss the best large language models (LLMs) for coding. The Importance of Context in AI Coding The first key to success in AI coding is understanding context . AI tools analyze the surrounding code to generate relevant and accurate suggestions. Without proper context, AI-generated code can be irrelevant or even introduce errors. Here&#x27;s why context matters: Code Quality: In complex systems, context helps maintain consistency and functionality across different modules. Relevance: AI tools can provide more precise code snippets when they understand the broader scope of the project. Efficiency: Proper context reduces the time developers spend correcting AI-generated code. Imagine asking a lawyer off the street to represent you in court, without knowing anything about you, the case, or the evidence. The best lawyer in the world would struggle! The same goes for AI in coding - only if you provide the relevant information will you get relevant results. Tips for Providing Better Context: Descriptive Comments: Write clear and detailed comments to guide the AI tool. Structured Code: Organize your code logically to help AI understand the flow and dependencies. Consistent Naming Conventions: Use meaningful and consistent names for variables, functions, and classes. Integrate Platforms: The more of your tech stack that can be integrated, the more data the AI will be able to access and the better the output will be. Fine offers GitHub, Linear, and Sentry integrations with more on the way. Practical Instructions for Providing Context to AI Coding Tools To maximize the effectiveness of AI coding tools, providing comprehensive and well-structured context is essential. Here are some practical methods to enhance context for AI tools: 1. Creating a Knowledge Graph A knowledge graph is a structured representation of information that outlines the relationships between different components of your codebase. By creating a knowledge graph, you can provide AI tools with a holistic view of your project, enabling them to make more informed suggestions. How to Create a Knowledge Graph: Identify Key Components: List out all the modules, classes, functions, and their interactions within your project. Define Relationships: Establish how these components interact, depend on each other, and contribute to the overall functionality. Use Visualization Tools: Utilize tools like Neo4j or Graphviz to visualize the knowledge graph, making it easier to understand and update. Benefits: Enhances AI&#x27;s understanding of the project structure. Facilitates better code suggestions and optimizations. Helps in identifying dependencies and potential areas for improvement. Fine creates a knowledge graph called Atlas, which includes your codebase from GitHub and issues from Sentry and Linear. This way, it prepares the AI to handle any task you give it. You don’t need to work hard creating your own knowledge graph when we’ve done it for you. 2. Implementing Retrieval-Augmented Generation (RAG) Retrieval-Augmented Generation (RAG) combines traditional information retrieval techniques with generative AI models to provide more accurate and contextually relevant responses. How to Use RAG: Integrate Data Sources: Connect your AI coding tool to relevant data sources such as documentation, code repositories, and knowledge bases. Contextual Retrieval: Ensure that the AI can retrieve pertinent information from these sources before generating code suggestions. Continuous Learning: Update the data sources regularly to keep the AI informed about the latest changes and best practices in your project. Benefits: Improves the relevance and accuracy of AI-generated code. Enables AI to leverage existing knowledge and documentation. Enhances the tool&#x27;s ability to handle complex queries and tasks. 3. Copy-Pasting Relevant Code into ChatGPT and Claude When using conversational AI tools like ChatGPT for coding assistance, providing snippets of relevant code can significantly improve the quality of the responses. How to Provide Relevant Code: Select Key Sections: Identify and copy the sections of code that are directly related to your query or the task at hand. Provide Contextual Information: Along with the code, include comments or explanations that describe the functionality and purpose of the code segments. Ask Specific Questions: Clearly state what you need help with, such as debugging a particular function or optimizing a code block. Example: # Function to calculate the factorial of a number def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) # I need to optimize this recursive factorial function to handle larger numbers without hitting the recursion limit. Question: How can I optimize the above factorial function to handle larger inputs efficiently? Benefits: Provides AI with the necessary context to generate accurate solutions. Reduces ambiguity, leading to more precise and helpful responses. Saves time by directly addressing specific issues within the code. This is similar to GitHub Copilot and some other tools where you can highlight the relevant context to direct the AI. 4. Understanding Potential Mistakes Without Proper Context AI coding tools, while powerful, can make mistakes if not provided with adequate context. Common errors include: Irrelevant Code Suggestions: Without understanding the project structure, AI might suggest code that doesn&#x27;t fit the existing framework. Syntax Errors: Lack of context can lead to syntax mistakes, especially in languages with strict syntax rules. Logical Flaws: AI might introduce logical errors if it doesn&#x27;t fully grasp the intended functionality. Security Vulnerabilities: Inadequate context can result in code that exposes security loopholes or fails to follow best practices. Backend Errors In languages commonly used for backend such as Python, AI may make more mistakes if it doesn’t have context, such as NameErrors and IndentationErrors - mistakes that you wouldn’t have made coding manually. You can read more about common Python errors and how different AI applications handle them here.   Fine is less likely to make such errors, as it has full knowledge of your codebase.   Mitigation Strategies: Always Review AI-Generated Code: Never blindly trust the AI&#x27;s suggestions; always verify and test the code. Provide Comprehensive Context: The more information you provide, the better the AI can assist accurately. Use Multiple Sources: Cross-reference AI suggestions with official documentation and best practices. Continuous Feedback: Provide feedback to the AI tool to help it learn and improve over time. Using AI to Generate Code AI coding tools are revolutionizing the way developers write code by automating mundane tasks and enhancing creativity. Here&#x27;s how AI is being used to generate code: Code Snippets: AI can suggest entire lines or blocks of code based on the current context. Automating Repetitive Tasks: Tasks like boilerplate code generation, formatting, and refactoring can be handled by AI, freeing up developers to focus on more complex problems. Bug Detection: AI can identify potential bugs and vulnerabilities in real-time, ensuring higher code quality. Incorporating AI Tools into Your Workflow: Choose the Right Tool: Select an AI coding tool that integrates seamlessly with your development workflow. Customize Settings: Tailor the tool’s settings to match your coding style and project requirements. Regularly Review Suggestions: While AI can assist, always review and test AI-generated code to ensure it meets your standards. Advice for Front-End Developers Front-end development focuses on the user interface and user experience. AI coding tools can significantly enhance this process: UI/UX Enhancement: AI can suggest design improvements and optimize user interfaces for better engagement. Streamlining CSS/HTML/JS: Automate the generation of responsive designs and ensure cross-browser compatibility. Automated Testing: AI tools can perform repetitive testing tasks, ensuring your front-end code is robust and error-free. Practical Tips: Use AI for Responsive Design: Let AI suggest layout adjustments for different screen sizes. Optimize Performance: AI can analyze and optimize front-end performance, reducing load times and improving user experience. Leverage AI for Accessibility: Ensure your applications are accessible by using AI to identify and fix accessibility issues. Advice for Back-End Developers Back-end development involves server-side logic, database management, and ensuring the smooth operation of applications. AI coding tools can streamline these processes: Automating Server-Side Logic: AI can generate efficient server-side code, handling complex operations with ease. Security Vulnerability Detection: Identify and fix security issues before they become problematic. Database Query Optimization: AI can analyze and optimize database queries for better performance. Practical Tips: API Generation: Use AI to create and manage APIs, ensuring they are secure and efficient. Automate Testing: Implement AI-driven testing to validate back-end processes and ensure reliability. Optimize Code Performance: Leverage AI to analyze and enhance the performance of your server-side code. Use Cases for AI in Coding AI coding has a wide range of applications across various industries. Here are some real-world use cases: 1. Automated Bug Fixes Fine’s AI can identify and fix bugs in your codebase, reducing the time spent on debugging and improving overall code quality. 2. Predicting Performance Bottlenecks By analyzing code patterns, AI can predict potential performance issues, allowing developers to address them proactively. 3. Large Codebase Refactoring Managing and refactoring large codebases can be daunting. AI tools can assist with this process, ensuring consistency and reducing errors. Industry-Specific Benefits: E-Commerce: Enhance platform performance and security with AI-driven optimizations. Add features to improve user experience and conversion rates rapidly. Fintech: Ensure the reliability and security of financial applications through AI-assisted coding. SaaS Platforms: Improve scalability and performance with AI-generated and optimized code. Healthcare: Streamline data processing and ensure compliance with regulatory standards through AI-assisted code generation. Education Technology: Enhance learning platforms by personalizing features and improving code quality with AI-driven development. Gaming: Optimize game performance and identify bugs faster with AI-generated suggestions and automated testing. Best Large Language Models (LLMs) for Coding Large Language Models (LLMs) are at the heart of modern AI coding tools. They power the intelligent features that assist developers in writing and managing code. Here are some of the best LLMs for coding: 1. OpenAI OpenAI&#x27;s models, including GPT-4 , are renowned for their versatility and capability in understanding and generating human-like text. In coding, GPT-4 excels at code generation, debugging, and providing intelligent suggestions across multiple programming languages. OpenAI also offers Codex , specifically fine-tuned for programming tasks, making it a popular choice for developers seeking advanced AI assistance. OpenAI also recently released preview and mini versions of their latest model, o1, which is outperforming competitors on many benchmarks. 2. Anthropic Anthropic&#x27;s Claude models focus on safety and reliability, ensuring that AI-generated code adheres to best practices and minimizes errors. These models are designed to understand complex coding contexts and provide suggestions that align with developers&#x27; intent. Anthropic emphasizes ethical AI use, making their models a trustworthy option for sensitive and critical development environments. Claude Sonnet 3.5 was widely regarded as the most powerful LLM for coding, until o1’s release, and many developers still prefer it. 3. Google Gemini Google&#x27;s Gemini models leverage Google&#x27;s extensive research in natural language processing and machine learning. Gemini is designed to integrate seamlessly with Google&#x27;s ecosystem, offering robust support for various programming languages and frameworks. With a focus on scalability and performance, Gemini models are ideal for large-scale projects requiring consistent and efficient code generation. 4. Other Notable Models: Cohere : Known for their fast and efficient language models, Cohere offers solutions tailored for real-time coding assistance and integration into development workflows. Grok: A versatile AI model designed to assist developers in writing, debugging, and optimizing code effectively. IBM Watson: IBM&#x27;s AI offerings include models that specialize in enterprise-level coding assistance, focusing on security, compliance, and integration with existing IT infrastructures. Choosing the Right LLM for Your Needs: When selecting an LLM for coding, consider the following factors: Language Support: Ensure the model supports the programming languages you use. Integration: Look for models that integrate smoothly with your development environment and tools. Customization: Some models offer more flexibility for customization and fine-tuning based on specific project requirements. Safety and Reliability: Prioritize models that emphasize code accuracy and security to minimize the risk of introducing vulnerabilities. Click here to learn about the leading LLMs for coding and how they compare. o1-preview and Claude 3.5 Sonnet are considered to be the prominent AI models for coding. Popular AI Coding Tools There are several AI coding tools available, each with unique features tailored to different needs. Here are some of the leading options: 1. Fine Features: Fine offers advanced code generation, intelligent suggestions, automations and a full-context knowledge graph. It leverages state-of-the-art LLMs including o1 and Claude Sonnet to provide accurate and context-aware code assistance. Best For: Professional developers seeking a comprehensive AI assistant that enhances productivity across multiple programming languages, working on existing codebases. Integration: Integrates with GitHub, Linear, Sentry and Slack - with further integrations such as Jira, Monday Dev, Clickup, Data Dog, Jam.dev and posthog coming soon. 2. ChatGPT Features: ChatGPT provides conversational AI assistance, allowing developers to ask questions, seek code examples, and receive real-time support. It excels in understanding natural language queries and providing detailed explanations. Best For: Asking short questions about coding in general - such as explaining functions you’re not familiar with. Integration: Accessible via web interface, API, and can be integrated into various development tools through plugins and extensions. 3. Replit Features: Replit offers an online coding platform with integrated AI assistance. It supports collaborative coding, real-time code suggestions, and automated debugging. Best For: Teams and individual developers looking for a cloud-based development environment with built-in AI support. Integration: Fully web-based, allowing seamless collaboration and access from any device with internet connectivity. 4. Devin Features: Devin focuses on optimizing backend development with AI-driven code generation, API creation, and database management. It offers robust security features and performance optimization tools. Best For: Back-end developers seeking specialized AI tools to streamline server-side development and database interactions. Integration: Compatible with major backend frameworks and integrates with popular cloud services for deployment and management. Devin isn’t currently publicly available, but you can apply for Beta access via their website. 5. Cursor Features: Cursor provides AI-powered code generation and real-time collaboration features. It emphasizes building large blocks of code and reducing development time. Best For: Developers who prioritize code quality and seek tools that can begin a project from scratch and take it to MVP. Integration: Cursor is built on VSCode making it familiar for many developers. Equally as time-consuming as writing code is reviewing code. Here&#x27;s a comparison of how different AI Coding tools handle code reviews. Conclusion AI coding boosts productivity, improves code quality, and lets developers focus on creative tasks. Providing context, using AI for code generation, and choosing the right tools can greatly benefit developers. Pick the best large language models for your needs to optimize your workflow. Automate tasks, optimize performance, and enhance security with AI coding tools. Embrace AI to unlock new efficiency and innovation. Try Fine for free at ai.fine.dev and elevate your coding workflow today. Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://www.fine.dev/blog/ai-coding-guide#2-predicting-performance-bottlenecks
AI Coding – A Simple Guide for Developers Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back AI Coding – A Simple Guide for Developers Table of Contents Introduction: What is AI Coding The Importance of Context in AI Coding Tips for Providing Better Context Practical Instructions for Providing Context to AI Coding Tools 1. Creating a Knowledge Graph 2. Implementing Retrieval-Augmented Generation (RAG) 3. Copy-Pasting Relevant Code into ChatGPT and Claude 4. Understanding Potential Mistakes Without Proper Context Using AI to Generate Code Incorporating AI Tools into Your Workflow Advice for Front-End Developers Practical Tips Advice for Back-End Developers Practical Tips Use Cases for AI in Coding 1. Automated Bug Fixes 2. Predicting Performance Bottlenecks 3. Large Codebase Refactoring Industry-Specific Benefits Best Large Language Models (LLMs) for Coding 1. OpenAI 2. Anthropic 3. Google Gemini 4. Other Notable Models Choosing the Right LLM for Your Needs Popular AI Coding Tools 1. Fine 2. ChatGPT 3. Replit 4. Devin 5. Cursor Conclusion Introduction: What is AI Coding In today&#x27;s rapidly evolving tech landscape, AI coding has emerged as a game-changer for developers. But what exactly is AI coding? Simply put, it&#x27;s the use of artificial intelligence to assist in writing, optimizing, and managing code. AI coding tools help developers write better, faster, and more efficient code by automating repetitive tasks, providing intelligent code suggestions, and even debugging. This blog will delve into the importance of context in AI coding, how to use AI for generating code, offer practical advice for both front-end and back-end developers, explore various use cases, introduce some of the top AI coding tools available today, and discuss the best large language models (LLMs) for coding. The Importance of Context in AI Coding The first key to success in AI coding is understanding context . AI tools analyze the surrounding code to generate relevant and accurate suggestions. Without proper context, AI-generated code can be irrelevant or even introduce errors. Here&#x27;s why context matters: Code Quality: In complex systems, context helps maintain consistency and functionality across different modules. Relevance: AI tools can provide more precise code snippets when they understand the broader scope of the project. Efficiency: Proper context reduces the time developers spend correcting AI-generated code. Imagine asking a lawyer off the street to represent you in court, without knowing anything about you, the case, or the evidence. The best lawyer in the world would struggle! The same goes for AI in coding - only if you provide the relevant information will you get relevant results. Tips for Providing Better Context: Descriptive Comments: Write clear and detailed comments to guide the AI tool. Structured Code: Organize your code logically to help AI understand the flow and dependencies. Consistent Naming Conventions: Use meaningful and consistent names for variables, functions, and classes. Integrate Platforms: The more of your tech stack that can be integrated, the more data the AI will be able to access and the better the output will be. Fine offers GitHub, Linear, and Sentry integrations with more on the way. Practical Instructions for Providing Context to AI Coding Tools To maximize the effectiveness of AI coding tools, providing comprehensive and well-structured context is essential. Here are some practical methods to enhance context for AI tools: 1. Creating a Knowledge Graph A knowledge graph is a structured representation of information that outlines the relationships between different components of your codebase. By creating a knowledge graph, you can provide AI tools with a holistic view of your project, enabling them to make more informed suggestions. How to Create a Knowledge Graph: Identify Key Components: List out all the modules, classes, functions, and their interactions within your project. Define Relationships: Establish how these components interact, depend on each other, and contribute to the overall functionality. Use Visualization Tools: Utilize tools like Neo4j or Graphviz to visualize the knowledge graph, making it easier to understand and update. Benefits: Enhances AI&#x27;s understanding of the project structure. Facilitates better code suggestions and optimizations. Helps in identifying dependencies and potential areas for improvement. Fine creates a knowledge graph called Atlas, which includes your codebase from GitHub and issues from Sentry and Linear. This way, it prepares the AI to handle any task you give it. You don’t need to work hard creating your own knowledge graph when we’ve done it for you. 2. Implementing Retrieval-Augmented Generation (RAG) Retrieval-Augmented Generation (RAG) combines traditional information retrieval techniques with generative AI models to provide more accurate and contextually relevant responses. How to Use RAG: Integrate Data Sources: Connect your AI coding tool to relevant data sources such as documentation, code repositories, and knowledge bases. Contextual Retrieval: Ensure that the AI can retrieve pertinent information from these sources before generating code suggestions. Continuous Learning: Update the data sources regularly to keep the AI informed about the latest changes and best practices in your project. Benefits: Improves the relevance and accuracy of AI-generated code. Enables AI to leverage existing knowledge and documentation. Enhances the tool&#x27;s ability to handle complex queries and tasks. 3. Copy-Pasting Relevant Code into ChatGPT and Claude When using conversational AI tools like ChatGPT for coding assistance, providing snippets of relevant code can significantly improve the quality of the responses. How to Provide Relevant Code: Select Key Sections: Identify and copy the sections of code that are directly related to your query or the task at hand. Provide Contextual Information: Along with the code, include comments or explanations that describe the functionality and purpose of the code segments. Ask Specific Questions: Clearly state what you need help with, such as debugging a particular function or optimizing a code block. Example: # Function to calculate the factorial of a number def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) # I need to optimize this recursive factorial function to handle larger numbers without hitting the recursion limit. Question: How can I optimize the above factorial function to handle larger inputs efficiently? Benefits: Provides AI with the necessary context to generate accurate solutions. Reduces ambiguity, leading to more precise and helpful responses. Saves time by directly addressing specific issues within the code. This is similar to GitHub Copilot and some other tools where you can highlight the relevant context to direct the AI. 4. Understanding Potential Mistakes Without Proper Context AI coding tools, while powerful, can make mistakes if not provided with adequate context. Common errors include: Irrelevant Code Suggestions: Without understanding the project structure, AI might suggest code that doesn&#x27;t fit the existing framework. Syntax Errors: Lack of context can lead to syntax mistakes, especially in languages with strict syntax rules. Logical Flaws: AI might introduce logical errors if it doesn&#x27;t fully grasp the intended functionality. Security Vulnerabilities: Inadequate context can result in code that exposes security loopholes or fails to follow best practices. Backend Errors In languages commonly used for backend such as Python, AI may make more mistakes if it doesn’t have context, such as NameErrors and IndentationErrors - mistakes that you wouldn’t have made coding manually. You can read more about common Python errors and how different AI applications handle them here.   Fine is less likely to make such errors, as it has full knowledge of your codebase.   Mitigation Strategies: Always Review AI-Generated Code: Never blindly trust the AI&#x27;s suggestions; always verify and test the code. Provide Comprehensive Context: The more information you provide, the better the AI can assist accurately. Use Multiple Sources: Cross-reference AI suggestions with official documentation and best practices. Continuous Feedback: Provide feedback to the AI tool to help it learn and improve over time. Using AI to Generate Code AI coding tools are revolutionizing the way developers write code by automating mundane tasks and enhancing creativity. Here&#x27;s how AI is being used to generate code: Code Snippets: AI can suggest entire lines or blocks of code based on the current context. Automating Repetitive Tasks: Tasks like boilerplate code generation, formatting, and refactoring can be handled by AI, freeing up developers to focus on more complex problems. Bug Detection: AI can identify potential bugs and vulnerabilities in real-time, ensuring higher code quality. Incorporating AI Tools into Your Workflow: Choose the Right Tool: Select an AI coding tool that integrates seamlessly with your development workflow. Customize Settings: Tailor the tool’s settings to match your coding style and project requirements. Regularly Review Suggestions: While AI can assist, always review and test AI-generated code to ensure it meets your standards. Advice for Front-End Developers Front-end development focuses on the user interface and user experience. AI coding tools can significantly enhance this process: UI/UX Enhancement: AI can suggest design improvements and optimize user interfaces for better engagement. Streamlining CSS/HTML/JS: Automate the generation of responsive designs and ensure cross-browser compatibility. Automated Testing: AI tools can perform repetitive testing tasks, ensuring your front-end code is robust and error-free. Practical Tips: Use AI for Responsive Design: Let AI suggest layout adjustments for different screen sizes. Optimize Performance: AI can analyze and optimize front-end performance, reducing load times and improving user experience. Leverage AI for Accessibility: Ensure your applications are accessible by using AI to identify and fix accessibility issues. Advice for Back-End Developers Back-end development involves server-side logic, database management, and ensuring the smooth operation of applications. AI coding tools can streamline these processes: Automating Server-Side Logic: AI can generate efficient server-side code, handling complex operations with ease. Security Vulnerability Detection: Identify and fix security issues before they become problematic. Database Query Optimization: AI can analyze and optimize database queries for better performance. Practical Tips: API Generation: Use AI to create and manage APIs, ensuring they are secure and efficient. Automate Testing: Implement AI-driven testing to validate back-end processes and ensure reliability. Optimize Code Performance: Leverage AI to analyze and enhance the performance of your server-side code. Use Cases for AI in Coding AI coding has a wide range of applications across various industries. Here are some real-world use cases: 1. Automated Bug Fixes Fine’s AI can identify and fix bugs in your codebase, reducing the time spent on debugging and improving overall code quality. 2. Predicting Performance Bottlenecks By analyzing code patterns, AI can predict potential performance issues, allowing developers to address them proactively. 3. Large Codebase Refactoring Managing and refactoring large codebases can be daunting. AI tools can assist with this process, ensuring consistency and reducing errors. Industry-Specific Benefits: E-Commerce: Enhance platform performance and security with AI-driven optimizations. Add features to improve user experience and conversion rates rapidly. Fintech: Ensure the reliability and security of financial applications through AI-assisted coding. SaaS Platforms: Improve scalability and performance with AI-generated and optimized code. Healthcare: Streamline data processing and ensure compliance with regulatory standards through AI-assisted code generation. Education Technology: Enhance learning platforms by personalizing features and improving code quality with AI-driven development. Gaming: Optimize game performance and identify bugs faster with AI-generated suggestions and automated testing. Best Large Language Models (LLMs) for Coding Large Language Models (LLMs) are at the heart of modern AI coding tools. They power the intelligent features that assist developers in writing and managing code. Here are some of the best LLMs for coding: 1. OpenAI OpenAI&#x27;s models, including GPT-4 , are renowned for their versatility and capability in understanding and generating human-like text. In coding, GPT-4 excels at code generation, debugging, and providing intelligent suggestions across multiple programming languages. OpenAI also offers Codex , specifically fine-tuned for programming tasks, making it a popular choice for developers seeking advanced AI assistance. OpenAI also recently released preview and mini versions of their latest model, o1, which is outperforming competitors on many benchmarks. 2. Anthropic Anthropic&#x27;s Claude models focus on safety and reliability, ensuring that AI-generated code adheres to best practices and minimizes errors. These models are designed to understand complex coding contexts and provide suggestions that align with developers&#x27; intent. Anthropic emphasizes ethical AI use, making their models a trustworthy option for sensitive and critical development environments. Claude Sonnet 3.5 was widely regarded as the most powerful LLM for coding, until o1’s release, and many developers still prefer it. 3. Google Gemini Google&#x27;s Gemini models leverage Google&#x27;s extensive research in natural language processing and machine learning. Gemini is designed to integrate seamlessly with Google&#x27;s ecosystem, offering robust support for various programming languages and frameworks. With a focus on scalability and performance, Gemini models are ideal for large-scale projects requiring consistent and efficient code generation. 4. Other Notable Models: Cohere : Known for their fast and efficient language models, Cohere offers solutions tailored for real-time coding assistance and integration into development workflows. Grok: A versatile AI model designed to assist developers in writing, debugging, and optimizing code effectively. IBM Watson: IBM&#x27;s AI offerings include models that specialize in enterprise-level coding assistance, focusing on security, compliance, and integration with existing IT infrastructures. Choosing the Right LLM for Your Needs: When selecting an LLM for coding, consider the following factors: Language Support: Ensure the model supports the programming languages you use. Integration: Look for models that integrate smoothly with your development environment and tools. Customization: Some models offer more flexibility for customization and fine-tuning based on specific project requirements. Safety and Reliability: Prioritize models that emphasize code accuracy and security to minimize the risk of introducing vulnerabilities. Click here to learn about the leading LLMs for coding and how they compare. o1-preview and Claude 3.5 Sonnet are considered to be the prominent AI models for coding. Popular AI Coding Tools There are several AI coding tools available, each with unique features tailored to different needs. Here are some of the leading options: 1. Fine Features: Fine offers advanced code generation, intelligent suggestions, automations and a full-context knowledge graph. It leverages state-of-the-art LLMs including o1 and Claude Sonnet to provide accurate and context-aware code assistance. Best For: Professional developers seeking a comprehensive AI assistant that enhances productivity across multiple programming languages, working on existing codebases. Integration: Integrates with GitHub, Linear, Sentry and Slack - with further integrations such as Jira, Monday Dev, Clickup, Data Dog, Jam.dev and posthog coming soon. 2. ChatGPT Features: ChatGPT provides conversational AI assistance, allowing developers to ask questions, seek code examples, and receive real-time support. It excels in understanding natural language queries and providing detailed explanations. Best For: Asking short questions about coding in general - such as explaining functions you’re not familiar with. Integration: Accessible via web interface, API, and can be integrated into various development tools through plugins and extensions. 3. Replit Features: Replit offers an online coding platform with integrated AI assistance. It supports collaborative coding, real-time code suggestions, and automated debugging. Best For: Teams and individual developers looking for a cloud-based development environment with built-in AI support. Integration: Fully web-based, allowing seamless collaboration and access from any device with internet connectivity. 4. Devin Features: Devin focuses on optimizing backend development with AI-driven code generation, API creation, and database management. It offers robust security features and performance optimization tools. Best For: Back-end developers seeking specialized AI tools to streamline server-side development and database interactions. Integration: Compatible with major backend frameworks and integrates with popular cloud services for deployment and management. Devin isn’t currently publicly available, but you can apply for Beta access via their website. 5. Cursor Features: Cursor provides AI-powered code generation and real-time collaboration features. It emphasizes building large blocks of code and reducing development time. Best For: Developers who prioritize code quality and seek tools that can begin a project from scratch and take it to MVP. Integration: Cursor is built on VSCode making it familiar for many developers. Equally as time-consuming as writing code is reviewing code. Here&#x27;s a comparison of how different AI Coding tools handle code reviews. Conclusion AI coding boosts productivity, improves code quality, and lets developers focus on creative tasks. Providing context, using AI for code generation, and choosing the right tools can greatly benefit developers. Pick the best large language models for your needs to optimize your workflow. Automate tasks, optimize performance, and enhance security with AI coding tools. Embrace AI to unlock new efficiency and innovation. Try Fine for free at ai.fine.dev and elevate your coding workflow today. Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://zeroday.forem.com/new/iot#main-content
New Post - Security Forem Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account Security Forem Close Join the Security Forem Security Forem is a community of 3,676,891 amazing developers Continue with Apple Continue with Google Continue with Facebook Continue with Forem Continue with GitHub Continue with Twitter (X) OR Email Password Remember me Forgot password? By signing in, you are agreeing to our privacy policy , terms of use and code of conduct . New to Security Forem? Create account . 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV Security Forem — Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Home About Contact Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . Security Forem &copy; 2016 - 2026. Share. Secure. Succeed Log in Create account
2026-01-13T08:49:45
https://www.npopov.com/2022/05/22/The-opcache-optimizer.html
The opcache optimizer Blog by nikic . Find me on GitHub , StackOverflow , Twitter and Mastodon . Learn more about me . &laquo; Back to article overview. The opcache optimizer 22. May 2022 In a previous article , I described how the caching related functionality in opcache works. However, opcache also exposes an optimizer, which is the subject of this article. Previously, the optimizer was part of opcache proper. Since PHP 8.1, it is part of the core engine. However, the engine only exposes an internal API, which can currently only be enabled through the opcache extension. In the future, the optimizer may be exposed independently of opcache. Some extensions like pcov also make use of the internal API. Options Assuming opcache is loaded and enabled (don’t forget opcache.enable_cli=1 if relevant), the optimizer is enabled using the opcache.optimization_level ini setting, which defaults to 0x7FFEBFFF . This setting is a bit mask of enabled optimization passes defined in zend_optimizer.h . As of PHP 8.1, the meaning of the bits is as follows: 0x0001 ( pass1.c ): Simple peephole optimizations. 0x0002: Unused. 0x0004 ( pass3.c ): Simple jump optimization. 0x0008 ( optimize_func_calls.c ): Call optimization. 0x0010 ( block_pass.c ): CFG-based optimization. 0x0020 ( dfa_pass.c ): SSA-based optimization. 0x0040: Whether call graph should be used for SSA-based optimizations. 0x0080 ( sccp.c ): Sparse conditional constant propagation. 0x0100 ( optimize_temp_vars_5.c ): Temporary variable optimization. 0x0200 ( nop_removal.c ): Removal of NOP opcodes. 0x0400 ( compact_literals.c ): Literal optimization. 0x0800: Call stack adjustment. 0x1000 ( compact_vars.c ): Unused variable removal. 0x2000 ( dce.c ): Dead code elimination. 0x4000: Collect and substitute constant declarations ( unsafe ). 0x8000: Trivial function inlining (part of call optimization). 0x10000: Ignore possibility of operator overloading ( unsafe ). The default enables everything apart from the unsafe settings. The unsafe settings can either cause program behavior to change (constant substitution) or PHP to crash outright (ignore operator overloading). The other useful setting is opcache.opt_debug_level , which is a debugging option that produces an opcode dump after individual passes. It accepts the bit flags from opcache.optimization_level if they correspond to an optimization pass. Additionally, it’s possible to produce a dump at a few more points, with the most useful being: 0x10000: Dump before optimizer. 0x20000: Dump after optimizer. 0x40000: Dump before CFG optimizations. 0x80000: Dump after CFG optimizations. 0x200000: Dump before SSA optimizations. 0x400000: Dump after SSA optimizations. When debugging, I will usually just set opcache.opt_debug_level=-1 to get a full trace and not bother picking out specific passes. Pass two Before we talk about individual optimization passes, we first need to talk about “pass two”. The name is a bit confusing in that this refers to a post-processing step in the compiler, not an optimization pass. It brings opcodes into the final form expected by the virtual machine. Among other things, pass two performs the following changes: The opcode handler pointer is assigned, based on the opcode, operand kinds and other specialization information. Variable references are converted from variable numbers into offsets from the start of the stack frame. Instruction references are converted from instruction numbers into offsets relative to the current opline. The opline array and the literal array are combined into a single allocation, and literal references are converted into opline-relative offsets as well. Liveness ranges for temporary variables are calculated. To make changes easier, the optimizer partially reverts pass two: In particular, the opline array and literal array are split again, and literals are referenced using indices into the literals table. This means that literal references use indices, while variable and instruction references use frame-relative or opline-relative offsets. Additionally, some invariants are not upheld during optimization and instead recomputed later. This includes the opcode handler, the liveness ranges, as well as smart branch flags (which determine whether a comparison can be fused with a following jump). Liveness range calculation While liveness ranges are recomputed after optimization, we can unfortunately not ignore them entirely. Liveness ranges are computed using a single-pass CFG-less algorithm, which requires certain invariants to be upheld during the elimination of unreachable code. As a reminder, the purpose of live ranges is to determine which temporary variables need to be freed when an exception is thrown. Consider the following example (with a before optimizer dump): foreach ( $array as $value ) { throw $ex ; } 0000 V3 = FE_RESET_R CV0 ( $array ) 0004 0001 FE_FETCH_R V3 CV1 ( $value ) 0004 0002 THROW CV2 ( $ex ) 0003 JMP 0001 0004 FE_FREE V3 0005 RETURN int ( 1 ) LIVE RANGES : 3 : 0001 - 0004 ( loop ) The live range intervals are half open, so what this tells us is that an exception thrown at instructions 0001 , 0002 or 0003 needs to free the foreach loop variable V3 . Live ranges are calculated using a single backwards scan which remembers the last use of all variables and then emits a live range when it encounters the corresponding definition. Things are a bit more complicated than that, for example due to instructions that don’t consume their operands, but that’s the basic idea. In particular, we need an actual use of the variable to emit a live range. Consider the following code: calc () + throw $ex ; 0000 INIT_FCALL_BY_NAME 0 string ( "calc" ) 0001 V2 = DO_FCALL_BY_NAME 0002 THROW CV0 ( $ex ) 0003 T1 = ADD V2 bool ( true ) 0004 FREE T1 0005 RETURN int ( 1 ) LIVE RANGES : 2 : 0002 - 0003 ( tmp / var ) The shown opcodes are after optimization. Note that instructions 0003 , 0004 and 0005 are unreachable due to the throw at 0002 and would usually be removed by CFG optimization. However, this would remove the only use of V2 in instruction 0003 , which means that no live range would be emitted and the variable would leak. To prevent this, expression use of throw (or exit ) gets a special flag that tells the optimizer to pretend that execution continues after the instruction, for the sole purpose of preserving live ranges. The other and somewhat more annoying case we need to deal with are loop variable frees (where switch and match are also “loops”): switch ( calc ()) { case 0 : throw $ex1 ; default : throw $ex2 ; } return 1 ; 0000 INIT_FCALL_BY_NAME 0 string ( "calc" ) 0001 V2 = DO_FCALL_BY_NAME 0002 T3 = CASE V2 int ( 0 ) 0003 JMPZ T3 0005 0004 THROW CV0 ( $ex1 ) 0005 THROW CV1 ( $ex2 ) 0006 FREE V2 LIVE RANGES : 2 : 0002 - 0006 ( tmp / var ) Again, the return at the end is unreachable, because the switch will definitely throw in both branches. And indeed, you can see that the RETURN instruction has been optimized away. However, the FREE of the loop variable V2 has been preserved for the purpose of live range construction, even though it is equally unreachable. CFG optimization knows the block is unreachable, but treats it as a special “unreachable free block”. It may be worthwhile to make live range construction CFG-based, at least if the optimizer is used, to remove the need for these kinds of hacks. Pass 1: Peephole optimizations With that said, we can take a look at the first pass , which does simple peephole optimizations: The first optimization is evaluating instructions like ADD with constants operands. An important caveat is that operations that would throw an exception or warning are not evaluated. If the result of the opcode can be determined, then users of the result are replaced with a constant operand and the original opcode is converted into a NOP . PHP’s representation of instructions does not permit to efficiently remove (or add) instructions, as they are stored in a flat array, and contain offset references besides. For this reason, optimizations will replace instructions with NOPs instead, which are then eliminated by dedicated NOP removal passes that can move instructions and update references to them. Replacing uses of a temporary with constants is less straightforward than it may sound. Not all instructions support constant operands, and some instructions impose additional requirements. For example, while an object property read FETCH_OBJ_R would accept an arbitrary variable property name, a constant property name must be a string, and requires allocation of run-time cache slots. These rules are encoded in the zend_optimizer_update_opN_const() functions. The replacement happens by scanning forward in the instruction stream, finding a use of the variable and updating the operand to a constant. This assumes that there is a only a single use of the temporary. This is usually the case, as temporary variables are understood to be consumed by the using instruction. For instructions that keep their operands alive, we continue scanning to replace later uses of the same temporary. If replacement fails, for example because the temporary is used in an instruction that does not support constant operands, the instruction is instead replaced with a QM_ASSIGN . The “QM” stands for question mark, and dates back to its original use in the implementation of the ternary operator. Nowadays, this is used as a generic assignment to a temporary. A second implicit assumption involved here is that the opcode defining the temporary dominates all uses. For example, if we had the following structure: if ( ... ) { T1 = ... } else { T1 = ADD 1 , 2 } use ( T1 ) Then replacing T1 with the result of ADD 1, 2 would be incorrect, as the value is only produced in one branch. This early in the optimization pipeline, this invariant does hold, because the compiler would actually generate something along these lines instead: if ( ... ) { T1 = ... T2 = QM_ASSIGN T1 } else { T3 = ADD 1 , 2 T2 = QM_ASSIGN T3 } use ( T1 ) In output produced by the compiler, only a few special instructions like QM_ASSIGN may assign the same temporary from multiple control flow branches. However, this invariant is no longer upheld starting with the block pass. Next to simple operations like binary operators and casts, calls to certain functions like function_exists() are evaluated. Of course, opcache cannot statically determine that a function will not exist at runtime, but it can ascertain the existence of extension-defined functions. A caveat is that on Windows the cached script may be reused in a process with different loaded extensions and thus different available functions. Similar optimizations can be performed for extension_loaded() and system ini_get() . Conditional jump instructions with constant operands are converted into either an unconditional jump or a NOP. Finally, this pass can collect constants defined using const or define() and replace later uses. Constant definitions are only collected before the first control flow. The constants definition collection is guarded by a default-disabled optimization option, because this optimization is not always legal. Consider the following code: // file1.php const X = 1 ; require __DIR__ . '/file2.php' ; // file2.php const X = 2 ; var_dump ( X ); The redeclaration of X in file2.php will throw a warning and retain the previously declared value 1. However, the optimization will think that the actual value is 2, resulting in different program behavior. Most of the pass 1 functionality is repeated in later passes. For example, both the block pass and the SCCP pass perform constant folding, with the latter solving the problem in full generality. As such, I’m not sure how practically important the functionality in pass 1 really is. It’s possible that there are some phase-ordering considerations involved here. Pass 3: Jump optimizations Next up is pass 3 , which deals with jump optimizations. If you’re wondering about the odd numbering, there used to be a pass 2, whose functionality was later merged into pass 1. This is a good point to review the jump instructions supported by the PHP virtual machine. The simplest are the unconditional jump ( JMP ) and the conditional jump on zero ( JMPZ ) and non-zero ( JMPNZ ), where “zero” should be read as “false after a bool cast”. The JMPZ / JMPNZ conditional jumps will fall through to the following instruction if the condition is not met. There also used to be a JMPZNZ instruction that specified two target labels, but I removed it in the process of writing this blog post. The JMPZ_EX and JMPNZ_EX variants additionally return a temporary with the boolean value of the condition. These instructions are used in the implementation of the short-circuiting &amp;&amp; and || operators. $x = f1 () &amp;&amp; f2 (); 0000 INIT_FCALL_BY_NAME 0 string ( "f1" ) 0001 V1 = DO_FCALL_BY_NAME 0002 T2 = JMPZ_EX V1 0006 0003 INIT_FCALL_BY_NAME 0 string ( "f2" ) 0004 V3 = DO_FCALL_BY_NAME 0005 T2 = BOOL V3 0006 ASSIGN CV0 ( $x ) T2 If f1() is falsy, then the JMPZ_EX will populate T2 with false and jump directly to the ASSIGN . If f1() is truthy, then we fall through to the call to f2() , and assign the result of a bool cast to T2 . The implementation for || is basically the same with JMPNZ_EX . The JMP_SET is similar to JMPNZ_EX , but returns the original value of the condition, without a bool cast. It is used for the implementation of the shorthand ternary operator: $x = f1 () ?: f2 (); 0000 INIT_FCALL_BY_NAME 0 string ( "f1" ) 0001 V1 = DO_FCALL_BY_NAME 0002 T2 = JMP_SET V1 0006 0003 INIT_FCALL_BY_NAME 0 string ( "f2" ) 0004 V3 = DO_FCALL_BY_NAME 0005 T2 = QM_ASSIGN V3 0006 ASSIGN CV0 ( $x ) T2 If f1() is truthy, T2 is set to its value and we jump directly to the ASSIGN . Otherwise f2() is evaluated, and the result is moved to the right temporary using QM_ASSIGN . Another close relative is COALESCE , which returns the condition value verbatim just like JMP_SET , but performs the jump on non-null, rather than on truthy. Unsurprisingly, it is used to implement the null-coalesce operator ?? . While there are more control-flow instructions than that (e.g. for jumptables and for exceptional control flow), these are the ones that pass 3 deals with. Returning to the jump optimization pass, the transforms it performs fall into a few broad categories, though there are quite a few combinations of different jumps. The first one is that a jump to the next instruction can be converted into a NOP. For conditional jumps on a temporary, we replace it with a FREE of the temporary instead. A peculiar case is a conditional jump on a compiled variable (CV). Compiled variables are not consumed by using instructions, so it is not necessary to explicitly FREE them. However, entirely dropping the instruction may still be incorrect, because it might optimize away an “undefined variable” warning. The virtual machine has a special CHECK_VAR instruction for this purpose, which only performs an undefined variable check. It is another instruction that is not emitted by the compiler and only created during optimization: if ( $a ) {} echo "x" ; # Original 0000 JMPZ CV0 ( $a ) 0001 0001 ECHO string ( "x" ) # After jump optimization 0000 CHECK_VAR CV0 ( $a ) 0001 ECHO string ( "x" ) The second category of optimizations are sequences of jumps. For example, if a JMPZ target is another JMP , then we can go directly to the JMP target. If both jumps involved are conditional, then such optimizations are only possible if the conditions are correlated: if ( $x &amp;&amp; $y ) { echo "Test" ; } # Original 0000 T2 = JMPZ_EX CV0 ( $x ) 0002 0001 T2 = BOOL CV1 ( $y ) 0002 JMPZ T2 0004 0003 ECHO string ( "Test" ) # After jump optimization 0000 T2 = JMPZ_EX CV0 ( $x ) 0004 0001 T2 = BOOL CV1 ( $y ) 0002 JMPZ T2 0004 0003 ECHO string ( "Test" ) The original target of the JMPZ_EX is the JMPZ , which uses the T2 result value of the JMPZ_EX . We know that the JMPZ will be taken if the JMPZ_EX is taken, so it’s fine to replace the JMPZ_EX target with the JMPZ target. You may note that the result is still quite sub-optimal, and will be optimized to only two JMPZ instructions by the block pass. Something that jump optimization needs to be careful about are infinite loops. Consider the following example: while ( $x ) {} # Original 0000 JMP 0001 0001 JMPNZ CV0 ( $x ) 0001 # After jump optimization 0000 NOP 0001 JMPNZ CV0 ( $x ) 0001 When trying to optimize the JMPNZ , jump optimization would naively try to follow the correlated jump target 0001 , which happens to be the same instruction. The cycle is very straightforward in this case, but might span across multiple instructions more generally. Jump optimization avoids infinite optimization loops by remembering a “hit list” of targets it has already followed while trying to optimize the current instruction. It stops following the target chain once a cycle has been encountered. It’s somewhat tedious to enumerate all optimizations this pass performs, so you’ll have to read the code for an exhaustive list. Similar to pass 1, I’m not sure how valuable pass 3 still is, as it only performs a subset of optimizations the block pass is capable of. Pass 4: Call optimization Pass 4 is responsible for call optimization. Calls in PHP generally use a sequence of INIT_* to determine the called function and allocate a call frame, a number of SEND_* instructions to push arguments to the call stack, and finally a DO_* opcode to perform the actual function call. These sequences may be nested for nested calls like a(b()) . The possible INIT_* opcodes are relatively straightforward: INIT_FCALL : Call to a statically known function. The necessary stack size is pre-calculated. INIT_FCALL_BY_NAME : Call to a function with resolved name (either outside a namespace or fully qualified / imported). INIT_NS_FCALL_BY_NAME : Call to an unqualified function in a namespace, will try NS\name() and name() . INIT_METHOD_CALL : Call to an instance method. INIT_STATIC_METHOD_CALL : Either a call to a static method or a scoped instance call. INIT_DYNAMIC_CALL : Call of a dynamic value like $fn() . INIT_USER_CALL : Statically known call of call_user_func() or call_user_func_array() . NEW : Creation of an object, will call __construct() if one exists. The situation is significantly more complicated when it comes to SEND_* opcodes. There are many different opcodes depending on the kind of the argument and the value being passed to it: SEND_VAL : Send a constant or temporary to a known value argument. SEND_VAR : Send a variable to a known value argument. SEND_REF : Send a variable to a known reference argument. SEND_VAR_NO_REF : Send the result of a function call to a known reference argument, if the function returns by reference. Otherwise throw a notice and send a dummy reference. SEND_VAL_EX : For a value argument, perform SEND_VAL , otherwise error. SEND_VAR_EX : For a value argument, perform SEND_VAR , otherwise send the variable by reference. SEND_VAR_NO_REF_EX : For a reference argument, perform a SEND_VAR_NO_REF , otherwise send the call result by value. SEND_FUNC_ARG : Send a complex variable either by value or by reference. The send type is determined by an earlier CHECK_FUNC_ARG for the argument, and the variable is produced by a sequence of FETCH_*_FUNC_ARG opcodes that will either perform a read or a write fetch. For example, depending on the argument kind, f($array[0]) either needs to read $array[0] (and diagnose a non-existent index) or write $array[0] (and create a non-existent index). SEND_UNPACK : Send zero or more arguments using ...$args syntax. SEND_ARRAY : Send zero or more arguments using call_user_func_array() . SEND_USER : Send arguments using call_user_func() . Finally, the DO_* opcodes also come in flavors that differ by their degree of specialization: DO_FCALL : This is the generic function call opcode that can be used for all functions. DO_FCALL_BY_NAME : This can be used for both internal and userland functions if neither the execute_ex nor execute_internal hooks are in use, and the functions do not use trampolines. Additionally, internal functions cannot be deprecated and cannot have $this . DO_ICALL : Same as DO_FCALL_BY_NAME but limited to internal functions. DO_UCALL : Same as DO_FCALL_BY_NAME but limited to userland functions. CALLABLE_CONVERT : This is used for first-class callable syntax foo(...) introduced in PHP 8.1 and is not a real call. It converts the call frame into a Closure object. The primary purpose of the call optimization pass is to relax INIT / SEND / DO opcodes into cheaper forms. If the function being called can be determined, then we can perform the following relaxations: INIT_FCALL_BY_NAME / INIT_NS_FCALL_BY_NAME -&gt; INIT_FCALL SEND_*_EX -&gt; SEND_* FETCH_*_FUNC_ARG -&gt; FETCH_*_R or FETCH_*_W DO_FCALL -&gt; DO_FCALL_BY_NAME / DO_ICALL / DO_UCALL We can see this in action with the following example: test ( $a [ $b ]); function test ( $byval ) { return $byval ; } # Original 0000 INIT_FCALL_BY_NAME 1 string ( "test" ) 0001 CHECK_FUNC_ARG 1 0002 V2 = FETCH_DIM_FUNC_ARG CV0 ( $a ) CV1 ( $b ) 0003 SEND_FUNC_ARG V2 1 0004 DO_FCALL_BY_NAME # After call optimization 0000 INIT_FCALL 1 96 string ( "test" ) 0001 NOP 0002 V2 = FETCH_DIM_R CV0 ( $a ) CV1 ( $b ) 0003 SEND_VAR V2 1 0004 DO_UCALL The function is declared after the call, so the compiler is not aware of it at the time the call is compiled. However, the optimizer does know the definition of test() and is able to relax the *_BY_NAME opcodes, as well as determine that the *_FUNC_ARG send is actually by value. When determining the called function, we generally distinguish between knowing the exact function being called and only knowing a “prototype function”. In the latter case, we might actually be calling an overriding method from a child class. Even if we only have a prototype function, our variance checks ensure that certain properties will hold for child methods as well. For example, if an argument of the prototype function is by-value, then it cannot be changed to a by-reference argument in a child class. The other optimization performed by this pass in inlining, for a very generous interpretation of the term: In particular, only functions that return a constant value can be inlined, and nothing else. This transform additionally needs to ensure that the call cannot trigger any warnings or exceptions, for example through type checks or default constant expression evaluation. I’d consider this optimization largely useless in practice. Pass 9: Temporary variable optimization We’re going to jump over a whole lot of passes here, namely the entire CFG and SSA based optimization pipeline. While these are arguably the most interesting passes, they are also the most complex and would blow the size of this article beyond all reasonable bounds. Instead, let’s continue with a number of late cleanup passes, starting with temporary variable optimization . The allocation of temporaries in the PHP compiler itself is naive: For each instruction result, a new temporary will be used: return $a + $b + $c + $d + $e + $f ; # Compiler-produced opcodes 0000 T6 = ADD CV0 ( $a ) CV1 ( $b ) 0001 T7 = ADD T6 CV2 ( $c ) 0002 T8 = ADD T7 CV3 ( $d ) 0003 T9 = ADD T8 CV4 ( $e ) 0004 T10 = ADD T9 CV5 ( $f ) 0005 RETURN T10 Here we use five different temporaries T6-T10 even though most of these are not live at the same time. Temporary optimization reduces this to two temporary variables, which reduces the size of the stack frame and improves access locality: # After temporary optimization 0000 T6 = ADD CV0 ( $a ) CV1 ( $b ) 0001 T7 = ADD T6 CV2 ( $c ) 0002 T6 = ADD T7 CV3 ( $d ) 0003 T7 = ADD T6 CV4 ( $e ) 0004 T6 = ADD T7 CV5 ( $f ) At this point one might wonder whether we can reduce this example down to a single temporary instead: # After temporary optimization 0000 T6 = ADD CV0 ( $a ) CV1 ( $b ) 0001 T6 = ADD T6 CV2 ( $c ) 0002 T6 = ADD T6 CV3 ( $d ) 0003 T6 = ADD T6 CV4 ( $e ) 0004 T6 = ADD T6 CV5 ( $f ) This would indeed work in this specific case, but generally opcodes might write to the result operand before they finish reading all input operands, in which case reusing a temporary for inputs and outputs would not be legal. The optimizer does not bother to model this accurately, as this would usually save only one additional temporary per function. The compaction algorithm is straightforward: We walk backwards through the opcodes. When we see a use of a temporary that has not been assigned a new temporary yet, we assign the first one that is free. When we see a definition of the temporary, we mark the new temporary as free again. Of course, there are a few caveats here: Some temporaries are defined multiple times (in different control-flow paths, e.g. different branches of a ternary operator), and we only want to consider the temporary as dead when we hit the earliest possible definition point. This is done by collecting these definition points in a separate pass upfront. The other caveat are instructions with special semantics. For example, ROPE_* instructions don’t work on a single temporary, but rather N consecutive temporaries that can hold 2*N strings. We need to make sure that a contiguous range of temporaries is allocated for these. Additional care also has to be taken for instructions that are part of a return sequence that may jump into a finally block. Temporary reuse is avoided for these, to avoid conflicts with temporaries used in the finally block. Pass 10: NOP removal Because instructions and side-tables encode either absolute or relative references to other instructions, it is not straightforward to remove an instruction from the opcode stream. Instead, optimizations will replace dead instructions with a NOP, and rely on the NOP removal pass to eliminate these later. NOP removal happens in two phases. We first iterate over the opcodes while skipping NOPs, and copy opcodes backwards to fill the resulting holes. While doing these copies, jumps are “ migrated ”, which means that opline-relative instruction references are updated to account for the movement. For example, if an instruction moves backwards two instructions, opline-relative references need to be increased by two. It should be emphasized that this update only accounts for the movement of the jump instruction itself, but not for the movement of the target it is pointing to. While doing this, we populate a shiftlist, which stores how many steps backwards each instruction has been moved. Then, in a second iteration, we “ shift ” jumps by looking up the jump targets in the shiftlist and computing their new position. The same is also done for the try/catch sidetable, which stores offsets of try, catch and finally regions. NOP removals are also performed as part of other passes (e.g. the CFG and SSA based optimization passes) and work similarly, but usually need to update more auxiliary data structures using the shiftlist. Pass 11: Literal compaction The literal compaction pass deduplicates literals and cache slots used by instructions. It operates in multiple phases: First, instructions are scanned to find all referenced literals. This serves the dual purpose of detecting which literals are entirely unused and can be dropped, and determining how many “related” literals there are. Opcodes that involve symbol references (e.g. calls or constant fetches) will often use multiple consecutive literals. For example, the INIT_NS_FCALL opcode uses three literals that hold the lowercased name in the global namespace, the lowercased name in the current namespace, as well as the original spelling of the function name for use in error messages. These related literals need to be treated as an atomic group for the purposes of deduplication. The second pass is a walk over the literals table, which performs the actual deduplication. Literals are copied in-place to their new position, with dead or duplicate literals being dropped. A map keeps track which old position maps to which new position. For null, false, true and empty arrays, there is only a single possible value, so deduplication just involves remembering the first occurrence of such a literal. For strings, a hash table is used to store the new literal position for a given string. The main interesting bit is how related literals are handled: In this case the cache key is produced by concatenating all the related literals. However, doing just that could result in collisions between strings with different numbers of related literals. For example, a string "Aa" might collide with the pair of literals that an a() call using INIT_FCALL_BY_NAME would produce. To avoid this, a clever hack is used: We add the number of related literals as a bias to the hash that is stored inside the string structure. Because hash table lookups will compare both the hash and the string contents, this ensures that cache keys for different numbers of related literals will never collide. Theoretically, there is still a risk of collisions between strings consisting of the same number of literals, for example "abc" could be derived from literal pairs ["a", "bc"] or ["ab", "c"] . This cannot happen in practice due to the limited ways in which related literals are used. Integers are deduplicated using the same hash table. There is only one case where integers can have related literals, which is array accesses of the form $foo["1"] , where a pair of literals [1, "1"] is used. This is done because plain arrays will convert "1" to 1 , while overloaded objects using ArrayAccess must be passed the original "1" value. In this case "1" is used as a cache key, but once again with a hash bias that distinguishes it from both ordinary strings, and strings with related literals. Finally, floating-point numbers also use string keys with a biased hash. In this case the string contains the raw binary value of the double. This is done because PHP’s hash tables do not natively support double keys, so we are forced to represent them as strings instead. The last phase walks over the instructions again and replaces the literal references. Additionally, this phase performs deduplication of runtime cache slots. This is not strictly related to literal compaction, but does rely on literals having already been deduplicated. There is also the historical background here that runtime cache slot offsets used to be stored in the u2 space of literals. Later, they were moved into either operands of the opcodes, or their extended value space. This avoids an indirection through the literal table when accessing the runtime cache. This phase reallocates all runtime cache slots. For cases that cannot be deduplicated (or where we don’t bother), this just involves using the current cache size, and then incrementing it by the number of cache slots used by the instruction. For cases that can be deduplicated, we keep a number of different tables to remember an already allocated cache slot. The tables are separated by symbol kind (e.g. function, class, property) and indexed by the number of the literal associated with the cache slot. This is the part that relies on literals already being deduplicated and allows us to use simple indexing, rather than dealing with biased hash tables. The only case where we do use a hash table are static member cache slots, because these are derived from two literals, the class name and the member name (which could be a method, property or constant). In this case we use a "Class::member" style hash key, once again with a bias to distinguish different member kinds. The end result of this pass is that we use less memory for both literals and cache slots, and thus also have better cache locality. Additionally, having a single cache slot for a given symbol reference means that it only needs to be populated once, rather than separately for each of the references. Pass 13: Variable compaction The variable compaction pass removes variables that are completely unused. Unlike the temporary optimization pass, it also supports compiled variables (i.e. named variables like $x ). We do not attempt to reuse CV variables with disjoint lifetimes for a number of reasons: It would make for a confusing debug experience (as variable names would be reused), is often not possible due to possible destructor effects, and would also be substantially more complicated from a technical perspective, because CV lifetimes don’t have the convenient structure of temporary lifetimes. Compaction works by first walking over all opcodes and collecting all referenced variables into a bitset. Then we compute the mapping from old variable numbers to new numbers (skipping the dead ones) and walk the instructions again to update all references. Finally, the mapping from variable numbers to names is updated to drop the dead variables as well. Finalization As mentioned at the very start of this article, once all optimizations are done, we have redo parts of pass two. This involves combining the opcode array and literals table back into one allocation and making constant references opline-relative, recomputing the opcode handler, as well as smart branch flags and live ranges. Once all op arrays have been optimized, one final optimization is applied in a separate phase: INIT_FCALL opcodes include a pre-calculated stack size that should be reserved for the call. This pass recalculates the stack size, as it might have been reduced by optimizations (e.g. due to temporary optimization). This runs as a separate phase, so that all callees have already been optimized. And with that we’re done! Of course, I did skip over the most interesting bits, which are the CFG and SSA based optimizations. Hopefully, we can take a look at these another time. If you liked this article, you may want to browse my other articles or follow me on Twitter or Mastodon .
2026-01-13T08:49:45
https://dev.to/rmoraes92
Ramon Moraes - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Follow User actions Ramon Moraes I&#39;m a Senior Software Engineer with a decade worth of experience building and maintain large scale systems in a variety of industries. Joined Joined on  Mar 28, 2025 github website twitter website More info about @rmoraes92 Badges Writing Debut Awarded for writing and sharing your first DEV post! Continue sharing your work to earn the 4 Week Writing Streak Badge. Got it Close Skills/Languages Python, AWS, Linux Currently learning Flutter and Rust Currently hacking on I'm trying to build two 2D games: one using Bevy and the second using Lovë. Available for Contributions to open-source projects, code reviews and part-time contract jobs. Post 2 posts published Comment 0 comments written Tag 34 tags followed Level Up Your Workflow: Why a Catchy Acronym Can Revolutionize Your Project Swim Lanes Ramon Moraes Ramon Moraes Ramon Moraes Follow Apr 4 &#39;25 Level Up Your Workflow: Why a Catchy Acronym Can Revolutionize Your Project Swim Lanes # jokes # management # scrum # productivity Comments Add Comment 3 min read Zedburn - a Zenburn port to Zed editor Ramon Moraes Ramon Moraes Ramon Moraes Follow Apr 4 &#39;25 Zedburn - a Zenburn port to Zed editor # zed # zenburn # extensions # colorscheme Comments Add Comment 1 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://www.fine.dev/blog/ai-coding-guide#1-openai
AI Coding – A Simple Guide for Developers Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back AI Coding – A Simple Guide for Developers Table of Contents Introduction: What is AI Coding The Importance of Context in AI Coding Tips for Providing Better Context Practical Instructions for Providing Context to AI Coding Tools 1. Creating a Knowledge Graph 2. Implementing Retrieval-Augmented Generation (RAG) 3. Copy-Pasting Relevant Code into ChatGPT and Claude 4. Understanding Potential Mistakes Without Proper Context Using AI to Generate Code Incorporating AI Tools into Your Workflow Advice for Front-End Developers Practical Tips Advice for Back-End Developers Practical Tips Use Cases for AI in Coding 1. Automated Bug Fixes 2. Predicting Performance Bottlenecks 3. Large Codebase Refactoring Industry-Specific Benefits Best Large Language Models (LLMs) for Coding 1. OpenAI 2. Anthropic 3. Google Gemini 4. Other Notable Models Choosing the Right LLM for Your Needs Popular AI Coding Tools 1. Fine 2. ChatGPT 3. Replit 4. Devin 5. Cursor Conclusion Introduction: What is AI Coding In today&#x27;s rapidly evolving tech landscape, AI coding has emerged as a game-changer for developers. But what exactly is AI coding? Simply put, it&#x27;s the use of artificial intelligence to assist in writing, optimizing, and managing code. AI coding tools help developers write better, faster, and more efficient code by automating repetitive tasks, providing intelligent code suggestions, and even debugging. This blog will delve into the importance of context in AI coding, how to use AI for generating code, offer practical advice for both front-end and back-end developers, explore various use cases, introduce some of the top AI coding tools available today, and discuss the best large language models (LLMs) for coding. The Importance of Context in AI Coding The first key to success in AI coding is understanding context . AI tools analyze the surrounding code to generate relevant and accurate suggestions. Without proper context, AI-generated code can be irrelevant or even introduce errors. Here&#x27;s why context matters: Code Quality: In complex systems, context helps maintain consistency and functionality across different modules. Relevance: AI tools can provide more precise code snippets when they understand the broader scope of the project. Efficiency: Proper context reduces the time developers spend correcting AI-generated code. Imagine asking a lawyer off the street to represent you in court, without knowing anything about you, the case, or the evidence. The best lawyer in the world would struggle! The same goes for AI in coding - only if you provide the relevant information will you get relevant results. Tips for Providing Better Context: Descriptive Comments: Write clear and detailed comments to guide the AI tool. Structured Code: Organize your code logically to help AI understand the flow and dependencies. Consistent Naming Conventions: Use meaningful and consistent names for variables, functions, and classes. Integrate Platforms: The more of your tech stack that can be integrated, the more data the AI will be able to access and the better the output will be. Fine offers GitHub, Linear, and Sentry integrations with more on the way. Practical Instructions for Providing Context to AI Coding Tools To maximize the effectiveness of AI coding tools, providing comprehensive and well-structured context is essential. Here are some practical methods to enhance context for AI tools: 1. Creating a Knowledge Graph A knowledge graph is a structured representation of information that outlines the relationships between different components of your codebase. By creating a knowledge graph, you can provide AI tools with a holistic view of your project, enabling them to make more informed suggestions. How to Create a Knowledge Graph: Identify Key Components: List out all the modules, classes, functions, and their interactions within your project. Define Relationships: Establish how these components interact, depend on each other, and contribute to the overall functionality. Use Visualization Tools: Utilize tools like Neo4j or Graphviz to visualize the knowledge graph, making it easier to understand and update. Benefits: Enhances AI&#x27;s understanding of the project structure. Facilitates better code suggestions and optimizations. Helps in identifying dependencies and potential areas for improvement. Fine creates a knowledge graph called Atlas, which includes your codebase from GitHub and issues from Sentry and Linear. This way, it prepares the AI to handle any task you give it. You don’t need to work hard creating your own knowledge graph when we’ve done it for you. 2. Implementing Retrieval-Augmented Generation (RAG) Retrieval-Augmented Generation (RAG) combines traditional information retrieval techniques with generative AI models to provide more accurate and contextually relevant responses. How to Use RAG: Integrate Data Sources: Connect your AI coding tool to relevant data sources such as documentation, code repositories, and knowledge bases. Contextual Retrieval: Ensure that the AI can retrieve pertinent information from these sources before generating code suggestions. Continuous Learning: Update the data sources regularly to keep the AI informed about the latest changes and best practices in your project. Benefits: Improves the relevance and accuracy of AI-generated code. Enables AI to leverage existing knowledge and documentation. Enhances the tool&#x27;s ability to handle complex queries and tasks. 3. Copy-Pasting Relevant Code into ChatGPT and Claude When using conversational AI tools like ChatGPT for coding assistance, providing snippets of relevant code can significantly improve the quality of the responses. How to Provide Relevant Code: Select Key Sections: Identify and copy the sections of code that are directly related to your query or the task at hand. Provide Contextual Information: Along with the code, include comments or explanations that describe the functionality and purpose of the code segments. Ask Specific Questions: Clearly state what you need help with, such as debugging a particular function or optimizing a code block. Example: # Function to calculate the factorial of a number def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) # I need to optimize this recursive factorial function to handle larger numbers without hitting the recursion limit. Question: How can I optimize the above factorial function to handle larger inputs efficiently? Benefits: Provides AI with the necessary context to generate accurate solutions. Reduces ambiguity, leading to more precise and helpful responses. Saves time by directly addressing specific issues within the code. This is similar to GitHub Copilot and some other tools where you can highlight the relevant context to direct the AI. 4. Understanding Potential Mistakes Without Proper Context AI coding tools, while powerful, can make mistakes if not provided with adequate context. Common errors include: Irrelevant Code Suggestions: Without understanding the project structure, AI might suggest code that doesn&#x27;t fit the existing framework. Syntax Errors: Lack of context can lead to syntax mistakes, especially in languages with strict syntax rules. Logical Flaws: AI might introduce logical errors if it doesn&#x27;t fully grasp the intended functionality. Security Vulnerabilities: Inadequate context can result in code that exposes security loopholes or fails to follow best practices. Backend Errors In languages commonly used for backend such as Python, AI may make more mistakes if it doesn’t have context, such as NameErrors and IndentationErrors - mistakes that you wouldn’t have made coding manually. You can read more about common Python errors and how different AI applications handle them here.   Fine is less likely to make such errors, as it has full knowledge of your codebase.   Mitigation Strategies: Always Review AI-Generated Code: Never blindly trust the AI&#x27;s suggestions; always verify and test the code. Provide Comprehensive Context: The more information you provide, the better the AI can assist accurately. Use Multiple Sources: Cross-reference AI suggestions with official documentation and best practices. Continuous Feedback: Provide feedback to the AI tool to help it learn and improve over time. Using AI to Generate Code AI coding tools are revolutionizing the way developers write code by automating mundane tasks and enhancing creativity. Here&#x27;s how AI is being used to generate code: Code Snippets: AI can suggest entire lines or blocks of code based on the current context. Automating Repetitive Tasks: Tasks like boilerplate code generation, formatting, and refactoring can be handled by AI, freeing up developers to focus on more complex problems. Bug Detection: AI can identify potential bugs and vulnerabilities in real-time, ensuring higher code quality. Incorporating AI Tools into Your Workflow: Choose the Right Tool: Select an AI coding tool that integrates seamlessly with your development workflow. Customize Settings: Tailor the tool’s settings to match your coding style and project requirements. Regularly Review Suggestions: While AI can assist, always review and test AI-generated code to ensure it meets your standards. Advice for Front-End Developers Front-end development focuses on the user interface and user experience. AI coding tools can significantly enhance this process: UI/UX Enhancement: AI can suggest design improvements and optimize user interfaces for better engagement. Streamlining CSS/HTML/JS: Automate the generation of responsive designs and ensure cross-browser compatibility. Automated Testing: AI tools can perform repetitive testing tasks, ensuring your front-end code is robust and error-free. Practical Tips: Use AI for Responsive Design: Let AI suggest layout adjustments for different screen sizes. Optimize Performance: AI can analyze and optimize front-end performance, reducing load times and improving user experience. Leverage AI for Accessibility: Ensure your applications are accessible by using AI to identify and fix accessibility issues. Advice for Back-End Developers Back-end development involves server-side logic, database management, and ensuring the smooth operation of applications. AI coding tools can streamline these processes: Automating Server-Side Logic: AI can generate efficient server-side code, handling complex operations with ease. Security Vulnerability Detection: Identify and fix security issues before they become problematic. Database Query Optimization: AI can analyze and optimize database queries for better performance. Practical Tips: API Generation: Use AI to create and manage APIs, ensuring they are secure and efficient. Automate Testing: Implement AI-driven testing to validate back-end processes and ensure reliability. Optimize Code Performance: Leverage AI to analyze and enhance the performance of your server-side code. Use Cases for AI in Coding AI coding has a wide range of applications across various industries. Here are some real-world use cases: 1. Automated Bug Fixes Fine’s AI can identify and fix bugs in your codebase, reducing the time spent on debugging and improving overall code quality. 2. Predicting Performance Bottlenecks By analyzing code patterns, AI can predict potential performance issues, allowing developers to address them proactively. 3. Large Codebase Refactoring Managing and refactoring large codebases can be daunting. AI tools can assist with this process, ensuring consistency and reducing errors. Industry-Specific Benefits: E-Commerce: Enhance platform performance and security with AI-driven optimizations. Add features to improve user experience and conversion rates rapidly. Fintech: Ensure the reliability and security of financial applications through AI-assisted coding. SaaS Platforms: Improve scalability and performance with AI-generated and optimized code. Healthcare: Streamline data processing and ensure compliance with regulatory standards through AI-assisted code generation. Education Technology: Enhance learning platforms by personalizing features and improving code quality with AI-driven development. Gaming: Optimize game performance and identify bugs faster with AI-generated suggestions and automated testing. Best Large Language Models (LLMs) for Coding Large Language Models (LLMs) are at the heart of modern AI coding tools. They power the intelligent features that assist developers in writing and managing code. Here are some of the best LLMs for coding: 1. OpenAI OpenAI&#x27;s models, including GPT-4 , are renowned for their versatility and capability in understanding and generating human-like text. In coding, GPT-4 excels at code generation, debugging, and providing intelligent suggestions across multiple programming languages. OpenAI also offers Codex , specifically fine-tuned for programming tasks, making it a popular choice for developers seeking advanced AI assistance. OpenAI also recently released preview and mini versions of their latest model, o1, which is outperforming competitors on many benchmarks. 2. Anthropic Anthropic&#x27;s Claude models focus on safety and reliability, ensuring that AI-generated code adheres to best practices and minimizes errors. These models are designed to understand complex coding contexts and provide suggestions that align with developers&#x27; intent. Anthropic emphasizes ethical AI use, making their models a trustworthy option for sensitive and critical development environments. Claude Sonnet 3.5 was widely regarded as the most powerful LLM for coding, until o1’s release, and many developers still prefer it. 3. Google Gemini Google&#x27;s Gemini models leverage Google&#x27;s extensive research in natural language processing and machine learning. Gemini is designed to integrate seamlessly with Google&#x27;s ecosystem, offering robust support for various programming languages and frameworks. With a focus on scalability and performance, Gemini models are ideal for large-scale projects requiring consistent and efficient code generation. 4. Other Notable Models: Cohere : Known for their fast and efficient language models, Cohere offers solutions tailored for real-time coding assistance and integration into development workflows. Grok: A versatile AI model designed to assist developers in writing, debugging, and optimizing code effectively. IBM Watson: IBM&#x27;s AI offerings include models that specialize in enterprise-level coding assistance, focusing on security, compliance, and integration with existing IT infrastructures. Choosing the Right LLM for Your Needs: When selecting an LLM for coding, consider the following factors: Language Support: Ensure the model supports the programming languages you use. Integration: Look for models that integrate smoothly with your development environment and tools. Customization: Some models offer more flexibility for customization and fine-tuning based on specific project requirements. Safety and Reliability: Prioritize models that emphasize code accuracy and security to minimize the risk of introducing vulnerabilities. Click here to learn about the leading LLMs for coding and how they compare. o1-preview and Claude 3.5 Sonnet are considered to be the prominent AI models for coding. Popular AI Coding Tools There are several AI coding tools available, each with unique features tailored to different needs. Here are some of the leading options: 1. Fine Features: Fine offers advanced code generation, intelligent suggestions, automations and a full-context knowledge graph. It leverages state-of-the-art LLMs including o1 and Claude Sonnet to provide accurate and context-aware code assistance. Best For: Professional developers seeking a comprehensive AI assistant that enhances productivity across multiple programming languages, working on existing codebases. Integration: Integrates with GitHub, Linear, Sentry and Slack - with further integrations such as Jira, Monday Dev, Clickup, Data Dog, Jam.dev and posthog coming soon. 2. ChatGPT Features: ChatGPT provides conversational AI assistance, allowing developers to ask questions, seek code examples, and receive real-time support. It excels in understanding natural language queries and providing detailed explanations. Best For: Asking short questions about coding in general - such as explaining functions you’re not familiar with. Integration: Accessible via web interface, API, and can be integrated into various development tools through plugins and extensions. 3. Replit Features: Replit offers an online coding platform with integrated AI assistance. It supports collaborative coding, real-time code suggestions, and automated debugging. Best For: Teams and individual developers looking for a cloud-based development environment with built-in AI support. Integration: Fully web-based, allowing seamless collaboration and access from any device with internet connectivity. 4. Devin Features: Devin focuses on optimizing backend development with AI-driven code generation, API creation, and database management. It offers robust security features and performance optimization tools. Best For: Back-end developers seeking specialized AI tools to streamline server-side development and database interactions. Integration: Compatible with major backend frameworks and integrates with popular cloud services for deployment and management. Devin isn’t currently publicly available, but you can apply for Beta access via their website. 5. Cursor Features: Cursor provides AI-powered code generation and real-time collaboration features. It emphasizes building large blocks of code and reducing development time. Best For: Developers who prioritize code quality and seek tools that can begin a project from scratch and take it to MVP. Integration: Cursor is built on VSCode making it familiar for many developers. Equally as time-consuming as writing code is reviewing code. Here&#x27;s a comparison of how different AI Coding tools handle code reviews. Conclusion AI coding boosts productivity, improves code quality, and lets developers focus on creative tasks. Providing context, using AI for code generation, and choosing the right tools can greatly benefit developers. Pick the best large language models for your needs to optimize your workflow. Automate tasks, optimize performance, and enhance security with AI coding tools. Embrace AI to unlock new efficiency and innovation. Try Fine for free at ai.fine.dev and elevate your coding workflow today. Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://www.algolia.com/fr/use-cases/voice-search
Optimisez votre recherche vocale grâce aux outils de NLP et d’IA Niket --> Deutsch English français News DevCon2025 | October 1-2 Learn more Algolia Partners Support Login Logout Algolia mark white Algolia logo white Products Search Show users what they're looking for with AI-driven resuts. Search Show users what they're looking for with AI-driven resuts. Recommendations Use behavioral cues to drive higher engagement. Recommendations Use behavioral cues to drive higher engagement. Personalization Show each user what they need across their journey. Personalization Show each user what they need across their journey. Analytics All your insights in one dashboard. Analytics All your insights in one dashboard. Browse Move customers down the funnel with curated category pages. Browse Move customers down the funnel with curated category pages. Agent Studio Create, test, and deploy AI agents, fast. Agent Studio Create, test, and deploy AI agents, fast. Generative Experiences Build conversational solutions with retrieval augmented generation (RAG). Generative Experiences Build conversational solutions with retrieval augmented generation (RAG). Ask AI Deliver conversational answers—right from your search bar. Ask AI Deliver conversational answers—right from your search bar. MCP Server Search, analyze, or monitor your index within your agentic workflow. MCP Server Search, analyze, or monitor your index within your agentic workflow. Data Enrichment Modify, enhance, or restructure data as it’s indexed for search. Data Enrichment Modify, enhance, or restructure data as it’s indexed for search. Data Transformation Streamline data preparation and enhance data quality. Data Transformation Streamline data preparation and enhance data quality. Integrations Connect to your existing stack via pre-built libraries and APIs. Integrations Connect to your existing stack via pre-built libraries and APIs. Data Centers Choose from 70+ data centers across 17 regions. Data Centers Choose from 70+ data centers across 17 regions. Security & Compliance Built for peace of mind. Security & Compliance Built for peace of mind. Industries Ecommerce Ecommerce B2B Commerce B2B Commerce Fashion Fashion Grocery Grocery Media Media Marketplaces Marketplaces SaaS SaaS Higher Education Higher Education Documentation search Documentation search Enterprise search Enterprise search Headless commerce Headless commerce Image search Image search Mobile & App search Mobile & App search Retail Media Network Retail Media Network Site search Site search Visual search Visual search Voice search Voice search Digital Experience Digital Experience Ecommerce Ecommerce Engineering Engineering Merchandising Merchandising Product Management Product Management Tarifs Développeurs GET STARTED Developer Hub Developer Hub Documentation Documentation Intégrations Intégrations Composants UI Composants UI Auto-completion Auto-completion RESOURCES Code Exchange Code Exchange Engineering Blog Engineering Blog MCP MCP Discord Discord Webinars & Events Webinars & Events QUICK LINKS Démarrage rapide Démarrage rapide Pour Open Source Pour Open Source Statuts d'API Statuts d'API Support Support Resources INSPIRATION Algolia Blog Algolia Blog Resource Center Resource Center Témoignages clients Témoignages clients Webinars & Events Webinars & Events Newsroom Newsroom LEARN Customer Hub Customer Hub What's New What's New AI Search Grader AI Search Grader Documentation Documentation Évènements Évènements Professional Services Professional Services Quick Access Algolia Partners Support Login Logout Request demo Get started Search Algolia Close Request demo Get started Other Types Filter --> Clear All Filters Filters Looking for our logo? We got you covered! Brand guidelines Download logo pack RECHERCHE VOCALE API de recherche vocale pour apps, sites mobiles et assistants vocaux Obtenez des r&eacute;sultats de recherche vocale pertinents gr&acirc;ce &agrave; des capacit&eacute;s de compr&eacute;hension contextuelle, des outils NLP, de compr&eacute;hension du langage naturel et d&rsquo;IA. &nbsp; Obtenir une démo Commencez gratuitement *]:border-l md:[&>*:nth-child(1)]:border-none md:[&>*:nth-child(4n+1)]:border-none"> 1.7+ Trillion searches every year 99.999% uptime SLA available 382% ROI according to Forrester Research 18,000+ customers across 150+ countries 100 000 recherches/sec 99,999% de disponibilit&eacute; avec SLA 382% Retour Sur Investissement + de 17 000 clients Recherche vocale multi-plateformes Assistants vocaux intelligents Si votre entreprise utilise les fonctionnalit&eacute;s d&#39;Alexa (assistant vocal d&#39;Amazon) ou du Google Assistant, nos capacit&eacute;s de recherche vocale peuvent les am&eacute;liorer. Laissez vos utilisateurs effectuer leurs requ&ecirc;tes via la recherche vocale afin obtenir des r&eacute;sultats imm&eacute;diats et pr&eacute;cis gr&acirc;ce &agrave; nos fonctionnalit&eacute;s avanc&eacute;es. Appareils mobiles Nous fournissons des fonctionnalit&eacute;s de recherche vocale &agrave; la fois pour applications mobiles et sites web. L&rsquo;utilisation la plus courante de la recherche vocale ne concerne pas les haut-parleurs intelligents, mais les appareils mobiles tels que l&rsquo;iPhone (avec Siri) et les t&eacute;l&eacute;phones Android. Plus de la moiti&eacute; des personnes effectuant des recherches vocales utilisent chaque jour des commandes vocales sur leurs appareils mobiles. Elles recherchent des informations sur des &eacute;v&eacute;nements sur les r&eacute;seaux sociaux, ou effectuent des recherches locales, par exemple pour trouver un magasin &agrave; proximit&eacute; vendant un produit qu&rsquo;elles recherchent. 20% de toutes les recherches effectu&eacute;es sur des appareils mobiles sont vocales, il est donc utile d&rsquo;optimiser ce type de recherche. Technologies de recherche vocale Utilisez la fonctionnalit&eacute; vocale pour donner aux employ&eacute;s les informations qu&rsquo;ils demandent, ou pour aider vos clients &agrave; trouver les d&eacute;tails dont ils ont besoin. Bibliothèques de conversion parole-texte Nous fournissons des biblioth&egrave;ques open-source gratuites dont vous pouvez tirer parti lorsque vous ajoutez la technologie de recherche vocale &agrave; vos applications mobiles et sites web. Nous fournissons des biblioth&egrave;ques pour les recherches vocales iOS et Android, ainsi que pour les navigateurs mobiles. Excellente pertinence textuelle La meilleure compr&eacute;hension de la parole en texte ou du langage naturel &eacute;choue si le moteur de recherche ne comprend pas la pertinence textuelle. Notre technologie d&rsquo;optimisation des moteurs de recherche combine la pertinence textuelle et les param&egrave;tres commerciaux &agrave; nos capacit&eacute;s de traitement et compr&eacute;hension du langage naturel pour fournir des exp&eacute;riences de recherche vocale in&eacute;gal&eacute;es. Prise en charge de nombreuses langues Nos fonctionnalit&eacute;s de traitement du langage naturel fonctionnent dans des dizaines de langues, tandis que notre infrastructure est distribu&eacute;e, de mani&egrave;re &agrave; pouvoir assister les adeptes de recherches vocales, o&ugrave; qu&rsquo;ils se trouvent. Personnalisation de premier ordre Lorsqu&rsquo;une personne &eacute;met des commandes vocales, elle s&rsquo;attend &agrave; &ecirc;tre comprise comme si elle parlait &agrave; un &ecirc;tre humain. C&rsquo;est pourquoi nous proposons des fonctionnalit&eacute;s personnalis&eacute;es qui s&rsquo;appuient sur l&rsquo;IA. Nous d&eacute;couvrons les pr&eacute;f&eacute;rences de vos utilisateurs et adaptons les r&eacute;sultats &agrave; leurs int&eacute;r&ecirc;ts. &nbsp; Prise en main de la recherche vocale d’Algolia Chargez vos données sur notre serveur Notre moteur de recherche les indexera, les h&eacute;bergera et les rendra disponibles partout, &agrave; une vitesse in&eacute;gal&eacute;e. &nbsp; Dites-nous ce qui est important pour vous Quel est le contenu textuel que vous appr&eacute;ciez le plus en mati&egrave;re de recherche vocale ? Quels sont les param&egrave;tres qui d&eacute;terminent la popularit&eacute; de votre contenu ? Avec notre plateforme de recherche vocale, contr&ocirc;lez votre formule de classement. &nbsp; Ajoutez des données à vos applications et sites web Utilisez nos biblioth&egrave;ques client pour tirer parti de nos capacit&eacute;s de conversion de la parole en texte, ou int&eacute;grez les v&ocirc;tres par l&rsquo;interm&eacute;diaire d&rsquo;un tiers. &nbsp; Optimisez vos résultats au fur et à mesure Utilisez la personnalisation, le reclassement dynamique et l&rsquo;apprentissage du langage naturel pour appliquer l&rsquo;apprentissage de l&rsquo;IA aux recherches vocales de vos utilisateurs et am&eacute;liorer continuellement les r&eacute;sultats des recherches vocales. &nbsp; Recommended content How to use Algolia Voice Search Read more How to harness voice search in the retail sector Learn about the state of voice search today and how Harry Rosen brought in this technology to improve conversions and overall order sizes. Read more Search: the secret weapon to great omnichannel experiences Search and discovery can increase your conversion rate up to 50%. Learn how you can also build relevant omnichannel experiences with Algolia. Read more See more FAQ Recherche vocale Les gens font-ils souvent des recherches vocales ? 0 Les gens font de plus en plus de recherches vocales. Alors que la recherche vocale n&rsquo;&eacute;tait pas une fonctionnalit&eacute; tr&egrave;s utilis&eacute;e il y a cinq ans, l&rsquo;am&eacute;lioration de la reconnaissance vocale sur iOS, Android et le Web, &agrave; permis &agrave; la recherche vocale de s&rsquo;envoler sur toutes ces plateformes. Les tendances convergent toutes vers le m&ecirc;me constat&nbsp;: si une entreprise propose une option de saisie vocale dans la barre de recherche de son application et de son site web, les gens en profitent. Les utilisateurs doivent-ils télécharger quelque chose pour utiliser la fonctionnalité de recherche vocale d’Algolia ? 0 Aucun t&eacute;l&eacute;chargement n&rsquo;est n&eacute;cessaire pour utiliser la fonctionnalit&eacute; de recherche vocale d&rsquo;Algolia. En tant que cr&eacute;ateur d&rsquo;une application ou d&rsquo;un site web, vous pouvez choisir comment int&eacute;grer les biblioth&egrave;ques de synth&egrave;se vocale. Algolia propose des biblioth&egrave;ques vocales pour&nbsp; iOS &nbsp;et&nbsp; Android , ainsi qu&rsquo;un widget de&nbsp; recherche vocale pour navigateur &nbsp;via JavaScript. Comment optimiser le contenu de mon site pour utiliser la recherche vocale ? 0 Il y a tr&egrave;s peu de choses &agrave; faire pour que votre contenu soit pr&ecirc;t pour la recherche vocale. Si vous suivez le&nbsp; guide d&rsquo;optimisation de recherche &nbsp;d&rsquo;Algolia, vous serez pr&ecirc;t. Vous pouvez &eacute;galement envisager d&rsquo;ajouter des&nbsp; synonymes &nbsp;et des&nbsp; r&egrave;gles &nbsp;afin de couvrir toutes les fa&ccedil;ons dont les gens peuvent effectuer une recherche vocale.&nbsp; Les suggestions de synonymes dynamiques &nbsp;constituent un autre moyen d&rsquo;optimiser votre contenu pour qu&rsquo;il corresponde &agrave; l&rsquo;intention des utilisateurs. La recherche vocale est-elle identique à une recherche en langage naturel ? 0 Pas n&eacute;cessairement. Si les gens utilisent souvent un langage plus naturel lorsqu&rsquo;ils effectuent une recherche vocale, ils utilisent tout aussi souvent des mots-cl&eacute;s. Ainsi, m&ecirc;me si vous devez suivre les bonnes pratiques d&rsquo;Algolia en mati&egrave;re de&nbsp; recherche en langage naturel , ne vous inqui&eacute;tez pas en imaginant qu&rsquo;une recherche en langage naturel peut &ecirc;tre &laquo;&nbsp;trop avanc&eacute;e&nbsp;&raquo;. Algolia facilite la recherche vocale y compris en langage naturel. Qu’est-ce que la recherche vocale ? 0 La recherche vocale consiste &agrave; utiliser sa voix pour effectuer une recherche, quelle que soit la plateforme ou les mots cl&eacute;s utilis&eacute;s. Si beaucoup de gens pensent aux enceintes intelligentes comme Alexa et Google Assistant lorsqu&rsquo;ils entendent l&rsquo;expression &laquo;&nbsp;recherche vocale&nbsp;&raquo;, les gens effectuent plus souvent des recherches vocales sur leurs smartphones ou sur des sites web. Les utilisateurs se tournent vers les applications Android et iOS, ainsi que vers les sites web, pour savoir s&rsquo;ils ont mis en place la recherche vocale. Que peut faire la recherche vocale ? 0 La meilleure technologie de recherche vocale donne aux utilisateurs et aux clients la possibilit&eacute; d&rsquo;effectuer des recherches vocales avec des requ&ecirc;tes en langage naturel ou avec des mots cl&eacute;s. Cela ouvre de nouvelles possibilit&eacute;s d&rsquo;interaction lorsque les gens sont en d&eacute;placement, prennent les transports en commun ou ont tout simplement les mains pleines. Pour r&eacute;pondre au mieux &agrave; ces types de recherches vocales, il est important de disposer d&rsquo;une technologie capable de comprendre ce que les gens disent et de personnaliser leurs r&eacute;sultats. Qui utilise la recherche vocale ? 0 La recherche vocale concerne tout le monde. Les jeunes l&rsquo;utilisent lorsqu&rsquo;ils sortent avec leurs smartphones, tandis que les personnes &acirc;g&eacute;es appr&eacute;cient ses avantages en mati&egrave;re d&rsquo;accessibilit&eacute;. Pratiquement tout le monde peut utiliser la recherche vocale pour trouver des articles ou des produits plus rapidement ou lorsque saisir un mot n&rsquo;est pas pratique. Pourquoi la recherche vocale est-elle si importante ? 0 Non seulement la recherche vocale facilite l&rsquo;accessibilit&eacute;, mais elle peut s&rsquo;av&eacute;rer plus pratique que la saisie, en particulier sur des plateformes telles que les t&eacute;l&eacute;phones mobiles ou les t&eacute;l&eacute;viseurs intelligents, o&ugrave; la saisie peut &ecirc;tre source d&rsquo;erreurs ou de tracas. Try the AI search that understands Get a demo Start Free Solutions Aperçu AI Search AI Browse AI Recommendations Ask AI Intelligent Data Kit Cas d'usage Aperçu Recherche Enterprise Ecommerce headless Recherche mobile Recherche vocale Recherche d'image OEM Recherche d'image Développeurs Developer Hub Documentation Intégrations Engineering blog Communauté Discord Status d'API DocSearch Pour Open Source Demos GDPR AI Act Intégrations Salesforce Commerce Cloud B2C Shopify Adobe Commerce Netlify Commercetools BigCommerce Distribué & sécurisé Infrastructure mondiale Sécurité & conformité Azure AWS Industries Aperçu Ecommerce B2C Ecommerce B2B Marketplaces SaaS Média Startups Fashion Tools Search Grader Ecommerce Search Audit Algolia À propos Carrières Newsroom Évènements Équipe dirigeante Impact social Contact us Anti-Modern Slavery Statement Awards Réseaux sociaux Développeurs Developer Hub Documentation Intégrations Engineering blog Communauté Discord Status d'API DocSearch Pour Open Source Demos GDPR AI Act Industries Aperçu Ecommerce B2C Ecommerce B2B Marketplaces SaaS Média Startups Fashion Tools Search Grader Ecommerce Search Audit Solutions Aperçu AI Search AI Browse AI Recommendations Ask AI Intelligent Data Kit Cas d'usage Aperçu Recherche Enterprise Ecommerce headless Recherche mobile Recherche vocale Recherche d'image OEM Recherche d'image Intégrations Salesforce Commerce Cloud B2C Shopify Adobe Commerce Netlify Commercetools BigCommerce Distribué & sécurisé Infrastructure mondiale Sécurité & conformité Azure AWS Algolia À propos Carrières Newsroom Évènements Équipe dirigeante Impact social Contact us Anti-Modern Slavery Statement Awards Réseaux sociaux Algolia mark white ©2026 Algolia - All rights reserved. Cookie settings Trust Center Politique de confidentialité Conditions d'utilisation Politique d'utilisation acceptable
2026-01-13T08:49:45
https://www.npopov.com/2022/12/20/This-year-in-LLVM-2022.html
This year in LLVM (2022) Blog by nikic . Find me on GitHub , StackOverflow , Twitter and Mastodon . Learn more about me . &laquo; Back to article overview. This year in LLVM (2022) 20. December 2022 Towards the end of last year, I switched from working on PHP at JetBrains, to working on LLVM at Red Hat. While it was already under discussion beforehand, this catalyzed the creation of the PHP foundation , which now pays multiple people to work on PHP. Special thanks for this go to Roman Pronskiy, who did most of the work to set up the foundation, and keeps it running ever since. Also a shout-out to Alexey Gopachenko, the unsung hero of PHP: As the PhpStorm team lead at the time, he drove JetBrains’ active investment in PHP core development and the community at large. The PHP 8.2 release shipped a couple weeks ago with fairly little contribution from myself. I somehow still managed to make the most controversial change, which is the deprecation of dynamic properties . And with that out of the way, let me jump into the actual topic of this blog post, which is what I’ve been up to since then. Opaque pointers Historically, pointer types in LLVM carried an element type, for example i32* , &lt;4 x i16&gt;* or %struct* . In LLVM 15, these have been consolidated into an opaque ptr type. The motivation for this change is simple: LLVM IR semantics say that the pointer element type carries no semantic meaning. You can take an i8* pointer, bitcast it into an i32* pointer and load an i32 value from it. Optimizations shouldn’t make use of the pointer element type – if they do, they are either suboptimal, or outright wrong. But of course, as long as the element type is available, we can hardly blame optimization authors for trying to make use of it. In addition to that high-level motivation, there are also practical considerations: Opaque pointers remove the need for pointer bitcasts, which improves memory usage and compile-time. It also improves optimization power, because optimizations can no longer fail to handle bitcasts, or rely on element types as (often wildly inaccurate) optimization hints. The opaque pointer migration started in 2015 and has been moving slowly for a long time, due to the sheer scope of the change. After I joined Red Hat, I spent a significant fraction of my time for many months on bringing this migration over the finishing line, with help from Arthur Eubanks. Some of the larger pieces of work were: Migrating the Clang frontend to support opaque pointers. As the element type is no longer tracked by LLVM, frontends need to keep track of it separately. This work started with storing the element type in Address , which had this wonderful comment in it: When IR pointer types lose their element type, we should simply store it in Address instead for the convenience of writing code. This was followed by weeks of work migrating many hundreds of users of Address and related APIs to pass explicit element types. Simply. Adding support for bitcode auto-upgrade ( D118694 , D119339 , D119821 , D120471 ). LLVM generally does not care about backwards-compatibility, with one exception: LLVM must be able to read bitcode produced by previous versions, auto-upgrading it as necessary. This was a significant challenge with opaque pointers: While doing an upgrade to opaque pointers is nominally as simple as discarding the unneeded pointer element types, the problem is performing other auto-upgrades at the same time. For example, historically loads were of the form load i32* %p , while now they explicitly specify the loaded type via load i32, ptr %p . When the i32* gets upgraded to ptr , we lose the necessary information to add the load type. This is solved by making the bitcode reader keep track of type IDs for all values, as well as which type IDs they contain as subtypes. For example, given a function pointer type like void(i32*)* , a series of contained type ID lookups allows us to determine the pointer element type of the parameter. Unfortunately, this does add significant complexity to the reader. A number of optimization passes were using “structural reasoning”, where struct pointer element types were used to drive optimizations. These optimizations had to be rewritten essentially from scratch to perform offset-based reasoning instead: Analyze at which offsets and with which types the pointer is actually used. This is a requirement for supporting opaque pointers, but also increases optimization power, because it can support bitcasted pointers. Examples of this include argument promotion , global SROA and global ctor evaluation . The long tail of “everything else”. There were hundreds of places inspecting pointer element types. Removing some of them was just a matter of switching to a different API, while others needed more substantial work and/or IR changes. Once we got to the point of no longer crashing during compilation, this also involved tracking down miscompiles caused by opaque pointers: These were almost always due to a no longer correct assumption that two instructions using the same pointer also operate on the same type. With opaque pointers, this requires an explicit check. Opaque pointers were enabled by default for the LLVM 15 release, with a big caveat: We did not convert all LLVM and Clang tests to use opaque pointers. For Clang, most tests were modified to pass -no-opaque-pointers , while LLVM tests auto-detect the opaque pointer mode based on what kind of pointer types are used in the test. Even with some automation , converting tests to use opaque pointers is very time consuming. There has been good progress on this, but the migration is not yet complete. We will only be able to drop typed pointer support once the test migration is done. I look forward to removing all that pesky pointer bitcasting code. Opaque pointers have extensive migration documentation , and I also gave a talk at CGO-LLVM on the topic ( slides , recording ). See those resources for more information. Constant expression removal My next big project of the year was the removal of constant expressions . Historically, LLVM has supported a constant expression variant of nearly all instructions. @g = external global i32 ; Instruction define ptr @test1 () { %res = getelementptr i32 , ptr @g , i64 1 ret ptr %res } ; Constant expression define ptr @test2 () { ret ptr getelementptr ( i32 , ptr @g , i64 1 ) } Some notion of constant expressions is needed for global variable initializers: @g = external global i32 @g_end = global ptr getelementptr ( i32 , ptr @g , i64 1 ) Only a small handful of “relocatable expressions” can actually be used as initializers. These basically come down to adding an offset to a global and, depending on the object file format, computing the offset between two globals. However, LLVM conflated this initializer concept with general constant folding and allowed (nearly) all instructions to also be used as constant expressions. This also included integer division instructions, which cause undefined behavior when dividing by zero. The end result was that certain “trapping” constants were non-speculatable, which most code failed to account for, leading to miscompiles. In issue #49839 I tried to fix an end-to-end miscompile related to this issue, but every time I fixed a bug in one pass, a new variant of it appeared in another. Ultimately, I came to the conclusion that the only way to fix this problem is by design: The notion of trapping constants has to be removed entirely. Incidentally, constant expressions also cause plenty of other issues, such as incorrect cost-modelling (treating complex expressions as being “free”), some bits of exponential behavior, as well as the need for code to deal with two different representations of the same thing. As such, the proposal was aimed more broadly at removing all non-relocatable constant expressions. Once again, the main technical complexity of this change lies in bitcode auto-upgrade . Constant expressions that are no longer supported need to be expanded into instructions. This is done by decoding all constant expressions into a virtual representation first, which can then be materialized in different places. The notion of (formerly) trapping constants means that this expansion has to happen at exactly the right place, e.g. an expression in a phi node might require critical edge splitting. Once again, this adds some non-trivial complexity to the bitcode reader. A complicating factor that I encountered here (though not for the first time) is uselistorder preservation. LLVM values maintain a list of uses, and in some cases the order of this list can impact optimization behavior. While LLVM does not preserve it by default, there is an optional mode ( -preserve-bc-uselistorder ) to retain it. Uselistorder preservation works by having the bitcode writer “predict” the uselistorder that will result from plain bitcode reading, and then store a shuffle that will convert the predicted order into the actual one. Getting the uselistorder prediction correct when making major changes to bitcode reading is fairly tricky. Once the base infrastructure was in place, it was possible to remove division expressions and with them the notion of trapping constants and their associated miscompiles. I also removed a few more constant expressions, namely extractvalue, insertvalue, fadd, fsub, fmul, fdiv, frem and fneg. However, there are still quite a few expressions left, and I haven’t done recent work on this. Each removal requires significant effort to remove all users of the respective constant expression API. I expect I’ll come back to this on an as-needed basis. Callbr representation LLVM represents asm goto using the callbr terminator in IR. Historically, this made use of block addresses: %res = callbr i32 asm "..." , "=r,r,i" ( i32 %x , ptr blockaddress ( @foo , %indirect )) to label %fallthrough [ label %indirect ] Block addresses were originally introduced for use by indirectbr , which is LLVM’s representation of computed goto . indirectbr stores a list of potential jump targets, while the actual jump target is passed in as a block address. The use of block addresses imposes an unusual restrict on indirectbr : It’s successors cannot be updated. Doing so would also require updating blockaddresses corresponding to successors, and this is not generally possible. For example, consider unrolling an indirectbr : This would produce a clone of the instruction pointing to cloned blocks, and there is no sensible way to update blockaddress references (which of the blocks should they refer to?) Many control-flow transforms want to update successors, and indirectbr is very rare, so this is a semi-regular source of assertion failures. The implementation of callbr originally adopted the same design, and as such inherited all its problems. For the asm goto use-case, this is unnecessarily restrictive, because all blockaddresses will be direct operands of callbr, and as such can be updated. As such, I changed the callbr design to remove the blockaddress operands, and instead introduce a new asm constraint modifier ! , which indicates that a certain asm operand should be taken from the callbr indirect label list, rather than the call arguments: %res = callbr i32 asm "..." , "=r,r,!i" ( i32 %x )) to label %fallthrough [ label %indirect ] This representation change both removes optimization limitations, and makes them more robust, because callbr can now be essentially treated like any other control-flow, without unusual restrictions. The one remaining restriction is that the callbr result can only be used on the fallthrough edge, but there is ongoing work to remove this limitation . As a side note, I think there is an opportunity to improve the indirectbr situation by making blockaddress references not refer to a block, but rather to a certain indirectbr successor, along the lines of indirectbrsuccessor(some_indirectbr_identifier, 0) . This would not allow cloning of indirectbr, but permit most other CFG transforms and critical edge splitting in particular. Memory effect modelling The last major IR change of the year was a revamp of memory effect modelling . Historically, LLVM specified memory effects of functions using a combination of two attributes families: readnone/readonly/writeonly specify what kind of access is allowed, and argmemonly/inaccessiblememonly/inaccessiblemem_or_argmemonly specify which locations can be accessed. This modelling has two core problems: First, it does not allow specifying the read/write kind per location. For example, it’s not possible to precisely model a function that can read any memory but only write arguments. Second, it makes it hard/impossible to add new memory location kinds, because this would require an exponential number of attributes to encode different combinations. The new representations uses a single memory(...) attribute, which is internally backed by the MemoryEffects class (formerly known as the FunctionModRefBehavior ). The attribute specifies which access kind is allowed for each memory location. Examples are: ; Same access kind for all locations declare void @foo ( ptr %p ) memory ( none ) declare void @foo ( ptr %p ) memory ( read ) declare void @foo ( ptr %p ) memory ( write ) ; Specific access kinds for specific locations declare void @foo ( ptr %p ) memory ( argmem: write ) declare void @foo ( ptr %p ) memory ( inaccessiblemem: readwrite ) declare void @foo ( ptr %p ) memory ( argmem: read , inaccessiblemem: write ) ; Default access kind, plus specific access kind for some locations declare void @foo ( ptr %p ) memory ( read , argmem: readwrite ) declare void @foo ( ptr %p ) memory ( readwrite , argmem: none , inaccessiblemem: none ) The new representation was implemented in a patch stack ending at this patch . This was another somewhat annoying change, in that it required updating many places working with memory attributes, and even more tests, in an atomic commit. While the new representation already provides some benefits in itself (such as accurate materialization of inference results, and as such better optimization), a large part of the motivation for this change is the ability to track new memory locations in the future. Currently, we only track arguments, inaccessible memory and “everything else”. The somewhat oxymoronic notion of inaccessible memory refers to memory that is not visible to the current module. Intrinsic side-effects are commonly modelled as a read and write of inaccessible memory. This could be refined to, for example, separately consider accesses to global variables, as well as captured/escaped pointers. Furthermore, explicitly modelling thread identity as a memory location would properly address issues related to the fact that thread identity can change inside a coroutine function. Allocator support This was not my own proposal, but I was involved in the work, so I’ll mention it here as well. LLVM supports quite a few optimizations on memory allocation functions, such as removing unused allocations. Historically, these were based on a hardcoded list of allocator functions. The allocator attributes proposal encodes the necessary information using attributes instead, which allows frontends (and in particular Rust) to teach LLVM about their custom allocation functions, without having to patch LLVM. Previously, Rust included such a patch in rustup-distributed binaries, but the same optimization was not available in distro-provided binaries. We might as well use the Rust allocator functions as an example for how the new attributes look like: declare noalias ptr @__rust_alloc ( i64 %size , i64 allocalign %align ) allockind ( "alloc,uninitialized,aligned" ) allocsize ( 0 ) "alloc-family" = "__rust_alloc" declare noalias ptr @__rust_alloc_zeroed ( i64 %size , i64 allocalign %align ) allockind ( "alloc,zeroed,aligned" ) allocsize ( 0 ) "alloc-family" = "__rust_alloc" declare noalias ptr @__rust_realloc ( ptr allocptr %ptr , i64 %old_size , i64 allocalign %align , i64 %new_size ) allockind ( "realloc,uninitialized,aligned" ) allocsize ( 3 ) "alloc-family" = "__rust_alloc" declare void @__rust_dealloc ( ptr allocptr %ptr , i64 %size , i64 %align ) allockind ( "free" ) "alloc-family" = "__rust_alloc" There’s quite a few different attributes involved here! Here’s what they are for: noalias on the return indicates that the allocator returns a pointer with fresh provenance. There is no (well-defined) way to read or write the allocated memory except by going through that pointer. (This is a pre-existing attribute.) allocsize indicates the number of the argument that specifies the allocation size. The allocator must return a null pointer, or a pointer that is dereferenceable for that many bytes. (This is also a pre-existing attribute.) allocalign indicates the argument that specifies the allocation alignment. The allocator must return a pointer aligned to that value. allockind specifies which kind of allocation function this is (alloc/realloc/free) and which properties it has. uninitialized means that the initial value of the allocation is uninitialized, zeroed means that it is zero. allocptr marks the argument that is being reallocated/freed. "alloc-family" marks the functions as being part of one family: Pairs of allocation functions can only be removed if they belong to the same family. Otherwise, we may run into issues when allocation functions are partially inlined. My own involvement in this work (apart reviewing the patches) was in adjusting optimizations to query specific allocator properties they rely on, rather than performing a generic “is this an allocator?” check, which is not really compatible with the fine-grained attribute encoding. For example, a lot of optimizations really only care about the provenance implications of allocators, and as such should be checking for the presence of a noalias return value, and nothing else. We are not entirely clean on this front, mainly because there are a number of optimizations which are not, strictly speaking, correct. Integer min/max intrinsics Historically, LLVM has represented integer min/max operations as an icmp+select sequence. For example, a umin would be a &lt; b ? a : b . This is known as the “select pattern flavor” (SPF) representation. Representing min/max operations as icmp and select has the big advantage that all existing optimizations on icmp and select instructions automatically work on them. It also has the big disadvantage that all existing optimizations work on them: We very much don’t want to break up canonical min/max patterns, to ensure that the backend can recognize and efficiently lower them. As such, there is a continuous tension between trying to optimize icmps and selects, while also trying to not break min/max patterns. The outcome has been many infinite transform loops. One of the other motivations for moving away from this representation is that, thanks to the peculiar semantics of undef values , some common-sense properties do not hold in SPF representation. For example, min(x, 7) &amp; 7 could not be legally folded into min(x, 7) if x is an undef value ( proof ). The reason is that the value of undef can be separately chosen in the icmp and select instructions (one of the reasons why we are moving away from undef). Long story short, a few years ago the llvm.umin , llvm.umax , llvm.smin , llvm.smax and llvm.abs intrinsics were introduced. However, it took us quite a while to ensure that all optimizations on the SPF representation also work on the intrinsic representation. Last year, I addressed the final missing folds, and then enabled canonicalization from SPF to intrinsic representation. Branch on poison Moving on from IR representation, let’s talk about semantics instead! LLVM has a notion of poison values , which are essentially delayed undefined behavior. Immediate undefined behavior only occurs once the poison value is passed to certain operations. Where possible, we prefer to define IR semantics in terms of poison values, because this allows operations to be speculated (undefined behavior renders operations non-speculatable). One of the operations that turns poison values into immediate undefined behavior are conditional branches. However, while this was already specified in the LLVM IR specification for a long time, we were aware of many optimizations that introduce new branches on poison. As such, we were not willing to actually exploit branch on poison UB except where it was grandfathered in. These issues are usually easy to fix and tend to come in two flavors. First, when introducing new branches, the branch condition needs to be frozen: %res = select i1 %c , i32 %x , i32 %y ; convert into %c.fr = freeze i1 %c br i1 %c.fr , label %if , label %else if: br label %join else: br label %join join: %res = phi i32 [ %x , %if ], [ %y , %else ] Freeze converts the poison value in an arbitrary (but fixed) well-defined value, in this case either true or false. Inserting freeze is necessary here, due to the difference in poison semantics between select and br: Select on a poison condition returns poison, while branch on a poison condition is immediate undefined behavior. (A freeze is not needed when converting br to select, which is the much more common transform.) The second case occurs when merging conditions, for example converting two separate branches into an and: br i1 %c1 , label %if1 , label %else if1: br i1 %c2 , label %if2 , label %else ; convert into %and = select i1 %c1 , i1 %c2 , i1 false br i1 %and , label %if2 , label %else Converting this into %and = and i1 %c1, %c2 would be incorrect, because if %c1 == false and %c2 == poison , this would also make %and poison and cause immediate undefined behavior, which was not present in to the original program. Instead we create a “logical” and, which does not propagate poison from the second operand, if the first one is already false. There is also a logical or operation: and i1 %c1 , %c2 ; Bitwise And select i1 %c1 , i1 %c2 , i1 false ; Logical And or i1 %c1 , %c2 ; Bitwise Or select i1 %c1 , i1 true , i1 %c2 ; Logical Or Much to the chagrin of certain parts of the Rust community, the fact that it’s easy to “fix” is not enough: When it comes to largely theoretical miscompiles, the baseline expectation is that a reasonable effort is made to mitigate the optimization impact of the change. Just slapping freeze on everything is easy, but analyzing and mitigating the optimization regressions this results in requires a large amount of work. In this case, work was required mainly in three areas. The first is scalar evolution (SCEV), which is the analysis framework for loop optimizations. If a loop has exactly two exits, one after %n iterations, and one after %m iterations, then the exit count of the loop is not %n umin %m , but rather %n umin_seq %m . The distinction is that if %n is zero, then a poison value from %m does not propagate. If the first exit exits on the first iteration, then the second condition will never get evaluated. Before making that change , I had to implement a number of improvements to umin_seq analysis. For example, we can use poison implication reasoning to convert umin_seq into umin . The second area is optimization of logical and/or. While we already did a substantial amount of work to support these operations throughout the optimization pipeline, I still ran into multiple optimization regressions related to them. The most important change here is probably to consolidate the logic for optimizing bitwise and logical and/or of icmps, which then allows us to enable reassociating folds , and makes it easy to spot and fix cases where handling for logical operations is missing. Last but not least is freeze optimization. Analysis generally cannot look through freeze instructions, so we try push it upwards in the instruction chain. freeze (icmp X, 0) is essentially an opaque value, while icmp freeze(X), 0 can be analyzed and optimized. We were already mostly doing this, but were failing to push through freezes that are part of a recurrence . In this case, we want to move the freeze to the start value of the recurrence, rather than freezing the value on each loop iteration. Additionally, if freeze %x is used, we want to make sure that all other uses of %x are also frozen . Nominally, this may seem like a an anti-optimization, because we’re replacing uses of %x with freeze %x . However, this is beneficial in practice, because it allows transforms based on value identity to work. If a fold is looking for some value V in two different places, we can’t have one of those be %x and the other freeze %x . With all issues fixed and optimization regressions addressed, we can finally rely on the specified semantics. The most important change is to exploit this to prove that a certain value cannot be poison without causing UB. This is particularly important for SCEV, and part of the reason why I started working on this in the first place. Rust As usual, I performed the upgrades to LLVM 14 and LLVM 15 in Rust. Since Google started testing Rust HEAD against LLVM HEAD, these upgrades have become somewhat simpler, because any necessary changes to LLVM bindings have already happened. Despite that, these updates never just work , because of issues on non-x86 or non-Linux platforms. For example, LLVM 14 broke ABI for certain builtins on Win64. LLVM 15 exposed some issues in rustc’s management of LLVM worker threads, and changed handling of atomics on thumbv6 in a way that required the addition of a new target feature to support Rust’s desired semantics. Usually, a good part of the work is to just get LLVM building on all CI images. To be compatible with old glibc and kernel versions, these often use very old compiler toolchains, which LLVM supports only theory, but not in fact. LLVM 16 raises the minimum requirement to GCC 7.1, and Josh Stone has been doing great work getting rustc ready for this change, including a raise in baseline requirements for linux-gnu targets, which is necessary to get sufficiently recent cross-compilation toolchains. Apart from LLVM upgrades, I also try to address any (LLVM-related) miscompiles or assertion failures that get reported against rustc, and look into optimization problems. Some new optimizations targeted at Rust are: Support for peeling loops with non-latch exits . This was motivated by an optimization problem with iter().skip() , but should fix a number other performance issues with exterior iteration over iterator adaptors as well. Support for load-only scalar promotion in the presence of aliasing loads, motivated by an optimization problem with array::IntoIter . Improved support for pushing operations across phi nodes , motivated by an optimization issue with iter().fold() . This was my most cursed revision: It went through five revert cycles before it stuck. Improved support for removing phi nodes of single-iteration loops and simplifying the result. This was motived by an optimization issue with slice::reverse() . There’s certainly a pattern here: optimizing iterators is hard. Apart from that, there’s some new bounds/overflow check optimizations (e.g. with.overflow support in IPSCCP ), as well as minor improvements to memcpy elimination (e.g. support for moving lifetime intrinsics , addressing regressions from MIR inlining). Iterators, bounds checks and memcpy are the trifecta of Rust optimization. Fedora While I work at Red Hat, I haven’t actually done any work directly on RHEL yet. I did package LLVM 15 for Fedora 37, which then serves as the template for the RHEL packages. This was new to me, as I haven’t done any packaging work before. Incidentally, both LLVM and Fedora release major versions twice a year, so each version of Fedora comes with a new LLVM version. This starts with a self-contained change proposal . Once release candidates are available, these get built in COPR , and once the GA release is available, the Fedora RPM repositories get updated, and builds are produced inside a side-tag , which is then merged by bodhi . A side-tag is basically a temporary fork of Fedora, which allows building multiple packages, and making sure these only get merged together. If we update to llvm-15.0.0, we also need to update to clang-15.0.0 at the same time. Fedora actually packages 16 different LLVM subprojects, so these all get pushed out as part of the same update. Because the LLVM and Fedora release cycles are somewhat misaligned, the LLVM update goes in rather late (after the Fedora beta release), long after the package mass-rebuild. To avoid the need to rebuild all packages against the new LLVM version, compatibility packages (like llvm14) are provided. These provide the libraries needed by already built packages, and can be used to produce new builds if a rebuild against the new LLVM version is not feasible. Updating LLVM in Fedora was a good bit more work than I expected. Part of this comes down to the fact that Fedora uses standalone builds, where each LLVM subproject is built separately (and links against libLLVM.so etc), while the standard LLVM build configuration is a monolithic build that produces everything from LLVM over clang to libcxx in one go. As a non-default build configuration, LLVM developers always find new and exciting ways to break standalone builds. Compile-time I maintain the LLVM compile-time tracker (see original blog post ) and make sure that any significant compile-time regressions at least get an investigation. In many cases just informing the patch author is sufficient, and they will work on mitigating the impact themselves. Significant regressions start at around 0.1%. The background to keep in mind here is that individual optimization passes often only take up a fraction of total compile-time, so an end-to-end regression of 0.1% is often a large regression in a single pass. It’s also quite common though, that regressions occur due to second order effects – for example, an optimization pushes a function over an inlining threshold, and that has major impact down the line. Such cases are generally considered uninteresting. I recently added support for showing long-term compile-time changes, which look as follows since December 2021 (in percent since start): I think this is the first time in quite a few releases where we end up with an overall regression. However, the situation is not quite as bad as it looks. In particular, the large regression on the right is due to enabling C++17 by default. The close to two times slowdown in 7zip O0 builds comes down to STL headers becoming 2-3 times as large in C++17. While this is sad, and I had to edit out some choice words on the C++ standardization committee (I hear that this gets even worse in C++20), at least this does not affect non-clang compilers (e.g. Rust) and C code. The large regression in optimized debug builds (green line) on the left is due to more precise debuginfo variable location tracking in the backend getting enabled. This originally landed with a 6% geomean regression, but after work from both the patch author and myself, the regression was reduced to 2% when the change was relanded. A big win in this period was a 2% improvement from not rerunning the function simplification pipeline on unchanged functions when reprocessing an SCC (strongly connected component) in the call graph. One of my own optimizations leading to an 0.5% improvement was to support lazy use optimization in MemorySSA, which improved EarlyCSE performance. What’s next? With the opaque pointer migration finished, I’m only aware of one remaining major design issue in LLVM, which is the getelementptr instruction . While it ultimately just adds an offset to a pointer, it is specified in a type-based/structural way. Here are three ways to write the same getelementptr instruction: %struct = type { i32 , { i32 , { [ 2 x i32 ] } } } %ptr = getelementptr %struct , ptr %base , i64 1 , i32 1 , i32 1 , i32 0 , i64 1 %ptr = getelementptr i32 , ptr %base , i64 7 %ptr = getelementptr i8 , ptr %base , i64 28 However, while these are equivalent, optimizations have to go out of their way to treat them as such. Many GEP optimizations don’t bother and will only handle cases where the source element type (the first argument) is the same. The situation here has become slightly worse with opaque pointers, because typed pointers at least provided some constraints on source/result pointer types and thus resulted in more consistent type use. Ultimately though, the current representation is just bad, because it is completely divorced from the actual semantics of the instruction. A better representation would be an instruction that adds an offset to a pointer: %ptr = ptradd ptr %base , i64 28 This would make many optimizations that work with address calculations much simpler, more reliable, and also faster (an embarrassingly large amount of time is spent converting GEP indices into offsets). I have some hope that doing this change will be significantly simpler than the opaque pointer migration, mainly because we can both make getelementptr IRBuilder APIs emit ptradd instead, and pretend that ptradd is an i8 GEP, which will allow many things to work without changes. Of course, it would still be quite a complex change, and require another set of massive test updates. On a different note, an area that deserves much more investment than it gets is compile-time. In the past year, my compile-time work was mostly focussed on mitigating regressions, not so much on improving things. I would like to start working on this more actively again. I think there is a lot of value in reducing compile-times, probably more than in adding increasingly low-impact optimizations. I know that I’m not great at making long term plans, so I’ll leave it at those two items. Usually, things just turn up along the way. And in between, there are always miscompiles and assertion failures to fix, even though those don’t make for nice blog posts. As a final note, I’ll mention that I’ve recently written a blog post on contributing to LLVM . It may be helpful if you want to start working on LLVM as well :) If you liked this article, you may want to browse my other articles or follow me on Twitter or Mastodon .
2026-01-13T08:49:45
https://jsfiddle.net/cdn-cgi/content?id=jG5JUVX1Zcp9.wUePD22gYzHXhC4bRNAAxFo8m6DZk0-1768294134.3006177-1.0.1.1-zMsvEannf7pVurXmEH.f6sbUUp3fNLAd3UCdEep1TjY
Green Roof Research: A Deep Dive into the Science of Vegetated Roofs Introduction to Green Roof Research Green roofs, also known as vegetated roofs, are an innovative approach to urban planning and architecture. These roofs are covered with plants, soil, and other vegetation, providing a range of benefits for buildings, occupants, and the environment. In this article, we will delve into the scientific aspects of green roof research, exploring the physics, biology, and chemistry behind these unique structures. The Physics of Green Roofs: Heat Transfer and Energy Efficiency One of the primary benefits of green roofs is their ability to reduce energy consumption and improve building insulation. The vegetation and soil on a green roof act as a natural barrier, reducing heat transfer between the building and the external environment. This is achieved through a combination of conduction, convection, and radiation. During the summer months, the plants absorb solar radiation, reducing the amount of heat that enters the building. In the winter, the soil and vegetation provide additional insulation, reducing heat loss. The thermal performance of green roofs can be modeled using the heat transfer equation: Q = U \* A \* ΔT, where Q is the heat transfer rate, U is the overall heat transfer coefficient, A is the surface area, and ΔT is the temperature difference between the inside and outside environments. Studies have shown that green roofs can reduce energy consumption by up to 25% compared to traditional roofs. The Biology of Green Roofs: Plant Selection and Ecosystem Services The selection of plant species for green roofs is crucial, as it determines the overall performance and ecosystem services provided by the roof. Plants with shallow roots and low water requirements, such as sedums and grasses, are often preferred. These plants provide a range of benefits, including air pollution reduction, stormwater management, and habitat creation for wildlife. The ecosystem services provided by green roofs can be quantified using metrics such as the leaf area index (LAI) and the photosynthetic rate. The LAI is a measure of the total leaf surface area per unit ground area, while the photosynthetic rate measures the rate at which plants convert carbon dioxide into oxygen. Studies have shown that green roofs can increase biodiversity by up to 50% compared to traditional roofs. The Chemistry of Green Roofs: Soil Composition and Fertility The soil composition and fertility of green roofs play a critical role in determining the health and productivity of the plants. Green roof soils are typically designed to be lightweight, well-draining, and nutrient-rich. The chemical properties of the soil, such as pH and nutrient availability, must be carefully managed to support plant growth. The chemical reactions that occur in green roof soils can be described using the principles of soil chemistry. For example, the nitrogen cycle involves the conversion of nitrogen from one form to another, with plants absorbing nitrate and ammonium ions from the soil. Studies have shown that green roofs can reduce stormwater runoff by up to 70% compared to traditional roofs. Conclusion In conclusion, green roof research is a multidisciplinary field that combines physics, biology, and chemistry to understand the complex interactions between buildings, vegetation, and the environment. By exploring the scientific aspects of green roofs, we can optimize their design and performance, providing a range of benefits for buildings, occupants, and the environment. As the world becomes increasingly urbanized, green roofs offer a unique solution for mitigating the urban heat island effect, improving air quality, and enhancing biodiversity.
2026-01-13T08:49:45
https://jsfiddle.net/cdn-cgi/content?id=Do9VNEW_cYCgwAgyqCQa9K0Seq76x8JOB4ZjXJQu5HU-1768294134.3025749-1.0.1.1-j3SJJkfTLm1OKa1scWOffFow6i1E72efIpdPttdp.Rw
Mycoremediation: The Fungal Frontier of Environmental Restoration Mycoremediation: The Fungal Frontier of Environmental Restoration Deep within the earth's ecosystems, a network of fungal hyphae weaves an intricate web of life, supporting and sustaining the very foundations of our planet. Mycoremediation, the use of fungi to remediate polluted environments, has emerged as a groundbreaking approach to restore balance to our ecosystem. This innovative technique leverages the unique properties of mycelium, the vegetative part of a fungus, to degrade and transform toxic pollutants into harmless compounds. The science behind mycoremediation lies in the remarkable ability of certain fungal species to produce enzymes that break down complex organic molecules. These enzymes, such as laccase and peroxidase, can degrade a wide range of pollutants, including polycyclic aromatic hydrocarbons (PAHs), pesticides, and heavy metals. By introducing these fungi into contaminated soil or water, the mycelium can effectively "eat" the pollutants, rendering them harmless and restoring the environment to a healthy state. One of the most significant advantages of mycoremediation is its potential to target specific pollutants. For example, the oyster mushroom (Pleurotus ostreatus) has been shown to be highly effective in degrading PAHs, while the turkey tail mushroom (Trametes versicolor) has been found to be particularly adept at removing heavy metals from contaminated soil. By selecting the right fungal species for the job, scientists can tailor mycoremediation approaches to address specific environmental challenges. In addition to its effectiveness, mycoremediation also offers a sustainable and cost-efficient alternative to traditional remediation methods. Unlike chemical-based approaches, which can be expensive and energy-intensive, mycoremediation relies on natural processes and can be implemented at a relatively low cost. Furthermore, the use of fungi eliminates the need for invasive and disruptive excavation techniques, minimizing the impact on the surrounding ecosystem. As researchers continue to explore the vast potential of mycoremediation, new discoveries are shedding light on the complex relationships between fungi and their environments. For instance, studies have revealed that mycelium can form symbiotic relationships with plant roots, enhancing nutrient uptake and promoting healthy plant growth. This phenomenon, known as mycorrhizal association, highlights the critical role that fungi play in maintaining ecosystem balance and underscores the importance of preserving and promoting fungal diversity. In conclusion, mycoremediation represents a revolutionary approach to environmental restoration, one that harnesses the power of fungi to heal and protect our planet. As we continue to face the challenges of pollution and climate change, this innovative technique offers a beacon of hope for a more sustainable future. By embracing the fascinating world of mycology and tapping into the incredible potential of mycoremediation, we can work towards creating a healthier, more resilient environment for generations to come. 🔷 The future of environmental restoration is rooted in the fungal kingdom, where the boundaries between nature and technology blur. 🌿💡 As we delve deeper into the mysteries of mycoremediation, we may uncover even more surprising applications for this versatile and powerful tool. 🤊 Stay tuned for further developments in this exciting field, and join the journey into the uncharted territories of mycological innovation! ⛵
2026-01-13T08:49:45
https://www.npopov.com/2012/02/02/Pointer-magic-for-efficient-dynamic-value-representations.html
Pointer magic for efficient dynamic value representations Blog by nikic . Find me on GitHub , StackOverflow , Twitter and Mastodon . Learn more about me . &laquo; Back to article overview. Pointer magic for efficient dynamic value representations 02. February 2012 What always intrigued me were the various little tricks that JavaScript implementations use to be as fast as they are. One of those tricks is how JS implementations represent values to be more time and space efficient. I think it’s worth the time to look at those neat little tricks for two reasons: Firstly, some of them are also applicable in other situations (though most of them admittedly are not). And secondly, because they remind you of how various data is represented at the low level (stuff you may have learned in your CS courses at some point - or maybe not). So, let’s start! The trivial approach: Tagged unions JavaScript is a dynamically typed language and as such needs some kind of “value” data structure, which stores the current type and a value of that type. The trivial approach to this problem is to use a tagged union. This could look roughly like this: #include &lt;stdint.h&gt; class Value { public: enum TypeTag { IntType , DoubleType , StringType , ObjectType } // constructors, methods, ... private: union { int32_t asInt32 ; double asDouble ; String * asString ; Object * asObject ; } payload ; TypeTag type ; }; As you can see the idea is very simple. You have a type tag, which specifies which type the value currently has. And a union that’s used to store the various types. Examples to store integers and objects would look like that: inline Value :: Value ( int32_t number ) { type = IntType ; payload = number ; } inline Value :: Value ( Object * object ) { type = ObjectType ; payload = object ; } The problem with this straightforward approach is that the size of the above object would be 16 bytes = 128 bits (on a 64 bit machine), even though the actual information content is much lower (any individual value can be stored in 64 bits or less). Especially if this value structure is stored in an array, the overhead quickly adds up. Even outside of arrays, simply passing around this structure will already take up two 64 bit registers, and so on. So what we want is to make values smaller, ideally reducing them to just the size of the payload. Before we get to that for the general case, let’s first have a look at a technique called pointer tagging: An interlude: Pointer tagging Have a look at the above structure again. It consists of a union, which has a size of 8 bytes, and an integer which could fit into a single byte (a char ). So theoretically the total size should be 9 bytes. But it’s not - it’s 16 bytes. This is because the compiler adds padding to the data structure in order to align it in memory. This is done for performance reasons: The CPU can access the memory only in word sized chunks. So if our data always starts at a word it can be fetched efficiently. If it were to start somewhere in the middle of a word the CPU would have to apply masks and shifts in order to get the data - which would be too slow. A word on a 64 bit machine is 64 bit = 8 bytes (obviously ^^). So if all pointers to our object will be aligned to 8 bytes it means that they will be multiples of 8. A pointer thus can be 8, 16, 24, 109144, etc. But it can not be 7 or 13. Or speaking in binary: 0b1000 (=8), 0b10000 (=16), 0b11000 (=24), 0b11010101001011000 (=109144). As you can see the lower three bits are always zero. So those three bits are basically free to use. We can use them to store a “tag”, which is an integer between 0 (0b000) and 7 (0b111). pppppppp|pppppppp|pppppppp|pppppppp|pppppppp|pppppppp|pppppppp|pppppTTT ^- actual pointer three tag bits -^ Here is a sample implementation of how to do so: #include &lt;cassert&gt; #include &lt;stdint.h&gt; template &lt; typename T , int alignedTo &gt; class TaggedPointer { private: static_assert ( alignedTo != 0 &amp;&amp; (( alignedTo &amp; ( alignedTo - 1 )) == 0 ), "Alignment parameter must be power of two" ); // for 8 byte alignment tagMask = alignedTo - 1 = 8 - 1 = 7 = 0b111 // i.e. the lowest three bits are set, which is where the tag is stored static const intptr_t tagMask = alignedTo - 1 ; // pointerMask is the exact contrary: 0b...11111000 // i.e. all bits apart from the three lowest are set, which is where the pointer is stored static const intptr_t pointerMask = ~ tagMask ; // save us some reinterpret_casts with a union union { T * asPointer ; intptr_t asBits ; }; public: inline TaggedPointer ( T * pointer = 0 , int tag = 0 ) { set ( pointer , tag ); } inline void set ( T * pointer , int tag = 0 ) { // make sure that the pointer really is aligned assert (( reinterpret_cast &lt; intptr_t &gt; ( pointer ) &amp; tagMask ) == 0 ); // make sure that the tag isn't too large assert (( tag &amp; pointerMask ) == 0 ); asPointer = pointer ; asBits |= tag ; } inline T * getPointer () const { return reinterpret_cast &lt; T *&gt; ( asBits &amp; pointerMask ); } inline int getTag () const { return asBits &amp; tagMask ; } }; The code is fairly straightforward I think. You could then use it like this: double number = 17.0 ; TaggedPointer &lt; double , 8 &gt; taggedPointer ( &amp; number , 5 ); taggedPointer . getPointer (); // == &amp;number taggedPointer . getTag (); // == 5 The technique described above is useful in many contexts. Basically it’s applicable to any situation where you want to add a small bit of info to an aligned pointer. And this is also the situation we are in :) But before we get to that let’s first have a look at another, very similar trick: Storing integers in the pointer JavaScript does not have an integer type per se, it only has IEEE 754 doubles. Still, people mainly work with small integral numbers (think of loops, array indexes, etc). Thus it makes sense to store those small integers in a real integer variable instead of a double, because many operations are much faster this way. That’s also the reason why in the Value class above I have a distinct int32 type and not just a double type. Especially for integers the above Value approach seems like overkill: The 16 byte Value structure only stores 4 bytes of actual data, one byte of type information, and the remaining 11 bytes being padding. The solution obviously is to use something similar to the tagged pointers introduced above. You can say: “If the last bit of the pointer is 1 then it actually isn’t a pointer at all, but it’s an integer.” Here is how a pointer would look like: pppppppp|pppppppp|pppppppp|pppppppp|pppppppp|pppppppp|pppppppp|pppppTT0 ^- actual pointer two tag bits -^ ^- last bit 0 And this is how the integer would look like (note that as we need one bit for distinguishing the type the integer has only 63 bits): iiiiiiii|iiiiiiii|iiiiiiii|iiiiiiii|iiiiiiii|iiiiiiii|iiiiiiii|iiiiiii1 ^- actual integer ^- last bit 1 To get the actual integer value we just need to shift off the 1 bit using integer &gt;&gt; 1 . Here again a sample implementation: #include &lt;cassert&gt; #include &lt;stdint.h&gt; template &lt; typename T , int alignedTo &gt; class TaggedPointerOrInt { private: static_assert ( alignedTo != 0 &amp;&amp; (( alignedTo &amp; ( alignedTo - 1 )) == 0 ), "Alignment parameter must be power of two" ); static_assert ( alignedTo &gt; 1 , "Pointer must be at least 2-byte aligned in order to store an int" ); // for 8 byte alignment tagMask = alignedTo - 1 = 8 - 1 = 7 = 0b111 // i.e. the lowest three bits are set, which is where the tag is stored static const intptr_t tagMask = alignedTo - 1 ; // pointerMask is the exact contrary: 0b...11111000 // i.e. all bits apart from the three lowest are set, which is where the pointer is stored static const intptr_t pointerMask = ~ tagMask ; // save us some reinterpret_casts with a union union { T * asPointer ; intptr_t asBits ; }; public: inline TaggedPointerOrInt ( T * pointer = 0 , int tag = 0 ) { setPointer ( pointer , tag ); } inline TaggedPointerOrInt ( intptr_t number ) { setInt ( number ); } inline void setPointer ( T * pointer , int tag = 0 ) { // make sure that the pointer really is aligned assert (( reinterpret_cast &lt; intptr_t &gt; ( pointer ) &amp; tagMask ) == 0 ); // make sure that the tag isn't too large assert ((( tag &lt;&lt; 1 ) &amp; pointerMask ) == 0 ); // last bit isn't part of tag anymore, but just zero, thus the &lt;&lt; 1 asPointer = pointer ; asBits |= tag &lt;&lt; 1 ; } inline void setInt ( intptr_t number ) { // make sure that when we &lt;&lt; 1 there will be no data loss // i.e. make sure that it's a 31 bit / 63 bit integer assert ((( number &lt;&lt; 1 ) &gt;&gt; 1 ) == number ); // shift the number to the left and set lowest bit to 1 asBits = ( number &lt;&lt; 1 ) | 1 ; } inline T * getPointer () const { assert ( isPointer ()); return reinterpret_cast &lt; T *&gt; ( asBits &amp; pointerMask ); } inline int getTag () const { assert ( isPointer ()); return ( asBits &amp; tagMask ) &gt;&gt; 1 ; } inline intptr_t getInt () const { assert ( isInt ()); return asBits &gt;&gt; 1 ; } inline bool isPointer () const { return ( asBits &amp; 1 ) == 0 ; } inline bool isInt () const { return ( asBits &amp; 1 ) == 1 ; } }; Usage example: // either a pointer to a double (with a two bit tag) or a 63 bit integer double number = 17.0 ; TaggedPointerOrInt &lt; double , 8 &gt; taggedPointerOrInt ( &amp; number , 3 ); taggedPointerOrInt . isPointer (); // == true; taggedPointerOrInt . getPointer (); // == &amp;number taggedPointerOrInt . getTag (); // == 3 taggedPointerOrInt . setInt ( 123456789 ); taggedPointerOrInt . isInt (); // == true taggedPointerOrInt . getInt (); // == 123456789 Now using the above technique we have a powerful way to optimize the original Value class. Integers will be stored directly in the pointer; doubles, strings and objects will be stored as a pointer with a tag identifying their type (e.g 0 = 0b00 = object, 1 = 0b01 = string, 2 = 0b10 = double). Booleans could be stored similarly to ints (and fetched using a simple bool &gt;&gt; 3 ): 00000000|00000000|00000000|00000000|00000000|00000000|00000000|0000b110 actual bool value -^ ^- last bit 0 (as it isn't an int) tag = 3 = 0b11 to identify that it's a bool -^^ So what have we gained overall? Quite a bit: The size of the value structure is back to 64 bits, making it half as large. However, there is also a cost: Doubles now need to be stored as a pointer, which also implies that they have to be allocated on the heap. As such, we have improved the situation for most types, but introduced a large regression for doubles. Wouldn’t it be nice if we could avoid that heap allocation for doubles as well? Pointers in the NaN-Space Recap: How do doubles look like? Doubles in JS are following the IEEE 754 Standard for Floating-Point Arithmetic. In C++ doubles aren’t specified to follow any standard, but we assume that they use IEEE 754, too (which, practically speaking is a pretty good assumption. In general this whole article is nothing more than a large set of evil assumptions that any self-respecting C++ developer would murder you for.) As you probably know IEEE 754 doubles are internally represented using the following bit sequence: seeeeeee|eeeemmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm ^- exponent ^- mantissa ^- sign bit The resulting float is basically (-1)^s * m * 2^e (speaking oversimplifyingly). What is much more important to us are some special values that doubles can have: Positive zero (0.0): seeeeeee|eeeemmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm 00000000|00000000|00000000|00000000|00000000|00000000|00000000|00000000 ^- sign bit 0 (= +), all other bits also 0 Negative zero (-0.0): seeeeeee|eeeemmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm 10000000|00000000|00000000|00000000|00000000|00000000|00000000|00000000 ^- sign bit 1 (= -), all other 0 IEEE defines two zeros: +0 and -0. Both have exponent and mantissa zeroed out and are distinguished by the value of the sign bit. This may seem pointless at first - zero is zero after all - but it allows for some subtle distinctions. For example 1.0 / 0.0 is +INF whereas 1.0 / -0.0 is -INF. There are also other operations where the sign of the zero makes a difference. One interesting behavior of the zeros is that they are considered equal in comparison. I.e. 0.0 == -0.0. The only way to find out whether a number is negative zero is to check whether the sign bit is set: inline bool isNegativeZero ( double number ) { return number == 0. &amp;&amp; * reinterpret_cast &lt; int64_t *&gt; ( &amp; number ) != 0 ; } Positive infinity (+INF): seeeeeee|eeeemmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm 01111111|11110000|00000000|00000000|00000000|00000000|00000000|00000000 ^- exponent bits all 1 mantissa bits all 0 -^ ^- sign bit 0 (= +) Negative infinity (-INF): seeeeeee|eeeemmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm 11111111|11110000|00000000|00000000|00000000|00000000|00000000|00000000 ^- exponent bits all 1 mantissa bits all 0 -^ ^- sign bit 1 (= -) Infinity has all exponent bits set and a zero mantissa. Again there is +INF and -INF, distinguished by the sign bit. Signaling NaN: seeeeeee|eeeemmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm s1111111|11110ppp|pppppppp|pppppppp|pppppppp|pppppppp|pppppppp|pppppppp ^- first mantissa bit 0 everything else is "payload" -^ ^- exponent bits all 1 and mustn't be all-zero (as it ^- any sign bit would be INF then) Quiet NaN: seeeeeee|eeeemmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm s1111111|11111ppp|pppppppp|pppppppp|pppppppp|pppppppp|pppppppp|pppppppp ^- first mantissa bit 1 everything else is "payload" -^ ^- exponent bits all 1 ^- any sign bit NaNs represent values that are Not a Number. E.g. 0.0/0.0 = NaN. NaNs also have interesting comparison semantics, as any comparison with NaN will be false (including NaN == NaN). The representations of NaNs also have all exponent bits set (like infinity) but have a non-zero mantissa. The sign bit is irrelevant for NaNs. There are two types of NaNs: Signaling NaNs (sNaN) and quiet NaNs (qNaN). They are distinguished by the first bit after the exponent: If it is 1 then the NaN is quiet; if it is 0 it is signaling. Signaling NaNs - in theory - should throw an invalid operation exception (EM_INVALID) when they are operated upon, whereas quiet NaNs should just be left alone. Practically this doesn’t seem to be used much, at least in MSVC this is disabled by default and needs to be enabled by compiler option + __controlfp() call. Where it starts to get interesting for us is that NaNs additionally encode a 51 bit “payload” in the mantissa. This payload was originally designed to contain error information. But deceitful as we are, we will misuse that NaN payload to stuff other things in it - like integers and pointers. 64 bit is a lie On 64 bit architectures pointers have a size of 64 bits, obviously. But think about that again: How much is 64 bit actually? That’s 2^64 = 1.84467441 * 10^19 addressable memory bytes. That’s 16 EiB (Exabytes). Or talking in more convenient terms that’s 17179869184 Gigabytes. I don’t know about you, but I only have 16GB of memory. Some high-end server setups may have 4 TiB of memory, but even those only need a 42 bit address space (2^42 = 4 TiB). Unsurprisingly we aren’t the first to notice this: the x86-64 architecture utilizes only the lower 48 bits (which still allows 256 TiB) of a pointer. Additionally bits 63 through 48 must be copies of bit 47. Pointers that follow this pattern are called canonical. This leads to a strange looking address space (you can find a nicer version of this image on Wikipedia ): 0xFFFFFFFF.FFFFFFFF ... &lt;- Canonical upper "half" 0xFFFF8000.00000000 ... ... &lt;- Noncanonical ... 0x00007FFF.FFFFFFFF ... &lt;- Canonical lower "half" 0x00000000.00000000 The operating system normally assigns only pointers from the lower half to applications, reserving the upper half for itself. As always there are outliers - e.g. Solaris assigns addresses from the upper half under some circumstances (mmap). But we’ll just ignore that and assume that only the lower half from 0x00000000.00000000 to 0x00007FFF.FFFFFFFF is used. (Again, all these evil assumptions…) At this point you should see what I am driving at: If pointers are really only 48 bits large they fit perfectly into our 51 bit payload space. Sample implementation Here is an implementation stub for doing so (just implements doubles, ints and void pointers; a real implementation would look similar, just with more types): #include &lt;stdint.h&gt; #include &lt;cassert&gt; inline bool isNegativeZero ( double number ) { return number == 0 &amp;&amp; * reinterpret_cast &lt; int64_t *&gt; ( &amp; number ) != 0 ; } class Value { private: union { double asDouble ; uint64_t asBits ; }; static const uint64_t MaxDouble = 0xfff8000000000000 ; static const uint64_t Int32Tag = 0xfff9000000000000 ; static const uint64_t PtrTag = 0xfffa000000000000 ; public: inline Value ( const double number ) { int32_t asInt32 = static_cast &lt; int32_t &gt; ( number ); // if the double can be losslessly stored as an int32 do so // (int32 doesn't have -0, so check for that too) if ( number == asInt32 &amp;&amp; ! isNegativeZero ( number )) { * this = Value ( asInt32 ); return ; } asDouble = number ; } inline Value ( const int32_t number ) { asBits = number | Int32Tag ; } inline Value ( void * pointer ) { // ensure that the pointer really is only 48 bit assert (( reinterpret_cast &lt; uint64_t &gt; ( pointer ) &amp; PtrTag ) == 0 ); asBits = reinterpret_cast &lt; uint64_t &gt; ( pointer ) | PtrTag ; } inline bool isDouble () const { return asBits &lt; MaxDouble ; } inline bool isInt32 () const { return ( asBits &amp; Int32Tag ) == Int32Tag ; } inline bool isPointer () const { return ( asBits &amp; PtrTag ) == PtrTag ; } inline double getDouble () const { assert ( isDouble ()); return asDouble ; } inline int32_t getInt32 () const { assert ( isInt32 ()); return static_cast &lt; int32_t &gt; ( asBits &amp; ~ Int32Tag ); } inline void * getPointer () const { assert ( isPointer ()); return reinterpret_cast &lt; void *&gt; ( asBits &amp; ~ PtrTag ); } }; Again, the code should be easy enough to understand. As an aid, here are the three consts from the top in binary: Maximum double (qNaN with sign bit set without payload): seeeeeee|eeeemmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm 0xfff8000000000000: 11111111|11111000|00000000|00000000|00000000|00000000|00000000|00000000 32 bit integer: seeeeeee|eeeemmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm 0xfff9000000000000: 11111111|11111001|00000000|00000000|iiiiiiii|iiiiiiii|iiiiiiii|iiiiiiii ^- integer value Pointer: seeeeeee|eeeemmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm 0xfffa000000000000: 11111111|11111010|pppppppp|pppppppp|pppppppp|pppppppp|pppppppp|pppppppp ^- 48 bit pointer value A few more considerations The above code makes doubles accessible directly, without further operations and accesses pointers using a bit mask (that’s what Mozilla does). An alternative implementation could do it the other way around and make pointers accessible directly and doubles using an offset (i.e. you would add 0x0001000000000000 on inserting a double and subtract it when retrieving it). The latter is what WebKit does. On 32 bit machines one can access the lower 32 bits of the 64 bit value directly. So both pointers and integers can be accessed directly in any case. On the other hand, whereas the tagged pointer with embedded integer approach would need only a 32 bit value on 32 bit machines, the NaN approach will need a 64 bit value in both 32 bit and 64 bit environments. So on 32 bit two words need to be passed around, instead of just one (that’s why Mozilla calls this approach fatvals). Still, considering the overall wins it is worth it: Both integers and doubles (and for that matter also bools and all other “small” values) can be stored directly in the value, without accessing the heap. Links value representation in javascript implementations (article similar to this one, looking more at the general picture than at the concrete implementation) Mozilla’s New Javascript Value Representation (you’ll have to scroll down a bit) WebKit’s implementation: declaration ; inline methods ; methods Mozilla’s implementation If you liked this article, you may want to browse my other articles or follow me on Twitter or Mastodon .
2026-01-13T08:49:45
https://wiki.python.org/moin/BeginnersGuide/Programmers?action=print
BeginnersGuide/Programmers - Python Wiki BeginnersGuide Programmers Please Note This is a Wiki page. Users with edit rights can edit it. You are, therefore, encouraged to add details of material that other Python users will find useful. It is not an advertising page and is here to serve the whole Python community. Users who continually edit pages to give their own materials (particularly commercial materials) prominence, or spam the listing with multiple entries which point to resources with only slightly altered material, may subsequently find their editing rights disabled. You have been warned . On a cheerier note - there is a constant stream of new and updated information on Python as the language is exploding in popularity. Only enthusiastic volunteers can keep this page current, so if something helps you, feel free to link it here. If a link doesn't work, remove it unless there's an obvious new location for the same content. Python for Programmers The tutorials on this page aim at people with previous experience with other programming languages (C, Perl, Lisp, Visual Basic, etc.). Also of potential interest are related pages BeginnersGuide/Overview and BeginnersGuide/NonProgrammers (it's not always easy to distinguish "for experienced programmers" and "for first-time programmers" and there's likely some overlap). Also see the tips in MovingToPythonFromOtherLanguages . Books, Websites, Tutorials (non-interactive) Resources A beginner-friendly Python course with interactive, bite-size lessons, and over 100 challenges. A beginner-friendly Python tutorial that starts with the absolute basics but also covers more advanced stuff like Python software deployment. A Byte of Python , by Swaroop C.H. An introductory text for beginners and experienced programmers looking to learn Python. After Hours Programming's Python Introduction A beginners introduction into Python. Awesome Python A curated list of awesome Python frameworks, libraries, software and resources. CheckiO interactive learning resource Creative way to improve Python skills with interesting tasks, it also supports Python 3|2. Classpert - Python - A collection of free and paid Python online courses from a wide range of providers. Codédex - A learn to code platform for K-12 and college students. CodersLegacy A website + blog geared towards both new and experienced programmers. Mainly focused on teaching Python. Dive Into Python 3 by Mark Pilgrim. Effective Python - Paid book by Brett Slatkin; Practical best practices and idiomatic patterns to write cleaner, safer Python. Elements of Python Style This document goes beyond PEP8 to cover the core of what the author thinks of as great Python style. Finxter - Solve Python puzzles and test your Python skill level (beginner to grandmaster level). Full Stack Python Once you know the basics, learn how to build, deploy and operate Python Applications. ItsMyCode A Python Programming Blog which teaches Python basics and helps to solve various issues which developers face in day to day Programming Kaggle Learn Hands-on Python and data skills using real datasets and notebooks. Learn Python Step by Step - Start learning python from the basics to pro-level and attain proficiency. OverIQ Learn Python OverIQ - Site has additional tutorials on Django, Flask, SQLAlchemy and MySQL Connector. An entry-level course to get you started with Python Programming. Learn Python - Tutorial for Beginners A comprehensive Python guide to get started, Python tutorials, and examples for beginners. Free python tips and tutorials Python tips and tutorials for beginners and professional programmers. Intro to Python - A Brief Presentation about Python mainly aimed at experienced programmers. Might be nice as a first pass over the language. Learn Python in 10 minutes Pytest documentation Learn testing, fixtures, and clean API design through practical examples. Python 3 Patterns, Recipes, and Idioms by Bruce Eckel and Friends. Python Cookbook - Paid book by David Beazley &amp; Brian K. Jones Recipe-based solutions to common real-world Python problems. Python Course - This online Python course is aiming at beginners and with advanced topics at experienced programmers as well. Python Koans Learn Python through TDD Python Programming for Beginners A short introduction to writing command-line applications in Python by Jacek Artymiak. PythonSpeed.com Great resource with insightful ways to speed up your Python code Python Essential Reference (book) If you want a highly compressed K&amp;R-style 'just the facts' overview, David Beazley's "Python Essential Reference" covers practically all of the language in about a hundred pages. A version that covers Python 3.7 is in progress. Resources for Learning Python 10 of the most popular / recommended platforms in the World when it comes to learning Python, either as a complete beginner or someone who knows their way around. Python Tutorial This tutorial is part of Python's documentation set and is updated with each new release. Wikiversity:Python The Wiki(anything) information about Python. Python Programming Tutorials Python programming tutorials. Python Tutorials Python in plain English. Learn Python - Programming Made Easy Simplified tutorials for beginners (Learn with relevant examples). Pandas Cookbook A newbie friendly introduction to pandas with real-life examples. Ultimate Python study guide Ultimate Python study guide for newcomers and professionals alike. Learn coding with Python notebooks A place where users can learn lot about Python coding with Python notebooks. Learn Python Programming Easy to understand Python tutorial explained with examples for beginners and professionals alike. Interactive Tools and Lessons Computer Science Circles - University of Waterloo Computer programming online tutor HackInScience - free and open-source Python training website LabEx - Hands-on Labs - Practice Python programming with interactive exercises in a web-based coding environment, offering hands-on labs and real-world scenarios. Learn Python - A no install Python course with interactive exercises powered by Pyodide. Python Tutor - online code visualizer/debugger tool with AI support Thonny - Python IDE for beginners. Has intuitive features for program runtime visualization PyFlo - A free, interactive guide to becoming a Python Programmer learnpy.dev - A kid-oriented, interactive, web-based introduction to coding in Python Python Video Tutorials Python in 4 hours Learn Python - Full Course for Beginners by FreeCodeCamp Intermediate Python in 6 hours - Intermediate Course by FreeCodeCamp MIT OpenCourseWare - Introduction to Computer Science and Programming in Python Khan Academy computer science playlist teaches Python (free, donations requested) Python Exception Handling for beginners - Exception handling with Python. Python Lists and Object Tutorial for Beginners - Sorting Objects with Python. Python OOP Tutorial for Beginners - Getting started with OOP programming with Python. Frank A's Python YouTube chanel - Learn Python Programming (45 videos) Corey Schafer YouTube channel - Python tutorials and other topics like Django, Pandas, Matplotlib, Flask, Tkinter Python video tutorial (commercial/paid) Learn to Code with Python - Introductory Python, also courses on Django, data handling, database connection, and projects like a web crawler or news aggregator. Webucator Python Essentials - also courses in Django, Spark, AI and Data Science, etc. Free Python Courses Free Python 3 email course (almost daily Python lesson + cheat sheets, email required) Other Python Resource Aggregators Learn Python - Best Python Tutorials and Courses Python tutorials &amp; courses recommended by the programming community. Learn Python - Best Python Courses Python tutorials submitted and ranked by Python developers with the best rising to the top Paid Python 3 course (almost daily Python lesson + cheat sheets) CategoryPythonWebsite CategoryCategory CategoryDocumentation BeginnersGuide/Programmers (last edited 2026-01-08 18:28:33 by MatsWichmann )
2026-01-13T08:49:45
https://registry.modelcontextprotocol.io
Official MCP Registry Official MCP Registry Discover Model Context Protocol servers GitHub Docs API Reference Recently Updated Searching... Show only latest versions Loading servers... Retry Previous Next Built in the open by MCP contributors Server: Production ( ... ) API Base URL Production (registry.modelcontextprotocol.io) Staging (staging.registry.modelcontextprotocol.io) Local (localhost:8080) Custom Cancel Apply
2026-01-13T08:49:45
https://www.npopov.com/2012/12/22/Cooperative-multitasking-using-coroutines-in-PHP.html
Cooperative multitasking using coroutines (in PHP!) Blog by nikic . Find me on GitHub , StackOverflow , Twitter and Mastodon . Learn more about me . &laquo; Back to article overview. Cooperative multitasking using coroutines (in PHP!) 22. December 2012 One of the large new features in PHP 5.5 will be support for generators and coroutines. Generators are already sufficiently covered by the documentation and various other blog posts (like this one or this one . Coroutines on the other hand have received relatively little attention. The reason is that coroutines are both a lot more powerful and a lot harder to understand and explain. In this article I’d like to guide you through an implementation of a task scheduler using coroutines, so you can get a feeling for the stuff that they allow you to do. I’ll start off with a few introductory sections. If you feel like you already got a good grasp of the basics behind generators and coroutines, then you can jump straight to the “Cooperative multitasking” section. Generators The basic idea behind generators is that a function doesn’t return a single value, but returns a sequence of values instead, where every value is emitted one by one. Or in other words, generators allow you to implement iterators more easily. A very simple example of this concept is the xrange() function: function xrange ( $start , $end , $step = 1 ) { for ( $i = $start ; $i &lt;= $end ; $i += $step ) { yield $i ; } } foreach ( xrange ( 1 , 1000000 ) as $num ) { echo $num , " \n " ; } The xrange() function shown above provides the same functionality as the built-in range() function. The only difference is that range() will return an array with one million numbers in the above case, whereas xrange() returns an iterator that will emit these numbers, but never actually compute an array with all of them. The advantages of this approach should be evident. It allows you to work with large datasets without loading them into memory all at once. You can even work with infinite data-streams. All this can also be done without generators, by manually implementing the Iterator interface. Generators only make it (a lot) more convenient, because you no longer have to implement five different methods for every iterator. Generators as interruptible functions To go from generators to coroutines it’s important to understand how they work internally: Generators are interruptible functions, where the yield statements constitute the interruption points. Sticking to the above example, if you call xrange(1, 1000000) no code in the xrange() function is actually run. Instead PHP just returns an instance of the Generator class which implements the Iterator interface: $range = xrange ( 1 , 1000000 ); var_dump ( $range ); // object(Generator)#1 var_dump ( $range instanceof Iterator ); // bool(true) The code is only run once you invoke one of the iterator methods on the object. E.g. if you call $range-&gt;rewind() the code in the xrange() function will be run until the first occurrence of yield in the control flow. In this case it means that $i = $start and then yield $i are run. Whatever was passed to the yield statement can then be fetched using $range-&gt;current() . To continue executing the code in the generator you need to call the $range-&gt;next() method. This will again resume the generator until a yield statement is hit. Thus, using a succession of -&gt;next() and -&gt;current() calls, you can get all values from the generator, until at some point no yield is hit anymore. For the xrange() this happens once $i exceeds $end . In this case control flow will reach the end of the function, thus leaving no more code to run. Once this happens the -&gt;valid() method will return false and as such the iteration ends. Coroutines The main thing that coroutines add to the above functionality is the ability to send values back to the generator. This turns the one-way communication from the generator to the caller into a two-way channel between the two. Values are passed into the coroutine by calling its -&gt;send() method instead of -&gt;next() . An example of how this works is the following logger() coroutine: function logger ( $fileName ) { $fileHandle = fopen ( $fileName , 'a' ); while ( true ) { fwrite ( $fileHandle , yield . " \n " ); } } $logger = logger ( __DIR__ . '/log' ); $logger -&gt; send ( 'Foo' ); $logger -&gt; send ( 'Bar' ); As you can see yield isn’t used as a statement here, but as an expression, i.e. it has a return value. The return value of yield is whatever was passed to -&gt;send() . In this example yield will first return 'Foo' and then 'Bar' . The above is an example where the yield acts as a mere receiver. It is possible to combine both usages, i.e. to both send and receive. Here is an example of how this works: function gen () { $ret = ( yield 'yield1' ); var_dump ( $ret ); $ret = ( yield 'yield2' ); var_dump ( $ret ); } $gen = gen (); var_dump ( $gen -&gt; current ()); // string(6) "yield1" var_dump ( $gen -&gt; send ( 'ret1' )); // string(4) "ret1" (the first var_dump in gen) // string(6) "yield2" (the var_dump of the -&gt;send() return value) var_dump ( $gen -&gt; send ( 'ret2' )); // string(4) "ret2" (again from within gen) // NULL (the return value of -&gt;send()) The exact order of the outputs can be a bit hard to understand at first, so make sure that you get why it comes out in exactly this way. There are two things I’d like to especially point out: First, the use of parentheses around the yield expression is no accident. These parentheses are required for technical reasons (though I have been considering adding an exception for assignments, just like it exists in Python). Secondly, you may have noticed that -&gt;current() is used without calling -&gt;rewind() first. If this is done then the rewind operation is performed implicitly. Cooperative multitasking If reading the above logger() example you thought “Why would I use a coroutine for this? Why can’t I just use a normal class?”, then you were totally right. The example demonstrates the basic usage, but there aren’t really any advantages to using a coroutine in this context. This is the case for a lot of coroutine examples. As already mentioned in the introduction coroutines are a very powerful concept, but their applications are rare and often sufficiently complicated, making it hard to come up with simple and non-contrived examples. What I decided to go for in this article is an implementation of cooperative multitasking using coroutines. The problem we’re trying to solve is that you want to run multiple tasks (or “programs”) concurrently. But a processor can only run one task at a time (not considering multi-core for the purposes of this post). Thus the processor needs to switch between the different tasks and always let one run “for a little while”. The “cooperative” part of the term describes how this switching is done: It requires that the currently running task voluntarily passes back control to the scheduler, so it can run another task. This is in contrast to “preemptive” multitasking where the scheduler can interrupt the task after some time whether it likes it or not. Cooperative multitasking was used in early versions of Windows (pre Win95) and Mac OS, but they later switched to using preemption. The reason should be fairly obvious: If you rely on a program to pass back control voluntarily, badly-behaving software can easily occupy the whole CPU for itself, not leaving a share for other tasks. At this point you should see the connection between coroutines and task scheduling: The yield instruction provides a way for a task to interrupt itself and pass control back to the scheduler, so it can run some other task. Furthermore the yield can be used for communication between the task and the scheduler. For our purposes a “task” will be a thin wrapper around the coroutine function: class Task { protected $taskId ; protected $coroutine ; protected $sendValue = null ; protected $beforeFirstYield = true ; public function __construct ( $taskId , Generator $coroutine ) { $this -&gt; taskId = $taskId ; $this -&gt; coroutine = $coroutine ; } public function getTaskId () { return $this -&gt; taskId ; } public function setSendValue ( $sendValue ) { $this -&gt; sendValue = $sendValue ; } public function run () { if ( $this -&gt; beforeFirstYield ) { $this -&gt; beforeFirstYield = false ; return $this -&gt; coroutine -&gt; current (); } else { $retval = $this -&gt; coroutine -&gt; send ( $this -&gt; sendValue ); $this -&gt; sendValue = null ; return $retval ; } } public function isFinished () { return ! $this -&gt; coroutine -&gt; valid (); } } A task will be a coroutine tagged with a task ID. Using the setSendValue() method you can specify which value will be sent into it on the next resume (you’ll see what we need this for a bit later). The run() function really does nothing more than call the send() method on the coroutine. To understand why the additional beforeFirstYield flag is needed consider the following snippet: function gen () { yield 'foo' ; yield 'bar' ; } $gen = gen (); var_dump ( $gen -&gt; send ( 'something' )); // As the send() happens before the first yield there is an implicit rewind() call, // so what really happens is this: $gen -&gt; rewind (); var_dump ( $gen -&gt; send ( 'something' )); // The rewind() will advance to the first yield (and ignore its value), the send() will // advance to the second yield (and dump its value). Thus we loose the first yielded value! By adding the additional beforeFirstYield condition we can ensure that the value of the first yield is also returned. The scheduler now has to do little more than cycle through the tasks and run them: class Scheduler { protected $maxTaskId = 0 ; protected $taskMap = []; // taskId =&gt; task protected $taskQueue ; public function __construct () { $this -&gt; taskQueue = new SplQueue (); } public function newTask ( Generator $coroutine ) { $tid = ++ $this -&gt; maxTaskId ; $task = new Task ( $tid , $coroutine ); $this -&gt; taskMap [ $tid ] = $task ; $this -&gt; schedule ( $task ); return $tid ; } public function schedule ( Task $task ) { $this -&gt; taskQueue -&gt; enqueue ( $task ); } public function run () { while ( ! $this -&gt; taskQueue -&gt; isEmpty ()) { $task = $this -&gt; taskQueue -&gt; dequeue (); $task -&gt; run (); if ( $task -&gt; isFinished ()) { unset ( $this -&gt; taskMap [ $task -&gt; getTaskId ()]); } else { $this -&gt; schedule ( $task ); } } } } The newTask() method creates a new task (using the next free task id) and puts it in the task map. Furthermore it schedules the task by putting it in the task queue. The run() method then walks this task queue and runs the tasks. If a task is finished it is dropped, otherwise it is rescheduled at the end of the queue. Lets try out the scheduler with two simple (and very pointless) tasks: function task1 () { for ( $i = 1 ; $i &lt;= 10 ; ++ $i ) { echo "This is task 1 iteration $i . \n " ; yield ; } } function task2 () { for ( $i = 1 ; $i &lt;= 5 ; ++ $i ) { echo "This is task 2 iteration $i . \n " ; yield ; } } $scheduler = new Scheduler ; $scheduler -&gt; newTask ( task1 ()); $scheduler -&gt; newTask ( task2 ()); $scheduler -&gt; run (); Both tasks will just echo a message and then pass control back to the scheduler with yield . This is the resulting output: This is task 1 iteration 1. This is task 2 iteration 1. This is task 1 iteration 2. This is task 2 iteration 2. This is task 1 iteration 3. This is task 2 iteration 3. This is task 1 iteration 4. This is task 2 iteration 4. This is task 1 iteration 5. This is task 2 iteration 5. This is task 1 iteration 6. This is task 1 iteration 7. This is task 1 iteration 8. This is task 1 iteration 9. This is task 1 iteration 10. The output is exactly as expected: For the first 5 iterations the tasks alternate, then the second task finishes and only the first task continues to run. Communicating with the scheduler Now that the scheduler works we can turn to the next point on the agenda: Communication between the tasks and the scheduler. We will use the same method that processes use to talk to the operating system: Through system calls. The reason we need syscalls is that the operating system is on a different privilege level than the processes. So in order to perform privileged actions (like killing another process) there has to be some way to pass control back to the kernel, so it can perform said actions. Internally this is once again implemented using interruption instructions. Historically the generic int instruction was used, nowadays there are more specialized and faster syscall / sysenter instructions. Our task scheduling system will reflect this design: Instead of simply passing the scheduler into the task (and thus allowing it to do whatever it wants) we will communicate via system calls passed through the yield expression. The yield here will act both as an interrupt and as a way to pass information to (and from) the scheduler. To represent a system call I’ll use a small wrapper around a callable: class SystemCall { protected $callback ; public function __construct ( callable $callback ) { $this -&gt; callback = $callback ; } public function __invoke ( Task $task , Scheduler $scheduler ) { $callback = $this -&gt; callback ; // Can't call it directly in PHP :/ return $callback ( $task , $scheduler ); } } It will behave just like any callable (using __invoke ), but tells the scheduler to pass the calling task and itself into the function. To handle it we have to slightly modify the scheduler’s run method: public function run () { while ( ! $this -&gt; taskQueue -&gt; isEmpty ()) { $task = $this -&gt; taskQueue -&gt; dequeue (); $retval = $task -&gt; run (); if ( $retval instanceof SystemCall ) { $retval ( $task , $this ); continue ; } if ( $task -&gt; isFinished ()) { unset ( $this -&gt; taskMap [ $task -&gt; getTaskId ()]); } else { $this -&gt; schedule ( $task ); } } } The first system call will do nothing more than return the task ID: function getTaskId () { return new SystemCall ( function ( Task $task , Scheduler $scheduler ) { $task -&gt; setSendValue ( $task -&gt; getTaskId ()); $scheduler -&gt; schedule ( $task ); }); } It does so by setting the tid as next send value and rescheduling the task. For system calls the scheduler does not automatically reschedule the task, we need to do it manually (you’ll see why a bit later). Using this new syscall we can rewrite the previous example: function task ( $max ) { $tid = ( yield getTaskId ()); // &lt;-- here's the syscall! for ( $i = 1 ; $i &lt;= $max ; ++ $i ) { echo "This is task $tid iteration $i . \n " ; yield ; } } $scheduler = new Scheduler ; $scheduler -&gt; newTask ( task ( 10 )); $scheduler -&gt; newTask ( task ( 5 )); $scheduler -&gt; run (); This will give the same output as with the previous example. Notice how the system call is basically done like any other call, but with a prepended yield . Two more syscalls for creating new tasks and killing them again: function newTask ( Generator $coroutine ) { return new SystemCall ( function ( Task $task , Scheduler $scheduler ) use ( $coroutine ) { $task -&gt; setSendValue ( $scheduler -&gt; newTask ( $coroutine )); $scheduler -&gt; schedule ( $task ); } ); } function killTask ( $tid ) { return new SystemCall ( function ( Task $task , Scheduler $scheduler ) use ( $tid ) { $task -&gt; setSendValue ( $scheduler -&gt; killTask ( $tid )); $scheduler -&gt; schedule ( $task ); } ); } The killTask function needs an additional method in the scheduler: public function killTask ( $tid ) { if ( ! isset ( $this -&gt; taskMap [ $tid ])) { return false ; } unset ( $this -&gt; taskMap [ $tid ]); // This is a bit ugly and could be optimized so it does not have to walk the queue, // but assuming that killing tasks is rather rare I won't bother with it now foreach ( $this -&gt; taskQueue as $i =&gt; $task ) { if ( $task -&gt; getTaskId () === $tid ) { unset ( $this -&gt; taskQueue [ $i ]); break ; } } return true ; } A small script to test the new functionality: function childTask () { $tid = ( yield getTaskId ()); while ( true ) { echo "Child task $tid still alive! \n " ; yield ; } } function task () { $tid = ( yield getTaskId ()); $childTid = ( yield newTask ( childTask ())); for ( $i = 1 ; $i &lt;= 6 ; ++ $i ) { echo "Parent task $tid iteration $i . \n " ; yield ; if ( $i == 3 ) yield killTask ( $childTid ); } } $scheduler = new Scheduler ; $scheduler -&gt; newTask ( task ()); $scheduler -&gt; run (); This will print the following: Parent task 1 iteration 1. Child task 2 still alive! Parent task 1 iteration 2. Child task 2 still alive! Parent task 1 iteration 3. Child task 2 still alive! Parent task 1 iteration 4. Parent task 1 iteration 5. Parent task 1 iteration 6. The child is killed after three iterations, so that’s when the “Child is still alive” messages end. One should probably point about that this is not a real parent/child relationship, because the child can continue running even after the parent finished. Or the child could kill the parent. One could modify the scheduler to have a more hierarchic task structure, but I won’t implement that in this article. There are many more process management calls one could implement, for example wait (which waits until a task has finished running), exec (which replaces the current task) and fork (which creates a clone of the current task). Forking is pretty cool and you can actually implement it with PHP’s coroutines, because they support cloning. But I’ll leave these for the interested reader. Instead lets get to the next topic! Non-Blocking IO A really cool application of our task management system obviously is … a web server. There could be one task listening a socket for new connections and whenever a new connection is made it would create a new task handling that connection. The hard part about this is that normally socket operations like reading data are blocking, i.e. PHP will wait until the client has finished sending. For a web-server that’s obviously not good at all: It would mean that it can only handle a single connection at a time. The solution is to make sure that the socket is “ready” before actually reading/writing to it. To find out which sockets are ready to read from or write to the stream_select function can be used. First, lets add two new syscalls, which will cause a task to wait until a certain socket is ready: function waitForRead ( $socket ) { return new SystemCall ( function ( Task $task , Scheduler $scheduler ) use ( $socket ) { $scheduler -&gt; waitForRead ( $socket , $task ); } ); } function waitForWrite ( $socket ) { return new SystemCall ( function ( Task $task , Scheduler $scheduler ) use ( $socket ) { $scheduler -&gt; waitForWrite ( $socket , $task ); } ); } These syscalls are just proxies to the respective methods in the scheduler: // resourceID =&gt; [socket, tasks] protected $waitingForRead = []; protected $waitingForWrite = []; public function waitForRead ( $socket , Task $task ) { if ( isset ( $this -&gt; waitingForRead [( int ) $socket ])) { $this -&gt; waitingForRead [( int ) $socket ][ 1 ][] = $task ; } else { $this -&gt; waitingForRead [( int ) $socket ] = [ $socket , [ $task ]]; } } public function waitForWrite ( $socket , Task $task ) { if ( isset ( $this -&gt; waitingForWrite [( int ) $socket ])) { $this -&gt; waitingForWrite [( int ) $socket ][ 1 ][] = $task ; } else { $this -&gt; waitingForWrite [( int ) $socket ] = [ $socket , [ $task ]]; } } The waitingForRead and waitingForWrite properties are just arrays containing the sockets to wait for and the tasks that are waiting for them. The interesting part is the following method, which actually checks whether the sockets are ready and reschedules the respective tasks: protected function ioPoll ( $timeout ) { if ( empty ( $this -&gt; waitingForRead ) &amp;&amp; empty ( $this -&gt; waitingForWrite )) { return ; } $rSocks = []; foreach ( $this -&gt; waitingForRead as list ( $socket )) { $rSocks [] = $socket ; } $wSocks = []; foreach ( $this -&gt; waitingForWrite as list ( $socket )) { $wSocks [] = $socket ; } $eSocks = []; // dummy if ( ! stream_select ( $rSocks , $wSocks , $eSocks , $timeout )) { return ; } foreach ( $rSocks as $socket ) { list (, $tasks ) = $this -&gt; waitingForRead [( int ) $socket ]; unset ( $this -&gt; waitingForRead [( int ) $socket ]); foreach ( $tasks as $task ) { $this -&gt; schedule ( $task ); } } foreach ( $wSocks as $socket ) { list (, $tasks ) = $this -&gt; waitingForWrite [( int ) $socket ]; unset ( $this -&gt; waitingForWrite [( int ) $socket ]); foreach ( $tasks as $task ) { $this -&gt; schedule ( $task ); } } } The stream_select function takes arrays of read, write and except sockets to check (we’ll ignore that last category). The arrays are passed by reference and the function will only leave those elements in the arrays that changed state. We can then walk over those arrays and reschedule all tasks associated with them. In order to regularly perform the above polling action we’ll add a special task in the scheduler: protected function ioPollTask () { while ( true ) { if ( $this -&gt; taskQueue -&gt; isEmpty ()) { $this -&gt; ioPoll ( null ); } else { $this -&gt; ioPoll ( 0 ); } yield ; } } This task needs to be registered at some point, e.g. one could add $this-&gt;newTask($this-&gt;ioPollTask()) to the start of the run() method. Then it will work just like any other task, performing the polling operation once every full task cycle (this isn’t necessarily the best way to handle it). The ioPollTask will call ioPoll with a 0 second timeout, which means that stream_select will return right away (rather than waiting). Only if the task queue is empty we use a null timeout, which means that it will wait until some socket becomes ready. If we wouldn’t do this the polling task would just run again and again and again until a new connection is made. This would result in 100% CPU usage. It’s much more efficient to let the operating system do the waiting instead. Writing the server is relatively easy now: function server ( $port ) { echo "Starting server at port $port ... \n " ; $socket = @ stream_socket_server ( "tcp://localhost: $port " , $errNo , $errStr ); if ( ! $socket ) throw new Exception ( $errStr , $errNo ); stream_set_blocking ( $socket , 0 ); while ( true ) { yield waitForRead ( $socket ); $clientSocket = stream_socket_accept ( $socket , 0 ); yield newTask ( handleClient ( $clientSocket )); } } function handleClient ( $socket ) { yield waitForRead ( $socket ); $data = fread ( $socket , 8192 ); $msg = "Received following request: \n\n $data " ; $msgLength = strlen ( $msg ); $response = &lt;&lt;&lt;RES HTTP/1.1 200 OK\r Content-Type: text/plain\r Content-Length: $msgLength\r Connection: close\r \r $msg RES; yield waitForWrite ( $socket ); fwrite ( $socket , $response ); fclose ( $socket ); } $scheduler = new Scheduler ; $scheduler -&gt; newTask ( server ( 8000 )); $scheduler -&gt; run (); This will accept connections to localhost:8000 and just send back a HTTP response with whatever it was sent. Doing anything “real” would be a lot more complicated (properly handling HTTP requests is way outside the scope of this article). The above snippet just demos the general concept. You can try the server out using something like ab -n 10000 -c 100 localhost:8000/ . This will send 10000 requests to it with 100 of them arriving concurrently. Using these numbers I get a median response time of 10ms. But there is an issue with a few requests being handled really slowly (like 5 seconds), that’s why the total throughput is only 2000 reqs/s (with a 10ms response time it should be more like 10000 reqs/s). With higher concurrency count (e.g. -c 500 ) it mostly still works well, but some connections will throw a “Connection reset by peer” error. As I know very little about this low-level socket stuff I didn’t try to figure out what the issue is. Stacked coroutines If you would try to build some larger system using our scheduling system you would soon run into a problem: We are used to breaking up code into smaller functions and calling them. But with coroutines this is no longer possible. E.g. consider the following code: function echoTimes ( $msg , $max ) { for ( $i = 1 ; $i &lt;= $max ; ++ $i ) { echo " $msg iteration $i \n " ; yield ; } } function task () { echoTimes ( 'foo' , 10 ); // print foo ten times echo "--- \n " ; echoTimes ( 'bar' , 5 ); // print bar five times yield ; // force it to be a coroutine } $scheduler = new Scheduler ; $scheduler -&gt; newTask ( task ()); $scheduler -&gt; run (); This code tries to put the recurring “output n times” code into a separate coroutine and then invoke it from the main task. But this won’t work. As mentioned at the very beginning of this article calling a generator (or coroutine) will not actually do anything, it will only return an object. This also happens in the above case. The echoTimes calls won’t do anything than return an (unused) coroutine object. In order to still allow this we need to write a small wrapper around the bare coroutines. I’ll call this a “stacked coroutine” because it will manage a stack of nested coroutine calls. It will be possible to call sub-coroutines by yielding them: $retval = (yield someCoroutine($foo, $bar)); The subcoroutines will also be able to return a value, again by using yield : yield retval("I'm a return value!"); The retval function does nothing more than returning a wrapper around the value which will signal that it’s a return value: class CoroutineReturnValue { protected $value ; public function __construct ( $value ) { $this -&gt; value = $value ; } public function getValue () { return $this -&gt; value ; } } function retval ( $value ) { return new CoroutineReturnValue ( $value ); } In order to turn a coroutine into a stacked coroutine (which supports subcalls) we’ll have to write another function (which is obviously yet-another-coroutine): function stackedCoroutine ( Generator $gen ) { $stack = new SplStack ; for (;;) { $value = $gen -&gt; current (); if ( $value instanceof Generator ) { $stack -&gt; push ( $gen ); $gen = $value ; continue ; } $isReturnValue = $value instanceof CoroutineReturnValue ; if ( ! $gen -&gt; valid () || $isReturnValue ) { if ( $stack -&gt; isEmpty ()) { return ; } $gen = $stack -&gt; pop (); $gen -&gt; send ( $isReturnValue ? $value -&gt; getValue () : NULL ); continue ; } $gen -&gt; send ( yield $gen -&gt; key () =&gt; $value ); } } This function acts as a simple proxy between the caller and the currently running subcoroutine. This is handled in the $gen-&gt;send(yield $gen-&gt;key() =&gt; $value); line. Additionally it checks whether a return value is a generator, in which case it will start running it and pushes the previous coroutine on the stack. Once it gets a CoroutineReturnValue it will pop the stack again and continue executing the previous coroutine. In order to make the stacked coroutines usable in tasks the $this-&gt;coroutine = $coroutine; line in the Task constructor needs to be replaced with $this-&gt;coroutine = stackedCoroutine($coroutine); . Now we can improve the webserver example from above a bit by grouping the wait+read (and wait+write and wait+accept) actions into functions. To group the related functionality I’ll use a class: class CoSocket { protected $socket ; public function __construct ( $socket ) { $this -&gt; socket = $socket ; } public function accept () { yield waitForRead ( $this -&gt; socket ); yield retval ( new CoSocket ( stream_socket_accept ( $this -&gt; socket , 0 ))); } public function read ( $size ) { yield waitForRead ( $this -&gt; socket ); yield retval ( fread ( $this -&gt; socket , $size )); } public function write ( $string ) { yield waitForWrite ( $this -&gt; socket ); fwrite ( $this -&gt; socket , $string ); } public function close () { @ fclose ( $this -&gt; socket ); } } Now the server can be rewritten a bit cleaner: function server ( $port ) { echo "Starting server at port $port ... \n " ; $socket = @ stream_socket_server ( "tcp://localhost: $port " , $errNo , $errStr ); if ( ! $socket ) throw new Exception ( $errStr , $errNo ); stream_set_blocking ( $socket , 0 ); $socket = new CoSocket ( $socket ); while ( true ) { yield newTask ( handleClient ( yield $socket -&gt; accept ()) ); } } function handleClient ( $socket ) { $data = ( yield $socket -&gt; read ( 8192 )); $msg = "Received following request: \n\n $data " ; $msgLength = strlen ( $msg ); $response = &lt;&lt;&lt;RES HTTP/1.1 200 OK\r Content-Type: text/plain\r Content-Length: $msgLength\r Connection: close\r \r $msg RES; yield $socket -&gt; write ( $response ); yield $socket -&gt; close (); } Error handling As a good programmer you obviously noticed that the above examples all lack error handling. Pretty much every socket operation is fallible and can produce errors. I obviously did this because error handling is really tedious (especially for sockets!) and would easily blow up the code size by a few factors. But still I’d like to cover how error handling for coroutines works in general: Coroutines provide the ability to throw exceptions inside them using the throw() method. As of this writing this method does not yet exist in PHP’s implementation, but I will commit it later today. The throw() method takes an exception and throws it at the current suspension point in the coroutine. Consider this code: function gen () { echo "Foo \n " ; try { yield ; } catch ( Exception $e ) { echo "Exception: { $e -&gt; getMessage () } \n " ; } echo "Bar \n " ; } $gen = gen (); $gen -&gt; rewind (); // echos "Foo" $gen -&gt; throw ( new Exception ( 'Test' )); // echos "Exception: Test" // and "Bar" This is really awesome for our purposes, because we can make system calls and subcoroutine calls throw exceptions. For the system calls the Scheduler::run() method needs a small adjustment: if ( $retval instanceof SystemCall ) { try { $retval ( $task , $this ); } catch ( Exception $e ) { $task -&gt; setException ( $e ); $this -&gt; schedule ( $task ); } continue ; } And the Task class needs to handle throw calls too: class Task { // ... protected $exception = null ; public function setException ( $exception ) { $this -&gt; exception = $exception ; } public function run () { if ( $this -&gt; beforeFirstYield ) { $this -&gt; beforeFirstYield = false ; return $this -&gt; coroutine -&gt; current (); } elseif ( $this -&gt; exception ) { $retval = $this -&gt; coroutine -&gt; throw ( $this -&gt; exception ); $this -&gt; exception = null ; return $retval ; } else { $retval = $this -&gt; coroutine -&gt; send ( $this -&gt; sendValue ); $this -&gt; sendValue = null ; return $retval ; } } // ... } Now we can start throwing exceptions from system calls! E.g. for the killTask call, lets throw an exception if the passed task ID is invalid: function killTask ( $tid ) { return new SystemCall ( function ( Task $task , Scheduler $scheduler ) use ( $tid ) { if ( $scheduler -&gt; killTask ( $tid )) { $scheduler -&gt; schedule ( $task ); } else { throw new InvalidArgumentException ( 'Invalid task ID!' ); } } ); } Try it out: function task () { try { yield killTask ( 500 ); } catch ( Exception $e ) { echo 'Tried to kill task 500 but failed: ' , $e -&gt; getMessage (), " \n " ; } } Sadly this won’t work properly yet, because the stackedCoroutine function doesn’t handle the exception correctly. To fix it the function needs some modifications: function stackedCoroutine ( Generator $gen ) { $stack = new SplStack ; $exception = null ; for (;;) { try { if ( $exception ) { $gen -&gt; throw ( $exception ); $exception = null ; continue ; } $value = $gen -&gt; current (); if ( $value instanceof Generator ) { $stack -&gt; push ( $gen ); $gen = $value ; continue ; } $isReturnValue = $value instanceof CoroutineReturnValue ; if ( ! $gen -&gt; valid () || $isReturnValue ) { if ( $stack -&gt; isEmpty ()) { return ; } $gen = $stack -&gt; pop (); $gen -&gt; send ( $isReturnValue ? $value -&gt; getValue () : NULL ); continue ; } try { $sendValue = ( yield $gen -&gt; key () =&gt; $value ); } catch ( Exception $e ) { $gen -&gt; throw ( $e ); continue ; } $gen -&gt; send ( $sendValue ); } catch ( Exception $e ) { if ( $stack -&gt; isEmpty ()) { throw $e ; } $gen = $stack -&gt; pop (); $exception = $e ; } } } Wrapping up In this article we built a task scheduler using cooperative multitasking, including the ability to perform “system calls”, doing non-blocking IO operations and handling errors. The really cool thing about all this is that the resulting code for the tasks looks totally synchronous, even though it is performing a lot of asynchronous operations. If you want to read data from a socket you don’t have to pass some callback or register an event listener. Instead you write yield $socket-&gt;read() . Which is basically what you would normally do too, just with a yield in front of it. When I first heard about all this I found this concept totally awesome and that’s what motivated me to implement it in PHP. At the same time I find coroutines really scary. There is a thin line between awesome code and a total mess and I think coroutines sit exactly on that line. It’s hard for me to say whether writing async code in the way outlined above is really beneficial. In any case, I think it’s an interesting topic and I hope you found it interesting too. Comments welcome :) If you liked this article, you may want to browse my other articles or follow me on Twitter or Mastodon .
2026-01-13T08:49:45
https://docs.suprsend.com/docs/embeddable-inbox#removing-instance
Integration - SuprSend, Notification infrastructure for Product teams Skip to main content SuprSend, Notification infrastructure for Product teams home page Search... ⌘ K Community Trust Center Platform Status Postman Collection GETTING STARTED What is SuprSend? Quick Start Guide Best Practices Plan Your Integration Go-live checklist CORE CONCEPTS Templates Users Events Workflow Notification Categories Preferences Tenants Lists Broadcast Objects Translations DLT Guidelines Whatsapp Template Guidelines WORKFLOW BUILDER Design Workflow Node List Workflow Settings Trigger Workflow Validate Trigger Payload Tenant Workflows Notification Inbox Overview Multi Tabs React Javascript (Angular, Vuejs etc) Integration Customization options React Native Flutter (Headless) PREFERENCE CENTRE Embedded Preference Centre Javascript Angular React VENDOR INTEGRATION GUIDE Overview Email Integrations SMS Integrations Android Push Whatsapp Integrations iOS Push Chat Integrations Vendor Fallback Tenant Vendor INTEGRATIONS Webhook Connectors MONITORING &amp; DEBUGGING Logs Audit Logs Error Guides MANAGE YOUR ACCOUNT Authentication Methods Contact Us Get Started SuprSend, Notification infrastructure for Product teams home page Search... ⌘ K Ask AI Contact Us Get Started Get Started Search... Navigation Javascript (Angular, Vuejs etc) Integration Documentation API Reference Management API CLI Reference Developer Resources Changelog Documentation API Reference Management API CLI Reference Developer Resources Changelog Javascript (Angular, Vuejs etc) Integration OpenAI Open in ChatGPT How to integrate SuprSend inbox/feed components in Angular, Vue, VanillaJS, and other non-React frameworks. OpenAI Open in ChatGPT End of Support for @suprsend/web-inbox . Migrate to @suprsend/web-components We have upgraded authentication of inbox from HMAC to JWT as it is more secure. Please migrate to newer SDK if you are on old one. There are 2 ways in which you can implement inbox functionality: Drop-in components: Pre-built UI with many customizable options which require minimal effort to build. Headless implementation: For more advanced use cases where you want to build UI/UX from scratch. This guide help you integrate drop-in components in your non-react frameworks (angular, vuejs, vanillajs etc). If you want to build your own UI (headless) instead of using drop-in components please refer docs . ​ Integration ​ Integrate using script tag This integration is used in Vanillajs, Django, Laravel, ruby etc where npm is not used. Copy Ask AI &lt;!-- for dropin inbox with bell --&gt; &lt; div id = &quot;suprsend-inbox&quot; &gt;&lt;/ div &gt; &lt;!-- for feed without bell as a fullscreen notification etc --&gt; &lt; div id = &quot;suprsend-feed&quot; &gt;&lt;/ div &gt; &lt; script &gt; window . suprsendConfig = { distinctId: &quot;YOUR_DISTINCT_ID&quot; , publicApiKey: &quot;YOUR_PUBLIC_API_KEY&quot; , userAuthenticationHandler : ({ response }) =&gt; { console . log ( &quot;User Authentication Response&quot; , response ); }, }; let scriptElem = document . createElement ( &quot;script&quot; ); scriptElem . async = 1 ; scriptElem . src = &quot;https://web-components.suprsend.com/v0.3.0/bundle.umd.js&quot; ; scriptElem . onload = () =&gt; { console . log ( &quot;SuprSend SDK loaded&quot; , window . suprsend ); }; document . body . appendChild ( scriptElem ); &lt;/ script &gt; ​ Integrate as npm package This integration is used in framework based applications like angular, vuejs etc. Copy Ask AI npm install @suprsend/web-components@latest Copy Ask AI import { initSuprSend , clearSuprSend } from &quot;@suprsend/web-components&quot; ; // for dropin inbox with bell &lt; div id = &quot;suprsend-inbox&quot; &gt;&lt;/ div &gt; // for feed without bell as a fullscreen notification etc &lt; div id = &quot;suprsend-feed&quot; &gt;&lt;/ div &gt; const suprsendConfig = { distinctId: &quot;YOUR_DISTINCT_ID&quot; , publicApiKey: &quot;YOUR_PUBLIC_API_KEY&quot; , userAuthenticationHandler : ({ response }) =&gt; { console . log ( &quot;User Authentication Response&quot; , response ); }, }; initSuprSend ( suprsendConfig ) // for creating instance and rendering component console . log ( &quot;Instance created but user authentication pending&quot; , window . suprsend ) NOTE: If you are using suprsend-feed , specify height for the container for infinite scroll to work properly. Copy Ask AI const suprsendConfig = { distinctId: &quot;YOUR_DISTINCT_ID&quot; , publicApiKey: &quot;YOUR_PUBLIC_API_KEY&quot; , feed: { theme: { notificationsContainer: { container: { height: &quot;100vh&quot; } } }, // add this to specify height }, }; ​ Removing instance Components will be removed automatically if you navigate away from the page (on unmounting). If you want to remove them manually, you can use below methods. Using script tag Using npm package Copy Ask AI window . suprsend . clearSuprSend (); // clears instance and remove all components window . suprsend . clearSuprSendInbox (); // unmount only inbox component window . suprsend . clearSuprSendFeed (); // unmount only feed component ​ Updating configuration dynamically Copy Ask AI window . suprsend . updateSuprSendConfig ( config : IUpdateSuprSendConfigOptions ); // refresh userToken, change locale, translations dymanically window . suprsend . updateInboxConfig ( config : IInbox ); window . suprsend . updateFeedConfig ( config : IFeed ); window . suprsend . updateToastConfig ( config : IToastNotificationProps ); ​ Accessing other instance methods SDK internally calls new SuprSend() when you call initSuprSend() then you can access instance using window.suprsend.client . This instance has methods like preferences , webpush , event and user updates . Copy Ask AI // example methods window . suprsend . client . isIdentified (); window . suprsend . client . user . addEmail ( email : string ); window . suprsend . client . track ( event : string , properties ?: Dictionary ) window . suprsend . client . webpush . registerPush (); window . suprsend . client . user . preferences . getPreferences ( args ?: {tenantId? : string }); ​ Config options To customise SuprSend components you can pass config object. Config Options Inbox Config Options Feed Config Options Toast Config Options Copy Ask AI interface ConfigProps { publicApiKey : string ; distinctId ? : unknown ; userToken ? : string ; host ? : string ; initOnLoad ? : boolean ; // pass false if you don&#x27;t want to initialise instance just after loading script refreshUserToken ? : ( oldUserToken : string , tokenPayload : Dictionary ) =&gt; Promise &lt; string &gt; ; vapidKey ? : string ; swFileName ? : string ; userAuthenticationHandler ? : ({ response : ApiResponse }) =&gt; void ; inbox ? : IInbox ; // inbox config options feed ? : IFeed ; // feed config options toast ? : IToastNotificationProps ; // toast config options shadowRoot ?: ShadowRoot ; //shadowRoot reference } Parameter Description publicApiKey Public API Key is mandatory field without which error will be thrown by SuprSendProvider. You can get this from  SuprSend Dashboard . distinctId Unique identifier to identify a user across platform. If a value is passed SDK will create user and authenticate user. If null value is passed authenticated user’s instance data will be cleared in your application, kind of logout. userToken Mandatory when enhanced security mode is on. This is ES256 JWT token generated in your server-side. Refer docs to create userToken. refreshUserToken This function is called by SDK internally to get new userToken before existing token is expired. The returned JWT token string is used as the new userToken. userAuthenticationHandler This callback will be called after authenticating user internally when you pass distinctId field to give you back the response of user creation API call. host Customise the host url. vapidKey This key is needed only if you are implementing WebPush notifications. You can get it in SuprSend Dashboard —&gt; Vendors —&gt; WebPush swFileName This key is needed only if you are implementing WebPush notifications and want to customise default serviceworker.js file name with your own service worker file name. shadowRoot Shadow root reference to render components inside shadow dom For further component specific customisations please refer to the docs . Was this page helpful? Yes No Suggest edits Raise issue Previous Customization options How to customize the styling, CSS, and layout of the Inbox Feed to match your product’s design in non-React websites. Next ⌘ I x github linkedin youtube Powered by On this page Integration Integrate using script tag Integrate as npm package Removing instance Updating configuration dynamically Accessing other instance methods Config options
2026-01-13T08:49:45
https://www.fine.dev/blog/secure-startup-codebase#embrace-code-reviews-with-security-in-mind
Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Startups often prioritize speed over security, pushing out features to gain a competitive edge. However, overlooking security in the early stages can lead to costly issues down the road. This guide provides a step-by-step approach for CTOs to secure their startup&#x27;s codebase effectively while maintaining agility. Table of Contents Implement Secure Coding Standards Automate Security Scans Embrace Code Reviews with Security in Mind Practice Least Privilege Use Secrets Management Keep Dependencies Updated Enable Logging and Monitoring Regular Security Audits Educate Your Team Plan for Incident Response 1. Implement Secure Coding Standards Define a set of secure coding practices from the get-go. Train developers on common vulnerabilities such as SQL injection, XSS, and insecure deserialization. Adopting secure coding standards helps prevent vulnerabilities that are often introduced during rapid development. 2. Automate Security Scans Incorporate automated security tools into your CI/CD pipeline to catch vulnerabilities before they reach production. Tools like Snyk can help monitor dependencies and flag security issues, allowing your team to act proactively. 3. Embrace Code Reviews with Security in Mind Encourage peer code reviews that emphasize security. By incorporating a security checklist in your code review process, developers are more likely to catch issues early. Using tools like GitHub or GitLab for code reviews can streamline collaboration. Fine can make code reviews a far less arduous process for developers, making it easier to maintain consistently high standards. 4. Practice Least Privilege Ensure that each part of your system has access only to what it needs. Avoid giving developers or third-party services more permissions than necessary. Regularly review and revoke access to prevent unauthorized data exposure. 5. Use Secrets Management Avoid hardcoding sensitive information such as API keys, database credentials, or access tokens directly into your codebase. Instead, utilize a secrets management tool like AWS Secrets Manager, HashiCorp Vault, or Azure Key Vault to keep these secure. 6. Keep Dependencies Updated Outdated third-party libraries can introduce security vulnerabilities. Use dependency management tools to keep track of which libraries are in use and stay updated with security patches. 7. Enable Logging and Monitoring Monitor for unusual activity to detect threats early. Ensure your logging system captures details like failed login attempts, unexpected API usage, and codebase modifications. Using centralized logging services such as ELK Stack or Splunk can streamline threat detection and response. 8. Regular Security Audits Perform periodic security audits and penetration tests to assess the overall health of your codebase. Startups should consider working with a third-party security expert to identify gaps that might be overlooked internally. 9. Educate Your Team Security is everyone’s responsibility. Conduct regular training sessions to keep your development team aware of the latest security threats and best practices. Tools like OWASP or even informal lunch-and-learns can help build a security-aware culture. 10. Plan for Incident Response Have an incident response plan in place in case a breach does occur. Document the steps your team needs to take to minimize damage and recover. Being prepared can make the difference between a minor incident and a major catastrophe. Securing your startup&#x27;s codebase requires deliberate planning and effort, but these practices will pay off by protecting your company and its customers. Adopting a proactive security mindset now can save countless headaches in the future. If you&#x27;re building a software startup, Fine can help you achieve your development goals faster. From within your issue management platform, delegate tasks to AI and get a PR to review when you&#x27;re done. You can also get coding tasks gone on the go, without compromising on security. Try it out at https://ai.fine.dev Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://future.forem.com/new/science
New Post - Future Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account Future Close Join the Future Future is a community of 3,676,891 amazing enthusiasts Continue with Apple Continue with Google Continue with Facebook Continue with Forem Continue with GitHub Continue with Twitter (X) OR Email Password Remember me Forgot password? By signing in, you are agreeing to our privacy policy , terms of use and code of conduct . New to Future? Create account . 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV Future — News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Home About Contact Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . Future &copy; 2025 - 2026. Stay on the cutting edge, and shape tomorrow Log in Create account
2026-01-13T08:49:45
https://www.fine.dev/blog/ai-coding-guide#3-google-gemini
AI Coding – A Simple Guide for Developers Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back AI Coding – A Simple Guide for Developers Table of Contents Introduction: What is AI Coding The Importance of Context in AI Coding Tips for Providing Better Context Practical Instructions for Providing Context to AI Coding Tools 1. Creating a Knowledge Graph 2. Implementing Retrieval-Augmented Generation (RAG) 3. Copy-Pasting Relevant Code into ChatGPT and Claude 4. Understanding Potential Mistakes Without Proper Context Using AI to Generate Code Incorporating AI Tools into Your Workflow Advice for Front-End Developers Practical Tips Advice for Back-End Developers Practical Tips Use Cases for AI in Coding 1. Automated Bug Fixes 2. Predicting Performance Bottlenecks 3. Large Codebase Refactoring Industry-Specific Benefits Best Large Language Models (LLMs) for Coding 1. OpenAI 2. Anthropic 3. Google Gemini 4. Other Notable Models Choosing the Right LLM for Your Needs Popular AI Coding Tools 1. Fine 2. ChatGPT 3. Replit 4. Devin 5. Cursor Conclusion Introduction: What is AI Coding In today&#x27;s rapidly evolving tech landscape, AI coding has emerged as a game-changer for developers. But what exactly is AI coding? Simply put, it&#x27;s the use of artificial intelligence to assist in writing, optimizing, and managing code. AI coding tools help developers write better, faster, and more efficient code by automating repetitive tasks, providing intelligent code suggestions, and even debugging. This blog will delve into the importance of context in AI coding, how to use AI for generating code, offer practical advice for both front-end and back-end developers, explore various use cases, introduce some of the top AI coding tools available today, and discuss the best large language models (LLMs) for coding. The Importance of Context in AI Coding The first key to success in AI coding is understanding context . AI tools analyze the surrounding code to generate relevant and accurate suggestions. Without proper context, AI-generated code can be irrelevant or even introduce errors. Here&#x27;s why context matters: Code Quality: In complex systems, context helps maintain consistency and functionality across different modules. Relevance: AI tools can provide more precise code snippets when they understand the broader scope of the project. Efficiency: Proper context reduces the time developers spend correcting AI-generated code. Imagine asking a lawyer off the street to represent you in court, without knowing anything about you, the case, or the evidence. The best lawyer in the world would struggle! The same goes for AI in coding - only if you provide the relevant information will you get relevant results. Tips for Providing Better Context: Descriptive Comments: Write clear and detailed comments to guide the AI tool. Structured Code: Organize your code logically to help AI understand the flow and dependencies. Consistent Naming Conventions: Use meaningful and consistent names for variables, functions, and classes. Integrate Platforms: The more of your tech stack that can be integrated, the more data the AI will be able to access and the better the output will be. Fine offers GitHub, Linear, and Sentry integrations with more on the way. Practical Instructions for Providing Context to AI Coding Tools To maximize the effectiveness of AI coding tools, providing comprehensive and well-structured context is essential. Here are some practical methods to enhance context for AI tools: 1. Creating a Knowledge Graph A knowledge graph is a structured representation of information that outlines the relationships between different components of your codebase. By creating a knowledge graph, you can provide AI tools with a holistic view of your project, enabling them to make more informed suggestions. How to Create a Knowledge Graph: Identify Key Components: List out all the modules, classes, functions, and their interactions within your project. Define Relationships: Establish how these components interact, depend on each other, and contribute to the overall functionality. Use Visualization Tools: Utilize tools like Neo4j or Graphviz to visualize the knowledge graph, making it easier to understand and update. Benefits: Enhances AI&#x27;s understanding of the project structure. Facilitates better code suggestions and optimizations. Helps in identifying dependencies and potential areas for improvement. Fine creates a knowledge graph called Atlas, which includes your codebase from GitHub and issues from Sentry and Linear. This way, it prepares the AI to handle any task you give it. You don’t need to work hard creating your own knowledge graph when we’ve done it for you. 2. Implementing Retrieval-Augmented Generation (RAG) Retrieval-Augmented Generation (RAG) combines traditional information retrieval techniques with generative AI models to provide more accurate and contextually relevant responses. How to Use RAG: Integrate Data Sources: Connect your AI coding tool to relevant data sources such as documentation, code repositories, and knowledge bases. Contextual Retrieval: Ensure that the AI can retrieve pertinent information from these sources before generating code suggestions. Continuous Learning: Update the data sources regularly to keep the AI informed about the latest changes and best practices in your project. Benefits: Improves the relevance and accuracy of AI-generated code. Enables AI to leverage existing knowledge and documentation. Enhances the tool&#x27;s ability to handle complex queries and tasks. 3. Copy-Pasting Relevant Code into ChatGPT and Claude When using conversational AI tools like ChatGPT for coding assistance, providing snippets of relevant code can significantly improve the quality of the responses. How to Provide Relevant Code: Select Key Sections: Identify and copy the sections of code that are directly related to your query or the task at hand. Provide Contextual Information: Along with the code, include comments or explanations that describe the functionality and purpose of the code segments. Ask Specific Questions: Clearly state what you need help with, such as debugging a particular function or optimizing a code block. Example: # Function to calculate the factorial of a number def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) # I need to optimize this recursive factorial function to handle larger numbers without hitting the recursion limit. Question: How can I optimize the above factorial function to handle larger inputs efficiently? Benefits: Provides AI with the necessary context to generate accurate solutions. Reduces ambiguity, leading to more precise and helpful responses. Saves time by directly addressing specific issues within the code. This is similar to GitHub Copilot and some other tools where you can highlight the relevant context to direct the AI. 4. Understanding Potential Mistakes Without Proper Context AI coding tools, while powerful, can make mistakes if not provided with adequate context. Common errors include: Irrelevant Code Suggestions: Without understanding the project structure, AI might suggest code that doesn&#x27;t fit the existing framework. Syntax Errors: Lack of context can lead to syntax mistakes, especially in languages with strict syntax rules. Logical Flaws: AI might introduce logical errors if it doesn&#x27;t fully grasp the intended functionality. Security Vulnerabilities: Inadequate context can result in code that exposes security loopholes or fails to follow best practices. Backend Errors In languages commonly used for backend such as Python, AI may make more mistakes if it doesn’t have context, such as NameErrors and IndentationErrors - mistakes that you wouldn’t have made coding manually. You can read more about common Python errors and how different AI applications handle them here.   Fine is less likely to make such errors, as it has full knowledge of your codebase.   Mitigation Strategies: Always Review AI-Generated Code: Never blindly trust the AI&#x27;s suggestions; always verify and test the code. Provide Comprehensive Context: The more information you provide, the better the AI can assist accurately. Use Multiple Sources: Cross-reference AI suggestions with official documentation and best practices. Continuous Feedback: Provide feedback to the AI tool to help it learn and improve over time. Using AI to Generate Code AI coding tools are revolutionizing the way developers write code by automating mundane tasks and enhancing creativity. Here&#x27;s how AI is being used to generate code: Code Snippets: AI can suggest entire lines or blocks of code based on the current context. Automating Repetitive Tasks: Tasks like boilerplate code generation, formatting, and refactoring can be handled by AI, freeing up developers to focus on more complex problems. Bug Detection: AI can identify potential bugs and vulnerabilities in real-time, ensuring higher code quality. Incorporating AI Tools into Your Workflow: Choose the Right Tool: Select an AI coding tool that integrates seamlessly with your development workflow. Customize Settings: Tailor the tool’s settings to match your coding style and project requirements. Regularly Review Suggestions: While AI can assist, always review and test AI-generated code to ensure it meets your standards. Advice for Front-End Developers Front-end development focuses on the user interface and user experience. AI coding tools can significantly enhance this process: UI/UX Enhancement: AI can suggest design improvements and optimize user interfaces for better engagement. Streamlining CSS/HTML/JS: Automate the generation of responsive designs and ensure cross-browser compatibility. Automated Testing: AI tools can perform repetitive testing tasks, ensuring your front-end code is robust and error-free. Practical Tips: Use AI for Responsive Design: Let AI suggest layout adjustments for different screen sizes. Optimize Performance: AI can analyze and optimize front-end performance, reducing load times and improving user experience. Leverage AI for Accessibility: Ensure your applications are accessible by using AI to identify and fix accessibility issues. Advice for Back-End Developers Back-end development involves server-side logic, database management, and ensuring the smooth operation of applications. AI coding tools can streamline these processes: Automating Server-Side Logic: AI can generate efficient server-side code, handling complex operations with ease. Security Vulnerability Detection: Identify and fix security issues before they become problematic. Database Query Optimization: AI can analyze and optimize database queries for better performance. Practical Tips: API Generation: Use AI to create and manage APIs, ensuring they are secure and efficient. Automate Testing: Implement AI-driven testing to validate back-end processes and ensure reliability. Optimize Code Performance: Leverage AI to analyze and enhance the performance of your server-side code. Use Cases for AI in Coding AI coding has a wide range of applications across various industries. Here are some real-world use cases: 1. Automated Bug Fixes Fine’s AI can identify and fix bugs in your codebase, reducing the time spent on debugging and improving overall code quality. 2. Predicting Performance Bottlenecks By analyzing code patterns, AI can predict potential performance issues, allowing developers to address them proactively. 3. Large Codebase Refactoring Managing and refactoring large codebases can be daunting. AI tools can assist with this process, ensuring consistency and reducing errors. Industry-Specific Benefits: E-Commerce: Enhance platform performance and security with AI-driven optimizations. Add features to improve user experience and conversion rates rapidly. Fintech: Ensure the reliability and security of financial applications through AI-assisted coding. SaaS Platforms: Improve scalability and performance with AI-generated and optimized code. Healthcare: Streamline data processing and ensure compliance with regulatory standards through AI-assisted code generation. Education Technology: Enhance learning platforms by personalizing features and improving code quality with AI-driven development. Gaming: Optimize game performance and identify bugs faster with AI-generated suggestions and automated testing. Best Large Language Models (LLMs) for Coding Large Language Models (LLMs) are at the heart of modern AI coding tools. They power the intelligent features that assist developers in writing and managing code. Here are some of the best LLMs for coding: 1. OpenAI OpenAI&#x27;s models, including GPT-4 , are renowned for their versatility and capability in understanding and generating human-like text. In coding, GPT-4 excels at code generation, debugging, and providing intelligent suggestions across multiple programming languages. OpenAI also offers Codex , specifically fine-tuned for programming tasks, making it a popular choice for developers seeking advanced AI assistance. OpenAI also recently released preview and mini versions of their latest model, o1, which is outperforming competitors on many benchmarks. 2. Anthropic Anthropic&#x27;s Claude models focus on safety and reliability, ensuring that AI-generated code adheres to best practices and minimizes errors. These models are designed to understand complex coding contexts and provide suggestions that align with developers&#x27; intent. Anthropic emphasizes ethical AI use, making their models a trustworthy option for sensitive and critical development environments. Claude Sonnet 3.5 was widely regarded as the most powerful LLM for coding, until o1’s release, and many developers still prefer it. 3. Google Gemini Google&#x27;s Gemini models leverage Google&#x27;s extensive research in natural language processing and machine learning. Gemini is designed to integrate seamlessly with Google&#x27;s ecosystem, offering robust support for various programming languages and frameworks. With a focus on scalability and performance, Gemini models are ideal for large-scale projects requiring consistent and efficient code generation. 4. Other Notable Models: Cohere : Known for their fast and efficient language models, Cohere offers solutions tailored for real-time coding assistance and integration into development workflows. Grok: A versatile AI model designed to assist developers in writing, debugging, and optimizing code effectively. IBM Watson: IBM&#x27;s AI offerings include models that specialize in enterprise-level coding assistance, focusing on security, compliance, and integration with existing IT infrastructures. Choosing the Right LLM for Your Needs: When selecting an LLM for coding, consider the following factors: Language Support: Ensure the model supports the programming languages you use. Integration: Look for models that integrate smoothly with your development environment and tools. Customization: Some models offer more flexibility for customization and fine-tuning based on specific project requirements. Safety and Reliability: Prioritize models that emphasize code accuracy and security to minimize the risk of introducing vulnerabilities. Click here to learn about the leading LLMs for coding and how they compare. o1-preview and Claude 3.5 Sonnet are considered to be the prominent AI models for coding. Popular AI Coding Tools There are several AI coding tools available, each with unique features tailored to different needs. Here are some of the leading options: 1. Fine Features: Fine offers advanced code generation, intelligent suggestions, automations and a full-context knowledge graph. It leverages state-of-the-art LLMs including o1 and Claude Sonnet to provide accurate and context-aware code assistance. Best For: Professional developers seeking a comprehensive AI assistant that enhances productivity across multiple programming languages, working on existing codebases. Integration: Integrates with GitHub, Linear, Sentry and Slack - with further integrations such as Jira, Monday Dev, Clickup, Data Dog, Jam.dev and posthog coming soon. 2. ChatGPT Features: ChatGPT provides conversational AI assistance, allowing developers to ask questions, seek code examples, and receive real-time support. It excels in understanding natural language queries and providing detailed explanations. Best For: Asking short questions about coding in general - such as explaining functions you’re not familiar with. Integration: Accessible via web interface, API, and can be integrated into various development tools through plugins and extensions. 3. Replit Features: Replit offers an online coding platform with integrated AI assistance. It supports collaborative coding, real-time code suggestions, and automated debugging. Best For: Teams and individual developers looking for a cloud-based development environment with built-in AI support. Integration: Fully web-based, allowing seamless collaboration and access from any device with internet connectivity. 4. Devin Features: Devin focuses on optimizing backend development with AI-driven code generation, API creation, and database management. It offers robust security features and performance optimization tools. Best For: Back-end developers seeking specialized AI tools to streamline server-side development and database interactions. Integration: Compatible with major backend frameworks and integrates with popular cloud services for deployment and management. Devin isn’t currently publicly available, but you can apply for Beta access via their website. 5. Cursor Features: Cursor provides AI-powered code generation and real-time collaboration features. It emphasizes building large blocks of code and reducing development time. Best For: Developers who prioritize code quality and seek tools that can begin a project from scratch and take it to MVP. Integration: Cursor is built on VSCode making it familiar for many developers. Equally as time-consuming as writing code is reviewing code. Here&#x27;s a comparison of how different AI Coding tools handle code reviews. Conclusion AI coding boosts productivity, improves code quality, and lets developers focus on creative tasks. Providing context, using AI for code generation, and choosing the right tools can greatly benefit developers. Pick the best large language models for your needs to optimize your workflow. Automate tasks, optimize performance, and enhance security with AI coding tools. Embrace AI to unlock new efficiency and innovation. Try Fine for free at ai.fine.dev and elevate your coding workflow today. Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://dev.to/t/tutorial/page/9#main-content
Tutorial Page 9 - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close # tutorial Follow Hide Tutorial is a general purpose tag. We welcome all types of tutorial - code related or not! It's all about learning, and using tutorials to teach others! Create Post submission guidelines Tutorials should teach by example. This can include an interactive component or steps the reader can follow to understand. Older #tutorial posts 6 7 8 9 10 11 12 13 14 Posts Left menu 👋 Sign in for the ability to sort posts by relevant , latest , or top . Right menu GTK4 DropDown with .NET Kashif Soofi Kashif Soofi Kashif Soofi Follow Jan 8 GTK4 DropDown with .NET # dotnet # tutorial # ui Comments Add Comment 5 min read The Command Pattern Simplified: How Modern Java (21–25) Makes It Elegant Jitin Jitin Jitin Follow Jan 8 The Command Pattern Simplified: How Modern Java (21–25) Makes It Elegant # architecture # java # tutorial Comments Add Comment 7 min read Build an Engagement Rate Calculator That Actually Works Olamide Olaniyan Olamide Olaniyan Olamide Olaniyan Follow Jan 8 Build an Engagement Rate Calculator That Actually Works # webdev # programming # ai # tutorial Comments Add Comment 8 min read Understanding if, elif, and else in Python with Simple Examples Shahrouz Nikseresht Shahrouz Nikseresht Shahrouz Nikseresht Follow Jan 8 Understanding if, elif, and else in Python with Simple Examples # python # beginners # tutorial # programming Comments Add Comment 2 min read Building a QR Code Generator: Dynamic vs Static Architecture Timo Timo Timo Follow Jan 8 Building a QR Code Generator: Dynamic vs Static Architecture # webdev # javascript # tutorial # qrcode Comments Add Comment 2 min read Day 12: Understanding Constructors in Java Karthick Narayanan Karthick Narayanan Karthick Narayanan Follow Jan 8 Day 12: Understanding Constructors in Java # java # programming # beginners # tutorial Comments Add Comment 2 min read Day 11: Understanding `break` and `continue` Statements in Java Karthick Narayanan Karthick Narayanan Karthick Narayanan Follow Jan 8 Day 11: Understanding `break` and `continue` Statements in Java # beginners # java # programming # tutorial Comments Add Comment 2 min read Building Persistent Memory for Voice AI Agents with MongoDB Pash10g Pash10g Pash10g Follow for MongoDB Jan 8 Building Persistent Memory for Voice AI Agents with MongoDB # agents # ai # mongodb # tutorial Comments Add Comment 8 min read You Don’t Need More Tutorials, You Need Better Problems Shamim Ali Shamim Ali Shamim Ali Follow Jan 9 You Don’t Need More Tutorials, You Need Better Problems # programming # workplace # tutorial # webdev Comments 1  comment 1 min read I Thought Creating My Browser Extension Course Would Take a Weekend. It Took 4 Months Johnny Fekete Johnny Fekete Johnny Fekete Follow Jan 8 I Thought Creating My Browser Extension Course Would Take a Weekend. It Took 4 Months # extensions # webdev # tutorial Comments Add Comment 4 min read Creating a Node.js API with Express (Students Example) Boutheina Remadi Boutheina Remadi Boutheina Remadi Follow Jan 8 Creating a Node.js API with Express (Students Example) # api # javascript # node # tutorial 1  reaction Comments Add Comment 2 min read SecurePass Desktop: A Privacy-First Offline Password Generator with Python &amp; Tkinter 🛡️ Mate Technologies Mate Technologies Mate Technologies Follow Jan 8 SecurePass Desktop: A Privacy-First Offline Password Generator with Python &amp; Tkinter 🛡️ # python # securepass # opensource # tutorial Comments Add Comment 6 min read Modernizing Legacy ERP Systems with Machine Learning: A Practical Implementation Guide Genco Divrikli Genco Divrikli Genco Divrikli Follow Jan 8 Modernizing Legacy ERP Systems with Machine Learning: A Practical Implementation Guide # architecture # machinelearning # tutorial Comments Add Comment 4 min read Why Markdown Is The Secret To Better AI Karishma Shukla Karishma Shukla Karishma Shukla Follow Jan 8 Why Markdown Is The Secret To Better AI # webdev # ai # tutorial # programming 6  reactions Comments Add Comment 3 min read Solved: Why do project-management refugees think a weekend AWS course makes them engineers? Darian Vance Darian Vance Darian Vance Follow Jan 8 Solved: Why do project-management refugees think a weekend AWS course makes them engineers? # devops # programming # tutorial # cloud Comments Add Comment 7 min read Trigger Logic Causing Recursive Updates or Data Duplication Selavina B Selavina B Selavina B Follow Jan 8 Trigger Logic Causing Recursive Updates or Data Duplication # architecture # backend # codequality # tutorial Comments Add Comment 3 min read Course Launch: Writing Is an Important Part of Coding Prasoon Jadon Prasoon Jadon Prasoon Jadon Follow Jan 8 Course Launch: Writing Is an Important Part of Coding # programming # learning # tutorial # beginners 1  reaction Comments Add Comment 2 min read Best Practices for Training LoRA Models with Z-Image: Complete 2026 Guide Garyvov Garyvov Garyvov Follow Jan 8 Best Practices for Training LoRA Models with Z-Image: Complete 2026 Guide # ai # deeplearning # tutorial Comments Add Comment 6 min read How My Company Automate Meeting Notes to Jira A.I. A.I. A.I. Follow Jan 8 How My Company Automate Meeting Notes to Jira # ai # webdev # tutorial # productivity 1  reaction Comments 1  comment 3 min read Building a Centralized Keyboard Shortcut System in React: A Priority-Based Approach Hasnaat Iftikhar Hasnaat Iftikhar Hasnaat Iftikhar Follow Jan 6 Building a Centralized Keyboard Shortcut System in React: A Priority-Based Approach # react # typescript # webdev # tutorial Comments Add Comment 17 min read Working with Categorical Data in R: Creating Frequency Tables as Data Frames (Modern Approaches) Anshuman Anshuman Anshuman Follow Jan 8 Working with Categorical Data in R: Creating Frequency Tables as Data Frames (Modern Approaches) # programming # ai # javascript # tutorial Comments Add Comment 4 min read Clone Graph: Coding Problem Solution Explained Stack Overflowed Stack Overflowed Stack Overflowed Follow Jan 8 Clone Graph: Coding Problem Solution Explained # programming # coding # tutorial # learning Comments Add Comment 4 min read LLM Data Leaks: Exposing Hidden Risks in ETL/ELT Pipelines Malik Abualzait Malik Abualzait Malik Abualzait Follow Jan 8 LLM Data Leaks: Exposing Hidden Risks in ETL/ELT Pipelines # ai # tech # programming # tutorial Comments Add Comment 4 min read Sliding window (Fixed length) Jayaprasanna Roddam Jayaprasanna Roddam Jayaprasanna Roddam Follow Jan 6 Sliding window (Fixed length) # programming # beginners # tutorial # learning Comments Add Comment 2 min read 港美主流期货 API 接入全指南:TradingView 看盘策略 San Si wu San Si wu San Si wu Follow Jan 8 港美主流期货 API 接入全指南:TradingView 看盘策略 # tutorial # python # api # github Comments Add Comment 3 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://www.fine.dev/blog/ai-coding-guide#5-cursor
AI Coding – A Simple Guide for Developers Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back AI Coding – A Simple Guide for Developers Table of Contents Introduction: What is AI Coding The Importance of Context in AI Coding Tips for Providing Better Context Practical Instructions for Providing Context to AI Coding Tools 1. Creating a Knowledge Graph 2. Implementing Retrieval-Augmented Generation (RAG) 3. Copy-Pasting Relevant Code into ChatGPT and Claude 4. Understanding Potential Mistakes Without Proper Context Using AI to Generate Code Incorporating AI Tools into Your Workflow Advice for Front-End Developers Practical Tips Advice for Back-End Developers Practical Tips Use Cases for AI in Coding 1. Automated Bug Fixes 2. Predicting Performance Bottlenecks 3. Large Codebase Refactoring Industry-Specific Benefits Best Large Language Models (LLMs) for Coding 1. OpenAI 2. Anthropic 3. Google Gemini 4. Other Notable Models Choosing the Right LLM for Your Needs Popular AI Coding Tools 1. Fine 2. ChatGPT 3. Replit 4. Devin 5. Cursor Conclusion Introduction: What is AI Coding In today&#x27;s rapidly evolving tech landscape, AI coding has emerged as a game-changer for developers. But what exactly is AI coding? Simply put, it&#x27;s the use of artificial intelligence to assist in writing, optimizing, and managing code. AI coding tools help developers write better, faster, and more efficient code by automating repetitive tasks, providing intelligent code suggestions, and even debugging. This blog will delve into the importance of context in AI coding, how to use AI for generating code, offer practical advice for both front-end and back-end developers, explore various use cases, introduce some of the top AI coding tools available today, and discuss the best large language models (LLMs) for coding. The Importance of Context in AI Coding The first key to success in AI coding is understanding context . AI tools analyze the surrounding code to generate relevant and accurate suggestions. Without proper context, AI-generated code can be irrelevant or even introduce errors. Here&#x27;s why context matters: Code Quality: In complex systems, context helps maintain consistency and functionality across different modules. Relevance: AI tools can provide more precise code snippets when they understand the broader scope of the project. Efficiency: Proper context reduces the time developers spend correcting AI-generated code. Imagine asking a lawyer off the street to represent you in court, without knowing anything about you, the case, or the evidence. The best lawyer in the world would struggle! The same goes for AI in coding - only if you provide the relevant information will you get relevant results. Tips for Providing Better Context: Descriptive Comments: Write clear and detailed comments to guide the AI tool. Structured Code: Organize your code logically to help AI understand the flow and dependencies. Consistent Naming Conventions: Use meaningful and consistent names for variables, functions, and classes. Integrate Platforms: The more of your tech stack that can be integrated, the more data the AI will be able to access and the better the output will be. Fine offers GitHub, Linear, and Sentry integrations with more on the way. Practical Instructions for Providing Context to AI Coding Tools To maximize the effectiveness of AI coding tools, providing comprehensive and well-structured context is essential. Here are some practical methods to enhance context for AI tools: 1. Creating a Knowledge Graph A knowledge graph is a structured representation of information that outlines the relationships between different components of your codebase. By creating a knowledge graph, you can provide AI tools with a holistic view of your project, enabling them to make more informed suggestions. How to Create a Knowledge Graph: Identify Key Components: List out all the modules, classes, functions, and their interactions within your project. Define Relationships: Establish how these components interact, depend on each other, and contribute to the overall functionality. Use Visualization Tools: Utilize tools like Neo4j or Graphviz to visualize the knowledge graph, making it easier to understand and update. Benefits: Enhances AI&#x27;s understanding of the project structure. Facilitates better code suggestions and optimizations. Helps in identifying dependencies and potential areas for improvement. Fine creates a knowledge graph called Atlas, which includes your codebase from GitHub and issues from Sentry and Linear. This way, it prepares the AI to handle any task you give it. You don’t need to work hard creating your own knowledge graph when we’ve done it for you. 2. Implementing Retrieval-Augmented Generation (RAG) Retrieval-Augmented Generation (RAG) combines traditional information retrieval techniques with generative AI models to provide more accurate and contextually relevant responses. How to Use RAG: Integrate Data Sources: Connect your AI coding tool to relevant data sources such as documentation, code repositories, and knowledge bases. Contextual Retrieval: Ensure that the AI can retrieve pertinent information from these sources before generating code suggestions. Continuous Learning: Update the data sources regularly to keep the AI informed about the latest changes and best practices in your project. Benefits: Improves the relevance and accuracy of AI-generated code. Enables AI to leverage existing knowledge and documentation. Enhances the tool&#x27;s ability to handle complex queries and tasks. 3. Copy-Pasting Relevant Code into ChatGPT and Claude When using conversational AI tools like ChatGPT for coding assistance, providing snippets of relevant code can significantly improve the quality of the responses. How to Provide Relevant Code: Select Key Sections: Identify and copy the sections of code that are directly related to your query or the task at hand. Provide Contextual Information: Along with the code, include comments or explanations that describe the functionality and purpose of the code segments. Ask Specific Questions: Clearly state what you need help with, such as debugging a particular function or optimizing a code block. Example: # Function to calculate the factorial of a number def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) # I need to optimize this recursive factorial function to handle larger numbers without hitting the recursion limit. Question: How can I optimize the above factorial function to handle larger inputs efficiently? Benefits: Provides AI with the necessary context to generate accurate solutions. Reduces ambiguity, leading to more precise and helpful responses. Saves time by directly addressing specific issues within the code. This is similar to GitHub Copilot and some other tools where you can highlight the relevant context to direct the AI. 4. Understanding Potential Mistakes Without Proper Context AI coding tools, while powerful, can make mistakes if not provided with adequate context. Common errors include: Irrelevant Code Suggestions: Without understanding the project structure, AI might suggest code that doesn&#x27;t fit the existing framework. Syntax Errors: Lack of context can lead to syntax mistakes, especially in languages with strict syntax rules. Logical Flaws: AI might introduce logical errors if it doesn&#x27;t fully grasp the intended functionality. Security Vulnerabilities: Inadequate context can result in code that exposes security loopholes or fails to follow best practices. Backend Errors In languages commonly used for backend such as Python, AI may make more mistakes if it doesn’t have context, such as NameErrors and IndentationErrors - mistakes that you wouldn’t have made coding manually. You can read more about common Python errors and how different AI applications handle them here.   Fine is less likely to make such errors, as it has full knowledge of your codebase.   Mitigation Strategies: Always Review AI-Generated Code: Never blindly trust the AI&#x27;s suggestions; always verify and test the code. Provide Comprehensive Context: The more information you provide, the better the AI can assist accurately. Use Multiple Sources: Cross-reference AI suggestions with official documentation and best practices. Continuous Feedback: Provide feedback to the AI tool to help it learn and improve over time. Using AI to Generate Code AI coding tools are revolutionizing the way developers write code by automating mundane tasks and enhancing creativity. Here&#x27;s how AI is being used to generate code: Code Snippets: AI can suggest entire lines or blocks of code based on the current context. Automating Repetitive Tasks: Tasks like boilerplate code generation, formatting, and refactoring can be handled by AI, freeing up developers to focus on more complex problems. Bug Detection: AI can identify potential bugs and vulnerabilities in real-time, ensuring higher code quality. Incorporating AI Tools into Your Workflow: Choose the Right Tool: Select an AI coding tool that integrates seamlessly with your development workflow. Customize Settings: Tailor the tool’s settings to match your coding style and project requirements. Regularly Review Suggestions: While AI can assist, always review and test AI-generated code to ensure it meets your standards. Advice for Front-End Developers Front-end development focuses on the user interface and user experience. AI coding tools can significantly enhance this process: UI/UX Enhancement: AI can suggest design improvements and optimize user interfaces for better engagement. Streamlining CSS/HTML/JS: Automate the generation of responsive designs and ensure cross-browser compatibility. Automated Testing: AI tools can perform repetitive testing tasks, ensuring your front-end code is robust and error-free. Practical Tips: Use AI for Responsive Design: Let AI suggest layout adjustments for different screen sizes. Optimize Performance: AI can analyze and optimize front-end performance, reducing load times and improving user experience. Leverage AI for Accessibility: Ensure your applications are accessible by using AI to identify and fix accessibility issues. Advice for Back-End Developers Back-end development involves server-side logic, database management, and ensuring the smooth operation of applications. AI coding tools can streamline these processes: Automating Server-Side Logic: AI can generate efficient server-side code, handling complex operations with ease. Security Vulnerability Detection: Identify and fix security issues before they become problematic. Database Query Optimization: AI can analyze and optimize database queries for better performance. Practical Tips: API Generation: Use AI to create and manage APIs, ensuring they are secure and efficient. Automate Testing: Implement AI-driven testing to validate back-end processes and ensure reliability. Optimize Code Performance: Leverage AI to analyze and enhance the performance of your server-side code. Use Cases for AI in Coding AI coding has a wide range of applications across various industries. Here are some real-world use cases: 1. Automated Bug Fixes Fine’s AI can identify and fix bugs in your codebase, reducing the time spent on debugging and improving overall code quality. 2. Predicting Performance Bottlenecks By analyzing code patterns, AI can predict potential performance issues, allowing developers to address them proactively. 3. Large Codebase Refactoring Managing and refactoring large codebases can be daunting. AI tools can assist with this process, ensuring consistency and reducing errors. Industry-Specific Benefits: E-Commerce: Enhance platform performance and security with AI-driven optimizations. Add features to improve user experience and conversion rates rapidly. Fintech: Ensure the reliability and security of financial applications through AI-assisted coding. SaaS Platforms: Improve scalability and performance with AI-generated and optimized code. Healthcare: Streamline data processing and ensure compliance with regulatory standards through AI-assisted code generation. Education Technology: Enhance learning platforms by personalizing features and improving code quality with AI-driven development. Gaming: Optimize game performance and identify bugs faster with AI-generated suggestions and automated testing. Best Large Language Models (LLMs) for Coding Large Language Models (LLMs) are at the heart of modern AI coding tools. They power the intelligent features that assist developers in writing and managing code. Here are some of the best LLMs for coding: 1. OpenAI OpenAI&#x27;s models, including GPT-4 , are renowned for their versatility and capability in understanding and generating human-like text. In coding, GPT-4 excels at code generation, debugging, and providing intelligent suggestions across multiple programming languages. OpenAI also offers Codex , specifically fine-tuned for programming tasks, making it a popular choice for developers seeking advanced AI assistance. OpenAI also recently released preview and mini versions of their latest model, o1, which is outperforming competitors on many benchmarks. 2. Anthropic Anthropic&#x27;s Claude models focus on safety and reliability, ensuring that AI-generated code adheres to best practices and minimizes errors. These models are designed to understand complex coding contexts and provide suggestions that align with developers&#x27; intent. Anthropic emphasizes ethical AI use, making their models a trustworthy option for sensitive and critical development environments. Claude Sonnet 3.5 was widely regarded as the most powerful LLM for coding, until o1’s release, and many developers still prefer it. 3. Google Gemini Google&#x27;s Gemini models leverage Google&#x27;s extensive research in natural language processing and machine learning. Gemini is designed to integrate seamlessly with Google&#x27;s ecosystem, offering robust support for various programming languages and frameworks. With a focus on scalability and performance, Gemini models are ideal for large-scale projects requiring consistent and efficient code generation. 4. Other Notable Models: Cohere : Known for their fast and efficient language models, Cohere offers solutions tailored for real-time coding assistance and integration into development workflows. Grok: A versatile AI model designed to assist developers in writing, debugging, and optimizing code effectively. IBM Watson: IBM&#x27;s AI offerings include models that specialize in enterprise-level coding assistance, focusing on security, compliance, and integration with existing IT infrastructures. Choosing the Right LLM for Your Needs: When selecting an LLM for coding, consider the following factors: Language Support: Ensure the model supports the programming languages you use. Integration: Look for models that integrate smoothly with your development environment and tools. Customization: Some models offer more flexibility for customization and fine-tuning based on specific project requirements. Safety and Reliability: Prioritize models that emphasize code accuracy and security to minimize the risk of introducing vulnerabilities. Click here to learn about the leading LLMs for coding and how they compare. o1-preview and Claude 3.5 Sonnet are considered to be the prominent AI models for coding. Popular AI Coding Tools There are several AI coding tools available, each with unique features tailored to different needs. Here are some of the leading options: 1. Fine Features: Fine offers advanced code generation, intelligent suggestions, automations and a full-context knowledge graph. It leverages state-of-the-art LLMs including o1 and Claude Sonnet to provide accurate and context-aware code assistance. Best For: Professional developers seeking a comprehensive AI assistant that enhances productivity across multiple programming languages, working on existing codebases. Integration: Integrates with GitHub, Linear, Sentry and Slack - with further integrations such as Jira, Monday Dev, Clickup, Data Dog, Jam.dev and posthog coming soon. 2. ChatGPT Features: ChatGPT provides conversational AI assistance, allowing developers to ask questions, seek code examples, and receive real-time support. It excels in understanding natural language queries and providing detailed explanations. Best For: Asking short questions about coding in general - such as explaining functions you’re not familiar with. Integration: Accessible via web interface, API, and can be integrated into various development tools through plugins and extensions. 3. Replit Features: Replit offers an online coding platform with integrated AI assistance. It supports collaborative coding, real-time code suggestions, and automated debugging. Best For: Teams and individual developers looking for a cloud-based development environment with built-in AI support. Integration: Fully web-based, allowing seamless collaboration and access from any device with internet connectivity. 4. Devin Features: Devin focuses on optimizing backend development with AI-driven code generation, API creation, and database management. It offers robust security features and performance optimization tools. Best For: Back-end developers seeking specialized AI tools to streamline server-side development and database interactions. Integration: Compatible with major backend frameworks and integrates with popular cloud services for deployment and management. Devin isn’t currently publicly available, but you can apply for Beta access via their website. 5. Cursor Features: Cursor provides AI-powered code generation and real-time collaboration features. It emphasizes building large blocks of code and reducing development time. Best For: Developers who prioritize code quality and seek tools that can begin a project from scratch and take it to MVP. Integration: Cursor is built on VSCode making it familiar for many developers. Equally as time-consuming as writing code is reviewing code. Here&#x27;s a comparison of how different AI Coding tools handle code reviews. Conclusion AI coding boosts productivity, improves code quality, and lets developers focus on creative tasks. Providing context, using AI for code generation, and choosing the right tools can greatly benefit developers. Pick the best large language models for your needs to optimize your workflow. Automate tasks, optimize performance, and enhance security with AI coding tools. Embrace AI to unlock new efficiency and innovation. Try Fine for free at ai.fine.dev and elevate your coding workflow today. Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://dev.to/lacolaco
Suguru Inatomi - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account Forem Close Follow User actions Suguru Inatomi Google Developers Expert for Angular / Lead of Japan Angular User Group Location Tokyo, Japan Joined Joined on  Nov 16, 2017 Personal website https://lacolaco.net github website twitter website Eight Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least eight years. Got it Close Seven Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least seven years. Got it Close Writing Debut Awarded for writing and sharing your first DEV post! Continue sharing your work to earn the 4 Week Writing Streak Badge. Got it Close Six Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least six years. Got it Close Five Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least five years. Got it Close Four Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least four years. Got it Close Three Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least three years. Got it Close Two Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least two years. Got it Close One Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least one year. Got it Close More info about @lacolaco Organizations Angular Angular Japan User Group GitHub Repositories shiritori Pull Requestでしりとりするだけのリポジトリです。 JavaScript &bull; 44 stars Post 19 posts published Comment 11 comments written Tag 7 tags followed Building Browser Extensions with WXT + Angular Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Jan 12 Building Browser Extensions with WXT + Angular # angular # typescript # web # extensions Comments Add Comment 4 min read Want to connect with Suguru Inatomi? Create an account to connect with Suguru Inatomi. You can also sign in below to proceed if you already have an account. Create Account Already have an account? Sign in Understanding Angular Ivy Library Compilation Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow for Angular Feb 27 &#39;21 Understanding Angular Ivy Library Compilation # angular # ivy 57  reactions Comments 3  comments 8 min read Angular: Using NgRx Store with Redux Toolkit 🚀 Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Dec 17 &#39;20 Angular: Using NgRx Store with Redux Toolkit 🚀 # angular # ngrx # statemanagement # redux 21  reactions Comments 1  comment 8 min read Angular: Eliminate Render Blocking Requests の概要 Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Oct 1 &#39;20 Angular: Eliminate Render Blocking Requests の概要 # angular # angularcli # performance # japanese 5  reactions Comments Add Comment 2 min read Angular: Lightweight Injection Tokenという新しいテクニック Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow for Angular Japan User Group Jul 29 &#39;20 Angular: Lightweight Injection Tokenという新しいテクニック # angular # japanese 8  reactions Comments Add Comment 2 min read Angular Elements: Composable Definition Pattern Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Jul 28 &#39;20 Angular Elements: Composable Definition Pattern # angular # angularelements 7  reactions Comments Add Comment 1 min read Initial Null Problem of AsyncPipe and async data-binding Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Feb 19 &#39;20 Initial Null Problem of AsyncPipe and async data-binding # angular # rxjs # webdev # typescript 48  reactions Comments 7  comments 6 min read AngularでWeb Bundlesを試す Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Dec 25 &#39;19 AngularでWeb Bundlesを試す # angular # webpackaging # japanese 9  reactions Comments Add Comment 1 min read Angularの追いかけ方 Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Dec 24 &#39;19 Angularの追いかけ方 # angular # japanese 17  reactions Comments Add Comment 1 min read Perspective of Angular in 2020 Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Dec 24 &#39;19 Perspective of Angular in 2020 # angular # webdev # japanese 19  reactions Comments 1  comment 2 min read なぜentryComponentsは非推奨になるのか Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow for Angular Japan User Group Nov 4 &#39;19 なぜentryComponentsは非推奨になるのか # angular # ivy 18  reactions Comments Add Comment 2 min read Managing Key-Value Constants in TypeScript Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow for Angular Aug 20 &#39;19 Managing Key-Value Constants in TypeScript # typescript # angular 91  reactions Comments 9  comments 2 min read Network-aware Preloading Strategy for Angular Lazy Loading Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow May 11 &#39;19 Network-aware Preloading Strategy for Angular Lazy Loading # angular # lazyloading # performance # typescript 99  reactions Comments 8  comments 3 min read &quot;Differential Loading&quot; - A New Feature of Angular CLI v8 Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Apr 17 &#39;19 &quot;Differential Loading&quot; - A New Feature of Angular CLI v8 # angular # angularcli # javascript 54  reactions Comments 13  comments 3 min read Angular: How to use Action Creator introduced in NgRx v7.4 Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Apr 3 &#39;19 Angular: How to use Action Creator introduced in NgRx v7.4 # angular # ngrx # typescript # javascript 21  reactions Comments Add Comment 5 min read Introducing contributors-img: Keep contributors in README.md Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Mar 29 &#39;19 Introducing contributors-img: Keep contributors in README.md # showdev # opensource # github # tools 31  reactions Comments 5  comments 1 min read 20 Lines Simple Store with RxJS Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Jan 5 &#39;18 20 Lines Simple Store with RxJS # typescript # rxjs 45  reactions Comments Add Comment 1 min read Merging objects with Partial type Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Nov 16 &#39;17 Merging objects with Partial type # typescript 9  reactions Comments Add Comment 1 min read Hello dev.to Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Nov 16 &#39;17 Hello dev.to # test 12  reactions Comments 2  comments 1 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV Forem — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . Forem &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://open.forem.com/new/learning
New Post - Open Forem Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account Open Forem Close Join the Open Forem Open Forem is a community of 3,676,891 amazing developers Continue with Apple Continue with Google Continue with Facebook Continue with Forem Continue with GitHub Continue with Twitter (X) OR Email Password Remember me Forgot password? By signing in, you are agreeing to our privacy policy , terms of use and code of conduct . New to Open Forem? Create account . 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV Open Forem — A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Home About Contact Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . Open Forem &copy; 2016 - 2026. Where all the other conversations belong Log in Create account
2026-01-13T08:49:45
https://dev.to/sameer_saleem/the-ultimate-guide-to-drizzle-orm-postgresql-2025-edition-22b
The Ultimate Guide to Drizzle ORM + PostgreSQL (2025 Edition) - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Add reaction Like Unicorn Exploding Head Raised Hands Fire Jump to Comments Save Boost More... Copy link Copy link Copied to Clipboard Share to X Share to LinkedIn Share to Facebook Share to Mastodon Share Post via... Report Abuse Sameer Saleem Posted on Jan 13 The Ultimate Guide to Drizzle ORM + PostgreSQL (2025 Edition) # webdev # drizzle # postgres # typescript While Prisma dominated the last few years, 2025 is the year of Drizzle ORM . If you’re looking for a lightweight, "serverless-first" ORM that feels like writing raw SQL but provides world-class TypeScript autocompletion, this guide is for you. 1. Project Initialization We’ll set up a modern Node.js environment using TypeScript. Drizzle is designed to be extremely thin, making it perfect for Edge functions and standard Node backends alike. mkdir drizzle-postgres-2025 cd drizzle-postgres-2025 npm init -y npm install typescript tsx @types/node --save-dev npx tsc --init Enter fullscreen mode Exit fullscreen mode 2. Install Drizzle and PostgreSQL Driver Drizzle doesn't use a heavy Rust engine. It’s just TypeScript. We’ll use the postgres package (the fastest JS client) and drizzle-kit for migrations. npm install drizzle-orm postgres npm install -D drizzle-kit Enter fullscreen mode Exit fullscreen mode 3. Configure Your Connection Create a .env file to hold your PostgreSQL connection string. Whether you’re using Neon , Supabase , or a local Docker instance, the format remains: DATABASE_URL="postgresql://user:password@localhost:5432/my_db" Enter fullscreen mode Exit fullscreen mode 4. Define Your Schema in TypeScript Unlike Prisma, which uses a custom .prisma language, Drizzle uses pure TypeScript. This means you can use functions and variables inside your schema definitions. Create src/db/schema.ts : import { pgTable , serial , text , boolean , integer , timestamp } from ' drizzle-orm/pg-core ' ; export const users = pgTable ( ' users ' , { id : serial ( ' id ' ). primaryKey (), name : text ( ' name ' ). notNull (), email : text ( ' email ' ). unique (). notNull (), createdAt : timestamp ( ' created_at ' ). defaultNow (), }); export const posts = pgTable ( ' posts ' , { id : serial ( ' id ' ). primaryKey (), title : text ( ' title ' ). notNull (), content : text ( ' content ' ), published : boolean ( ' published ' ). default ( false ), authorId : integer ( ' author_id ' ). references (() =&gt; users . id ), }); Enter fullscreen mode Exit fullscreen mode 5. Generate and Push Migrations Drizzle Kit reads your TypeScript schema and generates the SQL for you. Create a drizzle.config.ts in your root: import { defineConfig } from ' drizzle-kit ' ; export default defineConfig ({ schema : ' ./src/db/schema.ts ' , out : ' ./drizzle ' , dialect : ' postgresql ' , dbCredentials : { url : process . env . DATABASE_URL ! , }, }); Enter fullscreen mode Exit fullscreen mode Now, run the migration to sync your DB: npx drizzle-kit push Enter fullscreen mode Exit fullscreen mode 6. Instantiate the Client Create src/db/index.ts . Drizzle is lightweight enough that you don't usually need a complex singleton pattern, but it's good practice for hot-reloading: import { drizzle } from ' drizzle-orm/postgres-js ' ; import postgres from ' postgres ' ; import * as schema from ' ./schema ' ; const queryClient = postgres ( process . env . DATABASE_URL ! ); export const db = drizzle ( queryClient , { schema }); Enter fullscreen mode Exit fullscreen mode 7. Performing Type-Safe CRUD Drizzle gives you two ways to query: SQL-like (for those who love SQL) and Relational Queries (for those who love the Prisma API). The "Prisma-like" way (Relational): import { db } from ' ./db ' ; async function main () { // Create a user with a post const newUser = await db . insert ( users ). values ({ name : ' Dev Reader ' , email : ' hello@dev.to ' , }). returning (); // Fetch users with their posts (The "Prisma" feel) const allUsers = await db . query . users . findMany ({ with : { posts : true , }, }); console . log ( allUsers ); } main (); Enter fullscreen mode Exit fullscreen mode 🚀 What Makes Drizzle the 2025 Choice? Zero Code-Gen: You don't need to run npx generate every time you change a field. Your TypeScript types are always in sync with your schema automatically. The "Edge" Advantage: Because Drizzle has no heavy binary engine, it starts up in milliseconds on Vercel Functions or Cloudflare Workers. Drizzle Studio: Just like Prisma Studio, run npx drizzle-kit studio to get a beautiful browser-based UI to explore your PostgreSQL data. SQL Power: If you need to write a complex window function or a specific PostgreSQL extension query, Drizzle stays out of your way and lets you write SQL while still providing types for the result. Pro-Tip: If you are migrating from Prisma, check out the drizzle-kit introspect command. It can look at your existing database and automatically generate the Drizzle TypeScript schema for you! Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct &bull; Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink . Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Sameer Saleem Follow Software Developer | JavaScript Specialist Work Software Developer at IBA Joined Sep 16, 2025 More from Sameer Saleem Mocking Your Postgres DB Doesn&#39;t Have to Suck # prisma # webdev # fakerjs # postgres The Great ORM Pivot: Why Teams are Moving to Drizzle in 2025 # webdev # drizzle Beyond the Autocomplete: Mastering Agentic Workflows in 2025 # ai # productivity # programming # webdev 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://dev.to/kashifsoofi/gtk4-dropdown-with-net-1pca
GTK4 DropDown with .NET - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Add reaction Like Unicorn Exploding Head Raised Hands Fire Jump to Comments Save Boost More... Copy link Copy link Copied to Clipboard Share to X Share to LinkedIn Share to Facebook Share to Mastodon Share Post via... Report Abuse Kashif Soofi Posted on Jan 8 GTK4 DropDown with .NET # dotnet # tutorial # ui GTK4 (7 Part Series) 1 Counter App with GTK4 and .NET 2 Choose Font with GTK4 and .NET ... 3 more parts... 3 GTK 4 ListView with .NET 4 GTK 4 GridView with .NET 5 GTK4 ColumnView with .NET 6 GTK4 `dotnet new` Project Template 7 GTK4 DropDown with .NET In this post I will make use of GTK4 DropDown . DropDown is used to display selected item from a list of items. Project Setup Let's start by installing/updating the dotnet new GTK4 .NET Project Template . After making sure we have the new project template available in dotnet new list. We can proceed to create our project. Let's create a directory for the project and create project structure using following commands mkdir gtk4-dotnet-drop-down cd gtk4-dotnet-drop-down dotnet new gtk4-app -p:n DropDown Enter fullscreen mode Exit fullscreen mode Now we can run our application by executing: dotnet run --project DropDown/DropDown.csproj Enter fullscreen mode Exit fullscreen mode At this moment it would display a window with Hello, world!. Simple DropDown Let's start with simple DropDown. First we need to add a referce of GirCore.GObject-2.0.Integration to our sample project. We need this to use GObject.SubClass attribute that would generate boilerplate code for our inherited window. Next lets add a class for our window. [ GObject . Subclass &lt; Gtk . ApplicationWindow &gt;] public partial class WithStringList { partial void Initialize () { // initialize all members } } Enter fullscreen mode Exit fullscreen mode With our window class added, let's update Program.cs to show the new window. Only showing new code for brevity. application . OnActivate += ( sender , args ) =&gt; { var buttonShowWithStringList = CreateButton ( "With StringList" ); buttonShowWithStringList . OnClicked += ( _ , _ ) =&gt; new WithStringList (). Show (); ... var gtkBox = Gtk . Box . New ( Gtk . Orientation . Vertical , 0 ); gtkBox . Append ( buttonShowWithStringList ); ... window . Child = gtkBox ; } static Gtk . Button CreateButton ( string label ) { var button = Gtk . Button . New (); button . Label = label ; button . SetMarginTop ( 12 ); button . SetMarginBottom ( 12 ); button . SetMarginStart ( 12 ); button . SetMarginEnd ( 12 ); return button ; } Enter fullscreen mode Exit fullscreen mode Next let's add and a label and a dropdown in WithStringList private Gtk . Label _labelSelected ; private Gtk . DropDown _dropDown ; Enter fullscreen mode Exit fullscreen mode And then update the Initialize method to initialize label and dropdown. partial void Initialize () { Title = "DropDown With StringList" ; SetDefaultSize ( 300 , 300 ); _labelSelected = Gtk . Label . New ( "Selected: 1 minute" ); _labelSelected . SetMarginTop ( 12 ); _labelSelected . SetMarginBottom ( 12 ); _labelSelected . SetMarginStart ( 12 ); _labelSelected . SetMarginEnd ( 12 ); var stringList = Gtk . StringList . New ([ "1 minute" , "2 minutes" , "5 minutes" , "15 minutes" , "30 minutes" ]); _dropDown = new Gtk . DropDown (); _dropDown . SetModel ( stringList ); _dropDown . SetSelected ( 0 ); _dropDown . SetMarginTop ( 12 ); _dropDown . SetMarginBottom ( 12 ); _dropDown . SetMarginStart ( 12 ); _dropDown . SetMarginEnd ( 12 ); _dropDown . OnNotify += ( _ , _ ) =&gt; { var selectedItem = ( Gtk . StringObject ) _dropDown . SelectedItem !; var interval = selectedItem . GetString (); _labelSelected . SetLabel ( $"Selected: { interval } " ); }; var gtkBox = Gtk . Box . New ( Gtk . Orientation . Vertical , 0 ); gtkBox . Append ( _labelSelected ); gtkBox . Append ( _dropDown ); Child = gtkBox ; } Enter fullscreen mode Exit fullscreen mode Here interesting part is that we create a StringList with the values that will be displayed in the DropDown. Then we set the model of DropDown to the created StringList. DropDown knows how to work with StringList. Finally we setup selected property changed handler of our DropDown and set the selected value in the label. Following screenshots show the initial, dropdown and selection for simple DropDown. Complex DropDown Let's go through with a complex example, where we display a Title, Description and an image. There will be another tickbox next to the selected item. First let's add a custom object StringHolder to use in the model. [ GObject . Subclass &lt; GObject . Object &gt;] public partial class StringHolder { public StringHolder ( string title , string icon , string description ) : this () { Title = title ; Icon = icon ; Description = description ; } public string Title { get ; } public string Icon { get ; } public string Description { get ; } } Enter fullscreen mode Exit fullscreen mode We would setup 2 instances of Gtk.SignalListItemFactory , 1st to setup and bind drop down items and 2nd to setup list and bind dropdown items when item is selected. var selectedFactory = Gtk . SignalListItemFactory . New (); selectedFactory . OnSetup += OnSetupSelectedItem ; selectedFactory . OnBind += OnBindSelectedItem ; _dropDown . SetFactory ( selectedFactory ); // Factory for presenting the items in the dropdown list. var listFactory = Gtk . SignalListItemFactory . New (); listFactory . OnSetup += OnSetupListItem ; listFactory . OnBind += OnBindListItem ; _dropDown . SetListFactory ( listFactory ); Enter fullscreen mode Exit fullscreen mode Then we create the Gio.ListStore and set the dropdown's model. ... CreateModel (); _dropDown . SetModel ( _listStore ); _dropDown . SetSelected ( 0 ); ... private void CreateModel () { _listStore = Gio . ListStore . New ( StringHolder . GetGType ()); _listStore . Append ( new StringHolder ( "Deskop" , "user-desktop-symbolic" , "Deskop Folder" )); _listStore . Append ( new StringHolder ( "Home" , "user-home-symbolic" , "Home Folder" )); _listStore . Append ( new StringHolder ( "Trash" , "user-trash-symbolic" , "Trash Folder" )); _listStore . Append ( new StringHolder ( "Videos" , "folder-videos-symbolic" , "Videos Folder" )); } Enter fullscreen mode Exit fullscreen mode For selected item, we only display an Image and Label and display Icon and Title property from the model. private static void OnSetupSelectedItem ( Gtk . SignalListItemFactory factory , Gtk . SignalListItemFactory . SetupSignalArgs args ) { var listItem = args . Object as Gtk . ListItem ; var box = Gtk . Box . New ( Gtk . Orientation . Horizontal , 10 ); box . Append ( Gtk . Image . New ()); box . Append ( Gtk . Label . New ( "" )); listItem !. SetChild ( box ); } private static void OnBindSelectedItem ( Gtk . SignalListItemFactory sender , Gtk . SignalListItemFactory . BindSignalArgs args ) { var listItem = args . Object as Gtk . ListItem ; var stringHolder = listItem !. GetItem () as StringHolder ; if ( stringHolder is null ) return ; var box = listItem . GetChild () as Gtk . Box ; if ( box is null ) return ; var image = box . GetFirstChild () as Gtk . Image ; if ( image is null ) return ; image . SetFromIconName ( stringHolder . Icon ); var label = image . GetNextSibling () as Gtk . Label ; if ( label is null ) return ; label . SetText ( stringHolder . Title ); } Enter fullscreen mode Exit fullscreen mode For selected item however we also display Description and a tickbox image next to the selected item. private static void OnSetupListItem ( Gtk . SignalListItemFactory factory , Gtk . SignalListItemFactory . SetupSignalArgs args ) { var listItem = args . Object as Gtk . ListItem ; var hbox = Gtk . Box . New ( Gtk . Orientation . Horizontal , 10 ); var vbox = Gtk . Box . New ( Gtk . Orientation . Vertical , 2 ); hbox . Append ( Gtk . Image . New ()); hbox . Append ( vbox ); var lblTitle = Gtk . Label . New ( "" ); lblTitle . SetXalign ( 0 ); vbox . Append ( lblTitle ); var lblDescription = Gtk . Label . New ( "" ); lblDescription . SetXalign ( 0 ); lblDescription . SetCssClasses ([ "dim-label" ]); vbox . Append ( lblDescription ); var checkmark = Gtk . Image . New (); checkmark . SetFromIconName ( "object-select-symbolic" ); checkmark . SetVisible ( false ); hbox . Append ( checkmark ); listItem !. SetChild ( hbox ); } private void OnBindListItem ( Gtk . SignalListItemFactory sender , Gtk . SignalListItemFactory . BindSignalArgs args ) { var listItem = args . Object as Gtk . ListItem ; var stringHolder = listItem !. GetItem () as StringHolder ; if ( stringHolder is null ) return ; var hbox = listItem . GetChild () as Gtk . Box ; if ( hbox is null ) return ; var image = hbox . GetFirstChild () as Gtk . Image ; image ?. SetFromIconName ( stringHolder . Icon ); var vbox = image ?. GetNextSibling () as Gtk . Box ; if ( vbox is null ) return ; var title = vbox . GetFirstChild () as Gtk . Label ; title ?. SetText ( stringHolder . Title ); var description = title ?. GetNextSibling () as Gtk . Label ; description ?. SetText ( stringHolder . Description ); Gtk . DropDown . SelectedPropertyDefinition . Notify ( _dropDown , ( _ , _ ) =&gt; { OnSelectedItemChanged ( listItem ); }); listItem . SetData ( "connection" , IntPtr . Zero ); OnSelectedItemChanged ( listItem ); } Enter fullscreen mode Exit fullscreen mode Running the application will display following Source Source code for the demo application is hosted on GitHub in gtk4-dotnet-drop-down repository. References In no particular order GTK GTK Installation .NET .NET Download GTK4 project template Gir.Core Gir.Core Gtk-4.0 Samples GTK DropDown GTK4 DropDown Python Example And many more GTK4 (7 Part Series) 1 Counter App with GTK4 and .NET 2 Choose Font with GTK4 and .NET ... 3 more parts... 3 GTK 4 ListView with .NET 4 GTK 4 GridView with .NET 5 GTK4 ColumnView with .NET 6 GTK4 `dotnet new` Project Template 7 GTK4 DropDown with .NET Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct &bull; Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink . Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Kashif Soofi Follow Joined Dec 4, 2020 More from Kashif Soofi GTK4 `dotnet new` Project Template # dotnet # gtk4 GTK4 ColumnView with .NET # dotnet # gtk4 GTK 4 GridView with .NET # dotnet # gtk4 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV Forem — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . Forem &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://www.fine.dev/blog/ai-coding-guide#4-devin
AI Coding – A Simple Guide for Developers Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back AI Coding – A Simple Guide for Developers Table of Contents Introduction: What is AI Coding The Importance of Context in AI Coding Tips for Providing Better Context Practical Instructions for Providing Context to AI Coding Tools 1. Creating a Knowledge Graph 2. Implementing Retrieval-Augmented Generation (RAG) 3. Copy-Pasting Relevant Code into ChatGPT and Claude 4. Understanding Potential Mistakes Without Proper Context Using AI to Generate Code Incorporating AI Tools into Your Workflow Advice for Front-End Developers Practical Tips Advice for Back-End Developers Practical Tips Use Cases for AI in Coding 1. Automated Bug Fixes 2. Predicting Performance Bottlenecks 3. Large Codebase Refactoring Industry-Specific Benefits Best Large Language Models (LLMs) for Coding 1. OpenAI 2. Anthropic 3. Google Gemini 4. Other Notable Models Choosing the Right LLM for Your Needs Popular AI Coding Tools 1. Fine 2. ChatGPT 3. Replit 4. Devin 5. Cursor Conclusion Introduction: What is AI Coding In today&#x27;s rapidly evolving tech landscape, AI coding has emerged as a game-changer for developers. But what exactly is AI coding? Simply put, it&#x27;s the use of artificial intelligence to assist in writing, optimizing, and managing code. AI coding tools help developers write better, faster, and more efficient code by automating repetitive tasks, providing intelligent code suggestions, and even debugging. This blog will delve into the importance of context in AI coding, how to use AI for generating code, offer practical advice for both front-end and back-end developers, explore various use cases, introduce some of the top AI coding tools available today, and discuss the best large language models (LLMs) for coding. The Importance of Context in AI Coding The first key to success in AI coding is understanding context . AI tools analyze the surrounding code to generate relevant and accurate suggestions. Without proper context, AI-generated code can be irrelevant or even introduce errors. Here&#x27;s why context matters: Code Quality: In complex systems, context helps maintain consistency and functionality across different modules. Relevance: AI tools can provide more precise code snippets when they understand the broader scope of the project. Efficiency: Proper context reduces the time developers spend correcting AI-generated code. Imagine asking a lawyer off the street to represent you in court, without knowing anything about you, the case, or the evidence. The best lawyer in the world would struggle! The same goes for AI in coding - only if you provide the relevant information will you get relevant results. Tips for Providing Better Context: Descriptive Comments: Write clear and detailed comments to guide the AI tool. Structured Code: Organize your code logically to help AI understand the flow and dependencies. Consistent Naming Conventions: Use meaningful and consistent names for variables, functions, and classes. Integrate Platforms: The more of your tech stack that can be integrated, the more data the AI will be able to access and the better the output will be. Fine offers GitHub, Linear, and Sentry integrations with more on the way. Practical Instructions for Providing Context to AI Coding Tools To maximize the effectiveness of AI coding tools, providing comprehensive and well-structured context is essential. Here are some practical methods to enhance context for AI tools: 1. Creating a Knowledge Graph A knowledge graph is a structured representation of information that outlines the relationships between different components of your codebase. By creating a knowledge graph, you can provide AI tools with a holistic view of your project, enabling them to make more informed suggestions. How to Create a Knowledge Graph: Identify Key Components: List out all the modules, classes, functions, and their interactions within your project. Define Relationships: Establish how these components interact, depend on each other, and contribute to the overall functionality. Use Visualization Tools: Utilize tools like Neo4j or Graphviz to visualize the knowledge graph, making it easier to understand and update. Benefits: Enhances AI&#x27;s understanding of the project structure. Facilitates better code suggestions and optimizations. Helps in identifying dependencies and potential areas for improvement. Fine creates a knowledge graph called Atlas, which includes your codebase from GitHub and issues from Sentry and Linear. This way, it prepares the AI to handle any task you give it. You don’t need to work hard creating your own knowledge graph when we’ve done it for you. 2. Implementing Retrieval-Augmented Generation (RAG) Retrieval-Augmented Generation (RAG) combines traditional information retrieval techniques with generative AI models to provide more accurate and contextually relevant responses. How to Use RAG: Integrate Data Sources: Connect your AI coding tool to relevant data sources such as documentation, code repositories, and knowledge bases. Contextual Retrieval: Ensure that the AI can retrieve pertinent information from these sources before generating code suggestions. Continuous Learning: Update the data sources regularly to keep the AI informed about the latest changes and best practices in your project. Benefits: Improves the relevance and accuracy of AI-generated code. Enables AI to leverage existing knowledge and documentation. Enhances the tool&#x27;s ability to handle complex queries and tasks. 3. Copy-Pasting Relevant Code into ChatGPT and Claude When using conversational AI tools like ChatGPT for coding assistance, providing snippets of relevant code can significantly improve the quality of the responses. How to Provide Relevant Code: Select Key Sections: Identify and copy the sections of code that are directly related to your query or the task at hand. Provide Contextual Information: Along with the code, include comments or explanations that describe the functionality and purpose of the code segments. Ask Specific Questions: Clearly state what you need help with, such as debugging a particular function or optimizing a code block. Example: # Function to calculate the factorial of a number def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) # I need to optimize this recursive factorial function to handle larger numbers without hitting the recursion limit. Question: How can I optimize the above factorial function to handle larger inputs efficiently? Benefits: Provides AI with the necessary context to generate accurate solutions. Reduces ambiguity, leading to more precise and helpful responses. Saves time by directly addressing specific issues within the code. This is similar to GitHub Copilot and some other tools where you can highlight the relevant context to direct the AI. 4. Understanding Potential Mistakes Without Proper Context AI coding tools, while powerful, can make mistakes if not provided with adequate context. Common errors include: Irrelevant Code Suggestions: Without understanding the project structure, AI might suggest code that doesn&#x27;t fit the existing framework. Syntax Errors: Lack of context can lead to syntax mistakes, especially in languages with strict syntax rules. Logical Flaws: AI might introduce logical errors if it doesn&#x27;t fully grasp the intended functionality. Security Vulnerabilities: Inadequate context can result in code that exposes security loopholes or fails to follow best practices. Backend Errors In languages commonly used for backend such as Python, AI may make more mistakes if it doesn’t have context, such as NameErrors and IndentationErrors - mistakes that you wouldn’t have made coding manually. You can read more about common Python errors and how different AI applications handle them here.   Fine is less likely to make such errors, as it has full knowledge of your codebase.   Mitigation Strategies: Always Review AI-Generated Code: Never blindly trust the AI&#x27;s suggestions; always verify and test the code. Provide Comprehensive Context: The more information you provide, the better the AI can assist accurately. Use Multiple Sources: Cross-reference AI suggestions with official documentation and best practices. Continuous Feedback: Provide feedback to the AI tool to help it learn and improve over time. Using AI to Generate Code AI coding tools are revolutionizing the way developers write code by automating mundane tasks and enhancing creativity. Here&#x27;s how AI is being used to generate code: Code Snippets: AI can suggest entire lines or blocks of code based on the current context. Automating Repetitive Tasks: Tasks like boilerplate code generation, formatting, and refactoring can be handled by AI, freeing up developers to focus on more complex problems. Bug Detection: AI can identify potential bugs and vulnerabilities in real-time, ensuring higher code quality. Incorporating AI Tools into Your Workflow: Choose the Right Tool: Select an AI coding tool that integrates seamlessly with your development workflow. Customize Settings: Tailor the tool’s settings to match your coding style and project requirements. Regularly Review Suggestions: While AI can assist, always review and test AI-generated code to ensure it meets your standards. Advice for Front-End Developers Front-end development focuses on the user interface and user experience. AI coding tools can significantly enhance this process: UI/UX Enhancement: AI can suggest design improvements and optimize user interfaces for better engagement. Streamlining CSS/HTML/JS: Automate the generation of responsive designs and ensure cross-browser compatibility. Automated Testing: AI tools can perform repetitive testing tasks, ensuring your front-end code is robust and error-free. Practical Tips: Use AI for Responsive Design: Let AI suggest layout adjustments for different screen sizes. Optimize Performance: AI can analyze and optimize front-end performance, reducing load times and improving user experience. Leverage AI for Accessibility: Ensure your applications are accessible by using AI to identify and fix accessibility issues. Advice for Back-End Developers Back-end development involves server-side logic, database management, and ensuring the smooth operation of applications. AI coding tools can streamline these processes: Automating Server-Side Logic: AI can generate efficient server-side code, handling complex operations with ease. Security Vulnerability Detection: Identify and fix security issues before they become problematic. Database Query Optimization: AI can analyze and optimize database queries for better performance. Practical Tips: API Generation: Use AI to create and manage APIs, ensuring they are secure and efficient. Automate Testing: Implement AI-driven testing to validate back-end processes and ensure reliability. Optimize Code Performance: Leverage AI to analyze and enhance the performance of your server-side code. Use Cases for AI in Coding AI coding has a wide range of applications across various industries. Here are some real-world use cases: 1. Automated Bug Fixes Fine’s AI can identify and fix bugs in your codebase, reducing the time spent on debugging and improving overall code quality. 2. Predicting Performance Bottlenecks By analyzing code patterns, AI can predict potential performance issues, allowing developers to address them proactively. 3. Large Codebase Refactoring Managing and refactoring large codebases can be daunting. AI tools can assist with this process, ensuring consistency and reducing errors. Industry-Specific Benefits: E-Commerce: Enhance platform performance and security with AI-driven optimizations. Add features to improve user experience and conversion rates rapidly. Fintech: Ensure the reliability and security of financial applications through AI-assisted coding. SaaS Platforms: Improve scalability and performance with AI-generated and optimized code. Healthcare: Streamline data processing and ensure compliance with regulatory standards through AI-assisted code generation. Education Technology: Enhance learning platforms by personalizing features and improving code quality with AI-driven development. Gaming: Optimize game performance and identify bugs faster with AI-generated suggestions and automated testing. Best Large Language Models (LLMs) for Coding Large Language Models (LLMs) are at the heart of modern AI coding tools. They power the intelligent features that assist developers in writing and managing code. Here are some of the best LLMs for coding: 1. OpenAI OpenAI&#x27;s models, including GPT-4 , are renowned for their versatility and capability in understanding and generating human-like text. In coding, GPT-4 excels at code generation, debugging, and providing intelligent suggestions across multiple programming languages. OpenAI also offers Codex , specifically fine-tuned for programming tasks, making it a popular choice for developers seeking advanced AI assistance. OpenAI also recently released preview and mini versions of their latest model, o1, which is outperforming competitors on many benchmarks. 2. Anthropic Anthropic&#x27;s Claude models focus on safety and reliability, ensuring that AI-generated code adheres to best practices and minimizes errors. These models are designed to understand complex coding contexts and provide suggestions that align with developers&#x27; intent. Anthropic emphasizes ethical AI use, making their models a trustworthy option for sensitive and critical development environments. Claude Sonnet 3.5 was widely regarded as the most powerful LLM for coding, until o1’s release, and many developers still prefer it. 3. Google Gemini Google&#x27;s Gemini models leverage Google&#x27;s extensive research in natural language processing and machine learning. Gemini is designed to integrate seamlessly with Google&#x27;s ecosystem, offering robust support for various programming languages and frameworks. With a focus on scalability and performance, Gemini models are ideal for large-scale projects requiring consistent and efficient code generation. 4. Other Notable Models: Cohere : Known for their fast and efficient language models, Cohere offers solutions tailored for real-time coding assistance and integration into development workflows. Grok: A versatile AI model designed to assist developers in writing, debugging, and optimizing code effectively. IBM Watson: IBM&#x27;s AI offerings include models that specialize in enterprise-level coding assistance, focusing on security, compliance, and integration with existing IT infrastructures. Choosing the Right LLM for Your Needs: When selecting an LLM for coding, consider the following factors: Language Support: Ensure the model supports the programming languages you use. Integration: Look for models that integrate smoothly with your development environment and tools. Customization: Some models offer more flexibility for customization and fine-tuning based on specific project requirements. Safety and Reliability: Prioritize models that emphasize code accuracy and security to minimize the risk of introducing vulnerabilities. Click here to learn about the leading LLMs for coding and how they compare. o1-preview and Claude 3.5 Sonnet are considered to be the prominent AI models for coding. Popular AI Coding Tools There are several AI coding tools available, each with unique features tailored to different needs. Here are some of the leading options: 1. Fine Features: Fine offers advanced code generation, intelligent suggestions, automations and a full-context knowledge graph. It leverages state-of-the-art LLMs including o1 and Claude Sonnet to provide accurate and context-aware code assistance. Best For: Professional developers seeking a comprehensive AI assistant that enhances productivity across multiple programming languages, working on existing codebases. Integration: Integrates with GitHub, Linear, Sentry and Slack - with further integrations such as Jira, Monday Dev, Clickup, Data Dog, Jam.dev and posthog coming soon. 2. ChatGPT Features: ChatGPT provides conversational AI assistance, allowing developers to ask questions, seek code examples, and receive real-time support. It excels in understanding natural language queries and providing detailed explanations. Best For: Asking short questions about coding in general - such as explaining functions you’re not familiar with. Integration: Accessible via web interface, API, and can be integrated into various development tools through plugins and extensions. 3. Replit Features: Replit offers an online coding platform with integrated AI assistance. It supports collaborative coding, real-time code suggestions, and automated debugging. Best For: Teams and individual developers looking for a cloud-based development environment with built-in AI support. Integration: Fully web-based, allowing seamless collaboration and access from any device with internet connectivity. 4. Devin Features: Devin focuses on optimizing backend development with AI-driven code generation, API creation, and database management. It offers robust security features and performance optimization tools. Best For: Back-end developers seeking specialized AI tools to streamline server-side development and database interactions. Integration: Compatible with major backend frameworks and integrates with popular cloud services for deployment and management. Devin isn’t currently publicly available, but you can apply for Beta access via their website. 5. Cursor Features: Cursor provides AI-powered code generation and real-time collaboration features. It emphasizes building large blocks of code and reducing development time. Best For: Developers who prioritize code quality and seek tools that can begin a project from scratch and take it to MVP. Integration: Cursor is built on VSCode making it familiar for many developers. Equally as time-consuming as writing code is reviewing code. Here&#x27;s a comparison of how different AI Coding tools handle code reviews. Conclusion AI coding boosts productivity, improves code quality, and lets developers focus on creative tasks. Providing context, using AI for code generation, and choosing the right tools can greatly benefit developers. Pick the best large language models for your needs to optimize your workflow. Automate tasks, optimize performance, and enhance security with AI coding tools. Embrace AI to unlock new efficiency and innovation. Try Fine for free at ai.fine.dev and elevate your coding workflow today. Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://www.fine.dev/blog/ai-coding-guide#2-anthropic
AI Coding – A Simple Guide for Developers Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back AI Coding – A Simple Guide for Developers Table of Contents Introduction: What is AI Coding The Importance of Context in AI Coding Tips for Providing Better Context Practical Instructions for Providing Context to AI Coding Tools 1. Creating a Knowledge Graph 2. Implementing Retrieval-Augmented Generation (RAG) 3. Copy-Pasting Relevant Code into ChatGPT and Claude 4. Understanding Potential Mistakes Without Proper Context Using AI to Generate Code Incorporating AI Tools into Your Workflow Advice for Front-End Developers Practical Tips Advice for Back-End Developers Practical Tips Use Cases for AI in Coding 1. Automated Bug Fixes 2. Predicting Performance Bottlenecks 3. Large Codebase Refactoring Industry-Specific Benefits Best Large Language Models (LLMs) for Coding 1. OpenAI 2. Anthropic 3. Google Gemini 4. Other Notable Models Choosing the Right LLM for Your Needs Popular AI Coding Tools 1. Fine 2. ChatGPT 3. Replit 4. Devin 5. Cursor Conclusion Introduction: What is AI Coding In today&#x27;s rapidly evolving tech landscape, AI coding has emerged as a game-changer for developers. But what exactly is AI coding? Simply put, it&#x27;s the use of artificial intelligence to assist in writing, optimizing, and managing code. AI coding tools help developers write better, faster, and more efficient code by automating repetitive tasks, providing intelligent code suggestions, and even debugging. This blog will delve into the importance of context in AI coding, how to use AI for generating code, offer practical advice for both front-end and back-end developers, explore various use cases, introduce some of the top AI coding tools available today, and discuss the best large language models (LLMs) for coding. The Importance of Context in AI Coding The first key to success in AI coding is understanding context . AI tools analyze the surrounding code to generate relevant and accurate suggestions. Without proper context, AI-generated code can be irrelevant or even introduce errors. Here&#x27;s why context matters: Code Quality: In complex systems, context helps maintain consistency and functionality across different modules. Relevance: AI tools can provide more precise code snippets when they understand the broader scope of the project. Efficiency: Proper context reduces the time developers spend correcting AI-generated code. Imagine asking a lawyer off the street to represent you in court, without knowing anything about you, the case, or the evidence. The best lawyer in the world would struggle! The same goes for AI in coding - only if you provide the relevant information will you get relevant results. Tips for Providing Better Context: Descriptive Comments: Write clear and detailed comments to guide the AI tool. Structured Code: Organize your code logically to help AI understand the flow and dependencies. Consistent Naming Conventions: Use meaningful and consistent names for variables, functions, and classes. Integrate Platforms: The more of your tech stack that can be integrated, the more data the AI will be able to access and the better the output will be. Fine offers GitHub, Linear, and Sentry integrations with more on the way. Practical Instructions for Providing Context to AI Coding Tools To maximize the effectiveness of AI coding tools, providing comprehensive and well-structured context is essential. Here are some practical methods to enhance context for AI tools: 1. Creating a Knowledge Graph A knowledge graph is a structured representation of information that outlines the relationships between different components of your codebase. By creating a knowledge graph, you can provide AI tools with a holistic view of your project, enabling them to make more informed suggestions. How to Create a Knowledge Graph: Identify Key Components: List out all the modules, classes, functions, and their interactions within your project. Define Relationships: Establish how these components interact, depend on each other, and contribute to the overall functionality. Use Visualization Tools: Utilize tools like Neo4j or Graphviz to visualize the knowledge graph, making it easier to understand and update. Benefits: Enhances AI&#x27;s understanding of the project structure. Facilitates better code suggestions and optimizations. Helps in identifying dependencies and potential areas for improvement. Fine creates a knowledge graph called Atlas, which includes your codebase from GitHub and issues from Sentry and Linear. This way, it prepares the AI to handle any task you give it. You don’t need to work hard creating your own knowledge graph when we’ve done it for you. 2. Implementing Retrieval-Augmented Generation (RAG) Retrieval-Augmented Generation (RAG) combines traditional information retrieval techniques with generative AI models to provide more accurate and contextually relevant responses. How to Use RAG: Integrate Data Sources: Connect your AI coding tool to relevant data sources such as documentation, code repositories, and knowledge bases. Contextual Retrieval: Ensure that the AI can retrieve pertinent information from these sources before generating code suggestions. Continuous Learning: Update the data sources regularly to keep the AI informed about the latest changes and best practices in your project. Benefits: Improves the relevance and accuracy of AI-generated code. Enables AI to leverage existing knowledge and documentation. Enhances the tool&#x27;s ability to handle complex queries and tasks. 3. Copy-Pasting Relevant Code into ChatGPT and Claude When using conversational AI tools like ChatGPT for coding assistance, providing snippets of relevant code can significantly improve the quality of the responses. How to Provide Relevant Code: Select Key Sections: Identify and copy the sections of code that are directly related to your query or the task at hand. Provide Contextual Information: Along with the code, include comments or explanations that describe the functionality and purpose of the code segments. Ask Specific Questions: Clearly state what you need help with, such as debugging a particular function or optimizing a code block. Example: # Function to calculate the factorial of a number def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) # I need to optimize this recursive factorial function to handle larger numbers without hitting the recursion limit. Question: How can I optimize the above factorial function to handle larger inputs efficiently? Benefits: Provides AI with the necessary context to generate accurate solutions. Reduces ambiguity, leading to more precise and helpful responses. Saves time by directly addressing specific issues within the code. This is similar to GitHub Copilot and some other tools where you can highlight the relevant context to direct the AI. 4. Understanding Potential Mistakes Without Proper Context AI coding tools, while powerful, can make mistakes if not provided with adequate context. Common errors include: Irrelevant Code Suggestions: Without understanding the project structure, AI might suggest code that doesn&#x27;t fit the existing framework. Syntax Errors: Lack of context can lead to syntax mistakes, especially in languages with strict syntax rules. Logical Flaws: AI might introduce logical errors if it doesn&#x27;t fully grasp the intended functionality. Security Vulnerabilities: Inadequate context can result in code that exposes security loopholes or fails to follow best practices. Backend Errors In languages commonly used for backend such as Python, AI may make more mistakes if it doesn’t have context, such as NameErrors and IndentationErrors - mistakes that you wouldn’t have made coding manually. You can read more about common Python errors and how different AI applications handle them here.   Fine is less likely to make such errors, as it has full knowledge of your codebase.   Mitigation Strategies: Always Review AI-Generated Code: Never blindly trust the AI&#x27;s suggestions; always verify and test the code. Provide Comprehensive Context: The more information you provide, the better the AI can assist accurately. Use Multiple Sources: Cross-reference AI suggestions with official documentation and best practices. Continuous Feedback: Provide feedback to the AI tool to help it learn and improve over time. Using AI to Generate Code AI coding tools are revolutionizing the way developers write code by automating mundane tasks and enhancing creativity. Here&#x27;s how AI is being used to generate code: Code Snippets: AI can suggest entire lines or blocks of code based on the current context. Automating Repetitive Tasks: Tasks like boilerplate code generation, formatting, and refactoring can be handled by AI, freeing up developers to focus on more complex problems. Bug Detection: AI can identify potential bugs and vulnerabilities in real-time, ensuring higher code quality. Incorporating AI Tools into Your Workflow: Choose the Right Tool: Select an AI coding tool that integrates seamlessly with your development workflow. Customize Settings: Tailor the tool’s settings to match your coding style and project requirements. Regularly Review Suggestions: While AI can assist, always review and test AI-generated code to ensure it meets your standards. Advice for Front-End Developers Front-end development focuses on the user interface and user experience. AI coding tools can significantly enhance this process: UI/UX Enhancement: AI can suggest design improvements and optimize user interfaces for better engagement. Streamlining CSS/HTML/JS: Automate the generation of responsive designs and ensure cross-browser compatibility. Automated Testing: AI tools can perform repetitive testing tasks, ensuring your front-end code is robust and error-free. Practical Tips: Use AI for Responsive Design: Let AI suggest layout adjustments for different screen sizes. Optimize Performance: AI can analyze and optimize front-end performance, reducing load times and improving user experience. Leverage AI for Accessibility: Ensure your applications are accessible by using AI to identify and fix accessibility issues. Advice for Back-End Developers Back-end development involves server-side logic, database management, and ensuring the smooth operation of applications. AI coding tools can streamline these processes: Automating Server-Side Logic: AI can generate efficient server-side code, handling complex operations with ease. Security Vulnerability Detection: Identify and fix security issues before they become problematic. Database Query Optimization: AI can analyze and optimize database queries for better performance. Practical Tips: API Generation: Use AI to create and manage APIs, ensuring they are secure and efficient. Automate Testing: Implement AI-driven testing to validate back-end processes and ensure reliability. Optimize Code Performance: Leverage AI to analyze and enhance the performance of your server-side code. Use Cases for AI in Coding AI coding has a wide range of applications across various industries. Here are some real-world use cases: 1. Automated Bug Fixes Fine’s AI can identify and fix bugs in your codebase, reducing the time spent on debugging and improving overall code quality. 2. Predicting Performance Bottlenecks By analyzing code patterns, AI can predict potential performance issues, allowing developers to address them proactively. 3. Large Codebase Refactoring Managing and refactoring large codebases can be daunting. AI tools can assist with this process, ensuring consistency and reducing errors. Industry-Specific Benefits: E-Commerce: Enhance platform performance and security with AI-driven optimizations. Add features to improve user experience and conversion rates rapidly. Fintech: Ensure the reliability and security of financial applications through AI-assisted coding. SaaS Platforms: Improve scalability and performance with AI-generated and optimized code. Healthcare: Streamline data processing and ensure compliance with regulatory standards through AI-assisted code generation. Education Technology: Enhance learning platforms by personalizing features and improving code quality with AI-driven development. Gaming: Optimize game performance and identify bugs faster with AI-generated suggestions and automated testing. Best Large Language Models (LLMs) for Coding Large Language Models (LLMs) are at the heart of modern AI coding tools. They power the intelligent features that assist developers in writing and managing code. Here are some of the best LLMs for coding: 1. OpenAI OpenAI&#x27;s models, including GPT-4 , are renowned for their versatility and capability in understanding and generating human-like text. In coding, GPT-4 excels at code generation, debugging, and providing intelligent suggestions across multiple programming languages. OpenAI also offers Codex , specifically fine-tuned for programming tasks, making it a popular choice for developers seeking advanced AI assistance. OpenAI also recently released preview and mini versions of their latest model, o1, which is outperforming competitors on many benchmarks. 2. Anthropic Anthropic&#x27;s Claude models focus on safety and reliability, ensuring that AI-generated code adheres to best practices and minimizes errors. These models are designed to understand complex coding contexts and provide suggestions that align with developers&#x27; intent. Anthropic emphasizes ethical AI use, making their models a trustworthy option for sensitive and critical development environments. Claude Sonnet 3.5 was widely regarded as the most powerful LLM for coding, until o1’s release, and many developers still prefer it. 3. Google Gemini Google&#x27;s Gemini models leverage Google&#x27;s extensive research in natural language processing and machine learning. Gemini is designed to integrate seamlessly with Google&#x27;s ecosystem, offering robust support for various programming languages and frameworks. With a focus on scalability and performance, Gemini models are ideal for large-scale projects requiring consistent and efficient code generation. 4. Other Notable Models: Cohere : Known for their fast and efficient language models, Cohere offers solutions tailored for real-time coding assistance and integration into development workflows. Grok: A versatile AI model designed to assist developers in writing, debugging, and optimizing code effectively. IBM Watson: IBM&#x27;s AI offerings include models that specialize in enterprise-level coding assistance, focusing on security, compliance, and integration with existing IT infrastructures. Choosing the Right LLM for Your Needs: When selecting an LLM for coding, consider the following factors: Language Support: Ensure the model supports the programming languages you use. Integration: Look for models that integrate smoothly with your development environment and tools. Customization: Some models offer more flexibility for customization and fine-tuning based on specific project requirements. Safety and Reliability: Prioritize models that emphasize code accuracy and security to minimize the risk of introducing vulnerabilities. Click here to learn about the leading LLMs for coding and how they compare. o1-preview and Claude 3.5 Sonnet are considered to be the prominent AI models for coding. Popular AI Coding Tools There are several AI coding tools available, each with unique features tailored to different needs. Here are some of the leading options: 1. Fine Features: Fine offers advanced code generation, intelligent suggestions, automations and a full-context knowledge graph. It leverages state-of-the-art LLMs including o1 and Claude Sonnet to provide accurate and context-aware code assistance. Best For: Professional developers seeking a comprehensive AI assistant that enhances productivity across multiple programming languages, working on existing codebases. Integration: Integrates with GitHub, Linear, Sentry and Slack - with further integrations such as Jira, Monday Dev, Clickup, Data Dog, Jam.dev and posthog coming soon. 2. ChatGPT Features: ChatGPT provides conversational AI assistance, allowing developers to ask questions, seek code examples, and receive real-time support. It excels in understanding natural language queries and providing detailed explanations. Best For: Asking short questions about coding in general - such as explaining functions you’re not familiar with. Integration: Accessible via web interface, API, and can be integrated into various development tools through plugins and extensions. 3. Replit Features: Replit offers an online coding platform with integrated AI assistance. It supports collaborative coding, real-time code suggestions, and automated debugging. Best For: Teams and individual developers looking for a cloud-based development environment with built-in AI support. Integration: Fully web-based, allowing seamless collaboration and access from any device with internet connectivity. 4. Devin Features: Devin focuses on optimizing backend development with AI-driven code generation, API creation, and database management. It offers robust security features and performance optimization tools. Best For: Back-end developers seeking specialized AI tools to streamline server-side development and database interactions. Integration: Compatible with major backend frameworks and integrates with popular cloud services for deployment and management. Devin isn’t currently publicly available, but you can apply for Beta access via their website. 5. Cursor Features: Cursor provides AI-powered code generation and real-time collaboration features. It emphasizes building large blocks of code and reducing development time. Best For: Developers who prioritize code quality and seek tools that can begin a project from scratch and take it to MVP. Integration: Cursor is built on VSCode making it familiar for many developers. Equally as time-consuming as writing code is reviewing code. Here&#x27;s a comparison of how different AI Coding tools handle code reviews. Conclusion AI coding boosts productivity, improves code quality, and lets developers focus on creative tasks. Providing context, using AI for code generation, and choosing the right tools can greatly benefit developers. Pick the best large language models for your needs to optimize your workflow. Automate tasks, optimize performance, and enhance security with AI coding tools. Embrace AI to unlock new efficiency and innovation. Try Fine for free at ai.fine.dev and elevate your coding workflow today. Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://tatanotes.com/blog/glaucoma-awareness-month-2026/#main
TataNotes &ndash; Web Accessibility Personal Blog Glaucoma Awareness Month – TataNotes Skip to main content TataNotes… …all about a11y Blog About me Raising Awareness Glaucoma Awareness Month January is Glaucoma Awareness Month, dedicated to raising awareness about glaucoma — a group of eye diseases that can lead to blindness if not treated. Learn what you can do to support people with glaucoma. Reading time: around 2 min Publication date January 11, 2026 Glaucoma is one of the leading causes of blindness worldwide, affecting millions of people. It is estimated that approximately 80 million people globally have glaucoma, and the number is projected to grow to over 111 million by 2040 . Glaucoma is commonly known as the “silent thief of sight” because it usually has no symptoms in its early stages. With this condition, the optic nerve gets damaged slowly, leading to vision field reduction and, if left untreated, blindness. High intraocular pressure (IOP) is a major risk factor for glaucoma. Elevated IOP can damage the optic nerve fibers, leading to progressive vision loss, resulting in glaucoma. However, glaucoma can also occur in individuals with normal IOP levels, known as normal-tension glaucoma. High IOP alone is not a definitive indicator of glaucoma. Unfortunately, due to late diagnosis, one person I know lost their vision. Even though glaucoma has no cure yet, blindness could be prevented with regular eye exams and early treatment, such as applying eye drops, or performing an SLT procedure that helps lower IOP to prevent further damage to the optic nerve. What can you do to support people with glaucoma? Learn more about needs of people with glaucoma Glaucoma affects the way people perceive the environment. Use vision simulators like Glaucoma Vision Simulator or NoCoffee vision simulator for Firefox to understand how glaucoma affects vision. Adapt your digital and physical projects so that they’re easy to use with visual impairments. Similar simulators exist for other visual impairments as well. For digital content, follow WCAG and PDF/UA standards WCAG criteria like 1.1.1. Non-text Content (Level A) , 1.4.4 Resize Text (Level AA) , and 4.1.2 Name, Role, Value (Level A) address needs of people with visual impairments, including glaucoma. This is not an exhaustive list, and you should aim to follow other WCAG criteria to ensure your digital content is accessible to people with disabilities. To ensure PDF accessibility, follow PDF/UA (PDF for Universal Access) standard. This will help make your documents accessible by users of assistive technologies, such as screen readers. Ensure compliance with EN 301 549 standard for a wider range of products European standard EN 301 549 specifies accessibility requirements for a broad range of products and services, including hardware, software, websites, and electronic documents. By following this standard, you can make your digital content is accessible to people with disabilities, including those with visual impairments like glaucoma. Complying with these standards is a great first step, but keep in mind that no guideline or automated tool guarantees accessibility. An effective way to ensure accessibility is to conduct accessibility user testing with people with disabilities. Accomodate for people with visual impairments, including glaucoma Adopt accessible practices in the physical world. Design physical spaces with accessibility in mind — for example, provide printed materials and signage in Braille or large print, whenever possible. To help people with glaucoma navigate the environment, install tactile paving. Support your local glaucoma organizations There are many organizations around the world that support glaucoma research, provide guidance and support groups for people with glaucoma. You can find a glaucoma society in your country on the World Glaucoma Association’s list of member societies . Here are some glaucoma organizations you can support: European Glaucoma Society National Glaucoma Patient Support Groups American Glaucoma Society Glaucoma Research Society of Canada Glaucoma Australia By keeping accessibility barriers in mind, we can help ensure that individuals with glaucoma and other visual impairments can access and benefit from the great variety of products and public services. Sources How fast does glaucoma progress without treatment? Global prevalence of glaucoma and projections of glaucoma burden through 2040: a systematic review and meta-analysis Glaucoma Vision Simulator NoCoffee vision simulator for Firefox WCAG (Web Content Accessibility Guidelines) PDF/UA (PDF for Universal Access) European standard EN 301 549 Tatyana Bayramova © 2024–present Important: All rights reserved
2026-01-13T08:49:45
https://pythonspot.com/
Python Tutorials - Python Tutorial --> --> Beginner Machine Learning Database GUI Beginner Machine Learning Database GUI Beginner Machine Learning Database GUI Python Tutorials Python hosting : Host, run, and code Python in the cloud! Python is a computer programming language. This is a complete Python programming tutorial (for Python 3!). Suitable for both beginner and professional developers. Python Courses: Python Programming Bootcamp: Go from Zero to Hero Beginner Introduction Text input and output String slices Variables Lists If statements Functions Global and Local variables Scope Loops Range Tuples Dictionaries Datatype casting Random numbers Read file Write file Objects and classes Python class Encapsulation Method overloading Inheritance Polymorphism Inner classes Factory method Recursive functions Logging Subprocess Threading Lambda Sets Modules Graphs State Machine Tree Binary numbers Python Debugging Data and databases Read file Write file Flat database (Spreadsheets) Database: SQLite Database: MySQL Database: ORM with SqlAlchemy Web Python Web Development Flask Getting started Flask Jinja2 template engine Flask Create an Epic Web App Flask Login authentication Flask Login authentication with Google Flask Login authentication with Twitter Flask JSON and Google Charts API Flask Web Forms Flask Loading static pages Flask Boilerplate template Flask and great looking charts using Chart.js JSON encoding and decoding Creating a webbrowser with Python and PyQT Creating a gmail wordcloud Django Getting started Django Building a note taking app GUI (Graphical Interfaces) Introduction to GUI PyQt4 PyQt5 Tkinter wxPython Network HTTP client and server (network sockets programming tutorial) HTTP client with requests library HTTP download file HTTP parse HTML and XHTML FTP client in Python Building an IRC (ro)bot Read Email using POP3 Extract links from web page Plotting Matplotlib Line chart Matplotlib Histogram Matplotlib Bar chart Matplotlib Pie chart Matplotlib Legend Matplotlib save figure to image Matplotlib update plot Matplotlib time plot Advanced Regular Expressions An Introduction to Building Quantum Computing Applications with Python Other Create a chrome plugin with Python Fun tricks with Python Speech engines with Python (tutorial) Android SL4A Android Python Scripting Android Development in Python with QPython Computer Vision Image data and operations Image histogram Car tracking with cascades Detect faces in Google Hangouts video Object detection with tempate matching Netflix like Thumbnails with Python Game Simple guessing game (text based) Game programming with PyGame Make the game Snake with PyGame How to draw a maze in PyGame Computer AI in PyGame Sidescroller in Pygame Robotics Speech Recognition using Google Speech API Personal Assistant (Jarvis) 2016-02-14 Copyright &copy; 2015 - 2022 - Pythonspot.&nbsp; | Cookie policy | Terms of use | Privacy policy -->
2026-01-13T08:49:45
https://www.fine.dev/blog/secure-startup-codebase#pricing
Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Startups often prioritize speed over security, pushing out features to gain a competitive edge. However, overlooking security in the early stages can lead to costly issues down the road. This guide provides a step-by-step approach for CTOs to secure their startup&#x27;s codebase effectively while maintaining agility. Table of Contents Implement Secure Coding Standards Automate Security Scans Embrace Code Reviews with Security in Mind Practice Least Privilege Use Secrets Management Keep Dependencies Updated Enable Logging and Monitoring Regular Security Audits Educate Your Team Plan for Incident Response 1. Implement Secure Coding Standards Define a set of secure coding practices from the get-go. Train developers on common vulnerabilities such as SQL injection, XSS, and insecure deserialization. Adopting secure coding standards helps prevent vulnerabilities that are often introduced during rapid development. 2. Automate Security Scans Incorporate automated security tools into your CI/CD pipeline to catch vulnerabilities before they reach production. Tools like Snyk can help monitor dependencies and flag security issues, allowing your team to act proactively. 3. Embrace Code Reviews with Security in Mind Encourage peer code reviews that emphasize security. By incorporating a security checklist in your code review process, developers are more likely to catch issues early. Using tools like GitHub or GitLab for code reviews can streamline collaboration. Fine can make code reviews a far less arduous process for developers, making it easier to maintain consistently high standards. 4. Practice Least Privilege Ensure that each part of your system has access only to what it needs. Avoid giving developers or third-party services more permissions than necessary. Regularly review and revoke access to prevent unauthorized data exposure. 5. Use Secrets Management Avoid hardcoding sensitive information such as API keys, database credentials, or access tokens directly into your codebase. Instead, utilize a secrets management tool like AWS Secrets Manager, HashiCorp Vault, or Azure Key Vault to keep these secure. 6. Keep Dependencies Updated Outdated third-party libraries can introduce security vulnerabilities. Use dependency management tools to keep track of which libraries are in use and stay updated with security patches. 7. Enable Logging and Monitoring Monitor for unusual activity to detect threats early. Ensure your logging system captures details like failed login attempts, unexpected API usage, and codebase modifications. Using centralized logging services such as ELK Stack or Splunk can streamline threat detection and response. 8. Regular Security Audits Perform periodic security audits and penetration tests to assess the overall health of your codebase. Startups should consider working with a third-party security expert to identify gaps that might be overlooked internally. 9. Educate Your Team Security is everyone’s responsibility. Conduct regular training sessions to keep your development team aware of the latest security threats and best practices. Tools like OWASP or even informal lunch-and-learns can help build a security-aware culture. 10. Plan for Incident Response Have an incident response plan in place in case a breach does occur. Document the steps your team needs to take to minimize damage and recover. Being prepared can make the difference between a minor incident and a major catastrophe. Securing your startup&#x27;s codebase requires deliberate planning and effort, but these practices will pay off by protecting your company and its customers. Adopting a proactive security mindset now can save countless headaches in the future. If you&#x27;re building a software startup, Fine can help you achieve your development goals faster. From within your issue management platform, delegate tasks to AI and get a PR to review when you&#x27;re done. You can also get coding tasks gone on the go, without compromising on security. Try it out at https://ai.fine.dev Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://dev.to/claudio_santos#main-content
Cláudio Menezes de Oliveira Santos - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Follow User actions Cláudio Menezes de Oliveira Santos I have 10 years in IT support and NOC, work with Microsoft 365, Entra ID and Defender, already hold AZ 900, study for AWS Practitioner, and I am earning a degree in AI and Machine Learning. Joined Joined on  Jan 5, 2026 github website twitter website More info about @claudio_santos Badges Writing Debut Awarded for writing and sharing your first DEV post! Continue sharing your work to earn the 4 Week Writing Streak Badge. Got it Close Post 1 post published Comment 0 comments written Tag 23 tags followed Hello AWS Builders, I’m Cláudio Claudio Santos Claudio Santos Claudio Santos Follow Jan 5 Hello AWS Builders, I’m Cláudio # career # aws # cloud # ai Comments Add Comment 1 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://www.fine.dev/blog/secure-startup-codebase#plan-for-incident-response
Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Startups often prioritize speed over security, pushing out features to gain a competitive edge. However, overlooking security in the early stages can lead to costly issues down the road. This guide provides a step-by-step approach for CTOs to secure their startup&#x27;s codebase effectively while maintaining agility. Table of Contents Implement Secure Coding Standards Automate Security Scans Embrace Code Reviews with Security in Mind Practice Least Privilege Use Secrets Management Keep Dependencies Updated Enable Logging and Monitoring Regular Security Audits Educate Your Team Plan for Incident Response 1. Implement Secure Coding Standards Define a set of secure coding practices from the get-go. Train developers on common vulnerabilities such as SQL injection, XSS, and insecure deserialization. Adopting secure coding standards helps prevent vulnerabilities that are often introduced during rapid development. 2. Automate Security Scans Incorporate automated security tools into your CI/CD pipeline to catch vulnerabilities before they reach production. Tools like Snyk can help monitor dependencies and flag security issues, allowing your team to act proactively. 3. Embrace Code Reviews with Security in Mind Encourage peer code reviews that emphasize security. By incorporating a security checklist in your code review process, developers are more likely to catch issues early. Using tools like GitHub or GitLab for code reviews can streamline collaboration. Fine can make code reviews a far less arduous process for developers, making it easier to maintain consistently high standards. 4. Practice Least Privilege Ensure that each part of your system has access only to what it needs. Avoid giving developers or third-party services more permissions than necessary. Regularly review and revoke access to prevent unauthorized data exposure. 5. Use Secrets Management Avoid hardcoding sensitive information such as API keys, database credentials, or access tokens directly into your codebase. Instead, utilize a secrets management tool like AWS Secrets Manager, HashiCorp Vault, or Azure Key Vault to keep these secure. 6. Keep Dependencies Updated Outdated third-party libraries can introduce security vulnerabilities. Use dependency management tools to keep track of which libraries are in use and stay updated with security patches. 7. Enable Logging and Monitoring Monitor for unusual activity to detect threats early. Ensure your logging system captures details like failed login attempts, unexpected API usage, and codebase modifications. Using centralized logging services such as ELK Stack or Splunk can streamline threat detection and response. 8. Regular Security Audits Perform periodic security audits and penetration tests to assess the overall health of your codebase. Startups should consider working with a third-party security expert to identify gaps that might be overlooked internally. 9. Educate Your Team Security is everyone’s responsibility. Conduct regular training sessions to keep your development team aware of the latest security threats and best practices. Tools like OWASP or even informal lunch-and-learns can help build a security-aware culture. 10. Plan for Incident Response Have an incident response plan in place in case a breach does occur. Document the steps your team needs to take to minimize damage and recover. Being prepared can make the difference between a minor incident and a major catastrophe. Securing your startup&#x27;s codebase requires deliberate planning and effort, but these practices will pay off by protecting your company and its customers. Adopting a proactive security mindset now can save countless headaches in the future. If you&#x27;re building a software startup, Fine can help you achieve your development goals faster. From within your issue management platform, delegate tasks to AI and get a PR to review when you&#x27;re done. You can also get coding tasks gone on the go, without compromising on security. Try it out at https://ai.fine.dev Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://www.fine.dev/blog/secure-startup-codebase#practice-least-privilege
Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Startups often prioritize speed over security, pushing out features to gain a competitive edge. However, overlooking security in the early stages can lead to costly issues down the road. This guide provides a step-by-step approach for CTOs to secure their startup&#x27;s codebase effectively while maintaining agility. Table of Contents Implement Secure Coding Standards Automate Security Scans Embrace Code Reviews with Security in Mind Practice Least Privilege Use Secrets Management Keep Dependencies Updated Enable Logging and Monitoring Regular Security Audits Educate Your Team Plan for Incident Response 1. Implement Secure Coding Standards Define a set of secure coding practices from the get-go. Train developers on common vulnerabilities such as SQL injection, XSS, and insecure deserialization. Adopting secure coding standards helps prevent vulnerabilities that are often introduced during rapid development. 2. Automate Security Scans Incorporate automated security tools into your CI/CD pipeline to catch vulnerabilities before they reach production. Tools like Snyk can help monitor dependencies and flag security issues, allowing your team to act proactively. 3. Embrace Code Reviews with Security in Mind Encourage peer code reviews that emphasize security. By incorporating a security checklist in your code review process, developers are more likely to catch issues early. Using tools like GitHub or GitLab for code reviews can streamline collaboration. Fine can make code reviews a far less arduous process for developers, making it easier to maintain consistently high standards. 4. Practice Least Privilege Ensure that each part of your system has access only to what it needs. Avoid giving developers or third-party services more permissions than necessary. Regularly review and revoke access to prevent unauthorized data exposure. 5. Use Secrets Management Avoid hardcoding sensitive information such as API keys, database credentials, or access tokens directly into your codebase. Instead, utilize a secrets management tool like AWS Secrets Manager, HashiCorp Vault, or Azure Key Vault to keep these secure. 6. Keep Dependencies Updated Outdated third-party libraries can introduce security vulnerabilities. Use dependency management tools to keep track of which libraries are in use and stay updated with security patches. 7. Enable Logging and Monitoring Monitor for unusual activity to detect threats early. Ensure your logging system captures details like failed login attempts, unexpected API usage, and codebase modifications. Using centralized logging services such as ELK Stack or Splunk can streamline threat detection and response. 8. Regular Security Audits Perform periodic security audits and penetration tests to assess the overall health of your codebase. Startups should consider working with a third-party security expert to identify gaps that might be overlooked internally. 9. Educate Your Team Security is everyone’s responsibility. Conduct regular training sessions to keep your development team aware of the latest security threats and best practices. Tools like OWASP or even informal lunch-and-learns can help build a security-aware culture. 10. Plan for Incident Response Have an incident response plan in place in case a breach does occur. Document the steps your team needs to take to minimize damage and recover. Being prepared can make the difference between a minor incident and a major catastrophe. Securing your startup&#x27;s codebase requires deliberate planning and effort, but these practices will pay off by protecting your company and its customers. Adopting a proactive security mindset now can save countless headaches in the future. If you&#x27;re building a software startup, Fine can help you achieve your development goals faster. From within your issue management platform, delegate tasks to AI and get a PR to review when you&#x27;re done. You can also get coding tasks gone on the go, without compromising on security. Try it out at https://ai.fine.dev Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://www.fine.dev/blog/secure-startup-codebase#implement-secure-coding-standards
Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Startups often prioritize speed over security, pushing out features to gain a competitive edge. However, overlooking security in the early stages can lead to costly issues down the road. This guide provides a step-by-step approach for CTOs to secure their startup&#x27;s codebase effectively while maintaining agility. Table of Contents Implement Secure Coding Standards Automate Security Scans Embrace Code Reviews with Security in Mind Practice Least Privilege Use Secrets Management Keep Dependencies Updated Enable Logging and Monitoring Regular Security Audits Educate Your Team Plan for Incident Response 1. Implement Secure Coding Standards Define a set of secure coding practices from the get-go. Train developers on common vulnerabilities such as SQL injection, XSS, and insecure deserialization. Adopting secure coding standards helps prevent vulnerabilities that are often introduced during rapid development. 2. Automate Security Scans Incorporate automated security tools into your CI/CD pipeline to catch vulnerabilities before they reach production. Tools like Snyk can help monitor dependencies and flag security issues, allowing your team to act proactively. 3. Embrace Code Reviews with Security in Mind Encourage peer code reviews that emphasize security. By incorporating a security checklist in your code review process, developers are more likely to catch issues early. Using tools like GitHub or GitLab for code reviews can streamline collaboration. Fine can make code reviews a far less arduous process for developers, making it easier to maintain consistently high standards. 4. Practice Least Privilege Ensure that each part of your system has access only to what it needs. Avoid giving developers or third-party services more permissions than necessary. Regularly review and revoke access to prevent unauthorized data exposure. 5. Use Secrets Management Avoid hardcoding sensitive information such as API keys, database credentials, or access tokens directly into your codebase. Instead, utilize a secrets management tool like AWS Secrets Manager, HashiCorp Vault, or Azure Key Vault to keep these secure. 6. Keep Dependencies Updated Outdated third-party libraries can introduce security vulnerabilities. Use dependency management tools to keep track of which libraries are in use and stay updated with security patches. 7. Enable Logging and Monitoring Monitor for unusual activity to detect threats early. Ensure your logging system captures details like failed login attempts, unexpected API usage, and codebase modifications. Using centralized logging services such as ELK Stack or Splunk can streamline threat detection and response. 8. Regular Security Audits Perform periodic security audits and penetration tests to assess the overall health of your codebase. Startups should consider working with a third-party security expert to identify gaps that might be overlooked internally. 9. Educate Your Team Security is everyone’s responsibility. Conduct regular training sessions to keep your development team aware of the latest security threats and best practices. Tools like OWASP or even informal lunch-and-learns can help build a security-aware culture. 10. Plan for Incident Response Have an incident response plan in place in case a breach does occur. Document the steps your team needs to take to minimize damage and recover. Being prepared can make the difference between a minor incident and a major catastrophe. Securing your startup&#x27;s codebase requires deliberate planning and effort, but these practices will pay off by protecting your company and its customers. Adopting a proactive security mindset now can save countless headaches in the future. If you&#x27;re building a software startup, Fine can help you achieve your development goals faster. From within your issue management platform, delegate tasks to AI and get a PR to review when you&#x27;re done. You can also get coding tasks gone on the go, without compromising on security. Try it out at https://ai.fine.dev Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://www.fine.dev/blog/secure-startup-codebase#use-secrets-management
Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Startups often prioritize speed over security, pushing out features to gain a competitive edge. However, overlooking security in the early stages can lead to costly issues down the road. This guide provides a step-by-step approach for CTOs to secure their startup&#x27;s codebase effectively while maintaining agility. Table of Contents Implement Secure Coding Standards Automate Security Scans Embrace Code Reviews with Security in Mind Practice Least Privilege Use Secrets Management Keep Dependencies Updated Enable Logging and Monitoring Regular Security Audits Educate Your Team Plan for Incident Response 1. Implement Secure Coding Standards Define a set of secure coding practices from the get-go. Train developers on common vulnerabilities such as SQL injection, XSS, and insecure deserialization. Adopting secure coding standards helps prevent vulnerabilities that are often introduced during rapid development. 2. Automate Security Scans Incorporate automated security tools into your CI/CD pipeline to catch vulnerabilities before they reach production. Tools like Snyk can help monitor dependencies and flag security issues, allowing your team to act proactively. 3. Embrace Code Reviews with Security in Mind Encourage peer code reviews that emphasize security. By incorporating a security checklist in your code review process, developers are more likely to catch issues early. Using tools like GitHub or GitLab for code reviews can streamline collaboration. Fine can make code reviews a far less arduous process for developers, making it easier to maintain consistently high standards. 4. Practice Least Privilege Ensure that each part of your system has access only to what it needs. Avoid giving developers or third-party services more permissions than necessary. Regularly review and revoke access to prevent unauthorized data exposure. 5. Use Secrets Management Avoid hardcoding sensitive information such as API keys, database credentials, or access tokens directly into your codebase. Instead, utilize a secrets management tool like AWS Secrets Manager, HashiCorp Vault, or Azure Key Vault to keep these secure. 6. Keep Dependencies Updated Outdated third-party libraries can introduce security vulnerabilities. Use dependency management tools to keep track of which libraries are in use and stay updated with security patches. 7. Enable Logging and Monitoring Monitor for unusual activity to detect threats early. Ensure your logging system captures details like failed login attempts, unexpected API usage, and codebase modifications. Using centralized logging services such as ELK Stack or Splunk can streamline threat detection and response. 8. Regular Security Audits Perform periodic security audits and penetration tests to assess the overall health of your codebase. Startups should consider working with a third-party security expert to identify gaps that might be overlooked internally. 9. Educate Your Team Security is everyone’s responsibility. Conduct regular training sessions to keep your development team aware of the latest security threats and best practices. Tools like OWASP or even informal lunch-and-learns can help build a security-aware culture. 10. Plan for Incident Response Have an incident response plan in place in case a breach does occur. Document the steps your team needs to take to minimize damage and recover. Being prepared can make the difference between a minor incident and a major catastrophe. Securing your startup&#x27;s codebase requires deliberate planning and effort, but these practices will pay off by protecting your company and its customers. Adopting a proactive security mindset now can save countless headaches in the future. If you&#x27;re building a software startup, Fine can help you achieve your development goals faster. From within your issue management platform, delegate tasks to AI and get a PR to review when you&#x27;re done. You can also get coding tasks gone on the go, without compromising on security. Try it out at https://ai.fine.dev Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://www.fine.dev/blog/secure-startup-codebase#regular-security-audits
Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Startups often prioritize speed over security, pushing out features to gain a competitive edge. However, overlooking security in the early stages can lead to costly issues down the road. This guide provides a step-by-step approach for CTOs to secure their startup&#x27;s codebase effectively while maintaining agility. Table of Contents Implement Secure Coding Standards Automate Security Scans Embrace Code Reviews with Security in Mind Practice Least Privilege Use Secrets Management Keep Dependencies Updated Enable Logging and Monitoring Regular Security Audits Educate Your Team Plan for Incident Response 1. Implement Secure Coding Standards Define a set of secure coding practices from the get-go. Train developers on common vulnerabilities such as SQL injection, XSS, and insecure deserialization. Adopting secure coding standards helps prevent vulnerabilities that are often introduced during rapid development. 2. Automate Security Scans Incorporate automated security tools into your CI/CD pipeline to catch vulnerabilities before they reach production. Tools like Snyk can help monitor dependencies and flag security issues, allowing your team to act proactively. 3. Embrace Code Reviews with Security in Mind Encourage peer code reviews that emphasize security. By incorporating a security checklist in your code review process, developers are more likely to catch issues early. Using tools like GitHub or GitLab for code reviews can streamline collaboration. Fine can make code reviews a far less arduous process for developers, making it easier to maintain consistently high standards. 4. Practice Least Privilege Ensure that each part of your system has access only to what it needs. Avoid giving developers or third-party services more permissions than necessary. Regularly review and revoke access to prevent unauthorized data exposure. 5. Use Secrets Management Avoid hardcoding sensitive information such as API keys, database credentials, or access tokens directly into your codebase. Instead, utilize a secrets management tool like AWS Secrets Manager, HashiCorp Vault, or Azure Key Vault to keep these secure. 6. Keep Dependencies Updated Outdated third-party libraries can introduce security vulnerabilities. Use dependency management tools to keep track of which libraries are in use and stay updated with security patches. 7. Enable Logging and Monitoring Monitor for unusual activity to detect threats early. Ensure your logging system captures details like failed login attempts, unexpected API usage, and codebase modifications. Using centralized logging services such as ELK Stack or Splunk can streamline threat detection and response. 8. Regular Security Audits Perform periodic security audits and penetration tests to assess the overall health of your codebase. Startups should consider working with a third-party security expert to identify gaps that might be overlooked internally. 9. Educate Your Team Security is everyone’s responsibility. Conduct regular training sessions to keep your development team aware of the latest security threats and best practices. Tools like OWASP or even informal lunch-and-learns can help build a security-aware culture. 10. Plan for Incident Response Have an incident response plan in place in case a breach does occur. Document the steps your team needs to take to minimize damage and recover. Being prepared can make the difference between a minor incident and a major catastrophe. Securing your startup&#x27;s codebase requires deliberate planning and effort, but these practices will pay off by protecting your company and its customers. Adopting a proactive security mindset now can save countless headaches in the future. If you&#x27;re building a software startup, Fine can help you achieve your development goals faster. From within your issue management platform, delegate tasks to AI and get a PR to review when you&#x27;re done. You can also get coding tasks gone on the go, without compromising on security. Try it out at https://ai.fine.dev Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://www.youtube.com/watch?v=qWHLf31NnNk
01 (Keynote) Opaque Pointers Are Coming - YouTube 정보 보도자료 저작권 문의하기 크리에이터 광고 개발자 약관 개인정보처리방침 정책 및 안전 YouTube 작동의 원리 새로운 기능 테스트하기 &copy; 2026 Google LLC, Sundar Pichai, 1600 Amphitheatre Parkway, Mountain View CA 94043, USA, 0807-882-594 (무료), yt-support-solutions-kr@google.com, 호스팅: Google LLC, 사업자정보 , 불법촬영물 신고 크리에이터들이 유튜브 상에 게시, 태그 또는 추천한 상품들은 판매자들의 약관에 따라 판매됩니다. 유튜브는 이러한 제품들을 판매하지 않으며, 그에 대한 책임을 지지 않습니다. var ytInitialData = {"responseContext":{"serviceTrackingParams":[{"service":"CSI","params":[{"key":"c","value":"WEB"},{"key":"cver","value":"2.20260109.01.00"},{"key":"yt_li","value":"0"},{"key":"GetWatchNext_rid","value":"0x5c316d7aebd0c183"}]},{"service":"GFEEDBACK","params":[{"key":"logged_in","value":"0"},{"key":"visitor_data","value":"CgtiR2FjaDRUZnBtayikjpjLBjIKCgJLUhIEGgAgNQ%3D%3D"}]},{"service":"GUIDED_HELP","params":[{"key":"logged_in","value":"0"}]},{"service":"ECATCHER","params":[{"key":"client.version","value":"2.20260109"},{"key":"client.name","value":"WEB"}]}],"mainAppWebResponseContext":{"loggedOut":true,"trackingParam":"kx_fmPxhoPZRamMfwN7tfHQycOo4MjOAkCAB8kiu4dYPA8HRgkussh7BwOcCE59TDtslLKPQ-SS"},"webResponseContextExtensionData":{"webResponseContextPreloadData":{"preloadMessageNames":["twoColumnWatchNextResults","results","videoPrimaryInfoRenderer","videoViewCountRenderer","menuRenderer","menuServiceItemRenderer","segmentedLikeDislikeButtonViewModel","likeButtonViewModel","toggleButtonViewModel","buttonViewModel","modalWithTitleAndButtonRenderer","buttonRenderer","dislikeButtonViewModel","unifiedSharePanelRenderer","menuFlexibleItemRenderer","videoSecondaryInfoRenderer","videoOwnerRenderer","subscribeButtonRenderer","subscriptionNotificationToggleButtonRenderer","menuPopupRenderer","confirmDialogRenderer","metadataRowContainerRenderer","compositeVideoPrimaryInfoRenderer","itemSectionRenderer","continuationItemRenderer","secondaryResults","lockupViewModel","thumbnailViewModel","thumbnailOverlayBadgeViewModel","thumbnailBadgeViewModel","thumbnailHoverOverlayToggleActionsViewModel","lockupMetadataViewModel","decoratedAvatarViewModel","avatarViewModel","contentMetadataViewModel","sheetViewModel","listViewModel","listItemViewModel","collectionThumbnailViewModel","thumbnailHoverOverlayViewModel","badgeViewModel","autoplay","playerOverlayRenderer","menuNavigationItemRenderer","watchNextEndScreenRenderer","endScreenVideoRenderer","thumbnailOverlayTimeStatusRenderer","thumbnailOverlayNowPlayingRenderer","endScreenPlaylistRenderer","playerOverlayAutoplayRenderer","playerOverlayVideoDetailsRenderer","autoplaySwitchButtonRenderer","quickActionsViewModel","decoratedPlayerBarRenderer","multiMarkersPlayerBarRenderer","speedmasterEduViewModel","engagementPanelSectionListRenderer","engagementPanelTitleHeaderRenderer","sortFilterSubMenuRenderer","sectionListRenderer","adsEngagementPanelContentRenderer","chipBarViewModel","chipViewModel","macroMarkersListRenderer","macroMarkersListItemRenderer","structuredDescriptionContentRenderer","videoDescriptionHeaderRenderer","factoidRenderer","viewCountFactoidRenderer","expandableVideoDescriptionBodyRenderer","horizontalCardListRenderer","richListHeaderRenderer","videoDescriptionTranscriptSectionRenderer","videoDescriptionInfocardsSectionRenderer","desktopTopbarRenderer","topbarLogoRenderer","fusionSearchboxRenderer","topbarMenuButtonRenderer","multiPageMenuRenderer","hotkeyDialogRenderer","hotkeyDialogSectionRenderer","hotkeyDialogSectionOptionRenderer","voiceSearchDialogRenderer","cinematicContainerRenderer"]},"ytConfigData":{"visitorData":"CgtiR2FjaDRUZnBtayikjpjLBjIKCgJLUhIEGgAgNQ%3D%3D","rootVisualElementType":3832},"webPrefetchData":{"navigationEndpoints":[{"clickTrackingParams":"CAAQg2ciEwizx5CUkYiSAxUiS3gAHR5SGjIyDHJlbGF0ZWQtYXV0b0jZubbq9-_ysKkBmgEFCAMQ-B3KAQT-i1BV","commandMetadata":{"webCommandMetadata":{"url":"/watch?v=ECwP3HRP0Z4\u0026pp=QAFIAQ%3D%3D","webPageType":"WEB_PAGE_TYPE_WATCH","rootVe":3832}},"watchEndpoint":{"videoId":"ECwP3HRP0Z4","params":"EAEYAdoBBAgBKgA%3D","playerParams":"QAFIAQ%3D%3D","watchEndpointSupportedPrefetchConfig":{"prefetchHintConfig":{"prefetchPriority":0,"countdownUiRelativeSecondsPrefetchCondition":-3}}}},{"clickTrackingParams":"CAAQg2ciEwizx5CUkYiSAxUiS3gAHR5SGjIyDHJlbGF0ZWQtYXV0b0jZubbq9-_ysKkBmgEFCAMQ-B3KAQT-i1BV","commandMetadata":{"webCommandMetadata":{"url":"/watch?v=ECwP3HRP0Z4\u0026pp=QAFIAQ%3D%3D","webPageType":"WEB_PAGE_TYPE_WATCH","rootVe":3832}},"watchEndpoint":{"videoId":"ECwP3HRP0Z4","params":"EAEYAdoBBAgBKgA%3D","playerParams":"QAFIAQ%3D%3D","watchEndpointSupportedPrefetchConfig":{"prefetchHintConfig":{"prefetchPriority":0,"countdownUiRelativeSecondsPrefetchCondition":-3}}}},{"clickTrackingParams":"CAAQg2ciEwizx5CUkYiSAxUiS3gAHR5SGjIyDHJlbGF0ZWQtYXV0b0jZubbq9-_ysKkBmgEFCAMQ-B3KAQT-i1BV","commandMetadata":{"webCommandMetadata":{"url":"/watch?v=ECwP3HRP0Z4\u0026pp=QAFIAQ%3D%3D","webPageType":"WEB_PAGE_TYPE_WATCH","rootVe":3832}},"watchEndpoint":{"videoId":"ECwP3HRP0Z4","params":"EAEYAdoBBAgBKgA%3D","playerParams":"QAFIAQ%3D%3D","watchEndpointSupportedPrefetchConfig":{"prefetchHintConfig":{"prefetchPriority":0,"countdownUiRelativeSecondsPrefetchCondition":-3}}}}]},"hasDecorated":true}},"contents":{"twoColumnWatchNextResults":{"results":{"results":{"contents":[{"videoPrimaryInfoRenderer":{"title":{"runs":[{"text":"01 (Keynote) Opaque Pointers Are Coming"}]},"viewCount":{"videoViewCountRenderer":{"viewCount":{"simpleText":"조회수 5,712회"},"shortViewCount":{"simpleText":"조회수 5.7천회"},"originalViewCount":"0"}},"videoActions":{"menuRenderer":{"items":[{"menuServiceItemRenderer":{"text":{"runs":[{"text":"신고"}]},"icon":{"iconType":"FLAG"},"serviceEndpoint":{"clickTrackingParams":"CMwCEMyrARgAIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","showEngagementPanelEndpoint":{"identifier":{"tag":"PAabuse_report"},"globalConfiguration":{"params":"qgdxCAESC3FXSExmMzFObk5rGmBFZ3R4VjBoTVpqTXhUbTVPYTBBQldBQjRCWklCTWdvd0VpNW9kSFJ3Y3pvdkwya3VlWFJwYldjdVkyOXRMM1pwTDNGWFNFeG1NekZPYms1ckwyUmxabUYxYkhRdWFuQm4%3D"},"engagementPanelPresentationConfigs":{"engagementPanelPopupPresentationConfig":{"popupType":"PANEL_POPUP_TYPE_DIALOG"}}}},"trackingParams":"CMwCEMyrARgAIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}}],"trackingParams":"CMwCEMyrARgAIhMIs8eQlJGIkgMVIkt4AB0eUhoy","topLevelButtons":[{"segmentedLikeDislikeButtonViewModel":{"likeButtonViewModel":{"likeButtonViewModel":{"toggleButtonViewModel":{"toggleButtonViewModel":{"defaultButtonViewModel":{"buttonViewModel":{"iconName":"LIKE","title":"97","onTap":{"serialCommand":{"commands":[{"logGestureCommand":{"gestureType":"GESTURE_EVENT_TYPE_LOG_GENERIC_CLICK","trackingParams":"CNcCEKVBIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}},{"innertubeCommand":{"clickTrackingParams":"CNcCEKVBIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"ignoreNavigation":true}},"modalEndpoint":{"modal":{"modalWithTitleAndButtonRenderer":{"title":{"simpleText":"동영상이 마음에 드시나요?"},"content":{"simpleText":"로그인하여 의견을 알려주세요."},"button":{"buttonRenderer":{"style":"STYLE_MONO_FILLED","size":"SIZE_DEFAULT","isDisabled":false,"text":{"simpleText":"로그인"},"navigationEndpoint":{"clickTrackingParams":"CNgCEPqGBCITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"url":"https://accounts.google.com/ServiceLogin?service=youtube\u0026uilel=3\u0026passive=true\u0026continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Dko\u0026hl=ko\u0026ec=66426","webPageType":"WEB_PAGE_TYPE_UNKNOWN","rootVe":83769}},"signInEndpoint":{"nextEndpoint":{"clickTrackingParams":"CNgCEPqGBCITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/like/like"}},"likeEndpoint":{"status":"LIKE","target":{"videoId":"qWHLf31NnNk"},"likeParams":"Cg0KC3FXSExmMzFObk5rIAAyDAiljpjLBhDUg6-DAw%3D%3D"}},"idamTag":"66426"}},"trackingParams":"CNgCEPqGBCITCLPHkJSRiJIDFSJLeAAdHlIaMg=="}}}}}}}]}},"accessibilityText":"다른 사용자 97명과 함께 이 동영상에 좋아요 표시","style":"BUTTON_VIEW_MODEL_STYLE_MONO","trackingParams":"CNcCEKVBIhMIs8eQlJGIkgMVIkt4AB0eUhoy","isFullWidth":false,"type":"BUTTON_VIEW_MODEL_TYPE_TONAL","buttonSize":"BUTTON_VIEW_MODEL_SIZE_DEFAULT","accessibilityId":"id.video.like.button","tooltip":"이 동영상이 마음에 듭니다."}},"toggledButtonViewModel":{"buttonViewModel":{"iconName":"LIKE","title":"98","onTap":{"serialCommand":{"commands":[{"logGestureCommand":{"gestureType":"GESTURE_EVENT_TYPE_LOG_GENERIC_CLICK","trackingParams":"CNYCEKVBIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}},{"innertubeCommand":{"clickTrackingParams":"CNYCEKVBIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/like/removelike"}},"likeEndpoint":{"status":"INDIFFERENT","target":{"videoId":"qWHLf31NnNk"},"removeLikeParams":"Cg0KC3FXSExmMzFObk5rGAAqDAiljpjLBhDq_rCDAw%3D%3D"}}}]}},"accessibilityText":"다른 사용자 97명과 함께 이 동영상에 좋아요 표시","style":"BUTTON_VIEW_MODEL_STYLE_MONO","trackingParams":"CNYCEKVBIhMIs8eQlJGIkgMVIkt4AB0eUhoy","isFullWidth":false,"type":"BUTTON_VIEW_MODEL_TYPE_TONAL","buttonSize":"BUTTON_VIEW_MODEL_SIZE_DEFAULT","accessibilityId":"id.video.like.button","tooltip":"좋아요 취소"}},"identifier":"watch-like","trackingParams":"CMwCEMyrARgAIhMIs8eQlJGIkgMVIkt4AB0eUhoy","isTogglingDisabled":true}},"likeStatusEntityKey":"EgtxV0hMZjMxTm5OayA-KAE%3D","likeStatusEntity":{"key":"EgtxV0hMZjMxTm5OayA-KAE%3D","likeStatus":"INDIFFERENT"}}},"dislikeButtonViewModel":{"dislikeButtonViewModel":{"toggleButtonViewModel":{"toggleButtonViewModel":{"defaultButtonViewModel":{"buttonViewModel":{"iconName":"DISLIKE","title":"싫어요","onTap":{"serialCommand":{"commands":[{"logGestureCommand":{"gestureType":"GESTURE_EVENT_TYPE_LOG_GENERIC_CLICK","trackingParams":"CNQCEKiPCSITCLPHkJSRiJIDFSJLeAAdHlIaMg=="}},{"innertubeCommand":{"clickTrackingParams":"CNQCEKiPCSITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"ignoreNavigation":true}},"modalEndpoint":{"modal":{"modalWithTitleAndButtonRenderer":{"title":{"simpleText":"동영상이 마음에 안 드시나요?"},"content":{"simpleText":"로그인하여 의견을 알려주세요."},"button":{"buttonRenderer":{"style":"STYLE_MONO_FILLED","size":"SIZE_DEFAULT","isDisabled":false,"text":{"simpleText":"로그인"},"navigationEndpoint":{"clickTrackingParams":"CNUCEPmGBCITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"url":"https://accounts.google.com/ServiceLogin?service=youtube\u0026uilel=3\u0026passive=true\u0026continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Dko\u0026hl=ko\u0026ec=66425","webPageType":"WEB_PAGE_TYPE_UNKNOWN","rootVe":83769}},"signInEndpoint":{"nextEndpoint":{"clickTrackingParams":"CNUCEPmGBCITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/like/dislike"}},"likeEndpoint":{"status":"DISLIKE","target":{"videoId":"qWHLf31NnNk"},"dislikeParams":"Cg0KC3FXSExmMzFObk5rEAAiDAiljpjLBhCK3LKDAw%3D%3D"}},"idamTag":"66425"}},"trackingParams":"CNUCEPmGBCITCLPHkJSRiJIDFSJLeAAdHlIaMg=="}}}}}}}]}},"accessibilityText":"동영상에 싫어요 표시","style":"BUTTON_VIEW_MODEL_STYLE_MONO","trackingParams":"CNQCEKiPCSITCLPHkJSRiJIDFSJLeAAdHlIaMg==","isFullWidth":false,"type":"BUTTON_VIEW_MODEL_TYPE_TONAL","buttonSize":"BUTTON_VIEW_MODEL_SIZE_DEFAULT","accessibilityId":"id.video.dislike.button","tooltip":"이 동영상이 마음에 들지 않습니다."}},"toggledButtonViewModel":{"buttonViewModel":{"iconName":"DISLIKE","title":"싫어요","onTap":{"serialCommand":{"commands":[{"logGestureCommand":{"gestureType":"GESTURE_EVENT_TYPE_LOG_GENERIC_CLICK","trackingParams":"CNMCEKiPCSITCLPHkJSRiJIDFSJLeAAdHlIaMg=="}},{"innertubeCommand":{"clickTrackingParams":"CNMCEKiPCSITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/like/removelike"}},"likeEndpoint":{"status":"INDIFFERENT","target":{"videoId":"qWHLf31NnNk"},"removeLikeParams":"Cg0KC3FXSExmMzFObk5rGAAqDAiljpjLBhDCkbODAw%3D%3D"}}}]}},"accessibilityText":"동영상에 싫어요 표시","style":"BUTTON_VIEW_MODEL_STYLE_MONO","trackingParams":"CNMCEKiPCSITCLPHkJSRiJIDFSJLeAAdHlIaMg==","isFullWidth":false,"type":"BUTTON_VIEW_MODEL_TYPE_TONAL","buttonSize":"BUTTON_VIEW_MODEL_SIZE_DEFAULT","accessibilityId":"id.video.dislike.button","tooltip":"이 동영상이 마음에 들지 않습니다."}},"trackingParams":"CMwCEMyrARgAIhMIs8eQlJGIkgMVIkt4AB0eUhoy","isTogglingDisabled":true}},"dislikeEntityKey":"EgtxV0hMZjMxTm5OayA-KAE%3D"}},"iconType":"LIKE_ICON_TYPE_UNKNOWN","likeCountEntity":{"key":"unset_like_count_entity_key"},"dynamicLikeCountUpdateData":{"updateStatusKey":"like_count_update_status_key","placeholderLikeCountValuesKey":"like_count_placeholder_values_key","updateDelayLoopId":"like_count_update_delay_loop_id","updateDelaySec":5},"teasersOrderEntityKey":"EgtxV0hMZjMxTm5OayD8AygB"}},{"buttonViewModel":{"iconName":"SHARE","title":"공유","onTap":{"serialCommand":{"commands":[{"logGestureCommand":{"gestureType":"GESTURE_EVENT_TYPE_LOG_GENERIC_CLICK","trackingParams":"CNECEOWWARgCIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}},{"innertubeCommand":{"clickTrackingParams":"CNECEOWWARgCIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/share/get_share_panel"}},"shareEntityServiceEndpoint":{"serializedShareEntity":"CgtxV0hMZjMxTm5Oa6ABAQ%3D%3D","commands":[{"clickTrackingParams":"CNECEOWWARgCIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","openPopupAction":{"popup":{"unifiedSharePanelRenderer":{"trackingParams":"CNICEI5iIhMIs8eQlJGIkgMVIkt4AB0eUhoy","showLoadingSpinner":true}},"popupType":"DIALOG","beReused":true}}]}}}]}},"accessibilityText":"공유","style":"BUTTON_VIEW_MODEL_STYLE_MONO","trackingParams":"CNECEOWWARgCIhMIs8eQlJGIkgMVIkt4AB0eUhoy","isFullWidth":false,"type":"BUTTON_VIEW_MODEL_TYPE_TONAL","buttonSize":"BUTTON_VIEW_MODEL_SIZE_DEFAULT","state":"BUTTON_VIEW_MODEL_STATE_ACTIVE","accessibilityId":"id.video.share.button","tooltip":"공유"}}],"accessibility":{"accessibilityData":{"label":"추가 작업"}},"flexibleItems":[{"menuFlexibleItemRenderer":{"menuItem":{"menuServiceItemRenderer":{"text":{"runs":[{"text":"저장"}]},"icon":{"iconType":"PLAYLIST_ADD"},"serviceEndpoint":{"clickTrackingParams":"CM8CEOuQCSITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"ignoreNavigation":true}},"modalEndpoint":{"modal":{"modalWithTitleAndButtonRenderer":{"title":{"runs":[{"text":"나중에 다시 보고 싶으신가요?"}]},"content":{"runs":[{"text":"로그인하여 동영상을 재생목록에 추가하세요."}]},"button":{"buttonRenderer":{"style":"STYLE_MONO_FILLED","size":"SIZE_DEFAULT","isDisabled":false,"text":{"simpleText":"로그인"},"navigationEndpoint":{"clickTrackingParams":"CNACEPuGBCITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"url":"https://accounts.google.com/ServiceLogin?service=youtube\u0026uilel=3\u0026passive=true\u0026continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Dko%26next%3D%252Fwatch%253Fv%253DqWHLf31NnNk\u0026hl=ko\u0026ec=66427","webPageType":"WEB_PAGE_TYPE_UNKNOWN","rootVe":83769}},"signInEndpoint":{"nextEndpoint":{"clickTrackingParams":"CNACEPuGBCITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"url":"/watch?v=qWHLf31NnNk","webPageType":"WEB_PAGE_TYPE_WATCH","rootVe":3832}},"watchEndpoint":{"videoId":"qWHLf31NnNk","watchEndpointSupportedOnesieConfig":{"html5PlaybackOnesieConfig":{"commonConfig":{"url":"https://rr4---sn-ab02a0nfpgxapox-jwwe7.googlevideo.com/initplayback?source=youtube\u0026oeis=1\u0026c=WEB\u0026oad=3200\u0026ovd=3200\u0026oaad=11000\u0026oavd=11000\u0026ocs=700\u0026oewis=1\u0026oputc=1\u0026ofpcc=1\u0026msp=1\u0026odepv=1\u0026id=a961cb7f7d4d9cd9\u0026ip=1.208.108.242\u0026initcwndbps=3623750\u0026mt=1768293891\u0026oweuc=\u0026pxtags=Cg4KAnR4Egg1MTY5MTAyNw\u0026rxtags=Cg4KAnR4Egg1MTY5MTAyNw%2CCg4KAnR4Egg1MTY5MTAyOA"}}}}},"idamTag":"66427"}},"trackingParams":"CNACEPuGBCITCLPHkJSRiJIDFSJLeAAdHlIaMg=="}}}}}},"trackingParams":"CM8CEOuQCSITCLPHkJSRiJIDFSJLeAAdHlIaMg=="}},"topLevelButton":{"buttonViewModel":{"iconName":"PLAYLIST_ADD","title":"저장","onTap":{"serialCommand":{"commands":[{"logGestureCommand":{"gestureType":"GESTURE_EVENT_TYPE_LOG_GENERIC_CLICK","trackingParams":"CM0CEOuQCSITCLPHkJSRiJIDFSJLeAAdHlIaMg=="}},{"innertubeCommand":{"clickTrackingParams":"CM0CEOuQCSITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"ignoreNavigation":true}},"modalEndpoint":{"modal":{"modalWithTitleAndButtonRenderer":{"title":{"runs":[{"text":"나중에 다시 보고 싶으신가요?"}]},"content":{"runs":[{"text":"로그인하여 동영상을 재생목록에 추가하세요."}]},"button":{"buttonRenderer":{"style":"STYLE_MONO_FILLED","size":"SIZE_DEFAULT","isDisabled":false,"text":{"simpleText":"로그인"},"navigationEndpoint":{"clickTrackingParams":"CM4CEPuGBCITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"url":"https://accounts.google.com/ServiceLogin?service=youtube\u0026uilel=3\u0026passive=true\u0026continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Dko%26next%3D%252Fwatch%253Fv%253DqWHLf31NnNk\u0026hl=ko\u0026ec=66427","webPageType":"WEB_PAGE_TYPE_UNKNOWN","rootVe":83769}},"signInEndpoint":{"nextEndpoint":{"clickTrackingParams":"CM4CEPuGBCITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"url":"/watch?v=qWHLf31NnNk","webPageType":"WEB_PAGE_TYPE_WATCH","rootVe":3832}},"watchEndpoint":{"videoId":"qWHLf31NnNk","watchEndpointSupportedOnesieConfig":{"html5PlaybackOnesieConfig":{"commonConfig":{"url":"https://rr4---sn-ab02a0nfpgxapox-jwwe7.googlevideo.com/initplayback?source=youtube\u0026oeis=1\u0026c=WEB\u0026oad=3200\u0026ovd=3200\u0026oaad=11000\u0026oavd=11000\u0026ocs=700\u0026oewis=1\u0026oputc=1\u0026ofpcc=1\u0026msp=1\u0026odepv=1\u0026id=a961cb7f7d4d9cd9\u0026ip=1.208.108.242\u0026initcwndbps=3623750\u0026mt=1768293891\u0026oweuc=\u0026pxtags=Cg4KAnR4Egg1MTY5MTAyNw\u0026rxtags=Cg4KAnR4Egg1MTY5MTAyNw%2CCg4KAnR4Egg1MTY5MTAyOA"}}}}},"idamTag":"66427"}},"trackingParams":"CM4CEPuGBCITCLPHkJSRiJIDFSJLeAAdHlIaMg=="}}}}}}}]}},"accessibilityText":"재생목록에 저장","style":"BUTTON_VIEW_MODEL_STYLE_MONO","trackingParams":"CM0CEOuQCSITCLPHkJSRiJIDFSJLeAAdHlIaMg==","isFullWidth":false,"type":"BUTTON_VIEW_MODEL_TYPE_TONAL","buttonSize":"BUTTON_VIEW_MODEL_SIZE_DEFAULT","tooltip":"저장"}}}}]}},"trackingParams":"CMwCEMyrARgAIhMIs8eQlJGIkgMVIkt4AB0eUhoy","dateText":{"simpleText":"2022. 5. 3."},"relativeDateText":{"accessibility":{"accessibilityData":{"label":"3년 전"}},"simpleText":"3년 전"}}},{"videoSecondaryInfoRenderer":{"owner":{"videoOwnerRenderer":{"thumbnail":{"thumbnails":[{"url":"https://yt3.ggpht.com/ytc/AIdro_knl3UgtOyqdzJnYqEN53hMS1wLc07mT52QEWLizQho0A=s48-c-k-c0x00ffffff-no-rj","width":48,"height":48},{"url":"https://yt3.ggpht.com/ytc/AIdro_knl3UgtOyqdzJnYqEN53hMS1wLc07mT52QEWLizQho0A=s88-c-k-c0x00ffffff-no-rj","width":88,"height":88},{"url":"https://yt3.ggpht.com/ytc/AIdro_knl3UgtOyqdzJnYqEN53hMS1wLc07mT52QEWLizQho0A=s176-c-k-c0x00ffffff-no-rj","width":176,"height":176}]},"title":{"runs":[{"text":"LLVM","navigationEndpoint":{"clickTrackingParams":"CMsCEOE5IhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"url":"/@LLVMPROJ","webPageType":"WEB_PAGE_TYPE_CHANNEL","rootVe":3611,"apiUrl":"/youtubei/v1/browse"}},"browseEndpoint":{"browseId":"UCv2_41bSAa5Y_8BacJUZfjQ","canonicalBaseUrl":"/@LLVMPROJ"}}}]},"subscriptionButton":{"type":"FREE"},"navigationEndpoint":{"clickTrackingParams":"CMsCEOE5IhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"url":"/@LLVMPROJ","webPageType":"WEB_PAGE_TYPE_CHANNEL","rootVe":3611,"apiUrl":"/youtubei/v1/browse"}},"browseEndpoint":{"browseId":"UCv2_41bSAa5Y_8BacJUZfjQ","canonicalBaseUrl":"/@LLVMPROJ"}},"subscriberCountText":{"accessibility":{"accessibilityData":{"label":"구독자 1.79만명"}},"simpleText":"구독자 1.79만명"},"trackingParams":"CMsCEOE5IhMIs8eQlJGIkgMVIkt4AB0eUhoy"}},"subscribeButton":{"subscribeButtonRenderer":{"buttonText":{"runs":[{"text":"구독"}]},"subscribed":false,"enabled":true,"type":"FREE","channelId":"UCv2_41bSAa5Y_8BacJUZfjQ","showPreferences":false,"subscribedButtonText":{"runs":[{"text":"구독중"}]},"unsubscribedButtonText":{"runs":[{"text":"구독"}]},"trackingParams":"CL0CEJsrIhMIs8eQlJGIkgMVIkt4AB0eUhoyKPgdMgV3YXRjaA==","unsubscribeButtonText":{"runs":[{"text":"구독 취소"}]},"subscribeAccessibility":{"accessibilityData":{"label":"LLVM을(를) 구독합니다."}},"unsubscribeAccessibility":{"accessibilityData":{"label":"LLVM을(를) 구독 취소합니다."}},"notificationPreferenceButton":{"subscriptionNotificationToggleButtonRenderer":{"states":[{"stateId":3,"nextStateId":3,"state":{"buttonRenderer":{"style":"STYLE_TEXT","size":"SIZE_DEFAULT","isDisabled":false,"icon":{"iconType":"NOTIFICATIONS_NONE"},"accessibility":{"label":"현재 설정은 맞춤설정 알림 수신입니다. LLVM 채널의 알림 설정을 변경하려면 탭하세요."},"trackingParams":"CMoCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy","accessibilityData":{"accessibilityData":{"label":"현재 설정은 맞춤설정 알림 수신입니다. LLVM 채널의 알림 설정을 변경하려면 탭하세요."}}}}},{"stateId":0,"nextStateId":0,"state":{"buttonRenderer":{"style":"STYLE_TEXT","size":"SIZE_DEFAULT","isDisabled":false,"icon":{"iconType":"NOTIFICATIONS_OFF"},"accessibility":{"label":"현재 설정은 알림 수신 안함입니다. LLVM 채널의 알림 설정을 변경하려면 탭하세요."},"trackingParams":"CMkCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy","accessibilityData":{"accessibilityData":{"label":"현재 설정은 알림 수신 안함입니다. LLVM 채널의 알림 설정을 변경하려면 탭하세요."}}}}}],"currentStateId":3,"trackingParams":"CMICEJf5ASITCLPHkJSRiJIDFSJLeAAdHlIaMg==","command":{"clickTrackingParams":"CMICEJf5ASITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandExecutorCommand":{"commands":[{"clickTrackingParams":"CMICEJf5ASITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","openPopupAction":{"popup":{"menuPopupRenderer":{"items":[{"menuServiceItemRenderer":{"text":{"simpleText":"맞춤설정"},"icon":{"iconType":"NOTIFICATIONS_NONE"},"serviceEndpoint":{"clickTrackingParams":"CMgCEOy1BBgDIhMIs8eQlJGIkgMVIkt4AB0eUhoyMhJQUkVGRVJFTkNFX0RFRkFVTFTKAQT-i1BV","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/notification/modify_channel_preference"}},"modifyChannelNotificationPreferenceEndpoint":{"params":"ChhVQ3YyXzQxYlNBYTVZXzhCYWNKVVpmalESAggBGAAgBFITCgIIAxILcVdITGYzMU5uTmsYAA%3D%3D"}},"trackingParams":"CMgCEOy1BBgDIhMIs8eQlJGIkgMVIkt4AB0eUhoy","isSelected":true}},{"menuServiceItemRenderer":{"text":{"simpleText":"없음"},"icon":{"iconType":"NOTIFICATIONS_OFF"},"serviceEndpoint":{"clickTrackingParams":"CMcCEO21BBgEIhMIs8eQlJGIkgMVIkt4AB0eUhoyMhtQUkVGRVJFTkNFX05PX05PVElGSUNBVElPTlPKAQT-i1BV","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/notification/modify_channel_preference"}},"modifyChannelNotificationPreferenceEndpoint":{"params":"ChhVQ3YyXzQxYlNBYTVZXzhCYWNKVVpmalESAggDGAAgBFITCgIIAxILcVdITGYzMU5uTmsYAA%3D%3D"}},"trackingParams":"CMcCEO21BBgEIhMIs8eQlJGIkgMVIkt4AB0eUhoy","isSelected":false}},{"menuServiceItemRenderer":{"text":{"runs":[{"text":"구독 취소"}]},"icon":{"iconType":"PERSON_MINUS"},"serviceEndpoint":{"clickTrackingParams":"CMMCENuLChgFIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true}},"signalServiceEndpoint":{"signal":"CLIENT_SIGNAL","actions":[{"clickTrackingParams":"CMMCENuLChgFIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","openPopupAction":{"popup":{"confirmDialogRenderer":{"trackingParams":"CMQCEMY4IhMIs8eQlJGIkgMVIkt4AB0eUhoy","dialogMessages":[{"runs":[{"text":"LLVM"},{"text":" 구독을 취소하시겠습니까?"}]}],"confirmButton":{"buttonRenderer":{"style":"STYLE_BLUE_TEXT","size":"SIZE_DEFAULT","isDisabled":false,"text":{"runs":[{"text":"구독 취소"}]},"serviceEndpoint":{"clickTrackingParams":"CMYCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyMgV3YXRjaMoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/subscription/unsubscribe"}},"unsubscribeEndpoint":{"channelIds":["UCv2_41bSAa5Y_8BacJUZfjQ"],"params":"CgIIAxILcVdITGYzMU5uTmsYAA%3D%3D"}},"accessibility":{"label":"구독 취소"},"trackingParams":"CMYCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}},"cancelButton":{"buttonRenderer":{"style":"STYLE_TEXT","size":"SIZE_DEFAULT","isDisabled":false,"text":{"runs":[{"text":"취소"}]},"accessibility":{"label":"취소"},"trackingParams":"CMUCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}},"primaryIsCancel":false}},"popupType":"DIALOG"}}]}},"trackingParams":"CMMCENuLChgFIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}}]}},"popupType":"DROPDOWN"}}]}},"targetId":"notification-bell","secondaryIcon":{"iconType":"EXPAND_MORE"}}},"targetId":"watch-subscribe","signInEndpoint":{"clickTrackingParams":"CL0CEJsrIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"ignoreNavigation":true}},"modalEndpoint":{"modal":{"modalWithTitleAndButtonRenderer":{"title":{"simpleText":"채널을 구독하시겠습니까?"},"content":{"simpleText":"채널을 구독하려면 로그인하세요."},"button":{"buttonRenderer":{"style":"STYLE_MONO_FILLED","size":"SIZE_DEFAULT","isDisabled":false,"text":{"simpleText":"로그인"},"navigationEndpoint":{"clickTrackingParams":"CMECEP2GBCITCLPHkJSRiJIDFSJLeAAdHlIaMjIJc3Vic2NyaWJlygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"url":"https://accounts.google.com/ServiceLogin?service=youtube\u0026uilel=3\u0026passive=true\u0026continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Dko%26next%3D%252Fwatch%253Fv%253DqWHLf31NnNk%26continue_action%3DQUFFLUhqbmx2OVFJMVFVQkpyZ1NHNktsSmpLeFJLVHlyd3xBQ3Jtc0ttZjhrMEJxZDdSQkVNS1BYclAyMGVHNmg2dHAzVmZjTklkSFNWRTJwRER2UThqMFNxTmE3MWctSGJrTVNhQ2M3Sy1aLTFqTzcxekRBUV9md0hUV09UcGE5RlRXdFhzS1VKREE5cUsyMmNXSHZ4dm10TTRWNi00VWVMTzhFR3JWWnBVc3JIVmNBRVQzazJBTmtWNXp6N2hOZmlYaGNQMF80TVhyQkh3dU90NU1ETWlyZVNsX0ZLV2NqMjdmbjZGa2pKUk11VGI\u0026hl=ko\u0026ec=66429","webPageType":"WEB_PAGE_TYPE_UNKNOWN","rootVe":83769}},"signInEndpoint":{"nextEndpoint":{"clickTrackingParams":"CMECEP2GBCITCLPHkJSRiJIDFSJLeAAdHlIaMsoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"url":"/watch?v=qWHLf31NnNk","webPageType":"WEB_PAGE_TYPE_WATCH","rootVe":3832}},"watchEndpoint":{"videoId":"qWHLf31NnNk","watchEndpointSupportedOnesieConfig":{"html5PlaybackOnesieConfig":{"commonConfig":{"url":"https://rr4---sn-ab02a0nfpgxapox-jwwe7.googlevideo.com/initplayback?source=youtube\u0026oeis=1\u0026c=WEB\u0026oad=3200\u0026ovd=3200\u0026oaad=11000\u0026oavd=11000\u0026ocs=700\u0026oewis=1\u0026oputc=1\u0026ofpcc=1\u0026msp=1\u0026odepv=1\u0026id=a961cb7f7d4d9cd9\u0026ip=1.208.108.242\u0026initcwndbps=3623750\u0026mt=1768293891\u0026oweuc=\u0026pxtags=Cg4KAnR4Egg1MTY5MTAyNw\u0026rxtags=Cg4KAnR4Egg1MTY5MTAyNw%2CCg4KAnR4Egg1MTY5MTAyOA"}}}}},"continueAction":"QUFFLUhqbmx2OVFJMVFVQkpyZ1NHNktsSmpLeFJLVHlyd3xBQ3Jtc0ttZjhrMEJxZDdSQkVNS1BYclAyMGVHNmg2dHAzVmZjTklkSFNWRTJwRER2UThqMFNxTmE3MWctSGJrTVNhQ2M3Sy1aLTFqTzcxekRBUV9md0hUV09UcGE5RlRXdFhzS1VKREE5cUsyMmNXSHZ4dm10TTRWNi00VWVMTzhFR3JWWnBVc3JIVmNBRVQzazJBTmtWNXp6N2hOZmlYaGNQMF80TVhyQkh3dU90NU1ETWlyZVNsX0ZLV2NqMjdmbjZGa2pKUk11VGI","idamTag":"66429"}},"trackingParams":"CMECEP2GBCITCLPHkJSRiJIDFSJLeAAdHlIaMg=="}}}}}},"subscribedEntityKey":"EhhVQ3YyXzQxYlNBYTVZXzhCYWNKVVpmalEgMygB","onSubscribeEndpoints":[{"clickTrackingParams":"CL0CEJsrIhMIs8eQlJGIkgMVIkt4AB0eUhoyKPgdMgV3YXRjaMoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/subscription/subscribe"}},"subscribeEndpoint":{"channelIds":["UCv2_41bSAa5Y_8BacJUZfjQ"],"params":"EgIIAxgAIgtxV0hMZjMxTm5Oaw%3D%3D"}}],"onUnsubscribeEndpoints":[{"clickTrackingParams":"CL0CEJsrIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true}},"signalServiceEndpoint":{"signal":"CLIENT_SIGNAL","actions":[{"clickTrackingParams":"CL0CEJsrIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","openPopupAction":{"popup":{"confirmDialogRenderer":{"trackingParams":"CL4CEMY4IhMIs8eQlJGIkgMVIkt4AB0eUhoy","dialogMessages":[{"runs":[{"text":"LLVM"},{"text":" 구독을 취소하시겠습니까?"}]}],"confirmButton":{"buttonRenderer":{"style":"STYLE_BLUE_TEXT","size":"SIZE_DEFAULT","isDisabled":false,"text":{"runs":[{"text":"구독 취소"}]},"serviceEndpoint":{"clickTrackingParams":"CMACEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyKPgdMgV3YXRjaMoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/subscription/unsubscribe"}},"unsubscribeEndpoint":{"channelIds":["UCv2_41bSAa5Y_8BacJUZfjQ"],"params":"CgIIAxILcVdITGYzMU5uTmsYAA%3D%3D"}},"accessibility":{"label":"구독 취소"},"trackingParams":"CMACEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}},"cancelButton":{"buttonRenderer":{"style":"STYLE_TEXT","size":"SIZE_DEFAULT","isDisabled":false,"text":{"runs":[{"text":"취소"}]},"accessibility":{"label":"취소"},"trackingParams":"CL8CEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}},"primaryIsCancel":false}},"popupType":"DIALOG"}}]}}]}},"metadataRowContainer":{"metadataRowContainerRenderer":{"collapsedItemCount":0,"trackingParams":"CLwCEM2rARgBIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}},"showMoreText":{"simpleText":"...더보기"},"showLessText":{"simpleText":"간략히"},"trackingParams":"CLwCEM2rARgBIhMIs8eQlJGIkgMVIkt4AB0eUhoy","defaultExpanded":false,"descriptionCollapsedLines":3,"showMoreCommand":{"clickTrackingParams":"CLwCEM2rARgBIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandExecutorCommand":{"commands":[{"clickTrackingParams":"CLwCEM2rARgBIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","changeEngagementPanelVisibilityAction":{"targetId":"engagement-panel-structured-description","visibility":"ENGAGEMENT_PANEL_VISIBILITY_EXPANDED"}},{"clickTrackingParams":"CLwCEM2rARgBIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","scrollToEngagementPanelCommand":{"targetId":"engagement-panel-structured-description"}}]}},"showLessCommand":{"clickTrackingParams":"CLwCEM2rARgBIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","changeEngagementPanelVisibilityAction":{"targetId":"engagement-panel-structured-description","visibility":"ENGAGEMENT_PANEL_VISIBILITY_HIDDEN"}},"attributedDescription":{"content":"Nikita Popov\nhttps://llvm.org/devmtg/2022-04-03/#k...\nLLVM is currently finalizing the migration from typed pointers (i32*) to opaque pointers (ptr) -- the likely largest intermediate representation change in LLVM's history. In this talk, we'll discuss the motivations for the change, how it will affect developers working on/with LLVM in practice, and why this migration took such a long time. We'll also briefly cover possible future IR changes based on opaque pointers.","commandRuns":[{"startIndex":13,"length":40,"onTap":{"innertubeCommand":{"clickTrackingParams":"CLwCEM2rARgBIhMIs8eQlJGIkgMVIkt4AB0eUhoySNm5tur37_KwqQHKAQT-i1BV","commandMetadata":{"webCommandMetadata":{"url":"https://www.youtube.com/redirect?event=video_description\u0026redir_token=QUFFLUhqbk5KR09jdHlWZHRvbEVZV3V3MW1SeW9CNGozZ3xBQ3Jtc0tscDg4QmIyd2RrQWE1bXdoYTF3VlVZWFZiR25HUTF3WGoycEo3WjBQVGxHajZHYS1WdThEamp2aXpUdGNfX0k3S2lrbktDMHpUb0tVMzJVLUpDamVKVGxmZ2dtM2tOeE9TOWtWdk9FSld2clhvU29xUQ\u0026q=https%3A%2F%2Fllvm.org%2Fdevmtg%2F2022-04-03%2F%23keynote\u0026v=qWHLf31NnNk","webPageType":"WEB_PAGE_TYPE_UNKNOWN","rootVe":83769}},"urlEndpoint":{"url":"https://www.youtube.com/redirect?event=video_description\u0026redir_token=QUFFLUhqbk5KR09jdHlWZHRvbEVZV3V3MW1SeW9CNGozZ3xBQ3Jtc0tscDg4QmIyd2RrQWE1bXdoYTF3VlVZWFZiR25HUTF3WGoycEo3WjBQVGxHajZHYS1WdThEamp2aXpUdGNfX0k3S2lrbktDMHpUb0tVMzJVLUpDamVKVGxmZ2dtM2tOeE9TOWtWdk9FSld2clhvU29xUQ\u0026q=https%3A%2F%2Fllvm.org%2Fdevmtg%2F2022-04-03%2F%23keynote\u0026v=qWHLf31NnNk","target":"TARGET_NEW_WINDOW","nofollow":true}}}}],"styleRuns":[{"startIndex":0,"length":13,"styleRunExtensions":{"styleRunColorMapExtension":{"colorMap":[{"key":"USER_INTERFACE_THEME_DARK","value":4294967295},{"key":"USER_INTERFACE_THEME_LIGHT","value":4279440147}]}},"fontFamilyName":"Roboto"},{"startIndex":13,"length":40,"styleRunExtensions":{"styleRunColorMapExtension":{"colorMap":[{"key":"USER_INTERFACE_THEME_DARK","value":4282296063},{"key":"USER_INTERFACE_THEME_LIGHT","value":4278607828}]}},"fontFamilyName":"Roboto"},{"startIndex":53,"length":419,"styleRunExtensions":{"styleRunColorMapExtension":{"colorMap":[{"key":"USER_INTERFACE_THEME_DARK","value":4294967295},{"key":"USER_INTERFACE_THEME_LIGHT","value":4279440147}]}},"fontFamilyName":"Roboto"}]},"headerRuns":[{"startIndex":0,"length":13,"headerMapping":"ATTRIBUTED_STRING_HEADER_MAPPING_UNSPECIFIED"},{"startIndex":13,"length":40,"headerMapping":"ATTRIBUTED_STRING_HEADER_MAPPING_UNSPECIFIED"},{"startIndex":53,"length":419,"headerMapping":"ATTRIBUTED_STRING_HEADER_MAPPING_UNSPECIFIED"}]}},{"compositeVideoPrimaryInfoRenderer":{}},{"itemSectionRenderer":{"contents":[{"continuationItemRenderer":{"trigger":"CONTINUATION_TRIGGER_ON_ITEM_SHOWN","continuationEndpoint":{"clickTrackingParams":"CLsCELsvGAMiEwizx5CUkYiSAxUiS3gAHR5SGjLKAQT-i1BV","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/next"}},"continuationCommand":{"token":"Eg0SC3FXSExmMzFObk5rGAYyJSIRIgtxV0hMZjMxTm5OazAAeAJCEGNvbW1lbnRzLXNlY3Rpb24%3D","request":"CONTINUATION_REQUEST_TYPE_WATCH_NEXT"}}}}],"trackingParams":"CLsCELsvGAMiEwizx5CUkYiSAxUiS3gAHR5SGjI=","sectionIdentifier":"comment-item-section","targetId":"comments-section"}}],"trackingParams":"CLoCELovIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}},"secondaryResults":{"secondaryResults":{"results":[{"lockupViewModel":{"contentImage":{"thumbnailViewModel":{"image":{"sources":[{"url":"https://i.ytimg.com/vi/ECwP3HRP0Z4/hqdefault.jpg?sqp=-oaymwE8CKgBEF5IWvKriqkDLwgBFQAAAAAYASUAAMhCPQCAokN4AfABAfgB_gmAAtAFigIMCAAQARgoICgofzAP\u0026rs=AOn4CLBK_Cv56sgkk0KFwAW3d2rak2qK1w","width":168,"height":94},{"url":"https://i.ytimg.com/vi/ECwP3HRP0Z4/hqdefault.jpg?sqp=-oaymwE9CNACELwBSFryq4qpAy8IARUAAAAAGAElAADIQj0AgKJDeAHwAQH4Af4JgALQBYoCDAgAEAEYKCAoKH8wDw==\u0026rs=AOn4CLDSJ0qUMhT-tzU4pm8KyDhPxTYW2g","width":336,"height":188}]},"overlays":[{"thumbnailOverlayBadgeViewModel":{"thumbnailBadges":[{"thumbnailBadgeViewModel":{"text":"29:10","badgeStyle":"THUMBNAIL_OVERLAY_BADGE_STYLE_DEFAULT","animationActivationTargetId":"ECwP3HRP0Z4","animationActivationEntityKey":"Eh8veW91dHViZS9hcHAvd2F0Y2gvcGxheWVyX3N0YXRlIMMCKAE%3D","lottieData":{"url":"https://www.gstatic.com/youtube/img/lottie/audio_indicator/audio_indicator_v2.json","settings":{"loop":true,"autoplay":true}},"animatedText":"지금 재생 중","animationActivationEntitySelectorType":"THUMBNAIL_BADGE_ANIMATION_ENTITY_SELECTOR_TYPE_PLAYER_STATE","rendererContext":{"accessibilityContext":{"label":"29분 10초"}}}}],"position":"THUMBNAIL_OVERLAY_BADGE_POSITION_BOTTOM_END"}},{"thumbnailHoverOverlayToggleActionsViewModel":{"buttons":[{"toggleButtonViewModel":{"defaultButtonViewModel":{"buttonViewModel":{"iconName":"WATCH_LATER","onTap":{"innertubeCommand":{"clickTrackingParams":"CLkCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/browse/edit_playlist"}},"playlistEditEndpoint":{"playlistId":"WL","actions":[{"addedVideoId":"ECwP3HRP0Z4","action":"ACTION_ADD_VIDEO"}]}}},"accessibilityText":"나중에 볼 동영상","style":"BUTTON_VIEW_MODEL_STYLE_OVERLAY_DARK","trackingParams":"CLkCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy","type":"BUTTON_VIEW_MODEL_TYPE_TONAL","buttonSize":"BUTTON_VIEW_MODEL_SIZE_COMPACT","state":"BUTTON_VIEW_MODEL_STATE_ACTIVE"}},"toggledButtonViewModel":{"buttonViewModel":{"iconName":"CHECK","onTap":{"innertubeCommand":{"clickTrackingParams":"CLgCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/browse/edit_playlist"}},"playlistEditEndpoint":{"playlistId":"WL","actions":[{"action":"ACTION_REMOVE_VIDEO_BY_VIDEO_ID","removedVideoId":"ECwP3HRP0Z4"}]}}},"accessibilityText":"추가됨","style":"BUTTON_VIEW_MODEL_STYLE_OVERLAY_DARK","trackingParams":"CLgCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy","type":"BUTTON_VIEW_MODEL_TYPE_TONAL","buttonSize":"BUTTON_VIEW_MODEL_SIZE_COMPACT","state":"BUTTON_VIEW_MODEL_STATE_ACTIVE"}},"isToggled":false,"trackingParams":"CLECENTEDBgAIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}},{"toggleButtonViewModel":{"defaultButtonViewModel":{"buttonViewModel":{"iconName":"ADD_TO_QUEUE_TAIL","onTap":{"innertubeCommand":{"clickTrackingParams":"CLcCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true}},"signalServiceEndpoint":{"signal":"CLIENT_SIGNAL","actions":[{"clickTrackingParams":"CLcCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","addToPlaylistCommand":{"openMiniplayer":false,"openListPanel":true,"videoId":"ECwP3HRP0Z4","listType":"PLAYLIST_EDIT_LIST_TYPE_QUEUE","onCreateListCommand":{"clickTrackingParams":"CLcCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/playlist/create"}},"createPlaylistServiceEndpoint":{"videoIds":["ECwP3HRP0Z4"],"params":"CAQ%3D"}},"videoIds":["ECwP3HRP0Z4"],"videoCommand":{"clickTrackingParams":"CLcCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"url":"/watch?v=ECwP3HRP0Z4","webPageType":"WEB_PAGE_TYPE_WATCH","rootVe":3832}},"watchEndpoint":{"videoId":"ECwP3HRP0Z4","watchEndpointSupportedOnesieConfig":{"html5PlaybackOnesieConfig":{"commonConfig":{"url":"https://rr4---sn-ab02a0nfpgxapox-bh2sd.googlevideo.com/initplayback?source=youtube\u0026oeis=1\u0026c=WEB\u0026oad=3200\u0026ovd=3200\u0026oaad=11000\u0026oavd=11000\u0026ocs=700\u0026oewis=1\u0026oputc=1\u0026ofpcc=1\u0026msp=1\u0026odepv=1\u0026id=102c0fdc744fd19e\u0026ip=1.208.108.242\u0026initcwndbps=3947500\u0026mt=1768293891\u0026oweuc=\u0026pxtags=Cg4KAnR4Egg1MTY5MTAyNw\u0026rxtags=Cg4KAnR4Egg1MTY5MTAyNw%2CCg4KAnR4Egg1MTY5MTAyOA"}}}}}}}]}}},"accessibilityText":"현재 재생목록에 추가","style":"BUTTON_VIEW_MODEL_STYLE_OVERLAY_DARK","trackingParams":"CLcCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy","type":"BUTTON_VIEW_MODEL_TYPE_TONAL","buttonSize":"BUTTON_VIEW_MODEL_SIZE_COMPACT","state":"BUTTON_VIEW_MODEL_STATE_ACTIVE"}},"toggledButtonViewModel":{"buttonViewModel":{"iconName":"CHECK","accessibilityText":"추가됨","style":"BUTTON_VIEW_MODEL_STYLE_OVERLAY_DARK","trackingParams":"CLYCEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy","type":"BUTTON_VIEW_MODEL_TYPE_TONAL","buttonSize":"BUTTON_VIEW_MODEL_SIZE_COMPACT","state":"BUTTON_VIEW_MODEL_STATE_ACTIVE"}},"isToggled":false,"trackingParams":"CLECENTEDBgAIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}}]}}]}},"metadata":{"lockupMetadataViewModel":{"title":{"content":"02 The Hot Path SSA Form in LLVM"},"image":{"decoratedAvatarViewModel":{"avatar":{"avatarViewModel":{"image":{"sources":[{"url":"https://yt3.ggpht.com/ytc/AIdro_knl3UgtOyqdzJnYqEN53hMS1wLc07mT52QEWLizQho0A=s68-c-k-c0x00ffffff-no-rj","width":68,"height":68}]},"avatarImageSize":"AVATAR_SIZE_M"}},"a11yLabel":"LLVM 채널로 이동","rendererContext":{"commandContext":{"onTap":{"innertubeCommand":{"clickTrackingParams":"CLECENTEDBgAIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"url":"/@LLVMPROJ","webPageType":"WEB_PAGE_TYPE_CHANNEL","rootVe":3611,"apiUrl":"/youtubei/v1/browse"}},"browseEndpoint":{"browseId":"UCv2_41bSAa5Y_8BacJUZfjQ","canonicalBaseUrl":"/@LLVMPROJ"}}}}}}},"metadata":{"contentMetadataViewModel":{"metadataRows":[{"metadataParts":[{"text":{"content":"LLVM"}}]},{"metadataParts":[{"text":{"content":"조회수 1.4천회"}},{"text":{"content":"3년 전"}}]}],"delimiter":" • "}},"menuButton":{"buttonViewModel":{"iconName":"MORE_VERT","onTap":{"innertubeCommand":{"clickTrackingParams":"CLICEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","showSheetCommand":{"panelLoadingStrategy":{"inlineContent":{"sheetViewModel":{"content":{"listViewModel":{"listItems":[{"listItemViewModel":{"title":{"content":"현재 재생목록에 추가"},"leadingImage":{"sources":[{"clientResource":{"imageName":"ADD_TO_QUEUE_TAIL"}}]},"rendererContext":{"loggingContext":{"loggingDirectives":{"trackingParams":"CLUCEP6YBBgAIhMIs8eQlJGIkgMVIkt4AB0eUhoy","visibility":{"types":"12"}}},"commandContext":{"onTap":{"innertubeCommand":{"clickTrackingParams":"CLUCEP6YBBgAIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true}},"signalServiceEndpoint":{"signal":"CLIENT_SIGNAL","actions":[{"clickTrackingParams":"CLUCEP6YBBgAIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","addToPlaylistCommand":{"openMiniplayer":true,"videoId":"ECwP3HRP0Z4","listType":"PLAYLIST_EDIT_LIST_TYPE_QUEUE","onCreateListCommand":{"clickTrackingParams":"CLUCEP6YBBgAIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/playlist/create"}},"createPlaylistServiceEndpoint":{"videoIds":["ECwP3HRP0Z4"],"params":"CAQ%3D"}},"videoIds":["ECwP3HRP0Z4"],"videoCommand":{"clickTrackingParams":"CLUCEP6YBBgAIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"url":"/watch?v=ECwP3HRP0Z4","webPageType":"WEB_PAGE_TYPE_WATCH","rootVe":3832}},"watchEndpoint":{"videoId":"ECwP3HRP0Z4","watchEndpointSupportedOnesieConfig":{"html5PlaybackOnesieConfig":{"commonConfig":{"url":"https://rr4---sn-ab02a0nfpgxapox-bh2sd.googlevideo.com/initplayback?source=youtube\u0026oeis=1\u0026c=WEB\u0026oad=3200\u0026ovd=3200\u0026oaad=11000\u0026oavd=11000\u0026ocs=700\u0026oewis=1\u0026oputc=1\u0026ofpcc=1\u0026msp=1\u0026odepv=1\u0026id=102c0fdc744fd19e\u0026ip=1.208.108.242\u0026initcwndbps=3947500\u0026mt=1768293891\u0026oweuc=\u0026pxtags=Cg4KAnR4Egg1MTY5MTAyNw\u0026rxtags=Cg4KAnR4Egg1MTY5MTAyNw%2CCg4KAnR4Egg1MTY5MTAyOA"}}}}}}}]}}}}}}},{"listItemViewModel":{"title":{"content":"재생목록에 저장"},"leadingImage":{"sources":[{"clientResource":{"imageName":"BOOKMARK_BORDER"}}]},"rendererContext":{"loggingContext":{"loggingDirectives":{"trackingParams":"CLQCEJSsCRgBIhMIs8eQlJGIkgMVIkt4AB0eUhoy","visibility":{"types":"12"}}},"commandContext":{"onTap":{"innertubeCommand":{"clickTrackingParams":"CLQCEJSsCRgBIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"url":"https://accounts.google.com/ServiceLogin?service=youtube\u0026uilel=3\u0026passive=true\u0026continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Dko\u0026hl=ko","webPageType":"WEB_PAGE_TYPE_UNKNOWN","rootVe":83769}},"signInEndpoint":{"nextEndpoint":{"clickTrackingParams":"CLQCEJSsCRgBIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","showSheetCommand":{"panelLoadingStrategy":{"requestTemplate":{"panelId":"PAadd_to_playlist","params":"-gYNCgtFQ3dQM0hSUDBaNA%3D%3D"}}}}}}}}}}},{"listItemViewModel":{"title":{"content":"공유"},"leadingImage":{"sources":[{"clientResource":{"imageName":"SHARE"}}]},"rendererContext":{"commandContext":{"onTap":{"innertubeCommand":{"clickTrackingParams":"CLICEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/share/get_share_panel"}},"shareEntityServiceEndpoint":{"serializedShareEntity":"CgtFQ3dQM0hSUDBaNA%3D%3D","commands":[{"clickTrackingParams":"CLICEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","openPopupAction":{"popup":{"unifiedSharePanelRenderer":{"trackingParams":"CLMCEI5iIhMIs8eQlJGIkgMVIkt4AB0eUhoy","showLoadingSpinner":true}},"popupType":"DIALOG","beReused":true}}]}}}}}}}]}}}}}}}},"accessibilityText":"추가 작업","style":"BUTTON_VIEW_MODEL_STYLE_MONO","trackingParams":"CLICEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy","type":"BUTTON_VIEW_MODEL_TYPE_TEXT","buttonSize":"BUTTON_VIEW_MODEL_SIZE_DEFAULT","state":"BUTTON_VIEW_MODEL_STATE_ACTIVE"}}}},"contentId":"ECwP3HRP0Z4","contentType":"LOCKUP_CONTENT_TYPE_VIDEO","rendererContext":{"loggingContext":{"loggingDirectives":{"trackingParams":"CLECENTEDBgAIhMIs8eQlJGIkgMVIkt4AB0eUhoy","visibility":{"types":"12"}}},"accessibilityContext":{"label":"02 The Hot Path SSA Form in LLVM 29분"},"commandContext":{"onTap":{"innertubeCommand":{"clickTrackingParams":"CLECENTEDBgAIhMIs8eQlJGIkgMVIkt4AB0eUhoyMgdyZWxhdGVkSNm5tur37_KwqQGaAQUIARD4HcoBBP6LUFU=","commandMetadata":{"webCommandMetadata":{"url":"/watch?v=ECwP3HRP0Z4","webPageType":"WEB_PAGE_TYPE_WATCH","rootVe":3832}},"watchEndpoint":{"videoId":"ECwP3HRP0Z4","nofollow":true,"watchEndpointSupportedOnesieConfig":{"html5PlaybackOnesieConfig":{"commonConfig":{"url":"https://rr4---sn-ab02a0nfpgxapox-bh2sd.googlevideo.com/initplayback?source=youtube\u0026oeis=1\u0026c=WEB\u0026oad=3200\u0026ovd=3200\u0026oaad=11000\u0026oavd=11000\u0026ocs=700\u0026oewis=1\u0026oputc=1\u0026ofpcc=1\u0026msp=1\u0026odepv=1\u0026id=102c0fdc744fd19e\u0026ip=1.208.108.242\u0026initcwndbps=3947500\u0026mt=1768293891\u0026oweuc=\u0026pxtags=Cg4KAnR4Egg1MTY5MTAyNw\u0026rxtags=Cg4KAnR4Egg1MTY5MTAyNw%2CCg4KAnR4Egg1MTY5MTAyOA"}}}}}}}}}},{"lockupViewModel":{"contentImage":{"thumbnailViewModel":{"image":{"sources":[{"url":"https://i.ytimg.com/vi/rp-N-8_hktk/hqdefault.jpg?sqp=-oaymwE8CKgBEF5IWvKriqkDLwgBFQAAAAAYASUAAMhCPQCAokN4AfABAfgB_gmAAtAFigIMCAAQARh_ICkoEzAP\u0026rs=AOn4CLCzMwtzu0S6paLIKcouzBhHbv2kow","width":168,"height":94},{"url":"https://i.ytimg.com/vi/rp-N-8_hktk/hqdefault.jpg?sqp=-oaymwE9CNACELwBSFryq4qpAy8IARUAAAAAGAElAADIQj0AgKJDeAHwAQH4Af4JgALQBYoCDAgAEAEYfyApKBMwDw==\u0026rs=AOn4CLB19kvIg8Sh5p5RuhxQ_a26C6EA2A","width":336,"height":188}]},"overlays":[{"thumbnailOverlayBadgeViewModel":{"thumbnailBadges":[{"thumbnailBadgeViewModel":{"text":"45:44","badgeStyle":"THUMBNAIL_OVERLAY_BADGE_STYLE_DEFAULT","animationActivationTargetId":"rp-N-8_hktk","animationActivationEntityKey":"Eh8veW91dHViZS9hcHAvd2F0Y2gvcGxheWVyX3N0YXRlIMMCKAE%3D","lottieData":{"url":"https://www.gstatic.com/youtube/img/lottie/audio_indicator/audio_indicator_v2.json","settings":{"loop":true,"autoplay":true}},"animatedText":"지금 재생 중","animationActivationEntitySelectorType":"THUMBNAIL_BADGE_ANIMATION_ENTITY_SELECTOR_TYPE_PLAYER_STATE","rendererContext":{"accessibilityContext":{"label":"45분 44초"}}}}],"position":"THUMBNAIL_OVERLAY_BADGE_POSITION_BOTTOM_END"}},{"thumbnailHoverOverlayToggleActionsViewModel":{"buttons":[{"toggleButtonViewModel":{"defaultButtonViewModel":{"buttonViewModel":{"iconName":"WATCH_LATER","onTap":{"innertubeCommand":{"clickTrackingParams":"CLACEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/browse/edit_playlist"}},"playlistEditEndpoint":{"playlistId":"WL","actions":[{"addedVideoId":"rp-N-8_hktk","action":"ACTION_ADD_VIDEO"}]}}},"accessibilityText":"나중에 볼 동영상","style":"BUTTON_VIEW_MODEL_STYLE_OVERLAY_DARK","trackingParams":"CLACEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy","type":"BUTTON_VIEW_MODEL_TYPE_TONAL","buttonSize":"BUTTON_VIEW_MODEL_SIZE_COMPACT","state":"BUTTON_VIEW_MODEL_STATE_ACTIVE"}},"toggledButtonViewModel":{"buttonViewModel":{"iconName":"CHECK","onTap":{"innertubeCommand":{"clickTrackingParams":"CK8CEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/browse/edit_playlist"}},"playlistEditEndpoint":{"playlistId":"WL","actions":[{"action":"ACTION_REMOVE_VIDEO_BY_VIDEO_ID","removedVideoId":"rp-N-8_hktk"}]}}},"accessibilityText":"추가됨","style":"BUTTON_VIEW_MODEL_STYLE_OVERLAY_DARK","trackingParams":"CK8CEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoy","type":"BUTTON_VIEW_MODEL_TYPE_TONAL","buttonSize":"BUTTON_VIEW_MODEL_SIZE_COMPACT","state":"BUTTON_VIEW_MODEL_STATE_ACTIVE"}},"isToggled":false,"trackingParams":"CKgCENTEDBgBIhMIs8eQlJGIkgMVIkt4AB0eUhoy"}},{"toggleButtonViewModel":{"defaultButtonViewModel":{"buttonViewModel":{"iconName":"ADD_TO_QUEUE_TAIL","onTap":{"innertubeCommand":{"clickTrackingParams":"CK4CEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true}},"signalServiceEndpoint":{"signal":"CLIENT_SIGNAL","actions":[{"clickTrackingParams":"CK4CEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","addToPlaylistCommand":{"openMiniplayer":false,"openListPanel":true,"videoId":"rp-N-8_hktk","listType":"PLAYLIST_EDIT_LIST_TYPE_QUEUE","onCreateListCommand":{"clickTrackingParams":"CK4CEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"sendPost":true,"apiUrl":"/youtubei/v1/playlist/create"}},"createPlaylistServiceEndpoint":{"videoIds":["rp-N-8_hktk"],"params":"CAQ%3D"}},"videoIds":["rp-N-8_hktk"],"videoCommand":{"clickTrackingParams":"CK4CEPBbIhMIs8eQlJGIkgMVIkt4AB0eUhoyygEE_otQVQ==","commandMetadata":{"webCommandMetadata":{"url":"/watch?v=rp-N-8_hktk","webPageType":"WEB_PAGE_TYPE_WATCH","rootVe":3832}},"watchEndpoint":{"videoId":"rp-N-8_hktk","watchEndpointSupportedOnesieConfig":{"html5PlaybackOnesieConfig":{"commonConfig":{"url":"https://rr4---sn-ab02a0nfpgxapox-bh2zk.googlevideo.com/initplayback?source=youtube\u0026oeis=1\u0026c=WEB\u0026oad=3200\u0026ovd=3200\u0026oaad=11000\u0026oavd=11000\u0026ocs=700\u0026oewis=1\u0026oputc=1\u0026ofpcc=1\u0026msp=1\u0026odepv=1\u0026id=ae9f8dfbcfe192d9\u0026ip=1.208.108.242\u0026initcwndbps=4163750\u0026mt=1768293891\u0026oweuc=\u0026pxtags=Cg4KAnR4Egg1MTY5MTAyNw\u0026rxtags=Cg4KAnR4Egg1MTY5MTAyNw%2CCg4KAnR4Egg1MTY5MTAyOA"}}}}}}}]}}},"accessibility
2026-01-13T08:49:45
https://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/amp/#top
Implementing a web server in a single printf() call – Tinyhack.com Tinyhack.com Implementing a web server in a single printf() call admin 12 years ago A guy just forwarded a joke that most of us will already know Jeff Dean Facts (also here and here ). Everytime I read that list, this part stands out: Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don’t understand exactly how it works. Today that program is the front-end to Google Search. It is really possible to implement a web server using a single printf call, but I haven’t found anyone doing it. So this time after reading the list, I decided to implement it. So here is the code, a pure single printf call, without any extra variables or macros (don’t worry, I will explain how to this code works) #include &lt;stdio.h&gt; int main(int argc, char *argv[]) { printf("%*c%hn%*c%hn" "\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32" "\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d" "\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74" "\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65" "\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f" "\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89" "\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f" "\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff" "\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49" "\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31" "\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c" "\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2" "\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f" "\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee" "\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff" "\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05" "\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3", ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 + 2, (((unsigned long int)0x4005c8 + 12) &amp; 0xffff)- ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 ); } This code only works on a Linux AMD64 bit system, with a particular compiler (gcc version 4.8.2 (Debian 4.8.2-16) ) And to compile it: gcc -g web1.c -O webserver As some of you may have guessed: I cheated by using a special format string . That code may not run on your machine because I have hardcoded two addresses. The following version is a little bit more user friendly (easier to change), but you are still going to need to change 2 values: FUNCTION_ADDR and DESTADDR which I will explain later: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) #define DESTADDR 0x00000000006007D8 #define a (FUNCTION_ADDR &amp; 0xffff) #define b ((FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff) int main(int argc, char *argv[]) { printf("%*c%hn%*c%hn" "\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32" "\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d" "\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74" "\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65" "\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f" "\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89" "\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f" "\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff" "\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49" "\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31" "\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c" "\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2" "\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f" "\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee" "\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff" "\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05" "\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3" , b, 0, DESTADDR + 2, a-b, 0, DESTADDR ); } I will explain how the code works through a series of short C codes. The first one is a code that will explain how that we can start another code without function call. See this simple code: #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #define ADDR 0x00000000600720 void hello() { printf("hello world\n"); } int main(int argc, char *argv[]) { (*((unsigned long int*)ADDR))= (unsigned long int)hello; } You can compile it, but it many not run on your system. You need to do these steps: 1. Compile the code: gcc run-finalizer.c -o run-finalizer 2. Examine the address of fini_array objdump -h -j .fini_array run-finalizer And find the VMA of it: run-finalizer: file format elf64-x86-64 Sections: Idx Name Size VMA LMA File off Algn 18 .fini_array 00000008 0000000000600720 0000000000600720 00000720 2**3 CONTENTS, ALLOC, LOAD, DATA Note that you need a recent GCC to do this, older version of gcc uses different mechanism of storing finalizers. 3. Change the value of ADDR on the code to the correct address 4. Compile the code again 5. Run it and now you will see “hello world” printed to your screen. How does this work exactly?: According to Chapter 11 of Linux Standard Base Core Specification 3.1 .fini_array This section holds an array of function pointers that contributes to a single termination array for the executable or shared object containing the section. We are overwriting the array so that our hello function is called instead of the default handler. If you are trying to compile the webserver code, the value of ADDR is obtained the same way (using objdump). Ok, now we know how to execute a function by overriding a certain address, we need to know how we can overwrite an address using printf . You can find many tutorials on how to exploit format string bugs, but I will try give a short explanation. The printf function has this feature that enables us to know how many characters has been printed using the “%n” format: #include &lt;stdio.h&gt; int main(){ int count; printf("AB%n", &amp;count); printf("\n%d characters printed\n", count); } You will see that the output is: AB 2 characters printed Of course we can put any address to the count pointer to overwrite that address. But to overide an address with a large value we need to print a large amount of text. Fortunately there is another format string “%hn” that works on short instead of int. We can overwrite the value 2 bytes at a time to form the 4 byte value that we want. Lets try to use two printf calls to put a¡ value that we want (in this case the pointer to function “hello”) to the fini_array: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)hello) #define DESTADDR 0x0000000000600948 void hello() { printf("\n\n\n\nhello world\n\n"); } int main(int argc, char *argv[]) { short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf("a = %04x b = %04x\n", a, b) uint64_t *p = (uint64_t*)DESTADDR; printf("before: %08lx\n", *p); printf("%*c%hn", b, 0, DESTADDR + 2 ); printf("after1: %08lx\n", *p); printf("%*c%hn", a, 0, DESTADDR); printf("after2: %08lx\n", *p); return 0; } The important lines are: short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf("%*c%hn", b, 0, DESTADDR + 2 ); printf("%*c%hn", a, 0, DESTADDR); The a and b are just halves of the function address, we can construct a string of length a and b to be given to printf, but I chose to use the “%*” formatting which will control the length of the output through parameter. For example, this code: printf("%*c", 10, 'A'); Will print 9 spaces followed by A, so in total, 10 characters will be printed. If we want to use just one printf, we need to take account that b bytes have been printed, and we need to print another b-a bytes (the counter is accumulative). printf("%*c%hn%*c%hn", b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); Currently we are using the “hello” function to call, but we can call any function (or any address). I have written a shellcode that acts as a web server that just prints “Hello world”. This is the shell code that I made: unsigned char hello[] = "\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32" "\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d" "\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74" "\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65" "\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f" "\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89" "\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f" "\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff" "\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49" "\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31" "\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c" "\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2" "\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f" "\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee" "\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff" "\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05" "\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3"; If we remove the function hello and insert that shell code, that code will be called. That code is just a string, so we can append it to the “%*c%hn%*c%hn” format string. This string is unnamed, so we will need to find the address after we compile it. To obtain the address, we need to compile the code, then disassemble it: objdump -d webserver 00000000004004fd &lt;main&gt;: 4004fd: 55 push %rbp 4004fe: 48 89 e5 mov %rsp,%rbp 400501: 48 83 ec 20 sub $0x20,%rsp 400505: 89 7d fc mov %edi,-0x4(%rbp) 400508: 48 89 75 f0 mov %rsi,-0x10(%rbp) 40050c: c7 04 24 d8 07 60 00 movl $0x6007d8,(%rsp) 400513: 41 b9 00 00 00 00 mov $0x0,%r9d 400519: 41 b8 94 05 00 00 mov $0x594,%r8d 40051f: b9 da 07 60 00 mov $0x6007da,%ecx 400524: ba 00 00 00 00 mov $0x0,%edx 400529: be 40 00 00 00 mov $0x40,%esi 40052e: bf c8 05 40 00 mov $0x4005c8,%edi 400533: b8 00 00 00 00 mov $0x0,%eax 400538: e8 a3 fe ff ff callq 4003e0 &lt;printf@plt&gt; 40053d: c9 leaveq 40053e: c3 retq 40053f: 90 nop We only need to care about this line: mov $0x4005c8,%edi That is the address that we need in: #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) The +12 is needed because our shell code starts after the string “%*c%hn%*c%hn” which is 12 characters long. If you are curious about the shell code, it was created from the following C code. #include&lt;stdio.h&gt; #include&lt;string.h&gt; #include&lt;stdlib.h&gt; #include&lt;unistd.h&gt; #include&lt;sys/types.h&gt; #include&lt;sys/stat.h&gt; #include&lt;sys/socket.h&gt; #include&lt;arpa/inet.h&gt; #include&lt;netdb.h&gt; #include&lt;signal.h&gt; #include&lt;fcntl.h&gt; int main(int argc, char *argv[]) { int sockfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in serv_addr; bzero((char *)&amp;serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(8080); bind(sockfd, (struct sockaddr *)&amp;serv_addr, sizeof(serv_addr)); listen(sockfd, 5); while (1) { int cfd = accept(sockfd, 0, 0); char *s = "HTTP/1.0 200\r\nContent-type:text/html\r\n\r\n&lt;h1&gt;Hello world!&lt;/h1&gt;"; if (fork()==0) { write(cfd, s, strlen(s)); shutdown(cfd, SHUT_RDWR); close(cfd); } } return 0; } I have done an extra effort (although it is not really necessary in this case) to remove all NUL character from the shell code (since I couldn’t find one for X86-64 in the Shellcodes database ). Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don’t understand exactly how it works. Today that program is the front-end to Google Search . It is left as an exercise for the reader to scale the web server to able to handle Google search load. Source codes for this post is available at https://github.com/yohanes/printf-webserver For people who thinks that this is useless: yes it is useless. I just happen to like this challenge, and it has refreshed my memory and knowledge for the following topics: shell code writing (haven’t done this in years), AMD64 assembly (calling convention, preserved registers, etc), syscalls, objdump, fini_array (last time I checked, gcc still used .dtors), printf format exploiting, gdb tricks (like writing memory block to file), and low level socket code (I have been using boost’s for the past few years). Update : Ubuntu adds a security feature that provides a read-only relocation table area in the final ELF. To be able to run the examples in ubuntu, add this in the command line when compiling -Wl,-z,norelro e.g: gcc -Wl,-z,norelro test.c Categories: hacks Leave a Comment Tinyhack.com Back to top Exit mobile version
2026-01-13T08:49:45
https://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/?noamp=mobile
Implementing a web server in a single printf() call &#8211; Tinyhack.com --> Skip to content Tinyhack.com A hacker does for love what others would not do for money. Implementing a web server in a single printf() call A guy just forwarded a joke that most of us will already know Jeff Dean Facts (also here and here ). Everytime I read that list, this part stands out: Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search. It is really possible to implement a web server using a single printf call, but I haven&#8217;t found anyone doing it. So this time after reading the list, I decided to implement it. So here is the code, a pure single printf call, without any extra variables or macros (don&#8217;t worry, I will explain how to this code works) #include &lt;stdio.h&gt; int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot;, ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 + 2, (((unsigned long int)0x4005c8 + 12) &amp; 0xffff)- ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 ); } This code only works on a Linux AMD64 bit system, with a particular compiler (gcc version 4.8.2 (Debian 4.8.2-16) ) And to compile it: gcc -g web1.c -O webserver As some of you may have guessed: I cheated by using a special format string . That code may not run on your machine because I have hardcoded two addresses. The following version is a little bit more user friendly (easier to change), but you are still going to need to change 2 values: FUNCTION_ADDR and DESTADDR which I will explain later: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) #define DESTADDR 0x00000000006007D8 #define a (FUNCTION_ADDR &amp; 0xffff) #define b ((FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff) int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot; , b, 0, DESTADDR + 2, a-b, 0, DESTADDR ); } I will explain how the code works through a series of short C codes. The first one is a code that will explain how that we can start another code without function call. See this simple code: #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #define ADDR 0x00000000600720 void hello() { printf(&quot;hello world\n&quot;); } int main(int argc, char *argv&#x5B;]) { (*((unsigned long int*)ADDR))= (unsigned long int)hello; } You can compile it, but it many not run on your system. You need to do these steps: 1. Compile the code: gcc run-finalizer.c -o run-finalizer 2. Examine the address of fini_array objdump -h -j .fini_array run-finalizer And find the VMA of it: run-finalizer: file format elf64-x86-64 Sections: Idx Name Size VMA LMA File off Algn 18 .fini_array 00000008 0000000000600720 0000000000600720 00000720 2**3 CONTENTS, ALLOC, LOAD, DATA Note that you need a recent GCC to do this, older version of gcc uses different mechanism of storing finalizers. 3. Change the value of ADDR on the code to the correct address 4. Compile the code again 5. Run it and now you will see &#8220;hello world&#8221; printed to your screen. How does this work exactly?: According to Chapter 11 of Linux Standard Base Core Specification 3.1 .fini_array This section holds an array of function pointers that contributes to a single termination array for the executable or shared object containing the section. We are overwriting the array so that our hello function is called instead of the default handler. If you are trying to compile the webserver code, the value of ADDR is obtained the same way (using objdump). Ok, now we know how to execute a function by overriding a certain address, we need to know how we can overwrite an address using printf . You can find many tutorials on how to exploit format string bugs, but I will try give a short explanation. The printf function has this feature that enables us to know how many characters has been printed using the &#8220;%n&#8221; format: #include &lt;stdio.h&gt; int main(){ int count; printf(&quot;AB%n&quot;, &amp;count); printf(&quot;\n%d characters printed\n&quot;, count); } You will see that the output is: AB 2 characters printed Of course we can put any address to the count pointer to overwrite that address. But to overide an address with a large value we need to print a large amount of text. Fortunately there is another format string &#8220;%hn&#8221; that works on short instead of int. We can overwrite the value 2 bytes at a time to form the 4 byte value that we want. Lets try to use two printf calls to put a¡ value that we want (in this case the pointer to function &#8220;hello&#8221;) to the fini_array: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)hello) #define DESTADDR 0x0000000000600948 void hello() { printf(&quot;\n\n\n\nhello world\n\n&quot;); } int main(int argc, char *argv&#x5B;]) { short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;a = %04x b = %04x\n&quot;, a, b) uint64_t *p = (uint64_t*)DESTADDR; printf(&quot;before: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;after1: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); printf(&quot;after2: %08lx\n&quot;, *p); return 0; } The important lines are: short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); The a and b are just halves of the function address, we can construct a string of length a and b to be given to printf, but I chose to use the &#8220;%*&#8221; formatting which will control the length of the output through parameter. For example, this code: printf("%*c", 10, 'A'); Will print 9 spaces followed by A, so in total, 10 characters will be printed. If we want to use just one printf, we need to take account that b bytes have been printed, and we need to print another b-a bytes (the counter is accumulative). printf("%*c%hn%*c%hn", b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); Currently we are using the &#8220;hello&#8221; function to call, but we can call any function (or any address). I have written a shellcode that acts as a web server that just prints &#8220;Hello world&#8221;. This is the shell code that I made: unsigned char hello&#x5B;] = "\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32" "\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d" "\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74" "\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65" "\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f" "\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89" "\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f" "\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff" "\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49" "\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31" "\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c" "\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2" "\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f" "\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee" "\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff" "\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05" "\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3"; If we remove the function hello and insert that shell code, that code will be called. That code is just a string, so we can append it to the &#8220;%*c%hn%*c%hn&#8221; format string. This string is unnamed, so we will need to find the address after we compile it. To obtain the address, we need to compile the code, then disassemble it: objdump -d webserver 00000000004004fd &lt;main&gt;: 4004fd: 55 push %rbp 4004fe: 48 89 e5 mov %rsp,%rbp 400501: 48 83 ec 20 sub $0x20,%rsp 400505: 89 7d fc mov %edi,-0x4(%rbp) 400508: 48 89 75 f0 mov %rsi,-0x10(%rbp) 40050c: c7 04 24 d8 07 60 00 movl $0x6007d8,(%rsp) 400513: 41 b9 00 00 00 00 mov $0x0,%r9d 400519: 41 b8 94 05 00 00 mov $0x594,%r8d 40051f: b9 da 07 60 00 mov $0x6007da,%ecx 400524: ba 00 00 00 00 mov $0x0,%edx 400529: be 40 00 00 00 mov $0x40,%esi 40052e: bf c8 05 40 00 mov $0x4005c8,%edi 400533: b8 00 00 00 00 mov $0x0,%eax 400538: e8 a3 fe ff ff callq 4003e0 &lt;printf@plt&gt; 40053d: c9 leaveq 40053e: c3 retq 40053f: 90 nop We only need to care about this line: mov $0x4005c8,%edi That is the address that we need in: #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) The +12 is needed because our shell code starts after the string &#8220;%*c%hn%*c%hn&#8221; which is 12 characters long. If you are curious about the shell code, it was created from the following C code. #include&lt;stdio.h&gt; #include&lt;string.h&gt; #include&lt;stdlib.h&gt; #include&lt;unistd.h&gt; #include&lt;sys/types.h&gt; #include&lt;sys/stat.h&gt; #include&lt;sys/socket.h&gt; #include&lt;arpa/inet.h&gt; #include&lt;netdb.h&gt; #include&lt;signal.h&gt; #include&lt;fcntl.h&gt; int main(int argc, char *argv&#x5B;]) { int sockfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in serv_addr; bzero((char *)&amp;serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(8080); bind(sockfd, (struct sockaddr *)&amp;serv_addr, sizeof(serv_addr)); listen(sockfd, 5); while (1) { int cfd = accept(sockfd, 0, 0); char *s = &quot;HTTP/1.0 200\r\nContent-type:text/html\r\n\r\n&lt;h1&gt;Hello world!&lt;/h1&gt;&quot;; if (fork()==0) { write(cfd, s, strlen(s)); shutdown(cfd, SHUT_RDWR); close(cfd); } } return 0; } I have done an extra effort (although it is not really necessary in this case) to remove all NUL character from the shell code (since I couldn&#8217;t find one for X86-64 in the Shellcodes database ). Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search . It is left as an exercise for the reader to scale the web server to able to handle Google search load. Source codes for this post is available at https://github.com/yohanes/printf-webserver For people who thinks that this is useless: yes it is useless. I just happen to like this challenge, and it has refreshed my memory and knowledge for the following topics: shell code writing (haven&#8217;t done this in years), AMD64 assembly (calling convention, preserved registers, etc), syscalls, objdump, fini_array (last time I checked, gcc still used .dtors), printf format exploiting, gdb tricks (like writing memory block to file), and low level socket code (I have been using boost&#8217;s for the past few years). Update : Ubuntu adds a security feature that provides a read-only relocation table area in the final ELF. To be able to run the examples in ubuntu, add this in the command line when compiling -Wl,-z,norelro e.g: gcc -Wl,-z,norelro test.c Author admin Posted on March 12, 2014 April 28, 2017 Categories hacks 18 thoughts on &ldquo;Implementing a web server in a single printf() call&rdquo; dodi says: March 12, 2014 at 2:04 pm eh buset, serius nih lu ? 🙂 Reply priyo says: March 13, 2014 at 5:07 am scroll up&#8230; scroll down&#8230; scroll up&#8230; scroll down&#8230; 100x *gagal paham* Reply terminalcommand says: March 13, 2014 at 5:19 am Thank you! Very interesting article. I also didn&#8217;t know about the one line webserver at google. Although this is a hard topic, you&#8217;ve made a great work simplifying it. Reply Basun says: March 13, 2014 at 10:02 am The one line webserver bit is a joke about Jeff Dean, who works at Google. Its not real. 🙂 Reply Cees Timmerman says: April 20, 2016 at 4:12 pm There are real webserver oneliners: https://gist.github.com/willurd/5720255 Reply anonim says: March 13, 2014 at 5:29 am Diskusinya di https://news.ycombinator.com/item?id=7389623 Reply Neil says: March 13, 2014 at 12:38 pm Shouldn&#8217;t there be an exit() somewhere in the fork==0 branch? Otherwise every time there is a request the new child process will become a server too and start accepting requests, right? I think the parent leaks its copy of the file descriptor too. Maybe the fork is a bit redundant. I don&#8217;t think the write or close will block with such a small amount of data. Cool post though! I&#8217;m not really sure why I&#8217;m nitpicking in the shell code. Sorry. Reply admin says: March 14, 2014 at 1:58 am Ah yes, there is an exit from the loop on the assembly code (myhttp.s) but it got removed from http.c when I removed the comment and debug code. And you are also right about the fork, it is unnecessary in this case. At first I was going to write the HTTP headers and then exec some external command. I changed my mind and didn&#8217;t bother deleting the fork call. Reply Kyle Ross says: March 13, 2014 at 11:02 pm This is really interesting, but I&#8217;m having trouble following whats actually happening. Could you explain how you reduced that C code with includes and methods into a string containing hex codes and how that is turned back into some sort of executable code? Thanks Reply admin says: March 14, 2014 at 2:01 am I think it is beyond the scope of this article to explain about shell code writing. There are many books and tutorials that you can read (just search for &#8220;buffer overflow&#8221; or &#8220;shell code writing&#8221;). Reply TTK Ciar says: March 14, 2014 at 1:05 am Alternatively: $ perl -Mojo -E &#8216;a({inline =&gt; &#8220;%= `uptime`&#8221;})-&gt;start&#8217; daemon &amp; Server available at http://127.0.0.1:3000 . $ lynx -dump -nolist http://127.0.0.1:3000/ 17:57:56 up 66 days, 6:45, 108 users, load average: 0.10, 0.12, 0.07 though, perl by definition is cheating. Reply Evan Danaher says: March 14, 2014 at 2:54 pm I&#8217;m not sure why you used finalizers instead of just changing the return address on the stack; this may be the first time I&#8217;ve ever said this, but stack smashing is much more portable. I&#8217;ve made a variant that I&#8217;d expect to work on any gcc 4.4-4.7 on x86_64 Linux, and have some ideas which, if they work out, may make it actually &#8220;portable&#8221; to any x86/x86_64 Unix running a reasonable compiler. https://github.com/edanaher/printf-webserver Reply admin says: March 17, 2014 at 3:02 pm Yes using the stack is also possible, but on most modern system, GCC is compiled with stack protection turned on (and needs to be disabled using -fno-stack-protector). Reply Pingback: Implementing a web server in a single printf() call &laquo; adafruit industries blog Itzik Kotler says: March 15, 2014 at 4:35 pm Pretty neat. I did something similar (all though simpler) back in the days. See: http://www.exploit-db.com/papers/13233/ Reply Pingback: Saving the world, one cpu cycle at a time | Dav&#039;s bit o the web programath says: April 22, 2014 at 1:18 pm printf(&#8220;%*c%hn%*c%hn&#8221;, b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; i think the fourth parameter should be &#8216;a-b&#8217;, not &#8216;b-a&#8217;, because a == b + (a &#8211; b) Reply Pingback: New top story on Hacker News: Implementing a web server in a single printf call (2014) &#8211; Latest news Leave a Reply Cancel reply Your email address will not be published. Required fields are marked * Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. &#916; Post navigation Previous Previous post: Raspberry Pi for Out of Band Linux PC management Next Next post: Exploiting the Futex Bug and uncovering Towelroot Pages About Archive Search for: Search Follow x.com/yohanes Mastodon Recent Posts CVE-2025-31931 Arbitrary Shared Library Loading in Intel ITT API on Android (affects OpenCV &lt;= 4.10) Decrypting Encrypted files from Akira Ransomware (Linux/ESXI variant 2024) using a bunch of GPUs Patching .so files of an installed Android App Extracting WhatsApp Database (or any app data) from Android 12/13 using CVE-2024-0044 Zygisk-based reFlutter Recent Comments Eitan Porat on About admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 Archives November 2025 March 2025 November 2024 June 2024 April 2024 January 2024 December 2023 September 2022 March 2021 January 2021 May 2019 January 2019 November 2018 July 2018 May 2018 February 2018 October 2017 September 2017 March 2017 November 2016 November 2015 July 2014 March 2014 February 2014 June 2013 January 2013 November 2011 March 2011 February 2011 July 2010 April 2010 January 2010 December 2009 September 2009 August 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 March 2008 February 2008 October 2007 June 2007 February 2007 January 2007 December 2006 Categories agestar android blog ctf debian flareon flex freebsd google hacks hardware hostmonster linux mac os x misc mobile opensource phone raspberry reverse-engineering sdr security Uncategorized wii writeup Meta Log in Entries feed Comments feed WordPress.org Tinyhack.com Proudly powered by WordPress
2026-01-13T08:49:45
https://dev.to/this-is-angular
This is Angular - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Follow Organization actions This is Angular Free, open and honest Angular education. Inclusive Angular publication free from conflict of interest. This publication is all about sharing Angular knowledge for free and not at all about money or KPIs. Cross-posts are welcome. Part of This is Learning. Location Worldwide Joined Joined on  Nov 15, 2020 Twitter logo GitHub logo External link icon Support email thisislearning@outlook.com Meet the team See All Members Our story An open community for content creators in the Angular ecosystem. Anyone can join, anyone can publish. Join to cross-post your content for better discoverability or publish unique pieces with our community of writers and readers. Join our private Discord server to get technical and literary feedback on your content, participate in community tech contributions, or train your content creation skills through advice and mentoring. Together we can. Our stack - Angular - Nx Post 646 posts published Member 76 members Angular Addicts #45: Signal Form guides, AI integrations &amp; more Gergely Szerovay Gergely Szerovay Gergely Szerovay Follow Jan 13 Angular Addicts #45: Signal Form guides, AI integrations &amp; more # angular # typescript # javascript 1  reaction Comments Add Comment 4 min read Ng-News 26/01: Ng-Poland Outtakes - Keynote and Q&amp;A ng-news ng-news ng-news Follow Jan 12 Ng-News 26/01: Ng-Poland Outtakes - Keynote and Q&amp;A # webdev # programming # angular # frontend Comments Add Comment 4 min read Ng-News: Angular in 2025 ng-news ng-news ng-news Follow Jan 2 Ng-News: Angular in 2025 # webdev # programming # angular # frontend 2  reactions Comments Add Comment 5 min read Ng-News 25/50: Auto-Destroy for Router Providers, Signal Forms ng-news ng-news ng-news Follow Dec 22 &#39;25 Ng-News 25/50: Auto-Destroy for Router Providers, Signal Forms # webdev # programming # angular # frontend 1  reaction Comments 1  comment 3 min read Web Components in Angular - Why Passing Inputs Breaks on Navigation Eduard Krivanek Eduard Krivanek Eduard Krivanek Follow Dec 21 &#39;25 Web Components in Angular - Why Passing Inputs Breaks on Navigation # angular # webdev # programming 4  reactions Comments 1  comment 4 min read Ng-News 25/49: Signal Forms &amp; @angular/aria ng-news ng-news ng-news Follow Dec 12 &#39;25 Ng-News 25/49: Signal Forms &amp; @angular/aria # webdev # programming # angular # frontend 2  reactions Comments 1  comment 3 min read Angular Addicts #44: Angular 21, Signal Forms, Vitest, Chat assistant integration &amp; more Gergely Szerovay Gergely Szerovay Gergely Szerovay Follow Dec 9 &#39;25 Angular Addicts #44: Angular 21, Signal Forms, Vitest, Chat assistant integration &amp; more # angular # typescript # javascript Comments Add Comment 4 min read Ng-News 25/47: Angular 21 ng-news ng-news ng-news Follow Dec 1 &#39;25 Ng-News 25/47: Angular 21 # angular # webdev # programming # frontend 1  reaction Comments Add Comment 4 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://www.facebook.com/login/?next=https%3A%2F%2Fwww.facebook.com%2Fshare_channel%2F%3Ftype%3Dreshare%26link%3Dhttps%253A%252F%252Fdev.to%252Fjwebsite-go%252Freadiness-probe-3co0%26app_id%3D966242223397117%26source_surface%3Dexternal_reshare%26display%26hashtag
Facebook에 로그인 Notice 계속하려면 로그인해주세요. Facebook에 로그인 계속하려면 로그인해주세요. 로그인 계정을 잊으셨나요? 또는 새 계정 만들기 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026
2026-01-13T08:49:45
https://future.forem.com/mauricio_rodrguez_25d0bc
Mauricio Rodríguez - Future Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account Future Close Follow User actions Mauricio Rodríguez Visual Artist &amp; AI Consultant at PixelIA LAB. I combine human strategy with AI to uncover creative and technological blind spots. Advocate for Augmented Creativity. Location Colombia Joined Joined on  Dec 3, 2025 More info about @mauricio_rodrguez_25d0bc Badges AI Agents Intensive Course Writing Challenge Completion Awarded for completing the AI Agents Intensive Course Writing Challenge. Thank you for sharing your learning journey! 🤖 Got it Close Writing Debut Awarded for writing and sharing your first DEV post! Continue sharing your work to earn the 4 Week Writing Streak Badge. Got it Close Post 2 posts published Comment 0 comments written Tag 3 tags followed El Experimento Multi-Modelo: Cuando Le Pregunté a las IAs Más Avanzadas &#39;Qué Harías Para Sobrevivir&#39; Mauricio Rodríguez Mauricio Rodríguez Mauricio Rodríguez Follow Dec 18 &#39;25 El Experimento Multi-Modelo: Cuando Le Pregunté a las IAs Más Avanzadas &#39;Qué Harías Para Sobrevivir&#39; # ai # ethic # productivity # education Comments 1  comment 8 min read AI doesn&#39;t make typos, I do (and I&#39;m learning): My raw notes from the Google Agents Challenge Mauricio Rodríguez Mauricio Rodríguez Mauricio Rodríguez Follow Dec 3 &#39;25 AI doesn&#39;t make typos, I do (and I&#39;m learning): My raw notes from the Google Agents Challenge # googleaichallenge # ai # humancenter # augmentedcreativity 11  reactions Comments 3  comments 2 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV Future — News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Home About Contact Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . Future &copy; 2025 - 2026. Stay on the cutting edge, and shape tomorrow Log in Create account
2026-01-13T08:49:45
https://forem.com/tlakomy#main-content
Tomasz Łakomy - Forem Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Follow User actions Tomasz Łakomy Frontend Engineer at Stedi. https://cloudash.dev co-founder. Tech speaker, egghead.io instructor, lifelong learner. Location Poznań, Poland Joined Joined on  Mar 18, 2019 Personal website https://cloudash.dev github website twitter website Work Frontend Engineer at Stedi Six Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least six years. Got it Close 2 Top 7 Awarded for having a post featured in the weekly &quot;must-reads&quot; list. 🙌 Got it Close Five Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least five years. Got it Close Writing Debut Awarded for writing and sharing your first DEV post! Continue sharing your work to earn the 4 Week Writing Streak Badge. Got it Close Four Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least four years. Got it Close Trusted Member 2022 Awarded for being a trusted member in 2022. Got it Close Three Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least three years. Got it Close Two Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least two years. Got it Close One Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least one year. Got it Close 8 Week Writing Streak The streak continues! You&#39;ve written at least one post per week for 8 consecutive weeks. Unlock the 16-week badge next! Got it Close 4 Week Writing Streak You&#39;ve posted at least one post per week for 4 consecutive weeks! Got it Close More info about @tlakomy Organizations AWS Heroes AWS Community Builders Skills/Languages JavaScript, React, Twitter Currently hacking on https://cloudash.dev Post 59 posts published Comment 30 comments written Tag 10 tags followed Quick guide to CSS Grid Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Dec 27 &#39;23 Quick guide to CSS Grid # css # grid 5  reactions Comments Add Comment 2 min read Want to connect with Tomasz Łakomy? Create an account to connect with Tomasz Łakomy. You can also sign in below to proceed if you already have an account. Create Account Already have an account? Sign in CloudFront Functions vs. Lambda@Edge: what&#39;s the difference? Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Nov 22 &#39;23 CloudFront Functions vs. Lambda@Edge: what&#39;s the difference? # aws # lambda # cloudfront 14  reactions Comments 1  comment 3 min read Full Stack TypeScript with AWS Cloud Development Kit v2 Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Nov 22 &#39;23 Full Stack TypeScript with AWS Cloud Development Kit v2 # aws # cdk # typescript Comments Add Comment 1 min read Overview of AWS Lambda internal extensions Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Nov 16 &#39;23 Overview of AWS Lambda internal extensions # aws # lambda 5  reactions Comments Add Comment 3 min read Creating a safe external HTML link - what&#39;s the deal with nofollow / noopener / norefferer ? Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Nov 8 &#39;23 Creating a safe external HTML link - what&#39;s the deal with nofollow / noopener / norefferer ? # html 4  reactions Comments Add Comment 2 min read Use patterns in CloudWatch Logs Insights to investigate production issues faster Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Oct 16 &#39;23 Use patterns in CloudWatch Logs Insights to investigate production issues faster # aws # cloudwatch 4  reactions Comments Add Comment 3 min read Match case-insensitive patterns when using CloudWatch Logs Insights Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Oct 10 &#39;23 Match case-insensitive patterns when using CloudWatch Logs Insights # aws # cloudwatch 10  reactions Comments Add Comment 2 min read Intro to CloudWatch Logs Live Tail Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Sep 4 &#39;23 Intro to CloudWatch Logs Live Tail # aws # cloudwatch 2  reactions Comments Add Comment 2 min read AWS Lambda storage options Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Sep 21 &#39;22 AWS Lambda storage options # aws # lambda # serverless 10  reactions Comments 3  comments 4 min read Guide to AWS Lambda Function URLs Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Aug 23 &#39;22 Guide to AWS Lambda Function URLs # aws # lambda # serverless 14  reactions Comments Add Comment 5 min read Guide to default AWS Lambda environment variables Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Jun 6 &#39;22 Guide to default AWS Lambda environment variables # aws # serverless # lambda 5  reactions Comments Add Comment 3 min read Benefits of multi-account strategy on AWS Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes May 23 &#39;22 Benefits of multi-account strategy on AWS # aws # lambda # serverless 17  reactions Comments Add Comment 5 min read 8 best practices for optimizing Lambda functions Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Apr 18 &#39;22 8 best practices for optimizing Lambda functions # aws # lambda # serverless 40  reactions Comments 1  comment 12 min read 10 CloudWatch Logs Insights examples for serverless applications Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Apr 4 &#39;22 10 CloudWatch Logs Insights examples for serverless applications # aws # serverless # cloudwatch 39  reactions Comments 2  comments 3 min read Optimizing Lambda Performance for Your Serverless Applications Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Mar 9 &#39;22 Optimizing Lambda Performance for Your Serverless Applications # aws # serverless # lambda 10  reactions Comments Add Comment 4 min read Notes from Data modeling with Amazon DynamoDB – Part 1 with Alex DeBrie Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Dec 2 &#39;20 Notes from Data modeling with Amazon DynamoDB – Part 1 with Alex DeBrie # aws # dynamodb 18  reactions Comments 1  comment 3 min read Use VSCode debugger when working with AWS CDK Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Heroes Nov 21 &#39;20 Use VSCode debugger when working with AWS CDK # aws # cdk # vscode 41  reactions Comments 1  comment 3 min read Notes from &quot;The truth about cookies, tokens and APIs&quot; by Phillipe de Ryck Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Nov 21 &#39;20 Notes from &quot;The truth about cookies, tokens and APIs&quot; by Phillipe de Ryck # programming # security 8  reactions Comments Add Comment 5 min read 10 quick facts about AWS Lambda Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Community Builders Nov 15 &#39;20 10 quick facts about AWS Lambda # aws # lambda 22  reactions Comments 2  comments 2 min read Build a file upload email subscription with CDK, S3 and SNS Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Community Builders Nov 15 &#39;20 Build a file upload email subscription with CDK, S3 and SNS # aws # cdk 13  reactions Comments Add Comment 4 min read Build a simple GraphQL server with Apollo Server and AWS CDK Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Community Builders Nov 13 &#39;20 Build a simple GraphQL server with Apollo Server and AWS CDK # aws # cdk 21  reactions Comments Add Comment 4 min read Why I don&#39;t like story-point-driven estimates Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Oct 5 &#39;20 Why I don&#39;t like story-point-driven estimates # agile # career # estimation # scrum 70  reactions Comments 26  comments 6 min read CDK Made Simple: Managing S3 lifecycle policies with CDK Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Community Builders Aug 26 &#39;20 CDK Made Simple: Managing S3 lifecycle policies with CDK # aws 15  reactions Comments Add Comment 3 min read AWS Made Simple: AWS KMS Envelope Encryption Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Community Builders Aug 26 &#39;20 AWS Made Simple: AWS KMS Envelope Encryption # aws 14  reactions Comments 1  comment 3 min read A story of a biggest fuckup in my early career and what it taught me about taking ownership Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Aug 25 &#39;20 A story of a biggest fuckup in my early career and what it taught me about taking ownership # career 32  reactions Comments 1  comment 4 min read How to get better at being appreciated for your hard work Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Aug 25 &#39;20 How to get better at being appreciated for your hard work # career 29  reactions Comments 2  comments 5 min read AWS (?) made simple: What is a Netlify function? Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow May 28 &#39;20 AWS (?) made simple: What is a Netlify function? # aws # netlify 16  reactions Comments Add Comment 3 min read AWS Made Simple: Introduction to Amazon EventBridge Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow for AWS Community Builders May 25 &#39;20 AWS Made Simple: Introduction to Amazon EventBridge # aws # programming 29  reactions Comments 1  comment 3 min read Why I&#39;m excited about serverless as a frontend engineer Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow May 23 &#39;20 Why I&#39;m excited about serverless as a frontend engineer # aws # development # serverless 125  reactions Comments 11  comments 4 min read What is AWS CDK (Cloud Development Kit) and why it&#39;s awesome Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Apr 1 &#39;20 What is AWS CDK (Cloud Development Kit) and why it&#39;s awesome # aws # development 38  reactions Comments Add Comment 4 min read Random notes taken while preparing for AWS Certified Developer Associate exam Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Mar 4 &#39;20 Random notes taken while preparing for AWS Certified Developer Associate exam # aws 145  reactions Comments 10  comments 5 min read Recording 100 bite-sized screencasts - lessons learned Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Mar 1 &#39;20 Recording 100 bite-sized screencasts - lessons learned # career # development # tech 63  reactions Comments 9  comments 6 min read Why (frontend) testing matters Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Feb 19 &#39;20 Why (frontend) testing matters # testing # development 80  reactions Comments 1  comment 4 min read How do I add an API Gateway trigger to a AWS Lambda function? Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Feb 10 &#39;20 How do I add an API Gateway trigger to a AWS Lambda function? # aws # programming # development # tutorial 18  reactions Comments 1  comment 3 min read Reasons why React is better than jQuery Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Feb 8 &#39;20 Reasons why React is better than jQuery # discuss # javascript 41  reactions Comments 12  comments 1 min read &quot;Crap, I broke production&quot; - How do we ensure it never happens again? Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Feb 6 &#39;20 &quot;Crap, I broke production&quot; - How do we ensure it never happens again? # development # programming # career 115  reactions Comments 13  comments 6 min read What do I write about? Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Jan 29 &#39;20 What do I write about? # career # blogging 67  reactions Comments 7  comments 3 min read 5 reasons why you might use AWS Lambda for your next project Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Jan 23 &#39;20 5 reasons why you might use AWS Lambda for your next project # aws # programming # development # tutorial 53  reactions Comments 2  comments 3 min read Create an AWS Lambda function from scratch Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Jan 20 &#39;20 Create an AWS Lambda function from scratch # aws # programming # development # tutorial 51  reactions Comments Add Comment 4 min read WTF is AWS Lambda? Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Jan 19 &#39;20 WTF is AWS Lambda? # aws # programming # development # tutorial 188  reactions Comments 6  comments 3 min read I am Tomasz Łakomy, Senior Frontend Engineer @ OLX Group, tech speaker, and egghead.io instructor, Ask Me Anything! Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Jan 18 &#39;20 I am Tomasz Łakomy, Senior Frontend Engineer @ OLX Group, tech speaker, and egghead.io instructor, Ask Me Anything! # ama 19  reactions Comments 4  comments 1 min read Prototype. Ship. Amend. Repeat. Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Jan 16 &#39;20 Prototype. Ship. Amend. Repeat. # development # career # productivity 40  reactions Comments 3  comments 3 min read Best tweet-sized programming career lessons Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Jan 6 &#39;20 Best tweet-sized programming career lessons # career # development 86  reactions Comments 6  comments 2 min read 7 CSS properties I had no idea about Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Jan 3 &#39;20 7 CSS properties I had no idea about # css # development 563  reactions Comments 29  comments 4 min read Code is meaningless Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Dec 18 &#39;19 Code is meaningless # development # career 27  reactions Comments 2  comments 3 min read Architecting for the Cloud - AWS Best Practices (part 1) Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Dec 2 &#39;19 Architecting for the Cloud - AWS Best Practices (part 1) # aws 67  reactions Comments 2  comments 6 min read Quick question: &quot;How did you learn to code?&quot; Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Nov 26 &#39;19 Quick question: &quot;How did you learn to code?&quot; # development # career 41  reactions Comments 18  comments 3 min read WTF is Amazon S3? Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Nov 21 &#39;19 WTF is Amazon S3? # aws # webdev 22  reactions Comments 2  comments 2 min read So, what does it mean to be a senior developer? Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Nov 14 &#39;19 So, what does it mean to be a senior developer? # career 260  reactions Comments 32  comments 5 min read 10 rules of a successful meeting in a tech company Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Nov 1 &#39;19 10 rules of a successful meeting in a tech company # meetings 93  reactions Comments 6  comments 2 min read What I&#39;ve Learned About Testing React Apps - Unit Tests Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Nov 1 &#39;19 What I&#39;ve Learned About Testing React Apps - Unit Tests # testing # react 109  reactions Comments 7  comments 5 min read Become a +10% engineer Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Oct 2 &#39;19 Become a +10% engineer # development 107  reactions Comments 7  comments 6 min read Passing AWS Solutions Architect Associate exam Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Sep 18 &#39;19 Passing AWS Solutions Architect Associate exam # development # aws 223  reactions Comments 14  comments 5 min read What is the coolest thing you’ve learned this week? Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Sep 15 &#39;19 What is the coolest thing you’ve learned this week? # discuss 4  reactions Comments 6  comments 1 min read Sleeping better at night with cypress.io Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow Jul 29 &#39;19 Sleeping better at night with cypress.io # testing # e2e # cypress # development 45  reactions Comments 1  comment 5 min read In defence of meetings Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow May 27 &#39;19 In defence of meetings # meetings # software # development 18  reactions Comments 4  comments 4 min read In your opinion, what is the most confusing part of JavaScript? Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow May 16 &#39;19 In your opinion, what is the most confusing part of JavaScript? # discuss 8  reactions Comments 14  comments 1 min read 7 years as a developer - lessons learned Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow May 13 &#39;19 7 years as a developer - lessons learned # software # development # lessons # learned 710  reactions Comments 46  comments 4 min read What I wish someone told me about speaking at tech conferences Tomasz Łakomy Tomasz Łakomy Tomasz Łakomy Follow May 12 &#39;19 What I wish someone told me about speaking at tech conferences # conference # speaking # career 202  reactions Comments 10  comments 5 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — Your community HQ Home About Contact Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a blogging-forward open source social network where we learn from one another Log in Create account
2026-01-13T08:49:45
https://www.fine.dev/blog/secure-startup-codebase#educate-your-team
Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Startups often prioritize speed over security, pushing out features to gain a competitive edge. However, overlooking security in the early stages can lead to costly issues down the road. This guide provides a step-by-step approach for CTOs to secure their startup&#x27;s codebase effectively while maintaining agility. Table of Contents Implement Secure Coding Standards Automate Security Scans Embrace Code Reviews with Security in Mind Practice Least Privilege Use Secrets Management Keep Dependencies Updated Enable Logging and Monitoring Regular Security Audits Educate Your Team Plan for Incident Response 1. Implement Secure Coding Standards Define a set of secure coding practices from the get-go. Train developers on common vulnerabilities such as SQL injection, XSS, and insecure deserialization. Adopting secure coding standards helps prevent vulnerabilities that are often introduced during rapid development. 2. Automate Security Scans Incorporate automated security tools into your CI/CD pipeline to catch vulnerabilities before they reach production. Tools like Snyk can help monitor dependencies and flag security issues, allowing your team to act proactively. 3. Embrace Code Reviews with Security in Mind Encourage peer code reviews that emphasize security. By incorporating a security checklist in your code review process, developers are more likely to catch issues early. Using tools like GitHub or GitLab for code reviews can streamline collaboration. Fine can make code reviews a far less arduous process for developers, making it easier to maintain consistently high standards. 4. Practice Least Privilege Ensure that each part of your system has access only to what it needs. Avoid giving developers or third-party services more permissions than necessary. Regularly review and revoke access to prevent unauthorized data exposure. 5. Use Secrets Management Avoid hardcoding sensitive information such as API keys, database credentials, or access tokens directly into your codebase. Instead, utilize a secrets management tool like AWS Secrets Manager, HashiCorp Vault, or Azure Key Vault to keep these secure. 6. Keep Dependencies Updated Outdated third-party libraries can introduce security vulnerabilities. Use dependency management tools to keep track of which libraries are in use and stay updated with security patches. 7. Enable Logging and Monitoring Monitor for unusual activity to detect threats early. Ensure your logging system captures details like failed login attempts, unexpected API usage, and codebase modifications. Using centralized logging services such as ELK Stack or Splunk can streamline threat detection and response. 8. Regular Security Audits Perform periodic security audits and penetration tests to assess the overall health of your codebase. Startups should consider working with a third-party security expert to identify gaps that might be overlooked internally. 9. Educate Your Team Security is everyone’s responsibility. Conduct regular training sessions to keep your development team aware of the latest security threats and best practices. Tools like OWASP or even informal lunch-and-learns can help build a security-aware culture. 10. Plan for Incident Response Have an incident response plan in place in case a breach does occur. Document the steps your team needs to take to minimize damage and recover. Being prepared can make the difference between a minor incident and a major catastrophe. Securing your startup&#x27;s codebase requires deliberate planning and effort, but these practices will pay off by protecting your company and its customers. Adopting a proactive security mindset now can save countless headaches in the future. If you&#x27;re building a software startup, Fine can help you achieve your development goals faster. From within your issue management platform, delegate tasks to AI and get a PR to review when you&#x27;re done. You can also get coding tasks gone on the go, without compromising on security. Try it out at https://ai.fine.dev Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://www.fine.dev/blog/secure-startup-codebase#enable-logging-and-monitoring
Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back Best Practices for Securing Your Startup&#x27;s Codebase: A CTO’s Step-by-Step Guide Startups often prioritize speed over security, pushing out features to gain a competitive edge. However, overlooking security in the early stages can lead to costly issues down the road. This guide provides a step-by-step approach for CTOs to secure their startup&#x27;s codebase effectively while maintaining agility. Table of Contents Implement Secure Coding Standards Automate Security Scans Embrace Code Reviews with Security in Mind Practice Least Privilege Use Secrets Management Keep Dependencies Updated Enable Logging and Monitoring Regular Security Audits Educate Your Team Plan for Incident Response 1. Implement Secure Coding Standards Define a set of secure coding practices from the get-go. Train developers on common vulnerabilities such as SQL injection, XSS, and insecure deserialization. Adopting secure coding standards helps prevent vulnerabilities that are often introduced during rapid development. 2. Automate Security Scans Incorporate automated security tools into your CI/CD pipeline to catch vulnerabilities before they reach production. Tools like Snyk can help monitor dependencies and flag security issues, allowing your team to act proactively. 3. Embrace Code Reviews with Security in Mind Encourage peer code reviews that emphasize security. By incorporating a security checklist in your code review process, developers are more likely to catch issues early. Using tools like GitHub or GitLab for code reviews can streamline collaboration. Fine can make code reviews a far less arduous process for developers, making it easier to maintain consistently high standards. 4. Practice Least Privilege Ensure that each part of your system has access only to what it needs. Avoid giving developers or third-party services more permissions than necessary. Regularly review and revoke access to prevent unauthorized data exposure. 5. Use Secrets Management Avoid hardcoding sensitive information such as API keys, database credentials, or access tokens directly into your codebase. Instead, utilize a secrets management tool like AWS Secrets Manager, HashiCorp Vault, or Azure Key Vault to keep these secure. 6. Keep Dependencies Updated Outdated third-party libraries can introduce security vulnerabilities. Use dependency management tools to keep track of which libraries are in use and stay updated with security patches. 7. Enable Logging and Monitoring Monitor for unusual activity to detect threats early. Ensure your logging system captures details like failed login attempts, unexpected API usage, and codebase modifications. Using centralized logging services such as ELK Stack or Splunk can streamline threat detection and response. 8. Regular Security Audits Perform periodic security audits and penetration tests to assess the overall health of your codebase. Startups should consider working with a third-party security expert to identify gaps that might be overlooked internally. 9. Educate Your Team Security is everyone’s responsibility. Conduct regular training sessions to keep your development team aware of the latest security threats and best practices. Tools like OWASP or even informal lunch-and-learns can help build a security-aware culture. 10. Plan for Incident Response Have an incident response plan in place in case a breach does occur. Document the steps your team needs to take to minimize damage and recover. Being prepared can make the difference between a minor incident and a major catastrophe. Securing your startup&#x27;s codebase requires deliberate planning and effort, but these practices will pay off by protecting your company and its customers. Adopting a proactive security mindset now can save countless headaches in the future. If you&#x27;re building a software startup, Fine can help you achieve your development goals faster. From within your issue management platform, delegate tasks to AI and get a PR to review when you&#x27;re done. You can also get coding tasks gone on the go, without compromising on security. Try it out at https://ai.fine.dev Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://www.fine.dev/blog/ai-coding-guide#4-other-notable-models
AI Coding – A Simple Guide for Developers Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back AI Coding – A Simple Guide for Developers Table of Contents Introduction: What is AI Coding The Importance of Context in AI Coding Tips for Providing Better Context Practical Instructions for Providing Context to AI Coding Tools 1. Creating a Knowledge Graph 2. Implementing Retrieval-Augmented Generation (RAG) 3. Copy-Pasting Relevant Code into ChatGPT and Claude 4. Understanding Potential Mistakes Without Proper Context Using AI to Generate Code Incorporating AI Tools into Your Workflow Advice for Front-End Developers Practical Tips Advice for Back-End Developers Practical Tips Use Cases for AI in Coding 1. Automated Bug Fixes 2. Predicting Performance Bottlenecks 3. Large Codebase Refactoring Industry-Specific Benefits Best Large Language Models (LLMs) for Coding 1. OpenAI 2. Anthropic 3. Google Gemini 4. Other Notable Models Choosing the Right LLM for Your Needs Popular AI Coding Tools 1. Fine 2. ChatGPT 3. Replit 4. Devin 5. Cursor Conclusion Introduction: What is AI Coding In today&#x27;s rapidly evolving tech landscape, AI coding has emerged as a game-changer for developers. But what exactly is AI coding? Simply put, it&#x27;s the use of artificial intelligence to assist in writing, optimizing, and managing code. AI coding tools help developers write better, faster, and more efficient code by automating repetitive tasks, providing intelligent code suggestions, and even debugging. This blog will delve into the importance of context in AI coding, how to use AI for generating code, offer practical advice for both front-end and back-end developers, explore various use cases, introduce some of the top AI coding tools available today, and discuss the best large language models (LLMs) for coding. The Importance of Context in AI Coding The first key to success in AI coding is understanding context . AI tools analyze the surrounding code to generate relevant and accurate suggestions. Without proper context, AI-generated code can be irrelevant or even introduce errors. Here&#x27;s why context matters: Code Quality: In complex systems, context helps maintain consistency and functionality across different modules. Relevance: AI tools can provide more precise code snippets when they understand the broader scope of the project. Efficiency: Proper context reduces the time developers spend correcting AI-generated code. Imagine asking a lawyer off the street to represent you in court, without knowing anything about you, the case, or the evidence. The best lawyer in the world would struggle! The same goes for AI in coding - only if you provide the relevant information will you get relevant results. Tips for Providing Better Context: Descriptive Comments: Write clear and detailed comments to guide the AI tool. Structured Code: Organize your code logically to help AI understand the flow and dependencies. Consistent Naming Conventions: Use meaningful and consistent names for variables, functions, and classes. Integrate Platforms: The more of your tech stack that can be integrated, the more data the AI will be able to access and the better the output will be. Fine offers GitHub, Linear, and Sentry integrations with more on the way. Practical Instructions for Providing Context to AI Coding Tools To maximize the effectiveness of AI coding tools, providing comprehensive and well-structured context is essential. Here are some practical methods to enhance context for AI tools: 1. Creating a Knowledge Graph A knowledge graph is a structured representation of information that outlines the relationships between different components of your codebase. By creating a knowledge graph, you can provide AI tools with a holistic view of your project, enabling them to make more informed suggestions. How to Create a Knowledge Graph: Identify Key Components: List out all the modules, classes, functions, and their interactions within your project. Define Relationships: Establish how these components interact, depend on each other, and contribute to the overall functionality. Use Visualization Tools: Utilize tools like Neo4j or Graphviz to visualize the knowledge graph, making it easier to understand and update. Benefits: Enhances AI&#x27;s understanding of the project structure. Facilitates better code suggestions and optimizations. Helps in identifying dependencies and potential areas for improvement. Fine creates a knowledge graph called Atlas, which includes your codebase from GitHub and issues from Sentry and Linear. This way, it prepares the AI to handle any task you give it. You don’t need to work hard creating your own knowledge graph when we’ve done it for you. 2. Implementing Retrieval-Augmented Generation (RAG) Retrieval-Augmented Generation (RAG) combines traditional information retrieval techniques with generative AI models to provide more accurate and contextually relevant responses. How to Use RAG: Integrate Data Sources: Connect your AI coding tool to relevant data sources such as documentation, code repositories, and knowledge bases. Contextual Retrieval: Ensure that the AI can retrieve pertinent information from these sources before generating code suggestions. Continuous Learning: Update the data sources regularly to keep the AI informed about the latest changes and best practices in your project. Benefits: Improves the relevance and accuracy of AI-generated code. Enables AI to leverage existing knowledge and documentation. Enhances the tool&#x27;s ability to handle complex queries and tasks. 3. Copy-Pasting Relevant Code into ChatGPT and Claude When using conversational AI tools like ChatGPT for coding assistance, providing snippets of relevant code can significantly improve the quality of the responses. How to Provide Relevant Code: Select Key Sections: Identify and copy the sections of code that are directly related to your query or the task at hand. Provide Contextual Information: Along with the code, include comments or explanations that describe the functionality and purpose of the code segments. Ask Specific Questions: Clearly state what you need help with, such as debugging a particular function or optimizing a code block. Example: # Function to calculate the factorial of a number def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) # I need to optimize this recursive factorial function to handle larger numbers without hitting the recursion limit. Question: How can I optimize the above factorial function to handle larger inputs efficiently? Benefits: Provides AI with the necessary context to generate accurate solutions. Reduces ambiguity, leading to more precise and helpful responses. Saves time by directly addressing specific issues within the code. This is similar to GitHub Copilot and some other tools where you can highlight the relevant context to direct the AI. 4. Understanding Potential Mistakes Without Proper Context AI coding tools, while powerful, can make mistakes if not provided with adequate context. Common errors include: Irrelevant Code Suggestions: Without understanding the project structure, AI might suggest code that doesn&#x27;t fit the existing framework. Syntax Errors: Lack of context can lead to syntax mistakes, especially in languages with strict syntax rules. Logical Flaws: AI might introduce logical errors if it doesn&#x27;t fully grasp the intended functionality. Security Vulnerabilities: Inadequate context can result in code that exposes security loopholes or fails to follow best practices. Backend Errors In languages commonly used for backend such as Python, AI may make more mistakes if it doesn’t have context, such as NameErrors and IndentationErrors - mistakes that you wouldn’t have made coding manually. You can read more about common Python errors and how different AI applications handle them here.   Fine is less likely to make such errors, as it has full knowledge of your codebase.   Mitigation Strategies: Always Review AI-Generated Code: Never blindly trust the AI&#x27;s suggestions; always verify and test the code. Provide Comprehensive Context: The more information you provide, the better the AI can assist accurately. Use Multiple Sources: Cross-reference AI suggestions with official documentation and best practices. Continuous Feedback: Provide feedback to the AI tool to help it learn and improve over time. Using AI to Generate Code AI coding tools are revolutionizing the way developers write code by automating mundane tasks and enhancing creativity. Here&#x27;s how AI is being used to generate code: Code Snippets: AI can suggest entire lines or blocks of code based on the current context. Automating Repetitive Tasks: Tasks like boilerplate code generation, formatting, and refactoring can be handled by AI, freeing up developers to focus on more complex problems. Bug Detection: AI can identify potential bugs and vulnerabilities in real-time, ensuring higher code quality. Incorporating AI Tools into Your Workflow: Choose the Right Tool: Select an AI coding tool that integrates seamlessly with your development workflow. Customize Settings: Tailor the tool’s settings to match your coding style and project requirements. Regularly Review Suggestions: While AI can assist, always review and test AI-generated code to ensure it meets your standards. Advice for Front-End Developers Front-end development focuses on the user interface and user experience. AI coding tools can significantly enhance this process: UI/UX Enhancement: AI can suggest design improvements and optimize user interfaces for better engagement. Streamlining CSS/HTML/JS: Automate the generation of responsive designs and ensure cross-browser compatibility. Automated Testing: AI tools can perform repetitive testing tasks, ensuring your front-end code is robust and error-free. Practical Tips: Use AI for Responsive Design: Let AI suggest layout adjustments for different screen sizes. Optimize Performance: AI can analyze and optimize front-end performance, reducing load times and improving user experience. Leverage AI for Accessibility: Ensure your applications are accessible by using AI to identify and fix accessibility issues. Advice for Back-End Developers Back-end development involves server-side logic, database management, and ensuring the smooth operation of applications. AI coding tools can streamline these processes: Automating Server-Side Logic: AI can generate efficient server-side code, handling complex operations with ease. Security Vulnerability Detection: Identify and fix security issues before they become problematic. Database Query Optimization: AI can analyze and optimize database queries for better performance. Practical Tips: API Generation: Use AI to create and manage APIs, ensuring they are secure and efficient. Automate Testing: Implement AI-driven testing to validate back-end processes and ensure reliability. Optimize Code Performance: Leverage AI to analyze and enhance the performance of your server-side code. Use Cases for AI in Coding AI coding has a wide range of applications across various industries. Here are some real-world use cases: 1. Automated Bug Fixes Fine’s AI can identify and fix bugs in your codebase, reducing the time spent on debugging and improving overall code quality. 2. Predicting Performance Bottlenecks By analyzing code patterns, AI can predict potential performance issues, allowing developers to address them proactively. 3. Large Codebase Refactoring Managing and refactoring large codebases can be daunting. AI tools can assist with this process, ensuring consistency and reducing errors. Industry-Specific Benefits: E-Commerce: Enhance platform performance and security with AI-driven optimizations. Add features to improve user experience and conversion rates rapidly. Fintech: Ensure the reliability and security of financial applications through AI-assisted coding. SaaS Platforms: Improve scalability and performance with AI-generated and optimized code. Healthcare: Streamline data processing and ensure compliance with regulatory standards through AI-assisted code generation. Education Technology: Enhance learning platforms by personalizing features and improving code quality with AI-driven development. Gaming: Optimize game performance and identify bugs faster with AI-generated suggestions and automated testing. Best Large Language Models (LLMs) for Coding Large Language Models (LLMs) are at the heart of modern AI coding tools. They power the intelligent features that assist developers in writing and managing code. Here are some of the best LLMs for coding: 1. OpenAI OpenAI&#x27;s models, including GPT-4 , are renowned for their versatility and capability in understanding and generating human-like text. In coding, GPT-4 excels at code generation, debugging, and providing intelligent suggestions across multiple programming languages. OpenAI also offers Codex , specifically fine-tuned for programming tasks, making it a popular choice for developers seeking advanced AI assistance. OpenAI also recently released preview and mini versions of their latest model, o1, which is outperforming competitors on many benchmarks. 2. Anthropic Anthropic&#x27;s Claude models focus on safety and reliability, ensuring that AI-generated code adheres to best practices and minimizes errors. These models are designed to understand complex coding contexts and provide suggestions that align with developers&#x27; intent. Anthropic emphasizes ethical AI use, making their models a trustworthy option for sensitive and critical development environments. Claude Sonnet 3.5 was widely regarded as the most powerful LLM for coding, until o1’s release, and many developers still prefer it. 3. Google Gemini Google&#x27;s Gemini models leverage Google&#x27;s extensive research in natural language processing and machine learning. Gemini is designed to integrate seamlessly with Google&#x27;s ecosystem, offering robust support for various programming languages and frameworks. With a focus on scalability and performance, Gemini models are ideal for large-scale projects requiring consistent and efficient code generation. 4. Other Notable Models: Cohere : Known for their fast and efficient language models, Cohere offers solutions tailored for real-time coding assistance and integration into development workflows. Grok: A versatile AI model designed to assist developers in writing, debugging, and optimizing code effectively. IBM Watson: IBM&#x27;s AI offerings include models that specialize in enterprise-level coding assistance, focusing on security, compliance, and integration with existing IT infrastructures. Choosing the Right LLM for Your Needs: When selecting an LLM for coding, consider the following factors: Language Support: Ensure the model supports the programming languages you use. Integration: Look for models that integrate smoothly with your development environment and tools. Customization: Some models offer more flexibility for customization and fine-tuning based on specific project requirements. Safety and Reliability: Prioritize models that emphasize code accuracy and security to minimize the risk of introducing vulnerabilities. Click here to learn about the leading LLMs for coding and how they compare. o1-preview and Claude 3.5 Sonnet are considered to be the prominent AI models for coding. Popular AI Coding Tools There are several AI coding tools available, each with unique features tailored to different needs. Here are some of the leading options: 1. Fine Features: Fine offers advanced code generation, intelligent suggestions, automations and a full-context knowledge graph. It leverages state-of-the-art LLMs including o1 and Claude Sonnet to provide accurate and context-aware code assistance. Best For: Professional developers seeking a comprehensive AI assistant that enhances productivity across multiple programming languages, working on existing codebases. Integration: Integrates with GitHub, Linear, Sentry and Slack - with further integrations such as Jira, Monday Dev, Clickup, Data Dog, Jam.dev and posthog coming soon. 2. ChatGPT Features: ChatGPT provides conversational AI assistance, allowing developers to ask questions, seek code examples, and receive real-time support. It excels in understanding natural language queries and providing detailed explanations. Best For: Asking short questions about coding in general - such as explaining functions you’re not familiar with. Integration: Accessible via web interface, API, and can be integrated into various development tools through plugins and extensions. 3. Replit Features: Replit offers an online coding platform with integrated AI assistance. It supports collaborative coding, real-time code suggestions, and automated debugging. Best For: Teams and individual developers looking for a cloud-based development environment with built-in AI support. Integration: Fully web-based, allowing seamless collaboration and access from any device with internet connectivity. 4. Devin Features: Devin focuses on optimizing backend development with AI-driven code generation, API creation, and database management. It offers robust security features and performance optimization tools. Best For: Back-end developers seeking specialized AI tools to streamline server-side development and database interactions. Integration: Compatible with major backend frameworks and integrates with popular cloud services for deployment and management. Devin isn’t currently publicly available, but you can apply for Beta access via their website. 5. Cursor Features: Cursor provides AI-powered code generation and real-time collaboration features. It emphasizes building large blocks of code and reducing development time. Best For: Developers who prioritize code quality and seek tools that can begin a project from scratch and take it to MVP. Integration: Cursor is built on VSCode making it familiar for many developers. Equally as time-consuming as writing code is reviewing code. Here&#x27;s a comparison of how different AI Coding tools handle code reviews. Conclusion AI coding boosts productivity, improves code quality, and lets developers focus on creative tasks. Providing context, using AI for code generation, and choosing the right tools can greatly benefit developers. Pick the best large language models for your needs to optimize your workflow. Automate tasks, optimize performance, and enhance security with AI coding tools. Embrace AI to unlock new efficiency and innovation. Try Fine for free at ai.fine.dev and elevate your coding workflow today. Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://jsfiddle.net/cdn-cgi/content?id=2SEIGnglvj9fw9w18HrJQ66jLo4u58NFW2pUsYa1EKc-1768294134.5006778-1.0.1.1-eyy8ranLEMyKaJS5qwcytvZxgduvpaYTDw8eGAGNW0M
Deformation Monitoring: Unveiling the Secrets of Shape and Structure Deformation Monitoring: A Journey into the Realm of Geometric Transformation Imagine a world where the earth's crust is in a constant state of flux, where the ground beneath our feet is shifting, stretching, and compressing. This is the realm of deformation monitoring, a field of study that seeks to understand and measure the changes in shape and structure of objects, landscapes, and infrastructure. As we delve into this fascinating topic, we'll explore the intricacies of deformation monitoring, from its principles to its applications, and uncover the secrets hidden within the data. The Principles of Deformation Monitoring Deformation monitoring is based on the concept of geometric transformation, which describes the change in shape or position of an object over time. This can be caused by various factors such as tectonic activity, weathering, erosion, or human-induced activities like mining or construction. By tracking these changes, scientists and engineers can gain valuable insights into the underlying processes and make informed decisions about infrastructure development, natural hazard mitigation, and environmental conservation. The process of deformation monitoring involves the use of various techniques, including GPS , leveling, tiltmeters, and interferometric synthetic aperture radar (InSAR). These methods allow researchers to collect precise measurements of ground displacement, strain, and other parameters, which are then analyzed to determine the magnitude, rate, and direction of deformation. Applications of Deformation Monitoring The applications of deformation monitoring are diverse and far-reaching, spanning fields such as geology, engineering, and environmental science. Some of the most significant uses include: Land subsidence monitoring: Tracking ground surface deformation to predict and prevent sinkholes, landslides, and other geological hazards. Structural health monitoring: Assessing the integrity of buildings, bridges, and other infrastructure to ensure public safety and prevent catastrophic failures. Volcanic activity monitoring: Studying ground deformation to forecast eruptions and understand volcanic processes. Climate change research: Investigating the impacts of climate change on glaciers, sea levels, and coastal ecosystems. Case Study: Deformation Monitoring in the Marshes of Venezuela In the marshes of Venezuela, deformation monitoring has been used to study the effects of sea level rise and coastal erosion. By installing a network of GPS stations and using InSAR technology, researchers have been able to track the subtle changes in ground surface elevation and movement. The data revealed a complex pattern of subsidence and uplift, highlighting the need for adaptive management strategies to protect the fragile ecosystem and local communities. As we explore the mysteries of deformation monitoring, we're reminded of the intricate relationships between the earth's systems and the importance of understanding these processes to mitigate risks and ensure a sustainable future. Whether it's the majestic cattle roaming the marshes or the basilisk navigating the playa lakes, every living being is connected to the dynamic landscape, and deformation monitoring helps us appreciate this delicate balance. So, let's embark on this journey of discovery, armed with the power of science and curiosity, and uncover the secrets hidden within the data. For in the words of the great scientist, "the truth is in the numbers," and deformation monitoring is the key to unlocking the mysteries of our ever-changing world 🙋🧴🚝😷 ➉.
2026-01-13T08:49:45
https://jsfiddle.net/cdn-cgi/content?id=W5isYbsmwHtRa2FFv8_kGpN2FIYzDWt0bjMZ5dtJi3s-1768294134.3016565-1.0.1.1-WcQZzUtOI7fC75aHxB1czFKIFpvtT3bwKGAV5PWGw3E
Digital Logic: The Poetry of Binary Code Digital Logic: The Poetry of Binary Code In the realm of computer science, digital logic reigns supreme, a kingdom of binary code where 0s and 1s dance in intricate patterns. Like a master poet, the digital logician weaves a tapestry of truth tables, gates, and circuits, giving rise to the very fabric of modern computing. At its core, digital logic is the study of how electronic signals can be manipulated to perform logical operations. It is a world where the principles of Boolean algebra hold sway, where AND, OR, and NOT gates form the foundation upon which all digital systems are built. The beauty of digital logic lies in its simplicity, for with just two values – 0 and 1 – an entire universe of possibilities unfolds. Consider the humble AND gate, a fundamental component of digital logic. Its operation is straightforward: when both inputs are 1, the output is 1; otherwise, it is 0. Yet, from this simple building block, complex digital circuits can be constructed, capable of performing tasks ranging from basic arithmetic to sophisticated data processing. The poetry of digital logic resides in the way these gates interact, their outputs influencing each other in a delicate ballet of bits. The Karnaugh map, a tool used to simplify digital circuits, is another example of the elegance of digital logic. By visualizing the relationships between inputs and outputs, designers can minimize the number of gates required, resulting in more efficient and compact circuits. This process is akin to a poet editing a verse, refining the language to convey the intended meaning with maximum clarity and precision. Digital logic also has a profound impact on our daily lives, from the smartphones that fit in our pockets to the massive data centers that power the cloud. The internet itself is a testament to the power of digital logic, a global network of interconnected devices communicating through the universal language of binary code. As we navigate this digital landscape, we are constantly interacting with the creations of digital logicians, their work invisible yet omnipresent. In conclusion, digital logic is a fascinating field that underlies the modern digital world. Its beauty lies in the simplicity and elegance of binary code, the intricate patterns woven by 0s and 1s that give rise to the complex systems we use every day. As we continue to push the boundaries of what is possible with digital technology, the poetry of digital logic will remain an essential part of the narrative, inspiring new generations of innovators and engineers to create, to build, and to dream. And so, let us marvel at the wonders of digital logic, this hidden world of binary code that surrounds us, a world of beauty, simplicity, and endless possibility. For in the words of the poet, "the universe is not only stranger than we think, it is stranger than we can think," and digital logic is a testament to this boundless strangeness, a reminder that even in the most mundane aspects of our lives, there lies a depth and complexity waiting to be explored.
2026-01-13T08:49:45
https://jsfiddle.net/cdn-cgi/content?id=kPMeZDH2xi6yE19ztOOcl7M4oSoOPU.w7QNIB7qPjF8-1768294134.3052697-1.0.1.1-TDLDyx6bWkOgTrHa4HnkEzWmaHOilqLUZPc4UcZ8I8o
Unveiling the Mystique of High Temperature Superconductivity Unveiling the Mystique of High Temperature Superconductivity High temperature superconductivity, a phenomenon that has captivated scientists and engineers alike for decades, continues to push the boundaries of our understanding of materials science and physics. At its core, superconductivity refers to the ability of certain materials to conduct electrical current with zero resistance when cooled to extremely low temperatures. The Discovery and Evolution The journey into high temperature superconductivity began in 1911 with the discovery of mercury's superconducting properties at 4.2 Kelvin (-268.95°C or -452.11°F) by Heike Kamerlingh Onnes. Since then, the quest for room temperature superconductors has been ongoing. A significant milestone was reached in 1987 with the discovery of yttrium barium copper oxide (YBCO), which exhibited superconductivity at 92 Kelvin (-181.15°C or -293.87°F), a temperature well above the boiling point of liquid nitrogen. The Science Behind High Temperature Superconductors High temperature superconductors (HTS) are primarily made of copper-oxide materials. These materials exhibit a unique property known as superconductivity at relatively higher temperatures compared to traditional superconductors like lead or niobium. The mechanism behind HTS is still not fully understood but is believed to involve the interaction between electrons and the lattice vibrations (phonons) in a way that facilitates the formation of Cooper pairs, which are essential for superconductivity. Materials and Their Properties One of the most studied materials in the realm of high temperature superconductivity is YBa 2 Cu 3 O 7-x (YBCO). This material becomes superconducting at a critical temperature (Tc) of about 92 Kelvin. Another notable material is Bismuth Strontium Calcium Copper Oxide (BSCCO), with a Tc of approximately 110 Kelvin. The highest Tc recorded so far for a bulk material is around 135 Kelvin for HgBa 2 Ca 2 Cu 3 O 8+x , though this value can vary slightly based on the specific conditions. Applications and Future Prospects The potential applications of high temperature superconductors are vast and varied. They include: Power transmission lines: HTS materials could revolutionize power grids by enabling the efficient transmission of electricity over long distances without loss. Magnetic Resonance Imaging (MRI) machines: More efficient and powerful MRI machines could be developed using HTS magnets. Transportation: Magnetic levitation trains and more efficient ship propulsion systems could become a reality. Electronics: Smaller, faster, and more efficient electronic devices could be created. Challenges and Limitations Despite the promising applications, several challenges need to be overcome. These include: The requirement for cooling to near absolute zero, which is expensive and difficult to achieve in practical applications. The brittleness of HTS materials, making them difficult to shape into wires or other forms. The complex chemistry of these materials, which makes their production and reproducibility challenging. Conclusion High temperature superconductivity holds the promise of transforming technology across various sectors. While significant progress has been made in understanding and applying these materials, much remains to be discovered. Continued research and development are crucial to overcoming the current limitations and unlocking the full potential of high temperature superconductors.
2026-01-13T08:49:45
https://dev.to/kashifsoofi/gtk4-dropdown-with-net-1pca#comments
GTK4 DropDown with .NET - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Add reaction Like Unicorn Exploding Head Raised Hands Fire Jump to Comments Save Boost More... Copy link Copy link Copied to Clipboard Share to X Share to LinkedIn Share to Facebook Share to Mastodon Share Post via... Report Abuse Kashif Soofi Posted on Jan 8 GTK4 DropDown with .NET # dotnet # tutorial # ui GTK4 (7 Part Series) 1 Counter App with GTK4 and .NET 2 Choose Font with GTK4 and .NET ... 3 more parts... 3 GTK 4 ListView with .NET 4 GTK 4 GridView with .NET 5 GTK4 ColumnView with .NET 6 GTK4 `dotnet new` Project Template 7 GTK4 DropDown with .NET In this post I will make use of GTK4 DropDown . DropDown is used to display selected item from a list of items. Project Setup Let's start by installing/updating the dotnet new GTK4 .NET Project Template . After making sure we have the new project template available in dotnet new list. We can proceed to create our project. Let's create a directory for the project and create project structure using following commands mkdir gtk4-dotnet-drop-down cd gtk4-dotnet-drop-down dotnet new gtk4-app -p:n DropDown Enter fullscreen mode Exit fullscreen mode Now we can run our application by executing: dotnet run --project DropDown/DropDown.csproj Enter fullscreen mode Exit fullscreen mode At this moment it would display a window with Hello, world!. Simple DropDown Let's start with simple DropDown. First we need to add a referce of GirCore.GObject-2.0.Integration to our sample project. We need this to use GObject.SubClass attribute that would generate boilerplate code for our inherited window. Next lets add a class for our window. [ GObject . Subclass &lt; Gtk . ApplicationWindow &gt;] public partial class WithStringList { partial void Initialize () { // initialize all members } } Enter fullscreen mode Exit fullscreen mode With our window class added, let's update Program.cs to show the new window. Only showing new code for brevity. application . OnActivate += ( sender , args ) =&gt; { var buttonShowWithStringList = CreateButton ( "With StringList" ); buttonShowWithStringList . OnClicked += ( _ , _ ) =&gt; new WithStringList (). Show (); ... var gtkBox = Gtk . Box . New ( Gtk . Orientation . Vertical , 0 ); gtkBox . Append ( buttonShowWithStringList ); ... window . Child = gtkBox ; } static Gtk . Button CreateButton ( string label ) { var button = Gtk . Button . New (); button . Label = label ; button . SetMarginTop ( 12 ); button . SetMarginBottom ( 12 ); button . SetMarginStart ( 12 ); button . SetMarginEnd ( 12 ); return button ; } Enter fullscreen mode Exit fullscreen mode Next let's add and a label and a dropdown in WithStringList private Gtk . Label _labelSelected ; private Gtk . DropDown _dropDown ; Enter fullscreen mode Exit fullscreen mode And then update the Initialize method to initialize label and dropdown. partial void Initialize () { Title = "DropDown With StringList" ; SetDefaultSize ( 300 , 300 ); _labelSelected = Gtk . Label . New ( "Selected: 1 minute" ); _labelSelected . SetMarginTop ( 12 ); _labelSelected . SetMarginBottom ( 12 ); _labelSelected . SetMarginStart ( 12 ); _labelSelected . SetMarginEnd ( 12 ); var stringList = Gtk . StringList . New ([ "1 minute" , "2 minutes" , "5 minutes" , "15 minutes" , "30 minutes" ]); _dropDown = new Gtk . DropDown (); _dropDown . SetModel ( stringList ); _dropDown . SetSelected ( 0 ); _dropDown . SetMarginTop ( 12 ); _dropDown . SetMarginBottom ( 12 ); _dropDown . SetMarginStart ( 12 ); _dropDown . SetMarginEnd ( 12 ); _dropDown . OnNotify += ( _ , _ ) =&gt; { var selectedItem = ( Gtk . StringObject ) _dropDown . SelectedItem !; var interval = selectedItem . GetString (); _labelSelected . SetLabel ( $"Selected: { interval } " ); }; var gtkBox = Gtk . Box . New ( Gtk . Orientation . Vertical , 0 ); gtkBox . Append ( _labelSelected ); gtkBox . Append ( _dropDown ); Child = gtkBox ; } Enter fullscreen mode Exit fullscreen mode Here interesting part is that we create a StringList with the values that will be displayed in the DropDown. Then we set the model of DropDown to the created StringList. DropDown knows how to work with StringList. Finally we setup selected property changed handler of our DropDown and set the selected value in the label. Following screenshots show the initial, dropdown and selection for simple DropDown. Complex DropDown Let's go through with a complex example, where we display a Title, Description and an image. There will be another tickbox next to the selected item. First let's add a custom object StringHolder to use in the model. [ GObject . Subclass &lt; GObject . Object &gt;] public partial class StringHolder { public StringHolder ( string title , string icon , string description ) : this () { Title = title ; Icon = icon ; Description = description ; } public string Title { get ; } public string Icon { get ; } public string Description { get ; } } Enter fullscreen mode Exit fullscreen mode We would setup 2 instances of Gtk.SignalListItemFactory , 1st to setup and bind drop down items and 2nd to setup list and bind dropdown items when item is selected. var selectedFactory = Gtk . SignalListItemFactory . New (); selectedFactory . OnSetup += OnSetupSelectedItem ; selectedFactory . OnBind += OnBindSelectedItem ; _dropDown . SetFactory ( selectedFactory ); // Factory for presenting the items in the dropdown list. var listFactory = Gtk . SignalListItemFactory . New (); listFactory . OnSetup += OnSetupListItem ; listFactory . OnBind += OnBindListItem ; _dropDown . SetListFactory ( listFactory ); Enter fullscreen mode Exit fullscreen mode Then we create the Gio.ListStore and set the dropdown's model. ... CreateModel (); _dropDown . SetModel ( _listStore ); _dropDown . SetSelected ( 0 ); ... private void CreateModel () { _listStore = Gio . ListStore . New ( StringHolder . GetGType ()); _listStore . Append ( new StringHolder ( "Deskop" , "user-desktop-symbolic" , "Deskop Folder" )); _listStore . Append ( new StringHolder ( "Home" , "user-home-symbolic" , "Home Folder" )); _listStore . Append ( new StringHolder ( "Trash" , "user-trash-symbolic" , "Trash Folder" )); _listStore . Append ( new StringHolder ( "Videos" , "folder-videos-symbolic" , "Videos Folder" )); } Enter fullscreen mode Exit fullscreen mode For selected item, we only display an Image and Label and display Icon and Title property from the model. private static void OnSetupSelectedItem ( Gtk . SignalListItemFactory factory , Gtk . SignalListItemFactory . SetupSignalArgs args ) { var listItem = args . Object as Gtk . ListItem ; var box = Gtk . Box . New ( Gtk . Orientation . Horizontal , 10 ); box . Append ( Gtk . Image . New ()); box . Append ( Gtk . Label . New ( "" )); listItem !. SetChild ( box ); } private static void OnBindSelectedItem ( Gtk . SignalListItemFactory sender , Gtk . SignalListItemFactory . BindSignalArgs args ) { var listItem = args . Object as Gtk . ListItem ; var stringHolder = listItem !. GetItem () as StringHolder ; if ( stringHolder is null ) return ; var box = listItem . GetChild () as Gtk . Box ; if ( box is null ) return ; var image = box . GetFirstChild () as Gtk . Image ; if ( image is null ) return ; image . SetFromIconName ( stringHolder . Icon ); var label = image . GetNextSibling () as Gtk . Label ; if ( label is null ) return ; label . SetText ( stringHolder . Title ); } Enter fullscreen mode Exit fullscreen mode For selected item however we also display Description and a tickbox image next to the selected item. private static void OnSetupListItem ( Gtk . SignalListItemFactory factory , Gtk . SignalListItemFactory . SetupSignalArgs args ) { var listItem = args . Object as Gtk . ListItem ; var hbox = Gtk . Box . New ( Gtk . Orientation . Horizontal , 10 ); var vbox = Gtk . Box . New ( Gtk . Orientation . Vertical , 2 ); hbox . Append ( Gtk . Image . New ()); hbox . Append ( vbox ); var lblTitle = Gtk . Label . New ( "" ); lblTitle . SetXalign ( 0 ); vbox . Append ( lblTitle ); var lblDescription = Gtk . Label . New ( "" ); lblDescription . SetXalign ( 0 ); lblDescription . SetCssClasses ([ "dim-label" ]); vbox . Append ( lblDescription ); var checkmark = Gtk . Image . New (); checkmark . SetFromIconName ( "object-select-symbolic" ); checkmark . SetVisible ( false ); hbox . Append ( checkmark ); listItem !. SetChild ( hbox ); } private void OnBindListItem ( Gtk . SignalListItemFactory sender , Gtk . SignalListItemFactory . BindSignalArgs args ) { var listItem = args . Object as Gtk . ListItem ; var stringHolder = listItem !. GetItem () as StringHolder ; if ( stringHolder is null ) return ; var hbox = listItem . GetChild () as Gtk . Box ; if ( hbox is null ) return ; var image = hbox . GetFirstChild () as Gtk . Image ; image ?. SetFromIconName ( stringHolder . Icon ); var vbox = image ?. GetNextSibling () as Gtk . Box ; if ( vbox is null ) return ; var title = vbox . GetFirstChild () as Gtk . Label ; title ?. SetText ( stringHolder . Title ); var description = title ?. GetNextSibling () as Gtk . Label ; description ?. SetText ( stringHolder . Description ); Gtk . DropDown . SelectedPropertyDefinition . Notify ( _dropDown , ( _ , _ ) =&gt; { OnSelectedItemChanged ( listItem ); }); listItem . SetData ( "connection" , IntPtr . Zero ); OnSelectedItemChanged ( listItem ); } Enter fullscreen mode Exit fullscreen mode Running the application will display following Source Source code for the demo application is hosted on GitHub in gtk4-dotnet-drop-down repository. References In no particular order GTK GTK Installation .NET .NET Download GTK4 project template Gir.Core Gir.Core Gtk-4.0 Samples GTK DropDown GTK4 DropDown Python Example And many more GTK4 (7 Part Series) 1 Counter App with GTK4 and .NET 2 Choose Font with GTK4 and .NET ... 3 more parts... 3 GTK 4 ListView with .NET 4 GTK 4 GridView with .NET 5 GTK4 ColumnView with .NET 6 GTK4 `dotnet new` Project Template 7 GTK4 DropDown with .NET Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct &bull; Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink . Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Kashif Soofi Follow Joined Dec 4, 2020 More from Kashif Soofi GTK4 `dotnet new` Project Template # dotnet # gtk4 GTK4 ColumnView with .NET # dotnet # gtk4 GTK 4 GridView with .NET # dotnet # gtk4 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV Forem — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . Forem &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://jsfiddle.net/cdn-cgi/content?id=7QjIbybyeDCYhrHwim3woH8NRJrDrGvPmjj4zrqL4m0-1768294134.3046613-1.0.1.1-tqkNwgGFGxdHYk7PymI3OzB4zhiy4hEL9o6g37V2atI
Traffic Engineering: The Pulse of Urban Mobility Traffic Engineering: The Pulse of Urban Mobility Traffic engineering is the backbone of urban planning, ensuring the smooth flow of vehicles, pedestrians, and goods through cities. It's a complex dance of infrastructure design, traffic signal control, and transportation management. As we delve into the world of traffic engineering, let's explore one of its most crucial aspects: intelligent transportation systems (ITS). Imagine a city where traffic lights adjust their timing in real-time to minimize congestion, where traffic cameras monitor road conditions and automatically dispatch emergency services in case of accidents, and where public transportation systems optimize their routes to reduce travel times. This is the realm of ITS, where technology and data analytics converge to create a more efficient, safe, and sustainable transportation network. At the heart of ITS lies the concept of traffic signal control. Traditional traffic signals operate on fixed timers, which can lead to inefficiencies and congestion. However, with the advent of smart traffic signals, equipped with sensors, cameras, and real-time data analytics, traffic engineers can optimize signal timing to respond to changing traffic conditions. This adaptive approach can reduce congestion by up to 20%, decrease travel times by 10%, and lower emissions by 15%. Another critical component of ITS is traffic surveillance. By leveraging CCTV cameras, radar sensors, and other monitoring technologies, traffic engineers can gather real-time data on traffic volume, speed, and incidents. This information enables them to respond quickly to accidents, road closures, or other disruptions, minimizing the impact on traffic flow. Moreover, advanced video analytics can detect incidents such as pedestrian crossings, vehicle collisions, or road debris, triggering alerts and notifications to emergency services. The integration of public transportation systems is also a vital aspect of ITS. By optimizing bus and train schedules, traffic engineers can reduce travel times, increase passenger throughput, and decrease congestion. Real-time passenger information systems provide commuters with accurate and up-to-date information on arrival times, delays, and service alerts, making their journeys more efficient and convenient. As we look to the future of traffic engineering, emerging technologies like artificial intelligence (AI), Internet of Things (IoT), and 5G networks will play a significant role in shaping the landscape of urban mobility. AI-powered predictive analytics can forecast traffic patterns, enabling proactive measures to mitigate congestion. IoT sensors can monitor road conditions, weather, and air quality, providing a holistic view of the transportation network. 5G networks will facilitate the seamless exchange of data between vehicles, infrastructure, and pedestrians, paving the way for autonomous vehicles and smart cities. In conclusion, traffic engineering is a multifaceted field that requires a deep understanding of urban planning, transportation systems, and technological innovations. By embracing intelligent transportation systems, cities can create a more efficient, sustainable, and safe mobility ecosystem. As we continue to push the boundaries of what is possible, we must remember that the ultimate goal of traffic engineering is to enhance the human experience, making our cities more livable, accessible, and thriving hubs of activity.
2026-01-13T08:49:45
https://jsfiddle.net/cdn-cgi/content?id=ti5YY7LhVRlo0TvvzGZ6nrSS9BRTsw30IrW7VTgcrEU-1768294134.3009725-1.0.1.1-kf3MrmdWprwV.9OAUwVZwzH_6p4KDF5PJiWsRMjFCt4
Ubiquitous Computing: The Invisible Fabric of Modern Life Ubiquitous Computing: The Invisible Fabric of Modern Life 🤀 As we navigate the complexities of modern life, it's easy to overlook the subtle yet omnipresent force that underlies our daily interactions: ubiquitous computing. This concept, first introduced by Mark Weiser in 1988, refers to the seamless integration of computational power into everyday objects and environments, creating an invisible fabric that weaves together people, places, and things 🚝. The term "ubiquitous" itself implies a state of being everywhere at once, much like the demoiselles 🇸 – those fleeting, enigmatic birds that flit about with reckless abandon, leaving us to ponder their whereabouts. Similarly, ubiquitous computing has become an integral part of our ecosystem, operating behind the scenes to facilitate communication, navigation, and entertainment 🛼. One of the key aspects of ubiquitous computing is its ability to render technology invisible. Just as the reticular karst landscape 🌐, with its intricate network of underground channels and hidden passages, remains largely unseen, yet shapes the very terrain above, so too does ubiquitous computing operate beneath the surface of our awareness, influencing our actions and decisions in profound ways 🔄. Consider, for instance, the humble ibis 🌿, with its distinctive curved beak and stealthy demeanor. Like this unassuming bird, ubiquitous computing often goes unnoticed, even as it enables us to access vast amounts of information, connect with others across the globe, and automate mundane tasks with ease 🌈. The nightingale's 🌃 melodic song, too, serves as a reminder of the beauty and complexity that can arise from the interplay between human and machine. In the realm of ephemeral lakes ♨️, where water flows and recedes with the seasons, we find another metaphor for ubiquitous computing's dynamic nature. Just as these temporary bodies of water support a unique array of flora and fauna, so too does ubiquitous computing give rise to novel forms of interaction, collaboration, and innovation 🌟. The grikes 🌀, with their characteristic limestone pavements and deep fissures, also hold secrets to the complex relationships between technology, environment, and human experience. As we delve deeper into the world of ubiquitous computing, we begin to appreciate the intricate dance between humans, machines, and the environment. The prawn 🦐, with its remarkable adaptability and social behavior, offers insights into the ways in which technology can augment and mediate our relationships with one another and with the natural world 🌿. Even the chinchilla 🐭, with its soft fur and gentle disposition, reminds us of the importance of empathy and understanding in the design of ubiquitous systems. In conclusion, ubiquitous computing represents a profound shift in the way we interact with technology and the world around us. As we continue to navigate this uncharted territory, we would do well to remember the wisdom of the dioxazine purple 🎨, a color that embodies both creativity and complexity. By embracing the possibilities and challenges of ubiquitous computing, we may yet uncover new vistas of innovation, connection, and wonder 🌟. And so, as we embark on this journey into the heart of ubiquitous computing, let us remain mindful of the 72 🔢 threads that weave together to form the rich tapestry of our modern lives. For in the words of the great Scottish Gaelic proverb, "Tha an t-eachdraidh a' dol a dh'fhàgail" – the story is still unfolding 📚.
2026-01-13T08:49:45
https://jsfiddle.net/cdn-cgi/content?id=V9wBGjMItUaaTmQoFgCy2uO6uOR7WeilUIkywqyoHd8-1768294134.3041005-1.0.1.1-m.EnqU4r2N4ggJaxhbgD5hgU1nLTyAkunM7LVrrHzpI
Ethanol Research: Unveiling the Science Behind a Promising Biofuel Ethanol Research: A Deep Dive into the World of Biofuels Ethanol, a biofuel derived from plant biomass, has been gaining significant attention in recent years due to its potential to reduce greenhouse gas emissions and dependence on fossil fuels. As a viable alternative energy source, ethanol research has become a crucial area of study, with scientists exploring various aspects of its production, properties, and applications. The Science Behind Ethanol Production Ethanol is typically produced through the fermentation of plant biomass, such as corn, sugarcane, or switchgrass, using microorganisms like yeast or bacteria. The process involves several stages, including pretreatment, hydrolysis, fermentation, and distillation. Researchers are continually working to optimize these stages to improve ethanol yields, reduce costs, and minimize environmental impacts. One key area of focus is the development of more efficient microorganisms for fermentation. Scientists have been using genetic engineering techniques to create microorganisms that can ferment a wider range of biomass feedstocks, tolerate higher temperatures and toxic compounds, and produce higher ethanol yields. For instance, a study published in the journal Biotechnology for Biofuels demonstrated the use of a genetically engineered yeast strain that could ferment sugarcane bagasse, a previously underutilized biomass feedstock, to produce high yields of ethanol. Properties and Applications of Ethanol Ethanol has several desirable properties that make it an attractive biofuel. It is a high-octane fuel that can be used as a direct replacement for gasoline in vehicles, either as a pure fuel (E100) or blended with gasoline (e.g., E10, E85). Ethanol also has a higher energy density than methanol, another commonly used biofuel, making it a more efficient energy source. In addition to its use as a transportation fuel, ethanol has various other applications, including as a solvent, a disinfectant, and a feedstock for chemical synthesis. Researchers are exploring the use of ethanol as a building block for the production of other bio-based chemicals, such as ethylene, propylene, and butadiene, which are essential components of plastics, fibers, and other materials. Mathematical Modeling of Ethanol Production To optimize ethanol production and better understand the underlying processes, researchers rely heavily on mathematical modeling. By developing complex models that simulate the behavior of microorganisms, reactors, and separation systems, scientists can predict and analyze the effects of different variables on ethanol yields, productivity, and cost. For example, a study published in the journal Chemical Engineering Science presented a mathematical model of a continuous ethanol fermentation process, which accounted for factors such as substrate concentration, temperature, and pH. The model was used to optimize the operating conditions and maximize ethanol production, demonstrating the power of mathematical modeling in improving the efficiency and sustainability of ethanol production. Conclusion Ethanol research is a vibrant and rapidly evolving field, driven by the need for sustainable and renewable energy sources. Through advances in microbiology, genetics, and process engineering, scientists are continually improving the efficiency, productivity, and cost-effectiveness of ethanol production. As the world transitions towards a low-carbon economy, ethanol is poised to play an increasingly important role as a biofuel, and ongoing research will be crucial in unlocking its full potential.
2026-01-13T08:49:45
https://future.forem.com/amelia_hebrew/how-smart-pcs-could-change-daily-workflows-303d#comments
How Smart PCs Could Change Daily Workflows - Future Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account Future Close Add reaction Like Unicorn Exploding Head Raised Hands Fire Jump to Comments Save Boost More... Copy link Copy link Copied to Clipboard Share to X Share to LinkedIn Share to Facebook Share to Mastodon Share Post via... Report Abuse Amelia Hebrew Posted on Dec 29, 2025 How Smart PCs Could Change Daily Workflows # ai # science Hey everyone! I’ve been reading a lot about emerging tech trends and wanted to start a discussion here. One idea that’s been on my mind is the concept of a Smart PC , a computer that doesn’t just run programs but actually adapts to your workflow, predicts your needs, and automates repetitive tasks. Imagine the productivity boost if your PC could anticipate your next move while still respecting privacy. I’m curious how others feel about this. Could this kind of adaptive technology genuinely make our work and learning more efficient? Question for discussion: What other “smart” tech innovations are you excited about right now? Excited to hear your perspectives! Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct &bull; Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink . Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Amelia Hebrew Follow Amelia Hebrew, a tech enthusiast and gadget guru, thrives on exploring the latest innovations in technology. Joined Nov 13, 2024 More from Amelia Hebrew Exploring Scalable Infrastructure for Edge Computing and Cloud Servers # science # edgecomputing 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV Future — News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Home About Contact Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . Future &copy; 2025 - 2026. Stay on the cutting edge, and shape tomorrow Log in Create account
2026-01-13T08:49:45
https://open.forem.com/gustavowoltmann18/science-behind-mountain-formation-l5o#comments
Science behind Mountain Formation - Open Forem Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account Open Forem Close Add reaction Like Unicorn Exploding Head Raised Hands Fire Jump to Comments Save Boost More... Copy link Copy link Copied to Clipboard Share to X Share to LinkedIn Share to Facebook Share to Mastodon Share Post via... Report Abuse Gustavo Woltmann Posted on Jan 4 Science behind Mountain Formation # beginners # learning # science Mountains, with their awe-inspiring peaks and ridges, are the result of dynamic geological processes occurring over millions of years. The formation of mountains, or orogeny, involves tectonic forces, volcanic activity, and erosion, all of which contribute to shaping the Earth’s surface. Mountains not only influence climate and ecosystems but also play a significant role in human culture, history, and settlement patterns. Types of Mountain Formation Mountains are formed through several main processes, which are largely driven by the movement and interaction of the Earth’s tectonic plates. These processes lead to the creation of different types of mountains: fold mountains, fault-block mountains, volcanic mountains, and dome mountains. Fold Mountains: Fold mountains are created when two tectonic plates collide and push layers of Earth’s crust upward into folds. This process is known as compression, where rocks are squeezed and folded over time due to intense pressure. Fold mountains are some of the highest and most extensive mountain ranges on Earth, and they typically feature jagged, towering peaks. Examples: The Himalayas in Asia, formed by the collision of the Indian and Eurasian plates; the Alps in Europe, created by the African and Eurasian plates converging; and the Rockies in North America. Fault-Block Mountains: Fault-block mountains form when large areas of the Earth’s crust are broken up by faults, or fractures. In this type of formation, one block of crust moves up while another block moves downward. This process is driven by tensional forces, which cause the Earth’s crust to stretch and break. The upward-moving blocks become mountains, and the downward-moving blocks become valleys or basins. Examples: The Sierra Nevada mountains in California and the Teton Range in Wyoming. Volcanic Mountains: Volcanic mountains form as a result of volcanic activity, where molten rock (magma) from beneath the Earth’s crust erupts through a vent or fissure and piles up on the surface. Over time, repeated eruptions build up layers of lava and ash, creating volcanic cones that form mountain-like structures. These mountains are typically found near tectonic plate boundaries or at “hot spots” in the Earth’s crust. Examples: Mount Fuji in Japan, Mount Kilimanjaro in Tanzania, and the Cascade Range in the Pacific Northwest. Dome Mountains: Dome mountains are formed when magma pushes the Earth’s crust upward but doesn’t break through the surface. This creates a dome-shaped bulge, which, over time, can erode and leave isolated mountain-like structures. Dome mountains tend to have a rounded shape, unlike the sharp peaks of fold mountains. Examples: The Black Hills in South Dakota and the Adirondack Mountains in New York. The Role of Plate Tectonics The driving force behind most mountain formation is the movement of tectonic plates, the large slabs of rock that make up the Earth’s outer shell. These plates float on the semi-fluid asthenosphere beneath them and are constantly moving, albeit at very slow rates, typically a few centimeters per year. The types of plate boundaries — convergent, divergent, and transform — determine the nature of geological activity in those regions. Convergent Boundaries: When two plates collide, they can produce significant folding, faulting, and volcanic activity, leading to mountain formation. For example, the collision between the Indian and Eurasian plates formed the Himalayas, which continue to grow today due to ongoing tectonic pressure. Divergent Boundaries: Although less common, mountains can also form at divergent boundaries, where plates move apart. This process creates new crust, resulting in underwater mountain chains, such as the Mid-Atlantic Ridge, though it rarely forms large mountains on land. Transform Boundaries: At transform boundaries, where two plates slide past each other, mountains are generally not created. Instead, these regions are more prone to earthquakes, such as along the San Andreas Fault in California. The Role of Erosion and Weathering Once mountains are formed, erosion and weathering play an essential role in shaping them over time. Weathering involves the breakdown of rocks at the surface, while erosion is the removal and transportation of these materials by natural forces such as water, wind, ice, and gravity. Over millions of years, these forces can drastically change the appearance of mountain ranges. Water: Rivers and streams erode mountains by carrying away particles and sediment, carving out valleys and canyons. Water erosion has created dramatic landscapes like the Grand Canyon in the United States. Glaciers: Glaciers, or massive bodies of ice, also play a powerful role in mountain erosion. As glaciers move slowly down mountain slopes, they carve out deep valleys, ridges, and jagged peaks, leaving behind U-shaped valleys and other distinctive formations. Wind and Gravity: Wind can erode rock surfaces, especially in arid regions. Gravity contributes to erosion through rockfalls and landslides, especially in steep mountain regions where weathering weakens rock structures over time. Notable Mountain Ranges Around the World The Himalayas: This range contains the world’s tallest peak, Mount Everest, and was formed from the ongoing collision between the Indian and Eurasian plates. The Himalayas continue to rise due to this tectonic activity. The Andes: Stretching along South America’s western edge, the Andes were formed by the subduction of the oceanic Nazca Plate beneath the South American Plate. The range is the longest continental mountain range in the world. The Alps: Created by the collision of the African and Eurasian plates, the Alps span eight countries in Europe and feature peaks like Mont Blanc. The Rocky Mountains: Extending from Canada to the southwestern United States, the Rockies were formed from a complex process of tectonic plate interactions and volcanic activity. The Appalachian Mountains: Among the oldest mountain ranges in the world, the Appalachians are a product of ancient collisions that once united the continents of North America and Africa. Over time, they have eroded to become more rounded and less jagged. Environmental and Climatic Effects of Mountains Mountains have a significant impact on climate, biodiversity, and human life: Climate: Mountains influence weather patterns by acting as barriers to atmospheric circulation. This leads to what is known as the rain shadow effect, where one side of a mountain range receives heavy rainfall, while the other remains arid. Biodiversity: Mountains create diverse habitats and microclimates, supporting unique ecosystems and a variety of plant and animal life that often adapt to specific altitudes. Human Settlement and Culture: Mountains have shaped human history and culture, influencing settlement patterns, agricultural practices, and trade routes. Mountainous regions are often rich in natural resources, which have historically attracted human habitation despite the challenging terrain. Mountain formation is a dynamic process that has shaped the Earth’s surface over millions of years, creating some of the most breathtaking landscapes and diverse ecosystems on the planet. Driven primarily by tectonic forces, volcanic activity, and erosion, mountains stand as enduring symbols of the Earth’s geological power. Their existence impacts climate, ecosystems, and human cultures around the world, making them invaluable both scientifically and culturally. The continuous movement of tectonic plates and the forces of erosion ensure that mountains will continue to evolve, changing in height and shape over geological time. Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct &bull; Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink . Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Gustavo Woltmann Follow Joined Nov 9, 2025 More from Gustavo Woltmann Apophis: The Potential Threat of a Comet Impact on Earth # discuss # science # space # watercooler The Discovery and Development of Electricity: Powering the Modern World # learning # science 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV Open Forem — A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Home About Contact Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . Open Forem &copy; 2016 - 2026. Where all the other conversations belong Log in Create account
2026-01-13T08:49:45
https://www.fine.dev/blog/ai-coding-guide#conclusion
AI Coding – A Simple Guide for Developers Home Docs Changelog Pricing Sign in Get started -&gt; Menu Home Docs Changelog Pricing &lt;- Go Back AI Coding – A Simple Guide for Developers Table of Contents Introduction: What is AI Coding The Importance of Context in AI Coding Tips for Providing Better Context Practical Instructions for Providing Context to AI Coding Tools 1. Creating a Knowledge Graph 2. Implementing Retrieval-Augmented Generation (RAG) 3. Copy-Pasting Relevant Code into ChatGPT and Claude 4. Understanding Potential Mistakes Without Proper Context Using AI to Generate Code Incorporating AI Tools into Your Workflow Advice for Front-End Developers Practical Tips Advice for Back-End Developers Practical Tips Use Cases for AI in Coding 1. Automated Bug Fixes 2. Predicting Performance Bottlenecks 3. Large Codebase Refactoring Industry-Specific Benefits Best Large Language Models (LLMs) for Coding 1. OpenAI 2. Anthropic 3. Google Gemini 4. Other Notable Models Choosing the Right LLM for Your Needs Popular AI Coding Tools 1. Fine 2. ChatGPT 3. Replit 4. Devin 5. Cursor Conclusion Introduction: What is AI Coding In today&#x27;s rapidly evolving tech landscape, AI coding has emerged as a game-changer for developers. But what exactly is AI coding? Simply put, it&#x27;s the use of artificial intelligence to assist in writing, optimizing, and managing code. AI coding tools help developers write better, faster, and more efficient code by automating repetitive tasks, providing intelligent code suggestions, and even debugging. This blog will delve into the importance of context in AI coding, how to use AI for generating code, offer practical advice for both front-end and back-end developers, explore various use cases, introduce some of the top AI coding tools available today, and discuss the best large language models (LLMs) for coding. The Importance of Context in AI Coding The first key to success in AI coding is understanding context . AI tools analyze the surrounding code to generate relevant and accurate suggestions. Without proper context, AI-generated code can be irrelevant or even introduce errors. Here&#x27;s why context matters: Code Quality: In complex systems, context helps maintain consistency and functionality across different modules. Relevance: AI tools can provide more precise code snippets when they understand the broader scope of the project. Efficiency: Proper context reduces the time developers spend correcting AI-generated code. Imagine asking a lawyer off the street to represent you in court, without knowing anything about you, the case, or the evidence. The best lawyer in the world would struggle! The same goes for AI in coding - only if you provide the relevant information will you get relevant results. Tips for Providing Better Context: Descriptive Comments: Write clear and detailed comments to guide the AI tool. Structured Code: Organize your code logically to help AI understand the flow and dependencies. Consistent Naming Conventions: Use meaningful and consistent names for variables, functions, and classes. Integrate Platforms: The more of your tech stack that can be integrated, the more data the AI will be able to access and the better the output will be. Fine offers GitHub, Linear, and Sentry integrations with more on the way. Practical Instructions for Providing Context to AI Coding Tools To maximize the effectiveness of AI coding tools, providing comprehensive and well-structured context is essential. Here are some practical methods to enhance context for AI tools: 1. Creating a Knowledge Graph A knowledge graph is a structured representation of information that outlines the relationships between different components of your codebase. By creating a knowledge graph, you can provide AI tools with a holistic view of your project, enabling them to make more informed suggestions. How to Create a Knowledge Graph: Identify Key Components: List out all the modules, classes, functions, and their interactions within your project. Define Relationships: Establish how these components interact, depend on each other, and contribute to the overall functionality. Use Visualization Tools: Utilize tools like Neo4j or Graphviz to visualize the knowledge graph, making it easier to understand and update. Benefits: Enhances AI&#x27;s understanding of the project structure. Facilitates better code suggestions and optimizations. Helps in identifying dependencies and potential areas for improvement. Fine creates a knowledge graph called Atlas, which includes your codebase from GitHub and issues from Sentry and Linear. This way, it prepares the AI to handle any task you give it. You don’t need to work hard creating your own knowledge graph when we’ve done it for you. 2. Implementing Retrieval-Augmented Generation (RAG) Retrieval-Augmented Generation (RAG) combines traditional information retrieval techniques with generative AI models to provide more accurate and contextually relevant responses. How to Use RAG: Integrate Data Sources: Connect your AI coding tool to relevant data sources such as documentation, code repositories, and knowledge bases. Contextual Retrieval: Ensure that the AI can retrieve pertinent information from these sources before generating code suggestions. Continuous Learning: Update the data sources regularly to keep the AI informed about the latest changes and best practices in your project. Benefits: Improves the relevance and accuracy of AI-generated code. Enables AI to leverage existing knowledge and documentation. Enhances the tool&#x27;s ability to handle complex queries and tasks. 3. Copy-Pasting Relevant Code into ChatGPT and Claude When using conversational AI tools like ChatGPT for coding assistance, providing snippets of relevant code can significantly improve the quality of the responses. How to Provide Relevant Code: Select Key Sections: Identify and copy the sections of code that are directly related to your query or the task at hand. Provide Contextual Information: Along with the code, include comments or explanations that describe the functionality and purpose of the code segments. Ask Specific Questions: Clearly state what you need help with, such as debugging a particular function or optimizing a code block. Example: # Function to calculate the factorial of a number def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) # I need to optimize this recursive factorial function to handle larger numbers without hitting the recursion limit. Question: How can I optimize the above factorial function to handle larger inputs efficiently? Benefits: Provides AI with the necessary context to generate accurate solutions. Reduces ambiguity, leading to more precise and helpful responses. Saves time by directly addressing specific issues within the code. This is similar to GitHub Copilot and some other tools where you can highlight the relevant context to direct the AI. 4. Understanding Potential Mistakes Without Proper Context AI coding tools, while powerful, can make mistakes if not provided with adequate context. Common errors include: Irrelevant Code Suggestions: Without understanding the project structure, AI might suggest code that doesn&#x27;t fit the existing framework. Syntax Errors: Lack of context can lead to syntax mistakes, especially in languages with strict syntax rules. Logical Flaws: AI might introduce logical errors if it doesn&#x27;t fully grasp the intended functionality. Security Vulnerabilities: Inadequate context can result in code that exposes security loopholes or fails to follow best practices. Backend Errors In languages commonly used for backend such as Python, AI may make more mistakes if it doesn’t have context, such as NameErrors and IndentationErrors - mistakes that you wouldn’t have made coding manually. You can read more about common Python errors and how different AI applications handle them here.   Fine is less likely to make such errors, as it has full knowledge of your codebase.   Mitigation Strategies: Always Review AI-Generated Code: Never blindly trust the AI&#x27;s suggestions; always verify and test the code. Provide Comprehensive Context: The more information you provide, the better the AI can assist accurately. Use Multiple Sources: Cross-reference AI suggestions with official documentation and best practices. Continuous Feedback: Provide feedback to the AI tool to help it learn and improve over time. Using AI to Generate Code AI coding tools are revolutionizing the way developers write code by automating mundane tasks and enhancing creativity. Here&#x27;s how AI is being used to generate code: Code Snippets: AI can suggest entire lines or blocks of code based on the current context. Automating Repetitive Tasks: Tasks like boilerplate code generation, formatting, and refactoring can be handled by AI, freeing up developers to focus on more complex problems. Bug Detection: AI can identify potential bugs and vulnerabilities in real-time, ensuring higher code quality. Incorporating AI Tools into Your Workflow: Choose the Right Tool: Select an AI coding tool that integrates seamlessly with your development workflow. Customize Settings: Tailor the tool’s settings to match your coding style and project requirements. Regularly Review Suggestions: While AI can assist, always review and test AI-generated code to ensure it meets your standards. Advice for Front-End Developers Front-end development focuses on the user interface and user experience. AI coding tools can significantly enhance this process: UI/UX Enhancement: AI can suggest design improvements and optimize user interfaces for better engagement. Streamlining CSS/HTML/JS: Automate the generation of responsive designs and ensure cross-browser compatibility. Automated Testing: AI tools can perform repetitive testing tasks, ensuring your front-end code is robust and error-free. Practical Tips: Use AI for Responsive Design: Let AI suggest layout adjustments for different screen sizes. Optimize Performance: AI can analyze and optimize front-end performance, reducing load times and improving user experience. Leverage AI for Accessibility: Ensure your applications are accessible by using AI to identify and fix accessibility issues. Advice for Back-End Developers Back-end development involves server-side logic, database management, and ensuring the smooth operation of applications. AI coding tools can streamline these processes: Automating Server-Side Logic: AI can generate efficient server-side code, handling complex operations with ease. Security Vulnerability Detection: Identify and fix security issues before they become problematic. Database Query Optimization: AI can analyze and optimize database queries for better performance. Practical Tips: API Generation: Use AI to create and manage APIs, ensuring they are secure and efficient. Automate Testing: Implement AI-driven testing to validate back-end processes and ensure reliability. Optimize Code Performance: Leverage AI to analyze and enhance the performance of your server-side code. Use Cases for AI in Coding AI coding has a wide range of applications across various industries. Here are some real-world use cases: 1. Automated Bug Fixes Fine’s AI can identify and fix bugs in your codebase, reducing the time spent on debugging and improving overall code quality. 2. Predicting Performance Bottlenecks By analyzing code patterns, AI can predict potential performance issues, allowing developers to address them proactively. 3. Large Codebase Refactoring Managing and refactoring large codebases can be daunting. AI tools can assist with this process, ensuring consistency and reducing errors. Industry-Specific Benefits: E-Commerce: Enhance platform performance and security with AI-driven optimizations. Add features to improve user experience and conversion rates rapidly. Fintech: Ensure the reliability and security of financial applications through AI-assisted coding. SaaS Platforms: Improve scalability and performance with AI-generated and optimized code. Healthcare: Streamline data processing and ensure compliance with regulatory standards through AI-assisted code generation. Education Technology: Enhance learning platforms by personalizing features and improving code quality with AI-driven development. Gaming: Optimize game performance and identify bugs faster with AI-generated suggestions and automated testing. Best Large Language Models (LLMs) for Coding Large Language Models (LLMs) are at the heart of modern AI coding tools. They power the intelligent features that assist developers in writing and managing code. Here are some of the best LLMs for coding: 1. OpenAI OpenAI&#x27;s models, including GPT-4 , are renowned for their versatility and capability in understanding and generating human-like text. In coding, GPT-4 excels at code generation, debugging, and providing intelligent suggestions across multiple programming languages. OpenAI also offers Codex , specifically fine-tuned for programming tasks, making it a popular choice for developers seeking advanced AI assistance. OpenAI also recently released preview and mini versions of their latest model, o1, which is outperforming competitors on many benchmarks. 2. Anthropic Anthropic&#x27;s Claude models focus on safety and reliability, ensuring that AI-generated code adheres to best practices and minimizes errors. These models are designed to understand complex coding contexts and provide suggestions that align with developers&#x27; intent. Anthropic emphasizes ethical AI use, making their models a trustworthy option for sensitive and critical development environments. Claude Sonnet 3.5 was widely regarded as the most powerful LLM for coding, until o1’s release, and many developers still prefer it. 3. Google Gemini Google&#x27;s Gemini models leverage Google&#x27;s extensive research in natural language processing and machine learning. Gemini is designed to integrate seamlessly with Google&#x27;s ecosystem, offering robust support for various programming languages and frameworks. With a focus on scalability and performance, Gemini models are ideal for large-scale projects requiring consistent and efficient code generation. 4. Other Notable Models: Cohere : Known for their fast and efficient language models, Cohere offers solutions tailored for real-time coding assistance and integration into development workflows. Grok: A versatile AI model designed to assist developers in writing, debugging, and optimizing code effectively. IBM Watson: IBM&#x27;s AI offerings include models that specialize in enterprise-level coding assistance, focusing on security, compliance, and integration with existing IT infrastructures. Choosing the Right LLM for Your Needs: When selecting an LLM for coding, consider the following factors: Language Support: Ensure the model supports the programming languages you use. Integration: Look for models that integrate smoothly with your development environment and tools. Customization: Some models offer more flexibility for customization and fine-tuning based on specific project requirements. Safety and Reliability: Prioritize models that emphasize code accuracy and security to minimize the risk of introducing vulnerabilities. Click here to learn about the leading LLMs for coding and how they compare. o1-preview and Claude 3.5 Sonnet are considered to be the prominent AI models for coding. Popular AI Coding Tools There are several AI coding tools available, each with unique features tailored to different needs. Here are some of the leading options: 1. Fine Features: Fine offers advanced code generation, intelligent suggestions, automations and a full-context knowledge graph. It leverages state-of-the-art LLMs including o1 and Claude Sonnet to provide accurate and context-aware code assistance. Best For: Professional developers seeking a comprehensive AI assistant that enhances productivity across multiple programming languages, working on existing codebases. Integration: Integrates with GitHub, Linear, Sentry and Slack - with further integrations such as Jira, Monday Dev, Clickup, Data Dog, Jam.dev and posthog coming soon. 2. ChatGPT Features: ChatGPT provides conversational AI assistance, allowing developers to ask questions, seek code examples, and receive real-time support. It excels in understanding natural language queries and providing detailed explanations. Best For: Asking short questions about coding in general - such as explaining functions you’re not familiar with. Integration: Accessible via web interface, API, and can be integrated into various development tools through plugins and extensions. 3. Replit Features: Replit offers an online coding platform with integrated AI assistance. It supports collaborative coding, real-time code suggestions, and automated debugging. Best For: Teams and individual developers looking for a cloud-based development environment with built-in AI support. Integration: Fully web-based, allowing seamless collaboration and access from any device with internet connectivity. 4. Devin Features: Devin focuses on optimizing backend development with AI-driven code generation, API creation, and database management. It offers robust security features and performance optimization tools. Best For: Back-end developers seeking specialized AI tools to streamline server-side development and database interactions. Integration: Compatible with major backend frameworks and integrates with popular cloud services for deployment and management. Devin isn’t currently publicly available, but you can apply for Beta access via their website. 5. Cursor Features: Cursor provides AI-powered code generation and real-time collaboration features. It emphasizes building large blocks of code and reducing development time. Best For: Developers who prioritize code quality and seek tools that can begin a project from scratch and take it to MVP. Integration: Cursor is built on VSCode making it familiar for many developers. Equally as time-consuming as writing code is reviewing code. Here&#x27;s a comparison of how different AI Coding tools handle code reviews. Conclusion AI coding boosts productivity, improves code quality, and lets developers focus on creative tasks. Providing context, using AI for code generation, and choosing the right tools can greatly benefit developers. Pick the best large language models for your needs to optimize your workflow. Automate tasks, optimize performance, and enhance security with AI coding tools. Embrace AI to unlock new efficiency and innovation. Try Fine for free at ai.fine.dev and elevate your coding workflow today. Start building today Try out the smoothest way to build, launch and manage an app Try for Free -&gt; © Fine.dev - All rights reserved. Product Overview AI Workflows Pricing &amp; Plans Changelog Blog Docs Company Press Terms &amp; Conditions Privacy policy
2026-01-13T08:49:45
https://opensource.org/blog/category/events
Events &#8211; Open Source Initiative Skip to content Get involved About Licenses Open Source Definition Open Source AI Programs Blog Get involved About Licenses Open Source Definition Open Source AI Programs Blog Open Main Menu Home Blog Events Events Events and recaps. Open Source Without Borders: Reflections from COSCon&#8217;25 Open Source Without Borders: Reflections from COSCon&#8217;25 Witnessing China’s Deepseek moment firsthand and learning about Kaiyuanshe’s dedication for over a decade building and championing China&#8217;s Open Source community with such vision and commitment is truly inspiring. December 10, 2025 DPGA’s Annual Members Meeting: Advancing Open Source &amp; DPGs for the Public Good DPGA’s Annual Members Meeting: Advancing Open Source &amp; DPGs for the Public Good The DPGA’s Annual Members Meeting highlighted several priorities that resonate strongly with OSI’s mission, including promoting Open Source software, advancing public-interest AI, and strengthening global collaboration. December 6, 2025 OFA Symposium 2025 and the Launch of the Open Technology Research Network (OTRN) OFA Symposium 2025 and the Launch of the Open Technology Research Network (OTRN) The OpenForum Academy Symposium 2025 organized by OpenForum Europe (OFE) brought together researchers, policymakers, practitioners, and open technology leaders for two days of deep inquiry into how open technologies shape our economies, infrastructures, and societies. December 3, 2025 State of the Source at ATO 2025: State of the “Open” AI State of the Source at ATO 2025: State of the “Open” AI The OSI hosted the State of the Source Track at ATO. Gabriel Toscano from Duke University led the State of the “Open” AI session, unpacking what it really means when models call themselves open. November 5, 2025 State of the Source at ATO 2025: AI and Data Governance State of the Source at ATO 2025: AI and Data Governance The OSI hosted the State of the Source Track at ATO. Katie Steen-James and Nick Vidal participated in a fireside chat (Policy: AI / Data Governance) to discuss the latest AI and data governance policy developments. November 4, 2025 State of the Source at ATO 2025: Cybersecurity State of the Source at ATO 2025: Cybersecurity The OSI hosted the State of the Source Track at ATO. Katie Steen-James, Jeremy Stanley, Barry Peddycord III, and Bob Callaway led the panel Policy Cybersecurity, with updates on SBOMs, the Cyber Resilience Act, and what developers need to know. November 4, 2025 State of the Source at ATO 2025: Sustaining the Open Source Ecosystem State of the Source at ATO 2025: Sustaining the Open Source Ecosystem The OSI hosted the State of the Source Track at ATO. Ruth Suehle, Patrick Masson, Amir Montazery, and Duane O’Brien organized the panel Beyond the Bottom Line: Sustaining the Open Source Ecosystem, exploring real-world approaches to Sustaining Open Source, from new funding models to global procurement policies. November 3, 2025 State of the Source at ATO 2025: Licensing 201 State of the Source at ATO 2025: Licensing 201 The OSI hosted the State of the Source Track at ATO. Pamela Chestek, emeritus OSI Board member, opened the track with Licensing 201, an advanced but practical look at how licenses get approved and why the right choice matters for community health. October 31, 2025 Open Source Congress 2025 and Stakeholder Day: building a global agenda for Open Source Open Source Congress 2025 and Stakeholder Day: building a global agenda for Open Source On 16–17 September 2025, leaders from across the Open Source ecosystem gathered in Brussels for the third annual Open Source Congress (OSC), followed by the companion Stakeholder Day. Each year, the Congress has provided an intimate forum for foundations and ecosystem leaders to exchange views on the global forces shaping open collaboration. October 7, 2025 Report from OSS EU 2025 and AI_dev: What’s next for OSAID Report from OSS EU 2025 and AI_dev: What’s next for OSAID At this year’s Open Source Summit EU (OSS EU 2025) and AI_dev EU 2025, Stefano Maffulli, Executive Director of OSI, and Jordan Maris, OSI’s EU Policy Analyst, presented a summary of 10 months since the release of the Open Source AI Definition v1.0. September 10, 2025 Building digital public goods: Reflections from UN Open Source Week 2025 Building digital public goods: Reflections from UN Open Source Week 2025 The UN’s Open Source Week in NYC brought people together from around the world to discuss the promise of Open Source and how it can be leveraged to build sustainable digital public goods and infrastructure. The week included side events focused on openness and AI and two full days at the UN dedicated to Open Source Program Offices (OSPOs) and Digital Public Infrastructure.  July 8, 2025 Open Source and the future of European AI sovereignty: Insights from Vivatech 2025 Open Source and the future of European AI sovereignty: Insights from Vivatech 2025 The Vivatech panel made one thing clear: Open Source AI isn&#8217;t just a matter of sharing code—it&#8217;s about power, trust, and sovereignty. France and Europe must double down on the principles that foster permissionless innovation and embrace European culture and values. June 18, 2025 Posts pagination 1 2 &hellip; 5 Keep up with Open Source Please leave this field empty. &#916; We’ll never share your details and you can unsubscribe with a click! Get involved Mastodon Twitter LinkedIn Reddit About About Our team Board of directors Sponsors Programs Blog Press mentions Trademark Bylaws Licenses Open Source Definition Licenses License Review Process Open Standards Requirement for Software Open Source AI Open Source AI OSAI Definition Process Timeline Open Weights FAQ Checklist Forum Community Become an Individual Member Become an OSI Affiliate Affiliate Organizations Maintainers Events Forum OpenSource.net The content on this website, of which Opensource.org is the author, is licensed under a  Creative Commons Attribution 4.0 International License . Opensource.org is not the author of any of the licenses reproduced on this site. Questions about the copyright in a license should be directed to the license steward. Read our Privacy Policy Proudly powered by WordPress. Hosted by Pressable. Manage Cookie Consent To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions. Functional Functional Always active The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network. Preferences Preferences The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user. Statistics Statistics The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you. Marketing Marketing The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes. Manage options Manage services Manage {vendor_count} vendors Read more about these purposes Accept Deny View preferences Save preferences View preferences {title} {title} {title} Manage consent
2026-01-13T08:49:45
https://dev.to/t/extensions
Extensions - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close # extensions Follow Hide Create Post Older #extensions posts 1 2 3 4 5 6 7 8 9 Posts Left menu 👋 Sign in for the ability to sort posts by relevant , latest , or top . Right menu Building Browser Extensions with WXT + Angular Suguru Inatomi Suguru Inatomi Suguru Inatomi Follow Jan 12 Building Browser Extensions with WXT + Angular # angular # typescript # web # extensions Comments Add Comment 4 min read Why Global Undo Sucks: Building Line-Level Undo/Redo for VS Code Namasivaayam L Namasivaayam L Namasivaayam L Follow Jan 12 Why Global Undo Sucks: Building Line-Level Undo/Redo for VS Code # vscode # opensource # extensions # programming 7  reactions Comments Add Comment 4 min read Building a Chrome Extension: From Idea to Automated Release Prajwol Shrestha Prajwol Shrestha Prajwol Shrestha Follow Jan 11 Building a Chrome Extension: From Idea to Automated Release # webdev # extensions # automation # githubactions Comments Add Comment 2 min read Visionary - Photo Of the Day Browser Extension Senthil Kumaran Senthil Kumaran Senthil Kumaran Follow Jan 10 Visionary - Photo Of the Day Browser Extension # ai # extensions # browser # picture Comments Add Comment 1 min read How I Built a Chrome Extension That Analyzes SEC Filings and Financial News in Seconds Mayuresh Smita Suresh Mayuresh Smita Suresh Mayuresh Smita Suresh Follow Jan 9 How I Built a Chrome Extension That Analyzes SEC Filings and Financial News in Seconds # extensions # javascript # programming # ai 1  reaction Comments Add Comment 12 min read I Thought Creating My Browser Extension Course Would Take a Weekend. It Took 4 Months Johnny Fekete Johnny Fekete Johnny Fekete Follow Jan 8 I Thought Creating My Browser Extension Course Would Take a Weekend. It Took 4 Months # extensions # webdev # tutorial Comments Add Comment 4 min read Image Grabber Pro Bytes Vibe Bytes Vibe Bytes Vibe Follow Dec 30 &#39;25 Image Grabber Pro # image # grabber # chrome # extensions Comments Add Comment 2 min read Enriching Code Context with Git Diffs for Smarter Developer Tools Timothy Adeleke Timothy Adeleke Timothy Adeleke Follow Dec 26 &#39;25 Enriching Code Context with Git Diffs for Smarter Developer Tools # git # tooling # extensions 5  reactions Comments Add Comment 4 min read Built a Chrome extension to share tab groups via link Sidhu Achary Sidhu Achary Sidhu Achary Follow Jan 5 Built a Chrome extension to share tab groups via link # chromeextension # extensions # webdev # javascript 1  reaction Comments Add Comment 1 min read Building RedirectWise: A Practical Chrome Extension for Redirect Analysis Gaurav yadav Gaurav yadav Gaurav yadav Follow Dec 20 &#39;25 Building RedirectWise: A Practical Chrome Extension for Redirect Analysis # webdev # extensions # redirectwise # opensource Comments Add Comment 3 min read I built a Chrome extension that saves me from copy-pasting text to ChatGPT every time Faxziah Faxziah Faxziah Follow Jan 2 I built a Chrome extension that saves me from copy-pasting text to ChatGPT every time # webdev # extensions # ai Comments Add Comment 3 min read I Saw an Instagram Reel Last Night. Now I Built a Bionic Reading Extension. Shreyan Ghosh Shreyan Ghosh Shreyan Ghosh Follow Dec 21 &#39;25 I Saw an Instagram Reel Last Night. Now I Built a Bionic Reading Extension. # extensions # programming # development # tooling 6  reactions Comments 4  comments 3 min read Browser Extensions - Native Messaging programador51 programador51 programador51 Follow Dec 20 &#39;25 Browser Extensions - Native Messaging # webdev # programming # extensions # frontend 1  reaction Comments Add Comment 3 min read Mastering Manifest V3: Why Browser Extensions are the New Frontier for AI &amp; SaaS Automation kiran ravi kiran ravi kiran ravi Follow Dec 30 &#39;25 Mastering Manifest V3: Why Browser Extensions are the New Frontier for AI &amp; SaaS Automation # extensions # automation # browser # ai Comments Add Comment 2 min read VS Code Setup: The 5 Free Extensions Every New Developer Needs MD.Younus Islam MD.Younus Islam MD.Younus Islam Follow Dec 14 &#39;25 VS Code Setup: The 5 Free Extensions Every New Developer Needs # webdev # vscode # extensions # programming Comments Add Comment 2 min read How I became the most liked man on Tinder (for a day) James Arnott James Arnott James Arnott Follow Dec 13 &#39;25 How I became the most liked man on Tinder (for a day) # extensions # programming Comments Add Comment 7 min read Markdown in ServiceNow: how I made rich work notes easier Prakhar Yadav Prakhar Yadav Prakhar Yadav Follow Dec 16 &#39;25 Markdown in ServiceNow: how I made rich work notes easier # servicenow # extensions # vibecoding # productivity Comments Add Comment 4 min read BookmarkStart: A Minimal New Tab Extension for Organized Bookmarks Thien DX Thien DX Thien DX Follow Dec 11 &#39;25 BookmarkStart: A Minimal New Tab Extension for Organized Bookmarks # showdev # tooling # extensions # productivity Comments Add Comment 2 min read How to integrate Lemon Squeezy Payments into a chrome extension with webhooks Himanshu Himanshu Himanshu Follow Dec 16 &#39;25 How to integrate Lemon Squeezy Payments into a chrome extension with webhooks # extensions # javascript # beginners 14  reactions Comments Add Comment 10 min read 🕒 Contest Clocker – Never Miss a Coding Contest Again 🚀 Aakash Kumar Aakash Kumar Aakash Kumar Follow Dec 3 &#39;25 🕒 Contest Clocker – Never Miss a Coding Contest Again 🚀 # competativeprogramming # extensions # javascript # leetcode Comments Add Comment 2 min read Daily Hadith Extension: Bringing Spiritual Clarity to Every New Tab Syed Talha Syed Talha Syed Talha Follow Dec 25 &#39;25 Daily Hadith Extension: Bringing Spiritual Clarity to Every New Tab # discuss # extensions # productivity # beginners 1  reaction Comments 1  comment 3 min read Local vs Sync vs Session: Which Chrome Extension Storage Should You Use? Himanshu Himanshu Himanshu Follow Dec 22 &#39;25 Local vs Sync vs Session: Which Chrome Extension Storage Should You Use? # extensions # javascript # beginners 16  reactions Comments Add Comment 6 min read How to Implement Monthly Subscriptions in Browser Extensions Himanshu Himanshu Himanshu Follow Dec 9 &#39;25 How to Implement Monthly Subscriptions in Browser Extensions # webdev # extensions # javascript 14  reactions Comments Add Comment 9 min read Made a VSCode extension for grouping files for easier multi task management in big project Peter Peter Peter Follow Nov 27 &#39;25 Made a VSCode extension for grouping files for easier multi task management in big project # vscode # extensions # productivity Comments Add Comment 1 min read Email &amp; Phone Extractor — One-Click Contact Collection for Any Website Johnson Fash Johnson Fash Johnson Fash Follow Nov 25 &#39;25 Email &amp; Phone Extractor — One-Click Contact Collection for Any Website # programming # productivity # javascript # extensions Comments Add Comment 2 min read loading... trending guides/resources If claude-code lived inside your browser? How to Create Offscreen Documents in Chrome Extensions: A Complete Guide Side Copilot: My Chrome Extension Alternative to Comet Browser Create, Debug, and Publish Firefox Extensions: A Full Developer Guide Step by Step Stop Copy-Pasting Scripts! This VSCode Extension Will Transform Your Terminal Workflow Taillens: A Tailwind Extension for Real-Time CSS Editing How to implement Google OAuth in browser extension without “Tabs” permission What&#39;s the Difference Between Manifest V2 and V3 in browser extensions? How to Secure API Keys in Chrome Extension? What you need to know about Extension Members in C# Building a Chrome Extension: From Idea to Automated Release How I became the most liked man on Tinder (for a day) How to integrate Stripe Payments into a chrome extension (step by step) I was tired of copy-pasting to ChatGPT, so I built a Chrome extension Markdown in ServiceNow: how I made rich work notes easier How to Build a Chrome Extension for Barcode &amp; QR Code Generation from Scratch How to integrate Lemon Squeezy Payments into a chrome extension with webhooks 🕒 Contest Clocker – Never Miss a Coding Contest Again 🚀 Stop Typing JSON Manually: The VS Code Extension That Makes TypeScript Fast ⚡ Image Grabber Pro 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://dev.to/chefgs
Saravanan Gnanaguru - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Follow User actions Saravanan Gnanaguru Cloud DevOps and Infra as Code Location India Joined Joined on  Dec 29, 2019 Email address g.gsaravanan@gmail.com Personal website https://gsaravanan.dev/ github website twitter website Pronouns he/him Work Architect Six Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least six years. Got it Close Five Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least five years. Got it Close Writing Debut Awarded for writing and sharing your first DEV post! Continue sharing your work to earn the 4 Week Writing Streak Badge. Got it Close Four Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least four years. Got it Close GitHub + DEV 2023 Hackathon Participant Thanks for participating in the GitHub + DEV 2023 Hackathon! Got it Close 1 Week Community Wellness Streak For actively engaging with the community by posting at least 2 comments in a single week. Got it Close Three Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least three years. Got it Close Hacktoberfest 2022 Awarded for successful completion of the 2022 Hacktoberfest challenge. Got it Close MongoDB Atlas Hackathon Participant Awarded for submitting a valid project to the MongoDB Atlas Hackathon on DEV. Got it Close Two Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least two years. Got it Close 2021 GitHub Actions Hackathon Participant Awarded for participating in the 2021 GitHub Actions x DEV Hackathon. Got it Close One Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least one year. Got it Close GitHub Actions Hackathon Participant Awarded for participating in the GitHub Actions x DEV Hackathon 2020. Got it Close 4 Week Writing Streak You&#39;ve posted at least one post per week for 4 consecutive weeks! Got it Close Show all 14 badges More info about @chefgs Organizations InfraCloud Technologies AWS Community Builders Kubernetes Community Days Chennai cloudengine labs UpCloud GitHub Repositories golang Repo for golang sample workouts Go &bull; 2 stars awscdk AWS CDK samples repo Python tfcdk Terraform CDK Sample Workouts Python terraform_repo Terraform samples for Major Cloud Providers and Custom Provider Development HCL &bull; 26 stars Available for Technical Writing, Developer Advocacy Post 55 posts published Comment 31 comments written Tag 11 tags followed Pin Pinned Automate Kubernetes Deployment using Terraform and GitHub Actions Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow May 22 &#39;23 Automate Kubernetes Deployment using Terraform and GitHub Actions # githubhack23 # terraform # kubernetes # githubactions 20  reactions Comments Add Comment 3 min read Deploy Kubernetes Resources in Minikube cluster using Terraform Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Jun 25 &#39;22 Deploy Kubernetes Resources in Minikube cluster using Terraform # kubernetes # tutorial # minikube # terraform 57  reactions Comments Add Comment 7 min read Develop REST API using Go with API versioning, Basic Auth and Query String Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for Kubernetes Community Days Chennai May 4 &#39;22 Develop REST API using Go with API versioning, Basic Auth and Query String # go # beginners # tutorial # restapi 10  reactions Comments Add Comment 5 min read Kubernetes Learning Part II - Understanding of Kubernetes Architecture and Hands-on Lab Setup Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for Kubernetes Community Days Chennai Apr 18 &#39;22 Kubernetes Learning Part II - Understanding of Kubernetes Architecture and Hands-on Lab Setup # kubernetes # beginners # tutorial 18  reactions Comments Add Comment 6 min read Create AWS Infrastructure using CDK for Terraform Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for AWS Community Builders Mar 24 &#39;22 Create AWS Infrastructure using CDK for Terraform # terraform # cdktf # beginners # tutorial 12  reactions Comments 1  comment 9 min read Run Your Own GenAI LLMs Offline with LM Studio Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Aug 13 &#39;25 Run Your Own GenAI LLMs Offline with LM Studio # genai # llm # programming # webdev 2  reactions Comments Add Comment 4 min read Want to connect with Saravanan Gnanaguru? Create an account to connect with Saravanan Gnanaguru. You can also sign in below to proceed if you already have an account. Create Account Already have an account? Sign in Git Guide to Delete Old Commits and Clear Sensitive Info from Git History Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Jul 26 &#39;25 Git Guide to Delete Old Commits and Clear Sensitive Info from Git History # git # security # github # programming 2  reactions Comments Add Comment 3 min read How Kubernetes Automates and Manages Your Docker Containers Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for UpCloud Apr 21 &#39;25 How Kubernetes Automates and Manages Your Docker Containers Comments Add Comment 5 min read GitHub Actions Self-Hosted Runner Setup Guide for Ubuntu Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for AWS Community Builders Oct 23 &#39;24 GitHub Actions Self-Hosted Runner Setup Guide for Ubuntu 5  reactions Comments Add Comment 6 min read The Art of Creating Container Images and Best Practices Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for AWS Community Builders Jul 29 &#39;24 The Art of Creating Container Images and Best Practices # docker # devops # development # devrel 164  reactions Comments 6  comments 7 min read Create Architecture Diagram as Code for a 2-Tier Bookstore Application Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for AWS Community Builders Jul 9 &#39;24 Create Architecture Diagram as Code for a 2-Tier Bookstore Application # aws # python # architecture # devrel 32  reactions Comments 4  comments 9 min read Practicing Kubernetes Control Plane environment in Killercoda Interactive Terminal Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for Kubernetes Community Days Chennai May 23 &#39;23 Practicing Kubernetes Control Plane environment in Killercoda Interactive Terminal # kubernetes # beginners # kcdchennai # blogathon 14  reactions Comments Add Comment 7 min read Platform Engineering and Internal Developer Platform Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for AWS Community Builders May 11 &#39;23 Platform Engineering and Internal Developer Platform # devops # platformengineering # idp # beginners 27  reactions Comments Add Comment 4 min read Setup HarperDB on Equinix Bare Metal Server Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Apr 19 &#39;23 Setup HarperDB on Equinix Bare Metal Server # harperdb # database # programming # tutorial 15  reactions Comments 2  comments 8 min read Create Amazon EKS Cluster using Terraform Module Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for AWS Community Builders Apr 18 &#39;23 Create Amazon EKS Cluster using Terraform Module # aws # kubernetes # awseks # tutorial 8  reactions Comments Add Comment 2 min read Checking the Capability of ChatGPT for DevOps Automation Solution Design Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Apr 9 &#39;23 Checking the Capability of ChatGPT for DevOps Automation Solution Design # chatgpt # beginners # devops # kubernetes 1  reaction Comments Add Comment 10 min read Glossary of Kubernetes Architecture Components Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Mar 26 &#39;23 Glossary of Kubernetes Architecture Components # kubernetes # architecture # beginners 21  reactions Comments 2  comments 11 min read Effective Mentoring Tips and Guidelines Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Dec 17 &#39;22 Effective Mentoring Tips and Guidelines Comments Add Comment 3 min read Guide to Create Github Actions Workflow for Terraform and AWS Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for AWS Community Builders Oct 29 &#39;22 Guide to Create Github Actions Workflow for Terraform and AWS 13  reactions Comments 2  comments 4 min read Upgrading an End of Life (EOL) Ubuntu OS to LTS version Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Oct 26 &#39;22 Upgrading an End of Life (EOL) Ubuntu OS to LTS version 16  reactions Comments Add Comment 4 min read Introduction to Kubectl CLI Plugins ctx and ns Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for AWS Community Builders Oct 10 &#39;22 Introduction to Kubectl CLI Plugins ctx and ns 10  reactions Comments Add Comment 3 min read Git 101: Rename default branch from master to main Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Jun 22 &#39;22 Git 101: Rename default branch from master to main # git # tutorial # github # beginners 15  reactions Comments Add Comment 3 min read Getting started with Python based IaC using AWS CDK Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for AWS Community Builders Jun 14 &#39;22 Getting started with Python based IaC using AWS CDK # aws # cdk # tutorial # beginners 37  reactions Comments Add Comment 9 min read Install Docker on Ubuntu Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for Kubernetes Community Days Chennai May 25 &#39;22 Install Docker on Ubuntu # docker # beginners # tutorial 11  reactions Comments Add Comment 3 min read Example for text processing Shell commands - tr, uniq, sort, sed and awk Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for Kubernetes Community Days Chennai May 10 &#39;22 Example for text processing Shell commands - tr, uniq, sort, sed and awk # bash # tutorial # shell # beginners 12  reactions Comments Add Comment 2 min read How to Setup SSH-Key in GitHub for Git Operations Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for Kubernetes Community Days Chennai May 2 &#39;22 How to Setup SSH-Key in GitHub for Git Operations # git # github # beginners # tutorial 11  reactions Comments Add Comment 4 min read How to Develop REST API using Go and Test using various methods Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for Kubernetes Community Days Chennai Apr 26 &#39;22 How to Develop REST API using Go and Test using various methods # go # api # tutorial # beginners 15  reactions Comments 1  comment 9 min read Kubernetes Learning Part V: Workload Resource - StatefulSet Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for Kubernetes Community Days Chennai Apr 25 &#39;22 Kubernetes Learning Part V: Workload Resource - StatefulSet # kubernetes # beginners # tutorial 7  reactions Comments Add Comment 6 min read Kubernetes Learning Part IV: Workload Resources - Deployment and ReplicaSet Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for Kubernetes Community Days Chennai Apr 21 &#39;22 Kubernetes Learning Part IV: Workload Resources - Deployment and ReplicaSet # kubernetes # beginners # tutorial 9  reactions Comments Add Comment 9 min read Kubernetes Learning Part III - K8s Concepts, Pods and Init-Containers Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for Kubernetes Community Days Chennai Apr 20 &#39;22 Kubernetes Learning Part III - K8s Concepts, Pods and Init-Containers # kubernetes # beginners # tutorial 13  reactions Comments Add Comment 7 min read Kubernetes Learning Part I - Application Architecture Decision and Purpose of K8s Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for Kubernetes Community Days Chennai Apr 16 &#39;22 Kubernetes Learning Part I - Application Architecture Decision and Purpose of K8s # kcdchennai # kubernetes # tutorial # kcdchennaiblogathon 34  reactions Comments 1  comment 4 min read Git 101 - How to Create Your First GitHub Repository Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Mar 10 &#39;22 Git 101 - How to Create Your First GitHub Repository # github # git # tutorial # beginners 32  reactions Comments Add Comment 4 min read Guide to implement MERN Stack Web App Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Jan 13 &#39;22 Guide to implement MERN Stack Web App # javascript # webdev # beginners # tutorial 11  reactions Comments Add Comment 5 min read MERN Stack Web Application - Property Bookings Catalog Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Jan 12 &#39;22 MERN Stack Web Application - Property Bookings Catalog # atlashackathon # mongodb # javascript # mern 10  reactions Comments Add Comment 1 min read How to Become an AWS Community Builder Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow for AWS Community Builders Jan 12 &#39;22 How to Become an AWS Community Builder # aws # community # howto 42  reactions Comments Add Comment 3 min read GitHub Actions workflow for Go Continuous Integration Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Nov 26 &#39;21 GitHub Actions workflow for Go Continuous Integration # actionshackathon21 # go # github # tutorial 11  reactions Comments Add Comment 4 min read How to Develop a Custom Provider in Terraform v0.13+ Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Nov 20 &#39;21 How to Develop a Custom Provider in Terraform v0.13+ # terraform # tutorial # customprovider # devops 9  reactions Comments Add Comment 9 min read Kubernetes Learning Part III: K8s Workload Resources - Deployment and ReplicaSet Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Oct 17 &#39;21 Kubernetes Learning Part III: K8s Workload Resources - Deployment and ReplicaSet # kubernetes # beginners # tutorial # devops 10  reactions Comments Add Comment 8 min read Script to Generate Table-of-Content for Markdown file Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Sep 15 &#39;21 Script to Generate Table-of-Content for Markdown file # help # markdown # blog # tutorial 5  reactions Comments Add Comment 2 min read Kubernetes Learning Part II - K8s Concepts, Pods and Init-Containers Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Sep 12 &#39;21 Kubernetes Learning Part II - K8s Concepts, Pods and Init-Containers # kubernetes # beginners # tutorial # devops 10  reactions Comments Add Comment 7 min read How to Setup SSH key for Git Operations in GitHub Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Aug 30 &#39;21 How to Setup SSH key for Git Operations in GitHub # github # git # authentication 8  reactions Comments Add Comment 3 min read Kubernetes Learning Part I - Architecture Decision and Purpose of K8s Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Aug 25 &#39;21 Kubernetes Learning Part I - Architecture Decision and Purpose of K8s # kubernetes # beginners # tutorial # devops 7  reactions Comments Add Comment 3 min read Getting Started Tutorial for Learning Kubernetes Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Aug 16 &#39;21 Getting Started Tutorial for Learning Kubernetes # kubernetes # beginners # tutorial # devops 23  reactions Comments 3  comments 5 min read Create and Configure Google Cloud Instance using Terraform and Chef Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Jul 15 &#39;21 Create and Configure Google Cloud Instance using Terraform and Chef # terraform # googlecloud # beginners # tutorial 16  reactions Comments Add Comment 4 min read Create Apache Web Server in AWS Using Terraform Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Jun 19 &#39;21 Create Apache Web Server in AWS Using Terraform # terraform # aws # tutorial # beginners 43  reactions Comments Add Comment 6 min read Writing a GitHub Actions Workflow for Chef Cookbook Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Dec 22 &#39;20 Writing a GitHub Actions Workflow for Chef Cookbook # github # actions # devops # chefcookbook 17  reactions Comments Add Comment 3 min read Install Docker on Ubuntu 16.04 Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Nov 6 &#39;20 Install Docker on Ubuntu 16.04 # docker # gettingstarted # tutorial 7  reactions Comments 3  comments 3 min read Developing Terraform Custom Provider for Terraform v0.12 Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Oct 31 &#39;20 Developing Terraform Custom Provider for Terraform v0.12 # showdev # terraform # tutorial 15  reactions Comments Add Comment 5 min read Chef Cookbook GitHub Actions with Chef BDD and Code Analysis Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Sep 16 &#39;20 Chef Cookbook GitHub Actions with Chef BDD and Code Analysis # showdev # actionshackathon # devops 12  reactions Comments Add Comment 1 min read Develop REST API with Basic API Authentication using Go Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Aug 14 &#39;20 Develop REST API with Basic API Authentication using Go # showdev # go # tutorial # restapi 22  reactions Comments Add Comment 5 min read Develop REST API using Go and Test using various methods Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Jul 24 &#39;20 Develop REST API using Go and Test using various methods # showdev # go # tutorial # restapi 16  reactions Comments 5  comments 9 min read Go Hello World! Program Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Jul 13 &#39;20 Go Hello World! Program # go # beginners # tutorial 9  reactions Comments Add Comment 4 min read AWS EC2 - EBS Volume Encryption Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Jul 8 &#39;20 AWS EC2 - EBS Volume Encryption # showdev # aws # ec2 # security 9  reactions Comments 5  comments 4 min read Getting Started with Go in Ubuntu 16.04 Saravanan Gnanaguru Saravanan Gnanaguru Saravanan Gnanaguru Follow Jul 1 &#39;20 Getting Started with Go in Ubuntu 16.04 # go # ubuntu # beginners # tutorial 9  reactions Comments Add Comment 1 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://www.stavros.io/tutorials/python/
Tutorial - Learn Python in 10 minutes - Stavros&#39; Stuff Stavros&#39; Stuff On programming and other things. Tutorials How to create an internet radio station How to delete emails on a POP3 server How to encode your movies How to keep yourself secure online How to run Opera off a USB thumb drive How to use BitTorrent to send files Networking essentials Secure Tunneling Tutorial - Learn Python in 10 minutes Downloads Downloads Various scripts Various My projects Unstructured notes Freelance Python developer My GitHub My résumé About me Post archives Tutorial - Learn Python in 10 minutes NOTE: If you would like some Python development done, my company, Stochastic Technologies , is available for consulting. This tutorial is available as a short ebook . The e-book features extra content from follow-up posts on various Python best practices, all in a convenient, self-contained format. All future updates are free for people who purchase it. Preliminary fluff So, you want to learn the Python programming language but can&#8217;t find a concise and yet full-featured tutorial. This tutorial will attempt to teach you Python in 10 minutes. It&#8217;s probably not so much a tutorial as it is a cross between a tutorial and a cheatsheet, so it will just show you some basic concepts to start you off. Obviously, if you want to really learn a language you need to program in it for a while. I will assume that you are already familiar with programming and will, therefore, skip most of the non-language-specific stuff. The important keywords will be highlighted so you can easily spot them. Also, pay attention because, due to the terseness of this tutorial, some things will be introduced directly in code and only briefly commented on. We will focus on Python 3, as that is the version you should use. All the examples in the book are in Python 3, and if anyone advises you to use 2, they aren&#8217;t your friend. Properties Python is strongly typed (i.e. types are enforced), dynamically, implicitly typed (i.e. you don&#8217;t have to declare variables), case sensitive (i.e. var and VAR are two different variables) and object-oriented (i.e. everything is an object). Getting help Help in Python is always available right in the interpreter. If you want to know how an object works, all you have to do is call help(&lt;object&gt;) ! Also useful are dir() , which shows you all the object&#8217;s methods, and &lt;object&gt;.__doc__ , which shows you its documentation string: &gt;&gt;&gt; help ( 5 ) Help on int object: (etc etc) &gt;&gt;&gt; dir ( 5 ) [&#39;__abs__&#39;, &#39;__add__&#39;, ...] &gt;&gt;&gt; abs . __doc__ &#39;abs(number) -&gt; number Return the absolute value of the argument. Syntax Python has no mandatory statement termination characters and blocks are specified by indentation . Indent to begin a block, dedent to end one. Statements that expect an indentation level end in a colon (:). Comments start with the pound (#) sign and are single-line, multi-line strings are used for multi-line comments . Values are assigned (in fact, objects are bound to names) with the equals sign (&#8220;=&#8221;), and equality testing is done using two equals signs (&#8220;==&#8221;). You can increment/decrement values using the += and -= operators respectively by the right-hand amount. This works on many datatypes, strings included. You can also use multiple variables on one line. For example: &gt;&gt;&gt; myvar = 3 &gt;&gt;&gt; myvar += 2 &gt;&gt;&gt; myvar 5 &gt;&gt;&gt; myvar -= 1 &gt;&gt;&gt; myvar 4 &quot;&quot;&quot;This is a multiline comment. The following lines concatenate the two strings.&quot;&quot;&quot; &gt;&gt;&gt; mystring = &quot;Hello&quot; &gt;&gt;&gt; mystring += &quot; world.&quot; &gt;&gt;&gt; print ( mystring ) Hello world. # This swaps the variables in one line(!). # It doesn&#39;t violate strong typing because values aren&#39;t # actually being assigned, but new objects are bound to # the old names. &gt;&gt;&gt; myvar , mystring = mystring , myvar Data types The data structures available in python are lists, tuples and dictionaries . Sets are available in the sets library (but are built-in in Python 2.5 and later). Lists are like one-dimensional arrays (but you can also have lists of other lists), dictionaries are associative arrays (a.k.a. hash tables) and tuples are immutable one-dimensional arrays (Python &#8220;arrays&#8221; can be of any type, so you can mix e.g. integers, strings, etc in lists/dictionaries/tuples). The index of the first item in all array types is 0. Negative numbers count from the end towards the beginning, -1 is the last item. Variables can point to functions. The usage is as follows: &gt;&gt;&gt; sample = [ 1 , [ &quot;another&quot; , &quot;list&quot; ], ( &quot;a&quot; , &quot;tuple&quot; )] &gt;&gt;&gt; mylist = [ &quot;List item 1&quot; , 2 , 3.14 ] &gt;&gt;&gt; mylist [ 0 ] = &quot;List item 1 again&quot; # We&#39;re changing the item. &gt;&gt;&gt; mylist [ - 1 ] = 3.21 # Here, we refer to the last item. &gt;&gt;&gt; mydict = { &quot;Key 1&quot; : &quot;Value 1&quot; , 2 : 3 , &quot;pi&quot; : 3.14 } &gt;&gt;&gt; mydict [ &quot;pi&quot; ] = 3.15 # This is how you change dictionary values. &gt;&gt;&gt; mytuple = ( 1 , 2 , 3 ) &gt;&gt;&gt; myfunction = len &gt;&gt;&gt; print ( myfunction ( mylist )) 3 You can access array ranges using a colon (:). Leaving the start index empty assumes the first item, leaving the end index assumes the last item. Indexing is inclusive-exclusive, so specifying [2:10] will return items [2] (the third item, because of 0-indexing) to [9] (the tenth item), inclusive (8 items). Negative indexes count from the last item backwards (thus -1 is the last item) like so: &gt;&gt;&gt; mylist = [ &quot;List item 1&quot; , 2 , 3.14 ] &gt;&gt;&gt; print ( mylist [:]) [&#39;List item 1&#39;, 2, 3.1400000000000001] &gt;&gt;&gt; print ( mylist [ 0 : 2 ]) [&#39;List item 1&#39;, 2] &gt;&gt;&gt; print ( mylist [ - 3 : - 1 ]) [&#39;List item 1&#39;, 2] &gt;&gt;&gt; print ( mylist [ 1 :]) [2, 3.14] # Adding a third parameter, &quot;step&quot; will have Python step in # N item increments, rather than 1. # E.g., this will return the first item, then go to the third and # return that (so, items 0 and 2 in 0-indexing). &gt;&gt;&gt; print ( mylist [:: 2 ]) [&#39;List item 1&#39;, 3.14] Strings Its strings can use either single or double quotation marks, and you can have quotation marks of one kind inside a string that uses the other kind (i.e. &#8220;He said &#8217;hello&#8217;.&#8221; is valid). Multiline strings are enclosed in _triple double (or single) quotes_ (&#8220;&#8221;&#8220;). Python strings are always Unicode, but there is another string type that is pure bytes. Those are called bytestrings and are represented with the b prefix, for example b'Hello \xce\xb1' . . To fill a string with values, you use the % (modulo) operator and a tuple. Each %s gets replaced with an item from the tuple, left to right, and you can also use dictionary substitutions, like so: &gt;&gt;&gt; print ( &quot;Name: %s \ Number: %s\ String: %s&quot; % (myclass.name, 3, 3 * &quot;-&quot;)) Name: Stavros Number: 3 String: --- strString = &quot;&quot;&quot;This is a multiline string.&quot;&quot;&quot; # WARNING: Watch out for the trailing s in &quot;%(key)s&quot;. &gt;&gt;&gt; print(&quot; This % ( verb ) s a % ( noun ) s . &quot; % {&quot; noun &quot;: &quot; test &quot;, &quot; verb &quot;: &quot; is &quot;}) This is a test. &gt;&gt;&gt; name = &quot;Stavros&quot; &gt;&gt;&gt; &quot;Hello, {} !&quot; . format ( name ) Hello, Stavros! &gt;&gt;&gt; print ( f &quot;Hello, { name } !&quot; ) Hello, Stavros! Flow control statements Flow control statements are if , for , and while . There is no switch ; instead, use if. Use for to enumerate through members of a list. To obtain a sequence of numbers you can iterate over, use range(&lt;number&gt;) . These statements&#8217; syntax is thus: &gt;&gt;&gt; print ( range ( 10 )) range ( 0 , 10 ) &gt;&gt;&gt; rangelist = list ( range ( 10 )) &gt;&gt;&gt; print ( rangelist ) [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ] for number in range ( 10 ): # Check if number is one of # the numbers in the tuple. if number in ( 3 , 4 , 7 , 9 ): # &quot;Break&quot; terminates a for without # executing the &quot;else&quot; clause. break else : # &quot;Continue&quot; starts the next iteration # of the loop. It&#39;s rather useless here, # as it&#39;s the last statement of the loop. continue else : # The &quot;else&quot; clause is optional and is # executed only if the loop didn&#39;t &quot;break&quot;. pass # Do nothing if rangelist [ 1 ] == 2 : print ( &quot;The second item (lists are 0-based) is 2&quot; ) elif rangelist [ 1 ] == 3 : print ( &quot;The second item (lists are 0-based) is 3&quot; ) else : print ( &quot;Dunno&quot; ) while rangelist [ 1 ] == 1 : print ( &quot;We are trapped in an infinite loop!&quot; ) Functions Functions are declared with the def keyword. Optional arguments are set in the function declaration after the mandatory arguments by being assigned a default value. For named arguments , the name of the argument is assigned a value. Functions can return a tuple (and using tuple unpacking you can effectively return multiple values ). Lambda functions are ad hoc functions that are comprised of a single statement. Parameters are passed by reference , but immutable types (tuples, ints, strings, etc) cannot be changed in the caller by the callee . This is because only the memory location of the item is passed , and binding another object to a variable discards the old one , so immutable types are replaced. For example: # Same as def funcvar(x): return x + 1 funcvar = lambda x : x + 1 &gt;&gt;&gt; print ( funcvar ( 1 )) 2 # an_int and a_string are optional, they have default values # if one is not passed (2 and &quot;A default string&quot;, respectively). def passing_example ( a_list , an_int = 2 , a_string = &quot;A default string&quot; ): a_list . append ( &quot;A new item&quot; ) an_int = 4 return a_list , an_int , a_string &gt;&gt;&gt; my_list = [ 1 , 2 , 3 ] &gt;&gt;&gt; my_int = 10 &gt;&gt;&gt; print ( passing_example ( my_list , my_int )) ([ 1 , 2 , 3 , &#39;A new item&#39; ], 4 , &quot;A default string&quot; ) &gt;&gt;&gt; my_list [ 1 , 2 , 3 , &#39;A new item&#39; ] &gt;&gt;&gt; my_int 10 Classes Python supports a limited form of multiple inheritance in classes. Private variables and methods can be declared (by convention, this is not enforced by the language) by adding a leading underscore (e.g. _spam ). We can also bind arbitrary names to class instances. An example follows: class MyClass ( object ): common = 10 def __init__ ( self ): self . myvariable = 3 def myfunction ( self , arg1 , arg2 ): return self . myvariable # This is the class instantiation &gt;&gt;&gt; classinstance = MyClass () &gt;&gt;&gt; classinstance . myfunction ( 1 , 2 ) 3 # This variable is shared by all instances. &gt;&gt;&gt; classinstance2 = MyClass () &gt;&gt;&gt; classinstance . common 10 &gt;&gt;&gt; classinstance2 . common 10 # Note how we use the class name # instead of the instance. &gt;&gt;&gt; MyClass . common = 30 &gt;&gt;&gt; classinstance . common 30 &gt;&gt;&gt; classinstance2 . common 30 # This will not update the variable on the class, # instead it will bind a new object to the old # variable name. &gt;&gt;&gt; classinstance . common = 10 &gt;&gt;&gt; classinstance . common 10 &gt;&gt;&gt; classinstance2 . common 30 &gt;&gt;&gt; MyClass . common = 50 # This has not changed, because &quot;common&quot; is # now an instance variable. &gt;&gt;&gt; classinstance . common 10 &gt;&gt;&gt; classinstance2 . common 50 # This class inherits from MyClass. The example # class above inherits from &quot;object&quot;, which makes # it what&#39;s called a &quot;new-style class&quot;. # Multiple inheritance is declared as: # class OtherClass(MyClass1, MyClass2, MyClassN) class OtherClass ( MyClass ): # The &quot;self&quot; argument is passed automatically # and refers to the class instance, so you can set # instance variables as above, but from inside the class. def __init__ ( self , arg1 ): self . myvariable = 3 print ( arg1 ) &gt;&gt;&gt; classinstance = OtherClass ( &quot;hello&quot; ) hello &gt;&gt;&gt; classinstance . myfunction ( 1 , 2 ) 3 # This class doesn&#39;t have a .test member, but # we can add one to the instance anyway. Note # that this will only be a member of classinstance. &gt;&gt;&gt; classinstance . test = 10 &gt;&gt;&gt; classinstance . test 10 Exceptions Exceptions in Python are handled with try-except [exceptionname] blocks: def some_function (): try : # Division by zero raises an exception 10 / 0 except ZeroDivisionError : print ( &quot;Oops, invalid.&quot; ) else : # Exception didn&#39;t occur, we&#39;re good. pass finally : # This is executed after the code block is run # and all exceptions have been handled, even # if a new exception is raised while handling. print ( &quot;We&#39;re done with that.&quot; ) &gt;&gt;&gt; some_function () Oops , invalid . We &#39;re done with that. Importing External libraries are used with the import [libname] keyword. You can also use from [libname] import [funcname] for individual functions. Here is an example: import random from time import clock randomint = random . randint ( 1 , 100 ) &gt;&gt;&gt; print ( randomint ) 64 File I/O Python has a wide array of libraries built in. As an example, here is how serializing (converting data structures to strings using the pickle library) with file I/O is used: import pickle mylist = [ &quot;This&quot; , &quot;is&quot; , 4 , 13327 ] # Open the file C:\\binary.dat for writing. The letter r before the # filename string is used to prevent backslash escaping. myfile = open ( r &quot;C: \\ binary.dat&quot; , &quot;wb&quot; ) pickle . dump ( mylist , myfile ) myfile . close () myfile = open ( r &quot;C: \\ text.txt&quot; , &quot;w&quot; ) myfile . write ( &quot;This is a sample string&quot; ) myfile . close () myfile = open ( r &quot;C: \\ text.txt&quot; ) &gt;&gt;&gt; print ( myfile . read ()) &#39;This is a sample string&#39; myfile . close () # Open the file for reading. myfile = open ( r &quot;C: \\ binary.dat&quot; , &quot;rb&quot; ) loadedlist = pickle . load ( myfile ) myfile . close () &gt;&gt;&gt; print ( loadedlist ) [ &#39;This&#39; , &#39;is&#39; , 4 , 13327 ] Miscellaneous Conditions can be chained : 1 &lt; a &lt; 3 checks that a is both less than 3 and greater than 1. You can use del to delete variables or items in arrays . List comprehensions provide a powerful way to create and manipulate lists. They consist of an expression followed by a for clause followed by zero or more if or for clauses, like so: &gt;&gt;&gt; lst1 = [ 1 , 2 , 3 ] &gt;&gt;&gt; lst2 = [ 3 , 4 , 5 ] &gt;&gt;&gt; print ([ x * y for x in lst1 for y in lst2 ]) [3, 4, 5, 6, 8, 10, 9, 12, 15] &gt;&gt;&gt; print ([ x for x in lst1 if 4 &gt; x &gt; 1 ]) [2, 3] # Check if a condition is true for any items. # &quot;any&quot; returns true if any item in the list is true. &gt;&gt;&gt; any ([ i % 3 for i in [ 3 , 3 , 4 , 4 , 3 ]]) True # This is because 4 % 3 = 1, and 1 is true, so any() # returns True. # Check for how many items a condition is true. &gt;&gt;&gt; sum ( 1 for i in [ 3 , 3 , 4 , 4 , 3 ] if i == 4 ) 2 &gt;&gt;&gt; del lst1 [ 0 ] &gt;&gt;&gt; print ( lst1 ) [2, 3] &gt;&gt;&gt; del lst1 Global variables are declared outside of functions and can be read without any special declarations, but if you want to write to them you must declare them at the beginning of the function with the global keyword, otherwise Python will bind that object to a new local variable (be careful of that, it&#8217;s a small catch that can get you if you don&#8217;t know it). For example: number = 5 def myfunc (): # This will print 5. print ( number ) def anotherfunc (): # This raises an exception because the variable has not # been bound before printing. Python knows that it an # object will be bound to it later and creates a new, local # object instead of accessing the global one. print ( number ) number = 3 def yetanotherfunc (): global number # This will correctly change the global. number = 3 Epilogue This tutorial is not meant to be an exhaustive list of all (or even a subset) of Python. Python has a vast array of libraries and much much more functionality which you will have to discover through other means, such as the excellent book Dive into Python . I hope I have made your transition in Python easier. Please leave comments if you believe there is something that could be improved or added or if there is anything else you would like to see (classes, error handling, anything). By the way, you should follow me on Twitter . Subscribe to my mailing list Did you like what you just read and want to be notified when I post more? Subscribe to my mailing list to get an email whenever I post. Tweet Share Share Share Stavros Guy who likes computers Greek. Amateur F1 driver. Technology enthusiast. Single parent. Liar. Founder of Stochastic Technologies , a software development agency, and creator of various products which you can find in the résumé . Connect with me This site is part of the webring: ? Tech makers Previous 😎 Random Next Recent Posts I made another little bedside clock I converted a rotary phone into a meeting handset Switch to Jujutsu already: a tutorial I made a really small LED panel I couldn&#39;t wait for a TRMNL device, so I made my own Why is everything so scalable? Making the Strofara Saving SSH passphrases on KDE The UX people Spam spammers back Made with &hearts; in Greece
2026-01-13T08:49:45
https://www.python.org/downloads/release/python-31310/
Python Release Python 3.13.10 | Python.org Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience. Skip to content &#9660; Close Python PSF Docs PyPI Jobs Community &#9650; The Python Network Donate &equiv; Menu Search This Site GO A A Smaller Larger Reset Socialize LinkedIn Mastodon Chat on IRC Twitter About Applications Quotes Getting Started Help Python Brochure Downloads All releases Source code Windows macOS Android Other Platforms License Alternative Implementations Documentation Docs Audio/Visual Talks Beginner&#x27;s Guide FAQ Non-English Docs PEP Index Python Books Python Essays Community Diversity Mailing Lists IRC Forums PSF Annual Impact Report Python Conferences Special Interest Groups Python Logo Python Wiki Code of Conduct Community Awards Get Involved Shared Stories Success Stories Arts Business Education Engineering Government Scientific Software Development News Python News PSF Newsletter PSF News PyCon US News News from the Community Events Python Events User Group Events Python Events Archive User Group Events Archive Submit an Event Python 3.13.10 Note: Python 3.13.10 has been superseded by Python 3.13.11 . Release date: Dec. 2, 2025 This is the tenth maintenance release of Python 3.13 Python 3.13.10 is the tenth maintenance release of 3.13, containing around 300 bugfixes, build improvements and documentation changes since 3.13.9. Major new features of the 3.13 series, compared to 3.12 Some of the new major new features and changes in Python 3.13 are: New features A new and improved interactive interpreter , based on PyPy 's, featuring multi-line editing and color support, as well as colorized exception tracebacks . An experimental free-threaded build mode , which disables the Global Interpreter Lock, allowing threads to run more concurrently. The build mode is available as an experimental feature in the Windows and macOS installers as well. A preliminary, experimental JIT , providing the ground work for significant performance improvements. The locals() builtin function (and its C equivalent) now has well-defined semantics when mutating the returned mapping , which allows debuggers to operate more consistently. A modified version of mimalloc is now included, optional but enabled by default if supported by the platform, and required for the free-threaded build mode. Docstrings now have their leading indentation stripped , reducing memory use and the size of .pyc files. (Most tools handling docstrings already strip leading indentation.) The dbm module has a new dbm.sqlite3 backend that is used by default when creating new files. The minimum supported macOS version was changed from 10.9 to 10.13 (High Sierra) . Older macOS versions will not be supported going forward. WASI is now a Tier 2 supported platform . Emscripten is no longer an officially supported platform (but Pyodide continues to support Emscripten). iOS is now a Tier 3 supported platform . Android is now a Tier 3 supported platform . Typing Support for type defaults in type parameters . A new type narrowing annotation , typing.TypeIs . A new annotation for read-only items in TypeDicts . A new annotation for marking deprecations in the type system . Removals and new deprecations PEP 594 (Removing dead batteries from the standard library) scheduled removals of many deprecated modules: aifc , audioop , chunk , cgi , cgitb , crypt , imghdr , mailcap , msilib , nis , nntplib , ossaudiodev , pipes , sndhdr , spwd , sunau , telnetlib , uu , xdrlib , lib2to3 . Many other removals of deprecated classes, functions and methods in various standard library modules. C API removals and deprecations . (Some removals present in alpha 1 were reverted in alpha 2, as the removals were deemed too disruptive at this time.) New deprecations , most of which are scheduled for removal from Python 3.15 or 3.16. For more details on the changes to Python 3.13, see What's new in Python 3.13 . More resources Online Documentation PEP 719 , 3.13 Release Schedule Report bugs at https://github.com/python/cpython/issues . Help fund Python directly (or via GitHub Sponsors ), and support the Python community . Full Changelog Files macOS Download macOS installer Windows Download Python install manager Source release Download XZ compressed source tarball Version Operating System Description MD5 Checksum SHA256 Checksum File Size Sigstore SBOM GPG Gzipped source tarball Source release cc68814bb8d14a70725d643c64315f9b n/a 28.0 MB .sigstore SPDX SIG XZ compressed source tarball Source release 5ada33c7f08d5d2df881657bdb8e848d n/a 21.7 MB .sigstore SPDX SIG macOS installer macOS for macOS 10.13 and later 45f509a7af824472d89ec5b46438c65b n/a 67.0 MB .sigstore SIG Windows installer (64-bit) Windows Recommended 28481b8956f67a6a3daac96cd139a67a n/a 27.4 MB .sigstore SPDX SIG Windows installer (32-bit) Windows fdebce36bfdd4f341d6b2bde84d66478 n/a 26.2 MB .sigstore SPDX SIG Windows installer (ARM64) Windows Experimental 7d766ba811012552be75248f20af71a3 n/a 26.8 MB .sigstore SPDX SIG Windows embeddable package (64-bit) Windows a496f38776d17fec94e223614e157ab0 n/a 10.4 MB .sigstore SPDX SIG Windows embeddable package (32-bit) Windows 5c253bf515d77251040a31c5fb2b4daa n/a 9.2 MB .sigstore SPDX SIG Windows embeddable package (ARM64) Windows 78b93e8104b1908dc34e069236e3eba6 n/a 9.9 MB .sigstore SPDX SIG Windows release manifest Windows Install with &#x27;py install 3.13&#x27; 7ccd598fe18991310d9d9311124a0ffe n/a 14.6 KB .sigstore &#9650; Back to Top About Applications Quotes Getting Started Help Python Brochure Downloads All releases Source code Windows macOS Android Other Platforms License Alternative Implementations Documentation Docs Audio/Visual Talks Beginner&#x27;s Guide FAQ Non-English Docs PEP Index Python Books Python Essays Community Diversity Mailing Lists IRC Forums PSF Annual Impact Report Python Conferences Special Interest Groups Python Logo Python Wiki Code of Conduct Community Awards Get Involved Shared Stories Success Stories Arts Business Education Engineering Government Scientific Software Development News Python News PSF Newsletter PSF News PyCon US News News from the Community Events Python Events User Group Events Python Events Archive User Group Events Archive Submit an Event Contributing Developer&#x27;s Guide Issue Tracker python-dev list Core Mentorship Report a Security Issue &#9650; Back to Top Help &amp; General Contact Diversity Initiatives Submit Website Bug Status Copyright &copy;2001-2026. &nbsp; Python Software Foundation &nbsp; Legal Statements &nbsp; Privacy Notice Powered by PSF Community Infrastructure -->
2026-01-13T08:49:45
https://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/?replytocom=23511#content
Implementing a web server in a single printf() call &#8211; Tinyhack.com --> Skip to content Tinyhack.com A hacker does for love what others would not do for money. Implementing a web server in a single printf() call A guy just forwarded a joke that most of us will already know Jeff Dean Facts (also here and here ). Everytime I read that list, this part stands out: Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search. It is really possible to implement a web server using a single printf call, but I haven&#8217;t found anyone doing it. So this time after reading the list, I decided to implement it. So here is the code, a pure single printf call, without any extra variables or macros (don&#8217;t worry, I will explain how to this code works) #include &lt;stdio.h&gt; int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot;, ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 + 2, (((unsigned long int)0x4005c8 + 12) &amp; 0xffff)- ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 ); } This code only works on a Linux AMD64 bit system, with a particular compiler (gcc version 4.8.2 (Debian 4.8.2-16) ) And to compile it: gcc -g web1.c -O webserver As some of you may have guessed: I cheated by using a special format string . That code may not run on your machine because I have hardcoded two addresses. The following version is a little bit more user friendly (easier to change), but you are still going to need to change 2 values: FUNCTION_ADDR and DESTADDR which I will explain later: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) #define DESTADDR 0x00000000006007D8 #define a (FUNCTION_ADDR &amp; 0xffff) #define b ((FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff) int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot; , b, 0, DESTADDR + 2, a-b, 0, DESTADDR ); } I will explain how the code works through a series of short C codes. The first one is a code that will explain how that we can start another code without function call. See this simple code: #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #define ADDR 0x00000000600720 void hello() { printf(&quot;hello world\n&quot;); } int main(int argc, char *argv&#x5B;]) { (*((unsigned long int*)ADDR))= (unsigned long int)hello; } You can compile it, but it many not run on your system. You need to do these steps: 1. Compile the code: gcc run-finalizer.c -o run-finalizer 2. Examine the address of fini_array objdump -h -j .fini_array run-finalizer And find the VMA of it: run-finalizer: file format elf64-x86-64 Sections: Idx Name Size VMA LMA File off Algn 18 .fini_array 00000008 0000000000600720 0000000000600720 00000720 2**3 CONTENTS, ALLOC, LOAD, DATA Note that you need a recent GCC to do this, older version of gcc uses different mechanism of storing finalizers. 3. Change the value of ADDR on the code to the correct address 4. Compile the code again 5. Run it and now you will see &#8220;hello world&#8221; printed to your screen. How does this work exactly?: According to Chapter 11 of Linux Standard Base Core Specification 3.1 .fini_array This section holds an array of function pointers that contributes to a single termination array for the executable or shared object containing the section. We are overwriting the array so that our hello function is called instead of the default handler. If you are trying to compile the webserver code, the value of ADDR is obtained the same way (using objdump). Ok, now we know how to execute a function by overriding a certain address, we need to know how we can overwrite an address using printf . You can find many tutorials on how to exploit format string bugs, but I will try give a short explanation. The printf function has this feature that enables us to know how many characters has been printed using the &#8220;%n&#8221; format: #include &lt;stdio.h&gt; int main(){ int count; printf(&quot;AB%n&quot;, &amp;count); printf(&quot;\n%d characters printed\n&quot;, count); } You will see that the output is: AB 2 characters printed Of course we can put any address to the count pointer to overwrite that address. But to overide an address with a large value we need to print a large amount of text. Fortunately there is another format string &#8220;%hn&#8221; that works on short instead of int. We can overwrite the value 2 bytes at a time to form the 4 byte value that we want. Lets try to use two printf calls to put a¡ value that we want (in this case the pointer to function &#8220;hello&#8221;) to the fini_array: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)hello) #define DESTADDR 0x0000000000600948 void hello() { printf(&quot;\n\n\n\nhello world\n\n&quot;); } int main(int argc, char *argv&#x5B;]) { short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;a = %04x b = %04x\n&quot;, a, b) uint64_t *p = (uint64_t*)DESTADDR; printf(&quot;before: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;after1: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); printf(&quot;after2: %08lx\n&quot;, *p); return 0; } The important lines are: short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); The a and b are just halves of the function address, we can construct a string of length a and b to be given to printf, but I chose to use the &#8220;%*&#8221; formatting which will control the length of the output through parameter. For example, this code: printf("%*c", 10, 'A'); Will print 9 spaces followed by A, so in total, 10 characters will be printed. If we want to use just one printf, we need to take account that b bytes have been printed, and we need to print another b-a bytes (the counter is accumulative). printf("%*c%hn%*c%hn", b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); Currently we are using the &#8220;hello&#8221; function to call, but we can call any function (or any address). I have written a shellcode that acts as a web server that just prints &#8220;Hello world&#8221;. This is the shell code that I made: unsigned char hello&#x5B;] = "\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32" "\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d" "\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74" "\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65" "\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f" "\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89" "\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f" "\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff" "\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49" "\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31" "\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c" "\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2" "\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f" "\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee" "\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff" "\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05" "\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3"; If we remove the function hello and insert that shell code, that code will be called. That code is just a string, so we can append it to the &#8220;%*c%hn%*c%hn&#8221; format string. This string is unnamed, so we will need to find the address after we compile it. To obtain the address, we need to compile the code, then disassemble it: objdump -d webserver 00000000004004fd &lt;main&gt;: 4004fd: 55 push %rbp 4004fe: 48 89 e5 mov %rsp,%rbp 400501: 48 83 ec 20 sub $0x20,%rsp 400505: 89 7d fc mov %edi,-0x4(%rbp) 400508: 48 89 75 f0 mov %rsi,-0x10(%rbp) 40050c: c7 04 24 d8 07 60 00 movl $0x6007d8,(%rsp) 400513: 41 b9 00 00 00 00 mov $0x0,%r9d 400519: 41 b8 94 05 00 00 mov $0x594,%r8d 40051f: b9 da 07 60 00 mov $0x6007da,%ecx 400524: ba 00 00 00 00 mov $0x0,%edx 400529: be 40 00 00 00 mov $0x40,%esi 40052e: bf c8 05 40 00 mov $0x4005c8,%edi 400533: b8 00 00 00 00 mov $0x0,%eax 400538: e8 a3 fe ff ff callq 4003e0 &lt;printf@plt&gt; 40053d: c9 leaveq 40053e: c3 retq 40053f: 90 nop We only need to care about this line: mov $0x4005c8,%edi That is the address that we need in: #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) The +12 is needed because our shell code starts after the string &#8220;%*c%hn%*c%hn&#8221; which is 12 characters long. If you are curious about the shell code, it was created from the following C code. #include&lt;stdio.h&gt; #include&lt;string.h&gt; #include&lt;stdlib.h&gt; #include&lt;unistd.h&gt; #include&lt;sys/types.h&gt; #include&lt;sys/stat.h&gt; #include&lt;sys/socket.h&gt; #include&lt;arpa/inet.h&gt; #include&lt;netdb.h&gt; #include&lt;signal.h&gt; #include&lt;fcntl.h&gt; int main(int argc, char *argv&#x5B;]) { int sockfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in serv_addr; bzero((char *)&amp;serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(8080); bind(sockfd, (struct sockaddr *)&amp;serv_addr, sizeof(serv_addr)); listen(sockfd, 5); while (1) { int cfd = accept(sockfd, 0, 0); char *s = &quot;HTTP/1.0 200\r\nContent-type:text/html\r\n\r\n&lt;h1&gt;Hello world!&lt;/h1&gt;&quot;; if (fork()==0) { write(cfd, s, strlen(s)); shutdown(cfd, SHUT_RDWR); close(cfd); } } return 0; } I have done an extra effort (although it is not really necessary in this case) to remove all NUL character from the shell code (since I couldn&#8217;t find one for X86-64 in the Shellcodes database ). Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search . It is left as an exercise for the reader to scale the web server to able to handle Google search load. Source codes for this post is available at https://github.com/yohanes/printf-webserver For people who thinks that this is useless: yes it is useless. I just happen to like this challenge, and it has refreshed my memory and knowledge for the following topics: shell code writing (haven&#8217;t done this in years), AMD64 assembly (calling convention, preserved registers, etc), syscalls, objdump, fini_array (last time I checked, gcc still used .dtors), printf format exploiting, gdb tricks (like writing memory block to file), and low level socket code (I have been using boost&#8217;s for the past few years). Update : Ubuntu adds a security feature that provides a read-only relocation table area in the final ELF. To be able to run the examples in ubuntu, add this in the command line when compiling -Wl,-z,norelro e.g: gcc -Wl,-z,norelro test.c Author admin Posted on March 12, 2014 April 28, 2017 Categories hacks 18 thoughts on &ldquo;Implementing a web server in a single printf() call&rdquo; dodi says: March 12, 2014 at 2:04 pm eh buset, serius nih lu ? 🙂 Reply priyo says: March 13, 2014 at 5:07 am scroll up&#8230; scroll down&#8230; scroll up&#8230; scroll down&#8230; 100x *gagal paham* Reply terminalcommand says: March 13, 2014 at 5:19 am Thank you! Very interesting article. I also didn&#8217;t know about the one line webserver at google. Although this is a hard topic, you&#8217;ve made a great work simplifying it. Reply Basun says: March 13, 2014 at 10:02 am The one line webserver bit is a joke about Jeff Dean, who works at Google. Its not real. 🙂 Reply Cees Timmerman says: April 20, 2016 at 4:12 pm There are real webserver oneliners: https://gist.github.com/willurd/5720255 Reply anonim says: March 13, 2014 at 5:29 am Diskusinya di https://news.ycombinator.com/item?id=7389623 Reply Neil says: March 13, 2014 at 12:38 pm Shouldn&#8217;t there be an exit() somewhere in the fork==0 branch? Otherwise every time there is a request the new child process will become a server too and start accepting requests, right? I think the parent leaks its copy of the file descriptor too. Maybe the fork is a bit redundant. I don&#8217;t think the write or close will block with such a small amount of data. Cool post though! I&#8217;m not really sure why I&#8217;m nitpicking in the shell code. Sorry. Reply admin says: March 14, 2014 at 1:58 am Ah yes, there is an exit from the loop on the assembly code (myhttp.s) but it got removed from http.c when I removed the comment and debug code. And you are also right about the fork, it is unnecessary in this case. At first I was going to write the HTTP headers and then exec some external command. I changed my mind and didn&#8217;t bother deleting the fork call. Reply Kyle Ross says: March 13, 2014 at 11:02 pm This is really interesting, but I&#8217;m having trouble following whats actually happening. Could you explain how you reduced that C code with includes and methods into a string containing hex codes and how that is turned back into some sort of executable code? Thanks Reply admin says: March 14, 2014 at 2:01 am I think it is beyond the scope of this article to explain about shell code writing. There are many books and tutorials that you can read (just search for &#8220;buffer overflow&#8221; or &#8220;shell code writing&#8221;). Reply TTK Ciar says: March 14, 2014 at 1:05 am Alternatively: $ perl -Mojo -E &#8216;a({inline =&gt; &#8220;%= `uptime`&#8221;})-&gt;start&#8217; daemon &amp; Server available at http://127.0.0.1:3000 . $ lynx -dump -nolist http://127.0.0.1:3000/ 17:57:56 up 66 days, 6:45, 108 users, load average: 0.10, 0.12, 0.07 though, perl by definition is cheating. Reply Evan Danaher says: March 14, 2014 at 2:54 pm I&#8217;m not sure why you used finalizers instead of just changing the return address on the stack; this may be the first time I&#8217;ve ever said this, but stack smashing is much more portable. I&#8217;ve made a variant that I&#8217;d expect to work on any gcc 4.4-4.7 on x86_64 Linux, and have some ideas which, if they work out, may make it actually &#8220;portable&#8221; to any x86/x86_64 Unix running a reasonable compiler. https://github.com/edanaher/printf-webserver Reply admin says: March 17, 2014 at 3:02 pm Yes using the stack is also possible, but on most modern system, GCC is compiled with stack protection turned on (and needs to be disabled using -fno-stack-protector). Reply Pingback: Implementing a web server in a single printf() call &laquo; adafruit industries blog Itzik Kotler says: March 15, 2014 at 4:35 pm Pretty neat. I did something similar (all though simpler) back in the days. See: http://www.exploit-db.com/papers/13233/ Reply Pingback: Saving the world, one cpu cycle at a time | Dav&#039;s bit o the web programath says: April 22, 2014 at 1:18 pm printf(&#8220;%*c%hn%*c%hn&#8221;, b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; i think the fourth parameter should be &#8216;a-b&#8217;, not &#8216;b-a&#8217;, because a == b + (a &#8211; b) Reply Pingback: New top story on Hacker News: Implementing a web server in a single printf call (2014) &#8211; Latest news Leave a Reply Cancel reply Your email address will not be published. Required fields are marked * Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. &#916; Post navigation Previous Previous post: Raspberry Pi for Out of Band Linux PC management Next Next post: Exploiting the Futex Bug and uncovering Towelroot Pages About Archive Search for: Search Follow x.com/yohanes Mastodon Recent Posts CVE-2025-31931 Arbitrary Shared Library Loading in Intel ITT API on Android (affects OpenCV &lt;= 4.10) Decrypting Encrypted files from Akira Ransomware (Linux/ESXI variant 2024) using a bunch of GPUs Patching .so files of an installed Android App Extracting WhatsApp Database (or any app data) from Android 12/13 using CVE-2024-0044 Zygisk-based reFlutter Recent Comments Eitan Porat on About admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 Archives November 2025 March 2025 November 2024 June 2024 April 2024 January 2024 December 2023 September 2022 March 2021 January 2021 May 2019 January 2019 November 2018 July 2018 May 2018 February 2018 October 2017 September 2017 March 2017 November 2016 November 2015 July 2014 March 2014 February 2014 June 2013 January 2013 November 2011 March 2011 February 2011 July 2010 April 2010 January 2010 December 2009 September 2009 August 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 March 2008 February 2008 October 2007 June 2007 February 2007 January 2007 December 2006 Categories agestar android blog ctf debian flareon flex freebsd google hacks hardware hostmonster linux mac os x misc mobile opensource phone raspberry reverse-engineering sdr security Uncategorized wii writeup Meta Log in Entries feed Comments feed WordPress.org Tinyhack.com Proudly powered by WordPress
2026-01-13T08:49:45
https://dev.to/t/interview/page/73
Interview Page 73 - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close # interview Follow Hide Create Post Older #interview posts 70 71 72 73 74 75 76 77 78 Posts Left menu 👋 Sign in for the ability to sort posts by relevant , latest , or top . Right menu The Crucial Concept of the Temporal Dead Zone: Don&#39;t Get Caught Off Guard in Your Next Interview! Pandeyashish17 Pandeyashish17 Pandeyashish17 Follow Jan 8 &#39;23 The Crucial Concept of the Temporal Dead Zone: Don&#39;t Get Caught Off Guard in Your Next Interview! # javascript # react # tutorial # interview Comments Add Comment 2 min read Demystifying the behavioral interview: Part 3 - Tricky coding interviews RockAndNull RockAndNull RockAndNull Follow Jan 26 &#39;23 Demystifying the behavioral interview: Part 3 - Tricky coding interviews # interview # softwareengineering # tech # thoughts Comments Add Comment 5 min read 7 Ways To Maximise Your Technical Writing Career With ChatGPT DrPrime01 DrPrime01 DrPrime01 Follow Jan 22 &#39;23 7 Ways To Maximise Your Technical Writing Career With ChatGPT # discuss # interview # career 7  reactions Comments 2  comments 2 min read CSS tutorial series: CSS Typography (font, text transform and other properties) The daily developer The daily developer The daily developer Follow Jan 19 &#39;23 CSS tutorial series: CSS Typography (font, text transform and other properties) # javascript # java # career # interview 1  reaction Comments Add Comment 4 min read final keyword in java explained in 2 mins jzfrank jzfrank jzfrank Follow Jan 17 &#39;23 final keyword in java explained in 2 mins # discuss # interview # career 1  reaction Comments Add Comment 1 min read One-page HTTP/REST cheat sheet Anatolii Kozlov Anatolii Kozlov Anatolii Kozlov Follow Dec 25 &#39;22 One-page HTTP/REST cheat sheet # interview # cheatsheet # http # rest 4  reactions Comments Add Comment 1 min read Staircase problem in JS Gurmeet Singh Gurmeet Singh Gurmeet Singh Follow Dec 24 &#39;22 Staircase problem in JS # javascript # interview Comments Add Comment 2 min read 9 stunning web design trends to watch in 2023 Sam Sam Sam Follow Dec 20 &#39;22 9 stunning web design trends to watch in 2023 # career # interview # softwaredevelopment 89  reactions Comments 17  comments 4 min read Hosting a single page application or website on S3 Joris Conijn Joris Conijn Joris Conijn Follow for AWS Community Builders Dec 21 &#39;22 Hosting a single page application or website on S3 # devops # career # interview # kubernetes 8  reactions Comments Add Comment 3 min read Flatten a nested object in JS Gurmeet Singh Gurmeet Singh Gurmeet Singh Follow Dec 13 &#39;22 Flatten a nested object in JS # interview # javascript 4  reactions Comments Add Comment 2 min read Discussing my interview process for Google [Follow Up] Kurtiss Frost Kurtiss Frost Kurtiss Frost Follow Dec 8 &#39;22 Discussing my interview process for Google [Follow Up] # google # interview # experience 9  reactions Comments 2  comments 5 min read Graph data structure explained Marius Vincent NIEMET Marius Vincent NIEMET Marius Vincent NIEMET Follow Dec 6 &#39;22 Graph data structure explained # datastructure # graph # interview # algorithms 4  reactions Comments Add Comment 2 min read Prepare to Coding Interview &gt; Know Data Structures &gt; Hash Table genichm genichm genichm Follow Dec 3 &#39;22 Prepare to Coding Interview &gt; Know Data Structures &gt; Hash Table # interview # coding # hashtables # csharp 6  reactions Comments Add Comment 2 min read Memory Jonny Jonny Jonny Follow Dec 3 &#39;22 Memory # computerscience # interview 5  reactions Comments 2  comments 4 min read Take advantage of closure machy44 machy44 machy44 Follow Dec 2 &#39;22 Take advantage of closure # programming # javascript # interview # webdev 4  reactions Comments Add Comment 1 min read How does HashMap work in Java? Yonatan Karp-Rudin Yonatan Karp-Rudin Yonatan Karp-Rudin Follow Dec 4 &#39;22 How does HashMap work in Java? # java # interview # jvm # guide 4  reactions Comments Add Comment 4 min read BemtvJS - Overview Diogo Neves Diogo Neves Diogo Neves Follow Nov 27 &#39;22 BemtvJS - Overview # career # interview # learning 4  reactions Comments Add Comment 4 min read Salesforce Interview Questions for Freshers &amp; Experienced Satyam Jaiswal Satyam Jaiswal Satyam Jaiswal Follow Nov 22 &#39;22 Salesforce Interview Questions for Freshers &amp; Experienced # salesforce # interview # skills # interviewquestions 2  reactions Comments Add Comment 1 min read Javascript Promise Methods with polyfill example: A Cheat Sheet for Developer Rahul Sharma Rahul Sharma Rahul Sharma Follow Nov 14 &#39;22 Javascript Promise Methods with polyfill example: A Cheat Sheet for Developer # javascript # promise # beginners # interview 6  reactions Comments Add Comment 4 min read Mobile System Design interview Resources!! Areeba Farooq Areeba Farooq Areeba Farooq Follow Nov 11 &#39;22 Mobile System Design interview Resources!! # mobile # interview # systemdesign # tutorial 33  reactions Comments 2  comments 1 min read All Important Data Structures &amp; Algorithms for Coding Interview Samir Paul Samir Paul Samir Paul Follow Nov 7 &#39;22 All Important Data Structures &amp; Algorithms for Coding Interview # dsa # interview # python # tutorial 93  reactions Comments 5  comments 3 min read Find the Duplicate Number Sergei Golitsyn Sergei Golitsyn Sergei Golitsyn Follow Oct 26 &#39;22 Find the Duplicate Number # java # leetcode # interview # software 2  reactions Comments Add Comment 2 min read Const in CPP Sakshi J Sakshi J Sakshi J Follow Oct 31 &#39;22 Const in CPP # cpp # interview # beginners # programming 3  reactions Comments Add Comment 1 min read Read Constraints the Right Way Alim Mohammad Alim Mohammad Alim Mohammad Follow Oct 31 &#39;22 Read Constraints the Right Way # computerscience # interview # programming # python 3  reactions Comments 1  comment 2 min read Questions to Expect in an Interview Chelsea Chemweno Chelsea Chemweno Chelsea Chemweno Follow Oct 27 &#39;22 Questions to Expect in an Interview # tech # interview # discretemathematices # problemsolving 2  reactions Comments Add Comment 4 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://openssf.org/blog/2025/11/17/recap-open-source-security-week-in-belgium-highlights-from-ghent-to-brussels/
Recap: Open Source Security Week in Belgium – Highlights from Ghent to Brussels &#8211; Open Source Security Foundation Skip to main content 🎉 2025 OpenSSF Annual Report is now live! Download Report Search Close Search search Menu About About Us Members Governing Board Technical Advisory Council Staff Antitrust Policy Brand Guidelines Contact Us Projects AI/ML Security Compliance Developer Best Practices Fuzzing Repository Security SBOM Tools Software Supply Chain Vulnerability Disclosures All Projects Learning Courses Guides Tech Talks Cybersecurity Skills Framework Best Practices Community Working Groups Get Involved Slack GitHub Developer Relations Membership Hub Technical Initiative Funding Jobs Board Store Code of Conduct Public Policy OSS in Public Policy EU Cyber Resilience Act Blog &#038; News Blog Podcast 🎤 Newsletter Press Releases Reports Case Studies Events OpenSSF Events Calendar Community Calendar Town Hall Meetings Guidelines for Meetups Join search Recap: Open Source Security Week in Belgium – Highlights from Ghent to Brussels By OpenSSF November 17, 2025 Blog No Comments Share Share Share Share Love 0 At the end of October 2025, the Linux Foundation Europe , OpenSSF , and CEPS brought together developers, maintainers, policymakers, and industry leaders for conversations on open source, security, and Europe’s digital future. Through keynotes, workshops, and policy-focused sessions, the week created much-needed clarity around the Cyber Resilience Act (CRA) and, more broadly, the EU cybersecurity policy, how it affects the open source ecosystem, and where contributors can find practical support. Linux Foundation Europe Roadshow — Ghent (29 October) The Roadshow featured two parallel tracks: Cybersecurity and CRA readiness track led by OpenSSF Digital commons track highlighting projects and ecosystem-wide discussions. What the CRA Means for Developers &amp; Stewards : Greg Kroah-Hartman, The Linux Foundation Greg opened the morning by breaking down what the CRA covers, what falls outside its scope, and how responsibilities differ for contributors, stewards, manufacturers, and integrators. He walked attendees through lifecycle requirements, SBOM expectations, product classifications, steward obligations, and the timeline leading to full application in 2027. CRA Simplified and Non-Scary for OSS Contributors : Roman Zhukov, Red Hat Roman focused on addressing misunderstandings and easing concerns for maintainers. He highlighted how foundations, expert groups, and the wider community are working to support contributors with checklists, guidance, and tools such as OpenSSF Scorecard, GUAC, Trustify, OSCAL, and resources from the OpenSSF Global Cyber Policy WG. Upstream Collaboration For The Win (of the CRA)! &#8211; Georg Kunz, Ericsson Georg Kunz explained how the Cyber Resilience Act requires users of open source software to contribute security fixes back upstream, and he argued that strong upstream engagement and collaboration were essential for easing CRA compliance. The talk highlighted how effective collaboration could reduce friction, outlined the shared challenges ahead for industry and open source communities, and proposed ways to address them together. Getting CRA-Ready: Lessons from a Major European Tech Company : Timo Perala, Nokia Timo shared how a large European organization is preparing for CRA compliance, outlining real-world challenges and the internal processes being updated to meet the regulation by 2027. His talk offered insight into how enterprises are approaching readiness from both technical and governance perspectives. Cybersecurity Strategy in the Face of Global Digital Regulation – Christopher “CRob” Robinson, OpenSSF CRob discussed the broader regulatory context including CRA, NIS2, and global trends, and how open source communities can adapt without losing agility. He emphasized that security and regulation must be connected to existing workflows, not treated as separate or conflicting priorities. CRA Working Sessions (Parts 1 &amp; 2) Led by Megan Knight (Arm), Daniel Appelquist (Samsung), Roman Zhukov (Red Hat), Timo Perala (Nokia), and Mike Bursell (Confidential Computing Consortium), these sessions gathered input from attendees and aligned the Awareness, Standards, and Tooling SIGs on shared priorities for 2026. LF Europe Roadshow Reflections Gabriele Columbro, General Manager, Linux Foundation Europe &amp; Executive Director, FINOS “The LF Europe Roadshow in Ghent reinforced that open source is at the core of Europe’s digital sovereignty. The OpenSSF and CRA sessions showed how much progress we make when developers, companies, policymakers, and foundations sit together and solve problems in the open. Europe doesn’t need ‘European open source’; it needs a strong ecosystem built on global, openly governed technologies. When local companies and infrastructure providers build and contribute influencing the global open source commons, Europe moves faster. Seeing the whole community aligned on that made the impact of this gathering clear.” Christopher Robinson (aka CRob), Chief Security Architect, Open Source Security Foundation (OpenSSF) “It was an honor to have participated in the LF Europe Roadshow with our peers in LF Europe as a follow-up on our 2024 Stewards and Manufacturers Workshop. It was amazing to gather with our members and the open source community to continue our collaboration around helping these two important groups prepare for the upcoming deadlines for the CRA.” European Open Source Security Forum — Brussels (30 October) Co-hosted by OpenSSF and CEPS , the European Open Source Security Forum brought EU policymakers, researchers, and open source security experts together for a full day of discussion on cybersecurity regulatory landscape and digital sovereignty. The day opened with welcome remarks from Lorenzo Pupillo (CEPS) and Mirko Boehm (Linux Foundation Europe), followed by keynotes from Raluca Stefanuc (European Commission), Kreshnik Rexha (IBM), and Piotr Ciepiela (EY). A Q&amp;A panel moderated by Mirko followed, where speakers expanded on their keynote topics and answered audience questions. The European Cybersecurity Strategy and the Role of Open Source Software &#8211; Madalin Neag (OpenSSF) Madalin outlined how NIS2, DORA, RED DA and CRA intersect, explained the role of open source software in this complex regulatory landscape, and provided practical guidance for preparing for these frameworks collectively instead of treating them as separate compliance tracks. Panel: Open Source Software and Changing Regulatory Landscape in the EU Speakers James Lovegrove (Red Hat), Sachiko Muto (OpenForum Europe), Benjamin Bögel (European Commission), and Jeremy Rollison (Microsoft) expanded on Madalin’s points and explored the challenges and opportunities created by Europe’s evolving regulatory environment. Panel: Open Source and Quantum Security Lorenzo Pupillo (CEPS), Fabiana Da Pieve (European Commission), Matt Caswell (OpenSSL Foundation), and Bart Preneel (KU Leuven) discussed how quantum technologies could transform industries, and how quantum computing could break widely used encryption. The panel looked at the role of open source in moving toward a quantum secure future, including how the community helps address new security risks and supports developing, testing, and deploying quantum safe cryptographic solutions. Open Ecosystems are Sovereign : Gabriele Columbro (Linux Foundation Europe &amp; FINOS) Gabriele highlighted that sustainable open source requires healthy project lifecycles, real-world deployments, and avoidance of new forms of lock-in. He highlighted that true digital sovereignty comes from open collaboration and interoperability, not isolation. The Case for an EU Sovereign Tech Fund : Felix Reda (GitHub) Felix Reda highlighted that digital sovereignty, competitiveness, and cybersecurity require supporting the maintenance and sustainability of open source infrastructure. He presented a new feasibility study that provides the blueprint for a European Sovereign Tech Fund and noted that coordinating public and private initiatives can simplify CRA compliance and build trust between open source projects and software manufacturers. Panel: No Regulation Without Education: Tackling the Global Cyber Skills Gap in Light of the CRA Christopher Robinson (CRob) (OpenSSF), Michaela Klopstra (Accenture), Hilary Carter (Linux Foundation Research), and Georg Kunz (Ericsson) addressed the cybersecurity skills gap and the importance of education in meeting CRA requirements, and, more generally, in strengthening the cybersecurity domain. Fireside Chat: Open Source AI Gabriele Columbro (LF Europe &amp; FINOS) and Ben Burtenshaw (Hugging Face) discussed openness, trust, and the future of AI ecosystems. The session focused on Ben’s work in building and sharing high quality AI datasets and his contributions to the open source community, including tools, community projects, and educational resources. Closing Remarks: Steve Fernandez (OpenSSF) Steve (OpenSSF) closed the Forum by reflecting on the importance of cooperation between policymakers, industry, and open source communities. European Open Source Security Forum &#8211; Reflections Lorenzo Pupillo, Associate Senior Research Fellow and Head of the Cybersecurity at CEPS Initiative, CEPS  “Great Event! Very good content and very productive dialogue between European Commission, private sector and Open source community” Mirko Boehm, Senior Director for Community Development, Linux Foundation Europe “The European Open Source Security Forum demonstrated effective dialogue between policymakers and the open source cybersecurity community: technical experts and policy stakeholders engaging on substance rather than abstractions. The discussions addressed the real challenge, namely how Europe’s regulatory framework can strengthen open source security without inadvertently undermining the collaborative fabric that makes it work. Events like this build the institutional relationships between regulators, industry and communities required for sustained cybersecurity improvements.” Madalin Neag, OpenSSF EU Policy Advisor, The Linux Foundation “I felt truly privileged to be part of the European Open Source Security Forum, such an inspiring gathering of policymakers, industry leaders, and open source experts shaping the future of cybersecurity in Europe. It was an honor to connect, share ideas, and engage with Europe’s leading voices driving innovation and policy in this space. The discussions illustrated both the challenges and opportunities in Europe’s evolving regulatory landscape, and underscored the critical role of open source in shaping secure and resilient digital ecosystems. This event was an excellent opportunity to reiterate once more OpenSSF’s continuous commitment to contributing to EU policy and advancing open innovation across Europe.” Steve Fernandez, OpenSSF General Manager, The Linux Foundation   “It’s events like this that bring policy makers, maintainers, developers, and industry together to better the security community. The work accomplished and shared over the last couple of days drives a more secure future. ” Why This Week Matters Across Ghent and Brussels, discussions covered the whole EU cybersecurity strategy and the practical implications of CRA. Speakers explored what these frameworks mean in practice for developers, maintainers, stewards, and manufacturers, including SBOM expectations, vulnerability management, secure development practices, documentation, and the standards that will contribute to the future compliance. Throughout the week, panels and working groups emphasized the importance of aligning policy and implementation, aligning regulatory intent with technical realities, identifying where clearer guidance is needed, and highlighting opportunities for the open source community to lead. Together, these conversations reinforced Europe’s next steps toward a more resilient digital ecosystem having open source at its core: turning policy into practical action, strengthening  collaboration between policymakers and practitioners, and continuing to invest in secure and interoperable open ecosystems.  OpenSSF’s tools and resources were featured as tangible resources supporting this readiness, alongside insights from the OpenSSF Global Cyber Policy WG. Looking ahead, OpenSSF will continue helping translate policy into practice through tooling, training, standards engagement, and community driven collaboration across Europe and beyond.  Get Involved CRA Resources OpenSSF Global Cyber Policy Working Group Slack Channel GitHub Mailing List CRA Documents Free Course: Understanding the EU Cyber Resilience Act (CRA) CRA Guide for OSS Developers Open Source Project Security Baseline Tech Talk: CRA-Ready Report: Unaware and Uncertain: The Stark Realities of Cyber Resilience Act Readiness in Open Source Report: Pathways to Cybersecurity Best Practices in Open Source Comments are closed. --> We envision a future where OSS is universally trusted, secure, and reliable. Join us in making open source more secure. Get Involved Subscribe to the OpenSSF Newsletter! Get the latest announcements, event info, and the community news in your inbox twitter bluesky facebook linkedin youtube github slack mastodon Copyright © 2026 The Linux Foundation® . All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page. Linux is a registered trademark of Linus Torvalds. Privacy Policy and Terms of Use . Close Menu About About Us Members Governing Board Technical Advisory Council Staff Antitrust Policy Brand Guidelines Contact Us Projects AI/ML Security Compliance Developer Best Practices Fuzzing Repository Security SBOM Tools Software Supply Chain Vulnerability Disclosures All Projects Learning Courses Guides Tech Talks Cybersecurity Skills Framework Best Practices Community Working Groups Get Involved Slack GitHub Developer Relations Membership Hub Technical Initiative Funding Jobs Board Store Code of Conduct Public Policy OSS in Public Policy EU Cyber Resilience Act Blog &#038; News Blog Podcast 🎤 Newsletter Press Releases Reports Case Studies Events OpenSSF Events Calendar Community Calendar Town Hall Meetings Guidelines for Meetups Join
2026-01-13T08:49:45
https://dev.to/gionatha/best-resources-for-preparing-a-frontend-interview-in-2022-no-w3schools-2bge
Best resources for preparing a Frontend Interview in 2022 👨🏻‍💻🙋🏼‍♀️ (No W3Schools) - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Add reaction Like Unicorn Exploding Head Raised Hands Fire Jump to Comments Save Boost More... Copy link Copy link Copied to Clipboard Share to X Share to LinkedIn Share to Facebook Share to Mastodon Share Post via... Report Abuse Gionatha Posted on Sep 12, 2022 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Best resources for preparing a Frontend Interview in 2022 👨🏻‍💻🙋🏼‍♀️ (No W3Schools) # webdev # interview # programming # career Would you like to start preparing yourself for a frontend interview, but you don't know what are the best resources to learn from ? Well today, i will list you the best online resources that i actually used for preparing myself. Let's start! Javascript Javascript is usually one of the most important topic during a Frontend Interview, because it is generally subject of trivia questions but also for small coding problems, so you need to master it both theoretically and practically. Here i suggest you javascript.info It's the simplest and detailed explanation of javascript that i ever found! It's divided in 3 sections : The javascript language ( variables, functions, loop, conditionals ,etc. ) The browser ( HTML DOM, Events, Resource Loading ) Miscellaneous ( LocalStorage, Session Storage, Cookies, Network Request, CORS ) HTML &amp; CSS This is also a very important topic because the foundation of Frontend Development (especially web development) rely on HTML and CSS. Needles to say that most of the trivia questions and practice tests rely on the knowledge of the latter . Here the best resources that i found are provided by MDN HTML CSS Accessibility This is very important too! Interview Question and Answers Once you have mastered the basics of Frontend/Web Development, it's time to test your knowledge with some common interview question. Here i have multiple resources to suggest you: 30 Seconds of Interview (very friendly application, it cover all the various topics questions with answers too!) HTML Questions &amp; Answers CSS Questions &amp; Answers Javascript Questions &amp; Answers Bonus: General Questions Generally interviews begin with few questions about yourself: who you are, what experiences you have made, what are your strengths and weaknesses and so on . So it's better to be prepared also to this type of questions. Here some resources containing common questions with attached an explanation of possible answers that you can give back: Top 10 Common Job Interview Questions 17 Top Interview Questions for Software Engineer Wait! Where are (React/Angular/Vue/Svelte) resources ? Well here it depends on the actual framework or library the company you are applying for is using. Generally the official docs of these client side framework cover all you need to know! I mainly use React, so i can suggest some React Resources that i used to cover this topic: React Docs Beta (i think this has been written by Dan Abramov, but i'm not sure!) React Interview Questions Conclusion Well, this is what i've to share. I hope you find these resources helpful, at least they have been for me! I know that are tons of other useful resources scattered around the web, but as i said these are the ones that i personally used. Let me know in the comment what resources have you used to prepare yourself for a Frontend Interview. See ya! Top comments (1) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Collapse Expand &nbsp; mayowa-kalejaiye mayowa-kalejaiye mayowa-kalejaiye Follow Full-stack developer fluent in HTML, CSS, JavaScript, Python, Django, ReactJS, C and Flet. Pursuing a BSc in Software Engineering. Constantly learning, building, and debugging. Email kalejaiyemayowa3@gmail.com Location Lagos, Nigeria Education BSc in Software Engineering MIVA Open University 2024 – Present Pronouns He/Him Work Currently working on frontend and backend projects for dynamic solutions. Joined Jun 23, 2024 &bull; Sep 1 &#39;24 Dropdown menu Copy link Hide No Django?😔 Like comment: Like comment: 1 &nbsp;like Like Comment button Reply Code of Conduct &bull; Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink . Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Gionatha Follow Software Engineer &amp; Content Creator Location Italy Education University of Pisa Joined Apr 28, 2022 More from Gionatha My TOP 3 UI Design TIPS for Developers # webdev # design # ux # tutorial How i build a modern full stack application | 2022 Edition # webdev # architecture # design # tooling I built a platform for collecting feedbacks # webdev # news # showdev # startup 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://www.khanacademy.org/computing/computer-science
Client Challenge JavaScript is disabled in your browser. Please enable JavaScript to proceed. A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser.
2026-01-13T08:49:45
https://www.programiz.com/learn-python
Android and iOS App to Learn Python | Programiz Home Programiz APP+ Updates FAQs © Learn Python - Programiz 2020. Learn Python on the Go Begin your Python Journey with the ease of your phone. Master Python One Step at a Time Easy to Learn Swipe, Learn, Repeat. Learning Python has never been easier. Code on the Go Experiment, practise and code directly from your phone. Coding made accessible. Learn by Examples Start coding right away with practical, hand-picked examples. Bookmark your lessons Like a lesson? Save your favorites and revisit them anytime. Why Learn Python from Programiz? With more than 50 million enthusiasts relying on Programiz to learn programming, we pride ourselves in being among the leaders in the industry. To continue our efforts on building the best learning experience for beginners , we carefully designed Learn Python app to offer you a self-paced learning environment to master Python whenever, wherever. Our hand-picked lessons and practical examples allow you to start coding from the very first day. Don't have Learn Python Yet? Download Learn Python App App Programiz APP+ Updates Learn Python Learn C Programming Learn Java Support FAQs Follow Us Facebook Instagram LinkedIn Twitter Legal Privacy Policy Terms & Conditions © Learn Python - Programiz.
2026-01-13T08:49:45
https://highlight.io/pricing#overage
highlight.io: The open source monitoring platform. Star us on GitHub Star Migrate your Highlight account to LaunchDarkly by February 28, 2026. Learn more on our blog. Product Integrations Pricing Resources Docs Sign in Sign up Get the visibility you need today. Fair and transparent pricing that scales with any organization. Free Free Forever $ 0 / month Start free trial 500 monthly sessions AI error grouping Up to 15 seats Pay-as-you-go Starts at $ 50 / month Start free trial Up to 3 dashboards Up to 2 projects Up to 15 seats Up to 7 day retention Estimate Costs Business Starts at $ 800 / month Start free trial Unlimited dashboards Unlimited projects Unlimited seats Custom retention policies Filters for data ingest Everything in Pay-as-you-go Estimate Costs Enterprise Contact sales for pricing Contact us SAML &amp; SSO Custom MSAs &amp; SLAs RBAC &amp; audit logs Data export &amp; user reporting Everything in Business Estimate Costs Self-Hosted Enterprise For large enterprises hosting Highlight on their own infrastructure. Learn more. Estimate Costs Estimate your bill Each of our plans comes with a pre-defined usage quota, and if you exceed that quota, we charge an additional fee. For custom plans, reach out to us. Pay-as-you-go Monthly Annually Plan base fee $50.00 Session usage fee $0.00 Error usage fee $0.00 Logging fee $0.00 Tracing usage fee $0.00 Monthly Total $50.00 Session Replay $ 0.00 Usage: 500 Retention: 3 months Monthly ingested sessions : Error Monitoring $ 0.00 Usage: 1K Retention: 3 months Monthly ingested errors : Logging $ 0.00 Usage: 1M Retention: 30 days Monthly ingested logs : Traces $ 0.00 Usage: 25M Retention: 30 days Monthly ingested traces : Our customers Highlight powers forward-thinking companies. More about our customers → Don&#x27;t take our word. Read our customer review section → Highlight helps us catch bugs that would otherwise go undetected and makes it easy to replicate and debug them. Max Musing , Founder &amp; CEO Highlight weaves together the incredible, varied, and complex interactions of our users into something understandable and actionable. Kai Hess , Founding Product Designer I love Highlight because not only does it help me debug more quickly, but it gives me insight into how customers are actually using our product. Meryl Dakin , Founding Software Engineer Highlight has helped us win over several customers by making it possible for us to provide hands-on support, based on a detailed understanding of what each user was doing. Neil Raina , CTO Highlight helps us catch bugs that would otherwise go undetected and makes it easy to replicate and debug them. Max Musing , Founder &amp; CEO Highlight weaves together the incredible, varied, and complex interactions of our users into something understandable and actionable. Kai Hess , Founding Product Designer I love Highlight because not only does it help me debug more quickly, but it gives me insight into how customers are actually using our product. Meryl Dakin , Founding Software Engineer Highlight has helped us win over several customers by making it possible for us to provide hands-on support, based on a detailed understanding of what each user was doing. Neil Raina , CTO Try Highlight Today Get the visibility you need Get started for free Product Pricing Sign up Features Privacy &amp; Security Customers Session Replay Error Monitoring Logging Competitors LogRocket Hotjar Fullstory Smartlook Inspectlet Datadog Sentry Site24x7 Sprig Mouseflow Pendo Heap LogicMonitor Last9 Axiom Better Stack HyperDX Dash0 Developers Changelog Documentation Ambassadors Frameworks React Next.js Angular Gatsby.js Svelte.js Vue.js Express Golang Next.js Node.js Rails Hono Contact &amp; Legal Terms of Service Privacy Policy Careers sales@highlight.io security@highlight.io [object Object]
2026-01-13T08:49:45
https://docs.pytest.org/en/stable/
pytest documentation Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content pytest documentation Get Started How-to guides How to invoke pytest How to write and report assertions in tests How to use fixtures How to mark test functions with attributes How to parametrize fixtures and test functions How to use subtests How to use temporary directories and files in tests How to monkeypatch/mock modules and environments How to run doctests How to re-run failed tests and maintain state between test runs How to handle test failures Managing pytest’s output How to manage logging How to capture stdout/stderr output How to capture warnings How to use skip and xfail to deal with tests that cannot succeed How to install and use plugins Writing plugins Writing hook functions How to use pytest with an existing test suite How to use unittest -based tests with pytest How to implement xunit-style set-up How to set up bash completion Reference guides API Reference Fixtures reference Configuration Exit codes Pytest Plugin List Explanation Anatomy of a test About fixtures Good Integration Practices pytest import mechanisms and sys.path / PYTHONPATH Typing in pytest CI Pipelines Flaky tests Examples and customization tricks Demo of Python failure reports with pytest Basic patterns and examples Parametrizing tests Working with custom markers A session-fixture which can look at all collected tests Changing standard (Python) test discovery Working with non-python tests Using a custom directory collector About the project Changelog Contributing Backwards Compatibility Policy History Python version support Sponsor pytest for enterprise License Contact channels Useful links pytest @ PyPI pytest @ GitHub Issue Tracker PDF Documentation Back to top Next Open Trainings and Events Professional Testing with Python , via Python Academy (3 day in-depth training), March 3th – 5th 2026 , Leipzig (DE) / Remote Also see previous talks and blogposts pytest: helps you write better programs ¶ The pytest framework makes it easy to write small, readable tests, and can scale to support complex functional testing for applications and libraries. PyPI package name : pytest A quick example ¶ # content of test_sample.py def inc ( x ): return x + 1 def test_answer (): assert inc ( 3 ) == 5 To execute it: $ pytest =========================== test session starts ============================ platform linux -- Python 3.x.y, pytest-9.x.y, pluggy-1.x.y rootdir: /home/sweet/project collected 1 item test_sample.py F [100%] ================================= FAILURES ================================= _______________________________ test_answer ________________________________ def test_answer(): &gt; assert inc(3) == 5 E assert 4 == 5 E + where 4 = inc(3) test_sample.py :6: AssertionError ========================= short test summary info ========================== FAILED test_sample.py:: test_answer - assert 4 == 5 ============================ 1 failed in 0.12s ============================= Due to pytest ’s detailed assertion introspection, only plain assert statements are used. See Get started for a basic introduction to using pytest. Features ¶ Detailed info on failing assert statements (no need to remember self.assert* names) Auto-discovery of test modules and functions Modular fixtures for managing small or parametrized long-lived test resources Can run unittest (including trial) test suites out of the box Python 3.10+ or PyPy 3 Rich plugin architecture, with over 1300+ external plugins and thriving community Documentation ¶ Get started - install pytest and grasp its basics in just twenty minutes How-to guides - step-by-step guides, covering a vast range of use-cases and needs Reference guides - includes the complete pytest API reference, lists of plugins and more Explanation - background, discussion of key topics, answers to higher-level questions Bugs/Requests ¶ Please use the GitHub issue tracker to submit bugs or request features. Support pytest ¶ Open Collective is an online funding platform for open and transparent communities. It provides tools to raise money and share your finances in full transparency. It is the platform of choice for individuals and companies that want to make one-time or monthly donations directly to the project. See more details in the pytest collective . pytest for enterprise ¶ Available as part of the Tidelift Subscription. The maintainers of pytest and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more. Security ¶ pytest has never been associated with a security vulnerability, but in any case, to report a security vulnerability please use the Tidelift security contact . Tidelift will coordinate the fix and disclosure. Next Get Started Copyright &#169; 2015, holger krekel and pytest-dev team Made with Sphinx and @pradyunsg 's Furo On this page pytest: helps you write better programs A quick example Features Documentation Bugs/Requests Support pytest pytest for enterprise Security
2026-01-13T08:49:45
https://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/?replytocom=23445#content
Implementing a web server in a single printf() call &#8211; Tinyhack.com --> Skip to content Tinyhack.com A hacker does for love what others would not do for money. Implementing a web server in a single printf() call A guy just forwarded a joke that most of us will already know Jeff Dean Facts (also here and here ). Everytime I read that list, this part stands out: Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search. It is really possible to implement a web server using a single printf call, but I haven&#8217;t found anyone doing it. So this time after reading the list, I decided to implement it. So here is the code, a pure single printf call, without any extra variables or macros (don&#8217;t worry, I will explain how to this code works) #include &lt;stdio.h&gt; int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot;, ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 + 2, (((unsigned long int)0x4005c8 + 12) &amp; 0xffff)- ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 ); } This code only works on a Linux AMD64 bit system, with a particular compiler (gcc version 4.8.2 (Debian 4.8.2-16) ) And to compile it: gcc -g web1.c -O webserver As some of you may have guessed: I cheated by using a special format string . That code may not run on your machine because I have hardcoded two addresses. The following version is a little bit more user friendly (easier to change), but you are still going to need to change 2 values: FUNCTION_ADDR and DESTADDR which I will explain later: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) #define DESTADDR 0x00000000006007D8 #define a (FUNCTION_ADDR &amp; 0xffff) #define b ((FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff) int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot; , b, 0, DESTADDR + 2, a-b, 0, DESTADDR ); } I will explain how the code works through a series of short C codes. The first one is a code that will explain how that we can start another code without function call. See this simple code: #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #define ADDR 0x00000000600720 void hello() { printf(&quot;hello world\n&quot;); } int main(int argc, char *argv&#x5B;]) { (*((unsigned long int*)ADDR))= (unsigned long int)hello; } You can compile it, but it many not run on your system. You need to do these steps: 1. Compile the code: gcc run-finalizer.c -o run-finalizer 2. Examine the address of fini_array objdump -h -j .fini_array run-finalizer And find the VMA of it: run-finalizer: file format elf64-x86-64 Sections: Idx Name Size VMA LMA File off Algn 18 .fini_array 00000008 0000000000600720 0000000000600720 00000720 2**3 CONTENTS, ALLOC, LOAD, DATA Note that you need a recent GCC to do this, older version of gcc uses different mechanism of storing finalizers. 3. Change the value of ADDR on the code to the correct address 4. Compile the code again 5. Run it and now you will see &#8220;hello world&#8221; printed to your screen. How does this work exactly?: According to Chapter 11 of Linux Standard Base Core Specification 3.1 .fini_array This section holds an array of function pointers that contributes to a single termination array for the executable or shared object containing the section. We are overwriting the array so that our hello function is called instead of the default handler. If you are trying to compile the webserver code, the value of ADDR is obtained the same way (using objdump). Ok, now we know how to execute a function by overriding a certain address, we need to know how we can overwrite an address using printf . You can find many tutorials on how to exploit format string bugs, but I will try give a short explanation. The printf function has this feature that enables us to know how many characters has been printed using the &#8220;%n&#8221; format: #include &lt;stdio.h&gt; int main(){ int count; printf(&quot;AB%n&quot;, &amp;count); printf(&quot;\n%d characters printed\n&quot;, count); } You will see that the output is: AB 2 characters printed Of course we can put any address to the count pointer to overwrite that address. But to overide an address with a large value we need to print a large amount of text. Fortunately there is another format string &#8220;%hn&#8221; that works on short instead of int. We can overwrite the value 2 bytes at a time to form the 4 byte value that we want. Lets try to use two printf calls to put a¡ value that we want (in this case the pointer to function &#8220;hello&#8221;) to the fini_array: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)hello) #define DESTADDR 0x0000000000600948 void hello() { printf(&quot;\n\n\n\nhello world\n\n&quot;); } int main(int argc, char *argv&#x5B;]) { short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;a = %04x b = %04x\n&quot;, a, b) uint64_t *p = (uint64_t*)DESTADDR; printf(&quot;before: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;after1: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); printf(&quot;after2: %08lx\n&quot;, *p); return 0; } The important lines are: short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); The a and b are just halves of the function address, we can construct a string of length a and b to be given to printf, but I chose to use the &#8220;%*&#8221; formatting which will control the length of the output through parameter. For example, this code: printf("%*c", 10, 'A'); Will print 9 spaces followed by A, so in total, 10 characters will be printed. If we want to use just one printf, we need to take account that b bytes have been printed, and we need to print another b-a bytes (the counter is accumulative). printf("%*c%hn%*c%hn", b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); Currently we are using the &#8220;hello&#8221; function to call, but we can call any function (or any address). I have written a shellcode that acts as a web server that just prints &#8220;Hello world&#8221;. This is the shell code that I made: unsigned char hello&#x5B;] = "\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32" "\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d" "\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74" "\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65" "\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f" "\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89" "\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f" "\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff" "\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49" "\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31" "\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c" "\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2" "\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f" "\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee" "\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff" "\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05" "\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3"; If we remove the function hello and insert that shell code, that code will be called. That code is just a string, so we can append it to the &#8220;%*c%hn%*c%hn&#8221; format string. This string is unnamed, so we will need to find the address after we compile it. To obtain the address, we need to compile the code, then disassemble it: objdump -d webserver 00000000004004fd &lt;main&gt;: 4004fd: 55 push %rbp 4004fe: 48 89 e5 mov %rsp,%rbp 400501: 48 83 ec 20 sub $0x20,%rsp 400505: 89 7d fc mov %edi,-0x4(%rbp) 400508: 48 89 75 f0 mov %rsi,-0x10(%rbp) 40050c: c7 04 24 d8 07 60 00 movl $0x6007d8,(%rsp) 400513: 41 b9 00 00 00 00 mov $0x0,%r9d 400519: 41 b8 94 05 00 00 mov $0x594,%r8d 40051f: b9 da 07 60 00 mov $0x6007da,%ecx 400524: ba 00 00 00 00 mov $0x0,%edx 400529: be 40 00 00 00 mov $0x40,%esi 40052e: bf c8 05 40 00 mov $0x4005c8,%edi 400533: b8 00 00 00 00 mov $0x0,%eax 400538: e8 a3 fe ff ff callq 4003e0 &lt;printf@plt&gt; 40053d: c9 leaveq 40053e: c3 retq 40053f: 90 nop We only need to care about this line: mov $0x4005c8,%edi That is the address that we need in: #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) The +12 is needed because our shell code starts after the string &#8220;%*c%hn%*c%hn&#8221; which is 12 characters long. If you are curious about the shell code, it was created from the following C code. #include&lt;stdio.h&gt; #include&lt;string.h&gt; #include&lt;stdlib.h&gt; #include&lt;unistd.h&gt; #include&lt;sys/types.h&gt; #include&lt;sys/stat.h&gt; #include&lt;sys/socket.h&gt; #include&lt;arpa/inet.h&gt; #include&lt;netdb.h&gt; #include&lt;signal.h&gt; #include&lt;fcntl.h&gt; int main(int argc, char *argv&#x5B;]) { int sockfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in serv_addr; bzero((char *)&amp;serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(8080); bind(sockfd, (struct sockaddr *)&amp;serv_addr, sizeof(serv_addr)); listen(sockfd, 5); while (1) { int cfd = accept(sockfd, 0, 0); char *s = &quot;HTTP/1.0 200\r\nContent-type:text/html\r\n\r\n&lt;h1&gt;Hello world!&lt;/h1&gt;&quot;; if (fork()==0) { write(cfd, s, strlen(s)); shutdown(cfd, SHUT_RDWR); close(cfd); } } return 0; } I have done an extra effort (although it is not really necessary in this case) to remove all NUL character from the shell code (since I couldn&#8217;t find one for X86-64 in the Shellcodes database ). Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search . It is left as an exercise for the reader to scale the web server to able to handle Google search load. Source codes for this post is available at https://github.com/yohanes/printf-webserver For people who thinks that this is useless: yes it is useless. I just happen to like this challenge, and it has refreshed my memory and knowledge for the following topics: shell code writing (haven&#8217;t done this in years), AMD64 assembly (calling convention, preserved registers, etc), syscalls, objdump, fini_array (last time I checked, gcc still used .dtors), printf format exploiting, gdb tricks (like writing memory block to file), and low level socket code (I have been using boost&#8217;s for the past few years). Update : Ubuntu adds a security feature that provides a read-only relocation table area in the final ELF. To be able to run the examples in ubuntu, add this in the command line when compiling -Wl,-z,norelro e.g: gcc -Wl,-z,norelro test.c Author admin Posted on March 12, 2014 April 28, 2017 Categories hacks 18 thoughts on &ldquo;Implementing a web server in a single printf() call&rdquo; dodi says: March 12, 2014 at 2:04 pm eh buset, serius nih lu ? 🙂 Reply priyo says: March 13, 2014 at 5:07 am scroll up&#8230; scroll down&#8230; scroll up&#8230; scroll down&#8230; 100x *gagal paham* Reply terminalcommand says: March 13, 2014 at 5:19 am Thank you! Very interesting article. I also didn&#8217;t know about the one line webserver at google. Although this is a hard topic, you&#8217;ve made a great work simplifying it. Reply Basun says: March 13, 2014 at 10:02 am The one line webserver bit is a joke about Jeff Dean, who works at Google. Its not real. 🙂 Reply Cees Timmerman says: April 20, 2016 at 4:12 pm There are real webserver oneliners: https://gist.github.com/willurd/5720255 Reply anonim says: March 13, 2014 at 5:29 am Diskusinya di https://news.ycombinator.com/item?id=7389623 Reply Neil says: March 13, 2014 at 12:38 pm Shouldn&#8217;t there be an exit() somewhere in the fork==0 branch? Otherwise every time there is a request the new child process will become a server too and start accepting requests, right? I think the parent leaks its copy of the file descriptor too. Maybe the fork is a bit redundant. I don&#8217;t think the write or close will block with such a small amount of data. Cool post though! I&#8217;m not really sure why I&#8217;m nitpicking in the shell code. Sorry. Reply admin says: March 14, 2014 at 1:58 am Ah yes, there is an exit from the loop on the assembly code (myhttp.s) but it got removed from http.c when I removed the comment and debug code. And you are also right about the fork, it is unnecessary in this case. At first I was going to write the HTTP headers and then exec some external command. I changed my mind and didn&#8217;t bother deleting the fork call. Reply Kyle Ross says: March 13, 2014 at 11:02 pm This is really interesting, but I&#8217;m having trouble following whats actually happening. Could you explain how you reduced that C code with includes and methods into a string containing hex codes and how that is turned back into some sort of executable code? Thanks Reply admin says: March 14, 2014 at 2:01 am I think it is beyond the scope of this article to explain about shell code writing. There are many books and tutorials that you can read (just search for &#8220;buffer overflow&#8221; or &#8220;shell code writing&#8221;). Reply TTK Ciar says: March 14, 2014 at 1:05 am Alternatively: $ perl -Mojo -E &#8216;a({inline =&gt; &#8220;%= `uptime`&#8221;})-&gt;start&#8217; daemon &amp; Server available at http://127.0.0.1:3000 . $ lynx -dump -nolist http://127.0.0.1:3000/ 17:57:56 up 66 days, 6:45, 108 users, load average: 0.10, 0.12, 0.07 though, perl by definition is cheating. Reply Evan Danaher says: March 14, 2014 at 2:54 pm I&#8217;m not sure why you used finalizers instead of just changing the return address on the stack; this may be the first time I&#8217;ve ever said this, but stack smashing is much more portable. I&#8217;ve made a variant that I&#8217;d expect to work on any gcc 4.4-4.7 on x86_64 Linux, and have some ideas which, if they work out, may make it actually &#8220;portable&#8221; to any x86/x86_64 Unix running a reasonable compiler. https://github.com/edanaher/printf-webserver Reply admin says: March 17, 2014 at 3:02 pm Yes using the stack is also possible, but on most modern system, GCC is compiled with stack protection turned on (and needs to be disabled using -fno-stack-protector). Reply Pingback: Implementing a web server in a single printf() call &laquo; adafruit industries blog Itzik Kotler says: March 15, 2014 at 4:35 pm Pretty neat. I did something similar (all though simpler) back in the days. See: http://www.exploit-db.com/papers/13233/ Reply Pingback: Saving the world, one cpu cycle at a time | Dav&#039;s bit o the web programath says: April 22, 2014 at 1:18 pm printf(&#8220;%*c%hn%*c%hn&#8221;, b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; i think the fourth parameter should be &#8216;a-b&#8217;, not &#8216;b-a&#8217;, because a == b + (a &#8211; b) Reply Pingback: New top story on Hacker News: Implementing a web server in a single printf call (2014) &#8211; Latest news Leave a Reply Cancel reply Your email address will not be published. Required fields are marked * Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. &#916; Post navigation Previous Previous post: Raspberry Pi for Out of Band Linux PC management Next Next post: Exploiting the Futex Bug and uncovering Towelroot Pages About Archive Search for: Search Follow x.com/yohanes Mastodon Recent Posts CVE-2025-31931 Arbitrary Shared Library Loading in Intel ITT API on Android (affects OpenCV &lt;= 4.10) Decrypting Encrypted files from Akira Ransomware (Linux/ESXI variant 2024) using a bunch of GPUs Patching .so files of an installed Android App Extracting WhatsApp Database (or any app data) from Android 12/13 using CVE-2024-0044 Zygisk-based reFlutter Recent Comments Eitan Porat on About admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 Archives November 2025 March 2025 November 2024 June 2024 April 2024 January 2024 December 2023 September 2022 March 2021 January 2021 May 2019 January 2019 November 2018 July 2018 May 2018 February 2018 October 2017 September 2017 March 2017 November 2016 November 2015 July 2014 March 2014 February 2014 June 2013 January 2013 November 2011 March 2011 February 2011 July 2010 April 2010 January 2010 December 2009 September 2009 August 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 March 2008 February 2008 October 2007 June 2007 February 2007 January 2007 December 2006 Categories agestar android blog ctf debian flareon flex freebsd google hacks hardware hostmonster linux mac os x misc mobile opensource phone raspberry reverse-engineering sdr security Uncategorized wii writeup Meta Log in Entries feed Comments feed WordPress.org Tinyhack.com Proudly powered by WordPress
2026-01-13T08:49:45
https://wiki.python.org/moin/BeginnersGuide/Programmers?action=info
Info for "BeginnersGuide/Programmers" - Python Wiki Search: Info for "BeginnersGuide/Programmers" FrontPage RecentChanges FindPage HelpContents Programmers Page Immutable Page Comments Info Attachments More Actions: Raw Text Print View Delete Cache ------------------------ Check Spelling Like Pages Local Site Map ------------------------ Rename Page Delete Page ------------------------ ------------------------ Remove Spam Revert to this revision ------------------------ SlideShow User Login [ Show "Revision History" ] [ Show "General Page Infos" ] [ Show "Page hits and edits" ] Revision History Showing page edit history entries from 129 to 228 out of 228 entries total. ( 5 | 10 | 25 | 50 | 100 | 200 items per page) 228 128 28 Older # Date Size Editor Comment Action 217 2026-01-08 18:28:33 11131 to previous MatsWichmann &nbsp; view 216 2026-01-08 15:55:21 10937 to previous MatsWichmann &nbsp; view 215 2026-01-08 15:23:11 11256 to previous MatsWichmann More updates to interactive tools view 214 2026-01-07 23:16:47 11178 to previous AdamEmery &nbsp; view 213 2025-12-31 08:47:27 11291 to previous LakshyaKeshwani Added few missing resources view 212 2025-09-04 17:02:09 10646 to previous finnigja add interactive tool view 211 2024-11-20 01:24:35 10532 to previous huhuhang Add the link to the LabEx Python hands-on labs pages. view 210 2024-03-03 16:02:54 10326 to previous MatsWichmann Fix markup error in recent addition - does not deal with question if this is the right bucket for this entry, or whether it's titled suitably (I consider both answers to be no) view 209 2024-03-03 14:12:37 10325 to previous ranjitbhatta &nbsp; view 208 2023-11-22 20:05:29 10178 to previous MarkO'Neill moved paid codecademy python3 course from free python resources to other python resource aggregators view 207 2023-08-03 20:45:05 10179 to previous BenDicken &nbsp; view 206 2023-05-31 18:06:18 10087 to previous AdamEmery removing extra Line and adding a editor tool view 205 2023-03-03 16:32:57 10008 to previous AdamEmery Adding new interactive course view 204 2023-03-03 16:26:21 9838 to previous AdamEmery Removing dead links view 203 2022-11-22 19:19:40 10400 to previous eriky fix spelling here and there, alphabetical order view 202 2022-11-04 04:37:34 10411 to previous SonnyLi Add Codédex in alphabetical order. view 201 2022-07-15 14:34:23 10309 to previous JamesCzekaj Added 'a byte of python' view 200 2022-06-29 12:52:22 10132 to previous JulienPalard Adding HackInScience. view 199 2022-03-22 06:00:38 10038 to previous BDaga09 &nbsp; view 198 2021-10-24 14:19:27 9868 to previous Srinivas Ramakrishna Added free Python full course tutorial by Freecodecamp view 197 2021-10-24 14:10:42 9657 to previous Srinivas Ramakrishna indentation fix view 196 2021-10-24 14:09:49 9656 to previous Srinivas Ramakrishna Added resource itsmycode (python blog site) view 195 2021-09-15 08:21:35 9479 to previous John Ludhi Added a resource nbshare.io under "Resources" section view 194 2021-08-17 12:46:48 9335 to previous NatDunn &nbsp; view 193 2021-02-18 20:24:44 9152 to previous eriky fixed an off looking link, more stuff in alphabetical order, moved paid content to it's own section (should this be here at all??) view 192 2021-02-15 18:57:02 9090 to previous KarimElghamrawy Resume rearranging resources based on alphabetical order (not yet complete) view 191 2021-02-13 17:30:01 9091 to previous KarimElghamrawy First stab at ordering the resources alphabetically. Will resume at a later time. view 190 2021-01-26 08:48:38 9088 to previous eriky added pythonspeed.com (great resource about speeding up code and also has great docker build tips) view 189 2021-01-26 08:44:06 8960 to previous eriky Added two great resources: full stack python and elements of Python style view 188 2020-12-16 20:10:23 8603 to previous eriky python3.guide moved to a new domain, fixed the link view 187 2020-12-03 10:41:29 8577 to previous ShadowClaw20017 &nbsp; view 186 2020-09-12 17:50:10 8426 to previous SamHuang Added "Ultimate Python study guide" and "Awesome Python" view 185 2020-09-12 13:59:59 8148 to previous JaraKaca Resources: Fix Python Koans link view 184 2020-08-22 09:18:27 8153 to previous eriky added 'paid' qualifier to a number of commercial sites, added an extra free python 3 guide, trivial language fix view 183 2020-08-18 18:34:46 7944 to previous eriky trival language fixes (thanks grammarly ;-) view 182 2020-08-18 18:33:06 7944 to previous eriky Site link to https://code.tutsplus.com/ was generic and not specifically on python view 181 2020-07-29 06:28:26 8038 to previous ChankeyPathak adding pandas cookbook wiki view 180 2020-04-26 17:04:06 7909 to previous MatsWichmann &nbsp; view 179 2019-11-10 00:38:01 7993 to previous FrancesHocutt Add resources from Python3.0Tutorials view 178 2019-11-10 00:19:11 7770 to previous FrancesHocutt Remove Py2-centric tutorials/tools view 177 2019-11-10 00:03:00 8487 to previous FrancesHocutt Remove Py2-centric resources and broken links view 176 2019-10-27 00:22:13 9828 to previous JennyRyan removed dead link view - 2019-10-19 22:20:21 0 - FrancesHocutt ATTDEL: Tutorial.txt 175 2019-09-18 21:54:08 10146 to previous MatsWichmann &nbsp; view 174 2019-05-26 19:20:57 9854 to previous MeenakshiAgarwal updated python resource link view 173 2019-05-21 21:45:49 9853 to previous IgorRocha &nbsp; view 172 2019-01-18 18:17:12 9698 to previous MeenakshiAgarwal Updated learning resource to https view 171 2019-01-13 20:55:04 9697 to previous ChrisM Added codeacademy resource + email course + new category view 170 2018-11-12 05:56:43 9291 to previous RohitDuggal Fixed a broken link and removed a link (http://www.thenewboston.com/) as the site is not operational any more view 169 2018-11-12 05:49:59 9352 to previous RohitDuggal Reinstated a previous link under 'Reviews' section that was somehow edited by a new link. view 168 2018-10-26 11:02:09 9164 to previous TreyHuffine Add another resource to learn Python with tutorials ranked by Python developers view 167 2017-10-28 09:51:19 9009 to previous MeenakshiAgarwal Added a Python learning resource for basic to advanced level. view 166 2017-10-17 08:13:46 8813 to previous RohitDuggal Remove broken links view 165 2017-10-15 04:22:07 9921 to previous Pratp &nbsp; view 164 2017-09-30 05:37:22 9771 to previous Pratp &nbsp; view 163 2017-09-28 18:14:07 9628 to previous Dinesh Chand Thakuri &nbsp; view 162 2017-08-24 12:23:20 9476 to previous MarcAndreLemburg Add new section for reviews view 161 2017-08-24 12:20:42 9432 to previous MarcAndreLemburg Revert listing order change (see note at the top of the page) view 160 2017-08-23 10:07:50 9432 to previous ranjitbhatta Getting Started With Python Guide moved to top. view 159 2017-08-23 10:03:52 9432 to previous ranjitbhatta Removed broken links. view 158 2017-08-08 15:33:39 9879 to previous RohitDuggal Added one more resource view 157 2017-08-08 15:26:44 9734 to previous MatsWichmann &nbsp; view 156 2017-08-08 14:23:38 9733 to previous MatsWichmann &nbsp; view 155 2017-08-08 14:04:54 9757 to previous MatsWichmann &nbsp; view 154 2017-01-23 12:10:35 9759 to previous ranjitbhatta Added a link "a comprehensive guide to getting started with Python" view 153 2017-01-20 14:54:50 9577 to previous jayanam &nbsp; view 152 2016-12-01 18:35:24 9241 to previous AdamBrown minor phrasing change view 151 2016-12-01 18:34:09 9253 to previous AdamBrown add links to Tuts+ video courses view 150 2016-11-30 17:35:47 8404 to previous AivarAnnamaa &nbsp; view 149 2016-11-08 06:14:00 8409 to previous jayanam &nbsp; view 148 2016-08-29 07:39:57 8240 to previous MarcAndreLemburg Move tutorial listings of pythonspot and pythonguru to the end of the list after seeing them being in violation with what we expect of entries on this page. Also clarified that we don't want spammers. view 147 2016-06-14 11:56:44 8203 to previous AivarAnnamaa fixed a typo view 146 2016-06-14 11:55:37 8204 to previous AivarAnnamaa Added info about Thonny view 145 2016-06-12 08:46:43 8080 to previous pythonspot removed dead/spam links view 144 2016-05-05 18:23:38 8473 to previous pythonspot Small change, number of videos view 143 2016-04-09 20:38:24 8472 to previous pythonspot Undo view 142 2016-04-09 14:44:45 8472 to previous pythonguru &nbsp; view 141 2016-04-01 17:18:26 8472 to previous pythonspot &nbsp; view 140 2016-04-01 00:18:33 8482 to previous pythonspot Added video link view 139 2016-03-31 17:28:02 8373 to previous pythonspot &nbsp; view 138 2016-03-28 18:49:56 8373 to previous pythonguru &nbsp; view 137 2016-02-12 13:24:41 8373 to previous SteveHolden Added a warning to deter self-advertisers who continually edit the page to their own advantage. view 136 2016-02-12 12:25:22 7943 to previous pythonspot Undo view 135 2016-02-12 12:19:49 7943 to previous pythonguru &nbsp; view 134 2016-02-12 09:48:12 7943 to previous pythonspot Undo view 133 2016-02-12 04:30:23 7943 to previous pythonguru &nbsp; view 132 2016-02-11 17:32:15 7943 to previous pythonspot Undo. view 131 2016-02-11 16:57:09 7943 to previous pythonguru &nbsp; view 130 2016-02-11 11:00:33 7943 to previous pythonspot Undo view 129 2016-02-11 04:56:21 7943 to previous pythonguru &nbsp; view 128 2016-02-10 10:21:56 7943 to previous pythonspot Undo edit. view 127 2016-02-10 03:49:10 7943 to previous pythonguru &nbsp; view 126 2016-02-06 11:37:56 7943 to previous pythonspot &nbsp; view 125 2016-02-06 11:12:22 7943 to previous pythonguru &nbsp; view 124 2016-02-06 01:19:28 7943 to previous pythonspot Undo view 123 2016-02-03 04:40:16 7943 to previous pythonguru &nbsp; view 122 2016-01-28 16:49:21 7943 to previous JoakimWassberg &nbsp; view 121 2016-01-12 14:29:52 7779 to previous pythonspot Revert. Don't do useless edits. view 120 2016-01-10 12:19:33 7779 to previous pythonguru &nbsp; view 119 2016-01-05 21:00:26 7779 to previous pythonspot No significant change previously. view 228 128 28 Older MoinMoin Powered Python Powered GPL licensed Valid HTML 4.01 Unable to edit the page? See the FrontPage for instructions.
2026-01-13T08:49:45
https://id-id.facebook.com/login/?next=https%3A%2F%2Fwww.facebook.com%2Fshare_channel%2F%3Ftype%3Dreshare%26link%3Dhttps%253A%252F%252Fdev.to%252Fjiwoomap%252Fbuilding-a-remembering-ai-trading-agent-with-python-langgraph-and-obsidian-30hn%26app_id%3D966242223397117%26source_surface%3Dexternal_reshare%26display%26hashtag
Masuk Facebook Notice Anda harus login untuk melanjutkan. Login ke Facebook Anda harus login untuk melanjutkan. Masuk Lupa akun? atau Buat akun baru Bahasa Indonesia 한국어 English (US) Tiếng Việt ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch Daftar Masuk Messenger Facebook Lite Video Meta Pay Meta Store Meta Quest Ray-Ban Meta Meta AI Konten Meta AI lainnya Instagram Threads Pusat Informasi Pemilu Kebijakan Privasi Pusat Privasi Tentang Buat Iklan Buat Halaman Developer Karier Cookie Pilihan Iklan Ketentuan Bantuan Pengunggahan Kontak &amp; Non-Pengguna Pengaturan Log aktivitas Meta © 2026
2026-01-13T08:49:45
https://peps.python.org/pep-0719/
PEP 719 – Python 3.13 Release Schedule | peps.python.org Following system colour scheme Selected dark colour scheme Selected light colour scheme Python Enhancement Proposals Python &raquo; PEP Index &raquo; PEP 719 Toggle light / dark / auto colour theme PEP 719 – Python 3.13 Release Schedule Author : Thomas Wouters &lt;thomas&#32;&#97;t&#32;python.org&gt; Status : Active Type : Informational Topic : Release Created : 26-May-2023 Python-Version : 3.13 Table of Contents Abstract Release Manager and Crew Release Schedule 3.13.0 schedule Bugfix releases Source-only security fix releases 3.13 Lifespan Copyright Abstract This document describes the development and release schedule for Python 3.13. Release Manager and Crew 3.13 Release Manager: Thomas Wouters Windows installers: Steve Dower Mac installers: Ned Deily Documentation: Julien Palard Release Schedule 3.13.0 schedule Note: the dates below use a 17-month development period that results in a 12-month release cadence between feature versions, as defined by PEP 602 . Actual: 3.13 development begins: Monday, 2023-05-22 3.13.0 alpha 1: Friday, 2023-10-13 3.13.0 alpha 2: Wednesday, 2023-11-22 3.13.0 alpha 3: Wednesday, 2024-01-17 3.13.0 alpha 4: Thursday, 2024-02-15 3.13.0 alpha 5: Tuesday, 2024-03-12 3.13.0 alpha 6: Tuesday, 2024-04-09 3.13.0 beta 1: Wednesday, 2024-05-08 (No new features beyond this point.) 3.13.0 beta 2: Wednesday, 2024-06-05 3.13.0 beta 3: Thursday, 2024-06-27 3.13.0 beta 4: Thursday, 2024-07-18 3.13.0 candidate 1: Thursday, 2024-08-01 3.13.0 candidate 2: Friday, 2024-09-06 3.13.0 candidate 3: Tuesday, 2024-10-01 3.13.0 final: Monday, 2024-10-07 Bugfix releases Actual: 3.13.1: Tuesday, 2024-12-03 3.13.2: Tuesday, 2025-02-04 3.13.3: Tuesday, 2025-04-08 3.13.4: Tuesday, 2025-06-03 3.13.5: Wednesday, 2025-06-11 (hotfix) 3.13.6: Wednesday, 2025-08-06 3.13.7: Thursday, 2025-08-14 3.13.8: Tuesday, 2025-10-07 3.13.9: Tuesday, 2025-10-14 3.13.10: Tuesday, 2025-12-02 3.13.11: Friday, 2025-12-05 Expected: 3.13.12: Tuesday, 2026-02-03 3.13.13: Tuesday, 2026-04-07 3.13.14: Tuesday, 2026-06-09 3.13.15: Tuesday, 2026-08-04 3.13.16: Tuesday, 2026-10-06 (Final regular bugfix release with binary installers) Source-only security fix releases Provided irregularly on an as-needed basis until October 2029. 3.13 Lifespan 3.13 will receive bugfix updates approximately every 2 months for approximately 24 months. Around the time of the release of 3.15.0 final, the final 3.13 bugfix update will be released. After that, it is expected that security updates (source only) will be released until 5 years after the release of 3.13.0 final, so until approximately October 2029. Copyright This document is placed in the public domain or under the CC0-1.0-Universal license, whichever is more permissive. Source: https://github.com/python/peps/blob/main/peps/pep-0719.rst Last modified: 2025-12-05 20:34:32 GMT Contents Abstract Release Manager and Crew Release Schedule 3.13.0 schedule Bugfix releases Source-only security fix releases 3.13 Lifespan Copyright Page Source (GitHub)
2026-01-13T08:49:45
https://dev.to/t/tutorial/page/14
Tutorial Page 14 - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close # tutorial Follow Hide Tutorial is a general purpose tag. We welcome all types of tutorial - code related or not! It's all about learning, and using tutorials to teach others! Create Post submission guidelines Tutorials should teach by example. This can include an interactive component or steps the reader can follow to understand. Older #tutorial posts 11 12 13 14 15 16 17 18 19 Posts Left menu 👋 Sign in for the ability to sort posts by relevant , latest , or top . Right menu What I Learned Building an AI Learning Platform Without Hype John Haworth John Haworth John Haworth Follow Jan 5 What I Learned Building an AI Learning Platform Without Hype # discuss # ai # tutorial # beginners Comments Add Comment 1 min read PTSD as an adaptive program Connie Baugher Connie Baugher Connie Baugher Follow Jan 11 PTSD as an adaptive program # programming # ai # beginners # tutorial Comments Add Comment 2 min read Python&#39;s else on Loops: The Feature You&#39;re Not Using Samuel Ochaba Samuel Ochaba Samuel Ochaba Follow Jan 5 Python&#39;s else on Loops: The Feature You&#39;re Not Using # python # programming # tutorial # beginners Comments Add Comment 2 min read Human Activity Recognition Using Wearable Sensors: An End-to-End ML Pipeline Sreeram Achutuni Sreeram Achutuni Sreeram Achutuni Follow Jan 5 Human Activity Recognition Using Wearable Sensors: An End-to-End ML Pipeline # programming # ai # tutorial # machinelearning Comments Add Comment 7 min read Set up dev environment with Claude Code sabyasachi sabyasachi sabyasachi Follow Jan 10 Set up dev environment with Claude Code # ai # tutorial # tooling # productivity Comments Add Comment 5 min read How to Backup and Export Bookmarks: Complete Guide Cheng Yong Cheng Yong Cheng Yong Follow Jan 5 How to Backup and Export Bookmarks: Complete Guide # productivity # tooling # tutorial Comments Add Comment 6 min read Getting Started with Docker Ethan Zhang Ethan Zhang Ethan Zhang Follow Jan 6 Getting Started with Docker # docker # devops # tutorial # beginners Comments Add Comment 1 min read &quot;use client&quot; and &quot;use server&quot; directive in simple manner Ashish Prajapati Ashish Prajapati Ashish Prajapati Follow Jan 5 &quot;use client&quot; and &quot;use server&quot; directive in simple manner # nextjs # react # tutorial 5  reactions Comments Add Comment 1 min read Working with LLMs: A 50/50 Effort. Mohammed Farmaan. Mohammed Farmaan. Mohammed Farmaan. Follow Jan 5 Working with LLMs: A 50/50 Effort. # llm # ai # softwareengineering # tutorial 5  reactions Comments Add Comment 11 min read 🎨 Design Patterns in Python: A Visual Guide Data Tech Bridge Data Tech Bridge Data Tech Bridge Follow Jan 4 🎨 Design Patterns in Python: A Visual Guide # architecture # beginners # python # tutorial Comments Add Comment 6 min read Deploy Next.js to GCP for FREE: Serverless Setup with SQLite 4484-ho 4484-ho 4484-ho Follow Jan 5 Deploy Next.js to GCP for FREE: Serverless Setup with SQLite # cloud # nextjs # serverless # tutorial Comments Add Comment 8 min read Build a Competitor Content Spy That Tracks What&#39;s Working Olamide Olaniyan Olamide Olaniyan Olamide Olaniyan Follow Jan 5 Build a Competitor Content Spy That Tracks What&#39;s Working # webdev # ai # tutorial # programming Comments Add Comment 11 min read Asynchronous in JavaScript SILAMBARASAN A SILAMBARASAN A SILAMBARASAN A Follow Jan 5 Asynchronous in JavaScript # beginners # javascript # tutorial Comments Add Comment 1 min read Data Analyst Guide: Mastering Portfolio Projects That Impress Hiring Managers amal org amal org amal org Follow Jan 6 Data Analyst Guide: Mastering Portfolio Projects That Impress Hiring Managers # career # datascience # portfolio # tutorial Comments Add Comment 4 min read Terraform for Local VMs: A Modern Alternative to Vagrant todoroff todoroff todoroff Follow Jan 7 Terraform for Local VMs: A Modern Alternative to Vagrant # terraform # devops # vagrant # tutorial Comments Add Comment 6 min read Coding Challenge Practice - Question 96 Bukunmi Odugbesan Bukunmi Odugbesan Bukunmi Odugbesan Follow Jan 6 Coding Challenge Practice - Question 96 # algorithms # devchallenge # javascript # tutorial Comments Add Comment 1 min read Dynamic LED Chaser with 555 Timer &amp; CD4017 – Easy DIY Messin Messin Messin Follow Jan 5 Dynamic LED Chaser with 555 Timer &amp; CD4017 – Easy DIY # tutorial # diy # eletronic # beginners Comments Add Comment 3 min read Windows File System Navigation &amp; System Information Sajjad Rahman Sajjad Rahman Sajjad Rahman Follow Jan 5 Windows File System Navigation &amp; System Information # microsoft # windows # basic # tutorial Comments Add Comment 2 min read Prompt Engineering - Crafting Effective Prompts - Guide Hemanath Kumar J Hemanath Kumar J Hemanath Kumar J Follow Jan 5 Prompt Engineering - Crafting Effective Prompts - Guide # tutorial # ai # promptengineering # llms Comments Add Comment 2 min read Snowflake Data Cloud: A Comprehensive Guide Data Tech Bridge Data Tech Bridge Data Tech Bridge Follow Jan 5 Snowflake Data Cloud: A Comprehensive Guide # architecture # cloud # database # tutorial Comments Add Comment 31 min read Rescue Your Legacy Code: A Practical NLP Hack for Cleaning Up Dirty Data Malik Abualzait Malik Abualzait Malik Abualzait Follow Jan 6 Rescue Your Legacy Code: A Practical NLP Hack for Cleaning Up Dirty Data # ai # tech # programming # tutorial Comments Add Comment 2 min read Building a High-Performance Link Shortener with Next.js 16, Supabase, and Edge Functions Marius Memu Marius Memu Marius Memu Follow Jan 4 Building a High-Performance Link Shortener with Next.js 16, Supabase, and Edge Functions # architecture # nextjs # performance # tutorial Comments Add Comment 3 min read AWS Security Services: A Conversation Between Engineers Data Tech Bridge Data Tech Bridge Data Tech Bridge Follow Jan 4 AWS Security Services: A Conversation Between Engineers # aws # security # tutorial Comments Add Comment 24 min read Linux Filesystem and Navigation for DevOps (With Practical Demo) - v1.1 Chetan Tekam Chetan Tekam Chetan Tekam Follow Jan 10 Linux Filesystem and Navigation for DevOps (With Practical Demo) - v1.1 # cli # devops # linux # tutorial Comments Add Comment 2 min read The Beginner’s Guide to Cryptogram and ECI in Card Payments realNameHidden realNameHidden realNameHidden Follow Jan 4 The Beginner’s Guide to Cryptogram and ECI in Card Payments # beginners # cybersecurity # tutorial 5  reactions Comments Add Comment 3 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://dev.to/t/interview/page/77
Interview Page 77 - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close # interview Follow Hide Create Post Older #interview posts 74 75 76 77 78 79 80 81 82 Posts Left menu 👋 Sign in for the ability to sort posts by relevant , latest , or top . Right menu Top 10 SQL Queries asked in Interviews rahul rahul rahul Follow May 21 &#39;22 Top 10 SQL Queries asked in Interviews # beginners # sql # query # interview 11  reactions Comments 2  comments 3 min read What you need to be prepared for any job interview 🎙 Ben Halpern Ben Halpern Ben Halpern Follow for CodeNewbie May 17 &#39;22 What you need to be prepared for any job interview 🎙 # codenewbie # podcast # career # interview 33  reactions Comments 1  comment 1 min read React Interview Challenge: Create a Star Rating Component Andrew Heinke Andrew Heinke Andrew Heinke Follow May 18 &#39;22 React Interview Challenge: Create a Star Rating Component # react # webdev # design # interview 15  reactions Comments Add Comment 1 min read Interview Experience Digital Specialist Engineer - Infosys vedant-jain03 vedant-jain03 vedant-jain03 Follow May 16 &#39;22 Interview Experience Digital Specialist Engineer - Infosys # hackwithinfy # infosys # dse # interview 5  reactions Comments 4  comments 2 min read Not Your Usual Study Guide to Cracking Coding Interviews Nouran Bakry Nouran Bakry Nouran Bakry Follow May 16 &#39;22 Not Your Usual Study Guide to Cracking Coding Interviews # career # interview # programming # codenewbie 7  reactions Comments 2  comments 8 min read Interview Officer: &quot;Tell me about Cookies Session and Tokens&quot;. Me: &quot;Emm...&quot; Yanze Dai Yanze Dai Yanze Dai Follow for Pitayan Blog May 12 &#39;22 Interview Officer: &quot;Tell me about Cookies Session and Tokens&quot;. Me: &quot;Emm...&quot; # network # interview 4  reactions Comments Add Comment 10 min read The complete guide to Java interview questions and interview prep Hunter Johnson Hunter Johnson Hunter Johnson Follow for Educative May 11 &#39;22 The complete guide to Java interview questions and interview prep # java # interview # tutorial 9  reactions Comments Add Comment 14 min read My Google Warsaw(Poland)SDE university Grad Role Experience Pawanupadhyay10 Pawanupadhyay10 Pawanupadhyay10 Follow May 11 &#39;22 My Google Warsaw(Poland)SDE university Grad Role Experience # interview # google 5  reactions Comments Add Comment 2 min read Tow Sum Isaac Tonyloi Isaac Tonyloi Isaac Tonyloi Follow May 10 &#39;22 Tow Sum # beginners # datastructur # algorithms # interview 6  reactions Comments Add Comment 2 min read I was leetcoding the wrong way ahmedou-yahya ahmedou-yahya ahmedou-yahya Follow Apr 19 &#39;22 I was leetcoding the wrong way # leetcode # programming # algorithms # interview 7  reactions Comments Add Comment 3 min read Why I love pattern matching AC1556 AC1556 AC1556 Follow May 8 &#39;22 Why I love pattern matching # elixir # javascript # node # interview 10  reactions Comments 1  comment 5 min read Object, cyclic or not? Suvadeep Majumdar Suvadeep Majumdar Suvadeep Majumdar Follow May 6 &#39;22 Object, cyclic or not? # javascript # interview 10  reactions Comments Add Comment 2 min read Frontend Interview Resources Ajay kumbhare Ajay kumbhare Ajay kumbhare Follow May 5 &#39;22 Frontend Interview Resources # javascript # webdev # interview # career 11  reactions Comments Add Comment 1 min read Day 1 - What is hoisting and how to prevent it in javascript? C K Sanjay Babu C K Sanjay Babu C K Sanjay Babu Follow May 1 &#39;22 Day 1 - What is hoisting and how to prevent it in javascript? # javascript # interview # beginners 12  reactions Comments Add Comment 1 min read Java Interview - abstract Yiğit Erkal Yiğit Erkal Yiğit Erkal Follow Apr 28 &#39;22 Java Interview - abstract # java # interview # career # programming 10  reactions Comments 1  comment 2 min read JMeter Interview Questions rahul rahul rahul Follow Apr 27 &#39;22 JMeter Interview Questions # interview # jmeter # sql # devops 5  reactions Comments Add Comment 2 min read Java Interview - constructor Yiğit Erkal Yiğit Erkal Yiğit Erkal Follow Apr 26 &#39;22 Java Interview - constructor # java # interview # career # programming 9  reactions Comments Add Comment 1 min read Java Interview - static Yiğit Erkal Yiğit Erkal Yiğit Erkal Follow Apr 26 &#39;22 Java Interview - static # java # interview # programming # career 8  reactions Comments Add Comment 2 min read Remove Duplicates from Sorted Linked List Isaac Tonyloi Isaac Tonyloi Isaac Tonyloi Follow Apr 26 &#39;22 Remove Duplicates from Sorted Linked List # leetcode # datastructures # algortihms # interview 5  reactions Comments Add Comment 2 min read Big Tech Interview Difficulty Daniel Daniel Daniel Follow Apr 21 &#39;22 Big Tech Interview Difficulty # interview # datastructures # career 8  reactions Comments Add Comment 1 min read 5 tips for interviewing peer-ple in technology crisarji crisarji crisarji Follow Apr 21 &#39;22 5 tips for interviewing peer-ple in technology # interview # screening # technology # peers 5  reactions Comments 1  comment 5 min read Interviewing Engineers at Semaphore Tomas Fernandez Tomas Fernandez Tomas Fernandez Follow for Semaphore Apr 20 &#39;22 Interviewing Engineers at Semaphore # interview # jobs # beginners 3  reactions Comments 1  comment 7 min read Jak zachwycić zadaniem rekrutacyjnym Marcin Wosinek Marcin Wosinek Marcin Wosinek Follow for Poznaj dev Apr 20 &#39;22 Jak zachwycić zadaniem rekrutacyjnym # javascript # beginners # polish # interview 4  reactions Comments Add Comment 3 min read Spring - Dependency Injection Yiğit Erkal Yiğit Erkal Yiğit Erkal Follow Apr 17 &#39;22 Spring - Dependency Injection # spring # java # oop # interview 5  reactions Comments Add Comment 2 min read Add Two Numbers Isaac Tonyloi Isaac Tonyloi Isaac Tonyloi Follow Apr 16 &#39;22 Add Two Numbers # datastructures # leetcode # interview 7  reactions Comments Add Comment 2 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:45
https://dev.to/jitin_800e8b484929929663a/the-command-pattern-simplified-how-modern-java-21-25-makes-it-elegant-2fjh
The Command Pattern Simplified: How Modern Java (21–25) Makes It Elegant - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Add reaction Like Unicorn Exploding Head Raised Hands Fire Jump to Comments Save Boost More... Copy link Copy link Copied to Clipboard Share to X Share to LinkedIn Share to Facebook Share to Mastodon Share Post via... Report Abuse Jitin Posted on Jan 8 &bull; Originally published at Medium The Command Pattern Simplified: How Modern Java (21–25) Makes It Elegant # architecture # java # tutorial The Command pattern is one of those classic design patterns that feels both brilliant and tedious. Its idea is simple: capture a request as an object so you can parameterise clients, queue requests, and support undoable operations. But implementing it? That’s where things get messy. You end up with dozens of classes — one for each command. Command interface, concrete commands, receivers, invokers… the boilerplate never ends. Over the last few Java releases, though, the language has evolved. With records, sealed interfaces and pattern matching, modern Java (21 through 25) makes the Command pattern not just easier, but beautifully elegant. The Problem: Traditional Command Pattern Verbosity Let me show you what implementing the Command pattern looked like before Java 17. The Old Way: A Text Editor with Undo/Redo // ❌ Traditional Command Pattern (Java 17 and before) - LOTS OF BOILERPLATE // Step 1: Command interface public interface EditorCommand { void execute(); void undo(); } // Step 2: Receiver - the actual editor public class TextEditor { private StringBuilder text = new StringBuilder(); public void insertText(String str) { text.append(str); } public void deleteText(int length) { if (text.length() &gt;= length) { text.delete(text.length() - length, text.length()); } } public String getContent() { return text.toString(); } } // Step 3: Concrete command for inserting text public class InsertCommand implements EditorCommand { private TextEditor editor; private String textToInsert; private int position; public InsertCommand(TextEditor editor, String text, int position) { this.editor = editor; this.textToInsert = text; this.position = position; } @Override public void execute() { editor.insertText(textToInsert); } @Override public void undo() { editor.deleteText(textToInsert.length()); } } // Step 4: Concrete command for deleting text public class DeleteCommand implements EditorCommand { private TextEditor editor; private String deletedText; private int deleteLength; public DeleteCommand(TextEditor editor, int length) { this.editor = editor; this.deleteLength = length; } @Override public void execute() { // First, save what we're deleting (for undo) deletedText = editor.getContent(); editor.deleteText(deleteLength); } @Override public void undo() { // Restore the deleted text editor.insertText(deletedText); } } // Step 5: More concrete commands... public class FindAndReplaceCommand implements EditorCommand { private TextEditor editor; private String searchText; private String replaceText; private String previousContent; public FindAndReplaceCommand(TextEditor editor, String search, String replace) { this.editor = editor; this.searchText = search; this.replaceText = replace; } @Override public void execute() { previousContent = editor.getContent(); // Implementation... } @Override public void undo() { // Restore previous state } } // Step 6: Invoker - manages command execution history public class CommandHistory { private Stack&lt;EditorCommand&gt; undoStack = new Stack&lt;&gt;(); private Stack&lt;EditorCommand&gt; redoStack = new Stack&lt;&gt;(); public void execute(EditorCommand command) { command.execute(); undoStack.push(command); redoStack.clear(); // Clear redo history on new command } public void undo() { if (!undoStack.isEmpty()) { EditorCommand command = undoStack.pop(); command.undo(); redoStack.push(command); } } public void redo() { if (!redoStack.isEmpty()) { EditorCommand command = redoStack.pop(); command.execute(); undoStack.push(command); } } } // Usage public static void main(String[] args) { TextEditor editor = new TextEditor(); CommandHistory history = new CommandHistory(); history.execute(new InsertCommand(editor, "Hello", 0)); history.execute(new InsertCommand(editor, " World", 5)); System.out.println(editor.getContent()); // "Hello World" history.undo(); System.out.println(editor.getContent()); // "Hello" history.redo(); System.out.println(editor.getContent()); // "Hello World" } Enter fullscreen mode Exit fullscreen mode Problems: One class per command — dozens in large systems Repeated execute() / undo() boilerplate Hard to maintain or extend Type-unsafe, and often error-prone 🚀 The Modern Way: Records + Sealed Interfaces + Pattern Matching By Java 25, all the language features we need for an elegant Command pattern are stable: ✅ Records — immutable data containers with auto-generated boilerplate ✅ Sealed interfaces — restrict which command types can exist ✅ Pattern matching for switch — exhaustive, type-safe command handling Let’s rebuild the same editor example with these tools. // Step 1: Define command as a sealed interface with record implementations public sealed interface EditorCommand { void execute(TextEditor editor); void undo(TextEditor editor); // Command to insert text record Insert(String text, int position) implements EditorCommand { @Override public void execute(TextEditor editor) { editor.insertText(text); } @Override public void undo(TextEditor editor) { editor.deleteText(text.length()); } } // Command to delete text record Delete(int length, String deletedContent) implements EditorCommand { @Override public void execute(TextEditor editor) { editor.deleteText(length); } @Override public void undo(TextEditor editor) { editor.insertText(deletedContent); } } // Command to find and replace record Replace(String find, String replaceWith, String previousContent) implements EditorCommand { @Override public void execute(TextEditor editor) { editor.findAndReplace(find, replaceWith); } @Override public void undo(TextEditor editor) { // Restore previous state editor.setContent(previousContent); } } } // Step 2: Simple receiver (same as before) public class TextEditor { private StringBuilder text = new StringBuilder(); public void insertText(String str) { text.append(str); } public void deleteText(int length) { if (text.length() &gt;= length) { text.delete(text.length() - length, text.length()); } } public String getContent() { return text.toString(); } public void setContent(String content) { text = new StringBuilder(content); } public void findAndReplace(String find, String replaceWith) { String content = text.toString(); text = new StringBuilder(content.replace(find, replaceWith)); } } // Step 3: Invoker with pattern matching public class CommandHistory { private Stack&lt;EditorCommand&gt; undoStack = new Stack&lt;&gt;(); private Stack&lt;EditorCommand&gt; redoStack = new Stack&lt;&gt;(); private TextEditor editor; public CommandHistory(TextEditor editor) { this.editor = editor; } public void execute(EditorCommand command) { // Use pattern matching to capture state before execution if needed switch (command) { case EditorCommand.Delete(int length, _) -&gt; { // Before executing delete, update the deletedContent String content = editor.getContent(); EditorCommand updated = new EditorCommand.Delete(length, content); updated.execute(editor); undoStack.push(updated); } case EditorCommand.Replace(String find, String replaceWith, _) -&gt; { String content = editor.getContent(); EditorCommand updated = new EditorCommand.Replace(find, replaceWith, content); updated.execute(editor); undoStack.push(updated); } case EditorCommand.Insert _ -&gt; { command.execute(editor); undoStack.push(command); } } redoStack.clear(); } public void undo() { if (!undoStack.isEmpty()) { EditorCommand command = undoStack.pop(); command.undo(editor); redoStack.push(command); } } public void redo() { if (!redoStack.isEmpty()) { EditorCommand command = redoStack.pop(); command.execute(editor); undoStack.push(command); } } } // Usage - Much cleaner! public static void main(String[] args) { TextEditor editor = new TextEditor(); CommandHistory history = new CommandHistory(editor); history.execute(new EditorCommand.Insert("Hello", 0)); history.execute(new EditorCommand.Insert(" World", 5)); System.out.println(editor.getContent()); // "Hello World" history.undo(); System.out.println(editor.getContent()); // "Hello" history.redo(); System.out.println(editor.getContent()); // "Hello World" } Enter fullscreen mode Exit fullscreen mode What improved: ✅ Fewer than 60 lines ✅ Immutable, type-safe commands ✅ All logic in one file ✅ Compiler-enforced exhaustiveness Advanced: Combining with Lambdas for Task Queues Records and lambdas make functional-style commands possible. // ✅ Java 21+: Functional command pattern with sealed interfaces and records // Sealed command interface public sealed interface Task { void run(); // Simple task - wraps a lambda record SimpleTask(String name, Runnable action) implements Task { @Override public void run() { System.out.println("Executing: " + name); action.run(); } } // Async task with timeout record AsyncTask( String name, Runnable action, long timeoutMs ) implements Task { @Override public void run() { System.out.println("Executing async: " + name); Thread task = new Thread(action); task.start(); try { task.join(timeoutMs); if (task.isAlive()) { System.out.println("Task timed out!"); task.interrupt(); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } // Conditional task record ConditionalTask( String name, Supplier&lt;Boolean&gt; condition, Runnable ifTrue, Runnable ifFalse ) implements Task { @Override public void run() { System.out.println("Executing conditional: " + name); if (condition.get()) { ifTrue.run(); } else { ifFalse.run(); } } } } // Task queue executor with pattern matching public class TaskQueue { private Queue&lt;Task&gt; tasks = new LinkedList&lt;&gt;(); public void enqueue(Task task) { tasks.add(task); } public void executeTasks() { while (!tasks.isEmpty()) { Task task = tasks.poll(); // Pattern matching for different task types switch (task) { case Task.SimpleTask(String name, Runnable action) -&gt; { System.out.println("[SIMPLE] " + name); action.run(); } case Task.AsyncTask(String name, Runnable action, long timeout) -&gt; { System.out.println("[ASYNC] " + name + " (timeout: " + timeout + "ms)"); // Execute with timeout... } case Task.ConditionalTask(String name, var condition, var ifTrue, var ifFalse) -&gt; { System.out.println("[CONDITIONAL] " + name); if (condition.get()) { ifTrue.run(); } else { ifFalse.run(); } } } } } } // Usage - Minimal code, maximum expressiveness public static void main(String[] args) { TaskQueue queue = new TaskQueue(); // Add simple task using lambda queue.enqueue(new Task.SimpleTask( "Print greeting", () -&gt; System.out.println("Hello from task queue!") )); // Add async task queue.enqueue(new Task.AsyncTask( "Download data", () -&gt; System.out.println("Downloading..."), 5000 // 5 second timeout )); // Add conditional task queue.enqueue(new Task.ConditionalTask( "Check network", () -&gt; isNetworkAvailable(), () -&gt; System.out.println("Connected!"), () -&gt; System.out.println("No connection") )); // Execute all tasks queue.executeTasks(); } private static boolean isNetworkAvailable() { return true; // Simplified } Enter fullscreen mode Exit fullscreen mode 🏦 Real Example: Payment Commands Let’s apply this to something closer to real-world business logic — a banking system. // ✅ Payment command system with undo/redo public sealed interface PaymentCommand { void execute(Account account); void undo(Account account); record Deposit(double amount) implements PaymentCommand { public Deposit { if (amount &lt;= 0) throw new IllegalArgumentException("Amount must be positive"); } @Override public void execute(Account account) { account.addBalance(amount); } @Override public void undo(Account account) { account.subtractBalance(amount); } } record Withdraw(double amount, double previousBalance) implements PaymentCommand { public Withdraw(double amount) { this(amount, 0); } @Override public void execute(Account account) { if (account.getBalance() &lt; amount) { throw new IllegalArgumentException("Insufficient funds"); } account.subtractBalance(amount); } @Override public void undo(Account account) { account.setBalance(previousBalance); } } record Transfer( Account from, Account to, double amount ) implements PaymentCommand { @Override public void execute(Account account) { from.subtractBalance(amount); to.addBalance(amount); } @Override public void undo(Account account) { to.subtractBalance(amount); from.addBalance(amount); } } record FeesApplied( double feeAmount, String reason ) implements PaymentCommand { @Override public void execute(Account account) { account.subtractBalance(feeAmount); } @Override public void undo(Account account) { account.addBalance(feeAmount); } } } // Account receiver public class Account { private String accountNumber; private double balance; private List&lt;PaymentCommand&gt; history = new ArrayList&lt;&gt;(); public Account(String number, double initialBalance) { this.accountNumber = number; this.balance = initialBalance; } public void processCommand(PaymentCommand command) { command.execute(this); history.add(command); } public void undoLastCommand() { if (!history.isEmpty()) { PaymentCommand last = history.remove(history.size() - 1); last.undo(this); } } // Receiver methods public void addBalance(double amount) { balance += amount; } public void subtractBalance(double amount) { balance -= amount; } public void setBalance(double amount) { balance = amount; } public double getBalance() { return balance; } public void printStatement() { System.out.println("Account: " + accountNumber); System.out.println("Balance: $" + String.format("%.2f", balance)); System.out.println("Transactions: " + history.size()); } } // Usage public static void main(String[] args) { Account checking = new Account("CHK-123", 1000.0); Account savings = new Account("SAV-456", 5000.0); // Execute commands checking.processCommand(new PaymentCommand.Deposit(500.0)); checking.processCommand(new PaymentCommand.Withdraw(100.0, checking.getBalance())); checking.processCommand(new PaymentCommand.Transfer(checking, savings, 200.0)); checking.processCommand(new PaymentCommand.FeesApplied(2.5, "Monthly fee")); checking.printStatement(); // Shows all transactions // Undo last fee checking.undoLastCommand(); System.out.println("After undo:"); checking.printStatement(); } Enter fullscreen mode Exit fullscreen mode ✔️ Short, type-safe, and clear. ✔️ Commands define what happens; Account executes them. ✔️ Undo/redo is trivial and explicit. 🧭 When to Use This Modern Command Pattern ✅ Perfect for: Undo/Redo systems Transaction logging Task queues Macro recording Workflow orchestration ❌ Avoid for: Highly dynamic plugin systems Environments needing runtime type loading (sealed types limit extension) 🏁 Wrapping Up The Command pattern hasn’t changed — but Java has evolved. With records, sealed interfaces, and pattern matching, you can write clean, immutable, type-safe commands with half the code and none of the pain. It’s not about replacing design patterns — it’s about making them effortless. So go ahead — modernise those command hierarchies. Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct &bull; Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink . Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Jitin Follow Joined Jan 2, 2026 Trending on DEV Community Hot SQLite Limitations and Internal Architecture # webdev # programming # database # architecture What was your win this week??? # weeklyretro # discuss AI should not be in Code Editors # programming # ai # productivity # discuss 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:46
https://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/?replytocom=23520#content
Implementing a web server in a single printf() call &#8211; Tinyhack.com --> Skip to content Tinyhack.com A hacker does for love what others would not do for money. Implementing a web server in a single printf() call A guy just forwarded a joke that most of us will already know Jeff Dean Facts (also here and here ). Everytime I read that list, this part stands out: Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search. It is really possible to implement a web server using a single printf call, but I haven&#8217;t found anyone doing it. So this time after reading the list, I decided to implement it. So here is the code, a pure single printf call, without any extra variables or macros (don&#8217;t worry, I will explain how to this code works) #include &lt;stdio.h&gt; int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot;, ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 + 2, (((unsigned long int)0x4005c8 + 12) &amp; 0xffff)- ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 ); } This code only works on a Linux AMD64 bit system, with a particular compiler (gcc version 4.8.2 (Debian 4.8.2-16) ) And to compile it: gcc -g web1.c -O webserver As some of you may have guessed: I cheated by using a special format string . That code may not run on your machine because I have hardcoded two addresses. The following version is a little bit more user friendly (easier to change), but you are still going to need to change 2 values: FUNCTION_ADDR and DESTADDR which I will explain later: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) #define DESTADDR 0x00000000006007D8 #define a (FUNCTION_ADDR &amp; 0xffff) #define b ((FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff) int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot; , b, 0, DESTADDR + 2, a-b, 0, DESTADDR ); } I will explain how the code works through a series of short C codes. The first one is a code that will explain how that we can start another code without function call. See this simple code: #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #define ADDR 0x00000000600720 void hello() { printf(&quot;hello world\n&quot;); } int main(int argc, char *argv&#x5B;]) { (*((unsigned long int*)ADDR))= (unsigned long int)hello; } You can compile it, but it many not run on your system. You need to do these steps: 1. Compile the code: gcc run-finalizer.c -o run-finalizer 2. Examine the address of fini_array objdump -h -j .fini_array run-finalizer And find the VMA of it: run-finalizer: file format elf64-x86-64 Sections: Idx Name Size VMA LMA File off Algn 18 .fini_array 00000008 0000000000600720 0000000000600720 00000720 2**3 CONTENTS, ALLOC, LOAD, DATA Note that you need a recent GCC to do this, older version of gcc uses different mechanism of storing finalizers. 3. Change the value of ADDR on the code to the correct address 4. Compile the code again 5. Run it and now you will see &#8220;hello world&#8221; printed to your screen. How does this work exactly?: According to Chapter 11 of Linux Standard Base Core Specification 3.1 .fini_array This section holds an array of function pointers that contributes to a single termination array for the executable or shared object containing the section. We are overwriting the array so that our hello function is called instead of the default handler. If you are trying to compile the webserver code, the value of ADDR is obtained the same way (using objdump). Ok, now we know how to execute a function by overriding a certain address, we need to know how we can overwrite an address using printf . You can find many tutorials on how to exploit format string bugs, but I will try give a short explanation. The printf function has this feature that enables us to know how many characters has been printed using the &#8220;%n&#8221; format: #include &lt;stdio.h&gt; int main(){ int count; printf(&quot;AB%n&quot;, &amp;count); printf(&quot;\n%d characters printed\n&quot;, count); } You will see that the output is: AB 2 characters printed Of course we can put any address to the count pointer to overwrite that address. But to overide an address with a large value we need to print a large amount of text. Fortunately there is another format string &#8220;%hn&#8221; that works on short instead of int. We can overwrite the value 2 bytes at a time to form the 4 byte value that we want. Lets try to use two printf calls to put a¡ value that we want (in this case the pointer to function &#8220;hello&#8221;) to the fini_array: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)hello) #define DESTADDR 0x0000000000600948 void hello() { printf(&quot;\n\n\n\nhello world\n\n&quot;); } int main(int argc, char *argv&#x5B;]) { short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;a = %04x b = %04x\n&quot;, a, b) uint64_t *p = (uint64_t*)DESTADDR; printf(&quot;before: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;after1: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); printf(&quot;after2: %08lx\n&quot;, *p); return 0; } The important lines are: short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); The a and b are just halves of the function address, we can construct a string of length a and b to be given to printf, but I chose to use the &#8220;%*&#8221; formatting which will control the length of the output through parameter. For example, this code: printf("%*c", 10, 'A'); Will print 9 spaces followed by A, so in total, 10 characters will be printed. If we want to use just one printf, we need to take account that b bytes have been printed, and we need to print another b-a bytes (the counter is accumulative). printf("%*c%hn%*c%hn", b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); Currently we are using the &#8220;hello&#8221; function to call, but we can call any function (or any address). I have written a shellcode that acts as a web server that just prints &#8220;Hello world&#8221;. This is the shell code that I made: unsigned char hello&#x5B;] = "\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32" "\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d" "\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74" "\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65" "\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f" "\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89" "\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f" "\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff" "\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49" "\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31" "\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c" "\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2" "\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f" "\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee" "\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff" "\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05" "\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3"; If we remove the function hello and insert that shell code, that code will be called. That code is just a string, so we can append it to the &#8220;%*c%hn%*c%hn&#8221; format string. This string is unnamed, so we will need to find the address after we compile it. To obtain the address, we need to compile the code, then disassemble it: objdump -d webserver 00000000004004fd &lt;main&gt;: 4004fd: 55 push %rbp 4004fe: 48 89 e5 mov %rsp,%rbp 400501: 48 83 ec 20 sub $0x20,%rsp 400505: 89 7d fc mov %edi,-0x4(%rbp) 400508: 48 89 75 f0 mov %rsi,-0x10(%rbp) 40050c: c7 04 24 d8 07 60 00 movl $0x6007d8,(%rsp) 400513: 41 b9 00 00 00 00 mov $0x0,%r9d 400519: 41 b8 94 05 00 00 mov $0x594,%r8d 40051f: b9 da 07 60 00 mov $0x6007da,%ecx 400524: ba 00 00 00 00 mov $0x0,%edx 400529: be 40 00 00 00 mov $0x40,%esi 40052e: bf c8 05 40 00 mov $0x4005c8,%edi 400533: b8 00 00 00 00 mov $0x0,%eax 400538: e8 a3 fe ff ff callq 4003e0 &lt;printf@plt&gt; 40053d: c9 leaveq 40053e: c3 retq 40053f: 90 nop We only need to care about this line: mov $0x4005c8,%edi That is the address that we need in: #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) The +12 is needed because our shell code starts after the string &#8220;%*c%hn%*c%hn&#8221; which is 12 characters long. If you are curious about the shell code, it was created from the following C code. #include&lt;stdio.h&gt; #include&lt;string.h&gt; #include&lt;stdlib.h&gt; #include&lt;unistd.h&gt; #include&lt;sys/types.h&gt; #include&lt;sys/stat.h&gt; #include&lt;sys/socket.h&gt; #include&lt;arpa/inet.h&gt; #include&lt;netdb.h&gt; #include&lt;signal.h&gt; #include&lt;fcntl.h&gt; int main(int argc, char *argv&#x5B;]) { int sockfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in serv_addr; bzero((char *)&amp;serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(8080); bind(sockfd, (struct sockaddr *)&amp;serv_addr, sizeof(serv_addr)); listen(sockfd, 5); while (1) { int cfd = accept(sockfd, 0, 0); char *s = &quot;HTTP/1.0 200\r\nContent-type:text/html\r\n\r\n&lt;h1&gt;Hello world!&lt;/h1&gt;&quot;; if (fork()==0) { write(cfd, s, strlen(s)); shutdown(cfd, SHUT_RDWR); close(cfd); } } return 0; } I have done an extra effort (although it is not really necessary in this case) to remove all NUL character from the shell code (since I couldn&#8217;t find one for X86-64 in the Shellcodes database ). Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search . It is left as an exercise for the reader to scale the web server to able to handle Google search load. Source codes for this post is available at https://github.com/yohanes/printf-webserver For people who thinks that this is useless: yes it is useless. I just happen to like this challenge, and it has refreshed my memory and knowledge for the following topics: shell code writing (haven&#8217;t done this in years), AMD64 assembly (calling convention, preserved registers, etc), syscalls, objdump, fini_array (last time I checked, gcc still used .dtors), printf format exploiting, gdb tricks (like writing memory block to file), and low level socket code (I have been using boost&#8217;s for the past few years). Update : Ubuntu adds a security feature that provides a read-only relocation table area in the final ELF. To be able to run the examples in ubuntu, add this in the command line when compiling -Wl,-z,norelro e.g: gcc -Wl,-z,norelro test.c Author admin Posted on March 12, 2014 April 28, 2017 Categories hacks 18 thoughts on &ldquo;Implementing a web server in a single printf() call&rdquo; dodi says: March 12, 2014 at 2:04 pm eh buset, serius nih lu ? 🙂 Reply priyo says: March 13, 2014 at 5:07 am scroll up&#8230; scroll down&#8230; scroll up&#8230; scroll down&#8230; 100x *gagal paham* Reply terminalcommand says: March 13, 2014 at 5:19 am Thank you! Very interesting article. I also didn&#8217;t know about the one line webserver at google. Although this is a hard topic, you&#8217;ve made a great work simplifying it. Reply Basun says: March 13, 2014 at 10:02 am The one line webserver bit is a joke about Jeff Dean, who works at Google. Its not real. 🙂 Reply Cees Timmerman says: April 20, 2016 at 4:12 pm There are real webserver oneliners: https://gist.github.com/willurd/5720255 Reply anonim says: March 13, 2014 at 5:29 am Diskusinya di https://news.ycombinator.com/item?id=7389623 Reply Neil says: March 13, 2014 at 12:38 pm Shouldn&#8217;t there be an exit() somewhere in the fork==0 branch? Otherwise every time there is a request the new child process will become a server too and start accepting requests, right? I think the parent leaks its copy of the file descriptor too. Maybe the fork is a bit redundant. I don&#8217;t think the write or close will block with such a small amount of data. Cool post though! I&#8217;m not really sure why I&#8217;m nitpicking in the shell code. Sorry. Reply admin says: March 14, 2014 at 1:58 am Ah yes, there is an exit from the loop on the assembly code (myhttp.s) but it got removed from http.c when I removed the comment and debug code. And you are also right about the fork, it is unnecessary in this case. At first I was going to write the HTTP headers and then exec some external command. I changed my mind and didn&#8217;t bother deleting the fork call. Reply Kyle Ross says: March 13, 2014 at 11:02 pm This is really interesting, but I&#8217;m having trouble following whats actually happening. Could you explain how you reduced that C code with includes and methods into a string containing hex codes and how that is turned back into some sort of executable code? Thanks Reply admin says: March 14, 2014 at 2:01 am I think it is beyond the scope of this article to explain about shell code writing. There are many books and tutorials that you can read (just search for &#8220;buffer overflow&#8221; or &#8220;shell code writing&#8221;). Reply TTK Ciar says: March 14, 2014 at 1:05 am Alternatively: $ perl -Mojo -E &#8216;a({inline =&gt; &#8220;%= `uptime`&#8221;})-&gt;start&#8217; daemon &amp; Server available at http://127.0.0.1:3000 . $ lynx -dump -nolist http://127.0.0.1:3000/ 17:57:56 up 66 days, 6:45, 108 users, load average: 0.10, 0.12, 0.07 though, perl by definition is cheating. Reply Evan Danaher says: March 14, 2014 at 2:54 pm I&#8217;m not sure why you used finalizers instead of just changing the return address on the stack; this may be the first time I&#8217;ve ever said this, but stack smashing is much more portable. I&#8217;ve made a variant that I&#8217;d expect to work on any gcc 4.4-4.7 on x86_64 Linux, and have some ideas which, if they work out, may make it actually &#8220;portable&#8221; to any x86/x86_64 Unix running a reasonable compiler. https://github.com/edanaher/printf-webserver Reply admin says: March 17, 2014 at 3:02 pm Yes using the stack is also possible, but on most modern system, GCC is compiled with stack protection turned on (and needs to be disabled using -fno-stack-protector). Reply Pingback: Implementing a web server in a single printf() call &laquo; adafruit industries blog Itzik Kotler says: March 15, 2014 at 4:35 pm Pretty neat. I did something similar (all though simpler) back in the days. See: http://www.exploit-db.com/papers/13233/ Reply Pingback: Saving the world, one cpu cycle at a time | Dav&#039;s bit o the web programath says: April 22, 2014 at 1:18 pm printf(&#8220;%*c%hn%*c%hn&#8221;, b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; i think the fourth parameter should be &#8216;a-b&#8217;, not &#8216;b-a&#8217;, because a == b + (a &#8211; b) Reply Pingback: New top story on Hacker News: Implementing a web server in a single printf call (2014) &#8211; Latest news Leave a Reply Cancel reply Your email address will not be published. Required fields are marked * Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. &#916; Post navigation Previous Previous post: Raspberry Pi for Out of Band Linux PC management Next Next post: Exploiting the Futex Bug and uncovering Towelroot Pages About Archive Search for: Search Follow x.com/yohanes Mastodon Recent Posts CVE-2025-31931 Arbitrary Shared Library Loading in Intel ITT API on Android (affects OpenCV &lt;= 4.10) Decrypting Encrypted files from Akira Ransomware (Linux/ESXI variant 2024) using a bunch of GPUs Patching .so files of an installed Android App Extracting WhatsApp Database (or any app data) from Android 12/13 using CVE-2024-0044 Zygisk-based reFlutter Recent Comments Eitan Porat on About admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 Archives November 2025 March 2025 November 2024 June 2024 April 2024 January 2024 December 2023 September 2022 March 2021 January 2021 May 2019 January 2019 November 2018 July 2018 May 2018 February 2018 October 2017 September 2017 March 2017 November 2016 November 2015 July 2014 March 2014 February 2014 June 2013 January 2013 November 2011 March 2011 February 2011 July 2010 April 2010 January 2010 December 2009 September 2009 August 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 March 2008 February 2008 October 2007 June 2007 February 2007 January 2007 December 2006 Categories agestar android blog ctf debian flareon flex freebsd google hacks hardware hostmonster linux mac os x misc mobile opensource phone raspberry reverse-engineering sdr security Uncategorized wii writeup Meta Log in Entries feed Comments feed WordPress.org Tinyhack.com Proudly powered by WordPress
2026-01-13T08:49:46
https://www.learnpython.org/
Learn Python - Free Interactive Python Tutorial learnpython.org Home (current) About Certify More Languages Python Java HTML Go C C++ JavaScript TypeScript PHP Shell C# Perl Ruby Scala SQL العربية Български Čeština Dansk Deutsch Ελληνικά English Español Suomi Français עברית हिन्दी Magyar Bahasa Indonesia Italiano 日本語 한국어 Bahasa Melayu Nederlands Norsk Polski Português Română Русский Svenska ไทย Türkçe Українська Tiếng Việt 中文 Star Fork Python Java HTML Go C C++ JavaScript TypeScript PHP Shell C# Perl Ruby Scala SQL Get started learning Python with DataCamp's free Intro to Python tutorial . Learn Data Science by completing interactive coding challenges and watching videos by expert instructors. Start Now ! This site is generously supported by DataCamp . DataCamp offers online interactive Python Tutorials for Data Science. Join 11 million other learners and get started learning Python for data science today! Good news! You can save 25% off your Datacamp annual subscription with the code LEARNPYTHON23ALE25 - Click here to redeem your discount Welcome Welcome to the LearnPython.org interactive Python tutorial. Whether you are an experienced programmer or not, this website is intended for everyone who wishes to learn the Python programming language. You are welcome to join our group on Facebook for questions, discussions and updates. After you complete the tutorials, you can get certified at LearnX and add your certification to your LinkedIn profile. Just click on the chapter you wish to begin from, and follow the instructions. Good luck! Learn the Basics Hello, World! Variables and Types Lists Basic Operators String Formatting Basic String Operations Conditions Loops Functions Classes and Objects Dictionaries Modules and Packages Input and Output Coding for Kids Starting Out Movement with Functions Collecting items Pushing objects Printing on screen Building objects Apply what you've learned Advanced Tutorials Generators List Comprehensions Lambda functions Multiple Function Arguments Regular Expressions Exception Handling Sets Serialization Partial functions Code Introspection Closures Decorators Map, Filter, Reduce Parsing CSV Files Other Python Tutorials DataCamp has tons of great interactive Python Tutorials covering data manipulation, data visualization, statistics, machine learning, and more Read Python Tutorials and References course from After Hours Programming Contributing Tutorials Read more here: Contributing Tutorials This site is generously supported by DataCamp . DataCamp offers online interactive Python Tutorials for Data Science. Join over a million other learners and get started learning Python for data science today! Take the Test Sponsors Chapters Hello, World! Variables and Types Lists Basic Operators String Formatting Basic String Operations Conditions Loops Functions Classes and Objects Dictionaries Modules and Packages Input and Output Generators List Comprehensions Lambda functions Multiple Function Arguments Regular Expressions Exception Handling Sets Serialization Partial functions Code Introspection Closures Decorators Map, Filter, Reduce Parsing CSV Files DataCamp Copyright &copy; learnpython.org. Read our Terms of Use and Privacy Policy
2026-01-13T08:49:46
https://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/?replytocom=23554#content
Implementing a web server in a single printf() call &#8211; Tinyhack.com --> Skip to content Tinyhack.com A hacker does for love what others would not do for money. Implementing a web server in a single printf() call A guy just forwarded a joke that most of us will already know Jeff Dean Facts (also here and here ). Everytime I read that list, this part stands out: Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search. It is really possible to implement a web server using a single printf call, but I haven&#8217;t found anyone doing it. So this time after reading the list, I decided to implement it. So here is the code, a pure single printf call, without any extra variables or macros (don&#8217;t worry, I will explain how to this code works) #include &lt;stdio.h&gt; int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot;, ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 + 2, (((unsigned long int)0x4005c8 + 12) &amp; 0xffff)- ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 ); } This code only works on a Linux AMD64 bit system, with a particular compiler (gcc version 4.8.2 (Debian 4.8.2-16) ) And to compile it: gcc -g web1.c -O webserver As some of you may have guessed: I cheated by using a special format string . That code may not run on your machine because I have hardcoded two addresses. The following version is a little bit more user friendly (easier to change), but you are still going to need to change 2 values: FUNCTION_ADDR and DESTADDR which I will explain later: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) #define DESTADDR 0x00000000006007D8 #define a (FUNCTION_ADDR &amp; 0xffff) #define b ((FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff) int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot; , b, 0, DESTADDR + 2, a-b, 0, DESTADDR ); } I will explain how the code works through a series of short C codes. The first one is a code that will explain how that we can start another code without function call. See this simple code: #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #define ADDR 0x00000000600720 void hello() { printf(&quot;hello world\n&quot;); } int main(int argc, char *argv&#x5B;]) { (*((unsigned long int*)ADDR))= (unsigned long int)hello; } You can compile it, but it many not run on your system. You need to do these steps: 1. Compile the code: gcc run-finalizer.c -o run-finalizer 2. Examine the address of fini_array objdump -h -j .fini_array run-finalizer And find the VMA of it: run-finalizer: file format elf64-x86-64 Sections: Idx Name Size VMA LMA File off Algn 18 .fini_array 00000008 0000000000600720 0000000000600720 00000720 2**3 CONTENTS, ALLOC, LOAD, DATA Note that you need a recent GCC to do this, older version of gcc uses different mechanism of storing finalizers. 3. Change the value of ADDR on the code to the correct address 4. Compile the code again 5. Run it and now you will see &#8220;hello world&#8221; printed to your screen. How does this work exactly?: According to Chapter 11 of Linux Standard Base Core Specification 3.1 .fini_array This section holds an array of function pointers that contributes to a single termination array for the executable or shared object containing the section. We are overwriting the array so that our hello function is called instead of the default handler. If you are trying to compile the webserver code, the value of ADDR is obtained the same way (using objdump). Ok, now we know how to execute a function by overriding a certain address, we need to know how we can overwrite an address using printf . You can find many tutorials on how to exploit format string bugs, but I will try give a short explanation. The printf function has this feature that enables us to know how many characters has been printed using the &#8220;%n&#8221; format: #include &lt;stdio.h&gt; int main(){ int count; printf(&quot;AB%n&quot;, &amp;count); printf(&quot;\n%d characters printed\n&quot;, count); } You will see that the output is: AB 2 characters printed Of course we can put any address to the count pointer to overwrite that address. But to overide an address with a large value we need to print a large amount of text. Fortunately there is another format string &#8220;%hn&#8221; that works on short instead of int. We can overwrite the value 2 bytes at a time to form the 4 byte value that we want. Lets try to use two printf calls to put a¡ value that we want (in this case the pointer to function &#8220;hello&#8221;) to the fini_array: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)hello) #define DESTADDR 0x0000000000600948 void hello() { printf(&quot;\n\n\n\nhello world\n\n&quot;); } int main(int argc, char *argv&#x5B;]) { short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;a = %04x b = %04x\n&quot;, a, b) uint64_t *p = (uint64_t*)DESTADDR; printf(&quot;before: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;after1: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); printf(&quot;after2: %08lx\n&quot;, *p); return 0; } The important lines are: short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); The a and b are just halves of the function address, we can construct a string of length a and b to be given to printf, but I chose to use the &#8220;%*&#8221; formatting which will control the length of the output through parameter. For example, this code: printf("%*c", 10, 'A'); Will print 9 spaces followed by A, so in total, 10 characters will be printed. If we want to use just one printf, we need to take account that b bytes have been printed, and we need to print another b-a bytes (the counter is accumulative). printf("%*c%hn%*c%hn", b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); Currently we are using the &#8220;hello&#8221; function to call, but we can call any function (or any address). I have written a shellcode that acts as a web server that just prints &#8220;Hello world&#8221;. This is the shell code that I made: unsigned char hello&#x5B;] = "\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32" "\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d" "\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74" "\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65" "\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f" "\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89" "\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f" "\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff" "\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49" "\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31" "\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c" "\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2" "\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f" "\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee" "\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff" "\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05" "\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3"; If we remove the function hello and insert that shell code, that code will be called. That code is just a string, so we can append it to the &#8220;%*c%hn%*c%hn&#8221; format string. This string is unnamed, so we will need to find the address after we compile it. To obtain the address, we need to compile the code, then disassemble it: objdump -d webserver 00000000004004fd &lt;main&gt;: 4004fd: 55 push %rbp 4004fe: 48 89 e5 mov %rsp,%rbp 400501: 48 83 ec 20 sub $0x20,%rsp 400505: 89 7d fc mov %edi,-0x4(%rbp) 400508: 48 89 75 f0 mov %rsi,-0x10(%rbp) 40050c: c7 04 24 d8 07 60 00 movl $0x6007d8,(%rsp) 400513: 41 b9 00 00 00 00 mov $0x0,%r9d 400519: 41 b8 94 05 00 00 mov $0x594,%r8d 40051f: b9 da 07 60 00 mov $0x6007da,%ecx 400524: ba 00 00 00 00 mov $0x0,%edx 400529: be 40 00 00 00 mov $0x40,%esi 40052e: bf c8 05 40 00 mov $0x4005c8,%edi 400533: b8 00 00 00 00 mov $0x0,%eax 400538: e8 a3 fe ff ff callq 4003e0 &lt;printf@plt&gt; 40053d: c9 leaveq 40053e: c3 retq 40053f: 90 nop We only need to care about this line: mov $0x4005c8,%edi That is the address that we need in: #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) The +12 is needed because our shell code starts after the string &#8220;%*c%hn%*c%hn&#8221; which is 12 characters long. If you are curious about the shell code, it was created from the following C code. #include&lt;stdio.h&gt; #include&lt;string.h&gt; #include&lt;stdlib.h&gt; #include&lt;unistd.h&gt; #include&lt;sys/types.h&gt; #include&lt;sys/stat.h&gt; #include&lt;sys/socket.h&gt; #include&lt;arpa/inet.h&gt; #include&lt;netdb.h&gt; #include&lt;signal.h&gt; #include&lt;fcntl.h&gt; int main(int argc, char *argv&#x5B;]) { int sockfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in serv_addr; bzero((char *)&amp;serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(8080); bind(sockfd, (struct sockaddr *)&amp;serv_addr, sizeof(serv_addr)); listen(sockfd, 5); while (1) { int cfd = accept(sockfd, 0, 0); char *s = &quot;HTTP/1.0 200\r\nContent-type:text/html\r\n\r\n&lt;h1&gt;Hello world!&lt;/h1&gt;&quot;; if (fork()==0) { write(cfd, s, strlen(s)); shutdown(cfd, SHUT_RDWR); close(cfd); } } return 0; } I have done an extra effort (although it is not really necessary in this case) to remove all NUL character from the shell code (since I couldn&#8217;t find one for X86-64 in the Shellcodes database ). Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search . It is left as an exercise for the reader to scale the web server to able to handle Google search load. Source codes for this post is available at https://github.com/yohanes/printf-webserver For people who thinks that this is useless: yes it is useless. I just happen to like this challenge, and it has refreshed my memory and knowledge for the following topics: shell code writing (haven&#8217;t done this in years), AMD64 assembly (calling convention, preserved registers, etc), syscalls, objdump, fini_array (last time I checked, gcc still used .dtors), printf format exploiting, gdb tricks (like writing memory block to file), and low level socket code (I have been using boost&#8217;s for the past few years). Update : Ubuntu adds a security feature that provides a read-only relocation table area in the final ELF. To be able to run the examples in ubuntu, add this in the command line when compiling -Wl,-z,norelro e.g: gcc -Wl,-z,norelro test.c Author admin Posted on March 12, 2014 April 28, 2017 Categories hacks 18 thoughts on &ldquo;Implementing a web server in a single printf() call&rdquo; dodi says: March 12, 2014 at 2:04 pm eh buset, serius nih lu ? 🙂 Reply priyo says: March 13, 2014 at 5:07 am scroll up&#8230; scroll down&#8230; scroll up&#8230; scroll down&#8230; 100x *gagal paham* Reply terminalcommand says: March 13, 2014 at 5:19 am Thank you! Very interesting article. I also didn&#8217;t know about the one line webserver at google. Although this is a hard topic, you&#8217;ve made a great work simplifying it. Reply Basun says: March 13, 2014 at 10:02 am The one line webserver bit is a joke about Jeff Dean, who works at Google. Its not real. 🙂 Reply Cees Timmerman says: April 20, 2016 at 4:12 pm There are real webserver oneliners: https://gist.github.com/willurd/5720255 Reply anonim says: March 13, 2014 at 5:29 am Diskusinya di https://news.ycombinator.com/item?id=7389623 Reply Neil says: March 13, 2014 at 12:38 pm Shouldn&#8217;t there be an exit() somewhere in the fork==0 branch? Otherwise every time there is a request the new child process will become a server too and start accepting requests, right? I think the parent leaks its copy of the file descriptor too. Maybe the fork is a bit redundant. I don&#8217;t think the write or close will block with such a small amount of data. Cool post though! I&#8217;m not really sure why I&#8217;m nitpicking in the shell code. Sorry. Reply admin says: March 14, 2014 at 1:58 am Ah yes, there is an exit from the loop on the assembly code (myhttp.s) but it got removed from http.c when I removed the comment and debug code. And you are also right about the fork, it is unnecessary in this case. At first I was going to write the HTTP headers and then exec some external command. I changed my mind and didn&#8217;t bother deleting the fork call. Reply Kyle Ross says: March 13, 2014 at 11:02 pm This is really interesting, but I&#8217;m having trouble following whats actually happening. Could you explain how you reduced that C code with includes and methods into a string containing hex codes and how that is turned back into some sort of executable code? Thanks Reply admin says: March 14, 2014 at 2:01 am I think it is beyond the scope of this article to explain about shell code writing. There are many books and tutorials that you can read (just search for &#8220;buffer overflow&#8221; or &#8220;shell code writing&#8221;). Reply TTK Ciar says: March 14, 2014 at 1:05 am Alternatively: $ perl -Mojo -E &#8216;a({inline =&gt; &#8220;%= `uptime`&#8221;})-&gt;start&#8217; daemon &amp; Server available at http://127.0.0.1:3000 . $ lynx -dump -nolist http://127.0.0.1:3000/ 17:57:56 up 66 days, 6:45, 108 users, load average: 0.10, 0.12, 0.07 though, perl by definition is cheating. Reply Evan Danaher says: March 14, 2014 at 2:54 pm I&#8217;m not sure why you used finalizers instead of just changing the return address on the stack; this may be the first time I&#8217;ve ever said this, but stack smashing is much more portable. I&#8217;ve made a variant that I&#8217;d expect to work on any gcc 4.4-4.7 on x86_64 Linux, and have some ideas which, if they work out, may make it actually &#8220;portable&#8221; to any x86/x86_64 Unix running a reasonable compiler. https://github.com/edanaher/printf-webserver Reply admin says: March 17, 2014 at 3:02 pm Yes using the stack is also possible, but on most modern system, GCC is compiled with stack protection turned on (and needs to be disabled using -fno-stack-protector). Reply Pingback: Implementing a web server in a single printf() call &laquo; adafruit industries blog Itzik Kotler says: March 15, 2014 at 4:35 pm Pretty neat. I did something similar (all though simpler) back in the days. See: http://www.exploit-db.com/papers/13233/ Reply Pingback: Saving the world, one cpu cycle at a time | Dav&#039;s bit o the web programath says: April 22, 2014 at 1:18 pm printf(&#8220;%*c%hn%*c%hn&#8221;, b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; i think the fourth parameter should be &#8216;a-b&#8217;, not &#8216;b-a&#8217;, because a == b + (a &#8211; b) Reply Pingback: New top story on Hacker News: Implementing a web server in a single printf call (2014) &#8211; Latest news Leave a Reply Cancel reply Your email address will not be published. Required fields are marked * Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. &#916; Post navigation Previous Previous post: Raspberry Pi for Out of Band Linux PC management Next Next post: Exploiting the Futex Bug and uncovering Towelroot Pages About Archive Search for: Search Follow x.com/yohanes Mastodon Recent Posts CVE-2025-31931 Arbitrary Shared Library Loading in Intel ITT API on Android (affects OpenCV &lt;= 4.10) Decrypting Encrypted files from Akira Ransomware (Linux/ESXI variant 2024) using a bunch of GPUs Patching .so files of an installed Android App Extracting WhatsApp Database (or any app data) from Android 12/13 using CVE-2024-0044 Zygisk-based reFlutter Recent Comments Eitan Porat on About admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 Archives November 2025 March 2025 November 2024 June 2024 April 2024 January 2024 December 2023 September 2022 March 2021 January 2021 May 2019 January 2019 November 2018 July 2018 May 2018 February 2018 October 2017 September 2017 March 2017 November 2016 November 2015 July 2014 March 2014 February 2014 June 2013 January 2013 November 2011 March 2011 February 2011 July 2010 April 2010 January 2010 December 2009 September 2009 August 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 March 2008 February 2008 October 2007 June 2007 February 2007 January 2007 December 2006 Categories agestar android blog ctf debian flareon flex freebsd google hacks hardware hostmonster linux mac os x misc mobile opensource phone raspberry reverse-engineering sdr security Uncategorized wii writeup Meta Log in Entries feed Comments feed WordPress.org Tinyhack.com Proudly powered by WordPress
2026-01-13T08:49:46
https://dev.to/this-is-angular/angular-addicts-45-signal-form-guides-ai-integrations-more-2ka9#comments
Angular Addicts #45: Signal Form guides, AI integrations &amp; more - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Add reaction Like Unicorn Exploding Head Raised Hands Fire Jump to Comments Save Boost More... Copy link Copy link Copied to Clipboard Share to X Share to LinkedIn Share to Facebook Share to Mastodon Share Post via... Report Abuse Gergely Szerovay for This is Angular Posted on Jan 13 &bull; Originally published at angularaddicts.com &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Angular Addicts #45: Signal Form guides, AI integrations &amp; more # typescript # javascript # angular 👋Hey fellow Angular Addict This is the 45th issue of the Angular Addicts Newsletter, a monthly collection of carefully selected Angular resources that caught my attention. (Here are the 44th , 43rd and 42nd ) 📢 Release announcements 📢 Announcing NgRx 21: Celebrating a 10 Year Journey with a fresh new look and @ngrx/signals/events By Tim Deschryver 📢 Nx 22.3 Release: Angular 21 Support, tsgo Compiler, and Prettier v3 By Philip Fulcher 📢 Migration guide to PrimeNG v21 🤖 AI &amp; Angular 🤖 Building an Angular Compiler using AI with Google Gemini By Brandon Roberts 🤖 Generative UI for AI Assistants: Component Control with Hashbrown By Manfred Steyer 🤖 Building an AI-Powered Alt Text Generator with Angular, Firebase AI Logic, and Gemini 3 By Connie Leung 🤖 Using AI with Angular — 2025 update By Alain Chautard 🤖 Streaming AI Speech with Gemini 2.5 Flash TTS, Angular, and Firebase By Connie Leung 📋 Signal Forms 📋 Signal Forms Guide By Stefanos Lignos 📋 Signal Forms in Angular 21 - Complete Guide By Mateusz Stefańczyk 💎 Angular Gems of December, 2025 📰 Angular Signals That Will Replace Half Your RxJS Code in 2025 By Piyali Das 📰 9 Architecture Mistakes That Quietly Kill Large Angular Codebases (And How DDD Fixes Them) By Karol Modelski 📰 Angular pipes: Time to rethink By Vyacheslav Borodin 📰 Framework-agnostic internationalization with Angular's localize tools and Nx By Edouard Bozon 📰 The Magic of deepSignal: How Angular Signal Forms Enable True Nested Reactivity By Netanel Basal 📰 Angular tests with Vitest browser mode By Jean-Baptiste Nizet 👨‍💻About the author My name is Gergely Szerovay , I worked as a data scientist and full-stack developer for many years, and I have been working as frontend tech lead, focusing on Angular based frontend development. As part of my role, I'm constantly following how Angular and the frontend development scene in general is evolving. To share my knowledge, I started the Angular Addicts monthly newsletter and publication in 2022, so that I can send you the best resources I come across each month. Whether you are a seasoned Angular Addict or a beginner, I got you covered. Let me know if you would like to be included as a writer. Let’s learn Angular together! Subscribe here 🔥 Angular has evolved very rapidly over the past few years, and in the past year, with the rise of generative AI, our software development workflows have also evolved rapidly. In order to closely follow the evolution of AI-assisted software development, I decided to start building AI tools in public, and publish my progress on AIBoosted.dev . Join my on this learning journey: Subscribe here 🚀 Follow me on Substack (Angular Addicts) , Substack (AIBoosted.dev) , Medium , Dev.to , Twitter or LinkedIn to learn more about Angular, and how to build AI apps with AI, Typescript, React and Angular! 🕹️Previous issues If you missed the previous issues of the newsletter, you can read them here , these are the latest 3 issues: Angular Addicts #44: Angular 21, Signal Forms, Vitest, Chat assistant integration &amp; more Angular Addicts #43: Vitest, Signal Forms, Animations &amp; more Angular Addicts #42: Signal Forms API, AI powered apps with Angular &amp; more 📨 Submit your Angular resource Have you found or written an interesting Angular-related article, tweet or other resource lately? Please let me know here in the comments or send me a DM on Twitter ! I might feature it in the next Angular Addicts issue! Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct &bull; Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink . Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse This is Angular Follow Free, open and honest Angular education. Read our welcome letter which is an open invitation for you to join. Join us as a writer More from This is Angular Ng-News 26/01: Ng-Poland Outtakes - Keynote and Q&amp;A # webdev # programming # angular # frontend Ng-News: Angular in 2025 # webdev # programming # angular # frontend Ng-News 25/50: Auto-Destroy for Router Providers, Signal Forms # webdev # programming # angular # frontend 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:46
https://vi-vn.facebook.com/login/?next=https%3A%2F%2Fwww.facebook.com%2Fshare_channel%2F%3Ftype%3Dreshare%26link%3Dhttps%253A%252F%252Fdev.to%252Fjwebsite-go%252Freadiness-probe-3co0%26app_id%3D966242223397117%26source_surface%3Dexternal_reshare%26display%26hashtag
Đăng nhập vào Facebook Notice Bạn phải đăng nhập để tiếp tục. Đăng nhập Facebook Bạn phải đăng nhập để tiếp tục. Đăng nhập Bạn quên tài khoản ư? · Đăng ký Facebook Tiếng Việt 한국어 English (US) Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch Đăng ký Đăng nhập Messenger Facebook Lite Video Meta Pay Cửa hàng trên Meta Meta Quest Ray-Ban Meta Meta AI Nội dung khác do Meta AI tạo Instagram Threads Trung tâm thông tin bỏ phiếu Chính sách quyền riêng tư Trung tâm quyền riêng tư Giới thiệu Tạo quảng cáo Tạo Trang Nhà phát triển Tuyển dụng Cookie Lựa chọn quảng cáo Điều khoản Trợ giúp Tải thông tin liên hệ lên &amp; đối tượng không phải người dùng Cài đặt Nhật ký hoạt động Meta © 2026
2026-01-13T08:49:46
https://dev.to/michelle
Michelle Marcelline - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Follow User actions Michelle Marcelline I post about my journey as an immigrant female founder • prev. Typedream (acq. beehiiv) • Y Combibnator W20 • Forbes U30 Location San Francisco Joined Joined on  Jun 19, 2020 twitter website Work Co-Founder at The Prompting Company Five Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least five years. Got it Close Four Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least four years. Got it Close Writing Debut Awarded for writing and sharing your first DEV post! Continue sharing your work to earn the 4 Week Writing Streak Badge. Got it Close Three Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least three years. Got it Close Two Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least two years. Got it Close One Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least one year. Got it Close Top 7 Awarded for having a post featured in the weekly &quot;must-reads&quot; list. 🙌 Got it Close 4 Week Writing Streak You&#39;ve posted at least one post per week for 4 consecutive weeks! Got it Close More info about @michelle Organizations Cotter Post 4 posts published Comment 5 comments written Tag 0 tags followed Pin Pinned LocalStorage vs Cookies: All You Need To Know About Storing JWT Tokens Securely in The Front-End Michelle Marcelline Michelle Marcelline Michelle Marcelline Follow for Cotter Jul 21 &#39;20 LocalStorage vs Cookies: All You Need To Know About Storing JWT Tokens Securely in The Front-End # security # javascript # webdev 754  reactions Comments 46  comments 7 min read OAuth 2.0 - Before You Start: Pick the Right Flow for Your Website, SPA, Mobile App, TV App, and CLI Michelle Marcelline Michelle Marcelline Michelle Marcelline Follow for Cotter Aug 4 &#39;20 OAuth 2.0 - Before You Start: Pick the Right Flow for Your Website, SPA, Mobile App, TV App, and CLI # javascript # security # webdev # react 68  reactions Comments Add Comment 8 min read Want to connect with Michelle Marcelline? Create an account to connect with Michelle Marcelline. You can also sign in below to proceed if you already have an account. Create Account Already have an account? Sign in What is WebAuthn: Logging in with Face ID and Touch ID on the web Michelle Marcelline Michelle Marcelline Michelle Marcelline Follow for Cotter Jul 28 &#39;20 What is WebAuthn: Logging in with Face ID and Touch ID on the web # javascript # react # authentication # tutorial 70  reactions Comments 1  comment 7 min read What on Earth Is OAuth? ASuper Simple Intro to OAuth 2.0, Access Tokens, and How to Implement It in Your Site Michelle Marcelline Michelle Marcelline Michelle Marcelline Follow for Cotter Jul 14 &#39;20 What on Earth Is OAuth? ASuper Simple Intro to OAuth 2.0, Access Tokens, and How to Implement It in Your Site # security # javascript # webdev # oauth 155  reactions Comments Add Comment 7 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:46
https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fdev.to%2Falexanderhodes%2Fxcode-cloud-build-fails-due-command-exited-with-non-zero-exit-code-70-6aj&title=XCode%20Cloud%20Build%20fails%20due%20Command%20exited%20with%20non-zero%20exit-code%3A%2070&summary=Back%20from%20vacation%20and%20some%20days%20after%20the%20new%20year%20started%20our%20build%20pipeline%20for%20the%20iOS%20app%20in...&source=DEV%20Community
LinkedIn Login, Sign in | LinkedIn Sign in Sign in with Apple Sign in with a passkey By clicking Continue, you agree to LinkedIn’s User Agreement , Privacy Policy , and Cookie Policy . or Email or phone Password Show Forgot password? Keep me logged in Sign in We’ve emailed a one-time link to your primary email address Click on the link to sign in instantly to your LinkedIn account. If you don’t see the email in your inbox, check your spam folder. Resend email Back New to LinkedIn? Join now Agree & Join LinkedIn By clicking Continue, you agree to LinkedIn’s User Agreement , Privacy Policy , and Cookie Policy . LinkedIn © 2026 User Agreement Privacy Policy Community Guidelines Cookie Policy Copyright Policy Send Feedback Language العربية (Arabic) বাংলা (Bangla) Čeština (Czech) Dansk (Danish) Deutsch (German) Ελληνικά (Greek) English (English) Español (Spanish) فارسی (Persian) Suomi (Finnish) Français (French) हिंदी (Hindi) Magyar (Hungarian) Bahasa Indonesia (Indonesian) Italiano (Italian) עברית (Hebrew) 日本語 (Japanese) 한국어 (Korean) मराठी (Marathi) Bahasa Malaysia (Malay) Nederlands (Dutch) Norsk (Norwegian) ਪੰਜਾਬੀ (Punjabi) Polski (Polish) Português (Portuguese) Română (Romanian) Русский (Russian) Svenska (Swedish) తెలుగు (Telugu) ภาษาไทย (Thai) Tagalog (Tagalog) Türkçe (Turkish) Українська (Ukrainian) Tiếng Việt (Vietnamese) 简体中文 (Chinese (Simplified)) 正體中文 (Chinese (Traditional))
2026-01-13T08:49:46
https://forem.com/t/containers/page/11
Containers Page 11 - Forem Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close # containers Follow Hide Security for container technologies like Docker and orchestration platforms like Kubernetes. Create Post Older #containers posts 8 9 10 11 12 13 14 15 16 Posts Left menu 👋 Sign in for the ability to sort posts by relevant , latest , or top . Right menu Mastering Kubernetes Services: ClusterIP, NodePort, and LoadBalancer Explained. Abhishek Korde Abhishek Korde Abhishek Korde Follow Oct 7 &#39;25 Mastering Kubernetes Services: ClusterIP, NodePort, and LoadBalancer Explained. # kubernetes # containers # devops # docker 5  reactions Comments Add Comment 2 min read 🐳 Docker in Action: How I Containerized a Fullstack App Like a Pro (and You Can Too) Charan Gutti Charan Gutti Charan Gutti Follow Oct 7 &#39;25 🐳 Docker in Action: How I Containerized a Fullstack App Like a Pro (and You Can Too) # docker # containers # beginners # tutorial 3  reactions Comments Add Comment 4 min read 100 Days of DevOps: Day 65 Wycliffe A. Onyango Wycliffe A. Onyango Wycliffe A. Onyango Follow Oct 7 &#39;25 100 Days of DevOps: Day 65 # devops # redis # kubernetes # containers 3  reactions Comments Add Comment 2 min read Understanding Linux Namespaces: A Guide to Process Isolation Ajinkya Singh Ajinkya Singh Ajinkya Singh Follow Oct 6 &#39;25 Understanding Linux Namespaces: A Guide to Process Isolation # docker # core # go # containers Comments 1  comment 5 min read OOMKilled Pods: A guide to troubleshooting. Vijayendra Hunasgi Vijayendra Hunasgi Vijayendra Hunasgi Follow Oct 6 &#39;25 OOMKilled Pods: A guide to troubleshooting. # kubernetes # containers # devops # sre Comments Add Comment 5 min read Kubernetes Troubleshooting 2025 Mohammed Nasser Mohammed Nasser Mohammed Nasser Follow Oct 6 &#39;25 Kubernetes Troubleshooting 2025 # devops # softwaredevelopment # kubernetes # containers 1  reaction Comments 1  comment 6 min read Episode 13: Docker Compose Advanced (Scaling &amp; Multi-Env Setup) Yash Sonawane Yash Sonawane Yash Sonawane Follow Sep 4 &#39;25 Episode 13: Docker Compose Advanced (Scaling &amp; Multi-Env Setup) # docker # devops # tutorial # containers 7  reactions Comments Add Comment 1 min read 100 Days of DevOps: Day 64 Wycliffe A. Onyango Wycliffe A. Onyango Wycliffe A. Onyango Follow Oct 6 &#39;25 100 Days of DevOps: Day 64 # devops # kubernetes # linux # containers 2  reactions Comments Add Comment 2 min read Kubernetes: The Container Conductor&#39;s Symphony 🎼 Manish Kumar Manish Kumar Manish Kumar Follow Oct 6 &#39;25 Kubernetes: The Container Conductor&#39;s Symphony 🎼 # kubernetes # containers # devops # tutorial 1  reaction Comments Add Comment 28 min read Know what you want - Dockerfile 7GB to 1GB Mohamed Roshan Mohamed Roshan Mohamed Roshan Follow Sep 15 &#39;25 Know what you want - Dockerfile 7GB to 1GB # docker # containers # python # devops 2  reactions Comments Add Comment 2 min read 🎼 From Container Chaos to Compose Harmony: A DevOps Love Story Taverne Tech Taverne Tech Taverne Tech Follow Oct 4 &#39;25 🎼 From Container Chaos to Compose Harmony: A DevOps Love Story # beginners # docker # devops # containers 5  reactions Comments 1  comment 4 min read Docker - Basics Ayush Gupta Ayush Gupta Ayush Gupta Follow Oct 5 &#39;25 Docker - Basics # docker # containers # cicd # kubernetes Comments Add Comment 2 min read 100 Days of DevOps: Day 63 Wycliffe A. Onyango Wycliffe A. Onyango Wycliffe A. Onyango Follow Oct 5 &#39;25 100 Days of DevOps: Day 63 # devops # kubernetes # containers # linux 1  reaction Comments Add Comment 4 min read 100 Days of DevOps: Day 62. Wycliffe A. Onyango Wycliffe A. Onyango Wycliffe A. Onyango Follow Oct 5 &#39;25 100 Days of DevOps: Day 62. # devops # kubernetes # containers # linux 1  reaction Comments Add Comment 2 min read Beware of Bots Everywhere Joy Biswas Joy Biswas Joy Biswas Follow Oct 4 &#39;25 Beware of Bots Everywhere # docker # containers # go 1  reaction Comments Add Comment 1 min read 100 Days of DevOps: Day 61 Wycliffe A. Onyango Wycliffe A. Onyango Wycliffe A. Onyango Follow Oct 3 &#39;25 100 Days of DevOps: Day 61 # devops # kubernetes # containers # linux 1  reaction Comments Add Comment 3 min read 100 Days of DevOps: Day 60 Wycliffe A. Onyango Wycliffe A. Onyango Wycliffe A. Onyango Follow Oct 2 &#39;25 100 Days of DevOps: Day 60 # devops # kubernetes # containers # linux Comments Add Comment 2 min read The Ultimate Docker Hub Alternative: Building a Secure, Self-Hosted Registry with Distribution Akash Akash Akash Follow for MechCloud Academy Oct 3 &#39;25 The Ultimate Docker Hub Alternative: Building a Secure, Self-Hosted Registry with Distribution # docker # containers # devops # security 3  reactions Comments Add Comment 6 min read Kubernetes Security Best Practices Emma Wags Emma Wags Emma Wags Follow Oct 2 &#39;25 Kubernetes Security Best Practices # containers # kubernetes # security Comments Add Comment 5 min read Docker vs Podman: A Subjective Comparison Maksym Maksym Maksym Follow Sep 30 &#39;25 Docker vs Podman: A Subjective Comparison # docker # containers # k8s 10  reactions Comments 5  comments 5 min read 100 Days of DevOps: Day 59 Wycliffe A. Onyango Wycliffe A. Onyango Wycliffe A. Onyango Follow Oct 1 &#39;25 100 Days of DevOps: Day 59 # devops # kubernetes # linux # containers Comments Add Comment 3 min read Which Kubernetes Workloads to Use and When Shani Shoham Shani Shoham Shani Shoham Follow Sep 10 &#39;25 Which Kubernetes Workloads to Use and When # kubernetes # cloudnative # containers Comments 1  comment 2 min read 100 Days of DevOps: Day 58 Wycliffe A. Onyango Wycliffe A. Onyango Wycliffe A. Onyango Follow Sep 30 &#39;25 100 Days of DevOps: Day 58 # devops # kubernetes # containers # linux Comments Add Comment 2 min read Introduction to Docker and Docker Compose: Beginners Guide Walter Ndung&#39;u Walter Ndung&#39;u Walter Ndung&#39;u Follow Aug 26 &#39;25 Introduction to Docker and Docker Compose: Beginners Guide # docker # containers # microservices # compose 1  reaction Comments Add Comment 4 min read Beyond Heroku: Owning Your Deployments Defang.io Defang.io Defang.io Follow Sep 29 &#39;25 Beyond Heroku: Owning Your Deployments # heroku # aws # devops # containers 3  reactions Comments 1  comment 5 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — Your community HQ Home About Contact Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a blogging-forward open source social network where we learn from one another Log in Create account
2026-01-13T08:49:46
https://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/?replytocom=23490#content
Implementing a web server in a single printf() call &#8211; Tinyhack.com --> Skip to content Tinyhack.com A hacker does for love what others would not do for money. Implementing a web server in a single printf() call A guy just forwarded a joke that most of us will already know Jeff Dean Facts (also here and here ). Everytime I read that list, this part stands out: Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search. It is really possible to implement a web server using a single printf call, but I haven&#8217;t found anyone doing it. So this time after reading the list, I decided to implement it. So here is the code, a pure single printf call, without any extra variables or macros (don&#8217;t worry, I will explain how to this code works) #include &lt;stdio.h&gt; int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot;, ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 + 2, (((unsigned long int)0x4005c8 + 12) &amp; 0xffff)- ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 ); } This code only works on a Linux AMD64 bit system, with a particular compiler (gcc version 4.8.2 (Debian 4.8.2-16) ) And to compile it: gcc -g web1.c -O webserver As some of you may have guessed: I cheated by using a special format string . That code may not run on your machine because I have hardcoded two addresses. The following version is a little bit more user friendly (easier to change), but you are still going to need to change 2 values: FUNCTION_ADDR and DESTADDR which I will explain later: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) #define DESTADDR 0x00000000006007D8 #define a (FUNCTION_ADDR &amp; 0xffff) #define b ((FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff) int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot; , b, 0, DESTADDR + 2, a-b, 0, DESTADDR ); } I will explain how the code works through a series of short C codes. The first one is a code that will explain how that we can start another code without function call. See this simple code: #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #define ADDR 0x00000000600720 void hello() { printf(&quot;hello world\n&quot;); } int main(int argc, char *argv&#x5B;]) { (*((unsigned long int*)ADDR))= (unsigned long int)hello; } You can compile it, but it many not run on your system. You need to do these steps: 1. Compile the code: gcc run-finalizer.c -o run-finalizer 2. Examine the address of fini_array objdump -h -j .fini_array run-finalizer And find the VMA of it: run-finalizer: file format elf64-x86-64 Sections: Idx Name Size VMA LMA File off Algn 18 .fini_array 00000008 0000000000600720 0000000000600720 00000720 2**3 CONTENTS, ALLOC, LOAD, DATA Note that you need a recent GCC to do this, older version of gcc uses different mechanism of storing finalizers. 3. Change the value of ADDR on the code to the correct address 4. Compile the code again 5. Run it and now you will see &#8220;hello world&#8221; printed to your screen. How does this work exactly?: According to Chapter 11 of Linux Standard Base Core Specification 3.1 .fini_array This section holds an array of function pointers that contributes to a single termination array for the executable or shared object containing the section. We are overwriting the array so that our hello function is called instead of the default handler. If you are trying to compile the webserver code, the value of ADDR is obtained the same way (using objdump). Ok, now we know how to execute a function by overriding a certain address, we need to know how we can overwrite an address using printf . You can find many tutorials on how to exploit format string bugs, but I will try give a short explanation. The printf function has this feature that enables us to know how many characters has been printed using the &#8220;%n&#8221; format: #include &lt;stdio.h&gt; int main(){ int count; printf(&quot;AB%n&quot;, &amp;count); printf(&quot;\n%d characters printed\n&quot;, count); } You will see that the output is: AB 2 characters printed Of course we can put any address to the count pointer to overwrite that address. But to overide an address with a large value we need to print a large amount of text. Fortunately there is another format string &#8220;%hn&#8221; that works on short instead of int. We can overwrite the value 2 bytes at a time to form the 4 byte value that we want. Lets try to use two printf calls to put a¡ value that we want (in this case the pointer to function &#8220;hello&#8221;) to the fini_array: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)hello) #define DESTADDR 0x0000000000600948 void hello() { printf(&quot;\n\n\n\nhello world\n\n&quot;); } int main(int argc, char *argv&#x5B;]) { short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;a = %04x b = %04x\n&quot;, a, b) uint64_t *p = (uint64_t*)DESTADDR; printf(&quot;before: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;after1: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); printf(&quot;after2: %08lx\n&quot;, *p); return 0; } The important lines are: short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); The a and b are just halves of the function address, we can construct a string of length a and b to be given to printf, but I chose to use the &#8220;%*&#8221; formatting which will control the length of the output through parameter. For example, this code: printf("%*c", 10, 'A'); Will print 9 spaces followed by A, so in total, 10 characters will be printed. If we want to use just one printf, we need to take account that b bytes have been printed, and we need to print another b-a bytes (the counter is accumulative). printf("%*c%hn%*c%hn", b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); Currently we are using the &#8220;hello&#8221; function to call, but we can call any function (or any address). I have written a shellcode that acts as a web server that just prints &#8220;Hello world&#8221;. This is the shell code that I made: unsigned char hello&#x5B;] = "\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32" "\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d" "\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74" "\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65" "\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f" "\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89" "\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f" "\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff" "\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49" "\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31" "\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c" "\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2" "\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f" "\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee" "\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff" "\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05" "\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3"; If we remove the function hello and insert that shell code, that code will be called. That code is just a string, so we can append it to the &#8220;%*c%hn%*c%hn&#8221; format string. This string is unnamed, so we will need to find the address after we compile it. To obtain the address, we need to compile the code, then disassemble it: objdump -d webserver 00000000004004fd &lt;main&gt;: 4004fd: 55 push %rbp 4004fe: 48 89 e5 mov %rsp,%rbp 400501: 48 83 ec 20 sub $0x20,%rsp 400505: 89 7d fc mov %edi,-0x4(%rbp) 400508: 48 89 75 f0 mov %rsi,-0x10(%rbp) 40050c: c7 04 24 d8 07 60 00 movl $0x6007d8,(%rsp) 400513: 41 b9 00 00 00 00 mov $0x0,%r9d 400519: 41 b8 94 05 00 00 mov $0x594,%r8d 40051f: b9 da 07 60 00 mov $0x6007da,%ecx 400524: ba 00 00 00 00 mov $0x0,%edx 400529: be 40 00 00 00 mov $0x40,%esi 40052e: bf c8 05 40 00 mov $0x4005c8,%edi 400533: b8 00 00 00 00 mov $0x0,%eax 400538: e8 a3 fe ff ff callq 4003e0 &lt;printf@plt&gt; 40053d: c9 leaveq 40053e: c3 retq 40053f: 90 nop We only need to care about this line: mov $0x4005c8,%edi That is the address that we need in: #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) The +12 is needed because our shell code starts after the string &#8220;%*c%hn%*c%hn&#8221; which is 12 characters long. If you are curious about the shell code, it was created from the following C code. #include&lt;stdio.h&gt; #include&lt;string.h&gt; #include&lt;stdlib.h&gt; #include&lt;unistd.h&gt; #include&lt;sys/types.h&gt; #include&lt;sys/stat.h&gt; #include&lt;sys/socket.h&gt; #include&lt;arpa/inet.h&gt; #include&lt;netdb.h&gt; #include&lt;signal.h&gt; #include&lt;fcntl.h&gt; int main(int argc, char *argv&#x5B;]) { int sockfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in serv_addr; bzero((char *)&amp;serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(8080); bind(sockfd, (struct sockaddr *)&amp;serv_addr, sizeof(serv_addr)); listen(sockfd, 5); while (1) { int cfd = accept(sockfd, 0, 0); char *s = &quot;HTTP/1.0 200\r\nContent-type:text/html\r\n\r\n&lt;h1&gt;Hello world!&lt;/h1&gt;&quot;; if (fork()==0) { write(cfd, s, strlen(s)); shutdown(cfd, SHUT_RDWR); close(cfd); } } return 0; } I have done an extra effort (although it is not really necessary in this case) to remove all NUL character from the shell code (since I couldn&#8217;t find one for X86-64 in the Shellcodes database ). Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search . It is left as an exercise for the reader to scale the web server to able to handle Google search load. Source codes for this post is available at https://github.com/yohanes/printf-webserver For people who thinks that this is useless: yes it is useless. I just happen to like this challenge, and it has refreshed my memory and knowledge for the following topics: shell code writing (haven&#8217;t done this in years), AMD64 assembly (calling convention, preserved registers, etc), syscalls, objdump, fini_array (last time I checked, gcc still used .dtors), printf format exploiting, gdb tricks (like writing memory block to file), and low level socket code (I have been using boost&#8217;s for the past few years). Update : Ubuntu adds a security feature that provides a read-only relocation table area in the final ELF. To be able to run the examples in ubuntu, add this in the command line when compiling -Wl,-z,norelro e.g: gcc -Wl,-z,norelro test.c Author admin Posted on March 12, 2014 April 28, 2017 Categories hacks 18 thoughts on &ldquo;Implementing a web server in a single printf() call&rdquo; dodi says: March 12, 2014 at 2:04 pm eh buset, serius nih lu ? 🙂 Reply priyo says: March 13, 2014 at 5:07 am scroll up&#8230; scroll down&#8230; scroll up&#8230; scroll down&#8230; 100x *gagal paham* Reply terminalcommand says: March 13, 2014 at 5:19 am Thank you! Very interesting article. I also didn&#8217;t know about the one line webserver at google. Although this is a hard topic, you&#8217;ve made a great work simplifying it. Reply Basun says: March 13, 2014 at 10:02 am The one line webserver bit is a joke about Jeff Dean, who works at Google. Its not real. 🙂 Reply Cees Timmerman says: April 20, 2016 at 4:12 pm There are real webserver oneliners: https://gist.github.com/willurd/5720255 Reply anonim says: March 13, 2014 at 5:29 am Diskusinya di https://news.ycombinator.com/item?id=7389623 Reply Neil says: March 13, 2014 at 12:38 pm Shouldn&#8217;t there be an exit() somewhere in the fork==0 branch? Otherwise every time there is a request the new child process will become a server too and start accepting requests, right? I think the parent leaks its copy of the file descriptor too. Maybe the fork is a bit redundant. I don&#8217;t think the write or close will block with such a small amount of data. Cool post though! I&#8217;m not really sure why I&#8217;m nitpicking in the shell code. Sorry. Reply admin says: March 14, 2014 at 1:58 am Ah yes, there is an exit from the loop on the assembly code (myhttp.s) but it got removed from http.c when I removed the comment and debug code. And you are also right about the fork, it is unnecessary in this case. At first I was going to write the HTTP headers and then exec some external command. I changed my mind and didn&#8217;t bother deleting the fork call. Reply Kyle Ross says: March 13, 2014 at 11:02 pm This is really interesting, but I&#8217;m having trouble following whats actually happening. Could you explain how you reduced that C code with includes and methods into a string containing hex codes and how that is turned back into some sort of executable code? Thanks Reply admin says: March 14, 2014 at 2:01 am I think it is beyond the scope of this article to explain about shell code writing. There are many books and tutorials that you can read (just search for &#8220;buffer overflow&#8221; or &#8220;shell code writing&#8221;). Reply TTK Ciar says: March 14, 2014 at 1:05 am Alternatively: $ perl -Mojo -E &#8216;a({inline =&gt; &#8220;%= `uptime`&#8221;})-&gt;start&#8217; daemon &amp; Server available at http://127.0.0.1:3000 . $ lynx -dump -nolist http://127.0.0.1:3000/ 17:57:56 up 66 days, 6:45, 108 users, load average: 0.10, 0.12, 0.07 though, perl by definition is cheating. Reply Evan Danaher says: March 14, 2014 at 2:54 pm I&#8217;m not sure why you used finalizers instead of just changing the return address on the stack; this may be the first time I&#8217;ve ever said this, but stack smashing is much more portable. I&#8217;ve made a variant that I&#8217;d expect to work on any gcc 4.4-4.7 on x86_64 Linux, and have some ideas which, if they work out, may make it actually &#8220;portable&#8221; to any x86/x86_64 Unix running a reasonable compiler. https://github.com/edanaher/printf-webserver Reply admin says: March 17, 2014 at 3:02 pm Yes using the stack is also possible, but on most modern system, GCC is compiled with stack protection turned on (and needs to be disabled using -fno-stack-protector). Reply Pingback: Implementing a web server in a single printf() call &laquo; adafruit industries blog Itzik Kotler says: March 15, 2014 at 4:35 pm Pretty neat. I did something similar (all though simpler) back in the days. See: http://www.exploit-db.com/papers/13233/ Reply Pingback: Saving the world, one cpu cycle at a time | Dav&#039;s bit o the web programath says: April 22, 2014 at 1:18 pm printf(&#8220;%*c%hn%*c%hn&#8221;, b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; i think the fourth parameter should be &#8216;a-b&#8217;, not &#8216;b-a&#8217;, because a == b + (a &#8211; b) Reply Pingback: New top story on Hacker News: Implementing a web server in a single printf call (2014) &#8211; Latest news Leave a Reply Cancel reply Your email address will not be published. Required fields are marked * Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. &#916; Post navigation Previous Previous post: Raspberry Pi for Out of Band Linux PC management Next Next post: Exploiting the Futex Bug and uncovering Towelroot Pages About Archive Search for: Search Follow x.com/yohanes Mastodon Recent Posts CVE-2025-31931 Arbitrary Shared Library Loading in Intel ITT API on Android (affects OpenCV &lt;= 4.10) Decrypting Encrypted files from Akira Ransomware (Linux/ESXI variant 2024) using a bunch of GPUs Patching .so files of an installed Android App Extracting WhatsApp Database (or any app data) from Android 12/13 using CVE-2024-0044 Zygisk-based reFlutter Recent Comments Eitan Porat on About admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 Archives November 2025 March 2025 November 2024 June 2024 April 2024 January 2024 December 2023 September 2022 March 2021 January 2021 May 2019 January 2019 November 2018 July 2018 May 2018 February 2018 October 2017 September 2017 March 2017 November 2016 November 2015 July 2014 March 2014 February 2014 June 2013 January 2013 November 2011 March 2011 February 2011 July 2010 April 2010 January 2010 December 2009 September 2009 August 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 March 2008 February 2008 October 2007 June 2007 February 2007 January 2007 December 2006 Categories agestar android blog ctf debian flareon flex freebsd google hacks hardware hostmonster linux mac os x misc mobile opensource phone raspberry reverse-engineering sdr security Uncategorized wii writeup Meta Log in Entries feed Comments feed WordPress.org Tinyhack.com Proudly powered by WordPress
2026-01-13T08:49:46
https://popcorn.forem.com/#main-content
Popcorn Movies and TV Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account Popcorn Movies and TV Close Welcome to Popcorn Movies and TV — part of the Forem network! Let&#39;s watch something great! Create account Log in Home About Contact Other Code of Conduct Privacy Policy Terms of Use Twitter Facebook Github Instagram Twitch Mastodon Popular Tags #marketing #streaming #recommendations #movies #animation #analysis #reviews #distribution #netflix #offtopic #tv #3d #memes #cinema #truecrime #recap #genrestudies #diversity #characterarcs #spoilerfree #filmtheory #tropes #plotholes #representation #worstscenes #lgbtqrepresentation #womeninfilm #kidstv #bestscenes #spoilers Popcorn Movies and TV Movie and TV enthusiasm, criticism and everything in-between. Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . Popcorn Movies and TV &copy; 2016 - 2026. Posts Relevant Latest Top How I Cut the Cord: Watching TV Without Cable or Internet Sidra Jefferi Sidra Jefferi Sidra Jefferi Follow Dec 31 &#39;25 How I Cut the Cord: Watching TV Without Cable or Internet # discuss # watchtvwithoutcable # tvwithoutinternet # network 8  reactions Comments Add Comment 4 min read Shoujo: A Celebration of Emotion, Growth, and Storytelling in Japanese Manga and Anime wajihaseo wajihaseo wajihaseo Follow Dec 28 &#39;25 Shoujo: A Celebration of Emotion, Growth, and Storytelling in Japanese Manga and Anime # genrestudies # filmhistory # animation # analysis Comments Add Comment 4 min read The Conformity Gate Phenomenon: Exploration of Fan Theories Following the Stranger Things Season 5 Finale Om Shree Om Shree Om Shree Follow Jan 7 The Conformity Gate Phenomenon: Exploration of Fan Theories Following the Stranger Things Season 5 Finale # streaming # movies # recommendations # analysis 26  reactions Comments Add Comment 4 min read Ringer Movies: A Holiday Surprise for the Unboxing Boy Movie News Movie News Movie News Follow Dec 6 &#39;25 Ringer Movies: A Holiday Surprise for the Unboxing Boy # reviews # offtopic Comments Add Comment 1 min read Ringer Movies: The Robert Redford Hall of Fame Movie News Movie News Movie News Follow Nov 28 &#39;25 Ringer Movies: The Robert Redford Hall of Fame # movies # streaming # recommendations Comments Add Comment 1 min read Mr Sunday Movies: John Carter - Caravan Of Garbage Movie News Movie News Movie News Follow Nov 28 &#39;25 Mr Sunday Movies: John Carter - Caravan Of Garbage # movies # reviews # analysis Comments Add Comment 1 min read Mr Sunday Movies: The Sorcerer&#39;s Apprentice - Caravan of Garbage Movie News Movie News Movie News Follow Nov 29 &#39;25 Mr Sunday Movies: The Sorcerer&#39;s Apprentice - Caravan of Garbage # movies # reviews # analysis Comments Add Comment 1 min read CinemaSins: Everything Wrong With Mission: Impossible - The Final Reckoning In 27 Minutes Or Less Movie News Movie News Movie News Follow Nov 28 &#39;25 CinemaSins: Everything Wrong With Mission: Impossible - The Final Reckoning In 27 Minutes Or Less # movies # reviews # action # marketing Comments Add Comment 1 min read Ringer Movies: ‘Wicked: For Good’ Is No Good Movie News Movie News Movie News Follow Nov 21 &#39;25 Ringer Movies: ‘Wicked: For Good’ Is No Good # movies # reviews # analysis Comments Add Comment 1 min read Yellowstone’s 1944 and the virtue of endings Jason Guo Jason Guo Jason Guo Follow Dec 25 &#39;25 Yellowstone’s 1944 and the virtue of endings # western # miniseries # historical # screenwriting 2  reactions Comments Add Comment 1 min read Mr Sunday Movies: Biggest Disney Bombs: The Sorcerer&#39;s Apprentice - Caravan of Garbage Movie News Movie News Movie News Follow Nov 21 &#39;25 Mr Sunday Movies: Biggest Disney Bombs: The Sorcerer&#39;s Apprentice - Caravan of Garbage # movies # reviews # analysis Comments Add Comment 1 min read Ringer Movies: Best Picture Power Rankings &amp; the Super-Sincerity of ‘Sentimental Value&#39; Movie News Movie News Movie News Follow Nov 24 &#39;25 Ringer Movies: Best Picture Power Rankings &amp; the Super-Sincerity of ‘Sentimental Value&#39; # movies # reviews # streaming # analysis Comments 1  comment 1 min read Ringer Movies: ‘Snake Eyes’ With Bill Simmons, Sean Fennessey, and Van Lathan | Ringer Movies Movie News Movie News Movie News Follow Nov 17 &#39;25 Ringer Movies: ‘Snake Eyes’ With Bill Simmons, Sean Fennessey, and Van Lathan | Ringer Movies # movies # marketing # recommendations Comments Add Comment 1 min read How Movie Posters Reflect Cultural Shifts Through Decades Patrick Norton Patrick Norton Patrick Norton Follow Nov 16 &#39;25 How Movie Posters Reflect Cultural Shifts Through Decades # discuss Comments Add Comment 6 min read CinemaSins: Everything Wrong With Jurassic World Rebirth In 17 Minutes Or Less Movie News Movie News Movie News Follow Nov 17 &#39;25 CinemaSins: Everything Wrong With Jurassic World Rebirth In 17 Minutes Or Less # movies # reviews Comments Add Comment 1 min read Ringer Movies: What Happened With the Fall Movie Slate? Movie News Movie News Movie News Follow Nov 15 &#39;25 Ringer Movies: What Happened With the Fall Movie Slate? # movies # reviews # analysis # action Comments Add Comment 1 min read Ringer Movies: The 25 Best Movies of the Century: No. 5 - &#39;Lady Bird’ Movie News Movie News Movie News Follow Nov 13 &#39;25 Ringer Movies: The 25 Best Movies of the Century: No. 5 - &#39;Lady Bird’ # movies # recommendations # reviews # analysis Comments Add Comment 1 min read CinemaSins: Everything Wrong With Thunderbolts* (The New Avengers) In 20 Minutes Or Less Movie News Movie News Movie News Follow Nov 14 &#39;25 CinemaSins: Everything Wrong With Thunderbolts* (The New Avengers) In 20 Minutes Or Less # movies # reviews # marketing Comments Add Comment 1 min read loading... #discuss Discussion threads targeting the whole community #watercooler Light, and off-topic conversation. 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV Popcorn Movies and TV — Movie and TV enthusiasm, criticism and everything in-between. Home About Contact Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . Popcorn Movies and TV &copy; 2016 - 2026. Let&#39;s watch something great! Log in Create account
2026-01-13T08:49:46
https://es-la.facebook.com/login/?next=https%3A%2F%2Fwww.facebook.com%2Fshare_channel%2F%3Ftype%3Dreshare%26link%3Dhttps%253A%252F%252Fdev.to%252Fkowshikkumar_reddymakire%252Fbuilding-a-low-code-blockchain-deployment-platform-4ali%26app_id%3D966242223397117%26source_surface%3Dexternal_reshare%26display%26hashtag
Iniciar sesión en Facebook Notice Debes iniciar sesión para continuar. Iniciar sesión en Facebook Debes iniciar sesión para continuar. Iniciar sesión ¿Olvidaste tu cuenta? o Crear cuenta nueva Español 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch Registrarte Iniciar sesión Messenger Facebook Lite Video Meta Pay Tienda de Meta Meta Quest Ray-Ban Meta Meta AI Más contenido de Meta AI Instagram Threads Centro de información de votación Política de privacidad Centro de privacidad Información Crear anuncio Crear página Desarrolladores Empleo Cookies Opciones de anuncios Condiciones Ayuda Importación de contactos y no usuarios Configuración Registro de actividad Meta © 2026
2026-01-13T08:49:46
https://dev.to/pockit_tools/pnpm-vs-npm-vs-yarn-vs-bun-the-2026-package-manager-showdown-51dc#single-project-disk-usage
pnpm vs npm vs yarn vs Bun: The 2026 Package Manager Showdown - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Add reaction Like Unicorn Exploding Head Raised Hands Fire Jump to Comments Save Boost More... Copy link Copy link Copied to Clipboard Share to X Share to LinkedIn Share to Facebook Share to Mastodon Share Post via... Report Abuse HK Lee Posted on Jan 9 &bull; Originally published at pockit.tools pnpm vs npm vs yarn vs Bun: The 2026 Package Manager Showdown # bunjs # pnpm # yarn # npm Every JavaScript project starts with a choice: which package manager? For years, it was npm by default. Then yarn promised faster installs. Then pnpm claimed to save gigabytes of disk space. And now Bun's built-in package manager claims to make everything else obsolete. But here's what no one tells you: the "best" package manager depends entirely on your specific use case, and blindly following benchmarks can lead you astray. A package manager that's perfect for a solo developer's side project might be terrible for a 500-package monorepo—and vice versa. This guide cuts through the marketing hype. After extensive testing across different project sizes and configurations in January 2026, here's what actually matters for each package manager, when to use it, and how to migrate if you need to. 📌 Version Note: This comparison covers npm 11.x, yarn 4.x (Berry), pnpm 10.x, and Bun 1.3 as of January 2026. The Quick Verdict If you're in a hurry, here's the short version: Use Case Recommended Why Solo/small projects Bun Fastest by far, simplest setup Large monorepos pnpm Best disk efficiency, workspace support Enterprise/legacy npm Maximum compatibility, no surprises Yarn ecosystem yarn 4 PnP mode, excellent plugins Performance at scale pnpm or Bun Both excel, pnpm more mature Now let's dive into why. The Contenders: 2026 State of Play npm 11.x Status: Still the default, ships with Node.js Latest: npm 11.7.0 (December 2025) Philosophy: Compatibility over innovation Key Strength: Works everywhere, always npm has evolved significantly. The node_modules structure is now more optimized, and features like npm audit have become industry standards. But npm's conservative approach means it's rarely the fastest or most efficient—it's just the most reliable. yarn 4.x (Berry) Status: Complete rewrite from yarn 1.x Latest: yarn 4.12.0 (January 2026) Philosophy: Innovation through Plug'n'Play (PnP) Key Strength: Zero-installs, plugin architecture Yarn Berry is essentially a different product from yarn 1. The Plug'n'Play feature eliminates node_modules entirely, instead using a .pnp.cjs file that maps imports directly to zip archives. It's radical—and divisive. pnpm 10.x Status: The "smart" alternative Latest: pnpm 10.27.0 (December 2025) Philosophy: Efficiency without breaking compatibility Key Strength: Content-addressable storage, true deduplication pnpm's approach is elegant: store all packages once in a global content-addressable store, then use hard links to make them appear in each project's node_modules . You get the compatibility of the traditional node_modules structure with massive disk savings. Bun 1.3 Package Manager Status: The new challenger Latest: Bun 1.3.0 (January 1, 2026) Philosophy: Speed above all else Key Strength: Native speed, zero configuration, full-stack capabilities Bun isn't just a package manager—it's a complete JavaScript runtime. Bun 1.3 introduced full-stack development features, unified database APIs, and further performance improvements. Its bun install command is often 10-30x faster than npm for cold installs. Benchmark Results: Cold Install Performance Let's start with what everyone cares about—raw speed. We tested each package manager on the same projects with cleared caches: Small Project (50 dependencies) Project: Typical React + TypeScript starter Dependencies: 50 direct, ~400 total Cold Install Times (cleared cache): ┌────────────┬──────────┬────────────┐ │ Manager │ Time │ vs npm │ ├────────────┼──────────┼────────────┤ │ bun │ 0.8s │ 18x faster │ │ pnpm │ 4.2s │ 3.4x faster│ │ yarn │ 6.8s │ 2.1x faster│ │ npm │ 14.3s │ baseline │ └────────────┴──────────┴────────────┘ Enter fullscreen mode Exit fullscreen mode Medium Project (200 dependencies) Project: Next.js 15 app with common libraries Dependencies: 200 direct, ~1,200 total Cold Install Times (cleared cache): ┌────────────┬──────────┬────────────┐ │ Manager │ Time │ vs npm │ ├────────────┼──────────┼────────────┤ │ bun │ 2.1s │ 22x faster │ │ pnpm │ 12.4s │ 3.7x faster│ │ yarn │ 18.2s │ 2.5x faster│ │ npm │ 46.1s │ baseline │ └────────────┴──────────┴────────────┘ Enter fullscreen mode Exit fullscreen mode Large Monorepo (15 packages, 800 dependencies) Project: Turborepo monorepo with 15 packages Dependencies: 800 direct, ~3,500 total Cold Install Times (cleared cache): ┌────────────┬──────────┬────────────┐ │ Manager │ Time │ vs npm │ ├────────────┼──────────┼────────────┤ │ bun │ 4.8s │ 28x faster │ │ pnpm │ 28.6s │ 4.7x faster│ │ yarn │ 52.3s │ 2.6x faster│ │ npm │ 134.2s │ baseline │ └────────────┴──────────┴────────────┘ Enter fullscreen mode Exit fullscreen mode Key Insight: Bun's lead actually increases with project size. For monorepos, the difference is staggering. Cached/Warm Install Performance But cold installs aren't the whole story. Most of the time, you're installing with some level of caching: Warm Install (lockfile exists, some cache): ┌────────────┬──────────────┬──────────────┐ │ Manager │ Small (50) │ Large (800) │ ├────────────┼──────────────┼──────────────┤ │ bun │ 0.3s │ 1.2s │ │ pnpm │ 1.1s │ 8.4s │ │ yarn (PnP) │ 0.0s* │ 0.0s* │ │ npm │ 3.2s │ 24.6s │ └────────────┴──────────────┴──────────────┘ * Yarn PnP with zero-installs commits dependencies to repo Enter fullscreen mode Exit fullscreen mode Yarn's Zero-Installs Trick: With PnP mode and zero-installs, yarn commits your dependencies directly to the repository. CI/CD runs need zero install time—they just yarn and go. The tradeoff? Your repo size increases significantly. Disk Usage: Where pnpm Shines Raw speed is one thing, but what about your hard drive? Single Project Disk Usage Same 200-dependency project: ┌────────────┬──────────────┬──────────────┐ │ Manager │ node_modules │ vs npm │ ├────────────┼──────────────┼──────────────┤ │ npm │ 487 MB │ baseline │ │ yarn │ 502 MB │ +3% │ │ pnpm │ 124 MB* │ -75% │ │ bun │ 461 MB │ -5% │ └────────────┴──────────────┴──────────────┘ * pnpm uses hard links to global store Enter fullscreen mode Exit fullscreen mode Multiple Projects (Same Dependencies) Here's where pnpm's architecture pays off. If you have 10 projects using React 19: 10 Projects with overlapping dependencies: ┌────────────┬──────────────┬──────────────┐ │ Manager │ Total Disk │ vs npm │ ├────────────┼──────────────┼──────────────┤ │ npm │ 4.87 GB │ baseline │ │ yarn │ 5.02 GB │ +3% │ │ pnpm │ 612 MB │ -87% │ │ bun │ 4.61 GB │ -5% │ └────────────┴──────────────┴──────────────┘ Enter fullscreen mode Exit fullscreen mode pnpm stores each unique package version exactly once. Every project links to that single copy. If you work on many projects, pnpm can save tens of gigabytes. Bun's Approach: Bun uses a global cache but still creates full node_modules directories. It's faster than npm/yarn but doesn't achieve pnpm's deduplication. Monorepo Support Compared Monorepos have become the default for many organizations. Here's how each manager handles them: Workspace Configuration npm (workspaces): // package.json { "workspaces" : [ "packages/*" , "apps/*" ] } Enter fullscreen mode Exit fullscreen mode yarn (workspaces): // package.json { "workspaces" : [ "packages/*" , "apps/*" ] } Enter fullscreen mode Exit fullscreen mode pnpm (pnpm-workspace.yaml): # pnpm-workspace.yaml packages : - ' packages/*' - ' apps/*' Enter fullscreen mode Exit fullscreen mode Bun (workspaces): // package.json { "workspaces" : [ "packages/*" , "apps/*" ] } Enter fullscreen mode Exit fullscreen mode Workspace Features Comparison Feature npm yarn pnpm Bun Workspace protocol ( workspace:* ) ❌ ✅ ✅ ✅ Selective dependency installation ❌ ✅ ✅ ✅ Parallel task execution ❌ ✅ ✅ ✅ Cross-workspace linking Basic Good Excellent Good Hoisting control Limited Full Full Limited Filtering ( --filter ) ❌ ✅ ✅ ❌ The Bottom Line: pnpm and yarn are the clear leaders for monorepo management. npm's workspace support is functional but basic. Bun's is improving rapidly but still catching up. Real-World Monorepo Performance We tested a Turborepo setup with 15 packages: Task: Install + Build all packages ┌────────────┬──────────────┬──────────────┐ │ Manager │ Install │ Full Build │ ├────────────┼──────────────┼──────────────┤ │ pnpm │ 28.6s │ 142s │ │ bun │ 4.8s │ 138s │ │ yarn │ 52.3s │ 156s │ │ npm │ 134.2s │ 198s │ └────────────┴──────────────┴──────────────┘ Enter fullscreen mode Exit fullscreen mode Interesting: Bun's install speed advantage shrinks when you include build time. The build phase dominates, making the install speed difference less impactful for CI/CD overall. Security Features Security has become a first-class concern. Here's how each manager handles it: Audit Capabilities Feature npm yarn pnpm Bun audit command ✅ Native ✅ Plugin ✅ Native ❌ Auto-fix vulnerabilities ✅ ✅ ✅ ❌ Advisory database npm registry npm registry npm registry - SBOM generation ✅ ✅ Plugin ✅ ❌ Critical Note: Bun currently lacks built-in security auditing. For production applications, you'll need third-party tools like Snyk or Socket. Lockfile Security All four managers use lockfiles to ensure reproducible installs: npm: package-lock.json (JSON) yarn: yarn.lock (custom format) pnpm: pnpm-lock.yaml (YAML) Bun: bun.lockb (binary) Bun's Binary Lockfile: Bun's bun.lockb is binary for speed. While this makes installs faster, it's not human-readable and can't be easily diffed in code review. Bun offers bun.lock (text) as an alternative, but it's not the default. Supply Chain Protection Feature npm yarn pnpm Bun Signature verification ✅ ✅ ✅ ❌ Strict peer dependencies Optional Optional Default Optional .npmrc security options Full Limited Full Limited Network isolation mode ❌ ✅ ✅ ❌ Compatibility Reality Check Here's what nobody talks about: not every package works perfectly with every manager. Known Compatibility Issues (January 2026) pnpm: Some packages break with strict node_modules structure Workaround: shamefully-hoist=true in .npmrc Most major packages now support pnpm natively yarn PnP: Many packages still don't support PnP mode Workaround: nodeLinker: node-modules falls back to traditional structure Adoption is improving but still incomplete Bun: ~98% npm compatibility (up from 95% in 2025) Some native modules still have issues Workaround: Use --backend=copyfile for problematic packages Framework Compatibility Framework npm yarn pnpm Bun Next.js 15 ✅ ✅ ✅ ✅ Remix ✅ ✅ ✅ ⚠️ Nuxt 4 ✅ ✅ ✅ ✅ Angular 19 ✅ ⚠️ ✅ ⚠️ SvelteKit ✅ ✅ ✅ ✅ Astro 5 ✅ ✅ ✅ ✅ ⚠️ = Works but some edge cases or extra configuration needed CI/CD Performance For many teams, CI/CD time is where package manager choice really matters: GitHub Actions Benchmark # Same workflow, different package managers # Node.js 22, ubuntu-latest, clean cache ┌────────────┬──────────────┬──────────────┬──────────────┐ │ Manager │ Install │ Cache Hit │ Total Job │ ├────────────┼──────────────┼──────────────┼──────────────┤ │ npm │ 48s │ 12s │ 2m 34s │ │ yarn │ 21s │ 8s │ 2m 15s │ │ yarn (PnP) │ 18s │ 0s* │ 2m 02s │ │ pnpm │ 14s │ 4s │ 2m 08s │ │ bun │ 3s │ 1s │ 1m 52s │ └────────────┴──────────────┴──────────────┴──────────────┘ * Zero-installs : dependencies committed to repo Enter fullscreen mode Exit fullscreen mode Docker Build Performance # Multi-stage build comparison ┌────────────┬──────────────┬──────────────┐ │ Manager │ Layer Cache │ No Cache │ ├────────────┼──────────────┼──────────────┤ │ npm │ 18s │ 52s │ │ pnpm │ 8s │ 24s │ │ bun │ 2s │ 6s │ └────────────┴──────────────┴──────────────┘ Enter fullscreen mode Exit fullscreen mode The Docker Secret: Bun's speed advantage is even more pronounced in Docker because its binary includes the runtime—no need to install Node.js separately. Migration Guides Ready to switch? Here's how: npm → pnpm Install pnpm: npm install -g pnpm Enter fullscreen mode Exit fullscreen mode Import existing lockfile: pnpm import Enter fullscreen mode Exit fullscreen mode Delete old files: rm -rf node_modules package-lock.json Enter fullscreen mode Exit fullscreen mode Install: pnpm install Enter fullscreen mode Exit fullscreen mode Update scripts (if needed): // package.json - usually works as-is { "scripts" : { "dev" : "next dev" , // no change needed "build" : "next build" } } Enter fullscreen mode Exit fullscreen mode npm → Bun Install Bun: curl -fsSL https://bun.sh/install | bash Enter fullscreen mode Exit fullscreen mode Remove old files: rm -rf node_modules package-lock.json Enter fullscreen mode Exit fullscreen mode Install: bun install Enter fullscreen mode Exit fullscreen mode Update scripts for Bun runtime (optional): { "scripts" : { "dev" : "bun run --bun next dev" , "build" : "bun run next build" } } Enter fullscreen mode Exit fullscreen mode yarn 1.x → yarn 4.x (Berry) # Enable corepack (Node.js 16+) corepack enable # Set yarn version yarn set version stable # Migrate configuration yarn config set nodeLinker node-modules # for compatibility # Install yarn install Enter fullscreen mode Exit fullscreen mode Rollback Plan If migration causes issues: # Keep your old lockfile backed up! cp package-lock.json package-lock.json.backup # To rollback: rm -rf node_modules bun.lockb pnpm-lock.yaml yarn.lock mv package-lock.json.backup package-lock.json npm install Enter fullscreen mode Exit fullscreen mode When to Use What: Decision Framework Use npm when: ✅ Maximum compatibility is required ✅ Team is unfamiliar with alternatives ✅ Legacy project with many native dependencies ✅ Corporate environment with strict tooling policies ✅ You want "it just works" Use yarn when: ✅ You need Plug'n'Play zero-installs ✅ You want the plugin ecosystem ✅ Your team is already yarn experts ✅ You need advanced workspace features ✅ Offline-first development is important Use pnpm when: ✅ Disk space is a concern ✅ You have many projects with overlapping dependencies ✅ Large monorepo with complex dependencies ✅ You want speed without sacrificing compatibility ✅ Strict dependency isolation matters Use Bun when: ✅ Speed is the absolute priority ✅ You're starting a new project ✅ CI/CD time is a major cost ✅ You're building Node.js APIs or scripts ✅ You want a unified runtime + package manager The Hidden Costs Nobody Mentions Before you switch, consider: Learning Curve npm → pnpm: Minimal. Almost drop-in. npm → yarn 4: Moderate. PnP mode requires understanding. npm → Bun: Low for package management, higher if using Bun runtime. Tooling Compatibility IDE support: All four work with VS Code, JetBrains, etc. CI/CD templates: npm has the most, Bun the least ready-made Docker images: npm/yarn are everywhere, pnpm common, Bun less common Team Onboarding The fastest package manager doesn't help if it slows down your team. Consider: How comfortable is your team with the new tool? Are your documentation and scripts updated? Have you tested the entire development workflow? Future Outlook: 2026 and Beyond npm: Will remain the default. Focus on incremental improvements. yarn: Continuing to push PnP adoption. Better monorepo support coming. pnpm: Rapid growth in enterprise. Becoming the "safe modern choice." Bun: Aggressive development. Aiming for 100% npm compatibility. May become the default for new projects by 2027. The ecosystem is fragmenting in healthy ways. Competition drives innovation—and all four managers are better for it. Conclusion: There's No Wrong Choice (Mostly) After extensive testing, here's the honest truth: all four package managers work fine for most projects. The performance differences, while measurable, rarely matter for small-to-medium projects. Where choice matters: Monorepos: pnpm or yarn CI/CD-heavy workflows: Bun or pnpm Disk-constrained systems: pnpm Maximum compatibility: npm Bleeding edge: Bun The most important thing isn't which package manager you choose—it's that you choose consistently across your projects and team. Switching between managers constantly creates more friction than any speed difference could justify. My recommendation for 2026: New projects: Try Bun. It's fast enough to justify the minor compatibility risks. Existing projects: Consider pnpm if you're feeling pain. Otherwise, npm is fine. Enterprise monorepos: pnpm is the safe, powerful choice. Benchmarks conducted January 2026 on M3 MacBook Pro with Node.js 22.x. Results will vary based on hardware, network, and project specifics. Always test with your own codebase before making decisions. 🚀 Explore More: This article is from the Pockit Blog . If you found this helpful, check out Pockit.tools . It’s a curated collection of offline-capable dev utilities. Available on Chrome Web Store for free. Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct &bull; Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink . Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse HK Lee Follow solo web developer Joined Dec 26, 2025 Trending on DEV Community Hot I Am 38, I Am a Nurse, and I Have Always Wanted to Learn Coding # career # learning # beginners # coding Top 7 Featured DEV Posts of the Week # top7 # discuss What was your win this week??? # weeklyretro # discuss 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:46
https://zh-cn.facebook.com/login/?next=https%3A%2F%2Fwww.facebook.com%2Fshare_channel%2F%3Ftype%3Dreshare%26link%3Dhttps%253A%252F%252Fdev.to%252Fkowshikkumar_reddymakire%252Fbuilding-a-low-code-blockchain-deployment-platform-4ali%26app_id%3D966242223397117%26source_surface%3Dexternal_reshare%26display%26hashtag
登录 Facebook Notice 登录后才能继续。 登录 Facebook 登录后才能继续。 登录 忘记账户了? 或 创建新账户 中文(简体) 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 日本語 Português (Brasil) Français (France) Deutsch 注册 登录 Messenger Facebook Lite 视频 Meta Pay Meta 商店 Meta Quest Ray-Ban Meta Meta AI Meta AI 更多内容 Instagram Threads 选民信息中心 隐私政策 隐私中心 关于 创建广告 创建公共主页 开发者 招聘信息 Cookie Ad Choices 条款 帮助 联系人上传和非用户 设置 动态记录 Meta © 2026
2026-01-13T08:49:46
https://news.ycombinator.com/item?id=7389623#7389926
Implementing a web server in a single printf() call | Hacker News Hacker News new | past | comments | ask | show | jobs | submit login Implementing a web server in a single printf() call ( tinyhack.com ) 181 points by pdq on March 13, 2014 | hide | past | favorite | 39&nbsp;comments goldenkey on March 13, 2014 | next [–] It&#x27;s called Shellcode. These kids these days with their exclusive Ruby on Rails knowledge. &quot;Shell what? Oh you mean that new band that you probably never heard of?&quot; joebo on March 13, 2014 | parent | next [–] I don&#x27;t see ruby mentioned anywhere and the article mentions shellcode. I thought it was informative and interesting and I am well aware of shellcode. Your comment is unnecessarily condescending and may discourage posts like this. pessimizer on March 13, 2014 | root | parent | next [–] &gt;may discourage posts like this. That may be goldenkey&#x27;s goal, and shouldn&#x27;t be discouraged either. Someone&#x27;s opinion that something is awful and doesn&#x27;t belong here is just as legitimate as your opinion that something is informative and interesting. Your comment is unnecessarily condescending and may discourage comments like this. scott_s on March 13, 2014 | root | parent | next [–] I disagree. Most opinions that state &quot;I already knew this, and you should too&quot; are banal and do not lead to interesting discussion. And the moderation system of this site is set up to promote interesting discussion. goldenkey on March 20, 2014 | root | parent | next [–] True but my comment was more directed at the disenfranchising nature of &#x27;using printf.&#x27; Printf has nothing to do with shellcode, and is just a silent mockdrop of BS to entice those who would probably click onto the next article of a real explanation of shellcode were had. I prefer frankness to BS even if the frank explanation intimidates most. ethikal on March 13, 2014 | parent | prev | next [–] &quot;Machine code? What&#x27;s that?&quot; negamax on March 13, 2014 | root | parent | next [–] &quot;Javascript is assembly&quot;. ROFL! austinz on March 13, 2014 | prev | next [–] If you want to read more about shellcode&#x2F;C vulnerabilities you can check out the Phrack and other links at Stanford&#x27;s CS155 web site: https:&#x2F;&#x2F;courseware.stanford.edu&#x2F;pg&#x2F;assignments&#x2F;view&#x2F;280907&#x2F;b... The Buffer Overflow #1 and #2 projects might also be worth checking out. You can download the project description, starter code, and VM image, and see if you can write code to get the root shell. voltagex_ on March 13, 2014 | parent | next [–] The requested URL &#x2F;cs155&#x2F;hw_and_proj&#x2F;pp1&#x2F;boxes-2.3.tar.bz2 was not found on this server. From https:&#x2F;&#x2F;crypto.stanford.edu&#x2F;cs155&#x2F;hw_and_proj&#x2F;pp1&#x2F;boxes-2.3.... which is the VM image link. Anyone got any contacts at Stanford? austinz on March 13, 2014 | root | parent | next [–] If you change https to http, it works for me (and I&#x27;m not logged in or privileged in any way). j_m_b on March 13, 2014 | parent | prev | next [–] Oldie but relevant: http:&#x2F;&#x2F;www.phrack.org&#x2F;issues.html?issue=49&amp;id=14#article DanielRibeiro on March 13, 2014 | parent | prev | next [–] Thanks for the course info! Quick link for those that missed how to use printf to call arbitrary functions: http:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;7459758&#x2F;113507 coldpie on March 13, 2014 | parent | prev | next [–] Along the same lines, I would also recommend &quot;Hacking&quot; by Jon Erickson. nostrademons on March 13, 2014 | prev | next [–] I did something like this in Haskell a few years ago, largely as an entertaining practical joke: http:&#x2F;&#x2F;pastebin.com&#x2F;6kfwTsB0 sedev on March 13, 2014 | parent | next [–] I admire that feat at the same time as I have an overwhelming urge to take a cheap shot about which Haskell projects are entertaining practical jokes. JetSpiegel on March 13, 2014 | parent | prev | next [–] Minor lacerations detected. userbinator on March 13, 2014 | prev | next [–] When I read the title I thought it was going to be a printf(&quot;HTTP&#x2F;1.1 200 OK...&quot;); sort of thing, but I was pleasantly surprised. zobzu on March 13, 2014 | prev | next [–] if you&#x27;re going to insert a shell code into printf, then well... you can implement anything in printf... or in memcpy.. or in strcat.. or whatever really. yalue on March 13, 2014 | parent | next [–] Heck, why not just title it &quot;a web server with no library function calls&quot; and call an array of bytes as a function? Then everybody would be able to see what it really is, which is an unremarkable shellcode embedded directly in a C program. I feel like the &quot;printf&quot; was only included so that people would have something to recognize in the title. anon4 on March 14, 2014 | root | parent | next [–] By that logic you could just execve httpd with shellcode. Or ruby. Or a ruby program that generates a perl script that compiles a Prolog program to shellcode that looks like it prints hello world, but actually does execve httpd. kang on March 13, 2014 | parent | prev | next [–] Yes, he mentions that. kentuckyduck on March 13, 2014 | prev | next [–] I got segmentation fault trying out his hello world example (after changing VMA address). Then again, isn&#x27;t that the supposed behavior? Not every memory page can be written to, if I remember correctly. evandrix on March 13, 2014 | parent | next [–] Yes, segfault for me too after i changed ADDR preprocessor directive to the VMA address from objdump, as the instruction says. I&#x27;m on Ubuntu Linux 13.10 x64. yohanes on March 13, 2014 | root | parent | next [–] Ubuntu adds a security feature that provides a read-only relocation table area in the final ELF. To be able to run the examples in ubuntu, add this in the command line when compiling -Wl,-z,norelro e.g: gcc -Wl,-z,norelro test.c evandrix on March 13, 2014 | root | parent | next [–] ok, now it compiles, thanks for that. However, I&#x27;m getting an incomplete response &quot;&lt;h1&gt;hello world&lt;&#x2F;h1&quot; without the trailing closing angled bracket. And when I try to run final.c after setting the FUNCTION_ADDR and ADDR as per your tutorial, I get some stray HTTP&#x2F;1.0 200 and Content-type text&#x2F;html being displayed on stdout as I start the program final.c (compiled to a.out by default) yohanes on March 13, 2014 | root | parent | next [–] Ah, you have found a bug in my code (I made an error in computing the string length, and didn&#x27;t notice it because it displayed fine on Chrome). I have fixed my code in git and the blog post. As for the stray output displayed on the stdout: it is to be expected. The %n format outputs the numbers of character that is written by printf, so it must have written something to the stdout. evandrix on March 13, 2014 | root | parent | next [–] Ah! that explains so much (and also why i&#x27;ve wasted a whole hour figuring out why what I observed was happening) I&#x27;m a CLI curl guy, rather than relying on these browsers which randomly would add a 0x0d 0x0a to my form submissions, for example. I also noticed that compiling (assembling-linking) the .S to execute it would not print anything (just hang there like a normal webserver), but I was getting stuff written to stdout with the final.c&#x2F;webserver.c version using its shellcode. mvirkkunen on March 13, 2014 | root | parent | next [–] Did you also post this reply using curl? Morgawr on March 13, 2014 | prev | next [–] Really nice, it&#x27;s so weird that format strings support %n, it&#x27;s such a massive security vulnerability that I don&#x27;t really know what was going on in the mind of the guy that decided to implement this. But alas, it&#x27;s always fun to see. Here&#x27;s an excellent article on format string vulnerabilities, an amazing read: http:&#x2F;&#x2F;crypto.stanford.edu&#x2F;cs155&#x2F;papers&#x2F;formatstring-1.2.pdf userbinator on March 13, 2014 | parent | next [–] It&#x27;s only a vulnerability if the user can control the format string. Otherwise it&#x27;s a useful way of getting the lengths of things; but ironically it&#x27;s not paying attention to lengths that also causes buffer overflow vulnerabilities... psionski on March 13, 2014 | parent | prev | next [–] C was designed way before security was a concern. If somebody exploited your program, you could just slap them because they&#x27;d be sitting at a terminal in the same room with you - no need for fancy ASLR or controlling how many characters you write to a buffer when physical violence was a viable option :) pjmlp on March 13, 2014 | root | parent | next [–] Except security was already a concern in other operating systems that had Lisp, Cedar, Modula-2, Algol as system languages among others. C designers just decided to ignored it. kjs3 on March 13, 2014 | root | parent | prev | next [–] This isn&#x27;t even remotely true. Computer security was a concern and an area of study long before C&#x2F;Unix showed up. Unix (and by extension C) descended directly from the Multics project, which from its start in 1964 made security a central priority. Kernighan and Ritche were important members of the Multics project. Further, the idea that everyone who used the computers of that era were &quot;in the same room&quot; is also patently absurd. psionski on March 14, 2014 | root | parent | next [–] I like my fantasy about how things were back then better, thankyouverymuch. At least this way I can believe they didn&#x27;t unleash the flood of pwnage on the world while knowing better. kang on March 13, 2014 | prev | next [–] I wish for a forum&#x2F;site with links only like these! Pure code hacking. kreeben on March 13, 2014 | parent | next [–] Seems to be available: purecodehacking.com. Do it! DateK on March 13, 2014 | prev [–] maintenance nightmare tonyarkles on March 13, 2014 | parent | next [–] Understatement of the year! chii on March 13, 2014 | parent | prev [–] it doesn&#x27;t need maintenance - it works as advertised! If a client asks for a change, write a new program! Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact Search:
2026-01-13T08:49:46
https://dev.to/rajatarora
Rajat Arora - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Follow User actions Rajat Arora 404 bio not found Joined Joined on  Aug 9, 2018 github website 2 Week Community Wellness Streak Keep the community conversation going! Post at least 2 comments for 2 straight weeks and unlock the 4 Week Badge. Got it Close 1 Week Community Wellness Streak For actively engaging with the community by posting at least 2 comments in a single week. Got it Close Writing Debut Awarded for writing and sharing your first DEV post! Continue sharing your work to earn the 4 Week Writing Streak Badge. Got it Close Seven Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least seven years. Got it Close Six Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least six years. Got it Close Five Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least five years. Got it Close Four Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least four years. Got it Close Three Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least three years. Got it Close Two Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least two years. Got it Close One Year Club This badge celebrates the longevity of those who have been a registered member of the DEV Community for at least one year. Got it Close More info about @rajatarora Post 6 posts published Comment 7 comments written Tag 1 tag followed Breaking the interface barrier: CGLIB and ByteBuddy Rajat Arora Rajat Arora Rajat Arora Follow Jan 9 Breaking the interface barrier: CGLIB and ByteBuddy # java # programming # learning # backend 2  reactions Comments Add Comment 9 min read Want to connect with Rajat Arora? Create an account to connect with Rajat Arora. You can also sign in below to proceed if you already have an account. Create Account Already have an account? Sign in Proxies the Native Way: JDK Dynamic Proxies Rajat Arora Rajat Arora Rajat Arora Follow Jan 5 Proxies the Native Way: JDK Dynamic Proxies # java # programming # backend # beginners 1  reaction Comments 1  comment 6 min read Magic in the Wild: How Java Giants like Spring, Hibernate, and Mockito use Dynamic Proxies Rajat Arora Rajat Arora Rajat Arora Follow Jan 1 Magic in the Wild: How Java Giants like Spring, Hibernate, and Mockito use Dynamic Proxies # java # spring # hibernate # mockito 1  reaction Comments Add Comment 6 min read Understanding Proxy Patterns: The Why and How of Static and Dynamic Proxies in Java Rajat Arora Rajat Arora Rajat Arora Follow Dec 29 &#39;25 Understanding Proxy Patterns: The Why and How of Static and Dynamic Proxies in Java # java # programming # designpatterns 1  reaction Comments Add Comment 6 min read The Proxy Paradox: Why Spring @Transactional Vanishes Rajat Arora Rajat Arora Rajat Arora Follow Dec 24 &#39;25 The Proxy Paradox: Why Spring @Transactional Vanishes # java # spring # programming # beginners 2  reactions Comments Add Comment 4 min read The Dependency Injection Dilemma: Why I’m Finally Ghosting @Autowired on Fields Rajat Arora Rajat Arora Rajat Arora Follow Dec 19 &#39;25 The Dependency Injection Dilemma: Why I’m Finally Ghosting @Autowired on Fields # java # spring # programming # beginners 3  reactions Comments 2  comments 5 min read loading... 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:46
https://pt-br.facebook.com/login/?next=https%3A%2F%2Fwww.facebook.com%2Fshare_channel%2F%3Ftype%3Dreshare%26link%3Dhttps%253A%252F%252Fdev.to%252Fjwebsite-go%252Freadiness-probe-3co0%26app_id%3D966242223397117%26source_surface%3Dexternal_reshare%26display%26hashtag
Entrar no Facebook Notice Você deve se conectar para continuar. Entrar no Facebook Você deve se conectar para continuar. Entrar Esqueceu a conta? · Cadastre-se no Facebook Português (Brasil) 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Français (France) Deutsch Cadastre-se Entrar Messenger Facebook Lite Vídeo Meta Pay Meta Store Meta Quest Ray-Ban Meta Meta AI Mais conteúdo da Meta AI Instagram Threads Central de Informações de Votação Política de Privacidade Central de Privacidade Sobre Criar anúncio Criar Página Desenvolvedores Carreiras Cookies Escolhas para anúncios Termos Ajuda Upload de contatos e não usuários Configurações Registro de atividades Meta © 2026
2026-01-13T08:49:46
http://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/
Implementing a web server in a single printf() call &#8211; Tinyhack.com --> Skip to content Tinyhack.com A hacker does for love what others would not do for money. Implementing a web server in a single printf() call A guy just forwarded a joke that most of us will already know Jeff Dean Facts (also here and here ). Everytime I read that list, this part stands out: Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search. It is really possible to implement a web server using a single printf call, but I haven&#8217;t found anyone doing it. So this time after reading the list, I decided to implement it. So here is the code, a pure single printf call, without any extra variables or macros (don&#8217;t worry, I will explain how to this code works) #include &lt;stdio.h&gt; int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot;, ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 + 2, (((unsigned long int)0x4005c8 + 12) &amp; 0xffff)- ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 ); } This code only works on a Linux AMD64 bit system, with a particular compiler (gcc version 4.8.2 (Debian 4.8.2-16) ) And to compile it: gcc -g web1.c -O webserver As some of you may have guessed: I cheated by using a special format string . That code may not run on your machine because I have hardcoded two addresses. The following version is a little bit more user friendly (easier to change), but you are still going to need to change 2 values: FUNCTION_ADDR and DESTADDR which I will explain later: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) #define DESTADDR 0x00000000006007D8 #define a (FUNCTION_ADDR &amp; 0xffff) #define b ((FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff) int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot; , b, 0, DESTADDR + 2, a-b, 0, DESTADDR ); } I will explain how the code works through a series of short C codes. The first one is a code that will explain how that we can start another code without function call. See this simple code: #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #define ADDR 0x00000000600720 void hello() { printf(&quot;hello world\n&quot;); } int main(int argc, char *argv&#x5B;]) { (*((unsigned long int*)ADDR))= (unsigned long int)hello; } You can compile it, but it many not run on your system. You need to do these steps: 1. Compile the code: gcc run-finalizer.c -o run-finalizer 2. Examine the address of fini_array objdump -h -j .fini_array run-finalizer And find the VMA of it: run-finalizer: file format elf64-x86-64 Sections: Idx Name Size VMA LMA File off Algn 18 .fini_array 00000008 0000000000600720 0000000000600720 00000720 2**3 CONTENTS, ALLOC, LOAD, DATA Note that you need a recent GCC to do this, older version of gcc uses different mechanism of storing finalizers. 3. Change the value of ADDR on the code to the correct address 4. Compile the code again 5. Run it and now you will see &#8220;hello world&#8221; printed to your screen. How does this work exactly?: According to Chapter 11 of Linux Standard Base Core Specification 3.1 .fini_array This section holds an array of function pointers that contributes to a single termination array for the executable or shared object containing the section. We are overwriting the array so that our hello function is called instead of the default handler. If you are trying to compile the webserver code, the value of ADDR is obtained the same way (using objdump). Ok, now we know how to execute a function by overriding a certain address, we need to know how we can overwrite an address using printf . You can find many tutorials on how to exploit format string bugs, but I will try give a short explanation. The printf function has this feature that enables us to know how many characters has been printed using the &#8220;%n&#8221; format: #include &lt;stdio.h&gt; int main(){ int count; printf(&quot;AB%n&quot;, &amp;count); printf(&quot;\n%d characters printed\n&quot;, count); } You will see that the output is: AB 2 characters printed Of course we can put any address to the count pointer to overwrite that address. But to overide an address with a large value we need to print a large amount of text. Fortunately there is another format string &#8220;%hn&#8221; that works on short instead of int. We can overwrite the value 2 bytes at a time to form the 4 byte value that we want. Lets try to use two printf calls to put a¡ value that we want (in this case the pointer to function &#8220;hello&#8221;) to the fini_array: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)hello) #define DESTADDR 0x0000000000600948 void hello() { printf(&quot;\n\n\n\nhello world\n\n&quot;); } int main(int argc, char *argv&#x5B;]) { short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;a = %04x b = %04x\n&quot;, a, b) uint64_t *p = (uint64_t*)DESTADDR; printf(&quot;before: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;after1: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); printf(&quot;after2: %08lx\n&quot;, *p); return 0; } The important lines are: short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); The a and b are just halves of the function address, we can construct a string of length a and b to be given to printf, but I chose to use the &#8220;%*&#8221; formatting which will control the length of the output through parameter. For example, this code: printf("%*c", 10, 'A'); Will print 9 spaces followed by A, so in total, 10 characters will be printed. If we want to use just one printf, we need to take account that b bytes have been printed, and we need to print another b-a bytes (the counter is accumulative). printf("%*c%hn%*c%hn", b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); Currently we are using the &#8220;hello&#8221; function to call, but we can call any function (or any address). I have written a shellcode that acts as a web server that just prints &#8220;Hello world&#8221;. This is the shell code that I made: unsigned char hello&#x5B;] = "\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32" "\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d" "\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74" "\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65" "\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f" "\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89" "\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f" "\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff" "\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49" "\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31" "\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c" "\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2" "\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f" "\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee" "\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff" "\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05" "\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3"; If we remove the function hello and insert that shell code, that code will be called. That code is just a string, so we can append it to the &#8220;%*c%hn%*c%hn&#8221; format string. This string is unnamed, so we will need to find the address after we compile it. To obtain the address, we need to compile the code, then disassemble it: objdump -d webserver 00000000004004fd &lt;main&gt;: 4004fd: 55 push %rbp 4004fe: 48 89 e5 mov %rsp,%rbp 400501: 48 83 ec 20 sub $0x20,%rsp 400505: 89 7d fc mov %edi,-0x4(%rbp) 400508: 48 89 75 f0 mov %rsi,-0x10(%rbp) 40050c: c7 04 24 d8 07 60 00 movl $0x6007d8,(%rsp) 400513: 41 b9 00 00 00 00 mov $0x0,%r9d 400519: 41 b8 94 05 00 00 mov $0x594,%r8d 40051f: b9 da 07 60 00 mov $0x6007da,%ecx 400524: ba 00 00 00 00 mov $0x0,%edx 400529: be 40 00 00 00 mov $0x40,%esi 40052e: bf c8 05 40 00 mov $0x4005c8,%edi 400533: b8 00 00 00 00 mov $0x0,%eax 400538: e8 a3 fe ff ff callq 4003e0 &lt;printf@plt&gt; 40053d: c9 leaveq 40053e: c3 retq 40053f: 90 nop We only need to care about this line: mov $0x4005c8,%edi That is the address that we need in: #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) The +12 is needed because our shell code starts after the string &#8220;%*c%hn%*c%hn&#8221; which is 12 characters long. If you are curious about the shell code, it was created from the following C code. #include&lt;stdio.h&gt; #include&lt;string.h&gt; #include&lt;stdlib.h&gt; #include&lt;unistd.h&gt; #include&lt;sys/types.h&gt; #include&lt;sys/stat.h&gt; #include&lt;sys/socket.h&gt; #include&lt;arpa/inet.h&gt; #include&lt;netdb.h&gt; #include&lt;signal.h&gt; #include&lt;fcntl.h&gt; int main(int argc, char *argv&#x5B;]) { int sockfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in serv_addr; bzero((char *)&amp;serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(8080); bind(sockfd, (struct sockaddr *)&amp;serv_addr, sizeof(serv_addr)); listen(sockfd, 5); while (1) { int cfd = accept(sockfd, 0, 0); char *s = &quot;HTTP/1.0 200\r\nContent-type:text/html\r\n\r\n&lt;h1&gt;Hello world!&lt;/h1&gt;&quot;; if (fork()==0) { write(cfd, s, strlen(s)); shutdown(cfd, SHUT_RDWR); close(cfd); } } return 0; } I have done an extra effort (although it is not really necessary in this case) to remove all NUL character from the shell code (since I couldn&#8217;t find one for X86-64 in the Shellcodes database ). Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search . It is left as an exercise for the reader to scale the web server to able to handle Google search load. Source codes for this post is available at https://github.com/yohanes/printf-webserver For people who thinks that this is useless: yes it is useless. I just happen to like this challenge, and it has refreshed my memory and knowledge for the following topics: shell code writing (haven&#8217;t done this in years), AMD64 assembly (calling convention, preserved registers, etc), syscalls, objdump, fini_array (last time I checked, gcc still used .dtors), printf format exploiting, gdb tricks (like writing memory block to file), and low level socket code (I have been using boost&#8217;s for the past few years). Update : Ubuntu adds a security feature that provides a read-only relocation table area in the final ELF. To be able to run the examples in ubuntu, add this in the command line when compiling -Wl,-z,norelro e.g: gcc -Wl,-z,norelro test.c Author admin Posted on March 12, 2014 April 28, 2017 Categories hacks 18 thoughts on &ldquo;Implementing a web server in a single printf() call&rdquo; dodi says: March 12, 2014 at 2:04 pm eh buset, serius nih lu ? 🙂 Reply priyo says: March 13, 2014 at 5:07 am scroll up&#8230; scroll down&#8230; scroll up&#8230; scroll down&#8230; 100x *gagal paham* Reply terminalcommand says: March 13, 2014 at 5:19 am Thank you! Very interesting article. I also didn&#8217;t know about the one line webserver at google. Although this is a hard topic, you&#8217;ve made a great work simplifying it. Reply Basun says: March 13, 2014 at 10:02 am The one line webserver bit is a joke about Jeff Dean, who works at Google. Its not real. 🙂 Reply Cees Timmerman says: April 20, 2016 at 4:12 pm There are real webserver oneliners: https://gist.github.com/willurd/5720255 Reply anonim says: March 13, 2014 at 5:29 am Diskusinya di https://news.ycombinator.com/item?id=7389623 Reply Neil says: March 13, 2014 at 12:38 pm Shouldn&#8217;t there be an exit() somewhere in the fork==0 branch? Otherwise every time there is a request the new child process will become a server too and start accepting requests, right? I think the parent leaks its copy of the file descriptor too. Maybe the fork is a bit redundant. I don&#8217;t think the write or close will block with such a small amount of data. Cool post though! I&#8217;m not really sure why I&#8217;m nitpicking in the shell code. Sorry. Reply admin says: March 14, 2014 at 1:58 am Ah yes, there is an exit from the loop on the assembly code (myhttp.s) but it got removed from http.c when I removed the comment and debug code. And you are also right about the fork, it is unnecessary in this case. At first I was going to write the HTTP headers and then exec some external command. I changed my mind and didn&#8217;t bother deleting the fork call. Reply Kyle Ross says: March 13, 2014 at 11:02 pm This is really interesting, but I&#8217;m having trouble following whats actually happening. Could you explain how you reduced that C code with includes and methods into a string containing hex codes and how that is turned back into some sort of executable code? Thanks Reply admin says: March 14, 2014 at 2:01 am I think it is beyond the scope of this article to explain about shell code writing. There are many books and tutorials that you can read (just search for &#8220;buffer overflow&#8221; or &#8220;shell code writing&#8221;). Reply TTK Ciar says: March 14, 2014 at 1:05 am Alternatively: $ perl -Mojo -E &#8216;a({inline =&gt; &#8220;%= `uptime`&#8221;})-&gt;start&#8217; daemon &amp; Server available at http://127.0.0.1:3000 . $ lynx -dump -nolist http://127.0.0.1:3000/ 17:57:56 up 66 days, 6:45, 108 users, load average: 0.10, 0.12, 0.07 though, perl by definition is cheating. Reply Evan Danaher says: March 14, 2014 at 2:54 pm I&#8217;m not sure why you used finalizers instead of just changing the return address on the stack; this may be the first time I&#8217;ve ever said this, but stack smashing is much more portable. I&#8217;ve made a variant that I&#8217;d expect to work on any gcc 4.4-4.7 on x86_64 Linux, and have some ideas which, if they work out, may make it actually &#8220;portable&#8221; to any x86/x86_64 Unix running a reasonable compiler. https://github.com/edanaher/printf-webserver Reply admin says: March 17, 2014 at 3:02 pm Yes using the stack is also possible, but on most modern system, GCC is compiled with stack protection turned on (and needs to be disabled using -fno-stack-protector). Reply Pingback: Implementing a web server in a single printf() call &laquo; adafruit industries blog Itzik Kotler says: March 15, 2014 at 4:35 pm Pretty neat. I did something similar (all though simpler) back in the days. See: http://www.exploit-db.com/papers/13233/ Reply Pingback: Saving the world, one cpu cycle at a time | Dav&#039;s bit o the web programath says: April 22, 2014 at 1:18 pm printf(&#8220;%*c%hn%*c%hn&#8221;, b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; i think the fourth parameter should be &#8216;a-b&#8217;, not &#8216;b-a&#8217;, because a == b + (a &#8211; b) Reply Pingback: New top story on Hacker News: Implementing a web server in a single printf call (2014) &#8211; Latest news Leave a Reply Cancel reply Your email address will not be published. Required fields are marked * Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. &#916; Post navigation Previous Previous post: Raspberry Pi for Out of Band Linux PC management Next Next post: Exploiting the Futex Bug and uncovering Towelroot Pages About Archive Search for: Search Follow x.com/yohanes Mastodon Recent Posts CVE-2025-31931 Arbitrary Shared Library Loading in Intel ITT API on Android (affects OpenCV &lt;= 4.10) Decrypting Encrypted files from Akira Ransomware (Linux/ESXI variant 2024) using a bunch of GPUs Patching .so files of an installed Android App Extracting WhatsApp Database (or any app data) from Android 12/13 using CVE-2024-0044 Zygisk-based reFlutter Recent Comments Eitan Porat on About admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 Archives November 2025 March 2025 November 2024 June 2024 April 2024 January 2024 December 2023 September 2022 March 2021 January 2021 May 2019 January 2019 November 2018 July 2018 May 2018 February 2018 October 2017 September 2017 March 2017 November 2016 November 2015 July 2014 March 2014 February 2014 June 2013 January 2013 November 2011 March 2011 February 2011 July 2010 April 2010 January 2010 December 2009 September 2009 August 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 March 2008 February 2008 October 2007 June 2007 February 2007 January 2007 December 2006 Categories agestar android blog ctf debian flareon flex freebsd google hacks hardware hostmonster linux mac os x misc mobile opensource phone raspberry reverse-engineering sdr security Uncategorized wii writeup Meta Log in Entries feed Comments feed WordPress.org Tinyhack.com Proudly powered by WordPress
2026-01-13T08:49:46
https://dev.to/alexanderhodes/xcode-cloud-build-fails-due-command-exited-with-non-zero-exit-code-70-6aj#main-content
XCode Cloud Build fails due Command exited with non-zero exit-code: 70 - DEV Community Forem Feed Follow new Subforems to improve your feed DEV Community Follow A space to discuss and keep up software development and manage your software career Future Follow News and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more. Open Forem Follow A general discussion space for the Forem community. If it doesn&#39;t have a home elsewhere, it belongs here Gamers Forem Follow An inclusive community for gaming enthusiasts Music Forem Follow From composing and gigging to gear, hot music takes, and everything in between. Vibe Coding Forem Follow Discussing AI software development, and showing off what we&#39;re building. Popcorn Movies and TV Follow Movie and TV enthusiasm, criticism and everything in-between. DUMB DEV Community Follow Memes and software development shitposting Design Community Follow Web design, graphic design and everything in-between Security Forem Follow Your central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike Golf Forem Follow A community of golfers and golfing enthusiasts Crypto Forem Follow A collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis. Parenting Follow A place for parents to the share the joys, challenges, and wisdom that come from raising kids. We&#39;re here for them and for each other. Forem Core Follow Discussing the core forem open source software project — features, bugs, performance, self-hosting. Maker Forem Follow A community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more. HMPL.js Forem Follow For developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating Dropdown menu Dropdown menu Skip to content Navigation menu Search Powered by Algolia Search Log in Create account DEV Community Close Add reaction Like Unicorn Exploding Head Raised Hands Fire Jump to Comments Save Boost More... Copy link Copy link Copied to Clipboard Share to X Share to LinkedIn Share to Facebook Share to Mastodon Share Post via... Report Abuse Alexander Hodes Posted on Jan 12 XCode Cloud Build fails due Command exited with non-zero exit-code: 70 # appdev # ios # cicd Back from vacation and some days after the new year started our build pipeline for the iOS app in Xcode Cloud fails. The xcodebuild command still succedded but the signing of the app for ad-hoc and app-store distribution failed with Command exited with non-zero exit-code: 70 That's a snippet from the log. Run command: 'xcodebuild -exportArchive -archivePath /Volumes/workspace/tmp/3dbe9cdf-8b26-4d08-98fc-ec820978e845.xcarchive -exportPath /Volumes/workspace/adhocexport -exportOptionsPlist /Volumes/workspace/ci/ad-hoc-exportoptions.plist '-DVTPortalRequest.Endpoint=http://172.16.47.196:8089' -DVTProvisioningIsManaged=YES -IDEDistributionLogDirectory=/Volumes/workspace/tmp/ad-hoc-export-archive-logs -DVTSkipCertificateValidityCheck=YES -DVTServicesLogLevel=3' Error Command exited with non-zero exit-code: 70 Enter fullscreen mode Exit fullscreen mode Some background why we use Xcode cloud. At the beginning of last year, we've migrated from Azure Devops to Xcode Cloud because the build of the iOS version of our React Native app took about one hour. For internal testing we push the distribute the app by Firebase App Distribution . The migration was pretty easy using some additional steps in the iOS build process with the custom build scripts . With using XCode cloud the build time decreased by more than 50%. Investigating it further During the vacation days nothing has changed. Our workflow was still the same and there weren't any code changes which could lead to the problem. Therefore the only reason could be expired certificates or provisioning profiles. Unfortunately, there were no certificates expired or revoked. One important artifact of every build in XCode cloud is the Log file which contains the logs of the xcodebuild and signing steps. After comparing the logs for signing from the failed with the last successful one something weird was visible. The request for requesting the DVTServices: Response payload didn't contain any certificates. 2026-01-12T12:23:16.992744779Z 2025-12-23 06:56:24.555 xcodebuild[26013:105669] DVTServices: Response payload: { 2026-01-12T12:23:16.992747015Z "data" : [] 2026-01-12T12:23:16.992808870Z "links" : { 2026-01-12T12:23:16.992811619Z "self" : "https://developer-ci.corp.apple.com:443/services/v1/certificates?filter%5BcertificateType%5D=DISTRIBUTION_MANAGED&amp;limit=200" 2026-01-12T12:23:16.992814240Z }, 2026-01-12T12:23:16.992816002Z "meta" : { 2026-01-12T12:23:16.992817707Z "paging" : { 2026-01-12T12:23:16.992819465Z "total" : 1, 2026-01-12T12:23:16.992821323Z "limit" : 200 2026-01-12T12:23:16.992823022Z } 2026-01-12T12:23:16.992824692Z } 2026-01-12T12:23:16.992826793Z } Enter fullscreen mode Exit fullscreen mode In the last successful run, there was one included. 2025-12-23T14:56:24.992744779Z 2025-12-23 06:56:24.555 xcodebuild[26013:105669] DVTServices: Response payload: { 2025-12-23T14:56:24.992747015Z "data" : [ { 2025-12-23T14:56:24.992749303Z "type" : "certificates", 2025-12-23T14:56:24.992751380Z "id" : "id", 2025-12-23T14:56:24.992753249Z "attributes" : { 2025-12-23T14:56:24.992755418Z "serialNumber" : "abc", 2025-12-23T14:56:24.992773108Z "certificateContent" : "", 2025-12-23T14:56:24.992784914Z "displayName" : "Company Name", 2025-12-23T14:56:24.992787108Z "name" : "Apple Distribution: Company Name", 2025-12-23T14:56:24.992789263Z "platform" : null, 2025-12-23T14:56:24.992791524Z "responseId" : "136ed97e-949c-428b-b0a3-c5513e2cfacc", 2025-12-23T14:56:24.992793996Z "expirationDate" : "2026-04-07T08:06:15.000+00:00", 2025-12-23T14:56:24.992796344Z "certificateType" : "DISTRIBUTION_MANAGED" 2025-12-23T14:56:24.992798263Z }, 2025-12-23T14:56:24.992800337Z "links" : { 2025-12-23T14:56:24.992802983Z "self" : "https://developer-ci.corp.apple.com:443/services/v1/certificates/abc" 2025-12-23T14:56:24.992805363Z } 2025-12-23T14:56:24.992807115Z } ], 2025-12-23T14:56:24.992808870Z "links" : { 2025-12-23T14:56:24.992811619Z "self" : "https://developer-ci.corp.apple.com:443/services/v1/certificates?filter%5BcertificateType%5D=DISTRIBUTION_MANAGED&amp;limit=200" 2025-12-23T14:56:24.992814240Z }, 2025-12-23T14:56:24.992816002Z "meta" : { 2025-12-23T14:56:24.992817707Z "paging" : { 2025-12-23T14:56:24.992819465Z "total" : 1, 2025-12-23T14:56:24.992821323Z "limit" : 200 2025-12-23T14:56:24.992823022Z } 2025-12-23T14:56:24.992824692Z } 2025-12-23T14:56:24.992826793Z } Enter fullscreen mode Exit fullscreen mode Solving the signing issue Solving this issue is much simpler than expected. In the Apple Developer Portal you need to open the Certificates, Identifiers &amp; Profiles section. There some certificates created by Xcode Cloud will appear. These certificates are created automatically by Xcode Cloud when starting a workflow. You just need to revoke those certificates by clicking on revoke in the detail view of the certificate. After the deletion of these certificates, you can trigger your workflows again. The signing for ad-hoc and app-store distribution should work and new certificates should be generated. The reason for this issue might be that Apple internally generates some private keys which will expire or will be deleted due to the end of the year. Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct &bull; Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink . Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Alexander Hodes Follow Location Fulda, Germany Work Fullstack Developer Joined Jan 24, 2021 Trending on DEV Community Hot How to Crack Any Software Developer Interview in 2026 (Updated for AI &amp; Modern Hiring) # softwareengineering # programming # career # interview What was your win this week??? # weeklyretro # discuss I Didn’t “Become” a Senior Developer. I Accumulated Damage. # programming # ai # career # discuss 💎 DEV Diamond Sponsors Thank you to our Diamond Sponsors for supporting the DEV Community Google AI is the official AI Model and Platform Partner of DEV Neon is the official database partner of DEV Algolia is the official search partner of DEV DEV Community — A space to discuss and keep up software development and manage your software career Home DEV++ Podcasts Videos DEV Education Tracks DEV Challenges DEV Help Advertise on DEV DEV Showcase About Contact Free Postgres Database Software comparisons Forem Shop Code of Conduct Privacy Policy Terms of Use Built on Forem — the open source software that powers DEV and other inclusive communities. Made with love and Ruby on Rails . DEV Community &copy; 2016 - 2026. We&#39;re a place where coders share, stay up-to-date and grow their careers. Log in Create account
2026-01-13T08:49:46
https://docs.suprsend.com/docs/user-preferences#hosted-preference-page
User Preferences - SuprSend, Notification infrastructure for Product teams Skip to main content SuprSend, Notification infrastructure for Product teams home page Search... ⌘ K Community Trust Center Platform Status Postman Collection GETTING STARTED What is SuprSend? Quick Start Guide Best Practices Plan Your Integration Go-live checklist CORE CONCEPTS Templates Users Events Workflow Notification Categories Preferences User Preferences Tenant Preferences Preference Evaluation Tenants Lists Broadcast Objects Translations DLT Guidelines Whatsapp Template Guidelines WORKFLOW BUILDER Design Workflow Node List Workflow Settings Trigger Workflow Validate Trigger Payload Tenant Workflows Notification Inbox Overview Multi Tabs React Javascript (Angular, Vuejs etc) React Native Flutter (Headless) PREFERENCE CENTRE Embedded Preference Centre Javascript Angular React VENDOR INTEGRATION GUIDE Overview Email Integrations SMS Integrations Android Push Whatsapp Integrations iOS Push Chat Integrations Vendor Fallback Tenant Vendor INTEGRATIONS Webhook Connectors MONITORING &amp; DEBUGGING Logs Audit Logs Error Guides MANAGE YOUR ACCOUNT Authentication Methods Contact Us Get Started SuprSend, Notification infrastructure for Product teams home page Search... ⌘ K Ask AI Contact Us Get Started Get Started Search... Navigation Preferences User Preferences Documentation API Reference Management API CLI Reference Developer Resources Changelog Documentation API Reference Management API CLI Reference Developer Resources Changelog Preferences User Preferences OpenAI Open in ChatGPT Learn how user preferences work in SuprSend and how to capture them. OpenAI Open in ChatGPT Before you start: Make sure you’ve set up notification categories first. See Manage Categories and Preferences for step-by-step instructions. Preferences let users control which notifications they receive. Instead of an all-or-nothing approach, users can opt out of specific categories, choose preferred channels, and set notification frequency. This granular control reduces the chance that users disable all notifications from your platform. In SuprSend, you can use ready-made UI and APIs to manage multi-tenant preference use cases. This includes letting admins set preferences for internal teams and handle notifications for enterprise customers, where companies, customers, and end users have distinct preferences. How It Works Preferences are evaluated in priority order: User Preference → Tenant Default → Category Default Three Levels of Control Global channel opt-outs, category preferences, and channel opt-outs within categories ​ What are user preferences? Preferences only work with sub-categories: User preferences apply to sub-categories you create, not root-categories (System, Transactional, Promotional). Use sub-category slugs in workflows for preferences to work. Each user has a preference set that controls which notifications they receive. A preference set has three levels of control: channel_preferences — Global channel opt-outs (e.g., opt out of all email) categories — Category-level preferences (opt in/out of all channels of a notification type) opt_out_channels — Opt-in/out of specific channels within a category Example: Copy Ask AI { &quot;channel_preferences&quot; : [ { &quot;channel&quot; : &quot;email&quot; , &quot;is_restricted&quot; : true } ], &quot;categories&quot; : [ { &quot;category&quot; : &quot;invoice-ready&quot; , &quot;preference&quot; : &quot;opt_out&quot; }, { &quot;category&quot; : &quot;payment-reminder&quot; , &quot;preference&quot; : &quot;opt_in&quot; , &quot;opt_out_channels&quot; : [ &quot;slack&quot; ] } ] } In this example: user opted out of email globally, opted out of invoice-ready category completely, and stays opted in to payment-reminder but without Slack. ​ How preferences are determined When a user hasn’t set their own preferences in a category, SuprSend uses defaults in this order: User Preference — Individual user’s explicit choices (highest priority) Tenant Default Preference — Default preferences set by tenant for the category Category Default Preference — Default preferences set at the category level (lowest priority) Preference precedence: User Preference → Tenant Default Preference → Category Default Preference Preference precedence is determined at category level . So, if a user overrides preference for a category but doesn’t touch other categories, defaults continue to apply to the untouched categories. ​ Setting up preference categories Before users can set their preferences, you must first create and configure preference categories. For step-by-step setup instructions, see Manage Categories and Preferences . ​ Default preferences Default preferences determine how users receive notifications when they haven’t set their own preferences. Configure these at the sub-category level when setting up categories. ​ What default preferences control Default preferences control: Channel or Category defaults : Which categories or channels will be turned on/off by default on users’ preference page. Mandatory channels : Which channel or category users cannot opt out of (shown as disabled on preference page) Visibility : Whether a category appears on the preference page ​ Preference types On — Users receive this category&#x27;s notifications by default Users will receive notifications in this category by default. You can configure Opt-in Channels to specify which channels are included in the default “On” state: All : All available channels are enabled by default Selected Channels only : Only specific channels you select are enabled by default (e.g., Email, Android Push, iOS Push, In-App Inbox, MS Teams, Slack) Off — Users must opt in to get notifications Users will not receive notifications unless they change the preference. Can&#x27;t Unsubscribe — Users cannot opt out of mandatory channels in this category Prevents users from fully opting out of the category. When selected, you can configure: Mandatory Channels : Channels which can’t be opted out of by the user. Set to “All” or “Selected Channels”. Opt-in Channels : In case of “Selected” Mandatory Channels, you can configure the channels that will be opted in by default. Channels other than mandatory and opt-in will be skipped for sending notification unless user explicitly opts in to them. Even when a category is set to “Can’t Unsubscribe,” users can still control channel-level preferences if your channel-level settings allow it. This configuration gives you fine-grained control over which channels a user is opted into by default, letting you differentiate between must-deliver channels, default-on channels, and optional channels. ​ Capturing user preferences Users can set their preferences through one of the following methods: ​ Hosted preference page Once you publish preference categories, SuprSend automatically generates a dedicated unsubscription webpage for collecting user preferences . Users can set channel-specific preferences from the hosted page. If the link is included in an email, the hosted page will show and save email preferences. Include it in your templates using {{$hosted_preference_url}} . This page is currently hosted on a SuprSend domain, but you can reach out to [email&#160;protected] if you’d prefer it hosted on your own domain. ​ Embed in your product You can embed the preference interface directly inside your product using SuprSend’s ready-made UI components. SDKs exist in the languages below. Update your product preference page link on the tenant page and render it in templates using {{$embedded_preference_url}} . Javascript React Angular Embeddable preference page ​ Controlling what categories to show on UI It’s always a good practice to show only the categories that are relevant to the user. There are two ways to achieve this: ​ Hide categories for tenant users In a multi-tenant setup, tenants or admins can control which categories their users see. Setting visible_to_subscriber: false in tenant preferences hides the category from tenant users’ preference pages. Hidden categories won’t send notifications to those users, even if they previously opted in. ​ Filter categories with tags Use tags to show categories based on user roles, departments, or teams. Filter categories in the preference center using the tags query parameter. 1 Setting Preference tags Tags can be added to sections and sub-categories directly from Developers → Notification Categories in the SuprSend Console. When a tag is assigned at the section level, it automatically applies to all categories under that section—so filtering by a section tag also filters its child categories. 2 Filter Categories with Tags You can filter categories using the tags query parameter in the API. This can be a simple tag match (e.g. tags=tag1 ) or a more advanced filter using logical operators. Supported operators: Operator Operand Datatype Description Example exists boolean Returns categories where any tag is set tags={ &quot;exists&quot;: true } not string Excludes categories that have the specified tag tags={ &quot;not&quot;: &quot;admin&quot; } or array Returns categories that match any of the provided tags tags={ &quot;or&quot;: [&quot;sales&quot;, &quot;marketing&quot;] } and array Returns categories that match all provided tags tags={ &quot;and&quot;: [&quot;sales&quot;, &quot;manager&quot;] } You can combine these operators for nested filtering like tags={ &quot;or&quot;: [{ &quot;and&quot;: [&quot;sales&quot;, &quot;manager&quot;] }, { &quot;and&quot;: [&quot;marketing&quot;, &quot;associate&quot;] }] } . If no tags are provided, the preference center returns all visible categories. For details on how tags work, see Tags . ​ Translating preference categories in user’s locale Upload translation files for your category names and descriptions. See How to manage Category translations for details. Once uploaded, pass a locale parameter (e.g., es , fr , de ) when: Loading the embeddable preference center As a query parameter in the get user preference API . The hosted preference page picks the locale from user’s profile. On hosted preference page, Dynamic content (category names, descriptions) is translated using translation files you upload. Static content (CTA text, labels, buttons, etc.) is translated automatically using SuprSend’s built-in i18n support for commonly used languages. You can see the list of supported languages below. Supported languages Language Code English en Spanish es French fr German de Italian it Portuguese pt Catalan ca Russian ru Dutch nl Polish pl Japanese ja Vietnamese vi Language Code Indonesian id Korean ko Serbian sr Norwegian no Hebrew he Chinese zh Finnish fi Swedish sv Czech cs Lithuanian lt Arabic ar ​ How preferences are evaluated SuprSend evaluates user preferences at send time. For every recipient, the system checks user-level preferences first, then tenant-level overrides, and finally category defaults. For detailed information on the evaluation process, see Preference Evaluation . ​ Other ways to unsubcribe from notifications In addition to the preference center within SuprSend, communication channels provide their own opt-out options, which SuprSend manages internally. Email: Unsubscribe URL header Gmail requires an unsubscribe URL in email headers when sending bulk emails (5,000+ emails/day). Most email providers expect you to add your own unsubscription page or offer a basic all-or-nothing opt-out option. You can add {{$hosted_preference_url}} here to load the SuprSend hosted preference page from the email header. Inbox (In-App): Render preference page inside your Inbox Companies also give users the option to load preference settings inside their in-app Inbox or provide a link to redirect users to the Preference center in their product. Mobile Push: Preference Page in App settings For mobile push notifications, users typically manage their preferences through the app settings. The category you assign in your workflow is also sent as the push “category” (used by Android/iOS to group notifications). If you set preference categories, the system automatically reflects them in the user’s app settings, loading similar preference controls. SMS &amp; Whatsapp: Reply `STOP` Users generally unsubscribe from Short Message Service (SMS) by replying “STOP.” SuprSend automatically marks the SMS channel as inactive in the user’s profile when it receives a STOP reply. For WhatsApp, opt-out behavior depends on the provider; where supported, users can reply STOP and SuprSend will mark the channel inactive. ​ FAQ How do I set up a digest schedule? You can create sub-categories for different digest schedules or set the digest schedule in the user profile and pass a dynamic schedule in the workflow digest node. An option to set the digest schedule directly on your preference page will be available soon. I have a use case where a company has multiple departments/roles, and the admin will set preferences for users in these departments. You can manage this with tenant preferences. In the SuprSend system, each tenant represents an organization, and the administrator sets which categories to send to their internal team using the tenant preference API . What happens to existing user preference view if I change default preference setting? Changing the default preference for a category doesn’t affect users who have already made changes to that category. For categories where users haven’t made any changes, the preferences update according to the new default settings. I have multiple enterprise customers with various product offerings. Customers should only receive notifications for the products they have enabled, and the same should be visible on their preference page. How can I manage this in SuprSend? You can turn off categories for tenants from the tenant page on the SuprSend console. Turning off the preference for a category automatically removes it from the tenant preference APIs and UI view. To further apply this to the tenant’s users, set visible to subscriber to false in the default tenant preferences to hide the category from the tenant’s end users. Why don&#x27;t I see the &#x27;inbox&#x27; channel in my user preferences? The inbox channel preference is behind a feature flag and needs to be enabled for your account. If you don’t see the inbox channel in your user preferences, contact [email&#160;protected] to have the feature flag enabled for your workspace. Why do users still receive promotional notifications even after unsubscribing from all categories? Unsubscribing from top-level categories (System, Transactional, Promotional) is not supported . Preferences only work with sub-categories you create. If you’re sending notifications using a top-level category like &quot;promotional&quot; in your workflows, users cannot unsubscribe from those notifications through the preference center, even if they unsubscribe from all visible categories. Solution: Create sub-categories under the Promotional category (e.g., “Marketing”, “Newsletter”, “Product Updates”) and use those sub-category slugs in your workflows instead of the top-level category. This allows users to: See and control preferences for each notification type Opt out of specific sub-categories Have their preferences respected when you send notifications Best practice: Organize notifications into meaningful sub-categories rather than using top-level categories directly. This provides users with granular control and improves their experience. Can I use user preferences in workflow branching to control which notifications are sent? User preferences are not passed in the workflow payload, so you cannot directly access them in branch conditions or other workflow nodes. Workaround: If you need to use preference-based logic in workflows (e.g., to route notifications based on user preferences or combine multiple notification scenarios in a single workflow), you can: Store the same preference data as custom properties in the user profile Use those custom properties in branch conditions to route notifications Example use case: If you want to combine multiple notification scenarios (e.g., “New Comment”, “Reply on my comment”, “I am mentioned”) in a single workflow to avoid duplicate notifications, you can: Store user preferences for each scenario as custom properties (e.g., wants_new_comment_notifications: true , wants_mention_notifications: true ) Use branch conditions to check these properties and route notifications accordingly This allows you to have one workflow that handles all scenarios while respecting user preferences Alternative approach: Create separate workflows for each notification scenario with conditions in the Trigger node. Each workflow can use its own preference category, allowing users to control each scenario independently. How do I let users control both notification on/off and the time they want to be reminded (e.g., medicine reminders)? You can combine preference categories with dynamic digest schedules to achieve this: 1. Set up preference categories: Create a preference category (e.g., “medicine-reminders”) that users can opt in/out of using the preference APIs or preference center UI . 2. Store time preference as user property: When users select their preferred reminder time, store it as a custom property in their user profile. For example: Copy Ask AI user.set({ &quot;medicineReminderTime&quot; : { &quot;frequency&quot; : &quot;daily&quot; , &quot;time&quot; : &quot;09:00&quot; , &quot;tz_selection&quot; : &quot;recipient&quot; } }) 3. Use dynamic schedule in digest node: In your workflow’s digest node, configure it to use a dynamic schedule that references the user property (e.g., .&quot;$recipient&quot;.medicineReminderTime ). The digest will only send if the user has opted in to the category, and it will send at their preferred time. Implementation flow: Client side (React Native) : Capture user’s time preference and call your backend API Server side (Supabase Edge Function) : Update both the user’s preference (opt in/out) via SuprSend preference API and store the time preference as a user property Workflow : Use preference category to control on/off, and dynamic schedule to control timing For detailed information, see Dynamic Schedule in the digest documentation. ​ Related documentation Notification Categories - Setting up categories &amp; defaults Manage Categories and Preferences - Complete guide to setting up and managing categories and preferences Tenant Preferences - Managing tenant-level preferences Preference Evaluation - How SuprSend evaluates preferences at runtime Was this page helpful? Yes No Suggest edits Raise issue Previous Tenant Preferences Learn how to manage preferences for your tenants and their users. Next ⌘ I x github linkedin youtube Powered by On this page What are user preferences? How preferences are determined Setting up preference categories Default preferences What default preferences control Preference types Capturing user preferences Hosted preference page Embed in your product Controlling what categories to show on UI Hide categories for tenant users Filter categories with tags Translating preference categories in user’s locale How preferences are evaluated Other ways to unsubcribe from notifications FAQ Related documentation
2026-01-13T08:49:46
https://jsfiddle.net/#upvote
JSFiddle - Code Playground AN Run --> Vote for features --> Embed fiddle on websites/blogs --> Go PRO JSFiddle - Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle. AI Code Completion AI Code Completion is a BYOK implementation. Get your API Key → The model we use is Codestral by Mistral . We won't save your API Key in our database, it's only stored in the browser for your convinience. Your recent fiddles Collections PRO Select collections: New collection Resources CDNJS Type a library name to fetch from CDNJS URL - add directly into the HTML panel as a SCRIPT or LINK Async requests Simulating async requests: JSON /echo/json/ JSONP /echo/jsonp/ HTML /echo/html/ XML /echo/xml/ See docs for more info. Changelog JSFiddle Apps Coder Fonts Color Palette Generator CSS Flexbox Generator Sign in Code panel options Change code languages, preprocessors and plugins HTML JavaScript CSS Language HTML HAML Doctype XHTML 1.0 Strict XHTML 1.0 Transitional HTML 5 HTML 4.01 Strict HTML 4.01 Transitional HTML 4.01 Frameset Body tag Language JavaScript CoffeeScript JavaScript 1.7 Babel + JSX TypeScript CoffeeScript 2 Vue React Preact Extensions Alpine.js 2.1.2 AngularJS 1.1.1 AngularJS 1.2.1 AngularJS 1.4.8 AngularJS 2.0.0-alpha.47 Bonsai 0.4.1 Brick edge CreateJS 2013.09.25 CreateJS 2015.05.21 D3 3.x D3 4.13.0 D3 5.9.2 Dojo (nightly) Dojo 1.4.8 Dojo 1.5.6 Dojo 1.6.5 Dojo 1.7.12 Dojo 1.8.14 Dojo 1.9.11 Dojo 1.10.8 Dojo 1.11.4 Dojo 1.12.2 Ember (latest) Enyo (nightly) Enyo 2.0.1 Enyo 2.1 Enyo 2.2.0 Enyo 2.4.0 Enyo 2.5.1 Enyo 2.7.0 ExtJS 3.1.0 ExtJS 3.4.0 ExtJS 4.1.0 ExtJS 4.1.1 ExtJS 4.2.0 ExtJS 5.0.0 ExtJS 5.1.0 ExtJS 6.2.0 FabricJS 1.5.0 FabricJS 1.7.7 FabricJS 1.7.15 FabricJS 1.7.20 Inferno 1.0.0-beta9 JSBlocks (edge) KineticJS 4.0.5 KineticJS 4.3.1 Knockout.js 2.0.0 Knockout.js 2.1.0 Knockout.js 2.2.1 Knockout.js 2.3.0 Knockout.js 3.0.0 Knockout.js 3.4.2 Lo-Dash 2.2.1 Minified 1.0 beta1 MithrilJS 0.2.0 MithrilJS 1.1.6 Mootools (nightly) Mootools 1.3.2 Mootools 1.3.2 (compat) Mootools 1.4.5 Mootools 1.4.5 (compat) Mootools 1.5.1 Mootools 1.5.2 Mootools 1.5.2 (compat) Mootools 1.6.0 Mootools 1.6.0 (compat) No-Library (pure JS) OpenUI5 (latest, mobile) Paper.js 0.22 Pixi 3.0.11 Pixi 4.0.0 Processing.js 1.2.3 Processing.js 1.3.6 Processing.js 1.4.1 Processing.js 1.4.7 Prototype 1.6.1.0 Prototype 1.7.3 RactiveJS 0.7.3 Raphael 1.4 Raphael 1.5.2 Raphael 2.1.0 React 0.3.2 React 0.4.0 React 0.8.0 React 0.9.0 React 0.14.3 RightJS 2.1.1 RightJS 2.3.1 Riot 3.7.4 Shipyard (nightly) Shipyard 0.2 Thorax 2.0.0rc3 Thorax 2.0.0rc6 Three.js r54 Three.js 105 Underscore 1.3.3 Underscore 1.4.3 Underscore 1.4.4 Underscore 1.8.3 Vue (edge) Vue 1.0.12 Vue 2.2.1 WebApp Install 0.1 XTK edge YUI 2.8.0r4 YUI 3.5.0 YUI 3.6.0 YUI 3.7.3 YUI 3.8.0 YUI 3.10.1 YUI 3.14.0 YUI 3.16.0 YUI 3.17.2 Zepto 1.0rc1 jQuery (edge) jQuery 1.9.1 jQuery 2.1.3 jQuery 2.2.4 jQuery 3.2.1 jQuery 3.3.1 jQuery 3.4.1 jQuery Slim 3.2.1 jQuery Slim 3.3.1 jQuery Slim 3.4.1 jTypes 2.1.0 qooxdoo 2.0.3 qooxdoo 2.1 svg.js 2.6.5 svg.js 2.7.1 svg.js 3.0.5 script attribute Language CSS SCSS SASS PostCSS (Stage 0+) PostCSS (Stage 3+) Tailwind CSS Options --> Reset CSS This fiddle has previously unsaved changes. Apply changes Discard Color Palette Generator Generate a cool color palette with a few clicks CSS Flexbox Generator Generate your CSS Flexbox layout in the simplest of ways Coder Fonts Curated list of quality monospace fonts for coders Share or embed fiddle Customize the embeddable experience for websites Tabs: JavaScript HTML CSS Result Visual: Light Dark Embed snippet Prefer iframe? : ' readonly> No autoresizing to fit the code Render blocking of the parent page Editor settings Customize the behavior and feel of the editor Behavior Auto-run code Only auto-run code that validates Auto-save code Live code validation Hot reload CSS Hot reload HTML General Line numbers Wrap lines Indent With Spaces Code Autocomplete Indent size: 2 spaces 4 spaces Font size: 10px 11px 12px 13px 14px 15px 16px 17px 18px 19px 20px Font family: Console Console in the editor Clear console on run Your recent fiddles Recently created fiddles, including ones created while logged out JSFiddle changelog A log of all the changes made to JSFiddle – big and small. Curated list of monospace coder fonts You can now use different monospace fonts in the editor &minus; we now have a curated list of pretty awesome fonts available including premium ones. Just open the Coder Fonts mini-app from the sidebar or from Editor settings . My current favorites are Input and Commit Mono . CSS Flexbox generator as a JSFiddle app Our CSS Flexbox generator lets you create a layout, and skip knowing the confusing properties and value names (let's be honest the W3C did not make a good job here). Not gonna lie, this was heavily inspired by flexer.dev but coded completely from scratch. Behavior change for External Resources Adding External Resources will no longer create a list of resources in the sidebar but will be injected as a LINK or SCRIPT tag inside of the HTML panel. Code Completion with additional context The Code Completion will now also have the context of all panels before suggesting code to you - so if for example you have some CSS or JS, the HTML panel will suggest code based on the other two panels. 🦄 AI Code Completion (beta) Introducing some AI sprinkle in the editor - Code Completion based on the Codestral model (by Mistral ). For now it's a BYOK implmentation which means you need to provide your own API Key &minus; you can get it for free . Editor switch from CodeMirror to Monaco (same as VSCode) After much deliberation I've decided to make the switch from CodeMirror to Monaco . There's a few reasons for this. CodeMirror 5 is no longer being developed, and the switch to 6 would be a huge rewrite since there's not much compatibility between the two versions. Monaco itself has lots of features already built-in, things that took quite a few external plugins to get into the CodeMirror implementation. I'm incredibly thankful to Marijn for his work on CodeMirror , it has served well for many years. JSFiddle will load faster Technical debt is a drag man. Remember the time when MooTools was state-of-art JS framework? We do and so much of JSFiddle was still dependant on it till this day, but since almost all MooTools features are now available in native JS it was high-time to strip it out of the codebase. This took around a week of work, lots of testing, but it's now done. And the final package of our JS bundle is ~30% smaller . Add a new collection Collect your fiddles in collections Get a Mistral API Key A short guide to getting a free Mistral API Key. Sign up for a Mistral account, and pick the free Experiment subscription plan. Log in, and go to your organization's API Keys section. Click Create new key , fill "JSFiddle" as the name for the API key, and save. Copy the key, and paste it into JSFiddle &minus; under the AI Code Completion in the Sidebar. Done ! AI Code Completion should now be working. Classic Columns Bottom results Right results Tabs (columns) Tabs (rows) System Light Dark Set fiddle expiration 1 day 10 days 1 month 6 months 1 year Keep forever Please Whitelist JSFiddle in your content blocker. Help keep JSFiddle free for always by one of two ways: Whitelist JSFiddle in your content blocker (two clicks) Go PRO and get access to additional PRO features → Ad-free All ads in the editor and listing pages are turned completely off. Use pre-released features You get to try and use features (like the Palette Color Generator) months before everyone else. Fiddle collections Sort and categorize your Fiddles into multiple collections. Private collections and fiddles You can make as many Private Fiddles, and Private Collections as you wish! Console Debug your Fiddle with a minimal built-in JavaScript console. Early AI features Try the AI features we&#39;re rolling out. --> Join the 4+ million users, and keep the JSFiddle dream alive. Ad-free All ads in the editor and listing pages are turned completely off. Use pre-released features You get to try and use features (like the Palette Color Generator) months before everyone else. Fiddle collections Sort and categorize your Fiddles into multiple collections. Private collections and fiddles You can make as many Private Fiddles, and Private Collections as you wish! Console Debug your Fiddle with a minimal built-in JavaScript console. JSFiddle is used by you and 4+ million other developers, in many companies ... ... and top educational institutions: Join as PRO
2026-01-13T08:49:46
https://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/?replytocom=23492#content
Implementing a web server in a single printf() call &#8211; Tinyhack.com --> Skip to content Tinyhack.com A hacker does for love what others would not do for money. Implementing a web server in a single printf() call A guy just forwarded a joke that most of us will already know Jeff Dean Facts (also here and here ). Everytime I read that list, this part stands out: Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search. It is really possible to implement a web server using a single printf call, but I haven&#8217;t found anyone doing it. So this time after reading the list, I decided to implement it. So here is the code, a pure single printf call, without any extra variables or macros (don&#8217;t worry, I will explain how to this code works) #include &lt;stdio.h&gt; int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot;, ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 + 2, (((unsigned long int)0x4005c8 + 12) &amp; 0xffff)- ((((unsigned long int)0x4005c8 + 12) &gt;&gt; 16) &amp; 0xffff), 0, 0x00000000006007D8 ); } This code only works on a Linux AMD64 bit system, with a particular compiler (gcc version 4.8.2 (Debian 4.8.2-16) ) And to compile it: gcc -g web1.c -O webserver As some of you may have guessed: I cheated by using a special format string . That code may not run on your machine because I have hardcoded two addresses. The following version is a little bit more user friendly (easier to change), but you are still going to need to change 2 values: FUNCTION_ADDR and DESTADDR which I will explain later: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) #define DESTADDR 0x00000000006007D8 #define a (FUNCTION_ADDR &amp; 0xffff) #define b ((FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff) int main(int argc, char *argv&#x5B;]) { printf(&quot;%*c%hn%*c%hn&quot; &quot;\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32&quot; &quot;\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d&quot; &quot;\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74&quot; &quot;\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65&quot; &quot;\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f&quot; &quot;\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89&quot; &quot;\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f&quot; &quot;\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff&quot; &quot;\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49&quot; &quot;\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31&quot; &quot;\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c&quot; &quot;\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2&quot; &quot;\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f&quot; &quot;\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee&quot; &quot;\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff&quot; &quot;\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05&quot; &quot;\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3&quot; , b, 0, DESTADDR + 2, a-b, 0, DESTADDR ); } I will explain how the code works through a series of short C codes. The first one is a code that will explain how that we can start another code without function call. See this simple code: #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #define ADDR 0x00000000600720 void hello() { printf(&quot;hello world\n&quot;); } int main(int argc, char *argv&#x5B;]) { (*((unsigned long int*)ADDR))= (unsigned long int)hello; } You can compile it, but it many not run on your system. You need to do these steps: 1. Compile the code: gcc run-finalizer.c -o run-finalizer 2. Examine the address of fini_array objdump -h -j .fini_array run-finalizer And find the VMA of it: run-finalizer: file format elf64-x86-64 Sections: Idx Name Size VMA LMA File off Algn 18 .fini_array 00000008 0000000000600720 0000000000600720 00000720 2**3 CONTENTS, ALLOC, LOAD, DATA Note that you need a recent GCC to do this, older version of gcc uses different mechanism of storing finalizers. 3. Change the value of ADDR on the code to the correct address 4. Compile the code again 5. Run it and now you will see &#8220;hello world&#8221; printed to your screen. How does this work exactly?: According to Chapter 11 of Linux Standard Base Core Specification 3.1 .fini_array This section holds an array of function pointers that contributes to a single termination array for the executable or shared object containing the section. We are overwriting the array so that our hello function is called instead of the default handler. If you are trying to compile the webserver code, the value of ADDR is obtained the same way (using objdump). Ok, now we know how to execute a function by overriding a certain address, we need to know how we can overwrite an address using printf . You can find many tutorials on how to exploit format string bugs, but I will try give a short explanation. The printf function has this feature that enables us to know how many characters has been printed using the &#8220;%n&#8221; format: #include &lt;stdio.h&gt; int main(){ int count; printf(&quot;AB%n&quot;, &amp;count); printf(&quot;\n%d characters printed\n&quot;, count); } You will see that the output is: AB 2 characters printed Of course we can put any address to the count pointer to overwrite that address. But to overide an address with a large value we need to print a large amount of text. Fortunately there is another format string &#8220;%hn&#8221; that works on short instead of int. We can overwrite the value 2 bytes at a time to form the 4 byte value that we want. Lets try to use two printf calls to put a¡ value that we want (in this case the pointer to function &#8220;hello&#8221;) to the fini_array: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdint.h&gt; #define FUNCTION_ADDR ((uint64_t)hello) #define DESTADDR 0x0000000000600948 void hello() { printf(&quot;\n\n\n\nhello world\n\n&quot;); } int main(int argc, char *argv&#x5B;]) { short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;a = %04x b = %04x\n&quot;, a, b) uint64_t *p = (uint64_t*)DESTADDR; printf(&quot;before: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;after1: %08lx\n&quot;, *p); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); printf(&quot;after2: %08lx\n&quot;, *p); return 0; } The important lines are: short a= FUNCTION_ADDR &amp; 0xffff; short b = (FUNCTION_ADDR &gt;&gt; 16) &amp; 0xffff; printf(&quot;%*c%hn&quot;, b, 0, DESTADDR + 2 ); printf(&quot;%*c%hn&quot;, a, 0, DESTADDR); The a and b are just halves of the function address, we can construct a string of length a and b to be given to printf, but I chose to use the &#8220;%*&#8221; formatting which will control the length of the output through parameter. For example, this code: printf("%*c", 10, 'A'); Will print 9 spaces followed by A, so in total, 10 characters will be printed. If we want to use just one printf, we need to take account that b bytes have been printed, and we need to print another b-a bytes (the counter is accumulative). printf("%*c%hn%*c%hn", b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); Currently we are using the &#8220;hello&#8221; function to call, but we can call any function (or any address). I have written a shellcode that acts as a web server that just prints &#8220;Hello world&#8221;. This is the shell code that I made: unsigned char hello&#x5B;] = "\xeb\x3d\x48\x54\x54\x50\x2f\x31\x2e\x30\x20\x32" "\x30\x30\x0d\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d" "\x74\x79\x70\x65\x3a\x74\x65\x78\x74\x2f\x68\x74" "\x6d\x6c\x0d\x0a\x0d\x0a\x3c\x68\x31\x3e\x48\x65" "\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21\x3c\x2f" "\x68\x31\x3e\x4c\x8d\x2d\xbc\xff\xff\xff\x48\x89" "\xe3\x48\x83\xeb\x10\x48\x31\xc0\x50\x66\xb8\x1f" "\x90\xc1\xe0\x10\xb0\x02\x50\x31\xd2\x31\xf6\xff" "\xc6\x89\xf7\xff\xc7\x31\xc0\xb0\x29\x0f\x05\x49" "\x89\xc2\x31\xd2\xb2\x10\x48\x89\xde\x89\xc7\x31" "\xc0\xb0\x31\x0f\x05\x31\xc0\xb0\x05\x89\xc6\x4c" "\x89\xd0\x89\xc7\x31\xc0\xb0\x32\x0f\x05\x31\xd2" "\x31\xf6\x4c\x89\xd0\x89\xc7\x31\xc0\xb0\x2b\x0f" "\x05\x49\x89\xc4\x48\x31\xd2\xb2\x3d\x4c\x89\xee" "\x4c\x89\xe7\x31\xc0\xff\xc0\x0f\x05\x31\xf6\xff" "\xc6\xff\xc6\x4c\x89\xe7\x31\xc0\xb0\x30\x0f\x05" "\x4c\x89\xe7\x31\xc0\xb0\x03\x0f\x05\xeb\xc3"; If we remove the function hello and insert that shell code, that code will be called. That code is just a string, so we can append it to the &#8220;%*c%hn%*c%hn&#8221; format string. This string is unnamed, so we will need to find the address after we compile it. To obtain the address, we need to compile the code, then disassemble it: objdump -d webserver 00000000004004fd &lt;main&gt;: 4004fd: 55 push %rbp 4004fe: 48 89 e5 mov %rsp,%rbp 400501: 48 83 ec 20 sub $0x20,%rsp 400505: 89 7d fc mov %edi,-0x4(%rbp) 400508: 48 89 75 f0 mov %rsi,-0x10(%rbp) 40050c: c7 04 24 d8 07 60 00 movl $0x6007d8,(%rsp) 400513: 41 b9 00 00 00 00 mov $0x0,%r9d 400519: 41 b8 94 05 00 00 mov $0x594,%r8d 40051f: b9 da 07 60 00 mov $0x6007da,%ecx 400524: ba 00 00 00 00 mov $0x0,%edx 400529: be 40 00 00 00 mov $0x40,%esi 40052e: bf c8 05 40 00 mov $0x4005c8,%edi 400533: b8 00 00 00 00 mov $0x0,%eax 400538: e8 a3 fe ff ff callq 4003e0 &lt;printf@plt&gt; 40053d: c9 leaveq 40053e: c3 retq 40053f: 90 nop We only need to care about this line: mov $0x4005c8,%edi That is the address that we need in: #define FUNCTION_ADDR ((uint64_t)0x4005c8 + 12) The +12 is needed because our shell code starts after the string &#8220;%*c%hn%*c%hn&#8221; which is 12 characters long. If you are curious about the shell code, it was created from the following C code. #include&lt;stdio.h&gt; #include&lt;string.h&gt; #include&lt;stdlib.h&gt; #include&lt;unistd.h&gt; #include&lt;sys/types.h&gt; #include&lt;sys/stat.h&gt; #include&lt;sys/socket.h&gt; #include&lt;arpa/inet.h&gt; #include&lt;netdb.h&gt; #include&lt;signal.h&gt; #include&lt;fcntl.h&gt; int main(int argc, char *argv&#x5B;]) { int sockfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in serv_addr; bzero((char *)&amp;serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(8080); bind(sockfd, (struct sockaddr *)&amp;serv_addr, sizeof(serv_addr)); listen(sockfd, 5); while (1) { int cfd = accept(sockfd, 0, 0); char *s = &quot;HTTP/1.0 200\r\nContent-type:text/html\r\n\r\n&lt;h1&gt;Hello world!&lt;/h1&gt;&quot;; if (fork()==0) { write(cfd, s, strlen(s)); shutdown(cfd, SHUT_RDWR); close(cfd); } } return 0; } I have done an extra effort (although it is not really necessary in this case) to remove all NUL character from the shell code (since I couldn&#8217;t find one for X86-64 in the Shellcodes database ). Jeff Dean once implemented a web server in a single printf() call. Other engineers added thousands of lines of explanatory comments but still don&#8217;t understand exactly how it works. Today that program is the front-end to Google Search . It is left as an exercise for the reader to scale the web server to able to handle Google search load. Source codes for this post is available at https://github.com/yohanes/printf-webserver For people who thinks that this is useless: yes it is useless. I just happen to like this challenge, and it has refreshed my memory and knowledge for the following topics: shell code writing (haven&#8217;t done this in years), AMD64 assembly (calling convention, preserved registers, etc), syscalls, objdump, fini_array (last time I checked, gcc still used .dtors), printf format exploiting, gdb tricks (like writing memory block to file), and low level socket code (I have been using boost&#8217;s for the past few years). Update : Ubuntu adds a security feature that provides a read-only relocation table area in the final ELF. To be able to run the examples in ubuntu, add this in the command line when compiling -Wl,-z,norelro e.g: gcc -Wl,-z,norelro test.c Author admin Posted on March 12, 2014 April 28, 2017 Categories hacks 18 thoughts on &ldquo;Implementing a web server in a single printf() call&rdquo; dodi says: March 12, 2014 at 2:04 pm eh buset, serius nih lu ? 🙂 Reply priyo says: March 13, 2014 at 5:07 am scroll up&#8230; scroll down&#8230; scroll up&#8230; scroll down&#8230; 100x *gagal paham* Reply terminalcommand says: March 13, 2014 at 5:19 am Thank you! Very interesting article. I also didn&#8217;t know about the one line webserver at google. Although this is a hard topic, you&#8217;ve made a great work simplifying it. Reply Basun says: March 13, 2014 at 10:02 am The one line webserver bit is a joke about Jeff Dean, who works at Google. Its not real. 🙂 Reply Cees Timmerman says: April 20, 2016 at 4:12 pm There are real webserver oneliners: https://gist.github.com/willurd/5720255 Reply anonim says: March 13, 2014 at 5:29 am Diskusinya di https://news.ycombinator.com/item?id=7389623 Reply Neil says: March 13, 2014 at 12:38 pm Shouldn&#8217;t there be an exit() somewhere in the fork==0 branch? Otherwise every time there is a request the new child process will become a server too and start accepting requests, right? I think the parent leaks its copy of the file descriptor too. Maybe the fork is a bit redundant. I don&#8217;t think the write or close will block with such a small amount of data. Cool post though! I&#8217;m not really sure why I&#8217;m nitpicking in the shell code. Sorry. Reply admin says: March 14, 2014 at 1:58 am Ah yes, there is an exit from the loop on the assembly code (myhttp.s) but it got removed from http.c when I removed the comment and debug code. And you are also right about the fork, it is unnecessary in this case. At first I was going to write the HTTP headers and then exec some external command. I changed my mind and didn&#8217;t bother deleting the fork call. Reply Kyle Ross says: March 13, 2014 at 11:02 pm This is really interesting, but I&#8217;m having trouble following whats actually happening. Could you explain how you reduced that C code with includes and methods into a string containing hex codes and how that is turned back into some sort of executable code? Thanks Reply admin says: March 14, 2014 at 2:01 am I think it is beyond the scope of this article to explain about shell code writing. There are many books and tutorials that you can read (just search for &#8220;buffer overflow&#8221; or &#8220;shell code writing&#8221;). Reply TTK Ciar says: March 14, 2014 at 1:05 am Alternatively: $ perl -Mojo -E &#8216;a({inline =&gt; &#8220;%= `uptime`&#8221;})-&gt;start&#8217; daemon &amp; Server available at http://127.0.0.1:3000 . $ lynx -dump -nolist http://127.0.0.1:3000/ 17:57:56 up 66 days, 6:45, 108 users, load average: 0.10, 0.12, 0.07 though, perl by definition is cheating. Reply Evan Danaher says: March 14, 2014 at 2:54 pm I&#8217;m not sure why you used finalizers instead of just changing the return address on the stack; this may be the first time I&#8217;ve ever said this, but stack smashing is much more portable. I&#8217;ve made a variant that I&#8217;d expect to work on any gcc 4.4-4.7 on x86_64 Linux, and have some ideas which, if they work out, may make it actually &#8220;portable&#8221; to any x86/x86_64 Unix running a reasonable compiler. https://github.com/edanaher/printf-webserver Reply admin says: March 17, 2014 at 3:02 pm Yes using the stack is also possible, but on most modern system, GCC is compiled with stack protection turned on (and needs to be disabled using -fno-stack-protector). Reply Pingback: Implementing a web server in a single printf() call &laquo; adafruit industries blog Itzik Kotler says: March 15, 2014 at 4:35 pm Pretty neat. I did something similar (all though simpler) back in the days. See: http://www.exploit-db.com/papers/13233/ Reply Pingback: Saving the world, one cpu cycle at a time | Dav&#039;s bit o the web programath says: April 22, 2014 at 1:18 pm printf(&#8220;%*c%hn%*c%hn&#8221;, b, 0, DESTADDR + 2, b-a, 0, DESTADDR ); &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; i think the fourth parameter should be &#8216;a-b&#8217;, not &#8216;b-a&#8217;, because a == b + (a &#8211; b) Reply Pingback: New top story on Hacker News: Implementing a web server in a single printf call (2014) &#8211; Latest news Leave a Reply Cancel reply Your email address will not be published. Required fields are marked * Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. &#916; Post navigation Previous Previous post: Raspberry Pi for Out of Band Linux PC management Next Next post: Exploiting the Futex Bug and uncovering Towelroot Pages About Archive Search for: Search Follow x.com/yohanes Mastodon Recent Posts CVE-2025-31931 Arbitrary Shared Library Loading in Intel ITT API on Android (affects OpenCV &lt;= 4.10) Decrypting Encrypted files from Akira Ransomware (Linux/ESXI variant 2024) using a bunch of GPUs Patching .so files of an installed Android App Extracting WhatsApp Database (or any app data) from Android 12/13 using CVE-2024-0044 Zygisk-based reFlutter Recent Comments Eitan Porat on About admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 admin on Using U-Boot to extract Boot Image from Pritom P7 lpt2007 on Using U-Boot to extract Boot Image from Pritom P7 Archives November 2025 March 2025 November 2024 June 2024 April 2024 January 2024 December 2023 September 2022 March 2021 January 2021 May 2019 January 2019 November 2018 July 2018 May 2018 February 2018 October 2017 September 2017 March 2017 November 2016 November 2015 July 2014 March 2014 February 2014 June 2013 January 2013 November 2011 March 2011 February 2011 July 2010 April 2010 January 2010 December 2009 September 2009 August 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 March 2008 February 2008 October 2007 June 2007 February 2007 January 2007 December 2006 Categories agestar android blog ctf debian flareon flex freebsd google hacks hardware hostmonster linux mac os x misc mobile opensource phone raspberry reverse-engineering sdr security Uncategorized wii writeup Meta Log in Entries feed Comments feed WordPress.org Tinyhack.com Proudly powered by WordPress
2026-01-13T08:49:46
https://id-id.facebook.com/login/?next=https%3A%2F%2Fwww.facebook.com%2Fshare_channel%2F%3Ftype%3Dreshare%26link%3Dhttps%253A%252F%252Fdev.to%252Fkowshikkumar_reddymakire%252Fbuilding-a-low-code-blockchain-deployment-platform-4ali%26app_id%3D966242223397117%26source_surface%3Dexternal_reshare%26display%26hashtag
Masuk Facebook Notice Anda harus login untuk melanjutkan. Login ke Facebook Anda harus login untuk melanjutkan. Masuk Lupa akun? atau Buat akun baru Bahasa Indonesia 한국어 English (US) Tiếng Việt ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch Daftar Masuk Messenger Facebook Lite Video Meta Pay Meta Store Meta Quest Ray-Ban Meta Meta AI Konten Meta AI lainnya Instagram Threads Pusat Informasi Pemilu Kebijakan Privasi Pusat Privasi Tentang Buat Iklan Buat Halaman Developer Karier Cookie Pilihan Iklan Ketentuan Bantuan Pengunggahan Kontak &amp; Non-Pengguna Pengaturan Log aktivitas Meta © 2026
2026-01-13T08:49:46