惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
G
Google Developers Blog
MyScale Blog
MyScale Blog
Google DeepMind News
Google DeepMind News
J
Java Code Geeks
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Check Point Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Proofpoint News Feed
D
Docker
Jina AI
Jina AI
博客园 - 三生石上(FineUI控件)
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Forbes - Security
Forbes - Security
MongoDB | Blog
MongoDB | Blog
Attack and Defense Labs
Attack and Defense Labs
Webroot Blog
Webroot Blog
A
About on SuperTechFans
Schneier on Security
Schneier on Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
Microsoft Azure Blog
Microsoft Azure Blog
F
Fortinet All Blogs
IT之家
IT之家
The Last Watchdog
The Last Watchdog
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog
Project Zero
Project Zero
B
Blog
Recorded Future
Recorded Future
博客园_首页
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
SegmentFault 最新的问题
Security Archives - TechRepublic
Security Archives - TechRepublic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hacker News: Front Page
T
Threatpost
H
Heimdal Security Blog
Cloudbric
Cloudbric
Google Online Security Blog
Google Online Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog

Stonecharioteer on Tech

I Traced My Traffic Through a Home Tailscale Exit Node What Was I Reading Last? In Three Not-So-Easy Pieces Dogfooding Is Hard Code blocks in your books, finally GoForGo v0.9.0 Merrilin - We built an app to read books I use a Macbook now Data Structures & Algorithms - Preparing for Interviews Using a local DNS namespace for local service discovery Direction KOllector - Publishing KOReader Highlights gbt: branches touched in the last 24 hours A Soiree into Symbols in Ruby Some Smalltalk about Ruby Loops Ruby Blocks Returning from Ruby Blocks, Procs and Lambdas My Linux Laptop Finally Works: How Claude Helped Me Fix Years of Annoyances TIL: Watchexec - Modern File Watching for Development Workflows A Less Busy Mind GoForGo - Learn Go through live examples Migrating My Old Blog to Hugo with Claude The Qtile Window Manager: A Python-Powered Tiling Experience Read the RFCs that Built the Internet Py-x-Protobuf - Or How I Learned to Stop Worrying and Love Protocol Buffers Python Reverse a List New Beginnings Leaving ChainSafe Systems Screen Lock for Cinnamon Desktop using Zenity and Terminal Commands Crews Not Teams A System for Getting Better at LeetCode So Far So Rust Retrying HTTP Requests with Rust A Primer on Control Charts Learning Rust Explicit is Better than Implicit: Rust for Pythonistas Using Custom Delimiters in Jinja Templates TIL: Creating Fixed Length Iterables in Python Documentation Without Assumption Vagrant Python - A Reflection in 2022 Learning Golang No, A Virtual Machine Is Not Enough: Why Developers Need Native Linux Empathy in Tech For Those Who Came in Late A Weekend With PostgreSQL TIL: Gooey and Python Fire for Quick GUIs and CLIs TIL: 2ality - Dr. Axel Rauschmayer's JavaScript Blog TIL: MassDNS - High-Performance Bulk DNS Lookups TIL: Matomo Analytics, Google Tech Writing, Memory Programming, and NES TV Signals TIL: MontyDB - MongoDB Implemented in Python Returning to the Craft of Programming TIL: CPUFetch, OneFetch, and Learn CSS TIL: DNS Performance Testing and Pi-hole with Unbound TIL: Eli Bendersky's Blog, Awesome By Example, NoCoDB, and Martin Kleppmann TIL: CRDTs, Extreme HTTP Performance, and BYTEPATH Game TIL: AutoInvent, ASGI, Python Packaging, RAPIDS GPU Computing, and FlaskCon TIL: MangaDesk - Terminal Client for MangaDex TIL: McFly - Smart Shell History Search TIL: Siege Load Testing and Awesome FastAPI Resources TIL: Ventoy Bootable USB and Justniffer Network Analysis TIL: CLI Code Review, Git Split Diffs, and Internal Combustion Engine TIL: Benford's Law, Web Security Headers, Event Sourcing, and Mozilla Security Guidelines How to Write Documentation - The README.md File The Importance of Documentation TIL: NNgroup UX Research, SponsorBlock, and Labella Python Library TIL: The Little Book of Rust Macros and Rust Performance Book TIL: Git-Bug Distributed Issue Tracker and Omni Kubernetes Monitoring TIL: Zellij - Modern Terminal Multiplexer TIL: How Discord Handles 2.5 Million Concurrent Voice Users TIL: Volumio - The Audiophile Music Player TIL: Areopagitica - Milton's Defense of Free Speech TIL: Fast Node Manager, Zoxide Smart CD, Technical Writing, PyO3, and Qubes OS TIL: Slurm Workload Manager for HPC Clusters TIL: Data Visualization Guide and Oso Authorization Academy TIL: CORS Deep Dive, Piku Tiny PaaS, Rust Strings, and Deno Standard Library TIL: Raspberry Pi OS Development, Vim Beginner Guide, Password Management, and QueryBook TIL: uBlock Origin Performance Optimization on Firefox TIL: Breaking PostgreSQL at Scale and LeetCode Problem Patterns TIL: Awesome Tmux Resources for Terminal Multiplexing TIL: Grit - A Multitree-Based Personal Task Manager TIL: Lens 4.2 Kubernetes IDE, Shell Scripting Guide, and Dark HTTP Server Do The Job You Hate So You Won't Hate The Job You Love TIL: Innernet VPN Solution and NoteCalc Calculator App TIL: Argo CD for GitOps and Lens Kubernetes IDE TIL: Modern Rust CLI Tools - System Monitoring, HTTP Requests, and DNS TIL: tz - A Time Zone Helper Tool TIL: Distributed Systems Education, Fallacies, and Self-Hosted Internet Archiving TIL: Real-Time Voice Cloning Technology TIL: ChartMuseum for Helm, AMD's Corporate Journey, and Kubernetes Pod Scaling TIL: Docker and Kubernetes Tools - Whaler, Descheduler, and Dive TIL: Post-Mortem Collection, Terminal Plotting, and Technical Twitter TIL: Dark Mode Toggle Web Component by Google Chrome Labs TIL: Python eval(), exec(), and compile() Functions TIL: Camelot PDF Tables, PostgreSQL Row Level Security, Zerodha Varsity, and Write Yourself a Git TIL: fuser Command for Process and File Investigation TIL: i Hate Regex - The Ultimate Regex Cheat Sheet TIL: Dolt - Git for Data and Database Version Control TIL: x86 Assembly Programming and SafeEyes Break Reminder TIL: Comprehensive Distributed Systems Reading List TIL: Cosmopolitan C Library, Distributed Systems Book, High Performance Browser Networking, and Rust Roguelike Tutorial
TIL: Drogon C++ Web Framework, Git Code Debt Monitoring, and Python Best Practices
2020-11-30 · via Stonecharioteer on Tech

Today’s learning covered modern C++ web development, code quality management, communication skills, and Python programming best practices.

Drogon is a high-performance HTTP web application framework for C++14/17, designed for building fast and scalable web applications and APIs.

Key Features:

Performance Characteristics:

  • Asynchronous I/O: Non-blocking operations using libuv for high concurrency
  • Zero-copy: Efficient memory management for request/response handling
  • HTTP/1.1 and HTTP/2: Full support for modern web protocols
  • WebSocket support: Real-time bidirectional communication

Development Features:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
// Simple route definition
app().registerHandler("/api/users/{id}",
    [](const HttpRequestPtr& req,
       std::function<void (const HttpResponsePtr &)> &&callback,
       int user_id) {
        Json::Value json;
        json["user_id"] = user_id;
        json["status"] = "active";

        auto resp = HttpResponse::newHttpJsonResponse(json);
        callback(resp);
    },
    {Get});

// Database integration with ORM
auto client = drogon::app().getDbClient();
auto users = client->execSqlSync("SELECT * FROM users WHERE active = ?", true);

Modern C++ Integration:

  • Coroutines: C++20 coroutine support for clean asynchronous code
  • Template metaprogramming: Compile-time optimizations
  • RAII: Automatic resource management for connections and memory
  • Type safety: Strong typing for request parameters and responses

Use Cases:

  • High-performance APIs: Microservices requiring maximum throughput
  • Real-time applications: WebSocket-based gaming or chat applications
  • Legacy system integration: Wrapping existing C++ libraries as web services
  • Performance-critical backends: When every millisecond matters

Git Code Debt Monitoring

git-code-debt provides automated tracking and visualization of technical debt accumulation in Git repositories over time.

Metrics Tracked:

Code Quality Indicators:

  • TODO/FIXME comments: Outstanding technical debt items
  • Code complexity: Cyclomatic complexity and nesting levels
  • Documentation coverage: Missing docstrings and comments
  • Test coverage: Lines covered by automated tests

Maintainability Metrics:

  • File size distribution: Identifying overly large files
  • Function length: Methods that may need refactoring
  • Import dependencies: Coupling between modules
  • Code duplication: Repeated code patterns

Dashboard Features:

1
2
3
4
5
# Generate code debt metrics
git-code-debt --database sqlite:///code_debt.db generate

# Start web dashboard
git-code-debt --database sqlite:///code_debt.db serve

Visualization Benefits:

  • Trend analysis: See debt accumulation or reduction over time
  • Team accountability: Track which changes introduce or remove debt
  • Release planning: Quantify technical debt for sprint planning
  • Refactoring priorities: Identify areas with highest debt concentration

Essay Writing Excellence

Julian Shapiro’s Guide to Writing Well provides a systematic approach to creating compelling and effective written content.

Writing Process:

Research and Planning:

  • Audience definition: Understanding reader needs and expertise level
  • Outline development: Logical flow and argument structure
  • Evidence gathering: Supporting data, examples, and expert opinions
  • Counterargument preparation: Addressing potential objections

Clarity Techniques:

  • Simple language: Avoiding unnecessary jargon and complexity
  • Active voice: Direct and engaging sentence construction
  • Concrete examples: Specific instances rather than abstract concepts
  • Logical transitions: Smooth connections between ideas

Engagement Strategies:

  • Hook openings: Compelling introductions that grab attention
  • Story integration: Narrative elements to maintain interest
  • Visual breaks: Headers, bullets, and whitespace for readability
  • Strong conclusions: Memorable endings that reinforce key points

Python Best Practices

Documentation Excellence:

The concept that “everything is an object” in Python becomes clearer when understanding that __doc__ works consistently across modules, classes, and functions, demonstrating Python’s unified object model.

Security and Safety:

  • Avoid os.system: Use subprocess module for safer command execution
  • Input validation: Sanitize all external input
  • Exception handling: Specific exception catching rather than broad except clauses

Code Quality Tools:

  • VSCode extensions: Log file highlighting for better debugging
  • Comment quality: Writing meaningful comments that explain why, not what
  • Jinja2 techniques: Proper template loop counters and variable access

Additional Development Resources

Container Management:

  • Portainer: Web-based Docker container management interface
  • Docker orchestration: Simplified container deployment and monitoring

Distributed Systems:

  • Paxos algorithm: Understanding consensus through the metaphor of a Greco-Roman senate
  • PingCAP Talent Plan: Comprehensive Rust-based distributed systems education

Development Tools:

  • pstree command: Visualizing process hierarchies for system debugging
  • Process management: Understanding parent-child process relationships

These discoveries provide comprehensive coverage of modern development practices, from high-performance system programming to effective communication and code quality management.