# Code Ahoy - Articles

Essays on software engineering and leadership by Umer Mansoor.

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

## When Not to RAG - Don't Tell the LLM What It Already Knows

DevFeed: [When Not to RAG - Don't Tell the LLM What It Already Knows](<https://devfeed.tech/articles/when-not-to-rag-don-t-tell-the-llm-what-it-already-knows-122510.md>)

Original publisher: [Read original article](<https://codeahoy.com/2024/09/18/you-dont-always-need-rag/>)

Author: Umer Mansoor

Published: 2024-09-18T00:00:00Z

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Retrieval Augmented Generation (RAG)](<https://devfeed.tech/topics/retrieval-augmented-generation-rag.md>), [AI Chat](<https://devfeed.tech/topics/ai-chat.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Streaming](<https://devfeed.tech/topics/streaming.md>), [AI Context Management](<https://devfeed.tech/topics/ai-context-management.md>), [knowledge cutoff](<https://devfeed.tech/topics/knowledge-cutoff.md>), [LLM observability](<https://devfeed.tech/topics/llm-observability.md>)

Tags: [ai-chat](<https://devfeed.tech/tags/ai-chat.md>), [chat](<https://devfeed.tech/tags/chat.md>), [edtech](<https://devfeed.tech/tags/edtech.md>), [llm](<https://devfeed.tech/tags/llm.md>), [pinecone](<https://devfeed.tech/tags/pinecone.md>), [rag](<https://devfeed.tech/tags/rag.md>), [retrieval](<https://devfeed.tech/tags/retrieval.md>), [retrieval-augmented-generation](<https://devfeed.tech/tags/retrieval-augmented-generation.md>), [search](<https://devfeed.tech/tags/search.md>), [semantic-search](<https://devfeed.tech/tags/semantic-search.md>)

### AI overview

The article argues that RAG should be selective: models can answer many general questions without retrieved context, while private, frequently changing, or citation-dependent information can require it. In an education chat product, retrieving documents for every query added latency and sometimes made otherwise sound answers strange. The team routed general questions to the model without RAG, moved its response judge off the blocking path for asynchronous review, and injected concise course details into prompts. It also ran document search in parallel and displayed results as related materials. In an A/B test, the changes improved latency and reduced student abandonment, while document clickthrough rose. The author cautions that retrieval adds latency, API cost, and risk of degrading answers; judges can impede streaming. The account favors revisiting these tradeoffs as models improve and notes that grounding depends on high-quality source material.

### Source excerpt

Let me try to describe RAG, or Retrieval Augmented Generation, in one sentence: before you ask the LLM a question, you go find some documents that might help and paste them into the prompt as supporting evidence. When a student asks an LLM what a derivative is, the LLM gives a great response on its own. It has read more math and calculus books than any of us ever will. It doesn't need the Wikipedia page on derivatives as supporting evidence. Now imagine the same student asking 'what's on my MATH 101 midterm next week?' The LLM has no clue. The MATH 101 syllabus that was updated at the start of the semester wasn't part of the model's training data. This is what RAG fixes. RAG is a good technique. It's also easy to overuse. In this blog post, let's look at what overusing RAG did to one product experience. Context Suppose you are a hands-on manager of multiple teams at an Edtech company. After yet another reorg as AI eats away your business, you've just inherited the AI team. Some months earlier, the team shipped an AI chat for students, which is also yours now. This is how the system works: A student sends a chat message. A tiny classifier model detects intent. Semantic search runs over the document library (RAG) to find relevant documents. The best chunks are sent to the LLM along with the system prompt and the student's message (RAG). The LLM's response goes through a judge (another LLM call). The response is sent to the student. That's a lot of steps for a single response. Worse yet, none of the calls were parallelized. Let's look at some rough numbers. The classifier is very fast and takes a few 100 milliseconds. The semantic search (Pinecone) adds another 300-500ms. The main LLM call, with 3-4k tokens of context, adds 6-8 seconds. Then comes the judge. An older, smaller model to keep costs down. It has a rubric in its system prompt and grades the response against the query and the rubric, adding another 3-5s. Average response takes about 10 seconds. Your design t

## Reciprocal Rank Fusion 0 Merging Search Results in Hybrid Search

DevFeed: [Reciprocal Rank Fusion 0 Merging Search Results in Hybrid Search](<https://devfeed.tech/articles/reciprocal-rank-fusion-0-merging-search-results-in-hybrid-search-122105.md>)

Original publisher: [Read original article](<https://codeahoy.com/2023/12/28/reciprocal-rank-fusion/>)

Author: umer

Published: 2023-12-28T00:00:00Z

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [hybrid-search](<https://devfeed.tech/topics/hybrid-search.md>), [search-engines](<https://devfeed.tech/topics/search-engines.md>), [cosine similarity search](<https://devfeed.tech/topics/cosine-similarity-search.md>), [Embeddings](<https://devfeed.tech/topics/embeddings.md>)

Tags: [bm25](<https://devfeed.tech/tags/bm25.md>), [hybrid-search](<https://devfeed.tech/tags/hybrid-search.md>), [reciprocal-rank-fusion](<https://devfeed.tech/tags/reciprocal-rank-fusion.md>), [search](<https://devfeed.tech/tags/search.md>), [vector](<https://devfeed.tech/tags/vector.md>), [vector-search](<https://devfeed.tech/tags/vector-search.md>)

### AI overview

Reciprocal Rank Fusion (RRF) combines BM25 and vector search results by ranking each document according to its position in each list, avoiding direct comparison of incompatible BM25 scores and cosine similarities. It sums 1/(k + rank), with a missing result contributing zero; the excerpt gives k=60 as the common default. In the example, documents appearing in both lists rank ahead of most single-list results, reflecting RRF's preference for agreement. A larger k reduces the influence of rank gaps. RRF ignores score strength, so low-quality results can still contribute based on position; the excerpt suggests filtering weak results and says retriever weights can be set, but remain fixed across queries. It also describes cross-encoder reranking of the merged, deduplicated top 10 or 20 as an alternative, with roughly 50-150 ms additional cost and latency.

### Source excerpt

Suppose you are building a search engine for study notes. Students will send queries to the search engine and expect a list of matching documents back. You implement keyword search with BM25 which handles queries like 'periodic table of elements' well because the documents you want contain exactly that phrase. You also implement vector search to handle queries like 'how do trees use sunlight to make food' and find documents that describe photosynthesis. BM25 would miss these documents since query terms do not appear in the them. A dense embedding model understands the meaning and will place the query and the photosynthesis document close together. The opposite also happens i.e. a student searching 'Problem set 4' may receive problem sets 3 and 5 from vector search. So to make your search engine return high quality results, you decide to use both BM25 (keyword) and vector search. You index every study document 2x: once in BM25 for keyword matching and once as a dense vector from an embedding model like text-embedding-ada-002 stored in a vector index like Pinecone or FAISS. This solves one problem and creates another. Two lists that use different scores For every query you get 2 ranked lists back. BM25 returns documents with scores like 12.3, 8.2, 7.5. Vector search returns documents with cosine similarities like 0.89, 0.86, 0.84. You want to hand your users the best of both lists, but the two sets of numbers have no relationship to each other. Let's look at an example. Suppose you run this query: 'how do trees use sunlight to make food'. The two indexes return the following results: | Rank | BM25 (score) | Vector (cosine similarity) | |------|--------------| ---------------------------| | 1 | Doc_A (12.3) | Doc_F (0.89) | | 2 | Doc_B (8.2) | Doc_G (0.86) | | 3 | Doc_C (7.5) | Doc_B (0.84) | | 4 | Doc_D (5.1) | Doc_A (0.79) | | 5 | Doc_E (4.4) | Doc_C (0.68) | Doc_A is the top result in BM25 but 4th place in Vector. We need a way to combine the two lists to get the be

## How LLMs Generate Text, One Word at a Time

DevFeed: [How LLMs Generate Text, One Word at a Time](<https://devfeed.tech/articles/how-llms-generate-text-one-word-at-a-time-122703.md>)

Original publisher: [Read original article](<https://codeahoy.com/2023/07/31/llms-intro/>)

Author: Umer Mansoor

Published: 2023-07-31T00:00:00Z

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [generative-ai-tools](<https://devfeed.tech/topics/generative-ai-tools.md>), [AI Chat](<https://devfeed.tech/topics/ai-chat.md>), [context window](<https://devfeed.tech/topics/context-window.md>), [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [about](<https://devfeed.tech/tags/about.md>), [added](<https://devfeed.tech/tags/added.md>), [am](<https://devfeed.tech/tags/am.md>), [book](<https://devfeed.tech/tags/book.md>), [but](<https://devfeed.tech/tags/but.md>), [can](<https://devfeed.tech/tags/can.md>), [column](<https://devfeed.tech/tags/column.md>), [computer](<https://devfeed.tech/tags/computer.md>), [created](<https://devfeed.tech/tags/created.md>), [critical](<https://devfeed.tech/tags/critical.md>), [dating](<https://devfeed.tech/tags/dating.md>), [empathy](<https://devfeed.tech/tags/empathy.md>), [full](<https://devfeed.tech/tags/full.md>), [generate](<https://devfeed.tech/tags/generate.md>), [llms](<https://devfeed.tech/tags/llms.md>), [one](<https://devfeed.tech/tags/one.md>), [text](<https://devfeed.tech/tags/text.md>), [time](<https://devfeed.tech/tags/time.md>), [word](<https://devfeed.tech/tags/word.md>)

### AI overview

The article explains LLM text generation as an autoregressive loop: tokenize the input, calculate probabilities for the next token, select one, append it, and repeat until an end token or length limit. Unlike Mark V. Shaney's two-word lookup table, an LLM uses learned neural-network parameters to estimate next-token probabilities for unseen contexts. The article describes pre-training as next-token prediction, followed by supervised fine-tuning on instruction-response examples and reinforcement learning from human preference rankings. It contrasts greedy selection, which it says can produce bland, repetitive text, with temperature-controlled sampling: lower values favor consistent outputs, while higher values increase randomness. It also notes that generated tokens are fed back as input, enabling streaming but causing longer conversations to become slower and more costly; context limits constrain sequence length.

### Source excerpt

In 1984, someone named Mark V. Shaney started posting on net.singles Usenet (think 80s Reddit). According to one witness: Mark was a member of a UseNet News group called net.singles, a users group chock full of dating tips, lonely heart chatter...Mr Shaney was a little goofy but he was always there. He chimed in with poetic opinions on romantic empathy: "A I've commented before, really relating to someone involves standing next to impossible." And he had a great Groucho Marx sense of humor: "One morning I shot an elephant in my arms and kissed him. So it was too small for a pill? Well, it was too small for a while." And his idea of a good closing was: "Oh, sorry. Nevermind. I am afraid of it becoming another island in a nice suit." ----Mark Here's something else Mark wrote: "I hope that there are sour apples in every bushel." source As you can see, Mark's messages were odd but grammatically correct. He sounds like a person who has been awake for 40 hours wants to get off his chest about relationships. Mark V. Shaney was a computer program. In fact, it was a fairly simple program designed by legendary programmer and author Rob Pike. It read text (a book and some Usenet postings) and created a table with two columns. The 1st column had each pair of words that appeared in the text next to one another, and the 2nd column had the word that came right after. To write a sentence, it looked up the last 2 words it had written, matched in the table, picked one of the words that had followed them in the table, added it, and repeated. Here's what it did. Suppose you "train" it on two sentences: "I am serious because it is critical." "I am happy because it is funny." The program uses a sliding window that slides across words, 2 at a time and writes down what follows them. That is: Last 2 words Followed by I am serious, happy am serious because am happy because serious because it happy because it because it is, is it is critical., funny. Now to generate new text, you pick a pair to

## Semantic Search - Word Embeddings with OpenAI

DevFeed: [Semantic Search - Word Embeddings with OpenAI](<https://devfeed.tech/articles/semantic-search-word-embeddings-with-openai-24996.md>)

Original publisher: [Read original article](<https://codeahoy.com/2023/03/28/semantic-search-intro/>)

Author: umer

Published: 2023-03-28T00:00:00Z

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [search-engines](<https://devfeed.tech/topics/search-engines.md>), [Embeddings](<https://devfeed.tech/topics/embeddings.md>), [AI-driven information retrieval](<https://devfeed.tech/topics/ai-driven-information-retrieval.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [context](<https://devfeed.tech/tags/context.md>), [embeddings](<https://devfeed.tech/tags/embeddings.md>), [meaning](<https://devfeed.tech/tags/meaning.md>), [nlp](<https://devfeed.tech/tags/nlp.md>), [search](<https://devfeed.tech/tags/search.md>), [search-technology](<https://devfeed.tech/tags/search-technology.md>), [semantic-search](<https://devfeed.tech/tags/semantic-search.md>), [vector-databases](<https://devfeed.tech/tags/vector-databases.md>)

### AI overview

Semantic search aims to rank results by the meaning and context of a query, while lexical search matches query words or variants in documents. The excerpt contrasts a lexical search for "computer science intro," which may return items matching only some query terms, with semantic search that would prioritize introductory courses, textbooks, or other foundational learning materials. It says NLP helps analyze context and word relationships, and identifies embeddings with vector databases as another implementation approach; the excerpt does not explain that approach further.

### Source excerpt

According to Wikipedia, Semantic Search denotes search with meaning, as distinguished from lexical search where the search engine looks for literal matches of the query words or variants of them, without understanding the overall meaning of the query. For example a user is searching for the term "jaguar." A traditional keyword-based search engine might return results about the car manufacturer, the animal, or even the Jacksonville Jaguars football team. However, semantic search would analyze the context and intent behind the user's query, such as whether they are interested in cars or wildlife, and then prioritize results accordingly. In this blog post, we will explore the underlying principles of semantic search, discuss its advantages over other types of search, and examine real-world applications that are transforming the way we access and consume information. Lexical Search Engines Lexical (Traditional) search engines have served us well using keyword-based search methods, looking for matching exact words or phrases in users' queries with those in documents/database. For example, if we search for the term "computer science intro" in a lexical / traditional search engine, it will return results that match one or more of my search terms. As you can imagine, the keyword matching approach often falls short when it comes to understanding what the user actually meant, often producing less accurate results. Semantic Search Enter semantic search -- a context-aware search technology that aims to improve search results by focusing on understanding the meaning and context behind queries. When a user inputs the query "computer science intro" in a semantic search engine, it would first attempt to understand the intent behind the query. In this case, the user is likely looking for introductory resources related to computer science. Based on this understanding, the search engine would prioritize search results such as introductory computer science courses or textbooks or other

## Programmatic SEO - Adding Millions of New Visits

DevFeed: [Programmatic SEO - Adding Millions of New Visits](<https://devfeed.tech/articles/programmatic-seo-adding-millions-of-new-visits-24995.md>)

Original publisher: [Read original article](<https://codeahoy.com/2022/07/15/programmatic-seo-millions-of-new-visits/>)

Author: umer

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

Content type: opinion

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Search engine optimization (SEO)](<https://devfeed.tech/topics/seo.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Website](<https://devfeed.tech/topics/website.md>), [Google](<https://devfeed.tech/topics/google.md>), [WordPress](<https://devfeed.tech/topics/wordpress.md>)

Tags: [backend](<https://devfeed.tech/tags/backend.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [google](<https://devfeed.tech/tags/google.md>), [growth](<https://devfeed.tech/tags/growth.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [seo](<https://devfeed.tech/tags/seo.md>), [wordpress](<https://devfeed.tech/tags/wordpress.md>)

### AI overview

The article argues that an engineering team responsible for organic growth was focused mainly on SEO infrastructure and maintenance rather than measurable traffic growth. It describes redirecting the team toward customer outcomes, an owned traffic goal, and meaningful wins, while noting that much existing search traffic was branded.

### Source excerpt

I was a senior engineering manager once at a company that helps job seekers, and one of my teams owned organic growth. It was a (relatively) small team team of very capable engineers front and backend engineers responsible for driving 'organic growth' and traffic. On paper that meant getting more people to the site from Google. But in reality, the team wasn't doing that. They were doing SEO infrastructure and maintenance. Generating sitemaps; keeping the services behind them running. Updating headings and title tags. Reviewing internal links. Owning the 'header' and 'footer'. Owning some low value sections of the website that weren't important to users (or the company). Inheriting work that other teams didn't want e.g. keeping legacy WordPress servers running that were important all but once a year when the company ran its annual awards and increased the traffic many folds. None of it was bad work - and somebody had to do all of it. But they weren't driving anything. There was no number they owned, no goal they were chasing, and nothing coming up that anyone was excited about. The team was a long way from the customer and even further from any outcome they could point at and say we did that. Getting the team closer to the outcome I wanted to change what the team was pointed at. Not their skills, not their headcount, and not how hard they worked. Just what they were aimed at. That meant three things: Get them closer to the customer Get them closer to the outcome, with a number that they actually owned Get them some wins, because a team that hasn't shipped anything meaningful in a while stops believing it can So I went to the VP who owned organic growth and asked a simple question: what are we actually trying to achieve here? Not what tickets need closing. Or how many sitemaps are indexed. What's the goal? The answer was traffic. Real traffic. We looked at the roadmap together and realized that most of the upcoming work was slotted for regular maintenace, SEO infrastr

## Brief Overview of Caching and Cache Invalidation

DevFeed: [Brief Overview of Caching and Cache Invalidation](<https://devfeed.tech/articles/brief-overview-of-caching-and-cache-invalidation-24994.md>)

Original publisher: [Read original article](<https://codeahoy.com/2022/04/03/cache-invalidation/>)

Author: umer

Published: 2022-04-03T00:00:00Z

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Cache](<https://devfeed.tech/topics/cache.md>), [cache-invalidation](<https://devfeed.tech/topics/cache-invalidation.md>), [CPU Cache](<https://devfeed.tech/topics/cpu-cache.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [browser](<https://devfeed.tech/tags/browser.md>), [cache](<https://devfeed.tech/tags/cache.md>), [caching](<https://devfeed.tech/tags/caching.md>), [complex](<https://devfeed.tech/tags/complex.md>), [compute](<https://devfeed.tech/tags/compute.md>), [cost](<https://devfeed.tech/tags/cost.md>), [data](<https://devfeed.tech/tags/data.md>), [data-storage](<https://devfeed.tech/tags/data-storage.md>), [databases](<https://devfeed.tech/tags/databases.md>), [dax](<https://devfeed.tech/tags/dax.md>), [dns](<https://devfeed.tech/tags/dns.md>), [dynamodb](<https://devfeed.tech/tags/dynamodb.md>), [edge](<https://devfeed.tech/tags/edge.md>), [faster](<https://devfeed.tech/tags/faster.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [http](<https://devfeed.tech/tags/http.md>), [information](<https://devfeed.tech/tags/information.md>), [layer](<https://devfeed.tech/tags/layer.md>), [overview](<https://devfeed.tech/tags/overview.md>)

### AI overview

Caching stores a temporary subset of data in a faster layer so applications can retrieve it quickly or avoid repeatedly running expensive computations when fresh information is not needed each time. On a request, an application checks the cache first; on a miss, it fetches or generates the data from the primary store or a service, then saves it for later requests. The excerpt lists examples across hardware, operating systems, databases, APIs, CDNs, DNS, browsers and microservices. It begins an example of costly machine-learning-generated related links, but cuts off before explaining the caching approach or any invalidation methods.

### Source excerpt

Caches are present everywhere: from the lowest to highest levels: There are hardware caches inside your processor cores (L1, L2, L3), Page/Disk cache that our Operating Systems Caches for databases such as using MemCached, Redis or DAX for DynamoDB API caches Layer-7 (Application layer) HTTP caches like Edge level caching in CDNs DNS caching Cache in your browser Microservices can have internal caches to improve their performance for complex and time consuming operations You are reading this post thanks to many intermediary caches I can keep going but you get the point: Caching is ubiquitous. Which begs the question, why do we need caching? Before you scroll down for the answer, take a few seconds to think about the answer. What is a Cache? A cache is a fast data storage layer for storing a subset of data on a temporary basis for a duration of time. Caches are faster than original sources of data so they speed up future data retrievals by accessing the data in cache as opposed to fetching it from the actual storage location. Caches also make data retrievals efficient by avoiding complex or resource intensive operations to compute the data. When the application needs data, it first checks if it exists in the cache. It if does, the data is read directly from the cache. If the data is not in cache, it is read from primary data store or generated by services. Once the data is fetched, it is stored in the cache so for future requests, it can be fetched from the cache. Why do we need Caching? Typically, there are two main reasons for caching data: We cache things when the cost of generating some information is high (resource intensive) and we don't need fresh information each time. We can calculate the information once, and then store it for a period of time and return the cached version to the users. Arguably the top reason why we use caching is to speed up data retrieval. Caches are faster than original sources of data and cached information can be retrieved quickly res

## Code Reviews During Emergencies

DevFeed: [Code Reviews During Emergencies](<https://devfeed.tech/articles/code-reviews-during-emergencies-24992.md>)

Original publisher: [Read original article](<https://codeahoy.com/2022/01/01/emergency-code-reviews/>)

Author: umer

Published: 2022-01-01T00:00:00Z

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Code review](<https://devfeed.tech/topics/code-review.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>), [software-development](<https://devfeed.tech/topics/software-development.md>)

Tags: [away](<https://devfeed.tech/tags/away.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [bug](<https://devfeed.tech/tags/bug.md>), [changes](<https://devfeed.tech/tags/changes.md>), [code-review](<https://devfeed.tech/tags/code-review.md>), [code-reviews](<https://devfeed.tech/tags/code-reviews.md>), [emergency](<https://devfeed.tech/tags/emergency.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [feature](<https://devfeed.tech/tags/feature.md>), [impact](<https://devfeed.tech/tags/impact.md>), [legal](<https://devfeed.tech/tags/legal.md>), [major](<https://devfeed.tech/tags/major.md>), [pr](<https://devfeed.tech/tags/pr.md>), [production](<https://devfeed.tech/tags/production.md>), [pull-request](<https://devfeed.tech/tags/pull-request.md>), [release](<https://devfeed.tech/tags/release.md>), [review](<https://devfeed.tech/tags/review.md>), [security](<https://devfeed.tech/tags/security.md>), [slack](<https://devfeed.tech/tags/slack.md>), [users](<https://devfeed.tech/tags/users.md>)

### AI overview

The excerpt defines emergencies as production bugs affecting users, major security issues, urgent legal concerns, or blockers to a major feature release with significant KPI impact. A looming code freeze, a manager's preference, long hours, or the author's upcoming absence do not usually qualify; delaying a release is an emergency only when delay would cause serious harm. Code changes still need review during emergencies, though the review process should be adapted. The excerpt does not specify how to adapt it.

### Source excerpt

It's 3:40pm on a fine Friday afternoon. You are about to wrap up the main logic for a feature you've been working on for a couple of days when you notice you have unread Slack notifications. One catches your eye in particular: "Hey! Emergency. Need approval on my PR. I have tested everything on dev so if you can quickly approve, I can merge it before the weekend." Emergency. Alright, they have your attention. You could stop what you are doing and do a superficial code review on their pull request (PR) because after all, it's an emergency. But you are curious and fire back seeking to understand the context: "Sure, I can take a look right now. What's the emergency? Is it a bug in production or does the legal team want something updated ASAP?" They reply back right away: "No, I want to merge this code that does <insert something innocuous> because I'm OOO on Monday and want to get this released today" Urgent? Perhaps. But does this constitute an emergency? Definitely not. In this post, we'll discuss how to review code during emergencies. Let's first begin by establishing an understanding of what constitutes a real emergency. Emergencies An emergency is a critical bug in production that's affecting users, a major security issue, an urgent legal concern or something that's blocking a major feature release that has a significant impact on KPIs. I think it's easier to understand if we look at a few examples of what is not an emergency: Not Emergencies The following examples are not emergencies. The author has been working very hard and long hours on the feature and wants to get it out ASAP. It's 30-minutes to the weekend code-freeze deadline so it'll be nice to get it merged. The author's manager told them that it'd be great if they can release the feature this week. The author will be away for the next couple of days. These could relate to urgent situations or special circumstances that could definitely be important. Delaying a release may not be ideal, but it's not usual

## Burnout in Software Development - Survey Results 2021

DevFeed: [Burnout in Software Development - Survey Results 2021](<https://devfeed.tech/articles/burnout-in-software-development-survey-results-2021-24991.md>)

Original publisher: [Read original article](<https://codeahoy.com/2021/10/01/software-developer-burn-out-survey/>)

Author: umer

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

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [software-development](<https://devfeed.tech/topics/software-development.md>)

Tags: [burnout](<https://devfeed.tech/tags/burnout.md>), [covid-19](<https://devfeed.tech/tags/covid-19.md>), [developer](<https://devfeed.tech/tags/developer.md>), [developer-burnout](<https://devfeed.tech/tags/developer-burnout.md>), [developer-survey](<https://devfeed.tech/tags/developer-survey.md>), [development](<https://devfeed.tech/tags/development.md>), [software](<https://devfeed.tech/tags/software.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [survey](<https://devfeed.tech/tags/survey.md>)

### AI overview

The excerpt describes developer burnout as exhaustion from prolonged emotional, physical, and mental stress, often tied to work. It lists warning signs including loss of interest and motivation, persistent fatigue and low energy, sleep problems, and feeling ineffective or hopeless. Possible contributors include heavy workloads, understaffing, unclear goals, insufficient support, limited control over work decisions, and unclear job expectations. The author says burnout may worsen if unrecognized and can take a long time to recover from; the excerpt notes that similar symptoms can occur with depression, which it describes as a clinical condition requiring medical attention. Although the article promises survey results about COVID-era remote work and burnout, those results are not present in the supplied text.

### Source excerpt

Burnout is very common in software development. Intense mental focus, heavy workloads, never ending roadmaps, under-staffed teams, unclear targets, and many other factors lead to developer burnout. I have experienced burnout in my career, perhaps twice. Early on, I had mild symptoms and my manager recognized it and helped me manage it. Later, after a very long stretch of working very long hours, 7 days a week on some super unrealistic goals with very little support, I ended up getting a bad case of burnout. It took me weeks to recover from it. When COVID-19 forced remote work shift began in companies, it was a step in the right direction by giving developers the flexibility to work from anywhere. However, I started hearing more and more about burnout. In this article, I will share results of a developer survey we did to explore if COVID-19 is somehow making the burnout situation worse. What is burnout? Burnout is a form of exhaustion caused by constantly feeling swamped. It's a result of excessive and prolonged emotional, physical, and mental stress. In many cases, burnout is related to one's job. Burnout happens when you're overwhelmed, emotionally drained, and unable to keep up with life's incessant demands. If it sounds very broad, it actually is. Burnout doesn't have a test that your doctor can prescribe and be certain whether you are suffering from it or not. Regardless, if it's not identified and addressed, it will continue to grow until it grinds you down and become the new normal. When that happens, it is not easy to pull yourself back out. It might take many months or even years to shake it off. Here are some of the common symptoms of burnout: You stop enjoying working on things you used to enjoy and lose motivation for weeks. You feel exhausted or fatigued all or most of the time. You have low energy at work and at home. You struggle to sleep and wake up feeling tired. You don't feel a sense of accomplishment or feel sort of hopeless about results. (The sy

## How to use Feature Flags in Node.js

DevFeed: [How to use Feature Flags in Node.js](<https://devfeed.tech/articles/how-to-use-feature-flags-in-node-js-24990.md>)

Original publisher: [Read original article](<https://codeahoy.com/2021/09/12/how-to-use-feature-flags-in-node-js/>)

Author: umer

Published: 2021-09-12T00:00:00Z

Content type: tutorial

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [feature flags](<https://devfeed.tech/topics/feature-flags.md>), [product-experimentation](<https://devfeed.tech/topics/product-experimentation.md>)

Tags: [e-commerce](<https://devfeed.tech/tags/e-commerce.md>), [feature-flagging](<https://devfeed.tech/tags/feature-flagging.md>), [feature-flags](<https://devfeed.tech/tags/feature-flags.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [open-source](<https://devfeed.tech/tags/open-source.md>)

### AI overview

The excerpt shows how to gate a Node.js feature so a flag selects between old and new behavior, using a product sort-order change as its example. It describes targeting internal engineering, QA, or product users by email to receive the "on" variation, then setting a default rule to enable the feature for 10% of users; targeting can also use attributes such as user age or geolocation. The excerpt begins the Unlaunch Node.js SDK integration steps but cuts off before showing the installation command or evaluation code. Unlaunch has since shut down, according to the supplied note.

### Source excerpt

Note: Unlaunch, the feature flagging service referenced in this post, has been shut down. Links to it have been removed. Feature flags (or feature toggles) is a powerful technique used by modern software teams to control the behavior of their code and features in production. Feature flags are used for: rolling new features out gradually branch by abstraction experimentation and testing migrations geographic restrictions permissions or kill switch testing in production In this article, I'll show you how to use feature flag in Node.js. For this example, let's assume we have an e-commerce store and we're implementing a new feature to change the sort order of the items because in our hypothetical example, the marketing team thinks changing the sort order will lead to more revenue. I'll be using an open-source Node project called Crate which is an eCommerce subscription service for trendy clothes and accessories. 1. Put your feature behind feature flag in code First, you'll need to define the new feature in such a way it can be shown or hidden easily. if featureFlag == "on" then // show the new feature: new sort order else // show the old feature: old sort order Once you have wrapped your code (new and old features) in a feature flag, you can easily control the behavior by changing the state of the feature flag or its targeting rules. If the flag is enabled ("on" variation,) we show the new feature. Otherwise, we don't. 2. Create a feature flag Next, create a new feature flag in Unlaunch (Link Removed) that will control the feature you're building. You can call it the "default-sort-order" or "crate-products". Targeting Users A user is any object such as an email address, unique user id, a hash etc. to represent a unique user for which a feature flag is evaluated. Let's define an internal user (engineering, QA or product team member) by email address to always show the "on" variation so they always get the new feature. Targeting Rules The rules that define which variation

## How to Toggle Features in C# with Feature Flags

DevFeed: [How to Toggle Features in C# with Feature Flags](<https://devfeed.tech/articles/how-to-toggle-features-in-c-with-feature-flags-24989.md>)

Original publisher: [Read original article](<https://codeahoy.com/2021/08/26/how-to-toggle-features-in-c-sharp/>)

Author: umer

Published: 2021-08-26T00:00:00Z

Content type: tutorial

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [feature flags](<https://devfeed.tech/topics/feature-flags.md>), [Deployment Strategies](<https://devfeed.tech/topics/deployment-strategies.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [Web app](<https://devfeed.tech/topics/webapp.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>)

Tags: [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [feature-flagging](<https://devfeed.tech/tags/feature-flagging.md>), [feature-flags](<https://devfeed.tech/tags/feature-flags.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [net](<https://devfeed.tech/tags/net.md>), [net-core](<https://devfeed.tech/tags/net-core.md>), [toggle](<https://devfeed.tech/tags/toggle.md>)

### AI overview

Feature flags let teams deploy functionality without making it visible to customers, then control exposure separately from deployment. The excerpt describes using them in .NET Core to enable or hide features on demand, including for production testing, team feedback, rapid rollback if problems arise, and gradual rollout to a small user percentage (canary release). It says flags can hold Boolean values or variations such as "on" and "off," with configuration files or a database as possible storage. The post's tutorial references Unlaunch, but the service has shut down and its links were removed.

### Source excerpt

Note: Unlaunch, the feature flagging service referenced in this post, has been shut down. Links to it have been removed. This blog post was contributed by Tuan Nguyen, Software Developer at Getty Images. Using feature flags to release new features to customers is a powerful technique. I have been using feature flags for many years to release features or changes to production safely and with the peace of mind. The releases are done without any ceremony, and the features aren't visible to customers until we turn the feature flag on. Using feature flags to toggle functionality in .NET Core apps is easily achievable using a feature flag management platform. In this tutorial, I'll show you how to toggle features on demand in a simple web application using Unlaunch (Link Removed) to create and manage feature flags. We'll also see how to show or hide our features with a click of a button, without merging branches, rollbacks or deploys. Feature Flags Feature flags allow developers to control who sees new features irrespective of code deployment. For example, developers can deploy a new feature to production environment and keep it hidden from all users (except themselves.) This way, they can do testing on real systems, and when the management is ready to release the feature, they can turn on the feature flag to let the users in on it. To me, here are some of the benefits of using feature flags: Developers eliminate some of the risk knowing they can roll things back instantly if things go wrong. On a few occasions, I rolled back features because of negative impact to KPI we didn't consider before or one of the underlying system wasn't quite ready. Developers can launch the feature on production behind feature flag and show it to product or marketing team for their feedback. QA in production. This doesn't mean that we skipped testing on the 'Dev' environment, but rather launching the feature on production just for the development team give extra boost of confidence. It also a

## How Postgres Finds a Row - Pages and B-tree Indexes

DevFeed: [How Postgres Finds a Row - Pages and B-tree Indexes](<https://devfeed.tech/articles/how-postgres-finds-a-row-pages-and-b-tree-indexes-110595.md>)

Original publisher: [Read original article](<https://codeahoy.com/2021/04/21/postgres-pages-indexes/>)

Author: umer

Published: 2021-04-21T00:00:00Z

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [rdbms](<https://devfeed.tech/topics/rdbms.md>), [database-optimization](<https://devfeed.tech/topics/database-optimization.md>)

Tags: [b-tree](<https://devfeed.tech/tags/b-tree.md>), [indexes](<https://devfeed.tech/tags/indexes.md>), [pages](<https://devfeed.tech/tags/pages.md>), [postgres](<https://devfeed.tech/tags/postgres.md>)

### AI overview

PostgreSQL stores table data in fixed 8 KB pages and identifies each row by a page-and-slot address. Without an index, it may scan pages sequentially to find a row. A B-tree index keeps sorted keys and row addresses in linked leaf pages, with root and, for larger indexes, internal pages directing the lookup. PostgreSQL follows those pages to find the key, then reads the addressed table page; index leaves contain addresses, not row data. In the excerpt's examples, a one-million-row table lookup reads four pages versus 6,370 for a sequential scan. Small tables may still use a sequential scan when it costs about the same. The text also notes that PostgreSQL's B+tree leaves support range scans and `ORDER BY` by linking leaves in order.

### Source excerpt

Everyone who uses Postgres knows the advice: if a query is slow, add an index. It works. But what happens under the hood? Let's explore that in this blog posts. Let's start with how Postgres stores tables on disk. Postgres stores each table as one file. It reads and writes that file in 8 KB chunks called pages. Page 0 is bytes 0 to 8191 of the file, page 1 is bytes 8192 to 16383, and so on. Nothing is physically split. A page is just an offset. Bytes 0 8192 16384 24576 __________ __________ __________ ___________________ | page 0 | page 1 | page 2 | more pages... | |__________|__________|__________|___________________| 8 KB 8 KB 8 KB Why pages? Two reasons. First, disks and operating systems don't hand out single bytes. Data comes off a disk in fixed-size blocks, usually 4 KB. Ask for one byte and you get the whole block. Postgres had to read in chunks anyway, so it picked 8 KB. The disk read is the slow part. Once a page is in memory, picking rows out of it is cheap, so a bigger page means more rows per slow read. Second, fixed-size pages make every row addressable. Page 88 starts at byte 88 x 8192, always. So Postgres can identify any row by (page, slot), where slot is the row's position within the page. That address is what an index stores. Tables & Pages Let's create a table and insert some rows to see how this works in practice. Let's create a users table and insert nine rows. CREATE TABLE users ( username text, email text ); INSERT INTO users VALUES ('tyler', 'tyler@yz.ab'), ('diego', 'diego@yz.ab'), ('james', 'james@yz.ab'), ('mary', 'mary@yz.ab'), ('ryan', 'ryan@yz.ab'), ('babar', 'babar@yz.ab'), ('ellen', 'ellen@yz.ab'), ('ali', 'ali@yz.ab'), ('pat', 'pat@yz.ab'); Assume each row is about 2.5 KB, so each page fits 3 rows. Rows are inserted in the order they are added so the first 3 rows go on page 0, the next 3 on page 1, and the last 3 on page 2. _________ page 0 _________ _________ page 1 _________ _________ page 2 _________ | (0,1) tyler tyler@yz.ab | |

## The Complete Guide to Feature Flags

DevFeed: [The Complete Guide to Feature Flags](<https://devfeed.tech/articles/the-complete-guide-to-feature-flags-24988.md>)

Original publisher: [Read original article](<https://codeahoy.com/2021/02/27/feature-flags/>)

Author: umer

Published: 2021-02-27T00:00:00Z

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [feature flags](<https://devfeed.tech/topics/feature-flags.md>), [software-development](<https://devfeed.tech/topics/software-development.md>)

Tags: [big-bang](<https://devfeed.tech/tags/big-bang.md>), [boost-developer-productivity](<https://devfeed.tech/tags/boost-developer-productivity.md>), [branch](<https://devfeed.tech/tags/branch.md>), [canary](<https://devfeed.tech/tags/canary.md>), [conditional](<https://devfeed.tech/tags/conditional.md>), [experimentation](<https://devfeed.tech/tags/experimentation.md>), [feature-flagging](<https://devfeed.tech/tags/feature-flagging.md>), [feature-flags](<https://devfeed.tech/tags/feature-flags.md>), [features](<https://devfeed.tech/tags/features.md>), [google](<https://devfeed.tech/tags/google.md>), [oauth](<https://devfeed.tech/tags/oauth.md>), [production](<https://devfeed.tech/tags/production.md>)

### AI overview

Feature flags use conditional code to change system behavior in production without modifying or redeploying code. The excerpt identifies gradual rollouts, production testing, canary launches, and experimentation as possible uses. In its Google sign-in example, approval could take weeks, while merging code to the development branch also triggered production releases. The team wanted to expose the unfinished feature internally for feedback without making it available to production users. The excerpt begins to propose a configuration parameter or environment variable to control the feature, but ends before explaining the implementation.

### Source excerpt

Note: Unlaunch, the feature flagging service referenced in this post, has been shut down. Links to it have been removed. The term feature flags refers to a set of techniques that allow software developers and teams to change the behavior of their system in production without modifying or even deploying code. Because of their ability to modify system behavior on the fly, feature flags are very powerful and versatile. They facilitate many use cases that boost developer productivity and make the user experience better and faster: gradually rolling out new features to users vs big-bang releases, testing in production, canary launches, experimentation and many more. We'll explore feature flag use cases later. But first, let's examine feature flags in depth and see how they work. What is a feature flag? At the core of this amazing concept, lies a dead simple and basic foundation that uses conditional code (if statement) to determine whether to perform an action or not. This is best explained with an example. I'll use a real one that I worked on not too long ago. We wanted to allow our users to sign-in to our site using their Google account. To do this, you first create a developer account with Google and get the OAuth code. The application must be approved by Google before you can use it on your site. Until then, it can only be used in test mode. Traditionally, the code for Google sign-in will be kept in a separate Git branch. When the application is approved by Google, the branch can be merged into develop or main (aka master) so it can be released to users. The challenge was that the verification process may take several weeks. I tested everything locally to make sure it was all working. But I couldn't release it yet, even for internal users. If I merged into develop to deploy the feature on the development environment, it would also release it to production (since release branches were automatically cut off of develop.) To summarize the issue: I wanted to release an un

## Tutorial on using Feature Flags in Java \[Complete Example\]

DevFeed: [Tutorial on using Feature Flags in Java \[Complete Example\]](<https://devfeed.tech/articles/tutorial-on-using-feature-flags-in-java-complete-example-24987.md>)

Original publisher: [Read original article](<https://codeahoy.com/2020/11/22/feature-flags-with-java/>)

Author: umer

Published: 2020-11-22T00:00:00Z

Content type: tutorial

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [feature flags](<https://devfeed.tech/topics/feature-flags.md>), [Java](<https://devfeed.tech/topics/java.md>), [Spring Boot](<https://devfeed.tech/topics/spring-boot.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [API](<https://devfeed.tech/topics/api.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [agile](<https://devfeed.tech/tags/agile.md>), [api](<https://devfeed.tech/tags/api.md>), [backend](<https://devfeed.tech/tags/backend.md>), [database](<https://devfeed.tech/tags/database.md>), [development](<https://devfeed.tech/tags/development.md>), [feature-flags](<https://devfeed.tech/tags/feature-flags.md>), [java](<https://devfeed.tech/tags/java.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [spring](<https://devfeed.tech/tags/spring.md>), [spring-boot](<https://devfeed.tech/tags/spring-boot.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This tutorial explains how feature flags let software teams control feature visibility, gradually roll out changes, test changes in production, and roll back without redeploying. It demonstrates using feature flags in Java with Spring Boot through a backend API example.

### Source excerpt

Note: Unlaunch, the feature flagging service referenced in this post, has been shut down. Links to it have been removed. Feature flags (or feature toggles) is a powerful technique used by modern software teams to manage the behavior of their code in production. Gone are the days when production releases happened occasionally and were a big event. These days, agile teams deliver changes to production continuously, sometimes releasing changes several times a day without any fanfare. Feature flags let teams release their changes to production and stay in full control over who gets to see the changes and when. Using feature flags, you can: deploy changes to production but keep them hidden from everyone but internal users. gradually roll out features to build confidence. if things don't look good (you discover errors), roll back instantly without any code changes to redeploys. test your changes into production. I've been using feature flags for the last 5 years and find them very useful in shipping changes quickly and confidently to millions of users, from infrastructure changes like DB upgrades to UI changes. In this post, we'll see how to use feature flags in Java using Spring Boot. Let's get started. Challenge Suppose you're a software developer working on a backend service: User Profile. There is an API that returns user information from the database, combining it with information retrieved from some other services and sources. One day, you were reviewing the performance of the API and noticed it is very slow and takes up to a second to return response. After some investigation and find the root cause. The delay is being introduced due to the way the service calls other services to get user's status, open orders and pending cancelations: the calls are being made sequentially, that is, one after the other. You think you can improve the performance by parallelizing the calls. In traditional software development, you'd create a new feature branch e.g. feature/JIRA-101-a

## Tech Debt Developer Survey Results 2020 - Impact on Retention

DevFeed: [Tech Debt Developer Survey Results 2020 - Impact on Retention](<https://devfeed.tech/articles/tech-debt-developer-survey-results-2020-impact-on-retention-24986.md>)

Original publisher: [Read original article](<https://codeahoy.com/2020/02/17/technical-debt-survey/>)

Author: umer

Published: 2020-02-17T00:00:00Z

Content type: news

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Tech Debt](<https://devfeed.tech/topics/tech-debt.md>), [developer-productivity](<https://devfeed.tech/topics/developer-productivity.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [engineering-leadership](<https://devfeed.tech/topics/engineering-leadership.md>)

Tags: [2020](<https://devfeed.tech/tags/2020.md>), [developer](<https://devfeed.tech/tags/developer.md>), [developer-survey](<https://devfeed.tech/tags/developer-survey.md>), [impact](<https://devfeed.tech/tags/impact.md>), [results](<https://devfeed.tech/tags/results.md>), [retention](<https://devfeed.tech/tags/retention.md>), [survey](<https://devfeed.tech/tags/survey.md>), [tech](<https://devfeed.tech/tags/tech.md>), [tech-debt](<https://devfeed.tech/tags/tech-debt.md>)

### AI overview

In a February 2020 survey of 117 software developers, 68% said they worked on products with high or very high technical debt, and 50% said they were likely or very likely to leave their jobs because of it; another 27% were unsure. The author frames technical debt as a people and retention concern, saying developers can feel unproductive and consider leaving. Respondents identified examples including poor code, outdated libraries and missing documentation. The sample included 91 web survey responses and 26 people from the author's contacts, mainly senior or lead Java developers in the USA and Canada. The supplied excerpt mentions questions about management awareness and time on the product but does not provide those results.

### Source excerpt

Last month, I wrote a blog post called Technical Debt is Soul-crushing. In it, I discussed the effects of tech debt on software developers and how it makes them unhappy. I wrote it because, being in management for several years now, I have seen how people discuss tech debt as a product or engineering problem. They completely overlook or ignore its impact on people. For software developers, it is very frustrating to work on a codebase that has a high amount of tech debt. They feel unproductive and handicapped. This creates an atmosphere where people start thinking about leaving and they do soon as they find a better option. Because the blog post was getting good amount of traffic (10k views in a week), I decided to add a survey. The survey is closed and the results are in. 68% of Developers Said They Work on Products with High or Very High Amounts of Tech Debt No large software is tech debt free. At least, I haven't come across one in my life. Some have more, others have less. Not a single person said that their product contains 'No tech debt'. 50% of Developers Are Likely or 'Very Likely' to Leave Their Jobs Because of Tech Debt 27% percent indicated that they think about it, but aren't sure. Question: Is Your Management Aware of Tech Debt and Are They Taking Action to Pay It Off? I asked this question to see if there's a correlation between developer dissatisfaction and management or leadership being aware of the problem and taking action to pay it off. Here are the results. Question: How Long Have You Been Working on the Product with Tech Debt? Here are the results. Survey Methodology 117 software developers from all over the world took the survey. The majority were from the USA, followed by Canada, Australia, Germany, India, Russia , UK and other European countries. The survey ran in February 2020. 91 software developers took the web survey. 26 respondents were from my personal contacts. Senior or Lead software developers mainly from the USA and Canada who use Ja

## Technical Debt: Why Shortcuts Increase Complexity and Developer Frustration

DevFeed: [Technical Debt: Why Shortcuts Increase Complexity and Developer Frustration](<https://devfeed.tech/articles/technical-debt-is-soul-crushing-24985.md>)

Original publisher: [Read original article](<https://codeahoy.com/2020/01/25/technical-debt/>)

Author: umer

Published: 2020-01-25T00:00:00Z

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Tech Debt](<https://devfeed.tech/topics/tech-debt.md>), [Software](<https://devfeed.tech/topics/software.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [complexity](<https://devfeed.tech/tags/complexity.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [programming](<https://devfeed.tech/tags/programming.md>), [software](<https://devfeed.tech/tags/software.md>), [tech-debt](<https://devfeed.tech/tags/tech-debt.md>)

### AI overview

The article explains that technical debt results from shortcuts taken to ship features quickly, often increasing system complexity and future maintenance costs. It notes that technical debt can be an intentional trade-off under time or business pressure, but accumulated debt can make development and troubleshooting difficult and demoralizing for developers.

### Source excerpt

Technical debt is incurred when the software or system designers take shortcuts to ship a feature faster, increasing the overall complexity of the system. The goal is to optimize the present rather than the future. In other words, it's the easier path that takes us to the end-goal faster, but the resulting code (or design) is messy and complicated. It will require extra time in the future to add new features or to fix bugs. The most common reason why companies take on technical debt is to meet the time to market demands. "We must release this feature by February, or our revenue will take a big hit. Just hack it for now, and we'll fix it later." Other reasons for incurring tech debt include lousy design choices, poor programming, changing requirements, or the presence of outdated libraries or frameworks that made sense in the past but have become a liability now. Technical debt is not always a bad thing. It can help companies ship a critical feature fast and acquire users more quickly than its competition. My first job was at a startup. We intentionally took on tech debt because a) what we were doing was risky, b) we had a tight deadline to meet or the company would run out of money - no point in writing perfect code if it wasn't going to be ever released. Our tech debt wasn't the opposite of over-engineering. It was an intentional compromise to get the product out of the door on time. We understood that we'd have to pay the debt off or it will make it difficult to maintain and grow the system in the future. Tech Debt is Demoralizing for Software Developers The problem starts when companies forget to pay off the debt and let it creep and pile up for an extended period. The past comes to haunt the present. For good software developers, it is totally demoralizing to work on products that have high tech debt. This aspect isn't often talked about, but its effects are very real. Simple things like changing a title tag of a webpage page take up a whole day because the logi

## GraphQL - A Practical Overview and Hands-On Tutorial

DevFeed: [GraphQL - A Practical Overview and Hands-On Tutorial](<https://devfeed.tech/articles/graphql-a-practical-overview-and-hands-on-tutorial-24984.md>)

Original publisher: [Read original article](<https://codeahoy.com/2019/10/13/graphql-practical-tutorial/>)

Author: umer

Published: 2019-10-13T00:00:00Z

Content type: tutorial

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>), [API](<https://devfeed.tech/topics/api.md>), [REST API](<https://devfeed.tech/topics/rest-api.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [article](<https://devfeed.tech/tags/article.md>), [data](<https://devfeed.tech/tags/data.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [rest](<https://devfeed.tech/tags/rest.md>), [rest-api](<https://devfeed.tech/tags/rest-api.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

A hands-on introduction to GraphQL, explaining how it lets clients query a single API endpoint for precisely the data they need. The article contrasts this approach with the rigidity and over-fetching risks of traditional REST APIs and uses practical examples for beginners.

### Source excerpt

GraphQL is a Query Language for APIs. It provides a fresh and modern approach to fetching (and manipulating) data from APIs when compared to traditional methods such as REST. Its power comes from the ability to let clients talk to a single endpoint and specify precisely what data they need. That's very powerful indeed. This blog post is a hands-on introduction to GraphQL and its important features. When I first encountered GraphQL (we're switching public REST APIs to GraphQL,) coming from REST background, I was baffled. 'Where's the list of API end-points?', 'Is the list of fields documented somewhere?' So I decided to write this article not as a comprehensive overview that deep-dives into internals, but rather to give an understanding of what GraphQL is and how to use it using real examples. It assumes no previous knowledge of GraphQL. Let's get started. GraphQL - An Overview GraphQL - or more specifically - the data query language specification and the runtime for it - was developed by Facebook. It was opened sourced it in 2015, after a few years of internal use at Facebook. What inspired the need for GraphQL? Here's an excerpt from the Facebook engineering blog: As we transitioned to natively implemented models and views, we found ourselves for the first time needing an API data version of News Feed -- which up until that point had only been delivered as HTML. We evaluated our options for delivering News Feed data to our mobile apps, including RESTful server resources ... We were frustrated with the differences between the data we wanted to use in our apps and the server queries they required. Once you build and expose a REST API, it's pretty rigid. For example, suppose we have built a News Feed RESTful API which is returning 10 attributes for each item in the news feed. Down the road, you are building a mobile app for low-tier devices that don't have the screen real-estate to show the news feed in all its glory. So instead of showing all 10 attributes for each news

## == vs === in Javascript and Which Should be Used When

DevFeed: [== vs === in Javascript and Which Should be Used When](<https://devfeed.tech/articles/vs-in-javascript-and-which-should-be-used-when-122511.md>)

Original publisher: [Read original article](<https://codeahoy.com/javascript/2019/10/12/==-vs-===-in-javascript/>)

Author: Umer Mansoor

Published: 2019-10-12T00:00:00Z

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [equals](<https://devfeed.tech/topics/equals.md>), [type coercion](<https://devfeed.tech/topics/type-coercion.md>)

Tags: [abstract](<https://devfeed.tech/tags/abstract.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [conversion](<https://devfeed.tech/tags/conversion.md>), [ecmascript](<https://devfeed.tech/tags/ecmascript.md>), [equality](<https://devfeed.tech/tags/equality.md>), [identity](<https://devfeed.tech/tags/identity.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [number](<https://devfeed.tech/tags/number.md>), [operators](<https://devfeed.tech/tags/operators.md>), [performance](<https://devfeed.tech/tags/performance.md>), [string](<https://devfeed.tech/tags/string.md>), [type-coercion](<https://devfeed.tech/tags/type-coercion.md>), [types](<https://devfeed.tech/tags/types.md>), [variables](<https://devfeed.tech/tags/variables.md>)

### AI overview

`==` coerces values to a common type before comparison, so `1 == "1"` is true; `===` checks both type and value, so `1 === "1"` is false. The text recommends `===` by default and `==` only when coercion is needed, since `==` can produce surprising results; it says performance differences are negligible and vary across browsers. For arrays and other reference types, matching contents do not make separately created objects equal. `Object.is()` behaves like `===` except that it treats `NaN` as equal to itself and distinguishes `+0` from `-0`. The corresponding inequality operators are `!=` (with coercion) and `!==` (strict).

### Source excerpt

In Javascript, we have couple of options for checking equality: == (Double equals operator): Known as the equality or abstract comparison operator === (Triple equals operator): Known as the identity or strict comparison operator In this post, we'll explore the similarities and differences between these operators. Let's declare two variables foo and bar and compare them using both operators. var foo = 13; var bar = 13; console.log(foo == bar); // true console.log(foo === bar); // also true In the above example, both operators returned the same answer i.e. true. So what's the difference? The Difference between == and === The difference between == and === is that: == converts the variable values to the same type before performing comparison. This is called type coercion. === does not do any type conversion (coercion) and returns true only if both values and types are identical for the two variables being compared. Let's take a look at another example: var one = 1; var one_again = 1; var one_string = "1"; // note: this is string console.log(one == one_again); // true console.log(one === one_again); // true console.log(one == one_string); // true. See below for explanation. console.log(one === one_string); // false. See below for explanation. Line 7: console.log(one == one_string) returns true because both variables, one and one_string contain the same value even though they have different types: one is of type Number whereas one_string is String. But since the == operator does type coercion, the result is true. Line 8: console.log(one === one_string) returns false because the types of variables are different. Is === Faster than ==? A Quick Look at the Performance of the Two Operators In theory, when comparing variables with identical types, the performance should be similar across both operators because they use the same algorithm. When the types are different, triple equals operator (===) should perform better than double equals (==) because it doesn't have to do the e

## How Docker Works? Under the Hood Look at How Containers Work on Linux

DevFeed: [How Docker Works? Under the Hood Look at How Containers Work on Linux](<https://devfeed.tech/articles/how-docker-works-under-the-hood-look-at-how-containers-work-on-linux-24983.md>)

Original publisher: [Read original article](<https://codeahoy.com/2019/04/12/what-are-containers-a-simple-guide-to-containerization-and-how-docker-works/>)

Author: umer

Published: 2019-04-12T00:00:00Z

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Docker](<https://devfeed.tech/topics/docker.md>), [container](<https://devfeed.tech/topics/container.md>), [virtualization](<https://devfeed.tech/topics/virtualization.md>), [virtual machines](<https://devfeed.tech/topics/virtual-machines.md>), [Process](<https://devfeed.tech/topics/process.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>)

Tags: [containerization](<https://devfeed.tech/tags/containerization.md>), [containers](<https://devfeed.tech/tags/containers.md>), [docker](<https://devfeed.tech/tags/docker.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [operating-system](<https://devfeed.tech/tags/operating-system.md>), [process](<https://devfeed.tech/tags/process.md>), [processes](<https://devfeed.tech/tags/processes.md>)

### AI overview

The excerpt explains containers as a way to isolate applications that need different dependency versions without running a separate guest operating system for each, as virtual machines do. Its example has Foo needing Node.js 10 and Bar needing Node.js 15; a container runtime intercepts their questions to the operating system and supplies customized answers, such as a Node version and executable location. The excerpt ends mid-explanation, so it does not establish how the isolation is implemented in detail.

### Source excerpt

Docker is awesome. It enables software developers to package, ship and run their applications anywhere without having to worry about setup or dependencies. Combined with Kubernetes, it becomes even more powerful for streamlining cluster deployments and management. I digress. Back to Docker. Docker is loved by software developers and its adoption rate has been remarkable. In this post, we'll look at how Docker works under the hood. Docker uses a technology called "Containerization" to do its magic and that's what we are going to explore next. Why Do We Need Containers? Let's say you want to run a software Foo on your computer. Foo requires Node.js version 10 (assume Foo is incompatible with newer Node.js versions), so you install Node 10 on your machine. Later, you want to run another software, Bar, which requires Node.js version 15. This has created a problem. (Assume we can't use nvm to switch between Node versions easily.) One way we could solve this problem is by using Virtual Machines or VMs to create isolated environments for running Foo and Bar. You can create one VM with Foo and Node 10 and another with Bar and Node 15. Voila, we are back in business. However, there's an issue with this approach: it's very inefficient. Each VM requires its own operating system. We are now running two separate guest operating systems on our computer just to run two different processes. What if there was a way to run Foo and Bar and your machine without running two extra operating systems? Let's review the interaction between processes and operating system. Whenever a process wants to do anything, it asks the operating system. Processes like Foo and Bar would ask the OS questions like, "which Node version do you have installed?" or "how much memory is available to me?" or "what other processes are running?" What if we could intercept and control the communication between processes and operating systems and send customized responses to processes to control their behavior? For ex

## Avoiding Overengineering: Choose Architecture and Databases for the Job

DevFeed: [Avoiding Overengineering: Choose Architecture and Databases for the Job](<https://devfeed.tech/articles/yagni-cargo-cult-and-overengineering-the-planes-won-t-land-just-because-you-built-a-runway-in-your-backyard-24982.md>)

Original publisher: [Read original article](<https://codeahoy.com/2017/08/19/yagni-cargo-cult-and-overengineering-the-planes-wont-land-just-because-you-built-a-runway-in-your-backyard/>)

Author: umer

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

Content type: opinion

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Database](<https://devfeed.tech/topics/database.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [NoSQL](<https://devfeed.tech/topics/nosql.md>), [Microservices](<https://devfeed.tech/topics/microservices.md>), [Apache Cassandra](<https://devfeed.tech/topics/cassandra.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [cassandra](<https://devfeed.tech/tags/cassandra.md>), [databases](<https://devfeed.tech/tags/databases.md>), [microservices-architecture](<https://devfeed.tech/tags/microservices-architecture.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [nosql](<https://devfeed.tech/tags/nosql.md>)

### AI overview

The author reflects on choosing technologies based on actual needs rather than hype. They describe replacing a monolith and MySQL with service-oriented architecture and Cassandra, concluding that the resulting system was too complex for a small startup team to maintain.

### Source excerpt

It was April. Year was probably was 2010. The cold, snowy winter was finally coming to an end and the spring was almost in the air. I was preparing for my final exams. The review lectures were going on for the RDBMS course that I was enrolled in at my university. Around the same time, I had started hearing and reading about the shiny, new technology that was going to change the way we use databases. The NoSQL movement was gaining momentum. I was reading blogs about how MongoDB is big time outperforming ancient, non web scale relational databases. After the lecture, I asked my professor: Me: So, between RDBMS and NoSQL databases, which one do you think is the best? Professor: Well, it depends. Me: Depends on what? Professor: Depends on what you are trying to achieve. Both have their pros and cons. You pick the right tool for the job. Me: But MySQL can't really scale. Professor: How do you think we got this far? Send me an email and I'll send you some papers and practical uses in the industry. SQL was hard for my brain, especially the joins. I loved NoSQL. Simple key->value model without any joins! RDBMS systems that were designed in 1960's were simply not enough to keep up with modern demands. I had lost all interest in RDBMS and predicted they'll just fade off in the next few years. It's 2012. We're redesigning my employer's flagship product. The first version was a monolith that used the boring MySQL. Spending too much time reading blogs and Hacker News comments section, we convinced ourselves that we need to go big and modern: Break monolith into service-oriented architecture, aka, the SOA. Replace MySQL with Cassandra (MySQL to Redis to Cassandra) And we built it. There was nothing wrong with the new system... except one major flaw. It was too complex for a small startup team to maintain. We had built a Formula One race car, that makes frequent pit-stops and requires very specialized maintenance, when we needed a Toyota Corolla that goes on for years and years on j

## Caching Strategies and How to Choose the Right One

DevFeed: [Caching Strategies and How to Choose the Right One](<https://devfeed.tech/articles/caching-strategies-and-how-to-choose-the-right-one-24981.md>)

Original publisher: [Read original article](<https://codeahoy.com/2017/08/11/caching-strategies-and-how-to-choose-the-right-one/>)

Author: umer

Published: 2017-08-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Cache](<https://devfeed.tech/topics/cache.md>), [Database](<https://devfeed.tech/topics/database.md>), [Redis](<https://devfeed.tech/topics/redis.md>), [systems](<https://devfeed.tech/topics/systems.md>)

Tags: [cache](<https://devfeed.tech/tags/cache.md>), [caching](<https://devfeed.tech/tags/caching.md>), [caching-strategies](<https://devfeed.tech/tags/caching-strategies.md>), [database](<https://devfeed.tech/tags/database.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [performance](<https://devfeed.tech/tags/performance.md>), [redis](<https://devfeed.tech/tags/redis.md>), [strategy](<https://devfeed.tech/tags/strategy.md>), [systems](<https://devfeed.tech/tags/systems.md>)

### AI overview

This tutorial explains how caching strategies should be chosen based on data access patterns, including write frequency, read frequency, and whether returned data is unique. It describes cache-aside caching, including cache hits, cache misses, database fallback, and the use of Redis and Memcached.

### Source excerpt

👉 Read First: A Brief Overview of Caching Caching is one of the easiest ways to increase system performance. Databases can be slow (yes even the NoSQL ones) and as you already know, speed is the name of the game. If done right, caches can reduce response times, decrease load on database, and save costs. There are several strategies and choosing the right one can make a big difference. Your caching strategy depends on the data and data access patterns. In other words, how the data is written and read. For example: is the system write heavy and reads less frequently? (e.g. time based logs) is data written once and read multiple times? (e.g. User Profile) is data returned always unique? (e.g. search queries) A caching strategy for Top-10 leaderboard system for mobile games will be very different than a service which aggregates and returns user profiles. Choosing the right caching strategy is the key to improving performance. Let's take a quick look at various caching strategies. Cache-Aside This is perhaps the most commonly used caching approach, at least in the projects that I worked on. The cache sits on the side and the application directly talks to both the cache and the database. There is no connection between the cache and the primary database. All operations to cache and the database are handled by the application. This is shown in the figure below. Here's what's happening: The application first checks the cache. If the data is found in cache, we've cache hit. The data is read and returned to the client. If the data is not found in cache, we've cache miss. The application has to do some extra work. It queries the database to read the data, returns it to the client and stores the data in cache so the subsequent reads for the same data results in a cache hit. Use Cases, Pros and Cons Cache-aside caches are usually general purpose and work best for read-heavy workloads. Memcached and Redis are widely used. Systems using cache-aside are resilient to cache failures.

## Basics of Java Garbage Collection

DevFeed: [Basics of Java Garbage Collection](<https://devfeed.tech/articles/basics-of-java-garbage-collection-24980.md>)

Original publisher: [Read original article](<https://codeahoy.com/2017/08/06/basics-of-java-garbage-collection/>)

Author: umer

Published: 2017-08-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [real-time](<https://devfeed.tech/topics/real-time.md>)

Tags: [garbage-collection](<https://devfeed.tech/tags/garbage-collection.md>), [garbage-collectors](<https://devfeed.tech/tags/garbage-collectors.md>), [gc](<https://devfeed.tech/tags/gc.md>), [hotspot](<https://devfeed.tech/tags/hotspot.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [latency](<https://devfeed.tech/tags/latency.md>), [low-latency](<https://devfeed.tech/tags/low-latency.md>), [memory](<https://devfeed.tech/tags/memory.md>), [performance](<https://devfeed.tech/tags/performance.md>), [real-time](<https://devfeed.tech/tags/real-time.md>), [threads](<https://devfeed.tech/tags/threads.md>), [troubleshooting](<https://devfeed.tech/tags/troubleshooting.md>)

### AI overview

This tutorial provides a high-level overview of Java garbage collection, including collector algorithms, stop-the-world pauses, throughput and low-latency tradeoffs, JVM heap generations, and troubleshooting performance issues.

### Source excerpt

Knock, knock. Who's there? ...long GC pause... Java. It's an old joke from the time when Java was new and slow compared to other languages. Over time, Java became a lot faster. Today it powers many real-time applications with hundreds of thousands of concurrent users. These days, the biggest impact on Java's performance comes from its garbage collection. Fortunately, in many cases, it can be tweaked and optimized to improve performance. For most applications, the default settings of the JVM work fine. But when you start noticing performance issues caused by garbage collection and giving more heap memory isn't possible, you need to tune and optimize the garbage collection. For most developers, it's a chore. It requires patience, good knowledge of how garbage collection works and an understanding of application's behavior. This post is a high-level overview of Java's garbage collection with some examples of troubleshooting performance issues. Let's get started. Java ships with several garbage collectors. More specifically, these are different algorithms that run in their own threads. Each works differently and has pros and cons. The most important thing to keep in mind is that all garbage collectors stop the world. That is, your application is put on hold or paused, as the garbage is collected and taken out. The main difference among the algorithms is how they stop the world. Some algorithms sit completely idle until the garbage collection is absolutely needed and then pause your application for a long period while others do most of their work concurrently with your application and thus need a shorter pause during stop the world phase. The best algorithm depends on your goals: are your optimizing for throughput where long pauses every now and then are tolerable or you are optimizing for low latency by spreading it out and having short pauses all along. To enhance the garbage collection process, Java (HotSpot JVM, more accurately) divides up the heap memory into two genera

## Message Batching to Increase Throughput and Reduce Costs

DevFeed: [Message Batching to Increase Throughput and Reduce Costs](<https://devfeed.tech/articles/message-batching-to-increase-throughput-and-reduce-costs-24979.md>)

Original publisher: [Read original article](<https://codeahoy.com/2017/08/03/message-batching-to-increase-throughput-and-reduce-costs/>)

Author: umer

Published: 2017-08-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Amazon Simple Queue Service (SQS)](<https://devfeed.tech/topics/amazon-simple-queue-service-sqs.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [advice](<https://devfeed.tech/tags/advice.md>), [amazon-sqs](<https://devfeed.tech/tags/amazon-sqs.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [aws](<https://devfeed.tech/tags/aws.md>), [backend](<https://devfeed.tech/tags/backend.md>), [batching](<https://devfeed.tech/tags/batching.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [latency](<https://devfeed.tech/tags/latency.md>), [performance](<https://devfeed.tech/tags/performance.md>), [queue](<https://devfeed.tech/tags/queue.md>), [services](<https://devfeed.tech/tags/services.md>)

### AI overview

The article describes using batching and buffering with Amazon SQS to group messages before sending them. In the author's system, batches of up to 15 messages or 50 milliseconds increased throughput, reduced SQS costs, and had little effect on latency, while retries can mitigate message loss after a crash.

### Source excerpt

A while ago, I was working on a backend system on the AWS cloud. Individual services in the system communicated by exchanging asynchronous messages with each other using Amazon SQS. During early stages of development, we ran small load tests and found that CPU use was high and we would need more servers to handle the load. (Estimated peak load was 50,000 requests per second.) Services were generating lots of small messages every second and the profiler showed that threads responsible for handling and sending messages to SQS, one message at a time, were using CPU more than they should. This was affecting performance and throughput. To overcome this challenge, we took a page from Amazon's best practices advice, and introduced batching and buffering on senders to group multiple messages and send as one batch. This simple fix increased the throughput, cut down SQS costs (SQS pricing is by number of messages), and had very little impact on latency. Win, win, win. The custom batching algorithm was simple: batch up to 15 messages or wait up to a maximum of 50 milliseconds. If either 15 messages arrive quickly to form a batch or 50 milliseconds elapse, the batch is sent out. These figures (batch size and maximum time) were established after trial and error, tuned for the best throughput and latency. The application was multi-threaded with hundreds of active threads, so the system allowed multiple concurrent batches to be active at the same time to reduce thread blocking. The only downside is that if the application crashes after retrieving batch from the queue but before processing messages in it, we can lose some or all of the messages. To deal with complete message loss, the system can implement retries and resend messages upon timeout. Clients will see 2x response times, but at least get their response back. If you are building applications which generate and exchange a lot of messages in short periods, batching can increase throughput, performance and in the case of SQS

## Amazon DynamoDB Auto Scaling

DevFeed: [Amazon DynamoDB Auto Scaling](<https://devfeed.tech/articles/amazon-dynamodb-auto-scaling-24978.md>)

Original publisher: [Read original article](<https://codeahoy.com/2017/07/29/at-last-amazon-adds-dynamoDB-auto-scaling/>)

Author: umer

Published: 2017-07-29T00:00:00Z

Content type: article

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Amazon DynamoDB](<https://devfeed.tech/topics/amazon-dynamodb.md>), [amazon](<https://devfeed.tech/topics/amazon.md>), [Provisioning](<https://devfeed.tech/topics/provisioning.md>), [Availability](<https://devfeed.tech/topics/availability.md>)

Tags: [amazon](<https://devfeed.tech/tags/amazon.md>), [amazon-dynamodb](<https://devfeed.tech/tags/amazon-dynamodb.md>), [availability](<https://devfeed.tech/tags/availability.md>), [dynamodb](<https://devfeed.tech/tags/dynamodb.md>), [high-availability](<https://devfeed.tech/tags/high-availability.md>), [pricing](<https://devfeed.tech/tags/pricing.md>), [provisioning](<https://devfeed.tech/tags/provisioning.md>)

### AI overview

The article explains how Amazon DynamoDB Auto Scaling adjusts provisioned read and write capacity for tables and global secondary indexes in response to traffic. It contrasts automatic scaling with fixed provisioning, describing how scaling can help address throttling during demand spikes and reduce payment for unused capacity during lower traffic.

### Source excerpt

Amazon DynamoDB supports Auto Scaling which is a fantastic feature. When enabled, Auto Scaling adjusts read and write capacities of DynamoDB tables (and global secondary indexes) automatically based on the demand. If you haven't used DynamoDB before, you might be wondering why is this important? Before Auto Scaling, the users were required to provide fixed capacities for their tables. These capacities were static and didn't respond to traffic demands. This was problematic because: The application performance and high-availability was compromised whenever the utilization exceeded the provisioned throughput. When this happened, DynamoDB throttled requests, which resulted in loss of data or poor user experience. Cost control was poor at best. DynamoDB charges you by how much you provision. You end up paying the full cost by provisioned amounts, even if you use less than what you provisioned. In other words, if you overprovision for peak load, you'll pay extra during the non-peak hours, when the capacity isn't being full utilized. On the other hand, if you underprovision, the performance of your application will suffer due to throttling when the load exceeds the provisioned capacity. Many real-world use cases are difficult to predict in advance and fluctuations are common. Speaking of traffic fluctuations, they are prevalent and hard to deal with. In mobile gaming, the traffic can increase suddenly if Apple or Google features the game, or the publisher runs a massive ad campaign. A website can suddenly see a large number of visitors if an article is picked up by a major newspaper or news aggregator site. What is DynamoDB Auto Scaling? Historical Perspective Auto Scale Target Utilization DynamoDB Auto Scaling Pricing DynamoDB Auto Scaling vs On Demand When to use Auto Scaling vs On Demand? DynamoDB and DAX What is DynamoDB Auto Scaling? DynamoDB Auto Scaling feature lets you automatically manage throughput in response to your traffic patterns without throttling your user

## AI Is Not Magic. How Neural Networks Learn

DevFeed: [AI Is Not Magic. How Neural Networks Learn](<https://devfeed.tech/articles/ai-is-not-magic-how-neural-networks-learn-24977.md>)

Original publisher: [Read original article](<https://codeahoy.com/2017/07/28/ai-is-not-magic-how-neural-networks-learn/>)

Author: umer

Published: 2017-07-28T00:00:00Z

Content type: tutorial

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [Neural Network](<https://devfeed.tech/topics/neural-network.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [App](<https://devfeed.tech/topics/app.md>), [Image](<https://devfeed.tech/topics/image.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [app](<https://devfeed.tech/tags/app.md>), [images](<https://devfeed.tech/tags/images.md>), [neural-networks](<https://devfeed.tech/tags/neural-networks.md>)

### AI overview

A high-level tutorial explains how neural networks learn to recognize images. Using a hypothetical hot-dog classifier, it introduces labeled training data, artificial neurons, weights, biases, and the role of layered neurons in image recognition.

### Source excerpt

In my previous blog post, I claimed that "AI is not magic." In this post, my goal is to discuss how neural networks learn, and show that AI isn't a crystal ball or magic, just science and some very slick mathematics. I'll keep this very high level. Let's start with a hypothetical scenario. Suppose we are building an app to identify hot dogs. Take a picture and the app will tell you if it's a hotdog or not. Total App Store domination. To recognize images, we choose to implement a popular machine learning algorithm called the neural network. (In this hypothetical scenario) This decision was made after reading an online article which talked about how neural networks can learn to recognize objects by training on lots of labelled examples. Once trained, it can start identifying images it has never seen before. We go ahead and obtain a training set of 6000 images gathered from online sources. 1000 images of different types of hotdogs: New York vs Chicago, ketchup, no ketchup, hotdogs on a grill, etc. The other 5000 images are of various non-hotdog objects: shoes, hamburgers, burrito, human legs. Now all that remains is to build our neural network. To understand neural networks, we must first understand its elementary building block: the artificial neuron. An artificial neuron takes one ore more inputs and produces a single output. Looks familiar? It looks a lot like logic gates, which are elementary building blocks of digital circuits. The similarity ends there. Unlike logic gates, neurons can have several inputs and can change output for the same input values. This is possible because neurons have weights associated with each input, which is multiplied with the input value. These weights allow neurons to rate how important each input is. E.g. if the second input to a neuron isn't very important, neuron can assign it a weight close to 0 essentially cancelling it out. Neurons also have biases which controls how easy it is to get neuron to output or fire. If the bias is hug

[Next page](<https://devfeed.tech/sources/code-ahoy-articles.md?cursor=WyIyMDE3LTA3LTI4VDAwOjAwOjAwKzAwOjAwIiwgIjQ0YjRkNDQ5LWVjNDEtNDZhYi1hZGU5LWRmYTRlZWJmOTQwOSJd>)