Michael Sims
Campbell Ritchie wrote:You have obviously programmed in C.
Please space your code out so you don't have two {} on the same line (Except in array initialisers). It is by no means easy to read. Variable names like ct i and bStop (which you can maybe delete because you don't seen to be using it anywhere) don't tell us what they are supposed to mean.
I still think you would do better to find yourself an XML parser.
Michael Sims
Campbell Ritchie wrote:The conventions for C and those other languages were mostly developed when a megabyte of memory cost about the same as a large London house. And probably occupied about the same space. They tried to squeeze as much as possible into each line because each keystroke had a cost.
Campbell Ritchie wrote:...things have changed and spacing is considered important. Longer variable names and variable names which are self‑explanatory are now the thing.
Campbell Ritchie wrote:You can often set up options on IDEs to get braces to line up like this
{
something();
}
It varies from IDE to IDE.
Michael Sims
Michael D Sims wrote:I once calculated the cost of 8 gigs of ram using the Commodore 64 - 1983 price as a base. It had 64k of RAM and it cost around $400 for the whole computer. 1 gig of ram has 8,388,608k ... divide that by 64 and you get 16,384 Commodore 64’s in a gig of ram. At the $400 per 64 price, it would have cost $6,553,600.00(6.5 MILLION dollars) back in 1983 for a gig of ram. Todays typical computer has about 8 gigs of ram, so at the 1983 price, you’d be looking at $52,428,800.00 (52 MILLION dollars), for what today can be purchased for around $100.00. I don’t think anything in life or nature has depreciated that quickly over such a short period anywhere in our history. Technology is bizarre economically speaking.
Michael D Sims wrote:
Funny you mention this, as just before replying to this post, I found those settings in my IDE - which is IntelliJ IDEA 13 ... nice IDE, but jam packed with a zillion settings I’ll never use nor care to understand. Right now I’m having a problem with IntelliJ telling me that I can’t use a string in a switch statement because I need to use a Java version newer than 6 or something like that ... yet I’m using 1.8 so I dunno ... but I’ll start a new thread on that one.
Thanks again for your time and mentoring...
Mike Sims
Dave Tolls wrote:That's odd, because 13 is up to date with Java 8. 12 is stuck on Java 7.
You sure you have the latest updates?
Correction: about the same as LondonOn Sunday, I wrote: . . . a megabyte of memory cost about the same as a large London house. . . .
That is why we usually warn newbies to avoid IDEs until they are more experienced.Michael D Sims wrote: . . . ... nice IDE, but jam packed with a zillion settings . . .
That must be the magic number for manufacturers to be able to kick out a product while maintaining a profit of some kind. The only thing that changes is the technology they produce gets smaller and faster all the time. It's a good time to be alive on planet Earth!Campbell Ritchie wrote:Remember C came out in 1972 and those prices for memory were current in 1981; house prices rose by at least 3× during that decade and memory prices probably came down by 3×.
Actually memory prices have hardly changed: if you look here, you find they are still in a range straddling £49.95!
Michael Sims
Don't get me started about those stupid light bulbs. |