# ordering

Ordering is an abstract relation used in algorithms to compare and arrange data objects, including sorting and priority queues.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## \[$\] Adding BPF to blk-iocost

DevFeed: [\[$\] Adding BPF to blk-iocost](<https://devfeed.tech/articles/adding-bpf-to-blk-iocost-26937.md>)

Original publisher: [Read original article](<https://lwn.net/Articles/1093661/>)

Author: corbet

Published: 2026-09-15T14:37:30Z

Content type: article

Language: en

Sources: [LWN.net](<https://devfeed.tech/sources/lwn-net.md>)

Topics: [Kernel](<https://devfeed.tech/topics/kernel.md>), [IO](<https://devfeed.tech/topics/io.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [Operating system](<https://devfeed.tech/topics/operating-system.md>)

Tags: [kernels](<https://devfeed.tech/tags/kernels.md>), [loading](<https://devfeed.tech/tags/loading.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [performance](<https://devfeed.tech/tags/performance.md>)

### AI overview

This article discusses a patch series that would make the Linux blk-iocost I/O controller more flexible by allowing a BPF program to make cost decisions. It places the change in the context of block I/O scheduling for modern solid-state drives, where fairness and high throughput are important.

### Source excerpt

The scheduling of block I/O requests has long been a challenge for operating-system kernels. For many years, the performance characteristics of rotating drives meant that putting considerable resources into request ordering was worthwhile. In a world with fast, solid-state drives, scheduling is more concerned with enforcing fairness between competing users while being fast enough to keep up with drives that can perform millions of I/O operations per second. The blk-iocost I/O controller was designed for the solid-state world and generally performs well, but there is always a desire to do better. This patch series from Tao Cui aims to make blk-iocost more flexible by enabling the loading of a BPF program to make cost decisions.

## A humorous roundup of software and website errors involving Google, Microsoft, and the New Mexico DOT

DevFeed: [A humorous roundup of software and website errors involving Google, Microsoft, and the New Mexico DOT](<https://devfeed.tech/articles/error-d-hello-new-mexico-28509.md>)

Original publisher: [Read original article](<https://thedailywtf.com/articles/hello-new-mexico>)

Author: Lyle Seaman

Published: 2026-08-28T06:30:00Z

Content type: opinion

Language: en

Sources: [The Daily WTF](<https://devfeed.tech/sources/the-daily-wtf.md>)

Topics: [ordering](<https://devfeed.tech/topics/ordering.md>), [Google](<https://devfeed.tech/topics/google.md>), [Microsoft](<https://devfeed.tech/topics/microsoft.md>), [Website](<https://devfeed.tech/topics/website.md>)

Tags: [error-d](<https://devfeed.tech/tags/error-d.md>), [google](<https://devfeed.tech/tags/google.md>), [microsoft](<https://devfeed.tech/tags/microsoft.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [web](<https://devfeed.tech/tags/web.md>), [website](<https://devfeed.tech/tags/website.md>)

### AI overview

This opinion piece presents a humorous roundup of software and website mistakes. It discusses an ordering error, Google's apparent counting mistake, Microsoft Outlook account and contact-form problems, a pricing-unit misunderstanding, and a New Mexico DOT website.

### Source excerpt

Peter G. shared with us yet another ordering bungled example of. "Should really say "please engage in an Easter egg hunt to find your language"." "Google can't count" claimed Peter S.. It adds up. "Yet another proof that 0=1, this time from Google." "Thanks, Microsoft" groused Ivan "Ever since Microsoft ate university e-mail services worldwide and became responsible for major free software mailing lists, quality of service has been steadily dropping. In order to report delivery problems to Outlook, you need a Microsoft account. You're prevented from creating it at first because of "suspicious activity". Once you're in, the contact address is pre-filled for you with an invalid email. Once you fix that in the web developer toolbar, fuck you anyway! I think the form isn't actually expected to work; the fact that the request was submitted is an error. The only thing missing from the experience is the "beware of the leopard" sign." "Mango Math" needs a bit of money math for the rest of the world to understand. Michael R. muttered "I will buy it by the slice then." The joke here is on the tip of my tongue. Explainer: the new pence is one hundredth of the decimal pound. No shillings no more, decreps! At that ratio, 3p per slice of cheesecake would indeed be far less dear than four pounds for the whole thing, barring translucent slices. Alas, the reality is simply the boring fact that the price is 3p per gram. Not as funny but I'm chuckling imagining Michael's transparent serving of diet cheesecake. I'll leave it up to you to decide if a gram really counts as an "item". Clint clucked "Got this email from Bigbadtoystore. Lots of links available for preorder!" I think the talented website builders behind the New Mexico DOT have been busy. [Advertisement] Picking up NuGet is easy. Getting good at it takes time. Download our guide to learn the best practice of NuGet for the Enterprise.

## Why Code Removal May Be Preferable to Scheduling for Performance Remediation

DevFeed: [Why Code Removal May Be Preferable to Scheduling for Performance Remediation](<https://devfeed.tech/articles/the-wicked-reason-removing-code-beats-better-scheduling-26567.md>)

Original publisher: [Read original article](<https://infrequently.org/2026/08/notes-on-performance-remediation-strategies/>)

Author: Alex Russell

Published: 2026-08-19T00:00:00Z

Content type: opinion

Language: en

Sources: [Alex Russell](<https://devfeed.tech/sources/alex-russell.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [ordering](<https://devfeed.tech/topics/ordering.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [performance](<https://devfeed.tech/tags/performance.md>), [webdev](<https://devfeed.tech/tags/webdev.md>)

### AI overview

An opinion article arguing that removing code can be a more reliable performance-remediation strategy than reordering or deferring work. It says both approaches require understanding page behavior, while scheduling changes can increase validation, coordination, bandwidth, and main-thread performance risks.

### Source excerpt

My colleague Marko Ilić has published an insightful piece on how to schedule work on the critical path, and I recommend reading it before proceeding here. Contents Elimination vs. Scheduling: An Organisational Perspective What's Good for the Goose... "Preloading" as Scheduling Scheduling Is For Closers General-Purpose Advice ...and welcome back. As you likely anticipated, Marko's beautifully presented post kicked off healthy discussions around the office. Since we almost always see eye-to-eye, it seemed interesting to surface some of that discussion here. With his permission, what follows are expanded versions of some points I posed in reply. Elimination vs. Scheduling: An Organisational Perspective There's no daylight between our positions on code reduction: sending and running less is always ideal. Where we differ, perhaps, is the priority teams should assign to scheduling vs. code removal in their performance remediation efforts. Contra Marko, I posit that reordering can almost never be assumed to be cheaper or easier. While it may be hard to remove code, my view is that it is generally not harder than re-ordering in most codebases. Why? The primary cost of both code removal and scheduling interventions is the investment to deeply understand page behaviour. This presents a narrative challenge to the proposition that scheduling is an easier fix, as both approaches share the largest cost. At the team level, the consequences of restructuring are harder to reason about than direct removal, reducing potential upside and increasing validation costs. Bytes that are only deferred still contend for bandwidth, potentially delaying above-the-fold resources in ways that only become visible in the tail of the connection quality curve. Worse, late-fetched JS resources generate heavy "thuds" when residual allocations from background compilation arrive on the main thread. These stalls show up in INP data, but can be maddening to track down due to their stochastic relationship wi

## Too big to draw, but yet drawable

DevFeed: [Too big to draw, but yet drawable](<https://devfeed.tech/articles/too-big-to-draw-but-yet-drawable-37564.md>)

Original publisher: [Read original article](<https://blog.klipse.tech/aboulafia/2026/07/06/too-big-to-draw-but-yet-drawable.html>)

Author: Yehonathan Sharvit

Published: 2026-07-06T09:00:00Z

Content type: article

Language: en

Sources: [Klipse](<https://devfeed.tech/sources/klipse.md>)

Topics: [ordering](<https://devfeed.tech/topics/ordering.md>), [structure](<https://devfeed.tech/topics/structure.md>)

Tags: [aboulafia](<https://devfeed.tech/tags/aboulafia.md>), [caustics](<https://devfeed.tech/tags/caustics.md>), [generative](<https://devfeed.tech/tags/generative.md>), [math](<https://devfeed.tech/tags/math.md>), [permutation](<https://devfeed.tech/tags/permutation.md>), [permutations](<https://devfeed.tech/tags/permutations.md>), [random](<https://devfeed.tech/tags/random.md>), [ranking](<https://devfeed.tech/tags/ranking.md>), [recursion](<https://devfeed.tech/tags/recursion.md>), [visualization](<https://devfeed.tech/tags/visualization.md>)

### AI overview

The third article in a series explains how Aboulafia's tserouf orders all permutations of a word and visualizes them by placing the permutations around a circle and connecting each word to its reversal. Because the full permutation space becomes too large to draw, the article samples chords and shows that they form recurring caustic curves visible at multiple scales.

### Source excerpt

Aboulafia's Tserouf - Part 3 of 4 <- Previous: An elegant formulation, inspired by Bill Gates - Next: A wheel, the same forwards and backwards ->

## Zaks's suffix-reversal algorithm for generating permutations

DevFeed: [Zaks's suffix-reversal algorithm for generating permutations](<https://devfeed.tech/articles/an-elegant-formulation-inspired-by-the-one-and-only-paper-bill-gates-ever-wrote-37563.md>)

Original publisher: [Read original article](<https://blog.klipse.tech/aboulafia/2026/07/06/an-elegant-formulation-inspired-by-bill-gates.html>)

Author: Yehonathan Sharvit

Published: 2026-07-06T08:00:00Z

Content type: article

Language: en

Sources: [Klipse](<https://devfeed.tech/sources/klipse.md>)

Topics: [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Sorting](<https://devfeed.tech/topics/sorting.md>), [ordering](<https://devfeed.tech/topics/ordering.md>)

Tags: [aboulafia](<https://devfeed.tech/tags/aboulafia.md>), [algorithm](<https://devfeed.tech/tags/algorithm.md>), [math](<https://devfeed.tech/tags/math.md>), [permutations](<https://devfeed.tech/tags/permutations.md>), [reversing](<https://devfeed.tech/tags/reversing.md>), [sequence](<https://devfeed.tech/tags/sequence.md>), [sorting](<https://devfeed.tech/tags/sorting.md>)

### AI overview

This second article in a series connects Aboulafia's recursive Tserouf permutation algorithm with Shimon Zaks's 1984 algorithm. It explains how Zaks generates permutations by repeatedly reversing suffixes and describes the recursive sequence of suffix lengths behind the ordering.

### Source excerpt

Aboulafia's Tserouf - Part 2 of 4 <- Previous: An algorithm ignored for 700 years - Next: Too big to draw, but yet drawable ->

## A 13th-Century Enumeration Algorithm, Ignored for 700 Years

DevFeed: [A 13th-Century Enumeration Algorithm, Ignored for 700 Years](<https://devfeed.tech/articles/a-13th-century-enumeration-algorithm-ignored-for-700-years-37561.md>)

Original publisher: [Read original article](<https://blog.klipse.tech/aboulafia/2026/07/06/a-13th-century-enumeration-algorithm-ignored-for-700-years.html>)

Author: Yehonathan Sharvit

Published: 2026-07-06T07:00:00Z

Content type: article

Language: en

Sources: [Klipse](<https://devfeed.tech/sources/klipse.md>)

Topics: [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [structure](<https://devfeed.tech/topics/structure.md>)

Tags: [aboulafia](<https://devfeed.tech/tags/aboulafia.md>), [algorithm](<https://devfeed.tech/tags/algorithm.md>), [kabbalah](<https://devfeed.tech/tags/kabbalah.md>), [math](<https://devfeed.tech/tags/math.md>), [order](<https://devfeed.tech/tags/order.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [permutations](<https://devfeed.tech/tags/permutations.md>)

### AI overview

The article examines a systematic method for enumerating permutations described by the 13th-century Kabbalist Abraham Aboulafia in his account of Tserouf. It explains rules for ordering three-letter permutations and a rotation-based method for extending the ordering to longer words.

### Source excerpt

Aboulafia's Tserouf - Part 1 of 4 Next: An elegant formulation, inspired by Bill Gates ->

## How UUIDv4 Primary Keys Affect Database Insert Performance

DevFeed: [How UUIDv4 Primary Keys Affect Database Insert Performance](<https://devfeed.tech/articles/why-uuid-primary-keys-quietly-destroy-database-performance-39564.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/12-uuids-primary-keys-performance/>)

Author: hello@ankit-rana.com

Published: 2026-03-16T00:00:00Z

Content type: article

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Database](<https://devfeed.tech/topics/database.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [ordering](<https://devfeed.tech/topics/ordering.md>)

Tags: [b-tree](<https://devfeed.tech/tags/b-tree.md>), [database](<https://devfeed.tech/tags/database.md>), [database-performance](<https://devfeed.tech/tags/database-performance.md>), [fragmentation](<https://devfeed.tech/tags/fragmentation.md>), [innodb](<https://devfeed.tech/tags/innodb.md>), [latency](<https://devfeed.tech/tags/latency.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [performance](<https://devfeed.tech/tags/performance.md>), [system-design](<https://devfeed.tech/tags/system-design.md>), [uuid](<https://devfeed.tech/tags/uuid.md>)

### AI overview

This article explains how random UUIDv4 primary keys can reduce insert performance in clustered indexes. Random inserts land in the middle of B+ tree pages, causing page splits, fragmentation, additional writes, and buffer-pool churn. It recommends UUIDv7 or ULID, or an auto-increment clustered key with UUIDs in a unique secondary index.

### Source excerpt

The problem with UUIDv4 primary keys is not uniqueness, it is that random keys fight the storage engine's physical layout. In a clustered index the primary key is the table, so random inserts land mid-page, trigger page splits, leave pages half-full, and can inflate a 50 GB dataset to roughly 100 GB while wasting buffer pool on empty space. Use UUIDv7 or ULID, or keep an auto-increment clustered key with the UUID in a unique secondary index.

## McDonald's Pilots Real-Time Automation for Ice Cream Product Availability

DevFeed: [McDonald's Pilots Real-Time Automation for Ice Cream Product Availability](<https://devfeed.tech/articles/from-ideation-to-automation-the-scoop-on-outages-23978.md>)

Original publisher: [Read original article](<https://medium.com/mcdonalds-technical-blog/from-ideation-to-automation-the-scoop-on-outages-1ad0eab5cee1?source=rss----3bac42476d27---4>)

Author: Global Technology

Published: 2026-03-12T16:13:47Z

Content type: article

Language: en

Sources: [McDonald's Technical Blog - Medium](<https://devfeed.tech/sources/mcdonald-s-technical-blog-medium.md>)

Topics: [Automation](<https://devfeed.tech/topics/automation.md>), [Availability](<https://devfeed.tech/topics/availability.md>), [Internet of things](<https://devfeed.tech/topics/iot.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [automation](<https://devfeed.tech/tags/automation.md>), [availability](<https://devfeed.tech/tags/availability.md>), [customer-experience](<https://devfeed.tech/tags/customer-experience.md>), [digital-transformation](<https://devfeed.tech/tags/digital-transformation.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [internet-of-things](<https://devfeed.tech/tags/internet-of-things.md>), [iot](<https://devfeed.tech/tags/iot.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [outages](<https://devfeed.tech/tags/outages.md>), [technology](<https://devfeed.tech/tags/technology.md>)

### AI overview

McDonald's piloted a real-time automation pipeline that connects ice cream machines to Sesame POS. At a Global Tech pilot restaurant, the system automatically removes products during machine downtime and re-enables them when the machine becomes operational, updating kiosks, mobile apps, and POS systems. The solution has not yet been rolled out broadly.

### Source excerpt

A process that once required a multi-click manual process is now fully automated in real time, with a Global Tech pilot restaurant testing the solution to boost efficiency and enhance the customer experience. by: Chloe Tominac, Manager, Engineering Tech Lead & Lauren Adamonis, Manager, Engineering Tech Lead Quick Bytes: Crew members had to manually mark ice cream items unavailable through a multi-click process, and later use the same process to restore items, which often led to missed updates and customer frustration A real-time automation pipeline was piloted to connect the ice cream machine to Sesame POS, instantly updating product availability The solution launched in McDonald's Global Tech pilot restaurant, improving restaurant efficiency and ensuring customers see accurate menus across all ordering channels In restaurant operations, every second counts -- especially when equipment goes offline. That's why McDonald's tech teams set out to automate the ice cream product outage process, transforming a manual workflow into a seamless, real-time system as part of our ongoing digital transformation. To explore how this could work in a live environment, we put the solution to the test in one of our Global Tech pilot restaurants. This pilot is helping us learn how real-time equipment data can improve restaurant efficiency and customer experience. While it's not yet rolled out broadly, the insights from this test are shaping how we think about scaling automation across restaurant operations. Previously, a multi-click process was required to take ice cream items off the menu during machine downtime. Without automatic recovery, items often remained unavailable even after the machine was back online until a crew member restored them, resulting in customers hearing that the ice cream machine was "broken." Automation now ensures menu items are immediately re-enabled as soon as the machine is operational. Now, thanks to a collaboration between the Internet of Things (IoT) team

## Inside Glassdoor's Multi-Stage Recommendation System

DevFeed: [Inside Glassdoor's Multi-Stage Recommendation System](<https://devfeed.tech/articles/inside-glassdoor-s-multi-stage-recommendation-system-22611.md>)

Original publisher: [Read original article](<https://medium.com/glassdoor-engineering/inside-glassdoors-multi-stage-recommendation-system-cee58b52a75a?source=rss----288d984af747---4>)

Author: Prateek Shekhar

Published: 2025-08-12T19:37:39Z

Content type: article

Language: en

Sources: [Glassdoor Engineering](<https://devfeed.tech/sources/glassdoor-engineering.md>)

Topics: [recommendation systems](<https://devfeed.tech/topics/recommendation-systems.md>), [recommendations](<https://devfeed.tech/topics/recommendations.md>), [personalization](<https://devfeed.tech/topics/personalization.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [ann](<https://devfeed.tech/topics/ann.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [ann](<https://devfeed.tech/tags/ann.md>), [glassdoor](<https://devfeed.tech/tags/glassdoor.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [personalization](<https://devfeed.tech/tags/personalization.md>), [recommendation-system](<https://devfeed.tech/tags/recommendation-system.md>), [recommendation-systems](<https://devfeed.tech/tags/recommendation-systems.md>), [recommender-systems](<https://devfeed.tech/tags/recommender-systems.md>)

### AI overview

This article gives a high-level overview of Glassdoor's hybrid, multi-stage recommendation system. It describes how the system uses user behavior, similar-user behavior, and item features to produce personalized recommendations for the Community Feed, Email, and Push notifications, with stages including candidate generation, filtering, scoring, and ordering.

### Source excerpt

Introduction: Recommendation systems are central to modern digital platforms, delivering personalized content by intelligently analyzing user behavior and preferences through advanced algorithms. Widely used in e-commerce, streaming services, social media, and online learning, they drive user satisfaction, engagement, and retention while supporting business growth. Typically, these systems operate using one or more of the following approaches: Collaborative Filtering: This approach examines user behavior by comparing how users interact with items. It identifies patterns by analyzing similar user actions. For example, if two users have watched or purchased similar items, the system will recommend those same items to other users with similar behavior. Content-Based Filtering: In this approach, the system analyzes the characteristics of the items themselves, such as text, images, or other features. It recommends items that have features similar to those a user has previously liked. For example, if a user enjoyed books with specific keywords, the system will suggest books with those exact keywords. Hybrid Approach: This approach combines collaborative and content-based filtering to enhance personalization and accuracy. It utilizes user behavior patterns in conjunction with item features, offering more personalized and accurate recommendations. At Glassdoor, our Community Feed, Email, and Push notifications are powered by a recommendation system that follows a hybrid approach. It analyzes individual users' behavior, such as posts, comments, and reactions, as well as the behavior of similar users, to deliver tailored, personalized recommendations. This post presents a high-level overview of the multi-stage architecture behind our system, highlighting candidate generation, filtering, scoring, ordering, and supporting infrastructure. Glassdoor's Recommendation System ArchitectureFigure 1: Glassdoor's Recommendation System Architecture Glassdoor's Recommendation System follo

## Optimizing Memory Layout in Go: A Deep Dive into Struct Design

DevFeed: [Optimizing Memory Layout in Go: A Deep Dive into Struct Design](<https://devfeed.tech/articles/optimizing-memory-layout-in-go-a-deep-dive-into-struct-design-33341.md>)

Original publisher: [Read original article](<https://blog.ratnesh-maurya.com/blog/Optimizing-Memory-Layout-in-Go-A-Deep-Dive-into-Struct-Design>)

Author: ratneshmaurya2311@gmail.com (Ratnesh Maurya)

Published: 2025-01-10T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ratn Labs](<https://devfeed.tech/sources/ratn-labs.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [ordering](<https://devfeed.tech/topics/ordering.md>)

Tags: [alignment](<https://devfeed.tech/tags/alignment.md>), [backend](<https://devfeed.tech/tags/backend.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [design](<https://devfeed.tech/tags/design.md>), [go](<https://devfeed.tech/tags/go.md>), [go-backend-system-design](<https://devfeed.tech/tags/go-backend-system-design.md>), [golang](<https://devfeed.tech/tags/golang.md>), [memory](<https://devfeed.tech/tags/memory.md>), [optimizing](<https://devfeed.tech/tags/optimizing.md>), [padding](<https://devfeed.tech/tags/padding.md>), [practical](<https://devfeed.tech/tags/practical.md>), [system-design](<https://devfeed.tech/tags/system-design.md>), [tools](<https://devfeed.tech/tags/tools.md>)

### AI overview

This article explains how Go struct field ordering affects memory usage through alignment and padding. It includes benchmarks across millions of allocations and practical tools for identifying wasted space.

### Source excerpt

How Go struct field ordering affects memory via alignment and padding, with benchmarks across millions of allocations and practical tools to detect wasted space.

## Efficient Distributed Unique Timestamp Identifier Generation

DevFeed: [Efficient Distributed Unique Timestamp Identifier Generation](<https://devfeed.tech/articles/efficient-distributed-unique-timestamp-identifier-generation-30742.md>)

Original publisher: [Read original article](<http://blog.vanillajava.blog/2024/12/efficient-distributed-unique-timestamp.html>)

Author: Peter Lawrey (noreply@blogger.com)

Published: 2024-12-08T19:51:00Z

Content type: tutorial

Language: en

Sources: [Vanilla Java](<https://devfeed.tech/sources/vanilla-java.md>)

Topics: [identifier](<https://devfeed.tech/topics/identifier.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Microservice](<https://devfeed.tech/topics/microservice.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [Latency](<https://devfeed.tech/topics/latency.md>)

Tags: [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [identifier](<https://devfeed.tech/tags/identifier.md>), [latency](<https://devfeed.tech/tags/latency.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [performance](<https://devfeed.tech/tags/performance.md>), [precision](<https://devfeed.tech/tags/precision.md>), [unique](<https://devfeed.tech/tags/unique.md>)

### AI overview

The article presents a distributed identifier scheme that embeds a host identifier into a nanosecond-resolution timestamp. It describes the resulting 64-bit identifiers as globally unique, human-readable, chronologically sortable, and suitable for high-concurrency, latency-sensitive systems.

### Source excerpt

Distributed unique timestamp identifiers provide a powerful means of generating globally unique, human-readable 64-bit values at sub-microsecond speeds. By embedding a host identifier directly into a nanosecond-resolution timestamp, you gain a simple, chronologically sortable, and intuitive scheme for correlating events across multiple hosts. This approach offers significant benefits in latency-sensitive systems where even small delays can become expensive at scale. Introduction In a world of horizontally scaled microservices, ensuring that each event or message receives a unique identifier across multiple machines can be challenging. Traditional approaches often rely on UUIDs, which--while easy to use--lack intuitive readability and can be relatively expensive to generate in ultra-low-latency scenarios. Our solution builds upon nanosecond-resolution timestamps combined with a host identifier embedded directly into the lower-order digits of the timestamp. This technique, inspired by previous work on system-wide unique nanosecond timestamps, creates identifiers that are compact, human-interpretable, and extremely fast to produce. In essence, we treat time itself as the source of uniqueness. By carefully structuring the timestamp and assigning a unique hostId per machine (or per logical partition), we can scale to produce up to one billion unique 64-bit identifiers per second. These identifiers repeat only after centuries, making them suitable for long-running systems and distributed architectures that demand both precision and high performance. Concurrent identifier generation in a distributed system In distributed environments, colliding identifiers can lead to data corruption, misrouted requests, or difficulty in debugging. Although UUIDs solve uniqueness issues, they do not inherently convey temporal ordering or machine origin. More subtle forms of identifiers, such as database sequence numbers or custom counters, often need to be more convenient when synchronising

## How I Finally Memorized Modifier Ordering in Compose

DevFeed: [How I Finally Memorized Modifier Ordering in Compose](<https://devfeed.tech/articles/how-i-finally-memorized-modifier-ordering-in-compose-27080.md>)

Original publisher: [Read original article](<https://zsmb.co/remembering-modifier-order/>)

Author: Márton Braun

Published: 2024-06-04T09:00:00Z

Content type: tutorial

Language: en

Sources: [zsmb.co](<https://devfeed.tech/sources/zsmb-co.md>)

Topics: [ordering](<https://devfeed.tech/topics/ordering.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [ui](<https://devfeed.tech/topics/ui.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [compose](<https://devfeed.tech/tags/compose.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [marton-braun](<https://devfeed.tech/tags/marton-braun.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [ui](<https://devfeed.tech/tags/ui.md>), [zsmb](<https://devfeed.tech/tags/zsmb.md>), [zsmb-co](<https://devfeed.tech/tags/zsmb-co.md>), [zsmb13](<https://devfeed.tech/tags/zsmb13.md>), [zsmbco](<https://devfeed.tech/tags/zsmbco.md>)

### AI overview

A tutorial explains how to remember modifier ordering in Jetpack Compose. It connects component APIs that accept a Modifier parameter with the way modifiers are applied, concluding that modifiers are applied last-to-first and inside-to-outside.

### Source excerpt

For the longest time, I proudly had no idea of how Modifier ordering works, and would just guess and then guess again when something didn't look quite right. Here's how I finally ended up remembering how the ordering works.

## Getting Top 1 Values Per Group in Oracle

DevFeed: [Getting Top 1 Values Per Group in Oracle](<https://devfeed.tech/articles/getting-top-1-values-per-group-in-oracle-28939.md>)

Original publisher: [Read original article](<https://blog.jooq.org/getting-top-1-values-per-group-in-oracle/>)

Author: lukaseder

Published: 2024-03-01T09:55:41Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [ordering](<https://devfeed.tech/topics/ordering.md>), [JSON](<https://devfeed.tech/topics/json.md>)

Tags: [aggregate-functions](<https://devfeed.tech/tags/aggregate-functions.md>), [any-value](<https://devfeed.tech/tags/any-value.md>), [function](<https://devfeed.tech/tags/function.md>), [json](<https://devfeed.tech/tags/json.md>), [keep](<https://devfeed.tech/tags/keep.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [sql](<https://devfeed.tech/tags/sql.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [top-1-per-category](<https://devfeed.tech/tags/top-1-per-category.md>), [type-safety](<https://devfeed.tech/tags/type-safety.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

A tutorial on selecting the top one or top n values per group in Oracle. It discusses ordering and ties, repetition when projecting multiple columns, Oracle object types and ANY_VALUE in Oracle 21c, and JSON as an alternative workaround.

### Source excerpt

I've blogged about generic ways of getting top 1 or top n per category queries before on this blog. An Oracle specific version in that post used the arcane KEEP syntax: This is a bit difficult to read when you see it for the first time. Think of it as a complicated way to say ... Continue reading Getting Top 1 Values Per Group in Oracle ->

## Replay 2023: Day one

DevFeed: [Replay 2023: Day one](<https://devfeed.tech/articles/replay-2023-day-one-35956.md>)

Original publisher: [Read original article](<https://temporal.io/blog/replay-day-one>)

Author: Rob Holland

Published: 2023-09-14T07:00:00Z

Content type: article

Language: en

Sources: [Temporal Blog](<https://devfeed.tech/sources/temporal-blog.md>)

Topics: [Development](<https://devfeed.tech/topics/development.md>), [event driven](<https://devfeed.tech/topics/event-driven.md>), [Code generation](<https://devfeed.tech/topics/code-generation.md>), [API](<https://devfeed.tech/topics/api.md>), [Kafka](<https://devfeed.tech/topics/kafka.md>), [Retool](<https://devfeed.tech/topics/retool.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [stripe](<https://devfeed.tech/topics/stripe.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [community](<https://devfeed.tech/tags/community.md>), [event-driven-architecture](<https://devfeed.tech/tags/event-driven-architecture.md>), [http](<https://devfeed.tech/tags/http.md>), [kafka](<https://devfeed.tech/tags/kafka.md>), [latency](<https://devfeed.tech/tags/latency.md>), [launches](<https://devfeed.tech/tags/launches.md>), [product-launches](<https://devfeed.tech/tags/product-launches.md>), [retool](<https://devfeed.tech/tags/retool.md>), [stripe](<https://devfeed.tech/tags/stripe.md>), [temporal](<https://devfeed.tech/tags/temporal.md>)

### AI overview

A recap of the first day of Replay 2023 covers Temporal's Durable Execution, product announcements, and customer presentations from Yum! Brands, Twilio, Retool, HashiCorp, and Stripe. The talks describe workflow migration, compliance adoption, DAG execution performance, code generation, and Kafka cluster management.

### Source excerpt

Replay 2023 Day 1 highlights: Temporal's Durable Execution, product launches, and insights from Yum! Brands, Twilio, Stripe, Datadog & more.

## Migrating Kafka topics without downtime

DevFeed: [Migrating Kafka topics without downtime](<https://devfeed.tech/articles/migrating-kafka-topics-without-downtime-39620.md>)

Original publisher: [Read original article](<https://www.gauravsarma.com/posts/2022-09-15_Migrating-Kafka-topics-without-downtime-f863819cfb3d>)

Published: 2022-09-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [Gaurav Sarma's Blog](<https://devfeed.tech/sources/gaurav-sarma-s-blog.md>)

Topics: [Kafka](<https://devfeed.tech/topics/kafka.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>), [version](<https://devfeed.tech/topics/version.md>)

Tags: [downtime](<https://devfeed.tech/tags/downtime.md>), [kafka](<https://devfeed.tech/tags/kafka.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [partition](<https://devfeed.tech/tags/partition.md>), [versioning](<https://devfeed.tech/tags/versioning.md>)

### AI overview

A tutorial for migrating Kafka topics by creating versioned replacement topics, redirecting publishers and consumers, and draining the old topics. It explains how partition counts affect ordering, concurrency, scalability, and management overhead, and notes that the author did not find a direct tool for migration without downtime.

### Source excerpt

Each kafka topic defines the number of partitions and replication factors when it's created. However, once a topic is created, the partition count cannot be changed without affecting the ordering guarantees of the kafka partitions since kafka uses the following formula to calculate which partition a record should go to: partition\_id = partition\_key % number of partitions Kafka partitions are the gateway to concurrency and scalability...

## Changing SELECT .. FROM Into FROM .. SELECT Does Not "Fix" SQL

DevFeed: [Changing SELECT .. FROM Into FROM .. SELECT Does Not "Fix" SQL](<https://devfeed.tech/articles/changing-select-from-into-from-select-does-not-fix-sql-28934.md>)

Original publisher: [Read original article](<https://blog.jooq.org/changing-select-from-into-from-select-does-not-fix-sql/>)

Author: lukaseder

Published: 2022-05-31T08:39:55Z

Content type: opinion

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-development](<https://devfeed.tech/tags/jooq-development.md>), [operations](<https://devfeed.tech/tags/operations.md>), [order-of-operations](<https://devfeed.tech/tags/order-of-operations.md>), [rdbms](<https://devfeed.tech/tags/rdbms.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sql-syntax](<https://devfeed.tech/tags/sql-syntax.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

### AI overview

The article examines the difference between SQL's lexical order, such as SELECT .. FROM, and its logical order of operations, such as FROM .. SELECT. It argues that changing the syntax would improve logical consistency but would not fully fix SQL, and discusses jOOQ's support for alternative forms and variations across database systems.

### Source excerpt

Every now and then, I see folks lament the SQL syntax's peculiar disconnect between the lexical order of operations (SELECT .. FROM) the logical order of operations (FROM .. SELECT) Most recently here in a Youtube comment reply to a recent jOOQ/kotlin talk. Let's look at why jOOQ didn't fall into this trap of trying ... Continue reading Changing SELECT .. FROM Into FROM .. SELECT Does Not "Fix" SQL ->

## Tony's rules for Gradle plugin authors

DevFeed: [Tony's rules for Gradle plugin authors](<https://devfeed.tech/articles/tony-s-rules-for-gradle-plugin-authors-30467.md>)

Original publisher: [Read original article](<https://dev.to/autonomousapps/tonys-rules-for-gradle-plugin-authors-28k3>)

Author: Tony Robalik

Published: 2022-04-25T01:30:01Z

Content type: tutorial

Language: en

Sources: [DEV Community: Tony Robalik](<https://devfeed.tech/sources/dev-community-tony-robalik.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [debug](<https://devfeed.tech/topics/debug.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [coding](<https://devfeed.tech/tags/coding.md>), [community](<https://devfeed.tech/tags/community.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [container](<https://devfeed.tech/tags/container.md>), [context](<https://devfeed.tech/tags/context.md>), [debug](<https://devfeed.tech/tags/debug.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [development](<https://devfeed.tech/tags/development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [inclusive](<https://devfeed.tech/tags/inclusive.md>), [lazy](<https://devfeed.tech/tags/lazy.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [releases](<https://devfeed.tech/tags/releases.md>), [rules](<https://devfeed.tech/tags/rules.md>), [software](<https://devfeed.tech/tags/software.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

An advisory article for Gradle plugin authors that presents practical rules for separating configuration and execution, using lazy configuration and callbacks, avoiding cross-project configuration and internal APIs, and designing stable public APIs.

### Source excerpt

The Gradle API surface is huge. It is also littered with unspoken rules whose enforcement mechanism is inscrutable runtime failures. I want to say "we can do better," but really, we can't. The best we can do at present is mitigate by internalizing the following rules. A rule by any other name I call these "rules," but in many cases they can be only guidelines. Sometimes we have to break a rule because there really is no other way to achieve our goals. Nevertheless, the following rules were all learned the hard way, and should only be violated consciously. The rules An important bit of context for the following is that a Gradle build is divided into two1 primary phases: configuration and execution. Most of the rules are about what it is permissible to do in one phase or the other. Each phase carries with it different restrictions. Don't do expensive computations in the configuration phase It slows down the build. Such computations should be encapsulated in a task action. Avoid the create method on Gradle's container types Use register instead. Avoid the all callback on Gradle's container types Use configureEach instead. Don't assume your plugin is applied after another Instead, use pluginManager.withPlugin(). Avoid making any ordering assumptions of any kind Lazy configuration, callbacks, and provider chains are the name of the game. Don't access a Project instance inside a task action It breaks the configuration cache, and will eventually be deprecated. Don't access another project's Project instance This is called cross-project configuration and is extremely fragile. It creates implicit, nearly un-modelable dependencies between projects and can only lead to grief. Instead, share artifacts across projects by declaring dependencies. It also breaks the experimental project isolation feature, but that won't be truly relevant for a while. Avoid afterEvaluate It introduces subtle ordering issues which can be very challenging to debug. What you're looking for is probably

## Rust atomics on x86: How and why

DevFeed: [Rust atomics on x86: How and why](<https://devfeed.tech/articles/rust-atomics-on-x86-how-and-why-35457.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/rust-atomics-on-x86/>)

Author: Graham King

Published: 2022-01-30T23:18:06Z

Content type: article

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [x86](<https://devfeed.tech/topics/x86.md>), [ordering](<https://devfeed.tech/topics/ordering.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [atomic](<https://devfeed.tech/tags/atomic.md>), [atomics](<https://devfeed.tech/tags/atomics.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>), [x86](<https://devfeed.tech/tags/x86.md>)

### AI overview

This article examines how Rust atomic memory orderings compile on x86. It finds that load and store operations generally produce the same instructions across orderings, while sequential consistency adds a full memory barrier. Read-modify-write operations also generally use the same instructions, though compiler reordering remains an important caveat.

### Source excerpt

On x86 it doesn't really matter what sync::atomic::Ordering you choose.

## I have joined Delivery Hero!

DevFeed: [I have joined Delivery Hero!](<https://devfeed.tech/articles/i-have-joined-delivery-hero-28382.md>)

Original publisher: [Read original article](<https://siddroid.com/post/post-i-have-joined-delivery-hero-in-berlin-germany/>)

Author: Siddhesh Patil

Published: 2021-11-11T12:21:39Z

Content type: opinion

Language: en

Sources: [Sid Patil - Android Engineer and Kotlin Advocate](<https://devfeed.tech/sources/sid-patil-android-engineer-and-kotlin-advocate.md>)

Topics: [ordering](<https://devfeed.tech/topics/ordering.md>), [Android](<https://devfeed.tech/topics/android.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [android-engineer](<https://devfeed.tech/tags/android-engineer.md>), [berlin](<https://devfeed.tech/tags/berlin.md>), [career](<https://devfeed.tech/tags/career.md>), [career-update](<https://devfeed.tech/tags/career-update.md>), [delivery-hero](<https://devfeed.tech/tags/delivery-hero.md>), [deliveryhero](<https://devfeed.tech/tags/deliveryhero.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [food](<https://devfeed.tech/tags/food.md>), [food-delivery-apps-in-berlin](<https://devfeed.tech/tags/food-delivery-apps-in-berlin.md>), [foodora](<https://devfeed.tech/tags/foodora.md>), [foodpanda](<https://devfeed.tech/tags/foodpanda.md>), [germany](<https://devfeed.tech/tags/germany.md>), [new-job](<https://devfeed.tech/tags/new-job.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [orders](<https://devfeed.tech/tags/orders.md>), [pandora](<https://devfeed.tech/tags/pandora.md>), [patil](<https://devfeed.tech/tags/patil.md>), [paytm](<https://devfeed.tech/tags/paytm.md>), [paytm-insider](<https://devfeed.tech/tags/paytm-insider.md>), [q-commerce](<https://devfeed.tech/tags/q-commerce.md>), [sid-patil](<https://devfeed.tech/tags/sid-patil.md>), [siddhesh](<https://devfeed.tech/tags/siddhesh.md>)

### AI overview

The author announces joining Delivery Hero and relocating to Berlin, Germany. They describe their previous work on Paytm's chat-based payment experience and say they will build food ordering experiences as an Android engineer in Delivery Hero's tech division.

### Source excerpt

Super excited to share that I have joined Delivery Hero and relocated to Berlin, Germany. For the next chapter of my career, I will be helping shape ordering experiences of multiple food delivery and Q-commerce apps.

## CPU Out-of-Order Instruction Execution and Memory Ordering

DevFeed: [CPU Out-of-Order Instruction Execution and Memory Ordering](<https://devfeed.tech/articles/cpu-silently-disappointed-with-your-choice-of-instruction-ordering-35386.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/cpu-silently-disappointed-with-your-choice-of-instruction-ordering/>)

Author: Graham King

Published: 2021-06-09T23:10:34Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [cpu](<https://devfeed.tech/topics/cpu.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Rust](<https://devfeed.tech/topics/rust.md>)

Tags: [cpu](<https://devfeed.tech/tags/cpu.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

A tutorial explores CPU out-of-order instruction execution through a two-thread example where both reads can observe zero. It discusses how the behavior is affected by cores, Rust memory ordering, and a Mutex.

### Source excerpt

An adventure in CPU out-of-order instruction execution.

## Timing-safe memcmp and API parity

DevFeed: [Timing-safe memcmp and API parity](<https://devfeed.tech/articles/timing-safe-memcmp-and-api-parity-36633.md>)

Original publisher: [Read original article](<https://rdist.root.org/2014/06/24/timing-safe-memcmp-and-api-parity/>)

Author: Nate Lawson

Published: 2014-06-24T12:03:33Z

Content type: opinion

Language: en

Sources: [rdist](<https://devfeed.tech/sources/rdist.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [C](<https://devfeed.tech/topics/c.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [vulnerability](<https://devfeed.tech/topics/vulnerability.md>), [ordering](<https://devfeed.tech/topics/ordering.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [assembly](<https://devfeed.tech/tags/assembly.md>), [branch-prediction](<https://devfeed.tech/tags/branch-prediction.md>), [c](<https://devfeed.tech/tags/c.md>), [cache](<https://devfeed.tech/tags/cache.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [developers](<https://devfeed.tech/tags/developers.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [performance](<https://devfeed.tech/tags/performance.md>), [security](<https://devfeed.tech/tags/security.md>), [timing](<https://devfeed.tech/tags/timing.md>)

### AI overview

The article discusses OpenBSD's timing-safe bcmp and memcmp APIs. It supports simpler constant-time equality comparison but questions timing-safe ordered comparison because compiler and CPU behavior may undermine its guarantees and because ordering secret data can indicate larger architectural problems.

### Source excerpt

OpenBSD released a new API with a timing-safe bcmp and memcmp. I strongly agree with their strategy of encouraging developers to adopt "safe" APIs, even at a slight performance loss. The strlcpy/strlcat family of functions they pioneered have been immensely helpful against overflows. Data-independent timing routines are extremely hard to get right, and the farther you are from ... Continue reading Timing-safe memcmp and API parity

## My SQL Bad Habits

DevFeed: [My SQL Bad Habits](<https://devfeed.tech/articles/my-sql-bad-habits-41139.md>)

Original publisher: [Read original article](<https://www.craigkerstiens.com/2013/05/26/My-SQL-Bad-Habits/>)

Author: Map

Published: 2013-05-26T20:55:56Z

Content type: opinion

Language: en

Sources: [Craig Kerstiens](<https://devfeed.tech/sources/craig-kerstiens.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [syntax](<https://devfeed.tech/topics/syntax.md>), [JOIN](<https://devfeed.tech/topics/join.md>), [ordering](<https://devfeed.tech/topics/ordering.md>)

Tags: [implicit-joins](<https://devfeed.tech/tags/implicit-joins.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [query](<https://devfeed.tech/tags/query.md>), [sql](<https://devfeed.tech/tags/sql.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [tables](<https://devfeed.tech/tags/tables.md>)

### AI overview

The author discusses personal SQL bad habits that can make queries less clear or more error-prone. The article covers ordering or grouping by column numbers, implicit joins, insufficient comments, and manually generated lists used for filtering.

### Source excerpt

I'm reasonably proficient at SQL - a coworker when pseudocoding some logic for him pointed out that my pseudocode is what he thought was executable SQL. I'm fully capable of writing clear and readable SQL - which most SQL is not. Despite that I still have several bad habits when it comes to SQL. Without further adieu heres some of my dirty laundry so hopefully others can not make the same mistakes. Order/Group by Column Numbers When quickly iterating on a query its a lot less typing to put the column number as the thing you want to order by. Here's a quick lightweight example: SELECT email, created_at FROM users ORDER BY 2 DESC LIMIT 5; This gives me my last 5 users that have signed up for my site. Of course as soon as I have this I may want to add some data to it, like their first name so I can send them a welcome email. I quickly alter the query to: SELECT email, first_name, created_at FROM users ORDER BY 2 DESC LIMIT 5; And now I have 5 users that have signed up ordered by their first name. Sure its obvious when you have 1 column you're ordering by, but when you have GROUP BY 1, 2, 3, 4, 5, 6 which is actually open in one of my tabs currently its a bit more confusing.... Though if you really want to have some fun, share a query with someone that looks something like this: SELECT email as "3", first_name "2", created_at "1" FROM users ORDER BY "1", "3" DESC LIMIT 5; Implicit Joins I seldom use the syntax INNER JOIN. Instead I simply put the two tables in my where clause and ensure I have a where condition. The problem with ensuring I have a where condition is sometimes I don't, especially when you're dealing with 3 tables. SELECT email, product.name, product.price FROM users, orders, items WHERE users.id = orders.user_id AND orders.id = items.order_id Is less clear (especially when dealing with 5-6 tables) than the alternative: SELECT email, product.name, product.price FROM users INNER JOIN orders on users.id = orders.user_id INNER JOIN items on orders.id = items.or

## Well Orderings and Search

DevFeed: [Well Orderings and Search](<https://devfeed.tech/articles/well-orderings-and-search-40202.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2011/06/14/well-orderings-and-search/>)

Published: 2011-06-14T11:18:04Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Sorting](<https://devfeed.tech/topics/sorting.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [axiom-of-choice](<https://devfeed.tech/tags/axiom-of-choice.md>), [binary-search](<https://devfeed.tech/tags/binary-search.md>), [mathematica](<https://devfeed.tech/tags/mathematica.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [pseudocode](<https://devfeed.tech/tags/pseudocode.md>), [recursion](<https://devfeed.tech/tags/recursion.md>), [sorting](<https://devfeed.tech/tags/sorting.md>), [well-ordering](<https://devfeed.tech/tags/well-ordering.md>)

### AI overview

This tutorial explains binary search on sorted lists, including its recursive structure and O(log n) runtime. It then introduces strict total and well orders to explain why sorting and comparison work.

### Source excerpt

Binary Search Binary search is perhaps the first and most basic nontrivial algorithm a student learns. For the mathematicians out there, binary search is a fast procedure to determine whether a sorted list contains a particular element. Here is a pseudocode implementation: # Binary Search: # Given a list L, sorted via the total order <, and a sought # element x, return true iff L contains x. function binarySearch(L, x, <): # base case if(length(L) == 1): return L[0] == x middleIndex = floor(length(L) / 2) if (L[middleIndex] == x): return true # inductive step, with ellipsis notation meaning slices of L # from the beginning and to the end, respectively if (x < L[middleIndex]): return binarySort(L[.

## Window Functions example

DevFeed: [Window Functions example](<https://devfeed.tech/articles/window-functions-example-34394.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2010/09/window-functions-example/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2010-09-09T14:35:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [function](<https://devfeed.tech/tags/function.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [partitioning](<https://devfeed.tech/tags/partitioning.md>), [query](<https://devfeed.tech/tags/query.md>), [sql](<https://devfeed.tech/tags/sql.md>), [window-functions](<https://devfeed.tech/tags/window-functions.md>)

### AI overview

This tutorial demonstrates how SQL window functions can identify changes in a column by comparing ordered rows with preceding values. It also discusses an initial false change and how to accommodate it.

### Source excerpt

So, when 8.4 came out there was all those comments about how getting window functions was an awesome addition. Now, it seems that a lot of people seeking for help in #postgresql just don't know what kind of problem this feature helps solving. I've already been using them in some cases here in this blog, for getting some nice overview about Partitioning: relation size per "group". *That's another way to count change* Now, another example use case rose on IRC today. I'll quote directly our user here:

[Next page](<https://devfeed.tech/topics/ordering.md?cursor=WyIyMDEwLTA5LTA5VDE0OjM1OjAwKzAwOjAwIiwgIjA3MzE4NzNmLWY4MmYtNGM2Yy04Yjg3LTEyZmQzNmM2OTA4YSJd>)