Live data from Hacker News

Former Microsoft dev built a 2.5KB Notepad clone

theguptalog.blogspot.com

21–26 of 26 posts

Re: Former Microsoft dev built a 2.5KB Notepad clone

#21

When I was younger, I decided I wanted to learn how to write games. I decided I needed to start simple, though, and I thought NOTEPAD.EXE was about the simplest thing out there. (This was in Windows 3.1.) So to learn how NOTEPAD.EXE worked, I opened NOTEPAD.EXE in NOTEPAD.EXE, and spent several hours trying to decipher the symbols' meanings. My first attempt at coding was … unsuccessful.

So far and yet so close...

Re: Former Microsoft dev built a 2.5KB Notepad clone

#22
post #5

Sure, but it's basically a very thin wrapper on the built-in RichEdit control, with some added menus and niceties. Don't get me wrong, it's hundreds of times better than whatever UWP abomination they call Notepad in Windows 11 nowadays (with logins and AI features), but it's not an actual text viewer / editor from scratch.

I think the original notepad.exe was just a Win32 Edit control (whatever it was called) with a window and some menus. I expect that Apple's TextEdit.app is just a wrapper around the rich text control in Cocoa, too.

But yes, it's hardly writing a text editor to write a Win32 app in assembly. (Although, if they used the COM control and did that in hand-written assembly, that would at least be an impressively tedious mortification of the flesh.)

Re: Former Microsoft dev built a 2.5KB Notepad clone

#23

When I was younger, I decided I wanted to learn how to write games. I decided I needed to start simple, though, and I thought NOTEPAD.EXE was about the simplest thing out there. (This was in Windows 3.1.) So to learn how NOTEPAD.EXE worked, I opened NOTEPAD.EXE in NOTEPAD.EXE, and spent several hours trying to decipher the symbols' meanings. My first attempt at coding was … unsuccessful.

I did something similar with electronics. I thought if I applied voltages to random pins, and read voltages on other pins, I could figure out how an integrated circuit worked.

The crazy part is that my strategy actually worked on a single MOSFET transistor, which only has three pins. I just assumed it would scale up on computer chip with tens to hundreds of thousands of MOSFETS and a few dozen pins. Also, if my first test had been on a BJT transistor, instead of a MOSFET, I would have destroyed it.

Re: Former Microsoft dev built a 2.5KB Notepad clone

#24
post #6

This person's whole marketing seems to be based on "I built Task Manager", so much that it has become a meme, see e.g. https://www.reddit.com/r/pcmasterrace/comments/1sl5nv4/task_... (also apparently there's some dark history involved)

Wow, you weren't kidding. Apparently, he (Dave Plummer) ran an entire company that used deceptive scare tactics to try to coerce consumers into buying his "anti-malware" software.

https://www.atg.wa.gov/news/news-releases/attorney-general-s...

Re: Former Microsoft dev built a 2.5KB Notepad clone

#25
post #16

See the author's video here: The Challenge: Can we build Notepad in 3K in assembly language? https://www.youtube.com/watch?v=OG91c7xsNMc

> 2.5 kilobytes. No bloat, no telemetry, no nonsense. Just pure old-school Windows done right. Let's dive in and see how it's done. > And today, we're going to answer the obvious question, which is not merely, "How is that possible?" The more interesting question is: "What does Windows already contain that lets a program that small behave like a real application?" Because the answer is hiding in plain sight, and it s…

Thanks. I'll make sure to tell him that.

Re: Former Microsoft dev built a 2.5KB Notepad clone

#26
post #22
post #5

Sure, but it's basically a very thin wrapper on the built-in RichEdit control, with some added menus and niceties. Don't get me wrong, it's hundreds of times better than whatever UWP abomination they call Notepad in Windows 11 nowadays (with logins and AI features), but it's not an actual text viewer / editor from scratch.

I think the original notepad.exe was just a Win32 Edit control (whatever it was called) with a window and some menus. I expect that Apple's TextEdit.app is just a wrapper around the rich text control in Cocoa, too. But yes, it's hardly writing a text editor to write a Win32 app in assembly. (Although, if they used the COM control and did that in hand-written assembly, that would at least be an impressively tedious mo…

>I expect that Apple's TextEdit.app is just a wrapper around the rich text control in Cocoa

https://developer.apple.com/library/archive/samplecode/TextE...

Post reply on HN