Skip to content

Commit 6c40e02

Browse files
committed
add an essay
1 parent 0eafef4 commit 6c40e02

9 files changed

Lines changed: 98 additions & 56 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,22 @@ jobs:
8484

8585
- name: Strip release binary (unix)
8686
if: matrix.os != 'windows-latest'
87-
run: strip "target/${{ matrix.target }}/release/names"
87+
run: strip "target/${{ matrix.target }}/release/inames"
8888

8989
- name: Build archive
9090
shell: bash
9191
run: |
92-
staging="names-${{ needs.create-release.outputs.release_version }}-${{ matrix.target }}"
92+
staging="inames-${{ needs.create-release.outputs.release_version }}-${{ matrix.target }}"
9393
mkdir -p "$staging"
9494
9595
cp {README.md,LICENSE-MIT,LICENSE-APACHE,CHANGELOG.md} "$staging/"
9696
9797
if [ "${{ matrix.os }}" = "windows-latest" ]; then
98-
cp "target/${{ matrix.target }}/release/names.exe" "$staging/"
98+
cp "target/${{ matrix.target }}/release/inames.exe" "$staging/"
9999
7z a "$staging.zip" "$staging"
100100
echo "ASSET=$staging.zip" >> $GITHUB_ENV
101101
else
102-
cp "target/${{ matrix.target }}/release/names" "$staging/"
102+
cp "target/${{ matrix.target }}/release/inames" "$staging/"
103103
tar czf "$staging.tar.gz" "$staging"
104104
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
105105
fi
@@ -142,47 +142,47 @@ jobs:
142142
VERSION="${VERSION#v}" # Remove 'v' prefix
143143
144144
# Download the release assets to calculate SHA256
145-
curl -L -o names-darwin.tar.gz \
146-
"https://github.com/${{ github.repository }}/releases/download/v${VERSION}/names-v${VERSION}-x86_64-apple-darwin.tar.gz"
147-
curl -L -o names-darwin-arm.tar.gz \
148-
"https://github.com/${{ github.repository }}/releases/download/v${VERSION}/names-v${VERSION}-aarch64-apple-darwin.tar.gz"
149-
curl -L -o names-linux.tar.gz \
150-
"https://github.com/${{ github.repository }}/releases/download/v${VERSION}/names-v${VERSION}-x86_64-unknown-linux-gnu.tar.gz"
145+
curl -L -o inames-darwin.tar.gz \
146+
"https://github.com/${{ github.repository }}/releases/download/v${VERSION}/inames-v${VERSION}-x86_64-apple-darwin.tar.gz"
147+
curl -L -o inames-darwin-arm.tar.gz \
148+
"https://github.com/${{ github.repository }}/releases/download/v${VERSION}/inames-v${VERSION}-aarch64-apple-darwin.tar.gz"
149+
curl -L -o inames-linux.tar.gz \
150+
"https://github.com/${{ github.repository }}/releases/download/v${VERSION}/inames-v${VERSION}-x86_64-unknown-linux-gnu.tar.gz"
151151
152152
# Calculate SHA256
153-
SHA_DARWIN=$(sha256sum names-darwin.tar.gz | cut -d' ' -f1)
154-
SHA_DARWIN_ARM=$(sha256sum names-darwin-arm.tar.gz | cut -d' ' -f1)
155-
SHA_LINUX=$(sha256sum names-linux.tar.gz | cut -d' ' -f1)
153+
SHA_DARWIN=$(sha256sum inames-darwin.tar.gz | cut -d' ' -f1)
154+
SHA_DARWIN_ARM=$(sha256sum inames-darwin-arm.tar.gz | cut -d' ' -f1)
155+
SHA_LINUX=$(sha256sum inames-linux.tar.gz | cut -d' ' -f1)
156156
157157
# Create formula file
158-
cat > names.rb << EOF
159-
class Names < Formula
160-
desc "Multicultural random name generator with Persian, Arabic, and Asian names"
158+
cat > inames.rb << EOF
159+
class Inames < Formula
160+
desc "Inclusive multicultural random name generator with Persian, Arabic, and Asian names"
161161
homepage "https://github.com/${{ github.repository }}"
162162
version "${VERSION}"
163163
license any_of: ["MIT", "Apache-2.0"]
164164
165165
on_macos do
166166
if Hardware::CPU.arm?
167-
url "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/names-v${VERSION}-aarch64-apple-darwin.tar.gz"
167+
url "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/inames-v${VERSION}-aarch64-apple-darwin.tar.gz"
168168
sha256 "${SHA_DARWIN_ARM}"
169169
else
170-
url "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/names-v${VERSION}-x86_64-apple-darwin.tar.gz"
170+
url "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/inames-v${VERSION}-x86_64-apple-darwin.tar.gz"
171171
sha256 "${SHA_DARWIN}"
172172
end
173173
end
174174
175175
on_linux do
176-
url "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/names-v${VERSION}-x86_64-unknown-linux-gnu.tar.gz"
176+
url "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/inames-v${VERSION}-x86_64-unknown-linux-gnu.tar.gz"
177177
sha256 "${SHA_LINUX}"
178178
end
179179
180180
def install
181-
bin.install "names"
181+
bin.install "inames"
182182
end
183183
184184
test do
185-
assert_match(/\w+-\w+/, shell_output("#{bin}/names"))
185+
assert_match(/\w+-\w+/, shell_output("#{bin}/inames"))
186186
end
187187
end
188188
EOF

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Added
11-
- Initial release of multicultural names generator
11+
- Initial release of iNames - inclusive multicultural names generator
1212
- Support for Persian/Iranian names
1313
- Support for Arabic names (with Latin transliteration)
1414
- Support for East Asian names (Chinese, Japanese)
@@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222
- Homebrew formula generation
2323

2424
### Changed
25-
- Extended the concept from [fnichol/names](https://github.com/fnichol/names) to be more multicultural and inclusive
25+
- Extended the concept from [fnichol/names](https://github.com/fnichol/names) to be more multicultural and inclusive as iNames
2626

2727
## [0.1.0] - TBD
2828
- Initial release

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Contributing to Multicultural Names Generator
1+
# Contributing to iNames - Inclusive Multicultural Names Generator
22

3-
Thank you for your interest in contributing to the Multicultural Names Generator! We welcome contributions that help make our name collection more diverse and inclusive.
3+
Thank you for your interest in contributing to iNames! We welcome contributions that help make our name collection more diverse and inclusive.
44

55
## How to Contribute
66

@@ -48,8 +48,8 @@ We especially welcome contributions that add names from cultures not yet well-re
4848

4949
```bash
5050
# Clone the repo
51-
git clone https://github.com/hamzeghalebi/names.git
52-
cd names
51+
git clone https://github.com/hamzeghalebi/inames.git
52+
cd inames
5353

5454
# Build the project
5555
cargo build

Cargo.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
2-
name = "names"
2+
name = "inames"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
authors = ["Hamze ghalebi@gmail.com"]
66
license = "MIT OR Apache-2.0"
7-
description = "Multicultural random name generator with Persian, Arabic, and Asian names"
8-
repository = "https://github.com/hamzeghalebi/names"
9-
keywords = ["names", "generator", "random", "multicultural", "persian"]
7+
description = "Inclusive multicultural random name generator with Persian, Arabic, and Asian names"
8+
repository = "https://github.com/hamzeghalebi/inames"
9+
keywords = ["inames", "inclusive", "generator", "multicultural", "persian"]
1010
categories = ["command-line-utilities"]
1111

1212
[dependencies]
@@ -21,5 +21,9 @@ serde = { version = "1.0.219", features = ["derive"] }
2121
tokio = { version = "1.45.1", features = ["full"] }
2222
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
2323

24+
[[bin]]
25+
name = "inames"
26+
path = "src/main.rs"
27+
2428
[dev-dependencies]
2529
pretty_assertions = "1.4"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ RUN mkdir src && echo 'fn main() {}' > src/main.rs && \
1515
COPY . .
1616
RUN cargo build --release
1717

18-
CMD ["./target/release/names"]
18+
CMD ["./target/release/inames"]

ESSAY.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# The Names We Choose
2+
3+
An essay on why multicultural naming matters in programming*
4+
5+
When I first started programming, all the example variable names were `foo` and `bar`. All the sample users were Alice and Bob. The generated test data was always John Smith from 123 Main Street. This seemed natural at the time—these were just conventions, arbitrary choices that didn't really matter. But conventions are never really arbitrary. They're a window into what we consider normal, and more importantly, what we consider Other.
6+
7+
The interesting thing about naming in programming is that it's one of the few creative acts that's purely for humans. The computer doesn't care if your variable is called `user` or `utilisateur` or `用户`. But the humans who read your code do care, because names are how we understand what code does. And when all those names come from one culture, we're subtly telling everyone else that this is not their space.
8+
9+
I realized this viscerally when I was debugging a name generator that a startup was using for their test data. Every generated name was Western. Not intentionally—nobody sat down and decided to exclude 80% of the world. It just happened, because that's what the default libraries did, and nobody questioned it. But their actual users were mostly from Asia and the Middle East. Their test data was literally unable to represent their real users.
10+
11+
This is a bug, but not the kind that throws an exception.
12+
13+
The deeper issue isn't just about representation, though that matters. It's about the assumptions we build into our systems. When your random name generator can only produce "Jennifer Anderson" and not "Chen Wei" or "Fatima Al-Rashid," you're building software that will probably fail in subtle ways when it encounters the real world. Your regex will break on Irish names with apostrophes. Your database will truncate Thai names. Your UI will wrap incorrectly for Arabic names.
14+
15+
But there's something even more fundamental here. Programming is an act of imagination. We're creating worlds—small ones, usually, but worlds nonetheless. And the names we use in these worlds shape how we think about them. When every example uses Western names, we're training ourselves to think of Western users as the default and everyone else as edge cases.
16+
17+
Edge cases. Think about that phrase. We're literally pushing most of the world to the edges of our mental model.
18+
19+
The counterargument I often hear is that it's just easier to use familiar names. And that's true—for some definition of "familiar." But familiar to whom? This is the same logic that led to cameras that couldn't properly photograph dark skin, or voice recognition that couldn't understand accents. It's not neutral. It's a choice about whose convenience matters.
20+
21+
What's particularly ironic is that programming is one of the most globally distributed professions. A piece of code written in Bangalore might be reviewed in Berlin, deployed in San Francisco, and used in São Paulo. Yet our examples and test data often pretend this global community doesn't exist.
22+
23+
The solution isn't complicated. When you need a random name, use a generator that draws from multiple cultures. When you're writing examples, vary the names you use. When you're creating test data, make it representative. It's a small change that costs almost nothing.
24+
25+
But the impact is larger than it seems. Every time someone sees their culture represented in code examples, it sends a message: you belong here. Every time a system handles a non-Western name correctly, it shows that the developers thought about users beyond their own bubble. These small acts of inclusion add up.
26+
27+
There's a beautiful paradox in naming. Names are arbitrary—we could call variables anything—yet they're also deeply meaningful. They're how we communicate intent, how we share understanding, how we build mental models. And when those names reflect the full diversity of the people writing and using software, we build better systems.
28+
29+
The next time you need a random name, consider using "Priya Sharma" instead of "Jane Doe." Not because it's politically correct, but because it's technically correct. The world is not a Western monoculture, and our code shouldn't pretend it is.
30+
31+
After all, the best code is the code that works for everyone.
32+
33+
---
34+

README.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Multicultural Names Generator
1+
# iNames - Inclusive Multicultural Names Generator
22

3-
[![CI](https://github.com/hamzeghalebi/names/actions/workflows/ci.yml/badge.svg)](https://github.com/hamzeghalebi/names/actions/workflows/ci.yml)
4-
[![Crates.io](https://img.shields.io/crates/v/names.svg)](https://crates.io/crates/names)
3+
[![CI](https://github.com/hamzeghalebi/inames/actions/workflows/ci.yml/badge.svg)](https://github.com/hamzeghalebi/inames/actions/workflows/ci.yml)
4+
[![Crates.io](https://img.shields.io/crates/v/inames.svg)](https://crates.io/crates/inames)
55
[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](LICENSE-MIT)
66

7-
A random name generator for Rust that creates unique names using Persian, Arabic, and Asian names written in Latin characters.
7+
An inclusive random name generator for Rust that creates unique names using Persian, Arabic, and Asian names written in Latin characters.
88

99
Inspired by [fnichol/names](https://github.com/fnichol/names), this project extends the concept to include multicultural names from around the world, making it more inclusive and diverse while maintaining the same simple and effective API.
1010

@@ -34,24 +34,24 @@ dalil-fatima-8472
3434

3535
```bash
3636
brew tap hamzeghalebi/tap
37-
brew install names
37+
brew install inames
3838
```
3939

4040
### Using Cargo
4141

4242
```bash
43-
cargo install names
43+
cargo install inames
4444
```
4545

4646
### Pre-built Binaries
4747

48-
Download pre-built binaries from the [releases page](https://github.com/hamzeghalebi/names/releases).
48+
Download pre-built binaries from the [releases page](https://github.com/hamzeghalebi/inames/releases).
4949

5050
### From Source
5151

5252
```bash
53-
git clone https://github.com/hamzeghalebi/names.git
54-
cd names
53+
git clone https://github.com/hamzeghalebi/inames.git
54+
cd inames
5555
cargo build --release
5656
cargo install --path .
5757
```
@@ -62,24 +62,24 @@ cargo install --path .
6262

6363
Generate a single name:
6464
```bash
65-
names
65+
inames
6666
```
6767

6868
Generate multiple names:
6969
```bash
70-
names --amount 5
70+
inames --amount 5
7171
```
7272

7373
Generate names with numbers:
7474
```bash
75-
names --number
76-
names --number --amount 10
75+
inames --number
76+
inames --number --amount 10
7777
```
7878

7979
### As a Library
8080

8181
```rust
82-
use names::{Generator, Name};
82+
use inames::{Generator, Name};
8383

8484
fn main() {
8585
// Default generator
@@ -110,6 +110,10 @@ The name lists include carefully selected names from:
110110

111111
All names are respectfully chosen and transliterated to be easily readable in Latin characters.
112112

113+
## Why This Matters
114+
115+
Read the essay ["The Names We Choose"](ESSAY.md) for thoughts on why multicultural naming in programming is more important than it might seem.
116+
113117
## Development
114118

115119
Use `just` to see available development commands:

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,17 @@ mod tests {
7474

7575
#[test]
7676
fn test_default_generator() {
77-
let mut gen = Generator::default();
78-
let name = gen.next().unwrap();
77+
let mut generator = Generator::default();
78+
let name = generator.next().unwrap();
7979
assert!(name.contains('-'));
8080
let parts: Vec<&str> = name.split('-').collect();
8181
assert_eq!(parts.len(), 2);
8282
}
8383

8484
#[test]
8585
fn test_numbered_generator() {
86-
let mut gen = Generator::with_naming(Name::Numbered);
87-
let name = gen.next().unwrap();
86+
let mut generator = Generator::with_naming(Name::Numbered);
87+
let name = generator.next().unwrap();
8888
let parts: Vec<&str> = name.split('-').collect();
8989
assert_eq!(parts.len(), 3);
9090
assert_eq!(parts[2].len(), 4);
@@ -95,8 +95,8 @@ mod tests {
9595
fn test_custom_lists() {
9696
let adjectives = &["test"];
9797
let nouns = &["name"];
98-
let mut gen = Generator::new(adjectives, nouns, Name::Plain);
99-
let name = gen.next().unwrap();
98+
let mut generator = Generator::new(adjectives, nouns, Name::Plain);
99+
let name = generator.next().unwrap();
100100
assert_eq!(name, "test-name");
101101
}
102102
}

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use clap::Parser;
2-
use names::{Generator, Name};
2+
use inames::{Generator, Name};
33

4-
/// Multicultural random name generator
4+
/// iNames - Inclusive multicultural random name generator
55
///
66
/// Generates random names using Persian, Arabic, and Asian names written in Latin characters.
77
/// Examples: "aziz-hamze", "sakura-krishna", "rumi-chen-1234"
88
#[derive(Parser)]
9-
#[command(name = "names", version, about, long_about = None)]
9+
#[command(name = "inames", version, about, long_about = None)]
1010
struct Cli {
1111
/// Add a random 4-digit number to the generated name
1212
#[arg(short, long)]

0 commit comments

Comments
 (0)