The power of the PC

With Windows 8 soon to be released, while I look forward to the benefits of Windows 8 for touch devices (aka. tablets), I am also sad about the direction software development is going in. The Metro UI may be nice for consumer apps, but the sandbox approach in my opinion limits creativity for two reasons. One is the forced user interface. The idea of all apps being so flat in nature, no multiple windows and always having to click a BACK arrow button to navigate a user interface, somehow does not feel creative and it lacks variety. The second is the state of development tools. The over dependence upon object oriented programming methods has made software development more complex, not less.

What first excited me about the computer was the possiblities. Even back in the days of the Commodore 64, with its limited power, it seemed like the possiblities were endless. I was amazed when some very talented programmers created the Geos environment for the Commodore 64. Geos was written in assembler of all things and the power it unleashed from this computer was just astounding. Today we have computers which have CPU’s with a thousand times more power than the C64, over 50 thousand times more memory and more than a million times as much disk space and yet the PC seems more limited than ever. Where is the performance we should have ? Where is the ease of development we should have ?

Yes, the power of the PC has been lost, rather than found. True there is some really amazing software today, but in comparison to the software of the past in the early days of the PC, I find less and less than really makes an impression. Software development has become more complicated too. By changing programming technologies every few years, we tend to throw away quality code which may have taken months or even years to develop. That is counter productive, not progress. In a world where we have the most advanced technology for something like farming than ever in history, yet millions are still starving. Why ? Because of waste. Software development is similar. As computer technology improves year after year, we also have a great deal of waste. Visual Basic was simply gutted and replaced by a totally foreign language (VB.NET), wasting the resources of years of VB development, despite the fact that Visual Basic was one of the most popular programming languages ever.

The reason I program in PowerBasic, despite all the hype about Visual Studio and the latest Microsoft tools, is because I want a language which is simple, natural and familiar. I want to be able to code with a language I have known for years rather to have to keep changing languages and coding styles year after year. Yet, despite is being a language which has been around for decades (BASIC) it continues to grow and to provide more and more of the power of the PC. It was interesting how when I wrote articles for BetaNews.com that when ever I mentioned Basic, I got a lot of grief from readers who considered me old fashioned and out of touch. One of those readers though was intrigued by regular comments about Basic, especially PowerBasic and one he day he decided to purchase PowerBasic and try it. He posted a comment on one of my articles about his experience and simple put, he was surprised. Why ? Because PowerBasic was more powerful than he imagined and it was refreshing to use a real compiler which produces fast and small applications.

The reason PowerBasic continues to improve is because it does not leave behind the past. I maintains compatibility with some very old Basics, yet has features only found in more modern languages. It also is very low level, so one can have complete control of what an application does. You don’t have to use pointers for variables, but they are there if you want them. You don’t have to code in assembler, but inline assembler is there is you want it. The point is that every new version of PowerBasic gives you more and more power to control a PC.

Also my own GUI tool, EZGUI, is in its fifth generation (written in PowerBasic) and while RAD development and ease of use are primary goals, the ability to access the power of the PC has also been an important goal. This is why EZGUI is both low level and high level. Yes, even the low level stuff has been made easier by eliminating much of the mundane stuff which one really should not have to worry about, yet there is a lot of low level capabilities in EZGUI. Backward compatibility has also been a high priority. Each new version maintains compatiblity with previous versions as much as possible. Customization has also be important. Rather than treat everything as some kind of blackbox which is unchangable, I found making ways to customize things open the doors to more possiblities. Windows ability to customize has been there since Windows 95 and it is still there in Windows 8, yet few programmers take advantage of it. The common dialogs can be customized. Controls can be customized. You can build your own controls with unique features using existing controls as a base class (window class, not code class). You cany build your controls from scratch too.

I wrote EZGUI 5.0 without any object oriented coding at all and it still amazes customers the amount of power in such a small library. What has contributed to this has been the use of procedural style coding rather than using OOP, modular design (code reuse) and the Powerbasic compiler (produces small and fast executables). Also my desire to always keep tapping into the power of the PC has made a difference. For example the Windows API has had its DIB (device indepedent bitmaps) engine since Windows 95, yet it amazes me how it provides so much power and control when drawing bitmaps. I used it to build my sprite engine. I used it to add image filters for drawing bitmaps. I have also been impressed with the power (and ease of use) of OpenGL. Fortunately video card (GPU) manufacturers, despite the fact the OpenGL 3 and 4 have deprecated much of OpenGL’s original API’s were smart enough to maintain backward compatibility with OpenGL 1 and 2. Backward compatibility makes a lot of sense. Backward compatibility is productive, benefiting from the old while still being able to add the new.

Programming languages need to go back to the basics (a pun of course). They need to be made simpler. They also need to go back to being real compilers again (nothing beats optimized native code). While I understand the need for scripting languages for cross platform development, when it comes to native apps nothing can beat quality generated machine code. We as programmers need to be less wasteful. Just becauses modern CPU’s are super fast, does not mean that counting CPU cycles (compiler makers) is no longer important. Just because we have huge amounts of disk space does not mean that we should waste that space. Programmers should start experimenting with going back to the basics of procedural coding styles to see if it can produce smaller and faster (and easier to maintain) applications. Sure, you can use OOP once it awhile when it really might be useful, but you may be surprised at how efficient procedural coding can be.

Programmers often criticize procedural coding styles by using terms like “spagetti code”. Guess what ? A modern Basic using procedural coding is not spagetti code and can be just as modular as any OOP written code. The term “spaggetti code” comes from the days of interpretted Basic before Basic provided subroutines or functions. The make code modular using that kind of basic required a lot of GOTO’s and GOSUB’s along with line numbers used for labels rather than real names. Modern Basic has come a long way from there.  Modern Basics, like PowerBasic, can be used to produce extremely modular code. I know, because my entire GUI library is based on modular design. This is why it is so efficient with so many features packed into such a small size.

So this programmer will be coding for the Desktop side of Windows 8, since it currently provides me with more access to the power of the PC. I will be as helpful as possible with the people at PowerBasic to help them eventually move to Metro (Windows Store apps) and I hope they can produce a compiler which does for Metro what PowerBasic does for the Desktop (Windows in general). The important thing though is to provide programmers as much access to the power of the PC as possible.