Pigułka wiedzy

Masz 30 sekund? Super, tyle właśnie wystarczy, by nauczyć się czegoś nowego!

Find Files by Name in Seconds

You can quickly search for files by name anywhere in the system using the find command.

find / -name "config.php"

It scans directories recursively and locates files even if you don’t know where they’re stored.

How to Exit Vim

You can exit Vim editor with a single command, no matter how „stuck” you feel.

# Save and quit
:wq

# Quit without saving
:q!

# Save only
:w

Just press Esc first to ensure you’re in normal mode, then type the command.

Make your font sizes responsive with clamp()

You can make font sizes or spacing fully responsive without media queries using the clamp() function.

font-size: clamp(1rem, 2vw, 2rem);

clamp() smoothly scales values between a minimum and maximum, making layouts more flexible and predictable.

Style Parents with :has()

You can target a parent element based on what’s happening inside it using the CSS :has() selector

.card:has(.button:hover) {
    background: #f0f0f0;
}

:has() works like a parent selector, letting you style an element based on the children it contains.

What Is the .gitkeep File Used For?

The .gitkeep file isn’t a real Git feature – it’s just an empty placeholder developers use to make Git track otherwise empty folders, since Git ignores empty directories by default.

Ignore Files Locally with Git Skip-Worktree

With git update-index --skip-worktree, you can ignore files only on your local machine – it doesn’t change anything in the repo, and your local edits aren’t visible to other developers.

Optional Chaining: The Safe Way to Access Data

You can avoid „Cannot read property of undefined” errors by using optional chaining, which safely checks whether a value exists before accessing its properties.

const city = user?.profile?.address?.city ?? "Unknown";

Optional chaining lets you navigate deeply nested objects without writing multiple defensive checks – clean, safe, and modern.

Write Cleaner Code with Guard Clauses

Instead of writing nested if statements, you can use guard clauses – early-return checks that immediately stop the function when the input is invalid. This makes your code cleaner, easier to read, and much easier to maintain.

function processString(value) {
    if (typeof value !== 'string') return null;
    if (value.length <= 3) return null;

    return value.toUpperCase();
}

Powyższy zestaw ciekawostek z zakresu programowania to szybka porcja wiedzy w pigułce, dla zabieganych programistów, bez lania wody, bez zbędnej teorii – tylko czyste, skondensowane info w stylu „Czy wiesz, że …”

Dostrzeżesz tu zarówno podstawy, które każdy programista wiedzieć powinien, (przynajmniej w teorii, ale bądźmy szczerzy – pamięć mamy dobrą, ale krótką i bez google albo AI momentami byłoby ciężko), jak i programistyczne „smaczki”, przyprawiające o nerwowy śmiech nawet doświadczonych developerów. Niezależnie, czy jesteś początkującym koderem, doświadczonym devem, czy po prostu lubisz klikać w rzeczy, które wyglądają mądrze – znajdziesz tu coś dla siebie.

Przygotuj się na uśmiech, przebłyski myśli: „aaa, o to chodzi!” oraz stan „ooo, dobrze wiedzieć…”

UWAGA ! Możliwe efekty uboczne: nagłe oświecenie programistyczne oraz niepohamowana chęć dzielenia się wiedzą z każdym napotkanym developerem.