Thursday, 20 of June of 2013

Tag » Atom CPU

Just waiting for a 7 inch Intel based Windows 8 tablet !

Not only do I think a 7 inch Windows 8 tablet possible, but I look forward to seeing such a device. The real question though is, is it possible ?

The problem with Windows tablets in the past has been poor CPU power. Actually, the problem isn’t really poor CPU power, but poor software which simply runs poorly on a less powerful CPU. So what is the problem ?

Having been a native coder for the last ten years (WIN32 API), rather than using managed languages (aka. dot.net), I find that Windows software lacks performance because of how it is developed today and not because the CPU’s are not powerful enough. You have to appreciate that I have been writing software since the days of CPM (and earlier) and the CPU’s which were the powerhouses of the day had 1/50th the power of a modern low end CPU (or less). We learned how to tap into the power of a CPU by writing software with compilers which didn’t waste a CPU cycle. Fast machine code.

The problem today is that we have lost that art of writing small, compact software. There is too much overhead in our software. Partly due to the overuse of object oriented programming and partly due do bloated frameworks which require too many resources. Simply put, we as programmers have gotten lazy because when our software ran poorly, we simply upped the minimum requirements needed to run the software. Let’s be honest here. How many programmers today would be willing to use as their primary development PC, a computer with only an Atom CPU (single core), onboard graphics and 1 gig or less memory ? Well, I would and have. For a major portion of those ten years writing software (I wrote tools for programmers), I was using an old Windows XP computer with 768 meg ram (for a good while only 256 meg) and a lowly Celeron CPU which was no better than todays lowest Atom CPU. My harddrive was a wopping 40 gig, which was plenty of space for me, since my entire development system was about 20 meg in size, which allows me to maintain multiple versions of that system over the years, likely not amounting to much more than 800 meg over the years and that is with a lot of old, old stuff staying around.  That included a lot of source code versions over the years for five generations of my commercial software, plus a bunch of other stuff.

The reason I was able to work with such minimal hardware was that I am a native coder, meaning I write software using a fast compiler geared to native coding (WIN32 API) which produces small and compact applications (or libraries). No heavy duty GUI frameworks needed. No large studio development environments. Other than the compiler, I create my own development tools from a drag and drop visual designer/code generator to my own libraries.

You have to appreciate that my first 32 bit Windows computer (Windows 95) has only 8 meg ram and a 486 class CPU in the 25 to 33 mhz range. Not much power when you think about it. When I started writing native WIN32 code I, Windows XP was the current version of Windows, I wasn’t even developing on an XP machine (even though I had one). I coded on a souped up Windows 95 machine with a 233 mhz CPU and 256 ram (a lot for Windoes 95). My peers were using Windows XP with Pentium 4′s with a good bit more memory than I was using. Actually, the development system I current use would still run fine on that old Windows 95 machine, but now Windows XP is the legacy system now so no need to go that far back. Even my current development PC (my XP PC crashed a few too many times for my taste and needed to be superceded) is my good old Vista machine which I also souped up by adding more ram and a new CPU, so it has 2 gig memory and a 3.2 ghz Pentium D CPU, but still nothing compared to the typical development PC.

To appreciate the kind of hardware I have been developing on, check the following benchmark web site and see how your computers CPU rates:

http://www.cpubenchmark.net/cpu_list.php

The typical core I3 CPU (which is lowly by most programmers standards) rates above 2000 on this scale. My current Vista PC rates only 715 and my previous XP computer which I used for a major portion of the last 10 years doing native coding only rates about 251. Thats lower than most of the older Atom CPU’s and a good bit less than current Atom CPU’s.

The key to building software with a small footprint and minimal hardware requirements is getting every last cycle out of a CPU. To appreciate why native coding using a compiler which produces a lean application is so important, watch this video on Channel 9 by Herb Sutter (Microsofts C++ expert) about writing software for performance. While I do not code in C (or C++ or C#), I do agree with his sentiments in his talk.

http://channel9.msdn.com/posts/C-and-Beyond-2011-Herb-Sutter-Why-C

So what does all of this have to do with a 7 inch Windows 8 tablet ?

To be able to squeeze the necessary hardware into a small form factor like a 7 inch tablet requires using components which use less power and take up less space, like the Atom CPU. Guess what happens though when you do this ? A lot of Windows software will likely run very poorly on such a PC. Just not enough horsepower, for many developers that is. But not a problem for native coders who know how to tap into the Windows API and how to get every cycle out of a CPU. How we write software for Windows 8, could determine whether a 7 inch tablet is viable or not. A 7 inch tablet, prices right, would be a great tool for schools, for businesses as well as consumers in general. And a native coder who knows how to tap into the power of the WIN32 APIs doesn’t even need Metro (aka. Windows Store apps) to do this. All that we need has been here even since Windows 7 (touch support).  A native coder can also write software which is transportable. What is that ? Transportable software does not require any bloated GUi frameworks (no need to update to the latest dot.net runtimes), does not require any components be registered with the operating system and can simply be copied and run. Copy a few files to a jump drive or SD card (or micro SD) and run. Transportable ! Yes, small form factors like a 7 inch tablet benefit from transportable software which need no installation. Transportable software means a small footprint so little space is required on the native drive and the app can be loaded in the smallest sizes of memory cards.

Don’t think that this is possible ? Native coders can do it.

Now not only would a 7 inch Windows 8 tablet be a fantastic idea, but imagine if a Windows 8 tablet that small was as thin as some of our current ebooks. I don’t see why it would not be possible. Such tablets wouldn’t be running quad core CPU’s with huge amounts of memory, but that doesn’t worry me. You see, I am a native coder and that is what we do, write software with a tiny footprint which needs minimal hardware. So, I am just waiting for the first Windows 8 small footprint tablet, 7 inch screen and so thin and lite it just weighs nothing in my hands.


Comments Off

Windows and low cost tablets

Interesting news recently about Acer developing a low cost Windows 8 (x86 version, not RT) tablet. In my opinion that is what Windows 8 really needs right now. The problem though is that most Windows tablets are designed with a more powerful CPU (aka. costs more and uses more power) becauses a good bit of software for Windows just runs poorly unless you have a bit of power behind it. Even Windows 7 required 2 gig of memory (only starter versions comes with 1 gig). The operating system is bloated so you need a much bigger SSD (solid state drive) than say a comparible Android tablet.

So what is wrong with this picture ?

The problem is not the hardware, but the software. If you want a more detailed discussion of why I think this is so, read some of my other articles in this blog. To put it plainly, I feel that overuse of OOP and bloated GUI runtimes are partly to blame. Having been a WIN32 programmer for the last decade I find that one can build applications which use the native API’s, run fast and have a tiny footprint.  If Microsoft just dropped all the heavy OOP usage I don’t doubt the operating system could run on half the memory it does today. My Windows XP computer originally came with 256 meg ram and it sufficed for years.  Software tends to be slow today as well, yet the average CPU, even the lowly Atom CPU (single core) , can run rings around the CPU’s that were used when Windows XP was released.

Bob Zale (who recently died) of PowerBasic pushed his company with the goal of “faster, smaller, faster, smaller”, which is one of the reasons I use PowerBasic. By tapping into the native API’s in Windows and using a compiler which produces fast and small applications, one can produce applications with a minimal overhead. It is this kind of software which is need to make a low cost Windows tablet shine.

Now PowerBasic is not ready yet for building Windows Store apps (aka. Metro), but it can be used to produce some amazing software for the Windows 8 desktop (and it will be compatible with previous versions of Windows too, which is one reason the desktop is still vitally important).  The problem with building Windows apps using the native API’s is that the majority appear to think it just was too difficult, which is why Microsoft first moved to MFC (Microsoft Foundation Classes), then ATL and then dot.net (why not build a better GUI framework ?).  Now I have played with the latest Visual Studio and it is by no means easy to use.  The over use of OOP just adds complexity, rather than simplicity.  In my own personal experience, even the Windows API (WIN32) is easier to grasp than dot.net stuff. Sure it may be powerful, but there is more power in simplicity rather than complexity.

Now I am not saying the Windows API is easy to learn, just that as complex as it is, it is easier than what Visual Studio offers today, at least for me it is. But I am not satisified with the Windows API either, because it could have been made even so much easier than it is. This is why I developed EZGUI Professional. EZGUI was to be an inhouse tool, so I could shield myself from the Windows API, but it eventually became more than that. It was possible to make the Windows API easier to work with.  EZGUI became of a GUI framework of its own, but it simply accessed what was already there in the Windows API, simplified it and removing the mundane stuff so you could concentrate on the important stuff. What is so surprising about all of this, was how much power I was able to pack into EZGUI’s runtimes in such a small footprint.

Just think, EZGUI supports not only the major features of system controls, dialogs (forms), common dialogs, most common controls and even MDI (multiple document interface), but it also sports a graphic engine for Windows DC (for ownerdraw), its Canvas control and for the printer. It has a number of proprietary custom controls built in such as its Canvas control, MCI control, glCanvas control, Turtle Graphic control, property Listbox control and more. It has a 2D sprite engine, a 3D OpenGL based engine, low level DIB support, image rotation, alphablending, 22 image filters, vector graphics (Turtle), thread engine, ownerdraw engine, 3D buttons, subclass engine, superclass engine, precision timing, region generation (non-rectangular windows), clipboard support, registry access, tray icon support, autosize engine, built in scaling engine and a drag and drop engine (WYSIWYG style apps). And there is more than that.

And all of this fits into about 1 megabyte of space. Yes it all can fit on a single floppy disk ! Now imagine of one started building applications with such a tiny footprint ? You would not need so much memory, so much hard drive (or SSD) space or even so powerful a CPU. By decreasing the hardware requirements of software, you make building cheaper computer devices possible. One could build a tablet with the least expensive Atom CPU possible, a 20 gig SSD (all that Windows 8 needs) and only 1 gig memory and desktop apps built with EZGUI (and Powerbasic) would run very well. And guess what ? The same software could run on a 10 year old Windows XP computer, with 256 meg ram and a 20 gig harddrive.

To make cheaper Windows tablets possible, one must be able to use less expensive (and less powerful) hardware. To make the tablets still shine they would require a new generation of software which can run on minimal hardware and still impress the end users (fast and fluid).

So I will be watching to see what kind of Windows tablets show up in 2013 and I will be ready for them, even if they are extremely low cost with minimal hardware. Now I think the $199 price range would be a sweet spot for a Windows tablet (10 inch) and possibly $149 or less for a 7 inch Windows tablet. Yes, I think a 7 inch Windows tablet would be a great idea. So what will manufacturers come up with in 2013 ? Let’s wait and see.

 


Comments Off

Getting the most out of an Atom CPU

Intel’s Atom CPU’s are by no means a powerhouse compared to many of the multicore desktop and laptop CPU’s in use today. It is a matter of compromise. The SOC (system on a chip) design of the Atom CPU’s , plainly put, is for mobile. Small size and minimal amount of power usage are the criteria. So does this make the Atom CPU’s bad ?

No !

The problem with the Atom CPU is Windows and how most software is built today.  I was writing software back in the days when the CPU’s were 1/10th the power of an Atom CPU and they could do quite a lot back then. The key is how software is created. Do you realize that Windows 95 could run on a computer with as little as 8 meg ram ? My first Windows 95 computer had a 586 CPU (a souped up 486) and 8 meg ram. Today CPU’s are measured in gigahertz, while back then CPU’s were measured in megahertz. The thing though was that back then Windows software was often written in C (not C++) and was native code (WIN32). It wasn’t easy to write software using C and the WIN32′s, but it produced fast software which had a small footprint.

Today, in my opinion, two things have contributed to bloated (and slow) software. The first is managed programming languages (aka. dot.net).  The second is the overuse of OOP (Object Oriented Programming).  If you read some of my other posts in this blog, you will see some of my thoughts (and that of others) about OOP. OOP adds a level of complexity to software, which I strongly feel makes programming harder and adds a lot of bloat to software.

What we need today, to make Atom based tablet computers look good, is better software, which runs faster and has a smaller footprint. Having used PowerBasic for about a decade now, I have been spoiled when it comes to small and fast executables.  Why do I say that ?

If you have browsed my web site, you likely know that I developed my GUI engine (EZGUI 5.0 Pro) using PowerBasic and for use with the PowerBasic compiler. Two things I have learned from building this GUI engine. (1) One can build reusable code which is small and fast using absolutely no OOP at all. The size of the EZGUI runtimes are amazingly small and I give the credit to both the PowerBasic compiler, as well as to using a procedural style of coding (no OOP). (2) Second, is that if a library can be written to be tiny, imagine how small executables can be if they reuse that library,

For example, let’s consider my freeware 3D model viewer app which I created using EZGUI 5.0 (see:  http://cwsof.com/forums/index.php?topic=266.msg2146#msg2146 ). Because the EXE uses the EZGUI runtimes, which do most of the work, how big do you think the actual app EXE is ? It is only 58 KB in size ! The app has a nice GUI with multiple controls in it, multiple OpenGL controls, can load STL 3D models and display them and can modify the 3D model in real time. Now imagine what happens if I were to write a suite of apps that all uses the same runtime. The runtime exists one time, but the apps EXE’s are all small in size (tiny actually) and share the same runtime. Is that not what code resuability is all about ?

So with the right compiler and well written libraries, developers can write powerful apps which require minimal hardware to run. Now this means a lot for something like a tablet computer, which has minimal memory, memory SSD space and a minimal CPU (to save power). So rather than blame the Atom CPU for all the problems with poorly running software, maybe the blame really should be placed on the software itself.

I think the Atom CPU is well suited to both Windows 7 and Windows 8 (desktop), as long as one writes software using a fast compiler and avoids OOP as much as possible.


Comments Off