7 ms·
I thought this article would be about something like https://en.wikipedia.org/wiki/Java_4K_Game_Programming_Contest https://en.wikipedia.org/wiki/Java_4K_Game_P
by userbinator 7y ago
I thought this article would be about something like https://en.wikipedia.org/wiki/Java_4K_Game_Programming_Contest https://en.wikipedia.org/wiki/Java_4K_Game_Programming_Conte... but it's more appropriately "Really Small JVM".
For a simple project requiring java.net.http, using these steps produced a 23MB jlink image
23MB may seem tiny today, but depending on what that "simple project" does, in absolute terms it's still twenty-three million bytes. For comparison, a full installation of Windows 3.11 is roughly that size too, not compressed. As the saying goes, "there's still plenty of room at the bottom."
- aasasd 7y agoI thought it would be about sim cards and other smart cards.
- bluedino 7y agoTo be fair, Windows at that time was a pretty simple 16-bit operating system, and didn't even support networking until you added Winsock or WFW 3.11. It didn't really support much of anything until you started adding lots of other DLL's and libraries
- thrower123 7y agoThat'd be 16 floppy disks, or roughly a quarter of the hard disk space on my first PC clone. Or nearly ten Dooms!
- mhd 7y agoYes, I remember when people suddenly started writing win32 programs in assembly, as a backlash against the bloat of MFC etc. (and maybe because there was a bunch of non-PC assembly programmers switching?) One interestin aspect of this is that we're going a bit back to Lisp/Smalltalk images in the mainstream, bundling runtime and code. (With few of the former's benefits, of course.) Has been done with scriptings apps, of course (Python, Perl, Tcl's Starkits), but with Java and Electron it's bound to have a wider audience. Maybe because we can't complain about size/complexity issues anymore, now that something even more complex is common (code+runtime+wholefrigginoperatingsystem).
- ComputerGuru 7y ago23 megabytes does not seem, by any metric, “tiny” to anyone that I work with.
- hyperpallium 7y agoThings That Turbo Pascal is Smaller Than https://prog21.dadgum.com/116.html https://prog21.dadgum.com/116.html
- aabbcc1241 7y agoThis reminds me how small programs written in Red/Rebol/Lisp are in general: https://www.red-lang.org/ https://www.red-lang.org/
- NathanielLovin 7y agoThe wikipedia page for Turbo Pascal, at 43,234 bytes, is bigger than Turbo Pascal
- icedchai 7y agoIt is remarkable how bloated modern software is. My first hard drive, back in 1988, was 30 megabytes.
- commandlinefan 7y agoIf you start talking to most programmers about efficiency, you’ll almost immediately be shut down with “premature optimization is the root of all evil” (no matter how non-premature the optimization might be). There’s a pervasive belief among programmers that hardware is so fast that, as long as the software works, it doesn’t matter how efficiently it uses memory, or CPU, or disk space, or the network… yet the #1 complaint I hear from software _users_ is “damn, this thing is slow”. I yearn for a day when we start behaving like real professional engineers and strive to make the most efficient use of resources.
- tijsvd 7y agoThat quote about premature optimization is from 1974. Back then, manually tweaking code to produce the "right" machine instructions really mattered. But it was time-consuming and hard, and hence should be applied only to the most time-sensitive part of a program. Today, we get that kind of optimization, for the whole program, simply by adding -O2 to our build options, and waiting slightly longer for the compiler to complete. Engineers using that quote are an important reason for the failure of software projects. Not only should we make efficient use of resources, but performance of software must be taken into account right from the beginning of any software project. Performance requirements must be clear from the start (how many concurrent users, how many requests per second, etc., times 2 (or 20) for safety) and when a design is made, performance requirements for each individual component should be set (and measured after implementation).
- lubujackson 7y agoI am always surprised by devs that have a strong sense for O notation and how it affects code complexity, but have no clue about the bloat in tools or libraries they throw on the pile. So version 1.0 comes around and they immediately need to refactor to get down from a 15 second page load (or from a huge file/data stream). Fine tuning code is one thing, but installing a bloated package for one tiny feature should be well-considered at the time of implementation because every addition adds to the tech debt bill.