Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

0, 1, Many, a Zillion

DZone's Guide to

0, 1, Many, a Zillion

· Performance Zone
Free Resource

Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.

There are only four numbers in computer programs:

0, 1, many, "a zillion"

If you have 2 or more of anything, you are, in general, better off using loops to process many of them.

But what is "a zillion?"

Zillion is a made-up number. Your system cannot hold a zillion items in memory. It cannot show a zillion items on the screen.


Doesn't work for "a zillion":

Select employee name:

Doesn't work for "a zillion":

def handleFiles( filenames: Array[String] ) {
    val results = openFiles(filenames).readAll().processAll()
    results
}
* The program first opens all the files, and then processes them. The OS will run out of file handles.

Doesn't work for "a zillion":

Changing software from handling "many" to "a zillion" is hard if the program is already written.

Decide when to you need to handle a zillion.

Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}