Programming languages, imperative ones in particular, place a lot of emphasis on sequence. Take this simple pseuodocode for example:
components = [4.5, 3.2, 4.0, 3.8]
min(round_down(components))
The result of this code is 3, but that same result can very clearly be achieved in a less computationally expensive manner by performing:
round_down(min(components))
Correct me if I am wrong, but current day compilers operate on source code that lacks the semantic to perform such an optimization.
Monday, March 27, 2006
Pythagoras was a smart guy
In a recent presentation by Epic's Tim Sweeny, it was stated:
For one thing, the computer can not predict how large a number may grow or what level of precision is required. In theory, any integer can have an infinite size, but in practice 32- or 64-bit integers have proven acceptable in most instances. This is because generally integers used in software nearly always represents a very real, very finite count.
Currently, it is left as a task to the programmer to determine how big a number can grow, but why not leave it to the programmer to define semantics of a number and allow a computer to choose a representation size? Should a programmer choose to omit any such constraints, use an "infinite" precision variable by default and leave semantic definitions as an optimization exercise.
Factoid: C# exposes more than 10 integer-like data types, none of which are those defined by (Pythagoras, 500BC).This got me thinking; why do I, a programmer, have to tell the computer exactly how much memory to allocate for a number? Why can't I define a variable as a Whole Number or as a Real Number?
For one thing, the computer can not predict how large a number may grow or what level of precision is required. In theory, any integer can have an infinite size, but in practice 32- or 64-bit integers have proven acceptable in most instances. This is because generally integers used in software nearly always represents a very real, very finite count.
Currently, it is left as a task to the programmer to determine how big a number can grow, but why not leave it to the programmer to define semantics of a number and allow a computer to choose a representation size? Should a programmer choose to omit any such constraints, use an "infinite" precision variable by default and leave semantic definitions as an optimization exercise.
File systems for people
Using Blogger, I am able to create and edit blog posts from a set of simple lists without any concern for how the data is stored. There is no "save" button to be clicked in OneNote. Blogger and OneNote provide intelligent data handling for me. Yet, if I create a document in Microsoft Word, I am forced to provide a file name and save location if I want to store my document.
As a user, I can utilize a file system to organize my documents for me, but generally, I just don't care. As long as all of my files are grouped by project (read: one level deep) I can find practically anything I need. N-tier grouping is overkill for nearly all typical user scenarios.
File systems define data relationships by hierarchical locality. If two files are in the same folder, they are probably related, but there is no guarantee of that. Data has a lot of inherent relationships that goes unexploited by current day software. Source documents such as code and Photoshop files are in no way linked to their output documents such as executables and web graphics. I might have to click three dozen times to find the file for the image that is embedded in an a Word document or I may never find it (it could have been deleted).
We need a directed graph having files as nodes and relationships as edges. These relationships need to be automatically inferred whenever possible. Relationships should be able to span from RAM to hard disks, from one hard disk to another, across the internet, and everywhere in between.
Data collections need to be easily searchable. Querying and filtering data should not require construction of a database; tables and indexes should be created automatically to accommodate data access patterns.
As much as possible, the work of managing data needs to be offloaded to computers so that humans can be left with the task of creating and utilizing data.
As a user, I can utilize a file system to organize my documents for me, but generally, I just don't care. As long as all of my files are grouped by project (read: one level deep) I can find practically anything I need. N-tier grouping is overkill for nearly all typical user scenarios.
File systems define data relationships by hierarchical locality. If two files are in the same folder, they are probably related, but there is no guarantee of that. Data has a lot of inherent relationships that goes unexploited by current day software. Source documents such as code and Photoshop files are in no way linked to their output documents such as executables and web graphics. I might have to click three dozen times to find the file for the image that is embedded in an a Word document or I may never find it (it could have been deleted).
We need a directed graph having files as nodes and relationships as edges. These relationships need to be automatically inferred whenever possible. Relationships should be able to span from RAM to hard disks, from one hard disk to another, across the internet, and everywhere in between.
Data collections need to be easily searchable. Querying and filtering data should not require construction of a database; tables and indexes should be created automatically to accommodate data access patterns.
As much as possible, the work of managing data needs to be offloaded to computers so that humans can be left with the task of creating and utilizing data.
Sunday, March 26, 2006
Computers should make life easier
If you find yourself sitting at your computer doing the same thing over and over, you are doing it wrong.
Computers can perform repetative tasks with blazing speed and percision without getting tired or bored. Your computer won't complain if you ask it to add all of the numbers between 1 and a billion, nor will it accidentally skip 10,956,234.
Knowing this to be true, why do I often see even expert computer users performing the same tasks a dosen times in a row? Why do programmers constantly write the same boiler plate code again and again? Why are companies constantly re-inventing the wheel?
Computers are no longer the big fancy calculators of the industrial age, they are the hammer and nails of the information age. So why is all modern software written to run on platforms designed for big fancy calculators?
Personal computing needs to be reinvented for the information age from the ground up.
Computers can perform repetative tasks with blazing speed and percision without getting tired or bored. Your computer won't complain if you ask it to add all of the numbers between 1 and a billion, nor will it accidentally skip 10,956,234.
Knowing this to be true, why do I often see even expert computer users performing the same tasks a dosen times in a row? Why do programmers constantly write the same boiler plate code again and again? Why are companies constantly re-inventing the wheel?
Computers are no longer the big fancy calculators of the industrial age, they are the hammer and nails of the information age. So why is all modern software written to run on platforms designed for big fancy calculators?
Personal computing needs to be reinvented for the information age from the ground up.
Subscribe to:
Posts (Atom)