Tag

code tricks

0 views collected around this technical thread.

Architecture Digest
Architecture Digest
Mar 7, 2024 · Fundamentals

When a Variable Can Be Both 1 and 12: Exploring JavaScript and Java Tricks

This article examines the seemingly impossible condition "if(a == 1 && a == 12)" and demonstrates clever JavaScript and Java techniques that allow a single variable to satisfy multiple equality checks, turning a puzzling interview question into a fun exploration of language quirks.

FundamentalsJavaJavaScript
0 likes · 4 min read
When a Variable Can Be Both 1 and 12: Exploring JavaScript and Java Tricks
Python Programming Learning Circle
Python Programming Learning Circle
Jan 20, 2024 · Fundamentals

Four Time‑Saving Python Tricks to Speed Up Your Code

This article presents four practical Python performance tricks—including list reversal, tuple swapping, in‑function looping, and reducing function calls—that can shave 10–20% off execution time while keeping the code concise and readable.

PythonSpeedupcode tricks
0 likes · 5 min read
Four Time‑Saving Python Tricks to Speed Up Your Code
Python Programming Learning Circle
Python Programming Learning Circle
Jul 25, 2022 · Fundamentals

10 Practical Python Code Tricks for Efficient Programming

This article presents ten useful Python techniques—including string joining, list comprehensions, enumerate, zip, itertools, Counter, dictionary creation, generators, multiple return values, and the sorted function—each explained with clear examples and performance comparisons to help developers write cleaner and faster code.

code tricksgeneratoritertools
0 likes · 10 min read
10 Practical Python Code Tricks for Efficient Programming