small number suggestion

Ideas how the game could be improved and suggestions for subsequent versions of the game. (this is just a space for ideas! We can't guarantee suggestions will be implemented!)

Moderator: moderators

Guest

Post by Guest » 09.10.2007, 18:32

Oh I know about regex, I'd be crippled in Unix if I couldn't. Also handy Windows-side when using the lovely Textpad editor. But my understanding is that it's one of the more CPU-intensive processes and thus not to be taken lightly. Like how eval() can do cool stuff, but you usually shouldn't. (Relatively speaking of course. For some projects it's nothing, but times 2000 users on a single machine used for dbSever/webServer during peak hours, every bit counts.)

I could be wrong, and maybe all things considered it is feasible. Or a compromise would be possible, imbedding a little javascript to parse client-side before submitting. I just don't think it's a no-brainer decision for what, you'd have to admit, is a pretty small benefit. Especially compared to other things that could be done, like market order consolidation, stripping slashes from messages in the outbox, wordwrapping the fax listings ...

Now the Microsoft Regionalization solutions however, that's new to me. It is admittedly a weakness in my skillsets, but coming from a guy who still has Pascal and FORTRAN rattling around in his head, I'm a little reluctant to pick up new stuff if I have the ability to live without it. :D

Guest

Post by Guest » 09.10.2007, 19:16

Pascal, Pascal, my first true love :) I stopped using it when Borland tools lost favor to Microsoft, and C+ (and C++) got OOPs.

True, RegEx is fairly CPU intensive. Most of the client/server stuff I've done runs fine using RegEx, but they have been 100 concurrent users or less. So we are talking another order of magnitude. Personally, you are right on about building it as client-side parsing and server side validation; and also correct in that there may be little bang for the buck considering some of the other additions/optimizations that could be done.

I'm delving back into the Unix/Linux world after a few years absence. Going to set up a Mac, Ubuntu, and Commodore 64 (yes, you read it right) for a Networking course I'm teaching to show the students all sorts of computers can run on the exact same network.

One of the hardest things with the IT profession is that you could easily spend 40 hours a week just reading about all the new technology and not getting any real work done. Thus, we are forced to silo ourselves and resist the temptation to experiment with "cool" new things. I'm lucky as a professor, as part of my job is to examine new theory and literature. Some of my more interesting recent finds are Ant Theory for optimizing high-speed networks and data infrastructures, Digital Tattoos using either filaments or nanobots injected under the skin, and ink jet technologies allowing one to use specialized ink cartridges to 'print' batteries, circuit boards, display screen, and even human tissue.

Guest

Post by Guest » 09.10.2007, 20:03

That is cool. I worked for a while for a large consultancy where we had some leeway for experimenting with new and cool stuff, but it ultimately came down to the practicality of what you can sell.

I remember specifically when RFIDs were the newest hot thing. We made sure everyone understood them, were prepared to build whole departments of RFID experts, had pre-built segments so we could set anyone up with their own RFID database in a flash, etc. And we had this great presentation about how they were the ultimate convenicence: if you were at a party and liked a jacket someone else was wearing, you could point your cell phone at the jacket, find out who made it, order one mailed to you in your size, and the wearer would get a commission for the whole thing. Isn't technology cool?

Yeah I don't know about you, but the last time I went clothes shopping it didn't involve going around to strangers and pointing a phone at them. RFIDs are indeed pretty handy, but then I remember that we can't even get the public to switch to free HDTV let alone get them to adapt anything with privacy implications. So reluctantly I have to be guided by practicality rather than coolness way too often.
Commodore 64
Those plucky little machines remain popular. I never had one, my family (and for that matter, school district) was more attracted to the Apple ][ Family. But I knew people who did, and to this day I can't have an extended conversation with a self-labeled "hacker" without someone bringing up the C64.

Guest

Post by Guest » 11.10.2007, 20:38

although i don't enter a number too often where the number of zeros goes very high, i love the possiblity to use something like this. I guess i would use it from about 1e5 and up. I see kapilands is written in php, and this little code should take care of most of the conversion to standard format.

please note that the piece isn't directly usable, it needs better checking of input and has limitations in support. (not to mension possible typos and so on as i haven't tried running it...)

Code: Select all

if (stripos($input,'e') !== FALSE) {
  $exponent = substr($input, stripos($input,'e')+1, strlen($input)-stripos($input,'e')-1);
  $significand = substr($input, 0, stripos($input,'e'));
  $result = $significand * pow(10, $exponent);
}
else {
  $result = $input;
}

Guest

Post by Guest » 11.10.2007, 22:58

hebawom wrote:I can count to 6 or 7. But when you are in a rush you can make mistakes. I bought 9 million water on the market the other day and thought I was buying 900k :oops:
i have done that before

Guest

Post by Guest » 11.10.2007, 23:58

Knolls wrote:Yeah don't hold your breath on that, in any form. You want to change a number field to a text field that parses itself for expected non-numerical characters while simultaneously excluding all other non-numerical characters, then converts the numbers inherent in the string based on the characters that are appended. Just so you don't have to count how many times you hit the zero key.
Algorithms like these are pretty easy to write, even for intermediate level programmers...

User avatar
pearlbay
Posts: 1671
Joined: 14.09.2007, 09:52
Location: Pearlbay Holdings (R1), Bay of Pearls (R2)

Post by pearlbay » 12.10.2007, 08:45

Knolls wrote: My concern there is 3-fold: Coder time, process time, and potential for user confusion
...which is why this may be a nice thing to have, but not a top priority and since our programmers really have enough to do as it is, we'll keep focusing on the "must haves" ... Sorry folks, but I'm afraid you'll have to keep counting your zeros ... or copy and paste them ;-)

Guest

Post by Guest » 12.10.2007, 09:11

pearlbay wrote:
Knolls wrote: My concern there is 3-fold: Coder time, process time, and potential for user confusion
...which is why this may be a nice thing to have, but not a top priority and since our programmers really have enough to do as it is, we'll keep focusing on the "must haves" ... Sorry folks, but I'm afraid you'll have to keep counting your zeros ... or copy and paste them ;-)
Administrator buildings can help you very much if you have bulk of buildings and the same size.

Post Reply