Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: loops Clear Filter

Elements of C Style (1994)

Notes on Programming Practices More Purity More Speed More Correctness Other notes on C programming Style Snobbism Your Friends, the Header Files Your Friend, the Compiler Function and Procedure Names Variable Names Notes on Formatting Style Indentation Braces Spacing Comments Function declarations Cute Tricks in C Powers of Two Unrolling Small Loops Unrolling Bigger Loops Counting Bits Random Essays on Programming Meaningless Variable Names Considered Useful GOTOs Considered Us

Anatomy of a Python Loop

Learn Python loops the fun way by rolling dice, casting fireballs, and finally understanding what continue really does. Last time, when we built our little dice-rolling function, we learned how to package up logic into reusable blocks. One die roll at a time was cool… but any tabletop nerd knows the real action starts when you need to roll lots of dice. 3d6 for ability scores. 8d6 for a fireball spell. Or the cruel 10d10 your DM makes you roll when things go really sideways. So how do we te

Our Best Look Yet at a Solar Flare Reveals the Sun’s Wilder Side

It took astronomers a little over a year to analyze the sharpest-ever images of a solar flare. But they’re finally done, and the results are illuminating—literally and figuratively. Last year, NSF’s Daniel K. Inouye Solar Telescope captured a high-resolution image of a solar flare crossed with dark strands of coronal loops. Further analysis revealed that the solar flare was an X-class flare—the most powerful class—in a decay phase. The coronal loop strands averaged around 30 miles (48 kilometer

Homotopy Equivalences

Previously: Fibrations and Cofibrations. In topology, we say that two shapes are the same if there is a homeomorphism– an invertible continuous map– between them. Continuity means that nothing is broken and nothing is glued together. This is how we can turn a coffe cup into a torus. A homeomorphism, however, won’t let us shrink a torus to a circle. So if we are only interested in how many holes the shapes have, we have to relax our notion of equivalence. Let’s go back to the definition of home