# Variable

A variable is a named reference that represents or provides access to a value in a program.

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

## CodeSOD: Doing the Assignment

DevFeed: [CodeSOD: Doing the Assignment](<https://devfeed.tech/articles/codesod-doing-the-assignment-92580.md>)

Original publisher: [Read original article](<https://thedailywtf.com/articles/doing-the-assignment>)

Author: Remy Porter

Published: 2026-10-21T06:30:00Z

Content type: article

Language: en

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

Topics: [Variable](<https://devfeed.tech/topics/variable.md>)

Tags: [codesod](<https://devfeed.tech/tags/codesod.md>)

### AI overview

The code initializes `x`, `y`, and `z` separately, then chains `x = y = z`, so `x`'s initial value of 3 is overwritten with 4. The excerpt questions why the variables are initialized this way and suggests either assigning 4 to all three in one chain or using a named constant such as `DEFAULT_VALUE` for clarity.

### Source excerpt

Today's code maybe isn't much of a WTF, but it does point in the general direction of, "Damn, you live like this?" Poor Nancy unfortunately does. int x = 3; int y = 4; int z = 4; x = y = z; Each variable is declared and initialized, and then they're set equal to each other. It just raises the question though, why do it this way? Why not declare them and then x = y = z = 4, if we want that? Or maybe, for more clarity, int x = DEFAULT_VALUE; would be more legible, and we can skip the multiple assignments on one line. Why does x get set to 3 but then overwritten? [Advertisement] ProGet's got you covered with security and access controls on your NuGet feeds. Learn more.

## This Weird 1973 Typeface Just Came Back From the Dead

DevFeed: [This Weird 1973 Typeface Just Came Back From the Dead](<https://devfeed.tech/articles/this-weird-1973-typeface-just-came-back-from-the-dead-58029.md>)

Original publisher: [Read original article](<https://webdesignerdepot.com/this-weird-1973-typeface-just-came-back-from-the-dead/>)

Author: Alex Harper

Published: 2026-09-22T15:01:00Z

Content type: article

Language: en

Sources: [Web Designer Depot](<https://devfeed.tech/sources/web-designer-depot.md>)

Topics: [Font](<https://devfeed.tech/topics/font.md>), [digital](<https://devfeed.tech/topics/digital.md>), [Variable](<https://devfeed.tech/topics/variable.md>)

Tags: [1970s-design](<https://devfeed.tech/tags/1970s-design.md>), [ad-werner](<https://devfeed.tech/tags/ad-werner.md>), [clippy](<https://devfeed.tech/tags/clippy.md>), [creative-fonts](<https://devfeed.tech/tags/creative-fonts.md>), [design](<https://devfeed.tech/tags/design.md>), [digital-design](<https://devfeed.tech/tags/digital-design.md>), [digital-typography](<https://devfeed.tech/tags/digital-typography.md>), [display-fonts](<https://devfeed.tech/tags/display-fonts.md>), [font-design](<https://devfeed.tech/tags/font-design.md>), [font-revival](<https://devfeed.tech/tags/font-revival.md>), [fonts](<https://devfeed.tech/tags/fonts.md>), [graphic-design](<https://devfeed.tech/tags/graphic-design.md>), [kanon-foundry](<https://devfeed.tech/tags/kanon-foundry.md>), [paperclip-contour](<https://devfeed.tech/tags/paperclip-contour.md>), [retro-fonts](<https://devfeed.tech/tags/retro-fonts.md>), [technology](<https://devfeed.tech/tags/technology.md>), [tor-weibull](<https://devfeed.tech/tags/tor-weibull.md>), [type-design](<https://devfeed.tech/tags/type-design.md>), [typography](<https://devfeed.tech/tags/typography.md>), [typography-inspiration](<https://devfeed.tech/tags/typography-inspiration.md>), [variable](<https://devfeed.tech/tags/variable.md>), [variable-fonts](<https://devfeed.tech/tags/variable-fonts.md>), [vintage-typography](<https://devfeed.tech/tags/vintage-typography.md>), [visual-ui-design](<https://devfeed.tech/tags/visual-ui-design.md>), [web-typography](<https://devfeed.tech/tags/web-typography.md>)

### AI overview

The article introduces Clippy, a digital typeface based on Ad Werner's 1973 Paperclip Contour. It describes the expanded 530-glyph family, support for 219 languages, and variable-font behavior that shifts between upright and slanted forms.

### Source excerpt

A wonderfully weird typeface from 1973 has come back to life -- and somehow it looks more at home in 2026 than ever. Meet Clippy, the retro font that bends, rocks and wobbles its way into the digital age.

## CodeSOD: The John Cage Variable

DevFeed: [CodeSOD: The John Cage Variable](<https://devfeed.tech/articles/codesod-the-john-cage-variable-57818.md>)

Original publisher: [Read original article](<https://thedailywtf.com/articles/the-john-cage-variable>)

Author: Remy Porter

Published: 2026-09-22T06:30:00Z

Content type: opinion

Language: en

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

Topics: [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Code](<https://devfeed.tech/topics/code.md>), [Variable](<https://devfeed.tech/topics/variable.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [code](<https://devfeed.tech/tags/code.md>), [codesod](<https://devfeed.tech/tags/codesod.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

A humorous code critique examines a confusing C++ variable name and the risks of packing positional values into arrays. It argues that code written as disposable animation scripts may still be reused later, making meaningful names and maintainable structure worthwhile.

### Source excerpt

David C sends us a true confession. For my job, I write C++ code as if it was a scripting language (long story) to produce programmatic animations for videos. Given that these are "write-and-run-once-and-never-look-at-it-again" programs, I tend to not try as hard to make my code good. But once I wrote this line of code, I had to take a step back and reevaluate my life choices. fade_out(scene, length4->range(0, 3), length4_3_3, length4[4], length4[5]->range(0, 3)); This is a natural consequence of passing parameters as arrays, it seems; instead of having meaningful named values in a struct or similar, we have all these things packed into arrays. We can see a long ago attempt at using variable, badly, in the John Cage variable: length4_3_3. John Cage's (in)famous composition, "4:33" calls into question what precisely even is music, just like this variable calls into question what even is a variable name- because this is clearly a range expression of size 1. length4->range(3,1), or more reasonably, probably length4[3]. Where a normal variable name might give us some indication about what its contents mean, this gives us none of that, just a statement of how we could acquire those contents if we ever wanted them again. For disposable code, this is hardly the worst thing I've ever seen, but is any code truly disposable? You always find yourself wanting to pull some piece of it forward into the next project, inevitably. Read the third chapter of Structure and Interpretation of Computer Programs and consider yourself absolved. Go forth and sin no more. [Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!

## Announcing Shader Model 6.10 Preview and AgilitySDK 720 Preview

DevFeed: [Announcing Shader Model 6.10 Preview and AgilitySDK 720 Preview](<https://devfeed.tech/articles/announcing-shader-model-6-10-preview-and-agilitysdk-720-preview-50219.md>)

Original publisher: [Read original article](<https://devblogs.microsoft.com/directx/shader-model-6-10-agilitysdk-720-preview/>)

Author: Amar Patel

Published: 2026-04-27T17:01:04Z

Content type: release

Language: en

Sources: [DirectX Developer Blog](<https://devfeed.tech/sources/directx-developer-blog.md>)

Topics: [DirectX](<https://devfeed.tech/topics/directx.md>), [shaders](<https://devfeed.tech/topics/shaders.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [Hardware](<https://devfeed.tech/topics/hardware.md>), [Variable](<https://devfeed.tech/topics/variable.md>), [ASCII art shader](<https://devfeed.tech/topics/ascii-art-shader.md>)

Tags: [agility-sdk](<https://devfeed.tech/tags/agility-sdk.md>), [announce](<https://devfeed.tech/tags/announce.md>), [directx](<https://devfeed.tech/tags/directx.md>), [driver](<https://devfeed.tech/tags/driver.md>), [features](<https://devfeed.tech/tags/features.md>), [microsoft](<https://devfeed.tech/tags/microsoft.md>), [preview](<https://devfeed.tech/tags/preview.md>)

### AI overview

Microsoft announces the preview release of Shader Model 6.10 with Agility SDK 1.720-preview and DXC 1.10.2605.2. The release adds HLSL matrix APIs, wave-index intrinsics, expanded group-shared memory support, ray-tracing intrinsics, and other shader features.

### Source excerpt

Overview Today, we are pleased to announce that Shader Model 6.10 and other features have been officially released with Agility SDK 1.720-preview and complementary DXC 1.10.2605.2. AgilitySDK 1.720-preview exposes the following features. There's more detail further below, including download and driver links. Shader Model 6.10 (via DXC 1.10.2605.2): linalg::Matrix Group Wave Index Variable Group Shared [...] The post Announcing Shader Model 6.10 Preview and AgilitySDK 720 Preview appeared first on DirectX Developer Blog.

## What's New in Apache APISIX 3.16: Dynamic Rate Limiting for Your API Gateway

DevFeed: [What's New in Apache APISIX 3.16: Dynamic Rate Limiting for Your API Gateway](<https://devfeed.tech/articles/what-s-new-in-apache-apisix-3-16-dynamic-rate-limiting-for-your-api-gateway-42815.md>)

Original publisher: [Read original article](<https://apisix.apache.org/blog/2026/04/14/apisix-3.16-dynamic-rate-limiting/>)

Author: Ming Wen

Published: 2026-04-14T00:00:00Z

Content type: release

Language: en

Sources: [Apache APISIX Blog](<https://devfeed.tech/sources/apache-apisix-blog.md>)

Topics: [rate-limiting](<https://devfeed.tech/topics/rate-limiting.md>), [Amazon API Gateway](<https://devfeed.tech/topics/amazon-api-gateway.md>), [gateway](<https://devfeed.tech/topics/gateway.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Variable](<https://devfeed.tech/topics/variable.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [api-gateway](<https://devfeed.tech/tags/api-gateway.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [gateway](<https://devfeed.tech/tags/gateway.md>), [rate-limiting](<https://devfeed.tech/tags/rate-limiting.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

Apache APISIX 3.16 adds dynamic rate limiting through multiple rules and variable support across several rate-limiting plugins. The release enables context-aware quotas, per-tier and multi-tenant policies, and multiple limits within a single route configuration while preserving backward compatibility.

### Source excerpt

Apache APISIX 3.16 introduces dynamic rate limiting with multiple rules and variable support across limit-count, limit-conn, and ai-rate-limiting plugins, enabling context-aware, per-tier, and multi-tenant rate limiting in a single route configuration.

## IIFE for Complex Initialization

DevFeed: [IIFE for Complex Initialization](<https://devfeed.tech/articles/iife-for-complex-initialization-53296.md>)

Original publisher: [Read original article](<https://www.cppstories.com/2016/11/iife-for-complex-initialization/>)

Published: 2026-01-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [C++ Stories](<https://devfeed.tech/sources/c-stories.md>)

Topics: [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Code](<https://devfeed.tech/topics/code.md>), [function](<https://devfeed.tech/topics/function.md>), [Variable](<https://devfeed.tech/topics/variable.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [code](<https://devfeed.tech/tags/code.md>), [function](<https://devfeed.tech/tags/function.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

A C++ technique for initializing variables with complex multi-line logic while preserving const qualification. The article explains immediately invoked lambda expressions, also called IIFEs or IILEs, and shows how they can compute a value within the current scope.

### Source excerpt

What do you do when the code for a variable initialization is complicated? Do you move it to another method or write inside the current scope? In this blog post, I'd like to present a trick that allows computing a value for a variable, even a const variable, with a compact notation. Updated in Jan 2026: improved code, added C++26 section, added [&] section, updated code samples and added links to Compiler Explorer. Intro I hope you're initializing most variables as const (so that the code is more explicit, and also compiler can reason better about the code and optimize). For example, it's easy to write: const int myParam = inputParam * 10 + 5; or even: const int myParam = bCondition ? inputParam*2 : inputParam + 10; But what about complex expressions? When we have to use several lines of code, or when the ? operator is not sufficient. 'It's easy' you say: you can wrap that initialization into a separate function. While that's the right answer in most cases, I've noticed that in reality a lot of people write code in the current scope. That forces you to stop using const and code is a bit uglier. You might see something like this: int myVariable = 0; // this should be const... if (bFirstCondition) myVariable = bSecondCondition ? computeFunc(inputParam) : 0; else myVariable = inputParam * 2; // more code of the current function... // and we assume 'myVariable` is const now The code above computes myVariable which should be const. But since we cannot initialize it in one line, then the const modifier is dropped. I highly suggest wrapping such code into a separate method, but recently I've come across a new option. I've got the idea from a great talk by Jason Turner about "Practical Performance Practices" where among various tips I've noticed "IIFE". The IIFE acronym stands for "Immediately-invoked function expression". Thanks to lambda expression, it's now available in C++. We can use it for complex initialization of variables. Extra: You might also encounter: IILE, whi

## isBooleanTooLongAndComplex

DevFeed: [isBooleanTooLongAndComplex](<https://devfeed.tech/articles/isbooleantoolongandcomplex-23853.md>)

Original publisher: [Read original article](<http://testing.googleblog.com/2024/04/isbooleantoolongandcomplex.html>)

Author: Google Testing Bloggers (noreply@blogger.com)

Published: 2024-04-25T13:14:00Z

Content type: tutorial

Language: en

Sources: [Google Testing Blog](<https://devfeed.tech/sources/google-testing-blog.md>)

Topics: [Variable](<https://devfeed.tech/topics/variable.md>), [if statement](<https://devfeed.tech/topics/if-statement.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [return](<https://devfeed.tech/topics/return.md>)

Tags: [abstractions](<https://devfeed.tech/tags/abstractions.md>), [boolean](<https://devfeed.tech/tags/boolean.md>), [business-logic](<https://devfeed.tech/tags/business-logic.md>), [code](<https://devfeed.tech/tags/code.md>), [code-health](<https://devfeed.tech/tags/code-health.md>), [complex](<https://devfeed.tech/tags/complex.md>), [expression](<https://devfeed.tech/tags/expression.md>), [tott](<https://devfeed.tech/tags/tott.md>), [yiming-sun](<https://devfeed.tech/tags/yiming-sun.md>)

### AI overview

For hard-to-read Boolean conditions, extracting the whole expression into a named variable may not make its logic clear. The excerpt recommends grouping related details into intermediate Booleans with meaningful names, so the final condition combines well-defined qualities without mixing `&&` and `||`. This can improve readability without changing business logic. Hiding the condition in a separate method is another option; the excerpt notes that guard clauses and early returns can make intermediate states easier to follow. The supplied excerpt ends partway through that method example.

### Source excerpt

This is another post in our Code Health series. A version of this post originally appeared in Google bathrooms worldwide as a Google Testing on the Toilet episode. You can download a printer-friendly version to display in your office. By Yiming Sun You may have come across some complex, hard-to-read Boolean expressions in your codebase and wished they were easier to understand. For example, let's say we want to decide whether a pizza is fantastic: // Decide whether this pizza is fantastic. if ((!pepperoniService.empty() || sausages.size() > 0) && (useOnionFlag.get() || hasMushroom(ENOKI, PORTOBELLO)) && hasCheese()) { ... } A first step toward improving this is to extract the condition into a well-named variable: boolean isPizzaFantastic = (!pepperoniService.empty() || sausages.size() > 0) && (useOnionFlag.get() || hasMushroom(ENOKI, PORTOBELLO)) && hasCheese(); if (isPizzaFantastic) { ... } However, the Boolean expression is still too complex. It's potentially confusing to calculate the value of isPizzaFantastic from a given set of inputs. You might need to grab a pen and paper, or start a server locally and set breakpoints. Instead, try to group the details into intermediate Booleans that provide meaningful abstractions. Each Boolean below represents a single well-defined quality, and you no longer need to mix && and || within an expression. Without changing the business logic, you've made it easier to see how the Booleans relate to each other: boolean hasGoodMeat = !pepperoniService.empty() || sausages.size() > 0; boolean hasGoodVeggies = useOnionFlag.get() || hasMushroom(ENOKI, PORTOBELLO); boolean isPizzaFantastic = hasGoodMeat && hasGoodVeggies && hasCheese(); Another option is to hide the logic in a separate method. This also offers the possibility of early returns using guard clauses, further reducing the need to keep track of intermediate states: boolean isPizzaFantastic() { if (!hasCheese()) { return false; } if (pepperoniService.empty() && sausages.size()

## Variables point to objects

DevFeed: [Variables point to objects](<https://devfeed.tech/articles/variables-point-to-objects-39392.md>)

Original publisher: [Read original article](<https://kt.academy/article/variables>)

Published: 2021-11-17T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Variable](<https://devfeed.tech/topics/variable.md>), [object](<https://devfeed.tech/topics/object.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [exception](<https://devfeed.tech/tags/exception.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [object](<https://devfeed.tech/tags/object.md>), [variable](<https://devfeed.tech/tags/variable.md>), [variables](<https://devfeed.tech/tags/variables.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

A tutorial explaining how variables reference objects, how reassignment differs from mutating an object, and how these distinctions apply to mutable and read-only Kotlin lists and delegated properties backed by maps.

### Source excerpt

A basic feature, that is commonly misunderstood.

## Inherit ancestor font-size, for fun and profit

DevFeed: [Inherit ancestor font-size, for fun and profit](<https://devfeed.tech/articles/inherit-ancestor-font-size-for-fun-and-profit-52133.md>)

Original publisher: [Read original article](<https://lea.verou.me/2021/06/inherit-ancestor-font-size-for-fun-and-profit/>)

Author: Lea Verou

Published: 2021-06-24T00:00:00Z

Content type: article

Language: en

Sources: [Lea Verou's blog](<https://devfeed.tech/sources/lea-verou-s-blog.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [container](<https://devfeed.tech/topics/container.md>), [Document Object Model (DOM)](<https://devfeed.tech/topics/dom.md>), [Variable](<https://devfeed.tech/topics/variable.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [blog](<https://devfeed.tech/tags/blog.md>), [container](<https://devfeed.tech/tags/container.md>), [contents](<https://devfeed.tech/tags/contents.md>), [css](<https://devfeed.tech/tags/css.md>), [original](<https://devfeed.tech/tags/original.md>), [properties](<https://devfeed.tech/tags/properties.md>), [tutorials](<https://devfeed.tech/tags/tutorials.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

A CSS article explains how the em unit normally resolves against current or parent font sizes and presents a technique for inheriting an ancestor font size when an additional container or component layer changes that relationship. It discusses scalable components, CSS variables, and DOM constraints involving generic containers and custom elements.

### Source excerpt

If you've been writing CSS for any length of time, you're probably familiar with the em unit, and possibly the other type-relative units. We are going to refer to em for the rest of this post, but anything described works for all type-relative units. As you well know, em resolves to the current font size on all properties except font-size, where it resolves to the parent font size. It can be quite useful for making scalable components that adapt to their context size. However, I have often come across cases where you actually need to "circumvent" one level of this. Either you need to set font-size to the grandparent font size instead of the parent one, or you need to set other properties to the parent font size, not the current one. If you're already familiar with the problem and just want the solution, skip ahead. The next few paragraphs are for those thinking "but when would you ever need this?" Sometimes, there are workarounds, and it's just a matter of keeping DRY. For example, take a look at this speech bubble: CodePen Embed Fallback Note this in the CSS: /* This needs to change every time the font-size changes: */ top: calc(100% + 1em / 2.5); font-size: 250%; Note that every time we change the font size we also need to adjust top. And ok, when they're both defined in the same rule we can just delegate this to a variable: --m: 2.5; top: calc(100% + 1em / var(--m)); font-size: calc(var(--m) * 100%); However, in the general case the font size may be defined elsewhere. For example, a third party author may want to override the emoji size, they shouldn't also need to override anything else, our CSS should just adapt. In other cases, it is simply not possible to multiply and divide by a factor and restore the ancestor font size. Most notably, when the current (or parent) font-size is set to 0 and we need to recover what it was one level up. I've come across many instances of this in the 16 years I've been writing CSS. Admittedly, there were way more use cases pre-Fl

## Practical Use Cases For CSS Variables

DevFeed: [Practical Use Cases For CSS Variables](<https://devfeed.tech/articles/practical-use-cases-for-css-variables-45366.md>)

Original publisher: [Read original article](<https://ishadeed.com/article/practical-css-variables/>)

Author: Ahmad Shadeed

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

Content type: tutorial

Language: en

Sources: [Ahmad Shadeed](<https://devfeed.tech/sources/ahmad-shadeed.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [Variable](<https://devfeed.tech/topics/variable.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [css](<https://devfeed.tech/tags/css.md>), [css-variables](<https://devfeed.tech/tags/css-variables.md>), [custom](<https://devfeed.tech/tags/custom.md>), [html](<https://devfeed.tech/tags/html.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [practical](<https://devfeed.tech/tags/practical.md>), [properties](<https://devfeed.tech/tags/properties.md>), [use-cases](<https://devfeed.tech/tags/use-cases.md>), [variables](<https://devfeed.tech/tags/variables.md>)

### AI overview

A practical tutorial on using CSS variables beyond simple color tokens. It covers reducing repeated CSS, varying longhand properties such as padding, simplifying CSS backgrounds, and dynamically supplying background image values with JavaScript.

### Source excerpt

The goal of this article is to walk you through use-cases where CSS variables shine.

## Using Rust Playground for Hello World and Variable Interpolation

DevFeed: [Using Rust Playground for Hello World and Variable Interpolation](<https://devfeed.tech/articles/using-rust-playground-for-hello-world-and-variable-interpolation-28320.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/rust/2020/03/02/using-rust-playground-for-hello-world-and-variable-interpolation.html>)

Author: Fuzzygroup

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

Content type: article

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

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

Tags: [compiled-language](<https://devfeed.tech/tags/compiled-language.md>), [function](<https://devfeed.tech/tags/function.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [let](<https://devfeed.tech/tags/let.md>), [playground](<https://devfeed.tech/tags/playground.md>), [repl](<https://devfeed.tech/tags/repl.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [rust](<https://devfeed.tech/tags/rust.md>), [string](<https://devfeed.tech/tags/string.md>), [variable](<https://devfeed.tech/tags/variable.md>), [variables](<https://devfeed.tech/tags/variables.md>)

### AI overview

The author uses Rust Playground as a browser-based way to write and run beginner Rust examples, while noting that Rust is compiled rather than interpreted. The default program prints "Hello, world!"; a second function demonstrates `let` bindings and `{}` placeholders in `println!` to display values 5 and 6. The author flags immutability as a topic for later learning. Repl.it is mentioned as another web option, but the author says private repls require a paid account costing $74 per 12 months.

### Source excerpt

Artwork by my friend Autumn Mott; Hopefully I can find a better link to put here It is a Monday and what better way to start your 6 am Monday morning then learning some of the elements of a new language - Rust. I started by adding a link in my Browser toolbar to the Rust Playground which amounts to a web based REPL (Read Evaluate Print Loop) for Rust where you can type in Rust code and run it. Yes I know it really isn't a REPL because Rust is a compiled language not an interpreted one but it functions well enough as a REPL that I can wrap my Ruby tinged mind around it. Here's the Hello World program that automatically appears in the Rust playground fn main() { println!("Hello, world!"); } The output of this is: Hello, world! That's pretty easy to understand: A main function defined with fn A print line function defined with a ! (my previous Rust reading tells me that's a macro indicator) { and } to denote structure A ; to denote the end of lines I wanted to make a simple change to experiment with the use of variables so I added a main2() function and called it from main(): fn main() { println!("Hello, world!"); main2(); } fn main2() { let x = 5; println!("The value of x is: {}", x); let y = 6; println!("The value of y is: {}", y); } The output of this is: Hello, world! The value of x is: 5 The value of y is: 6 You can see that the let keyword assigns a variable and that {} binds a variable into a string (which is generally called interpolation). Note: Variables quickly bring you in to the heart of Rust - immutability - and here there by dragons that hopefully come up tomorrow after some reading. Link Here's a permanent link to this if you want to try it out. What about Repl.it? Another way to have a web based REPL for Rust is Repl.it. And while I like the concept of repl.it, they have eliminated any privacy without a paid account: Upgrade your account for private repls. This appears on the bottom of every new REPL you create and at $74 / 12 months that feels expensi

## Typed properties in PHP 7.4

DevFeed: [Typed properties in PHP 7.4](<https://devfeed.tech/articles/typed-properties-in-php-7-4-44314.md>)

Original publisher: [Read original article](<https://stitcher.io/blog/typed-properties-in-php-74>)

Author: Brent

Published: 2019-06-30T00:00:00Z

Content type: article

Language: en

Sources: [Stitcher](<https://devfeed.tech/sources/stitcher-io.md>)

Topics: [PHP](<https://devfeed.tech/topics/php.md>), [properties](<https://devfeed.tech/topics/properties.md>), [Code](<https://devfeed.tech/topics/code.md>), [class](<https://devfeed.tech/topics/class.md>), [Variable](<https://devfeed.tech/topics/variable.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [classes](<https://devfeed.tech/tags/classes.md>), [code](<https://devfeed.tech/tags/code.md>), [php](<https://devfeed.tech/tags/php.md>), [properties](<https://devfeed.tech/tags/properties.md>), [type-system](<https://devfeed.tech/tags/type-system.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

An in-depth explanation of typed class properties introduced in PHP 7.4. It covers their opt-in, non-breaking nature; uninitialized properties; reading and writing behavior; type validation; and defaults and constructors.

### Source excerpt

Read the full post on https://stitcher.io/blog/typed-properties-in-php-74

## Understanding PHP Globals and Variable Scope in WordPress

DevFeed: [Understanding PHP Globals and Variable Scope in WordPress](<https://devfeed.tech/articles/understanding-php-globals-and-variable-scope-in-wordpress-121173.md>)

Original publisher: [Read original article](<https://wpshout.com/php-globals-variable-scope-wordpress/>)

Author: David Hayes

Published: 2019-04-02T13:03:01Z

Content type: article

Language: en

Sources: [Back-End Development - WPShout](<https://devfeed.tech/sources/back-end-development-wpshout.md>)

Topics: [PHP](<https://devfeed.tech/topics/php.md>), [WordPress](<https://devfeed.tech/topics/wordpress.md>), [Variable](<https://devfeed.tech/topics/variable.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [back-end-development](<https://devfeed.tech/tags/back-end-development.md>), [echo](<https://devfeed.tech/tags/echo.md>), [global](<https://devfeed.tech/tags/global.md>), [globals](<https://devfeed.tech/tags/globals.md>), [php](<https://devfeed.tech/tags/php.md>), [scope](<https://devfeed.tech/tags/scope.md>), [variable](<https://devfeed.tech/tags/variable.md>), [variables](<https://devfeed.tech/tags/variables.md>), [wordpress](<https://devfeed.tech/tags/wordpress.md>), [wps](<https://devfeed.tech/tags/wps.md>), [wps-nf](<https://devfeed.tech/tags/wps-nf.md>)

### AI overview

PHP variables declared inside functions are local; variables declared outside functions are global unless their file is included from within a function. Inside a function, `global $name` or `$GLOBALS['name']` accesses or assigns a global, while passing a value as a parameter avoids that shared-state dependency. In WordPress, template parts loaded through `load_template()` receive globals such as `$post` and `$wp_query`; the main template is included at file scope. Template tags and the Loop commonly rely on WordPress's global post and query objects. Globals make application data easy to share, but changes elsewhere can unexpectedly break code, so the excerpt favors parameters where practical while noting WordPress's continued reliance on globals.

### Source excerpt

One of the most maligned features of WordPress is the use of "PHP global variables." Whether you love them or hate them, thoughm global variables probably aren't leaving WordPress soon. So today we'll cover all there is to know about WordPress's PHP globals: how to think about them; how to make variables global in PHP;... Read More "Understanding PHP Globals and Variable Scope in WordPress

## Why Descriptive Variable Names Improve Code Readability

DevFeed: [Why Descriptive Variable Names Improve Code Readability](<https://devfeed.tech/articles/variable-looked-at-me-and-said-say-my-name-39030.md>)

Original publisher: [Read original article](<https://vladimirj.dev/say-my-name/>)

Author: Vladimir Jovanović

Published: 2017-10-17T09:44:00Z

Content type: tutorial

Language: en

Sources: [Vladimir Jovanović](<https://devfeed.tech/sources/vladimir-jovanovic.md>)

Topics: [Variable](<https://devfeed.tech/topics/variable.md>), [Code](<https://devfeed.tech/topics/code.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Computer science](<https://devfeed.tech/topics/computer-science.md>)

Tags: [clean-code](<https://devfeed.tech/tags/clean-code.md>), [code](<https://devfeed.tech/tags/code.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [developer](<https://devfeed.tech/tags/developer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [understand](<https://devfeed.tech/tags/understand.md>), [variable](<https://devfeed.tech/tags/variable.md>), [writing](<https://devfeed.tech/tags/writing.md>)

### AI overview

This article explains why descriptive variable names make code easier for humans to read and maintain. It contrasts short, cryptic names with clearer names and notes that naming requires judgment rather than automatically improving code.

### Source excerpt

While you are writing your code, the most important thing to have in mind is that you are writing your code first and foremost for humans to understand, and secondly for a machine to interpret.

## First-Class Function

DevFeed: [First-Class Function](<https://devfeed.tech/articles/first-class-function-25013.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/first-class-function/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-09-01T00:00:00Z

Content type: article

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [function](<https://devfeed.tech/topics/function.md>), [Variable](<https://devfeed.tech/topics/variable.md>)

Tags: [first](<https://devfeed.tech/tags/first.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

Kotlin supports first-class functions: functions can be assigned to variables, passed as arguments, and returned as results. The excerpt names anonymous functions, lambdas, and references to existing functions as ways to assign a function to a variable. It points to higher-order functions for examples of passing or returning functions; those examples are not included in the supplied text.

### Source excerpt

A programming language that supports first-class functions allows you to: Assign a function to a variable Pass a function to another function as an argument Return a function from another function as a result Kotlin allows you to do all three of these. Assigning Functions There are a few different ways that you can assign a function to a variable in Kotlin. Anonymous Function val add = fun(a: Int, b: Int) = a + b Lambda val subtract = { a: Int, b: Int -> a - b } Function Reference If the method already exists, you can assign it by means of a function reference

## Function Reference

DevFeed: [Function Reference](<https://devfeed.tech/articles/function-reference-25014.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/function-reference/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-09-01T00:00:00Z

Content type: article

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [function](<https://devfeed.tech/topics/function.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Variable](<https://devfeed.tech/topics/variable.md>), [Closure](<https://devfeed.tech/topics/closure.md>)

Tags: [function](<https://devfeed.tech/tags/function.md>), [function-reference](<https://devfeed.tech/tags/function-reference.md>), [functions](<https://devfeed.tech/tags/functions.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

Kotlin function references let you store, pass, or return existing functions, alongside lambdas. A bound reference captures an object instance; an unbound member reference requires the instance when invoked, increasing the reference's argument count. Top-level and local function references need no receiver. A bound reference's receiver can be any expression, which is evaluated when the reference is created. The excerpt notes that bound references were introduced in Kotlin 1.1 and that lambdas are a typical choice for small functions used in one place; its alternatives discussion is cut off.

### Source excerpt

Overview Kotlin supports the notion of first-class functions - functions can be saved to variables, passed into functions, and returned from functions. When you need to do this, you can create lambdas - function literals - or you can refer to an existing function by means of a function reference. Usage Assigning a function: class Example { fun add(a: Int, b: Int) = a + b val operation = this::add } Passing a function:

## The AnyStr type variable

DevFeed: [The AnyStr type variable](<https://devfeed.tech/articles/the-anystr-type-variable-38897.md>)

Original publisher: [Read original article](<http://neopythonic.blogspot.com/2016/05/the-anystr-type-variable.html>)

Author: Guido van Rossum (noreply@blogger.com)

Published: 2016-05-17T16:53:00Z

Content type: tutorial

Language: en

Sources: [Guido van Rossum](<https://devfeed.tech/sources/guido-van-rossum.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [function](<https://devfeed.tech/topics/function.md>), [Variable](<https://devfeed.tech/topics/variable.md>), [Network](<https://devfeed.tech/topics/network.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [function](<https://devfeed.tech/tags/function.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>), [python](<https://devfeed.tech/tags/python.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

A tutorial on Python type annotations uses a parenthesize function to explain polymorphism across str and bytes, the Union type, and how static type checking exposes a bytes-versus-str bug. It introduces AnyStr as the subject of a separate discussion related to PEP 484 and the __fspath__() protocol.

### Source excerpt

The AnyStr type variable I was drafting a blog post on how to add type annotations for the new __fspath__() protocol (PEP 519) when I realized that I should write a separate post about AnyStr . So here it is. A simple function on strings Let's write a function that surrounds a string in parentheses. We'll put it in a file named demo.py : def parenthesize(s): return '(' + s + ')' It works, too: >>> from demo import parenthesize >>> print(parenthesize('hola')) (hola) Of course, if you pass it something that's not a string it will fail: >>> parenthesize(42) Traceback (most recent call last): File "demo.py", line 1, in File "demo.py", line 2, in parenthesize TypeError: Can't convert 'int' object to str implicitly Adding type annotations Using PEP 484 type annotations we can clarify our little function's signature: def parenthesize(s: str) -> str: return '(' + s + ')' Nothing to it, right? Even if you've never heard of PEP 484 before you can guess what this means. (Note that PEP 484 also says that the runtime behavior is unchanged. The calls I showed above will still have exactly the same effect, including the TypeError raised by parenthesize(42) .) Polymorphic functions Now suppose this is actually part of a networking app and we need to be able to parenthesize byte strings as well as text strings. Here's how you'd implement that: def parenthesize(s): if isinstance(s, str): return '(' + s + ')' elif isinstance(s, bytes): return b'(' + s + b')' else: raise TypeError(f"That's not a string, it's a {type(s)}") # See PEP 498 With a fancy word we call that a polymorphic function. How do you write a signature for such a function? For the answer we have to dive a little deeper into PEP 484. It defines a nifty operator named Union that lets us state that a type can be either this or that (or something else). In our case, it's either str or bytes , so we can write it like this: from typing import Union def parenthesize(s: Union[str, bytes]) -> Union[str, bytes]: if isinstance(s,

## Comparing Elixir and Erlang variables

DevFeed: [Comparing Elixir and Erlang variables](<https://devfeed.tech/articles/comparing-elixir-and-erlang-variables-43991.md>)

Original publisher: [Read original article](<https://dashbit.co/blog/comparing-elixir-and-erlang-variables>)

Author: José Valim

Published: 2016-01-12T00:00:00Z

Content type: article

Language: en

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

Topics: [Elixir](<https://devfeed.tech/topics/elixir.md>), [Erlang](<https://devfeed.tech/topics/erlang.md>), [Variable](<https://devfeed.tech/topics/variable.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [bugs](<https://devfeed.tech/tags/bugs.md>), [elixir](<https://devfeed.tech/tags/elixir.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [hidden](<https://devfeed.tech/tags/hidden.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [semantics](<https://devfeed.tech/tags/semantics.md>), [variables](<https://devfeed.tech/tags/variables.md>)

### AI overview

This article compares variable behavior in Elixir and Erlang, focusing on Elixir rebinding, Erlang pattern matching, implicit behavior, and how code changes can introduce hidden bugs or runtime crashes.

### Source excerpt

Sometimes Erlang programmers are worried "Elixir variables may be the source of hidden bugs". But how does Erlang and Elixir variables compare?

## A Reminder of Lagrange Multipliers for Optimization Problems

DevFeed: [A Reminder of Lagrange Multipliers for Optimization Problems](<https://devfeed.tech/articles/lagrangians-for-the-amnesiac-40334.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/11/30/lagrangians-for-the-amnesiac/>)

Published: 2013-11-30T09:00:50Z

Content type: tutorial

Language: en

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

Topics: [Optimization](<https://devfeed.tech/topics/optimization.md>), [function](<https://devfeed.tech/topics/function.md>), [Variable](<https://devfeed.tech/topics/variable.md>)

Tags: [convex-functions](<https://devfeed.tech/tags/convex-functions.md>), [function](<https://devfeed.tech/tags/function.md>), [gradient-descent](<https://devfeed.tech/tags/gradient-descent.md>), [lagrange](<https://devfeed.tech/tags/lagrange.md>), [lagrange-multipliers](<https://devfeed.tech/tags/lagrange-multipliers.md>), [linear-algebra](<https://devfeed.tech/tags/linear-algebra.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [problems](<https://devfeed.tech/tags/problems.md>), [variable](<https://devfeed.tech/tags/variable.md>), [vectors](<https://devfeed.tech/tags/vectors.md>)

### AI overview

A tutorial-style reminder of Lagrange multipliers for optimization problems. It reviews gradients, partial derivatives, dot products, and directional change for multivariable functions.

### Source excerpt

For a while I've been meaning to do some more advanced posts on optimization problems of all flavors. One technique that comes up over and over again is Lagrange multipliers, so this post is going to be a leisurely reminder of that technique. I often forget how to do these basic calculus-type things, so it's good practice. We will assume something about the reader's knowledge, but it's a short list: know how to operate with vectors and the dot product, know how to take a partial derivative, and know that in single-variable calculus the local maxima and minima of a differentiable function $ f(x)$ occur when the derivative $ f'(x)$ vanishes.

## Understanding Pointers and Memory Allocation

DevFeed: [Understanding Pointers and Memory Allocation](<https://devfeed.tech/articles/understanding-pointers-and-memory-allocation-22061.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2013/07/understanding-pointers-and-memory.html>)

Published: 2013-07-27T00:00:00Z

Content type: article

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

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

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [function](<https://devfeed.tech/tags/function.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [memory](<https://devfeed.tech/tags/memory.md>), [pointers](<https://devfeed.tech/tags/pointers.md>), [programming](<https://devfeed.tech/tags/programming.md>), [type](<https://devfeed.tech/tags/type.md>), [variables](<https://devfeed.tech/tags/variables.md>)

### AI overview

In Go, a variable may hold a value directly or hold an address to a value, making it a pointer. Field access uses the same period selector in either case; the compiler handles the distinction, unlike C, which uses `.` for values and `->` for addresses. Function arguments are passed by value, so each variable's value is copied for the function to use. The excerpt begins an example intended to change a value allocated in `main`, but cuts off before showing the implementation or result.

### Source excerpt

In the documentation provided by the Go language team you will find great information on pointers and memory allocation. Here is a link to that documentation: External resource on golang.org: http://golang.org/doc/faq#Pointers We need to start with the understanding that all variables contain a value. Based on the type that variable represents will determine how we can use it to manipulate the memory it contains. Read this post to learn more: Understanding Type In Go

## False Proof: 1 = 2 (with Calculus)

DevFeed: [False Proof: 1 = 2 (with Calculus)](<https://devfeed.tech/articles/false-proof-1-2-with-calculus-40245.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2011/10/25/false-proof-1-2-with-calculus/>)

Published: 2011-10-25T14:46:12Z

Content type: tutorial

Language: en

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

Topics: [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [function](<https://devfeed.tech/topics/function.md>), [Variable](<https://devfeed.tech/topics/variable.md>)

Tags: [calculus](<https://devfeed.tech/tags/calculus.md>), [false-proof](<https://devfeed.tech/tags/false-proof.md>), [function](<https://devfeed.tech/tags/function.md>), [logic](<https://devfeed.tech/tags/logic.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

This article presents a false calculus proof that 1 equals 2 and explains that the error comes from differentiating a variable-length sum with respect to only one of its variables.

### Source excerpt

Problem: Show 1 = 2 (with calculus) "Solution": Consider the following: $ 1^2 = 1$ $ 2^2 = 2 + 2$ $ 3^2 = 3 + 3 + 3$ $ \vdots$ $ x^2 = x + x + \dots + x$ ($ x$ times) And since this is true for all values of $ x$, we may take the derivative of both sides, and the equality remains true. In other words:

## Changing the Linux Shell Prompt

DevFeed: [Changing the Linux Shell Prompt](<https://devfeed.tech/articles/changing-the-linux-shell-prompt-40663.md>)

Original publisher: [Read original article](<https://radek.io/posts/changing-the-linux-shell-prompt/>)

Published: 2011-06-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Radek Pazdera](<https://devfeed.tech/sources/radek-pazdera.md>)

Topics: [Bash](<https://devfeed.tech/topics/bash.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Script](<https://devfeed.tech/topics/script.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Variable](<https://devfeed.tech/topics/variable.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [change](<https://devfeed.tech/tags/change.md>), [command](<https://devfeed.tech/tags/command.md>), [environment](<https://devfeed.tech/tags/environment.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [linux](<https://devfeed.tech/tags/linux.md>), [prompt](<https://devfeed.tech/tags/prompt.md>), [shell](<https://devfeed.tech/tags/shell.md>), [value](<https://devfeed.tech/tags/value.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

A tutorial on customizing the Bash shell prompt on Linux by changing the prompt string environment variable. It explains prompt escape sequences, colors, temporary changes, and how to make the configuration permanent.

### Source excerpt

How to modify your shell prompt on Linux