- Posts: 521
- Thank you received: 0
What's the equivalent of 32KB?
- jhoare
- Offline
- Red Giant
Most modern tools like Java will use single byte representation where possible.
32Kbytes is 32 * 1024 * characters (Characters in the Ascii standard are representable as a byte )
So that is 32768 characters and given that most lines of text are about 80 characters, that represents 410 lines of text.
Walter Scott Houston's book Deep Sky Wonders has approximately 44 lines per page, so 32 Kbytes would present about 9 pages of text in his book
Except that UTF-8 and just about every modern character encoding scheme uses two bytes rather than 1 .... so half that
Go check it out with this sample:
[code:1]
Byte byteStr[] = "a".getBytes();
System.out.println("Length of byte representation: "+byteStr.length);
[/code:1]
Modern? It was released in 1995, 4 years after its initial conception. That's positively ancient by IT standards
I've been complaining about 'Java performance' for almost as long, but I must confess the truth - what I've really been complaining about is probably the poor quality of code in the Java apps I've had to use. Java's biggest weakness is that so many Java 'programmers' learned the craft in certification sweatshops and have no real appreciation of the need for explicit memory management, overflow checks, explicit size limits, and other useful features that are included in good code. I gave up programming before Java and never even learned it, yet even I have immediately spotted flaws in some of the hokiest code examples I've been shown.
John
Better that old people should die of talk than to have young people die in war.
Please Log in or Create an account to join the conversation.
- DaveGrennan
- Offline
- IFAS Astronomer of the Year 2010
- Posts: 2707
- Thank you received: 32
When you go back to the early 80's then the ZX Spectrum had 48kb of memory and was capable of keeping us all amused for hours of computer games.
Ha pure luxury! I used to dream of 48K back in the days when I used a 1K Sinclair ZX81! Boy did you learn to write tight code back in the good ol days.
Wasn't it Bill Gates who once famously said, '640K ought to be enough for anyone'?
Regards and Clear Skies,
Dave.
J41 - Raheny Observatory.
www.webtreatz.com
Equipment List here
Please Log in or Create an account to join the conversation.
- voyager
- Offline
- Super Giant
- Posts: 3663
- Thank you received: 2
Wasn't it Bill Gates who once famously said, '640K ought to be enough for anyone'?
It was indeed ... makes the big ball of bloat that is Vista even funnier
Bart.
My Home Page - www.bartbusschots.ie
Please Log in or Create an account to join the conversation.
- jhoare
- Offline
- Red Giant
- Posts: 521
- Thank you received: 0
John
Better that old people should die of talk than to have young people die in war.
Please Log in or Create an account to join the conversation.
- voyager
- Offline
- Super Giant
- Posts: 3663
- Thank you received: 2
That's nothing compared to the IBM President who thought that the world might need 3(?) computers...
The quote is "maybe 5". Yea, pretty short-sighted
My Home Page - www.bartbusschots.ie
Please Log in or Create an account to join the conversation.
- Seanie_Morris
- Offline
- Administrator
- Posts: 9640
- Thank you received: 547
Midlands Astronomy Club.
Radio Presenter (Midlands 103), Space Enthusiast, Astronomy Outreach Co-ordinator.
Former IFAS Chairperson and Secretary.
Please Log in or Create an account to join the conversation.