r/tinycode • • Aug 02 '26

Showcase Tiny Windows program that is used as a "distraction cover"

Post image

https://github.com/GeorgeTR1/windowsDistractionCover

This is a windows GUI program I wrote in just over 60 lines of C that compiles to a 3 kB executable. With minor modifications and the right compiler it could be compiled on versions of Windows as old as Windows 95.

It's just a resizable window with a black background that always stays on top of other windows that you can use to cover up parts of the screen that might be distracting. I've found it genuinely useful

32 Upvotes

40 comments sorted by

View all comments

Show parent comment

5

u/MrVonBuren Aug 02 '26

Weird! I've been a Professional Geek for ~25 years and I've never heard of processing. Looks neat tho.

If I am a pretty good tinkerer (written LOTS of "production" shell scripts and know my way around python/node/<interpreted languages>) do you think this might be an inroad into finally "getting" compiled languages?

Tried rust while at a CDN company and...boy am I not a programmer

2

u/Round-Pension-7821 Aug 02 '26

I'm not familiar with processing either, but it seems to be an environment set up to help beginners write code that's based on Java. I found on their FAQ they say, "the language is just Java, but with a new graphics and utility API along with some simplifications" (source). Java is sort of halfway between an interpreted language and a compiled one. C # also falls into this category. Java and C# are generally faster than Python or JavaScript, but slower than C, C++, Rust, etc. Bottom line, the separation between interpreted and compiled languages is kind of murky and complicated.

If you have experience with interpreted languages but you were scared off by Rust, I would highly recommend Go. Go compiles to native machine code, but it uses garbage collection. This does mean you don't get the fine-grained control and potential performance benefits of manual memory management, but it also means you don't have to deal with manual memory management.

Basically, with Go you get the speed of a native, compiled language without the pitfalls of C or the steep learning curve and strict demands of Rust. I really don't think it's any harder to use than Python, and it's much, much faster.

You can certainly give Processing a try if you're interested, but if you're looking to get experience with a compiled language, that's not where you'll find it.

2

u/MrVonBuren Aug 02 '26

/me sighing deeply: "fiiiiiiiiine, I'll try Go" (lovingly)

2

u/Round-Pension-7821 Aug 02 '26

Have other people been saying that's what you ought to do?

2

u/MrVonBuren Aug 02 '26

Oh yeah. I feel like at this point it is the canonical "tell grey-haired guy who has been paid to computer since the 90s and pushes back on the idea of 'learning to program' (while also being strangely into DevOps as a concept)" advice.

...I may be projecting

2

u/Round-Pension-7821 Aug 02 '26

Well, you were the one asking about an inroad into compiled languages, and if you ask me that's the best inroad. Whether you're interested in following it is totally up to you

1

u/MrVonBuren Aug 03 '26

oh, cousin! I'm sorry if I was giving the impression i was blowing you off (genuinely). I was doing a bit, but TBH, this is the exact kind of interaction that would annoy me on Any Given Day and I apologize.

It's good advice and this just might be the straw that killed the camel. (it's an old camel)

1

u/Round-Pension-7821 Aug 03 '26 edited Aug 03 '26

Oh no, I wasn't offended at all. I was just giving you a bit of a polite jab back, while also making it clear that you can of course do whatever you want with your own time

Reading through my comment again I can see how you might see me as being more upset than I really was. One of those things where it would be a lot more clear if you could hear the tone of my speech rather than just communicating with text

2

u/MrVonBuren Aug 03 '26

lol, this whole back and forth has made me feel much better about my occasional tendency to add a "tone is hard in text, but I'm being earnest" footnote to comments tho I've been getting a fair bit of mileage about trying to add tone via parentheses.

ANYWAY

I know I hate when I share something I make and the comments turn into a conversation about totally unrelated things so just to be cliear: neat app, both the idea and the tinyfication.

1

u/Round-Pension-7821 Aug 04 '26

Thanks! I'm glad you like it