Main Site | Join Robin Hood Coop | Projects | Events | Blog | Media | Forums | Mailing List | Twitter | Facebook

Making computer code efficient

Computers have become faster, they have large memory, however computer apps or programs that are doing some specific task are doing it about same speed and time as 5-10 years ago. That is because although computers have become enormously faster computer programs have becoming increasingly complex and needs more memory than before. So time doing some specific task has not been made any significantly faster in some cases. I read that Skype when sold to Microsoft, after that suddenly needed much more memory, it become much more complicated program, but actual usability of that app remained the same. Maybe reason for such cases (and there are perhaps many) is that computer programmers are paid in worktime / hour basis. So they maximise worktime writing some code that application really does not need, or write even simple programs with gigabytes of code to get money. Those applications then become unnecessary complex and contain “junk code”. Computer programmers should be paid project basis, not hours of work, so they don t need to write overcomplex code to get money. Even better would be if instead of situation now where programmer is rewarded for making lots of code (more working hours, more money), programmer is rewarded for making code smaller and simpler and compact. Perhaps then can be avoided nowdays dilemma that computers are faster than ever but that fast computing does not turn to fast running computer programs. Same task that 10 years ago needed megabyte of code, now perhaps needs gigabyte of code when same computer program has been “modernized” , but actual task is the same so that megabyte of code that was used 10 years ago should do in nowdays also. Turning more code / more money principle to lesser code in the same task / more money, could solve this gigabytes of code that computer does not actually need - problem. Some of that junk code goes to fancy graphics, but most applications do not really need some high quality graphics program running behind simple application / task, even cruder and simpler graphics will do if it saves computer code and memory and makes computer faster.

Not only computer programs need to be faster, mobile internet communication can be faster too if it does not contain such large amount of unnecessary information. For example simple query using mobile communication does not need megabits of information to be transmitted between mobile phone and server, when that information what that query needs can be presented in just few kilobytes or less. This is another example how simple task that does not need large amount of bits is turned to resource- hungry thing that requires megabits of code and several seconds of transmitting time between phone and server when megabits of information goes from phone to server and back. However only perhaps one thousandth part of that information is needed to fulfill that query. Usually graphics is to blame, answering to query uses fancy graphics that are not really needed. Computer programmers can be awarded for using economical internet communication programs that do not need megabits of information for simple tasks and internet communication becomes more efficient and faster that way. So not seconds are needed for waiting for answer to some query, waiting time can be only 1/100th of seconds etc. I think reason for unnecessary heavy internet programs is that computer programmers are paid for working hour basis, so they make even simple tasks to complicated things that require megabits / second internet transfer although perhaps 1/1000th of it is actually needed to transfer that information, without fancy graphics etc. extra. Programmers can be paid project basis, not hour basis so programs become slimmer.

There can be standard specs what is allowed computer program to use resources, meaning memory and internet bandwidth. Approved international standard specs that defines hundreds or thousands of different application classes, and for each class of computer programs have some maximum allowed memory size and internet bandwidth (megabits / second or kilobits / second). When technology develops (memory increases in every year in devices and computers become faster) each year those standard classes of application specs are refined and modernized to keep in pace with modern development. Those maximum specs for different applications are because despite the fact that computer are faster and internet has more bandwidth than before, applications don t run faster than before or internet does not faster than before. It is because computer programs have become bigger and contain more (junk) code and internet applications use more megabits / sec but do not make the actual application to work faster. 10 years ago the same applications were doing same tasks at much slower internet and with much smaller memory, programs that mobile phones used for example. However the tasks that those programs do have not changed, so slimmer and faster (when used in modern PC or phone) computer programs from 10 years ago will do nowdays also, if modernized slightly. It is better to pay computer programmers for project basis, not working hour basis, because programmers then maximize working hours, make application unnecessary resource heavy, and junk code is used in many cases that does not make application any better, although codebase expands. Paying project basis would not only make programs slimmer and faster, it perhaps saves time too when programmer does not have to make program large and spent many working hours with it, he / she will be paid per project price so working application can use less memory and does not need to use huge internet bandwidth for simple tasks. Programmer is however paid the same amount of money . So both the one who pays that application benefits when that app is more efficient and slimmer and faster (mobile app etc.) and computer programmer benefits because he / she can do that app faster and without junk code. International specs that define certain maximum specs for several hundred (or thousand) computer application classes can help to make this faster and efficient programs for same price as heavy and slow programs more usable.

Computer programmers should be awarded making computer code small and fast, not large and resource-heavy. Customer when ordering an application should have specs to tell to programmer how fast that program should be and how much CPU time that application uses, and if it uses internet what is maximum bandwidth (megabits / sec etc.) this application uses etc. If programmer is paid according to how small and efficient / fast program is, not for making gigabytes of code that use about 80% of CPU doing simply task, in the background of application is running some graphics program that is using millions of floating point or integer operations per second although that graphics is not even needed in that application. If customer says that application should use only 3-5% CPU, and program can be small, not gigabytes large, but programmer will however paid the same. Programmer can then make that program faster, and that program is also now more efficient, not needing gigabytes of code. And instead of applications transferring for example in mobile net megabits of code back and forth from server to phone and from phone to server, faster programs that use less internet will do, and programmer is paid the same as doing some resource-heavy program. Programmers should be awarded, not making computer programs large, slow and resource-heavy but light and fast, fast over internet for example. So if programmer makes some program that is really neat and efficient and goes lightning fast through internet, programmer should be awarded some sort of additional bonus for doing that neat program. In demoscene there is “Four kilobyte art” and other such things where programmer get award when he/she makes really efficient program. No such ultra-minimal approach like that is needed, nor tinyapps org netpage only kilobyte-size apps, but computer programs can be faster and simpler if programmer and customer want that, and programmer get same amount of money that he/she gets making heavy and slow program that computer programmers nowadays do. There can be international specs what is maximum allowed resources (memory, internet bandwidth, CPU usage) of apps, in different app classes. In earlier there was “hand written assembly” that seems to be missing nowadays. Not complete computer programs, but some part of program may benefit if written in assembly. Also efficient programming language APL and similar languages and their many modern offsprings are not used anywhere, they seem to be just theory, although dense programming languages could be used nowadays also, not just in the past.

Programming languages like APL are not just effective, they are also suitable for parallel duties, for example when using GPU instead of CPU. GPUs in PCs are much more powerful now than CPUs, so code that is written to be used by GPU is much faster than code written to CPU. There are special programming languages that are designed for GPU. Some like APL work both in CPU and GPU. Using GPU instead of CPU for general duties that PC does, makes PC faster. So GPU can be used to other duties also and not just as graphics card. If there is programming languages and methods to use GPU for general purpose computing, or in fact possible that GPU can use typical PC apps, computers then became faster and efficient. This is one way to make apps fast and effective. Some programming languages like APL make possible to write apps for both CPU and GPU, perhaps. Programs must be massively parallel, but some programming languages make this possible, and using those programming languages is possible to make effective code and apps for GPU. Making apps for GPU also makes load of CPU smaller, so when both GPU and CPU are in full use at same time, computers become more efficient that way.