/r/tinycode
This subreddit is about minimalistic, often but not always simple implementations of just about everything. tiny code / minimalistic programming / yagni / kiss / dry
TL;DR: Low line count, high quality
This subreddit is about minimalistic, often but not always simple implementations of just about everything.
PLEASE NOTE: This Subreddit is NOT about CodeGolf and obfuscation!
_______Low line count, high quality!_______
I'm sure you get the idea by now ;) ...
Remember: "Tiny depends on what you're doing. A tiny box, a tiny house, and a tiny country are very different sizes." - snarkyxanf
In other words: Try to aim for stuff that makes you go "wow!" instead of "huh?" ;)
Also look into:
Other Subreddits that might interest you:
/r/tinycode
Hi guys! I’ve implemented the smallest SVG analog clock I could make. Is there a way to make it even smaller or simpler? Alternatively, without adding too much complexity, how can I make it look more appealing? Do you have any suggestions for improvement?
Here’s the CodeSandbox.
const AnalogClock = ({ date = new Date() }) => (
<div
mount={(self) => {
const timerId = setInterval(() => {
date = new Date();
update(self);
}, 1000);
return () => clearInterval(timerId);
}}
>
<svg viewBox="-50 -50 100 100">
<circle class="face" r="48" />
<line
class="hour"
transform={() =>
`rotate(${30 * (date.getHours() % 12) + date.getMinutes() / 2})`
}
y2="-25"
/>
<line
class="minute"
transform={() => `rotate(${6 * date.getMinutes()})`}
y2="-35"
/>
<line
class="second"
transform={() => `rotate(${6 * date.getSeconds()})`}
y2="-35"
/>
</svg>
</div>
);
Made with Fusor library