Guest Bloghttps://software.intel.com/en-us/tags/17567/all?language=ru
enMy Opinion on Intel's Cloud Services Platform betahttps://software.intel.com/en-us/blogs/2013/02/02/my-opinion-on-intels-cloud-services-platform-beta?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p><strong>January, 2014: The Intel® Cloud Services Platform beta has concluded. Please see <a href="/en-us/articles/intel-cloud-services-platform-beta-conclusion" rel="nofollow">http://software.intel.com/en-us/articles/intel-cloud-services-platform-beta-conclusion</a> for more information.</strong></p>
<p> </p>
<p>For a few months we have an App on Intel's AppUp store. It is called <a href="http://www.appup.com/app-details/photo-touch" rel="nofollow"><strong>Photo Touch</strong></a> and it is a <a href="http://www.appup.com/app-details/photo-touch" rel="nofollow">photo editing App design for Multi-touch interface</a>. It is doing well so we decided to go to the next level and add sharing capability. The first option was using our server. It was very fast to save data as xml files but then we figured that there might be a chance that this will go too well and searching on the server for a file by tag may take too long, so we might as well be prepared and use Cloud Services. Since this App is all C# the default was using Microsoft's Azure, but then I saw Intel's <a href="http://software.intel.com/en-us/cloud-services-platform" target="_blank">Cloud Services Platform beta</a> and thought to myself that at this point I can afford to give it a chance. Even though Intel's Cloud Services are only beta, so is our App and it is not a data critical system so we can chance it.</p>
<p>Going over the API it looks like there is no database / table management capability. On the other hand you can use the services to manage users of Intel's website, Facebook, and Google+, which is a nice capability. It is possible to add data to a user, kind of "post-it" notes attached to the user's profile, which is very nice. It is also possible to use Commerce Services and easily support multiple countries and currencies. There is also geolocation capability. I decided to give it a try.</p>
<p>The technology used for communication with Intel's Cloud Services is REST. This protocol is using text browsing to data transaction. It is similar to XML WebServices, only simpler: It is easier to manually produce requests and parse responses but it is not designed to be imported automatically and it is not native to Java or C#. The protocol is very good for communication from a Web Browser, for example from a Facebook page. This is used for Facebook Apps and Google Maps for example, both are mostly used from within a web-page. Going back to Apps, REST can be used by almost any platform and language but you have to manually create the request and manually parse the response. This is really bad news for me.</p>
<p>REST is essentially a low level protocol. I really don't want to know its details, just as I don't care how XML Web-Services pass data to server and back. All I want is to call a function. Intel realized that and there is an SDK for the Could Services. The only problem is that it is JavaScript only. In other words we made it simpler for accessing the Cloud Services from a web-page, but any support for a client (C#, C, C++, Java, etc.) would mean manually working with the low level REST protocol. If you do a good job then you'll create a class or a C library which will act as a wrapper for the REST calls, so for example instead of sending "<em>POST https://api.intel.com/oauth20/token?client_id=c0ba88abad89b07e508f557d53ffea7c &amp;grant_type=client_credentials &amp;scope=commerce:basic&amp;client_secret=c3da0dad167a9687</em>" you will call a function called <em>Open(ClientID, GRANT_TYPE, SCOPE, Secret)</em>. If you don't do a good job you will manually plant HTTP strings in your code which will make it absolutely unreadable and full of bugs.</p>
<p>I think that it is safe to assume that Intel's JavaScript SDK is safe to use and was probably tested with Intel's servers. If I create my own C# wrapper for REST, who is to say that my code is free of bugs. This actually means that anyone who wants to use Intel's Cloud Services not from within a web-page will have to learn the low level protocol and anyone using C# will waste a great deal of time on creating the C# wrapper which I will also have to create. Everyone using C# with Intel's Cloud Services will have to create the exact same class, debug the strings, and verify it. Do we really want someone who only wants to create a Pacman game to write a low-level communication layer and learn Intel's Cloud Services' internal details? Absolutely not!</p>
<p>I think that Intel should ASAP formally state that before the Cloud Services become formally released (and not just beta), there has to be a wrapper SDK for at least C, C++, C#, Java, for both Windows and Android. Can you imagine integrating and debugging your own wrapper class? What will you do, buy using every currency from every country just to make sure you did not mistype a country code? Would anyone really risk using a buggy Commerce system?</p>
<p>My estimate is 1 to 2 months of work just to get a good wrapper class ready for use. This is probably more expensive than the majority of Apps which could benefit from these services. It takes a week to create a fun game and a few more weeks just to use Intel's Cloud Services to register the top score. As it is right now, it might be more appropriate to rename the service Intel's Enterprise Cloud Services because unless you are an enterprise organization you probably won't be able to afford the overhead.</p>
<p>I am not saying that Intel's Cloud Services is a bad product. I am only saying that I am hoping that by the time Cloud Services are no longer beta we will have usable SDKs for many platforms and languages and not just JavaScript. ... and hopefully services initialization will also include API version... for future compatibility.</p>
</div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/20955?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Cloud Services</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Cloud%20Computing&amp;language=ru">Cloud Computing</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Cloud%20Services&amp;language=ru">Cloud Services</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Developers&amp;language=ru">Developers</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Tue, 05 Feb 2013 20:00:00 +0000Asaf.Shelly364905 at https://software.intel.comEvery App is made of these elementshttps://software.intel.com/en-us/blogs/2013/01/30/every-app-is-made-of-these-elements?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Almost any device today has software on it. This includes laptops, Ultrabooks, cell phones, TV sets, Set-Top-Boxes, Microwave Ovens, Cars, Medical Devices, etc. Software is created by software companies and software developers. I have seen only a few software companies who really consider all the elements of software. Most times understanding the system is the realm of the architect and is based on some unique art. Whenever I hear "art", it means that we just don't have the patterns written down yet. This is why I am publishing this post.</p>
<p>If your product's design or company formation does not support the following elements then you are missing on something and this eventually translates to money, either by ability to support the product, react to changes, compete with other companies, etc.</p>
<p>The software elements I am referring to are: UI, BL, Algorithms, Lower Interface, Upper Interface, Personalization, Security and Stability, Persistence, Performance and Accuracy, Settings, User Productivity, User Experience, Vision, Architect.</p>
<p><strong>User Interface (UI)</strong> is the part of the App and R&amp;D process which defines the graphics design and placements of interactive controls. UI can define color themes, buttons styles, fonts, and other graphical features. The UI should be defined by a professional, usually called the UI designer. The value of UI is in how it makes the users feel before they start interacting with the product.</p>
<p><strong>Business Logic (BL)</strong> is the bread and butter of programmers. This is the implementation of the behavior of the application. Most times this is the reason for having software and an operating system. This is also where most requirements would change over time and where most common R&amp;D tools are put to use. The value of BL is in the feature list. If the UI is 'what the product looks like' then the BL is 'what the product does'.</p>
<p><strong>Algorithms</strong> are very hard to duplicate and therefore a good algorithm is a true value over competition. Often a huge amount of efforts are invested in improving the quality of algorithms. Algorithms are also by far better than patents. Patents are important for investors but have little to no value in the real world because: (a) the absolute majority of companies cannot enforce the legal rights of the patents because it is too expensive and time consuming, and (b) this is only relevant in countries for which the company paid to register the patent, and (c) it is only relevant after huge efforts and time spent on the patents, and (d) most often the application is finally accepted after 5 years or more, which usually means after the product is already outdated, and (e) only if nobody else could find a way to work around the patent, which usually would happen if the business justifies it. An algorithm is an IP which has its own value, can have a small investment over a period of time, and returns investment immediately. Algorithms are usually created by mathematicians and experts in the domain field of the product. A company might off-shore everything except the algorithms and still keep the product from duplication. Anything else can be duplicated by examining a product.</p>
<p><strong>Lower Interface</strong> is the way the product is communicating with the lower levels. For example a driver can communicate with hardware, and an application can use system API or communicate with a driver or service. The product uses the lower level interface to communicate with libraries and engines doing work in a lower abstraction or protocol layers and with algorithms engines.</p>
<p><strong>Upper Interface</strong> is the list of features provided by the product to higher level layers. For example a driver can expose a wrapper for hardware functionality, and a database engine exposes data management features.</p>
<p>Every product exposes features which are based on the API that it is using, this means that every product takes the Lower Interface, implements Business Logic and exposes an Upper Interface. This make the BL the difference between the features of the lower level and the features of the higher level, and is the reason for the existence of the product.</p>
<p><strong>Personalization</strong> is the aspect of the product which makes the product differentiate between users. There are several reasons to tell users apart, such as Login which requires a unique password, Domain of operation such as process address space and resources, security restrictions, etc. Examples of Personalization is File ID, Window Handle, Session ID, etc. Almost every product has Personalization. Ignoring Personalization in the system design means that it is implemented without design.</p>
<p><strong>Security and Stability</strong> are usually separated into two different items because security issues have been known to cost a lot of money in a single instance. Stability issues however are noticed only when it comes to database servers. Both Security and Stability cost great amounts of money in small amounts spread over long periods of time. Stability issues come from code that does not cover the un-common cases, for example user clicking the 'Next' button in a wizard while holding the <i>Control</i> key. Security issues come from an attempt to make the system fail, mostly in attempt to interact with the system, for example user entering 'a' as part of the age in a form. Development wise both are the same. We need to make sure that our system does what it needs to do and nothing more. If the App is supposed to go to the next page and instead is crashes and all data is lost then the App is not doing what it was supposed to do.</p>
<p><strong>Persistence</strong> is where we keep the App's data. It can be on a cloud, on disk, spread on several local machines, backed-up, on Servers, and on RAM. The vast majority of Apps are created to manage data. When data is lost it is the same as saying that user's work is lost. Data can be a post in a forum and the user can retype the text, and can be game's high-score which could mean a few days of efforts. Without persistence the system does not remember anything and usability wise it means that the App does not know the user. In other words persistence is the difference between Excel and a calculator.</p>
<p><strong>Performance and Accuracy</strong>is often considered as nice-to-have only, especially when features are preferred over quality. A quality product will accurately do what it is supposed to do and will do it promptly. Low quality Performance and Accuracy means that the product is less helpful for the user. Often it is the list of features that will make the user buy an App over a similar App, but it is the quality that will make the user come again and give good feedback and reviews.</p>
<p><strong>Settings</strong> are a part of every product. Users may want to customize the behavior and look-and-feel of the product. All these are saved as Settings. Too many settings mean that users can’t find what they want. Too few settings mean that you expect all users to use the product in the same fashion. This is usually the case when you really know all your users. If your configuration is correct then users will appreciate very few settings. Even if users complain about the lack of ability to tweak, they will still respect the product for being robust. iPad does not let you set how you navigate the desktop, it does however let you personalize the device by setting the background.</p>
<p><strong>User Productivity</strong> is why people pay for software products. Your software usually does not compete with movies, songs, art, women’s shoes, and children’s teddy bears. Mostly a software application is not something you love, it is something you use. This means that productivity is a must. Never waste user’s time. Don’t ask users questions which they cannot answer and need to think about, for example “Fatal Error…” (sounds important) “… communication down, cannot check for updates”. If you (as my App) are going to help me then don’t bug me with stupid questions. Give me answers not questions. The App works for the user, don’t expect the user to work for the App. It is OK for your employee to ask you to open the door to the office. How would you feel if your employee keeps asking you to make coffee? It is OK for your App to ask the user to connect the network cable. It is not OK for your app to ask the user to work: “cannot play the video because there is no network connection, or the file is bad, or a codec is missing, or an internal error happened”. Same goes for “Unhandled Exception: Handle is NULL” – really? That’s nice. Now what do you want me to do with this? Find you handle for you? Respect the user as you would your CEO.</p>
<p><strong>User Experience</strong> is everything; people only remember the Experience. Everything else is just something they have and will soon be replaced. If you are trying to click the ‘Save’ button and accidentally hit ‘Print’ and have to wait for 5 seconds to cancel, that is a bad experience and you are going to remember it. If the App crashed during work, that’s a bad experience and you are going to remember it. If you start typing a URL and the browser remembers you and your URL - that’s a good experience. Read the forums. Everything there is based on User Experience. You want good reviews and good community drive then you better have a really good User Experience. This will dramatically reduce the cost and efforts of Marketing and Sales.</p>
<p><strong>Vision</strong> is something that every good startup has. If you have a good vision then you know where you are going with the product. If you don’t have a good vision then either you are going the wrong way and will find out later, or you keep drifting around until money runs out and you have some product. Vision is based on the person who has it. You can’t learn vision and you can’t buy vision. You need to find the right person. See Borland Builder, iPhone, iPad, Facebook, Microsoft’s business model, etc.</p>
<p><strong>Architect</strong> is a very nice role. Everybody wants to be the software architect, and most organizations see software architecture as a waste of money. Architects usually don’t have a budget to buy tools. Architecture is the difference between doing the same work again next year and using what you already have. Most programmers see architecture as fun because there are only few architects in the organization and it looks like you can’t go wrong because nobody will know you were wrong until next year. In real life the vast majority of Startup companies fail in the first few years because architecture is done by someone who is not fully qualified and changes in market demands really put the architecture to the test.</p>
<p>Follow these guidelines and you will probably have a good product.</p></div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/18779?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Enterprise</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=User%20Experience%20and%20Design&amp;language=ru">User Experience and Design</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Developers&amp;language=ru">Developers</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Intel%20AppUp%C2%AE%20Developers&amp;language=ru">Intel AppUp® Developers</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Partners&amp;language=ru">Partners</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Professors&amp;language=ru">Professors</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Students&amp;language=ru">Students</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Wed, 30 Jan 2013 20:51:19 +0000Asaf.Shelly363926 at https://software.intel.comCan you be more devoted to your code?https://software.intel.com/en-us/blogs/2012/11/18/can-you-be-more-devoted-to-your-code?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>I'd be surprised if you were and would love to hear about it.</p>
<p>It all starts with Intel's and <a href="http://www.codeproject.com" rel="nofollow">Code Project</a>'s coding competition <a href="http://www.codeproject.com/KB/ultrabooks/#App+Innovation+Contest+Entries" rel="nofollow">App Innovation Contest</a> for a MultiTouch application. I heard about it a couple of days before the submission deadline and rapidly created a basic photo editing application (<a href="http://www.codeproject.com/Articles/481097/Ultrabook-Photo-Editor" rel="nofollow">Ultrabook Photo Editor</a>). It was nice enough for me to be one of the 300 people who received a MultiTouch Ultrabook. An amazing piece of technology. I find myself using the mouse and the touch alternatively. Mouse mostly for dragging and for marking items and touch mostly for clicking things on the screen. There are times when we move the mouse to locations on the screen and then adjust back (look for it and you'll see). I found myself using the touch instead, so "Are you sure: YES / NO" and such don't bother me as much as before.</p>
<p>It seems that C# does not have full MultiTouch support without WPF so I went ahead and started creating a MultiTouch Panel. Initially I thought that I wanted it to provide Gestures as events but then I realized that I can make it a multi-page panel just like .Net's TabControl, only my control would have a location in space for every page so that moving between pages is done by swiping. When I have this infrastructure the rest of the app is pretty much straightforward and such a component can probably be useful for other people too. Today everyone would have to create their own Gesture infrastructure (or copy-paste one from the Internet). This control hides all the MultiTouch details, and I can probably design infrastructure better than most programmers (only due to experience).</p>
<p>I think that I can still make the deadline, bugs here and there, need to figure out MultiTouch, which parameters need to be calibrated by the programmer using my component, and still not at the point of making page transitions look cool... and then there is THAT.</p>
<p>Can you be more devoted to your code than I am? I keep hearing that we won't let thing disrupt our everyday life and life goes on. Sounds like a good idea looking at it from the side. And then it happened. My mom called to ask if my wife and I are OK and how are the kids. Apparently they heard an alarm and the muffled noise was a missile hitting Tel Aviv. We were fine. We were far enough not to hear the noise. A day later I got the call. That was during the weekend. This is the kind of calls you know you are going to get and it is only a matter of time. I got the call. I was called to help my country.</p>
<p>No, I don't shoot people, I'm a technical guy, and after my mom had to run out of the house to save her life I had to go. I still don't shoot people and I am still a technical guy but it feels like a war zone here.</p>
<p><a href="https://software.intel.com/sites/default/files/img-4047-640x480.jpg"><img alt="" height="360" width="480" src="https://software.intel.com/sites/default/files/img-4047-640x480.jpg" /></a></p>
<p>That's me wearing a bullet proof vest. Where I am right now you only have 15 seconds to run to safety. I didn't make it on time the last time the alarm sounded. Before I reached the shelter we heard a few strong bangs. Can't tell which direction it was. I'm still here today so I guess it didn't fall on me ;)</p>
<p>Since then I am with the bullet proof vest at all times. I even went to sleep in the car with the vest on, and I am typing these words wearing the vest.</p>
<p>I have devoted my life to software, the community, and my family (ordered by timeline, not priority). I have just decided that I am not going to let people who devoted their life to piling up weapons to dictate how everyone else should be living their lives. That's just how I am. I'll insist when I think that something should not be this way. I'll insist on a bug until it grows tired enough to solve itself and I'll stick to what I believe in with people too.</p>
<p>So here I am. Far away from home because some told himself that if he would kill and scare enough people I won't have time to submit my app on time to win the competition. Well... I can't make any promises but I sure can fight for it!</p>
<p><a href="https://software.intel.com/sites/default/files/img-4048-640x480.jpg"><img alt="" height="360" width="480" src="https://software.intel.com/sites/default/files/img-4048-640x480.jpg" /></a></p>
<p>So here I am. In my car. In my office. I have breakfast and dinner here with me. I have my Ultrabook here with me. Don't worry, not the MultiTouch one. It's irreplaceable and it only takes one rocket on my car to take it out and then I would really be out of the contest. Can't test a MultiTouch application without a MultiTouch device you know...</p>
<p><a href="https://software.intel.com/sites/default/files/img-4053-640x480.jpg"><img alt="" height="360" width="480" src="https://software.intel.com/sites/default/files/img-4053-640x480.jpg" /></a></p>
<p>That's Visual Studio 2012 in case you were wondering. I learned that following a path on the screen with a mouse behaves differently than it does with a finger.</p>
<p>So I am posting this blog just to let some people know that I am going to submit this app in hope to win the contest and if you want me out of the competition then I guess that you'll just have to shoot me!</p>
<p>Cheers :)</p></div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/20565?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">ultrabook</a> </li>
<li class="field-item even">
<a href="/en-us/tags/35485?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">MultiTouch</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/Blog%202012-11-17%20Icon_0.png" width="240" height="180" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/articles/type/20773?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Contest</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Touch%20Interfaces&amp;language=ru">Touch Interfaces</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=.NET%2A&amp;language=ru">.NET*</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=C%23&amp;language=ru">C#</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Windows%2A&amp;language=ru">Windows*</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Laptop&amp;language=ru">Laptop</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Intel%20AppUp%C2%AE%20Developers&amp;language=ru">Intel AppUp® Developers</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Sun, 18 Nov 2012 22:00:38 +0000Asaf.Shelly339119 at https://software.intel.comAre You Tracking Your Usability Bugs?https://software.intel.com/en-us/blogs/2012/11/15/are-you-tracking-your-usability-bugs?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>The answer is "almost". There are two types of bugs: Reliability and Usability.</p>
<p>A <strong>Reliability Bug</strong> is an unintended error which causes your application to fail the user. This user can either be a person or another system. An example would be saving "We paid 832$ for an Ultrabook with 4GB RAM" and when opening the document we get "We paid 832$ for an Ultrabook with 5GB RAM". A <strong>Reliability Bug</strong> does something wrong but nobody noticed it and the user considered the wrong data to be true. An example for a non-person user is the user permission system used by your bank: if the bank's website lets you edit your credit level then you as a person know that something is wrong but the web-interface system trusted the permission system which failed it. As a general rule if you have a <strong>Reliability Bug</strong> then you don't have a product (with that feature).</p>
<p>All other bugs are <strong>Usability Bugs</strong>. A <strong>Usability Bug</strong> is any unintended behavior by the product which is noticed by the user and has impact on the user. Let's look at a few scenarios:<br />
1. The application performed a Divide By Zero, caught the exception and handled it. There is a bug because this behavior was not anticipated by the programmer but it did not have any affect over the user.<br />
2. The application performed a Divide By Zero and now the user has to click "Continue" to ignore the bug. This bug has some impact over the user.<br />
3. The user typed "We paid 832$ for an Ultrabook with 4GB RAM" and then clicked "Save" which caused the application to crash. Now the user has to type the text again. If the user assumed that the document was already saved then this is a <strong>Reliability Bug</strong>.<br />
4. The user typed "We paid 832$ for an Ultrabook with 4GB RAM" and during type the text was automatically changed to "We paid 832$ for an Ultrabook with 5GB RAM". If the user noticed then this is a <strong>Usability Bug</strong> otherwise this is a <strong>Reliability Bug</strong>.</p>
<p>If the application misbehaved in a way that has impact over the user we have a bug. If the bug was noticed by the user and the user can either fix the data, redo some work, or ignore the wrong data then this is a <strong>Usability Bug</strong>. If the user did not notice the bug and assumes that everything is alright then this is a <strong>Reliability Bug</strong>.</p>
<p>Developers and companies track <strong>Reliability Bugs</strong> with great efforts. It is very easy to define what is a <strong>Reliability Bug</strong>. I am here to tell you that all other bugs are <strong>Usability Bugs</strong> and too often the definition of these bugs is based on intuition. Intuition is used for severity, cost and value (ROI), market impact and many other very important factors.</p>
<p>The problem with <strong>Usability Bugs</strong> is that it is very culture oriented. Here is an example for cultures: Office 2003 users, German speakers, Students, Car owners, Parents...<br />
The cost of a bug and the impact over the user is very dependent on the culture. An extreme example is Office 2007 User Interface had many <strong>Usability Bugs </strong>for Office 2003 users.</p>
<p>When we mark the priority for a non-<strong>Reliability Bug</strong> we need to ask the following questions:<br />
1. For every culture of users of the product: How much mental effort does it require.<br />
2. For every culture of users of the product: How long does it take. This includes fixing, training, and any other time consuming action.<br />
3. What is the market value of every such culture.<br />
4. Is the impact associated with the specific User Interface that caused it, with the product, or with the company. In other words how long does it take for users to forget what just happened.</p>
<p>It is interesting to see that sometimes a <strong>Reliability Bug</strong> for one culture could be a <strong>Usability Bug</strong> for another.</p>
<p> </p>
<p>Defining and providing a product is Leadership! You offer your knowledge and abilities to help people with their problems. You want people to follow the rules you offer in order to get the solution they want. It is exactly the same as leading people out of a dark cave.</p>
<p>When your product is ignoring people - this is bad leadership.<br />
When your product is forgetting or making mistakes it is not fit to lead.<br />
You are also a bad leader if you don't understand the user,<br />
and people will not want to follow you if you don't care about them or their time and efforts.</p>
<p>A leader has to be just. Your product must be predictable and must never punish people too severely or inconsistently. Accidentally clicking "Print" instead of "Save" and having to wait for 5 seconds is a punishment but at least it is consistent. If clicking the "Tools" menu delays for 5 seconds every other time (and not all the time) is worse than delaying for 5 seconds every time.</p>
<p>So... Are you really tracking your usability bugs?</p>
</div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/18904?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Architecture</a> </li>
<li class="field-item even">
<a href="/en-us/tags/32000?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">patterns</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/articles/type/20782?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Technical Article</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Cloud%20Computing&amp;language=ru">Cloud Computing</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Debugging&amp;language=ru">Debugging</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Development%20Tools&amp;language=ru">Development Tools</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Enterprise&amp;language=ru">Enterprise</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Game%20Development&amp;language=ru">Game Development</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Microsoft%20Windows%2A%208%20Desktop&amp;language=ru">Microsoft Windows* 8 Desktop</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Microsoft%20Windows%2A%208%20Style%20UI&amp;language=ru">Microsoft Windows* 8 Style UI</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Mobility&amp;language=ru">Mobility</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Optimization&amp;language=ru">Optimization</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Parallel%20Computing&amp;language=ru">Parallel Computing</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Threading&amp;language=ru">Threading</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Touch%20Interfaces&amp;language=ru">Touch Interfaces</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Compilers&amp;language=ru">Compilers</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Debuggers&amp;language=ru">Debuggers</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Product%20Suites&amp;language=ru">Product Suites</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Thread%20and%20Memory%20Checkers&amp;language=ru">Thread and Memory Checkers</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Adobe%20AIR%2A&amp;language=ru">Adobe AIR*</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Cdc&amp;language=ru">Cdc</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Intel%C2%AE%20Active%20Management%20Technology&amp;language=ru">Intel® Active Management Technology</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Intel%C2%AE%20Advanced%20Vector%20Extensions&amp;language=ru">Intel® Advanced Vector Extensions</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Intel%C2%AE%20Cluster%20Ready&amp;language=ru">Intel® Cluster Ready</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Intel%C2%AE%20Streaming%20SIMD%20Extensions&amp;language=ru">Intel® Streaming SIMD Extensions</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Message%20Passing%20Interface&amp;language=ru">Message Passing Interface</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Microsoft%20DirectX%2A&amp;language=ru">Microsoft DirectX*</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=NFC&amp;language=ru">NFC</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=OpenCL%2A&amp;language=ru">OpenCL*</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=OpenGL%2A&amp;language=ru">OpenGL*</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=OpenMP%2A&amp;language=ru">OpenMP*</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=.NET%2A&amp;language=ru">.NET*</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=C%23&amp;language=ru">C#</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=C/C%2B%2B&amp;language=ru">C/C++</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Fortran&amp;language=ru">Fortran</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=HTML5&amp;language=ru">HTML5</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Java%2A&amp;language=ru">Java*</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=JavaScript%2A&amp;language=ru">JavaScript*</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Python%2A&amp;language=ru">Python*</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Qt%2A/QML&amp;language=ru">Qt*/QML</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Unity&amp;language=ru">Unity</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Embedded&amp;language=ru">Embedded</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Developers&amp;language=ru">Developers</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Intel%20AppUp%C2%AE%20Developers&amp;language=ru">Intel AppUp® Developers</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Professors&amp;language=ru">Professors</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Students&amp;language=ru">Students</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Thu, 15 Nov 2012 20:27:48 +0000Asaf.Shelly338141 at https://software.intel.comWhy you should use Procedural and OOP in every applicationhttps://software.intel.com/en-us/blogs/2012/04/30/why-you-should-use-procedural-and-oop-in-every-application?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded">Almost everyone wants to do architecture and almost everyone wants to do the UI. It means that every programmer has an opinion about the architecture and infrastructures in use. When you export an API for your system you get more opinions and when your product is an infrastructure (ex. Microsoft) you have too many opinions about the architecture.<br /><br />
People's architecture is usually tilted towards what they are experienced with. The architecture is based on a paradigm and people usually continue from there. A most prominent paradigm 20 years ago was Procedural Programming. Today Object Oriented Programming is the dominant one. This means that people start they system design with OOD and then ask "what's next?". In attempt to pull people from automatically using OOD I had a post called <a href="/en-us/blogs/2008/08/22/flaws-of-object-oriented-modeling" rel="nofollow">Flaws of Object Oriented Modeling</a>, and a followup called <a href="/en-us/blogs/2011/10/21/flaws-of-object-oriented-modeling-continue" rel="nofollow">Flaws of Object Oriented Modeling Continue</a>.<br /><br />
The truth is usually in between A and B. In this case the truth is 'all of the above'. There are many programming paradigms to employ in a single application. Failing to do so will damage: Code manageability, Response to changes in requirements, Flow management, Ability to integrate a new UI, and more. There is a long argument between OOP supporters and Procedural Programming supporters. Once in every some while someone would step in and say that you should use more esoteric things such as MVC, Aspect Oriented Programming, Pipeline, etc. Too often you would hear people suggesting what they just read about or learned about during a single session in an event. People will always want to try new things and show you that they know something special. There are other cases of course in which people are really experienced with several paradigms or are experienced with a specific paradigm and can immediately spot where it best applies. This is what you should be paying attention to.<br /><br />
What I am really looking for is a collection of Paradigm Patterns. Just as you would use a Design Pattern as a programming technique, I suggest that you also employ a Paradigm Pattern as a design technique. So where do we find these patterns? Google doesn't know...<br /><br />
There is a list of paradigms in Wikipedia (see <a href="http://en.wikipedia.org/wiki/Programming_paradigm" rel="nofollow">Programming Paradigms</a>) but it is only a list and not a pattern. A pattern should have a clear definition of how you identify where it applies, and a clear definition of how to use it. Either I am starting a new collection or someone reading these lines would comment with a reference, I will now try to create a rough list based on my own personal experience.<br /><br />
The items below are short and simple so that we don't need a full definition of the paradigm in order to understand the pattern. Obviously I will start with OOP and Procedural Programming and we'll build it from there.<br /><br />
First of all let's start with the definition of a paradigm: Programming Paradigm defines the boundaries of programming and design. From this paradigm we derive the definition of software Components, Interfaces, Programming Rules, and others. For example: there is a difference between how C# code is divided into DLL files than the way a C++ code is divided into DLL files. A C# DLL has a class as an Interface and a C++ DLL prefers global functions as an Interface. The decision when to use a goto in your C++ code is derived from the programming paradigm.<br /><h4>Object Oriented Programming</h4><br />
OOP is very commonly used because it allows developers to work on the same project without any interactions between them.<br /><strong>Use</strong>: When you have multiple programmers who can't understand each other, for example one is managing an SQL database and another is doing audio processing. OOD works great for Top Level Design.<br /><strong>Don't</strong>: When you have several developers who need to share implementation specifics, for example if you need to write a keyboard driver don't break it into fragments which hide implementation specifics from a developer working on the driver.<br /><h4>Procedural Programming</h4><br />
This paradigm is used for dividing a process into procedures. For example your day is a process. What you do from the time you park the car until you start reading emails is a procedure.<br /><strong>Use</strong>: When there is a complex operation which includes dependencies between operations and a need for clear visibility of different application states ('SQL loading', 'SQL loaded', 'Network online', 'No audio hardware', etc). This is usually appropriate for application startup and shutdown.<br /><strong>Don't</strong>: When there are many simple independent tasks to perform. Also don't use to manage UI.<br /><h4>Model View Controller</h4><br />
This paradigm is used often by developers who don't even know it exists. The idea behind it is the clear division between <strong>View:</strong> the data representation to the user; <strong>Model:</strong> the data / document / storage / a virtual representation of a storage (using business logic); and the [Controller] which is the user's interaction with the system. All this basically means that there is separation between how the data is represented to the user, from what the user can do with the data, from what the data really looks like. An example is Microsoft Word: The view is a text document, the controller allows printing, and the storage can be an rtf file, a doc file, or an XML based docx file.<br /><strong>Use</strong>: Almost anytime you provide UI. Employing this paradigm allows very rapid integration of a completely new UI and fast responses to changes in UI requirements.<br /><strong>Don't</strong>: If there is no UI, or when there is very close coupling between what the UI can do and the business logic (usually when creating a UI engine).<br /><h4>Distributed</h4><br />
You don't really need to use servers to have a distributed model. This paradigm states that there is no dependency between components just as with OOP, but with addition that there is also no dependency of infrastructure and object-to-object interaction should be kept to minimum.<br /><strong>Use</strong>: Whenever different platforms or infrastructures are used and when components are completely independent of each other. For example the interaction between User Mode and Kernel Mode is usually Distributed.<br /><strong>Don't</strong>: When data sharing has huge overhead, for interconnected modules, and between UI and Business Logic.<br /><h4>Pipeline</h4><br />
A Pipeline is usually made of several software components which are completely independent from each other. In this model there is usually a single data object sent from one component to the next. Most pipelines can operate completely asynchronously which makes it best for audio and video playback. Arranging components from left to right, too often a Pipeline has more than one component on a segment. For example decoding MPEG Audio frame and MPEG Video frame are two separate tasks which are independent of each other so they are both performed on the same timeslot of the Pipeline.<br /><strong>Use</strong>: When little or no UI interaction takes place, with Audio and Video playback and encoding, and when you have a chain of operations each dealing with a different technology. For example: Read XML file, Search items, Create Records, Save to SQL server.<br /><strong>Don't</strong>: When having multiple input types or events because there should be a different Pipeline for every type of input. Also when there is no clear correlation between Event and Response.<br /><h4>Layers</h4><br />
This paradigm divides the system into components just like OOP, with a huge difference - the system is divided into coherent layers. Each layer may employ OOP or Procedural internally but between layers there is a clear and simple interface. The ground rule is that requests only go from top to bottom, so a component within a lower layer cannot call a component within a higher layer. The only way to be serviced by a higher layer is by starting a new process / request. Usually the layers behave as a Distributed Pipeline.<br /><strong>Use</strong>: When OOP can be divided into Layers, when creating a system that has UI and hardware interaction, and in very large scale systems. Example: Windows NT (and Windows 8) Kernel.<br /><strong>Don't</strong>: Inside a Pipeline, in a small application or component, and don't create a Layer Engine inside a Layer.<br /><br />
Sounds like enough for now. You are welcome to comment with any thought.</div></div></div>
<li class="field-item even">
<a href="/en-us/tags/18904?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Architecture</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<li class="field-item even">
<a href="/en-us/tags/18733?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Parallel Programing</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Parallel%20Computing&amp;language=ru">Parallel Computing</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Students&amp;language=ru">Students</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Professors&amp;language=ru">Professors</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Mon, 30 Apr 2012 16:51:25 +0000Asaf.Shelly172756 at https://software.intel.comACER Ultrabook Reviewhttps://software.intel.com/en-us/blogs/2012/04/03/acer-ultrabook-review?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><a href="/sites/default/files/m/2/2/1/IMG_1758.jpg" rel="nofollow"></a>Not too long ago we heard about Ultrabook machines and X86 Windows 7 systems operating on solar cells indoors and now we have Ultrabooks popping up everywhere. Between the possible options I decided that I am going to keep my DELL Latitude laptop as a workstation for now but still get a new Ultrabook for a different reason.<br /><br />
I initially thought that my DELL Latitude would be good for everything. It is lighter that my previous laptop and it is very powerful. In time I found myself using an iPad for many of the simpler tasks, for example attending a conference was becoming an issue with my Latitude because it was heavy and I had to be careful with it because the cover is plastic. Eventually I started using the iPad because it has metal cover, it turns on very fast, and it is not as heavy. This made my life easier until I found myself having to edit Word documents or -god forbid- open Visual Studio. This is way beyond the purpose of an iPad. Even trying to Remote-Desktop to my server proved to be worse than starting my Latitude laptop.<br /><br />
As I was watching an Ultrabooks demo when attending Intel's IDF event, the first thing that came to mind was that I would finally be able to get something that is light enough to carry, simple enough to open - use - and close, and would still have a decent keyboard and run all my existing applications.<br /><br />
For this reason I got the <a href="http://us.acer.com/ac/en/US/content/aspire-s3-ultrabook" rel="nofollow">ACER Aspire S3</a>. This looks like one of the lightweight slimmer models of Ultrabooks. As a workstation I would probably take one that has backlit keyboard and more USB ports for example. You can see the list of Ultrabooks by different manufacturers here: <a href="http://www.intel.com/content/www/us/en/ultrabook/shop-ultrabook.html">Ultrabook List</a>. The ACER Aspire S3 is one of the models which is better suited for what I was looking for. It is impressive for meetings, simple and easy to carry for full day events, travelling, and coffee-shop startup meetings where you only want a PowerPoint presentation and some Internet access without taking too much table space.<br /><br />
I have only started installation so I will cover performance on another post, after I am done setting up the system and started using it. I can tell you already that since this is not a workstation for me I did not get a system with an SSD drive. This means that I expect performance to be medium. On the other hand they have a small SSD hidden drive on the Ultrabook to allow fast Hibernation. This is interesting to test but my point is that I am not going to give it an easy time and I am going to compare performance with my workstation laptop - a DELL Latitude with Core i7, 8GB RAM and a 256GB SSD drive. I can already tell you that this Core i5 Ultrabook is already wining boot time and sleep / wakeup time, so I am not even going to compare that.<br /><br />
Right now all I can show you is that I got this device with help of Christina Green and Yair Weissler who were really helpful and understanding in the process. Eventually what I got was this huge box when I was expecting a slim Ultrabook:<br /><br /><img src="/sites/default/files/m/4/d/e/IMG_1748-300x225.jpg" alt="" width="412" height="309" /><br /><br />
Then I opened the large box to find out that it is mostly empty and has a smaller box inside it:<br /><br /><img src="/sites/default/files/m/0/2/f/IMG_1750.jpg" alt="" width="320" height="240" /><br /><br />
This was thinner than the box I got for my older laptop but still looks big enough. Inside it there was another box:<br /><br /><img src="/sites/default/files/m/4/c/2/IMG_1752.jpg" alt="" width="320" height="240" /><br /><br />
... and in it a really small box:<br /><br /><img src="/sites/default/files/m/7/9/8/IMG_1753.jpg" alt="" width="320" height="240" /><br /><br />
That's more like it. Now it's getting exciting and there it is, an even thinner laptop. My first Ultrabook:<br /><br /><img src="/sites/default/files/m/8/0/9/IMG_1754.jpg" alt="" width="320" height="240" /><br /><br />
You want to know how thin it really is?<br /><br />
Here it is compared to my Nokia C3 and a WD external USB drive:<br /><br /><img src="/sites/default/files/m/2/2/1/IMG_1758.jpg" alt="" width="320" height="240" /><br /><br />
If you ask yourself, the answer is yes - it is the same height as the mobile 2.5'' drive:<br /><br /><img src="/sites/default/files/m/f/b/3/IMG_1759.jpg" alt="" width="320" height="240" /><br /><br />
The base of the Ultrabook (without the display) is the same as my Nokia C3 which is a thin device.<br /><br />
The only performance tests I have for now are the turn on from Hibernation and turn on from Sleep. When the lid is closed the device goes to sleep in about 2 seconds. When the lid is open the system wakes up again. If the Ultrabook is in sleep mode for too long it would automatically Hibernate to save battery life. Sleep mode took almost nothing from the battery over night. If you want to save battery life then simply decrease display backlight power.<br /><br />
Here is resume from Hibernate: <span><em>(click to watch)</em></span><br /><br /><a href="/en-us/blogs/wordpress/wp-content/uploads/2012/03/MVI_1761.wmv" rel="nofollow"><img src="/sites/default/files/m/c/7/6/MVI_1760.AVI-Capture.jpg" alt="" width="320" height="240" /></a><br /><br />
In case you are wondering that was 7 seconds.<br /><br />
Here is the resume from Sleep. I am not even going to count that in seconds:<span> <em>(click to watch)</em></span><br /><br /><a href="/en-us/blogs/wordpress/wp-content/uploads/2012/03/MVI_1763.wmv" rel="nofollow"><img src="/sites/default/files/m/b/7/9/MVI_1763.AVI-Capture.jpg" alt="" width="320" height="240" /></a><br /><br />
That would be it for now. Now I am installing Visual Studio 2008 (and then 2010). All I can tell you right now is that it is relatively fast, considering not having an SSD drive. Much faster than my older workstation laptop which I got 4 years ago.<br /><div>﻿</div></div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/18459?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Review</a> </li>
<li class="field-item even">
<a href="/en-us/tags/20565?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">ultrabook</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Windows%2A&amp;language=ru">Windows*</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Laptop&amp;language=ru">Laptop</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Wed, 04 Apr 2012 01:17:41 +0000Asaf.Shelly172825 at https://software.intel.comPre-Release Parallel Programming and Architecture Video Serieshttps://software.intel.com/en-us/blogs/2012/02/23/pre-release-parallel-programming-and-architecture-video-series?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded">Before I tell you the whole story here is a backstage clip:<br /><br /><a href="/en-us/blogs/wordpress/wp-content/uploads/2012/02/Intro-Movie-14-Encoded-00.wmv" rel="nofollow"><img src="/sites/default/files/m/9/a/5/Intro-Movie-14-Encoded-00_Thumb-Edit00.jpg" alt="Parallel Computing Academy - Behind The Scenes" width="263" height="185" /><br />
Behind The Scenes (Player)</a> / <a href="http://youtu.be/w3y_D9W0t8Q" rel="nofollow">(YouTube)</a> / <a href="/en-us/blogs/wordpress/wp-content/uploads/2012/02/Intro-Movie-13.wmv" rel="nofollow">(Download)</a><br /><br />
The series is a 'six pack' of videos starting from the basic introduction and covering everything you need to know in order to understand parallel computing concepts and methodologies. here is the list of chapters:<br /><br />
1. <strong>Change In Mindset</strong>: Introduction to parallel programming. First of all we need to agree that parallel computing is really easy. This video will show you that you already know parallel computing. The video also talks about the value that parallel design has for the product.<br /><br />
2. <strong>Management</strong>: Task Management, Workers, and Ownership are covered as key concepts of parallel design. In order to understand the system well we need to be able to visualize the moving parts so this video has a collection of animations demonstrating how things work under the hood.<br /><br />
3. <strong>System API</strong>: System API are the programmer's hammer and knife. This video talks about the commonly used API and also covers System API which are dedicated for parallel computing. Programming techniques are demonstrated with very important tips.<br /><br />
4. <strong>Flow Patterns</strong>: A major part of what's missing in Object Oriented Design is the concept of <em>Flow</em>. Here we cover System models, methods for handling resources and Flow Control concepts.<br /><br />
5. <strong>Phase State Programming</strong>: The majority of programmers don't really know it but they code their applications to have different operation Modes. For example Word 2010's Protected View which has an 'Enable Editing' button to switch to another mode. Most times applications have a collection of global variables defining the different states and phases of the application. It is time we call things by their name and reflect it properly in our design.<br /><br />
6. <strong>Advanced Topics</strong>: This short chapter covers advanced concepts, system models, and AVX.<br /><br />
The videos are supported with animations whenever an animation has anything to contribute.<br /><br /><span><strong>On a personal note</strong></span><br /><br />
This was a huge undertaking. Great amounts of effort were required for this series of videos to come to life. It started with a weekly call while working and refining the topics and presentations, and work goes on for over a year.<br /><br />
Attending the IDF was real fun but I couldn't really relax. I had a flight right after the event taking me to Oregon. The week after the IDF we had a couple of days of video shoot. And then there is the little thing with the video editing, green-screen, animations.....<br /><br />
The series is based on many years of teaching parallel computing, mainly for academy graduates and experienced developers and architects. Some of the information can be found in my classes, some in my Microsoft Tech-Ed presentations, and some in previous posts of this blog. This series of videos is the first place that has it all collected into one coherent flow. It is known that if a book you write, or a presentation you give helps you arrange things in your mind then the content is good. So, I am very happy with what we have.<br /><br />
The first video is about to be released. I will add a post with a link to it when it is published.<br /><br />
Here is the video we shot on-site during the IDF event just before we went to shoot this series of videos:<br /><br /><a href="/en-us/videos/channel/intel-academic-community/teach-parallel-at-idf-2011-asaf-shelly/1193082728001" rel="nofollow">Watch Video Preview at IDF</a><br /><br />
You can watch one of my Tech-Ed Sessions in full video here:<br /><br /><a href="//mms.asyncop.com/users/asyncop/video/Parallel%20Programming%20Tutorial%20450K.wmv" rel="nofollow">Parallel Programming For Embedded</a><br /><br />
The animations in the video series have background music which I created using a MIDI editor, here is the file: <a href="/en-us/blogs/wordpress/wp-content/uploads/2012/02/2011-12-26-22.mid" rel="nofollow">Background Music</a>.<br /><br />
You can use the RSS feed to be notified when the videos are published. I will post a complementary blog post for every video with details and when possible slides and images.<br /><br />
The first video in the series is relatively non-technical and is suitable for both developers and product management. My wife who is HR could follow it and enjoy it. The Animations are simple and strait forward for the first video. The chapters to follow use some conventions to the animations for example for abstract objects such as a thread.</div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Parallel%20Computing&amp;language=ru">Parallel Computing</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Students&amp;language=ru">Students</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Professors&amp;language=ru">Professors</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Thu, 23 Feb 2012 19:27:58 +0000Asaf.Shelly137970 at https://software.intel.comMathematical Parallelization By Compilershttps://software.intel.com/en-us/blogs/2011/10/21/mathematical-parallelization-by-compilers?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded">This is not to say that compilers can automatically parallelize code. I would however really like to see that happen and here is an interesting and reliable way to parallelize operations. If a compiler can use this method of thinking then it can also be used as hints for developers writing code today.<br /><br />
C and C++ languages are based on mathematical expressions. So much so that 1; is a legal operation in C\++. Other languages such as C#, Java, VB and Delphi also use mathematical operations to before actions. For example:<br />
MyInterger = GetCount() + GetLength()<br />
Both are function calls that do some work.<br /><br />
Many mathematical operations are interchangeable for example X = 1 + 2 is the same as X = 2 + 1. This means that:<br />
X = CallFunc_A() + CallFunc_B()<br />
is the same as:<br />
X = CallFunc_B() + CallFunc_A()<br /><br />
This is a hint telling us that CallFunc_A and CallFunc_B can run in parallel (unless internal resources are shared).<br /><br />
A more complex example would be: X = 3 * (1 + 2), and the hint now is that one operation needs to complete before the other can continue.<br />
Here is the code equivalent:<br />
X = CallFunc_C() * ( CallFunc_A() + CallFunc_B() )<br /><br />
Here is another:<br />
X = CallFunc_C( CallFunc_A() + CallFunc_B() )<br /><br />
These concepts apply to logical operations as well.<br /><br />
Looks like as a general rule, when we close braces we have a Conjunction Point (a Join). It makes sense because we don't really need to make sure that an operation is complete until we need its return value.<br /><br />
The question we have left now is how can we cancel an operation when it is no longer used, for example X = A or B. what if we execute A and B in parallel and B returned TRUE while A is still executing.<br /><br />
Your thoughts?</div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17864?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">compilers</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Parallel%20Computing&amp;language=ru">Parallel Computing</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Students&amp;language=ru">Students</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Professors&amp;language=ru">Professors</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Fri, 21 Oct 2011 15:42:57 +0000Asaf.Shelly138740 at https://software.intel.comStop Saying "Lock Free Solution"https://software.intel.com/en-us/blogs/2011/09/21/stop-saying-lock-free-solution?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>I am writing this at the airport, just coming back from the Intel IDF event. I keep hearing that we have "Lock Free" solutions for all sorts of problems. I think that this is a really bad choice of words. Let me try to explain why:<br /><br /> My story starts with a friend who bought a sports car. That was a really good car with A very noisy engine. A new car like that is very expensive so he just got an old one. It worked fine but then one day as we drive to a party the car just stopped. We all went out popped the hood to look at the engine. Lovely engine. Shiny but it's not running. We didn't want to be late so eventually we found the solution. We all went to the back of the car and started pushing. I admit that it wasn't going that fast but we got to the party. Later we found out that the car was out of gas. Two weeks later we went to see a movie and then again the car suddenly stopped working. Now we check the meter and it looks like the car has enough gas. So again we pop the hood and look at the engine. Eventually we find a solution. We all get behind the car and start pushing. We had a few problems up the hill so we went around it. Later we found out that this time it was the electrical system. The third time the car stopped working I told my friend that we need to find a "Push-Free" solution. I just thought that a "Push Free" solution would be more efficient. So now when we have car trouble we try to actually fix it... and we stopped calling it a Push Free solution. Now we just call it a fix.<br /><br /> Sure, it is faster and simpler to just start pushing the car instead of really understanding the problem, and you know what, pushing the car can go around almost any problem that you may have.<br /><br /> Locks can work around almost any problem that you may have. Just do me a favor and don't call it a solution.<br /><br /> When you solve a problem in your application don't call it a "Lock-Free" solution... Let's call it a solution.<br /><br /> ** the friend in the story is as fictional as the need to use locks outside an infrastructure mechanism.<br /><br /> Here is more: <a href="/en-us/blogs/2009/03/24/locks-are-bad" rel="nofollow">Locks Are Bad</a><br /><br /> Here is me at the IDF event:<br /><br /><a href="/sites/default/files/m/6/7/9/IMG_9137.jpg" rel="nofollow"><img src="/sites/default/files/m/6/7/9/IMG_9137.jpg" alt="[Asaf Shelly Intel IDF]" width="640" height="480" /></a>Asaf</p></div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Parallel%20Computing&amp;language=ru">Parallel Computing</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Professors&amp;language=ru">Professors</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Students&amp;language=ru">Students</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Wed, 21 Sep 2011 20:24:44 +0000Asaf.Shelly138840 at https://software.intel.comPerformance Presentation: Concepts Behind Parallel Computing and Extended CPU Instructionshttps://software.intel.com/en-us/blogs/2011/04/13/performance-presentation-concepts-behind-parallel-computing-and-extended-cpu-instructions?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>As you may have already read in a previous post called <a href="/en-us/blogs/2011/02/28/personal-review-of-intel-under-nda-sandy-bridge-event" rel="nofollow">Personal Review of Intel Under-NDA Sandy-Bridge Event</a> I held the last session in an Intel-Under-NDA event. The presentation was called Performance and covered the different aspects of parallel computing and also the new Sandy Bridge AVX Instructions. I have introduced this new feature in a previous post called <a href="/en-us/blogs/2010/12/20/visual-studio-2010-built-in-cpu-acceleration" rel="nofollow">Visual Studio 2010 Built-in CPU Acceleration</a>. The goal of the presentation is to provide a better perspective of all the new and advanced tools that Intel has provided in the last few years. The most important thing to do before you decide to use these new features is to understand the feature and understand how it applies to your application.<br /><br /> Although with a slight delay and as promised during the session and in my last post, this post and the few following it will contain selected slides with what you would have heard during the session if you were there. No NDA material exposed.</p>
<h1><span>Performance</span></h1>
<p><br /> As always we should start with a few words about this presentation and its goals. The idea behind this presentation is to help you the audience understand the concepts behind parallel computing and extended CPU instructions. I know that I have a good presentation before me when I notice that writing the presentation and reviewing it helps me organize my thoughts. This means that the material is edited correctly and has a refined message which I myself have never seen before this point. Perspective is very important to me. It can be the difference between good architecture to an architecture which will have to be modified before the first release of the product. Too often I see people avoiding parallel programming because they cannot guarantee that they can pick the right path.<br /><br /> The presentation begins with the less technical slides so we get used to the graphics and the presenter's voice.<br /><br /><a href="/sites/default/files/m/5/3/2/Slide51.png" rel="nofollow"><img src="/sites/default/files/m/1/e/c/Slide51-300x227.png" alt="Why Parallel" width="300" height="227" /></a><br /><br /> Going back to the 1970's there were IC chips (Integrated Circuit) that worked about a few MHz. This was new because it meant that it was possible to dispatch data very fast compared to physical switching. By dispatching data I mean a single bit and up to several bits. This technology called <a href="http://en.wikipedia.org/wiki/Transistor-transistor_logic" rel="nofollow">TTL</a> demanded that several chips work in parallel in order to get any work done because every chip had its own dedicated functionality. If RS232 communication required XOR operations for data integrity then there had to be a XOR TTL chip on the board. A Diskette Drive using XOR for data verification needed another XOR TTL chip. Processors were expensive at the time and did very little.<br /><br /> Beginning of the 1980's Intel releases a new generation of CPU chips which had 16 bit address bus, and 16 bit internal data bus. The low price (and a few other factors) made it the main processor for a home PC. It was still very slow so there were assisting chips on the board such as DMA, communication chips, etc. but now the CPU could perform integrity check for RS232 communication without the need to a dedicated chip. Slowly but surely the CPU became more and more powerful allowing floating point instructions and Packed Operations, first as an external co-processor and eventually as an internal component. With this the need of 'smart' chips working side by side with the CPU has reduced and if we compare the complexity and power of the CPU vs. its peripherals from 1980 till 2000 there is a rapid decline and peripherals today are much slower than the main CPU whereas 1980 PC might have had device faster than the CPU helping it with the hard work.<br /><br /> There two main reasons for CPU becoming much stronger than the peripherals. First is that it is so simple to increase CPU clock by improving silicon technology. The faster the CPU the less help it needs from other peripheral devices. This causes the main CPU to take the roles of many devices and reduce the peripheral functionality to <a href="http://en.wikipedia.org/wiki/OSI_model" rel="nofollow">OSI model</a> 'layer 2' only. The second reason for CPUs to take over is that it is simpler to design and redesign software more than hardware and whereas hardware may become obsolete, using software maintains compatibility over years and different board manufacturers.<br /><br /> One day we wake up and find out that if we keep increasing CPU speed we need new cooling technology invented. Such technology is possible but eventually the CPU speed will reach a critical point at which it will no longer be possible to cool it. On another track and with no relation to this, network cards began offering 'offloading' features which means that the network card provides Layer 2 processing and also Layer 3 and even Layer 4 functionality. Graphic cards also started providing advanced hardware acceleration features. USB Bus is also performing Layer 3 processing in hardware.<br /><br /> We find ourselves with many smart peripherals again. This is the result of the fact that technology has advanced to the point when peripherals today may have more processing power than an old Pentium processor and with the fact that CPU speed has reached its critical point. We had CPUs at 4GHz and then went back to 3Ghz and below.<br /><br /> All these bring us back to the parallel world:<br /> * We can no longer buy a new CPU and expect it to make our software work faster just because it is a newer CPU<br /> * Peripherals today are more powerful than a CPU was 10 years ago<br /> * The Internet has re-invented distributed systems and scalability does not stop with a single machine<br /><br /> There are new tools and new libraries, new design patterns, new programming models and even new languages, all created or re-invented for parallel programming, all to assist us programmers with understanding this problematic area of parallel programming and solving this riddle.<br /><br /> This is all very nice and interesting but I have to tell you that a bigger question has been troubling me and I would really like to hear the answer for that:<br /><br /> Why would the original designers of systems base their designed on parallel operations? Parallel hardware is not an excuse good enough to justify Fork. UNIX had a built-in command called Fork. This command split a process into two separate processes. Actually the entire system design was based on it and all processes were Forked from the main system process. This automatically copied file handles, security attributes, etc. Why would the system designers of UNIX support Fork when the system was written using Assembly?! You don't add nice-to-have features in such scenarios. Moreover did you notice that the original user interface was a 'DOS' like text console that interacted with several processes in parallel? Why would users want that?<br /><br /> See? Something is wrong here. How is it possible that parallel design was a common practice back then if it is so impossible to understand? This just doesn't add up!<br /><br /> We can talk about how parallel programming is the future of computing and this does make an interesting talk for a coffee break but there is more to it. One of the most important aspects of parallel design is User Experience. User Experience is the product! It is a combination of two things: the User Interface which is the graphics and animations, and the Business Logic and how the application behaves. Have you ever clicked Print instead of Save and had to wait for 10 seconds for the Printer Selection dialog to appear so you can close it? This is bad User Experience. You will never find this in a good computer game. The difference from User Interface to User Experience is a result of a parallel design.<br /><br /> Learning that 1970's software designs were based on parallel methodologies is still surprising for me, even when I know that these new concepts came from the 1970's: Services, Web-Server, Cluster, Terminal Services (Remote-Desktop), Transaction, Distributed Computing, Cloud, Fork, Join, and a few others...<br /><br /> I will try to look into it in the following blog posts.</p></div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/17380?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Sandy Bridge</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Parallel%20Computing&amp;language=ru">Parallel Computing</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Intel%C2%AE%20Advanced%20Vector%20Extensions&amp;language=ru">Intel® Advanced Vector Extensions</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Wed, 13 Apr 2011 15:50:30 +0000Asaf.Shelly145266 at https://software.intel.comMy Conclusions on Parallel Computinghttps://software.intel.com/en-us/blogs/2010/04/09/my-conclusions-on-parallel-computing?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>We have been dealing with parallel computing for some while now. Some of the ideas we had at the start proved to be wrong while others are only becoming relevant in the near future. No doubt about it, parallel computing was pushed and forced into the mainstream of computing just as Object Oriented was in the previous millennia.<br /><br /><strong>Some History: Hardware</strong><br /><br /> The first to deal with parallel computing were hardware developers because the hardware supports multiple devices working at the same time, with different operation rates and response times. Hardware design is also <em>Event Driven</em> because devices work independently and issue an Interrupt event when required. The computer hardware we know today is fully parallel however it is centralized with a single CPU (Central Processing Unit) and multiple peripheral devices.<br /><br /><strong>Some History: Kernel</strong><br /><br /> The next to support parallel computing was the software infrastructure which in modern operating systems is the Kernel. The Kernel must support multiple events coming in the form of Hardware Interrupts and propagated upwards as Software Events. Kernels are commonly distributed in design as several Drivers can communicate with each other. The centralized object in the system is allowing communication between the drivers and supports synchronization but is not supposed to contribute to the application's business logic in any form or way.<br /><br /><strong>Some History: Network</strong><br /><br /> UNIX is based on services. A Service is a way to call a function over network. Network technologies required distributed design in which every element is completely parallel to the next and there is no single 'processor unit' as the system's master. UNIX took this to the next level with technologies such as services, pipes, sockets, mailslots, Fork and more. At a time when programming was a tedious work, developing an operating system to support Fork meant extensive efforts. Still UNIX had built in support for that mechanism which solves so many problems... Only we forgot how to use it and I don't remember seeing a new system design that had Fork in it.<br /><br /><strong>Some History: Applications</strong><br /><br /> When I just started with C programming and have just found out about threads I tried doing things in parallel just to see how it works. The result was, as you can imagine, by far worse. The application runs much slower, there are "Random Bugs" and the code looks terrible. The explanation I got was that there is only one CPU and the different threads compete over it. No Multi-Core CPU means that there is no ROI (return on investment) for using multiple threads and the large efforts required for a parallel design. The only reason to use a thread is when you really have to for example when there is need to wait for hardware or a network buffer.<br /><br /><strong>Parallel Computing Today</strong><br /><br /> A few years ago CPUs got to a certain hardware limitation which would have required special cooling. At this point the race to reduce silicon size and increase clock frequency has ended. Instead of spending massive amounts of silicon on the CPU for advanced algorithms to improve instruction pre-fetch, smaller and simpler CPUs are used and there is room for more CPUs on the same silicon wafer. We got the Multi-Core CPU which practically means several CPUs on the same computer.<br /><br /> At first the cores of a Multi-Core CPU were simpler than the single core one. These cores also operated in a much lower frequency which meant that an application designed for a single task operation had a massive performance impact when moving to a new computer, for the first time ever.<br /><br /> Parallel Computing has become main stream. We started with a long series of lectures about parallel computing. It seemed that people wanted to know about this subject but there was so much overhead that Parallel Computing simply scared people away. There is a huge ramp before you can be a good parallel programmer. Just as there is for object oriented programming. This meant that team leaders and architects were at the same level as beginner programmers, or perhaps with some very little advantage. Add to this the fact that there are massive amounts of code already written for a single core CPU and good advantages can be achieved after at least some re-write. Last but most important reason to reject parallel computing was that it is easier and <span>cheaper</span> to buy another machine than to make the best out of the CPU cores. This was actually a boost for Cloud Computing.<br /><br /><strong>Who is doing Parallel Computing</strong><br /><br /> There are several types of parallel computing. The hardware is parallel so the Kernel is parallel. With this type of parallelism every worker is doing something else, and workers own their resources instead of sharing them. For a long while now DSP (Digital Signal Processing) chips are Multi-Core CPUs so that the algorithms executed on these chips can run faster. Algorithms and DSP chips are evaluated by MIPS which is the amount of instructions per time constant. Gaining performance increase with an algorithm means either using less instructions or adding more worker CPU cores. PCs also run algorithms such as face recognition, image detection, image filtering, motion detection, and more. The transition from single core CPU to a Multi-Core CPU was fast and simple.<br /><br /> Algorithm's increase in performance is relative to the amount of computations per data item. More computation more cores can be used. Image Blending (fade) is an example for an algorithm which cannot enjoy the use of more than a single core. Take an image and blend each pixel with the corresponding pixel of another image. Each pixel should be read from RAM then a simple addition and shift right are performed and then the result should be writen back to RAM. The CPU can operate at a rate of 3GHz and the RAM at 1GHz. For each pixel in the image we: Read pixel A, Read pixel B, Add, Shift, Write result pixel. Add another core and the CPU cores will mutually block on access to the memory. This is also true for Databases and database algorithms such as sort algorithms, linked lists, etc. For this reason the new Multi-Core CPUs have extensive support for parallel access to memory.<br /><br /><strong>Parallel Computing ROI</strong><br /><br /> Parallel Computing is the new future for computers. Object Oriented is no longer the new buzz word. I keep telling people that before they make an Object Oriented Design to their systems they should make flow charts. Good OOD is based on good system flow charts, whether you write them down or do it in your head as an art.<br /><br /> We all used to think that User Interface is the product and OOD is the way to do it. It now looks like we were wrong:<br /><br /><strong>User Experience is the prodcut and Parallel Design is the way to do it</strong>. User Experience (UX) is not User Interface (UI). User Interface defines what the product would look like, or in other words UI defines what the product <span>is</span>. Object Oriented Design defines what the code looks like, or in other words OOD defines what the code <span>is</span>. Parallel Computing defines how the code works, or in other words Parallel Computing defines what the code <span>does</span>. User Experience defines how the application behaves, or in other words User Experience defines what the application <span>does</span>.<br /><br /> I am not using a C++ library because it is using linked-lists. I am using that library because it can sort.<br /><br /> I am not buying a product because it looks like I want it to look, for this I can buy a framed picture instead. I am buying a product because it is doing something I need and it is not doing what I do not need.<br /><br /> Parallel Computing is the basis for User Experience. Even if you have a single core it is better to have good parallel design. As customers you know this, you don't want to accidentally hit "Print" instead of "Save" and now wait for 5 seconds punishment for the dialog to open so you can close it. (see <a href="http://www.asyncop.com/MTnPDirEnum.aspx?treeviewPath=" rel="nofollow">minute 43 for demo video</a>)<br /><br /> Today we have so many good resources and tools. Now is the time to learn how to work parallel and produce good prodcuts with good UX.</p></div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/19251?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">http://AsyncOp.com</a> </li>
<li class="field-item even">
<a href="/en-us/tags/17368?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">multi-core</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Parallel%20Computing&amp;language=ru">Parallel Computing</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=User%20Experience%20and%20Design&amp;language=ru">User Experience and Design</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Professors&amp;language=ru">Professors</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Students&amp;language=ru">Students</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Fri, 09 Apr 2010 18:10:29 +0000Asaf.Shelly155279 at https://software.intel.comThe Future of Internethttps://software.intel.com/en-us/blogs/2009/12/31/the-future-of-internet?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded">Around Y2K a friend and I had an idea for a phone that works over the Internet by connecting to USB. The time was not so great because of that bubble. A few years later Skype did it.<br /><br />
After that I went into the area of media and Internet video and broadcasting. Part of this was the experimental broadcast of Israeli Channel 10 on this site: <a href="http://ttvv.tv" rel="nofollow">http://ttvv.tv</a>. There were two applications that I could think of at the time. The first is a storage that lets people share their video clips online - this is YouTube. The second application is a radio or TV channel with multiple sources. This means that everyone can bring their own content to the public, live. This was not really implemented yet and we only have web-blogs today. Perhaps one day a shopping center would has a video room for kids to broadcast their content after school..<br /><br />
About four to five years back I had a vision of all network routers in an organization becoming a cloud. You can read about this by searching the web for patents with my name on them. Today everybody is considering cloud as the near future of computer systems.<br /><br />
What I really want to talk about is the next step after it. The future of Internet in two to four years from today.<br /><br />
First and foremost anonymity will be gone. Gone or at least cast a side. Today we log in to most of the websites and most verify our email address. IP addresses can pin-point out location to the area of a city and very often a street, the company we work for, and this is widely public for every website to use. Facebook gave a face for the people we talk to and we can choose not to chat with people we do not know. People who do not log in to facebook can't interact with anyone. I am anonymous right now - you don't know where I am and where I work, and still you know more about me than anyone I meet at the shopping center near my house. You read my blog, you have a picture of my face, and you know what I think about many things. Anonymity allows people to feel free over the web but the truth is that Google knows who you are when you are browsing the web. They need this to help you with your search results and with ads. Websites know who you are, that you came back, what other sites you visited, and who sent you. The Internet started with anonymity for porn but in fact most porn sites will not only keep track over you but will also make the best effort to install a spyware on your computer so they can keep better track over you.<br /><br />
We can still be anonymous in the web but we can also be anonymous in a dark alley - nobody is going to recognize you there. The question is what kind of interaction are you willing to have with people who wish to stay completely anonymous...<br /><br />
The other side of innovation in the Internet and web, which will soon link to the first, is Cloud. I am not talking about cloud computing, rather it is cloud as a concept. We have a few clouds today, for example e-Mule is a cloud in which everyone can donate their file resources. You contribute more - you get more. DNS servers in the Internet operate as a cloud. When we think of machines working together we like it. It feels right. This is because our community is a cloud. Family is cloud, friends are cloud, every group of people who agree to share, who agree to give in exchange for receiving operate as a cloud, as a collective.<br /><br />
Next step for the Internet then is to let me identify the people around me so we can agree on cooperation. If I can locate the people near me then I get more out of the cloud. If I play online with the guy next door then he is more likely inclined to give me a cup of sugar when I am out of. You get more if your communities overlap. Friends are members of your community. Kids today have more friends online that face to face, this is because they are part of more online communities than otherwise. The more committed you are and more involved with a community you are better privileges. Communities also have leaders.<br /><br />
If I have a nice song that I wrote I cannot share that with the rest of the world on my own. I need to find a website, a place where people with the same interest meet. A while back I had to go to a club to play chess with other people. Today I can do it online by using an application that searches for someone else with interest in the same game. Gamers also have communities and you usually play online with your username. Today I have to go to a website to find out about new songs. Google cannot search for a song I wrote on my computer. I need to use a central server to publish that. Or do I?<br /><br />
Why can't I publish my work? I wrote a nice application and I want other programmers to benefit from this code. I share information I get better access to other resources that the community (or cloud) has to offer. Why do I need a web server to share files? Why can't I borrow web-server services from the community in exchange for sharing my computer as a web-server?<br /><br />
The Internet has no owner and anonymity is basic. Both arguments are false because you cannot do anything without being identified, and everywhere you go online you are dependent on web-site owners. They might want to delete your post or comment, they might agree to publish your work... The real Internet begins when everyone has an equal share. Like a Kibbutz, just like communism only you are the owner of your resources and you will only give them willingly - like democracy.<br /><br />
The time to start is now.</div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/19251?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">http://AsyncOp.com</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Parallel%20Computing&amp;language=ru">Parallel Computing</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Students&amp;language=ru">Students</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Professors&amp;language=ru">Professors</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Thu, 31 Dec 2009 21:01:03 +0000Asaf.Shelly155810 at https://software.intel.comState-Phase Programminghttps://software.intel.com/en-us/blogs/2009/09/02/state-phase-programming?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p><span><span>It has been relatively easy for us to follow the path of a serial application. The flow of the application is managed by the Stack. This makes the execution flow of a single process to be managed by CPU hardware. Today we face the need to execute several processes in parallel and thus have several execution paths at the same time. This is harder for us to manage and keeping track of this flow is complex. The hardware accelerated Stack is no longer sufficient for us and the Stack-Trace is no longer the state of the application. I have elaborated on this on a previous post called </span></span><a title="Stateful Programming - A Case Study" href="/en-us/blogs/2009/07/27/stateful-programming-a-case-study" rel="nofollow"><span>Stateful Programming - A Case Study</span></a><span><span>. This post analyzed the execution flow of a serial application in terms of Execution States. A system design that specifies states is beneficial for a serial application as explained in that post. When it comes to parallel applications this design step becomes a must.</span></span></p><br /><p><span> </span></p><br /><p><span>The Application State is a cross-section of all states of running elements. On a serial application this can be the state of the Stack (or Stack-Trace). For a parallel application there are several processes working at the same time. Every thread is doing something or waiting for something. There are also suspended operations. Here are a few examples:</span></p><br /><p><span> </span></p><br /><p><span>[1] OpenFile, ReadFile(A.txt), WriteFile(B.txt), CloseFile</span></p><br /><p><span>The states are: <em>(1) Initial State, (2) The File is open, (3) Data was <span> </span>Read, (4) Data Written, (5) File Closed</em>.</span></p><br /><p><span> </span></p><br /><p><span>[2] OpenFile, ReadFile(A.txt), CloseFile, UpdateUI</span></p><br /><p><span>The states are: <em>(1) Initial State, (2) The File is open, (3) Buffer was Read, (4) File Closed, (5) GUI Updated</em>.</span></p><br /><p><span> </span></p><br /><p><span>[3] LockBuffer, ReadBuffer, UnlockBuffer, UpdateUI</span></p><br /><p><span>The states are: <em>(1) Initial State, (2) Buffer Locked, (3) Buffer was Read, (4) Buffer Unlocked, (5) GUI Updated</em>.</span></p><br /><p><span> </span></p><br /><p><span>The examples above are serial implementations but can also be converted into parallel implementations.</span></p><br /><p><span> </span></p><br /><p><span>Example [3] seems to be serial however it is using a lock which means that the transition from State (1) to State (2) is dependant on the execution of another thread. For example if there are two thread doing this operation then Thread B can only move from State (1) to State (2) if Thread A is not in State 2 or 3. If Thread A is currently in state (3) then Thread B will enter a wait state and the operation will be suspended.</span></p><br /><p><span> </span></p><br /><p><span>Example [2] is serial but it is very likely that the GUI Window will be owned by another thread and only that thread is allowed to access the window. Modifying data on the window can be performed by posting a message to the queue of the owner thread. This means that Thread A, performing operation [2], will post a message to Thread B which is the owner of the GUI Window, and can then continue to handle another task. Thread A can in effect start another operation [2] and keep posting messages to Thread B. In this situation even though all threads are working, some of the operations can be suspended. How many system designs have you seen that show this?</span></p><br /><p><span> </span></p><br /><p><span>Example [2] is serial because the file operations are blocking. It is possible to use non-blocking file operations and for example have a Callback function executed when the ReadFile is complete. The thread will open the file, call the ReadFile API and assume that the Callback be called and therefore the thread can take another operation. This time again, there can be suspended operations even though all threads are working.</span></p><br /><p><span> </span></p><br /><p><span>It seems that looking at the Stack-Trace as the state of the application is a huge mistake. There are many operations that have no thread associated with them and therefore have Stack related to them. Other operations can cross thread boundary or are effected by other threads and looking at the Stack-Trace shows us only partial information.</span></p><br /><p><span>There are bugs that appear randomly. <em>Random Bugs</em> we call them. Well, actually these bugs are very accurate. The problem is that we just don't have a good view of the system. Imagine that you are driving a car with no windows. You can only see the inside of the car. Sometimes you turn the wheel and everything is fine and sometimes you turn the wheel at the same way and you "Randomly" hit something. The way to predict and locate bugs is to have a real view of the interactions in our application.</span></p><br /><p><span> </span></p><br /><p><span>The two basic concepts that we should need to add to our design are Phase and State. When we write a Procedural C code the operation is inside the function - this is why it is called a Procedure. The operation has several Phases that it is going through, or several states of execution. In Procedural programming every branch is commonly an execution state – a Phase. Executing the code 'step-by-step' over the Procedure means going over the different Phases of the operation. We can see the different Phases by looking at the lines of code (see my previous post for more information). The operation Phase does not have to be associated with a thread. When we break this association we can start managing our application better.</span></p><br /><p><span>A primitive management of operation Phase is performed by using Locks, Events, etc. We wait for an application wide Phase. The second important element is object State. We don't have good tools to keep track of that. Actually the only States we know are: <em>Not-Initialized, Initialized, Working, Can-Dispose, Disposed</em>. These States are kept to manage resources and avoid resource leaks. Some of the object States are relevant for some of the operations. For example I want to start scanning my picture only after the buffer is ready in memory and no one else is using the output file. This adds these new States to the picture object: <em>No-Data, Updating, Data-Ready</em>. We can include to this States that include version numbering etc. Actually there are more States when I want to start scanning my picture only after the buffer is ready: <em>Scanning-Data, Data-Scanned</em>.</span></p><br /><p><span> </span></p><br /><p><span>When we snapshot all Phases and States in the system we know exactly what happened and when!</span></p><br /><p><span> </span></p><br /><p><span>To better explain the use of States I wrote a small sample application that uses a pseudo engine. A real implementation requires the use a kernel driver and would only confuse more than explain. Phases can be managed using the same State manager.</span></p><br /><p><span> </span></p><br /><p><span>The code is published here:</span></p><br /><p><a href="http://www.asyncop.com/MTnPDirEnum.aspx?treeviewPath=%5bo%5d+Open-Source%5cPhase-State+Programming" rel="nofollow"><span>http://www.asyncop.com/MTnPDirEnum.aspx?treeviewPath=%5bo%5d+Open-Source%5cPhase-State+Programming</span></a></p><br /><p></p><br /><p><span>The code is waiting for the correct State but it is also possible to post a message to a thread or to have all States and Phases waiting in a queue of tasks that belongs to a thread-pool.</span></p><br /><p><span> </span></p><br /><p><span>In the log you see, <strong>Num</strong> is the serial number of the log message, <strong>MM:SS.millisec</strong> is the time of message in the format of <em>minutes : seconds . milliseconds</em>, and <strong>Application Log</strong> is the message sent from the application. The messages that start with "<strong>[ Main ]</strong>" are Phases on main() and the messages that start with "<strong>[ Communication Buffer ]</strong>" are States of the object as it reports modifications.</span></p><br /><p><span>A real implementation will allow you to be notified of changes, allow to prevent the shift to next State until a task is completed, and allow to hook on State change before everyone is notified.</span></p><br /><p><span> </span></p><br /><p><span>The code sample in <strong>PhaseStateTest00.cpp</strong> is the test application with main() and the other threads.</span></p><br /><p><span>The code sample in <strong>State_Simulation.cpp</strong> and <strong>State_Simulation.h</strong> is the implementation and declarations of the pseudo State management engine.</span></p><br /><p><span>The code demonstrates how the system is still coherent even though an operation is crossing several threads and even State(3) of the object is used by both a thread and by main() which in terms of execution flow is similar to forking.</span></p><br /><p><span> </span></p><br /><p><span>Using this method of system modeling should greatly reduce execution-flow bugs, and can really help with system debug. Many of the bugs are anticipated and prevented at the design stages.</span></p><br /><p><span> </span></p><br /><p><span> </span></p><br /><p><span>It is very difficult to implement this using user-mode API however a kernel driver can do this very easily.</span></p></div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/17368?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">multi-core</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Parallel%20Computing&amp;language=ru">Parallel Computing</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Open%20Source&amp;language=ru">Open Source</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Students&amp;language=ru">Students</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Professors&amp;language=ru">Professors</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Wed, 02 Sep 2009 20:22:45 +0000Asaf.Shelly165136 at https://software.intel.comStateful Programming - A Case Studyhttps://software.intel.com/en-us/blogs/2009/07/27/stateful-programming-a-case-study?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded">One of the basic tools that a programmer has in multi-core programming and parallel computing is the state maintainability. A serial application has only one flow and therefore the Call-Stack (list of nested function calls) is in a way the application's state. In a parallel environment this is clearly not the case because there are many threads with many Call-Stacks at the same time. For example taking a snap shot of a parallel system in order to reproduce a bug requires the states of all running threads, sometimes processes, and sometimes even the operating system. The operating system behaves differently when it has enough memory than when it is out of memory. We need a complete system snap-shot in order to reproduce and solve bugs. You can read more about this in my previous post here: <a href="/en-us/blogs/2009/04/30/stateful-programming-a-key-element" rel="nofollow">Stateful Programming - a key element</a>.<br /><br />
There are three basic types of Runtime States that we consider:<br />
1. First is the state of the operation I am working on right now: this thread, this object, this task, etc.<br />
2. There is the collection of states of all other operations currently running in the system: other threads, other objects, other processes, etc.<br />
3. There is also the state of the entire system: out of memory, flooded disk queue, with garbage collection in the background, etc.<br /><br />
When a program is running and I don't know its state I have no way of knowing what went wrong. The more stateful the application the more I know what is going on with it. Knowing the current state of operation can help me in two ways:<br />
1. My current state: meaning know what is the last thing my application has performed and how well it is performing, and<br />
2. Overall state: meaning learn the state of the system around me by the way my code is operating. For example if I try to allocate memory and get a response of 'out of memory' then it is probable that my other module had crashed because one of the ActiveX controls it was operating crashed because the system is out of memory.<br /><br />
There is a class of students that I am teaching these days. It is a 3 months programming course and they start with C, go over C++ and then C#. In the way they are taught the many concepts of programming such as parallel computing, embedded CE and VX Works, system design, etc.<br /><br />
My part started last week with a course about software debugging and bug prevention. This monday we start parallel computing. This is before they know Object Oriented and C++ programming and it is for a very good reason. We want to see if it helps to understand the parallel system flow before the mind is sealed with objects and the methodology around it.<br /><br />
This time when I went over the debugging slides in class I deviated at times. The goal was to focus on debugging techniques that would be also helpful in the parallel world. This worked like magic. It so seem that the techniques of the parallel world reduced debugging complexity for a serial application as well.<br /><br />
My focus here is on the stateful programming aspect of debugging. Far too often the only way to find a flow-bug in a parallel system is to look it up in the application's design. For this reason Stateful Programming has to do with design as much as it has to do with programming. We take a simple application that opens a file appends "1234" to it and closes the file. The file name is provided by the user. Here is the stateful analysis of the application:<br /><br />
Generally speaking we say that every time a decision is made in the code we change state. For example if I try to open a file and the file is opened then the applciation moved from a state of "need to open file" to "file is ready for work". If file opening failed then the application moved from "need to open a file" to "the file cannot be opened" which means that the overall operation fails. This means that whenever there is an 'if' statement we change a state. We then add that when ever there is a function call that can return a value other than success this function call is a state shifter. The API call to open a file can return either the file is opened or not so this call is supposed to change the state of the application.<br /><br />
This is generally speaking. More practically speaking we say that everytime there is an error it has to be made noticable either by breaking the application or posting a message to a log, to the user, or any other method. We also say thet there are hirarchies for states so unless I am trying to debug the user input loop (asking for a file name) I don't really care whether it failed and is asking the user again for the input, all I care is the final output of this loop: either we got the input or we don't.<br /><br />
We can of course specify macro flags to enable and disable message for internal states (to be tested using #ifdef). The power of logging states is that when an application crashes or has some race condition we can determin what happened because we have a good snapshot of the application and what it was doing. It is possible for example to see in the log that one thread was working with a file at the same time that another thread already was.<br />
Stateful Programming comes from the design and we need at least part of the Flow Diagram for our system. The best way to follow this through is to have a Flow Diagram followed by an Object Block Diagram, followed by level 2 Flow Diagram for internal followed by an Object Block Diagram and so on...<br /><br />
See the following diagram:<br /><br /><a href="/sites/default/files/m/8/d/b/blog-2009-07-26-0-stateful-programming-a-case-study.jpg" rel="nofollow"><img src="/sites/default/files/m/d/5/3/blog-2009-07-26-0-stateful-programming-a-case-study-300x225.jpg" alt="Stateful Programming" width="300" height="225" /></a><br /><br />
Here is a list of states according to this diagram:<br />
* Starting<br />
* Getting User Input<br />
* Exiting: User Request<br />
* Opening File "C:\my file"<br />
* Writing To File 4 bytes to "C:\my file"<br />
* Notifying User Of Error in File Write<br />
* Closing File<br />
* Process Completed Successfully<br /><br />
Here is a list of error states according to the diagram:<br />
* Error Getting User Input<br />
* Error Opening File "C:\my file"<br />
* Error Writing To File: 4 bytes to "C:\my file"<br /><br />
Some of the state notifications could be hidden unless activated. The user input loop can also have a few internal states activated on demand.<br /><br />
When we have several threads and processes running in parallel it is relatively simple to track down flow bugs in the system. On any given time the collection of states of all threads is the state of the appliation. Now flow control bugs (A.K.A. "Random Bugs") are very predictable.<br />
This is also compatible with sequence diagrams in visual studio 2010.</div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/17368?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">multi-core</a> </li>
<li class="field-item even">
<a href="/en-us/tags/19844?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Multi-core development</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Parallel%20Computing&amp;language=ru">Parallel Computing</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Mon, 27 Jul 2009 15:41:46 +0000Asaf.Shelly166237 at https://software.intel.comStateful Programming - a key elementhttps://software.intel.com/en-us/blogs/2009/04/30/stateful-programming-a-key-element?language=ru
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded">A key feature of Object Oriented Programming is code manageability and reusability, key feature of Procedural Programming is flow manageability. A key element in flow manageability is Stateful Programming. This methodology is very common with Procedural programmers and is very uncommon with Object Oriented programmers, but it is easily applicable.<br /><br />
I have recently decided to publish all of my code samples on my website: <a href="http://asyncop.com/Link.aspx?Open-Source" rel="nofollow">http://asyncop.com/Link.aspx?Open-Source</a>. This may take a long while and is an ongoing process but every process starts with a first step. The first step here was to write a tool that could parse C\++\# source code and convert it into readable HTML format. This website is about parallel computing so I have decided to hit two birds with one stone and I wrote a code parser in a way which proves a technological principle and the first project I published with this parser was the source code for the parser itself.<br /><br />
The parser is written in C# which means that it is fully Object Oriented in programming and in design. I also applied the principles of Stateful Programming to the code and design so the code doesn't look like an academic OOP code.<br /><br />
The source code can be found here: <a href="http://asyncop.com/MTnPDirEnum.aspx?treeviewPath=%5bo%5d+Open-Source%5cProject+Publisher" rel="nofollow">http://asyncop.com/MTnPDirEnum.aspx?treeviewPath=%5bo%5d+Open-Source%5cProject+Publisher</a>.<br />
As you will immediately notice, this is not academic OOP because functions here are not limited to 3 - 4 lines of code. Instead you will find long functions and very small objects.<br /><br />
At the base of this parser is the need to go over a long string of text and parse it. Going over the characters one by one, some parts are dependant only on the selected character (such as ':'), others are dependant on previous characters (number after number / after letter), and some are character block definitions (such as #, ", /*, //, etc.). There is also a higher lexical analysis - identifying reserved words.<br /><br />
There is another important feature to the parser. It is higher level parsing such as locating classes and functions, finding class names and tagging them and so on (at the time this post is published the tagging feature is not yet published).<br /><br />
Procedural programmers use a term called state while parsing a long buffer. During the pass over the buffer the application's state-of-parsing changes. This brought on some of the coding constraints of the C language. One of the important features of this language was to make it simple for parsing when going forward on the buffer with a state-machine mechanism.<br /><br />
In the code you will widely see the use of such states. Actually most of the code is just the definitions of the different states, the detection of the states, and states dependencies. Actually to allow simple and flexible parsing capability I had to give up on state-object inheritance and thus all objects that define states are of the same type.<br /><br />
Actually there are more than one type of state: There is the state of character parser and there is the state of the higher level parser - who's job is to detect class names and function names and tag them. These state are not of the same type because they are completely asynchronous to each other. It is possible for a letter or a number to be part of a class, a function, or global, and it is also true for '#', '{', '}', and so on.<br /><br />
This is how Procedural Programming worked for a very long time. Object Oriented Programming however managed states using the stack. When we detect a new state we go into a new function. If you want to know the state of your application then you need to follow the stack trace. This is very very bad and terrible because it means that there is a single application-wide state. The state of the execution flow of the process using the stack is also the state of the business logic, and we have already determined that the business logic may have and maintain more than a single state at the same time. True as it may be - programmers do manage to parse protocols using academic OOP but most of the times it is due to intuition and step-by-step debugging. This is by no means a good programming following a robust design.<br /><br />
The parser I published works. This is the fifth version (currently it marks braces). Every addition to the parser was simple and strait forward without touching the original design, only adding to it.<br /><br />
Would you have used this type of object oriented programming?</div></div></div>
<li class="field-item even">
<a href="/en-us/tags/17567?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Guest Blog</a> </li>
<li class="field-item odd">
<a href="/en-us/tags/18593?language=ru" typeof="skos:Concept" property="rdfs:label skos:prefLabel">multicore</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image:&nbsp;</h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/language/en?query=Parallel%20Computing&amp;language=ru">Parallel Computing</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/language/en?query=Open%20Source&amp;language=ru">Open Source</a> </li>
<section class="field field-name-field-theme-zone field-type-list-text field-label-above"><h2 class="field-label">Theme Zone:&nbsp;</h2><div class="field-items"><div class="field-item even">IDZone</div></div></section>Thu, 30 Apr 2009 15:24:32 +0000Asaf.Shelly166657 at https://software.intel.com