📜 ⬆️ ⬇️

Interview with Jeffrey Richter at the Microsoft SWIT 2014 Conference



On March 27-28, the 2014 Microsoft SWIT Conference took place in Kiev. Within two days, developers and IT managers could see and hear a large number of speeches from speakers from around the world.

The most important attention, of course, attracted the reports of Jeffrey Richter. Jeffrey is a great authority for many developers, an expert in .NET technology and the owner of Wintellect. I had an interview with him, some of the questions in which was asked by Habr's readers . We talked for almost an hour, who are interested - welcome under the cat.
')
(If it seems to you that you have already seen this topic somewhere before, then no, then there was one interview, and this is another).

Hello, Jeffrey. We are big fans of your books and presentations, it is a great honor for us to be here now and talk with you.
Thank.

My name is Vladimir, I am writing in C ++, and this is my colleague Alexander - a .NET developer. We also have a blog on habrahabr.ru, maybe you have not heard about this community, but we have it quite popular: about a million IT specialists from Russia, Ukraine and other countries. A week ago, we announced your arrival at the Microsoft SWIT conference and asked people to ask questions. With your permission, I will ask the most popular questions from readers, as well as a few questions from myself.
OK.

Let's imagine that no C # language and the .NET platform exist, and you, with all your current knowledge and experience, have been tasked with developing them from scratch. Would you create them exactly as they are now? Perhaps something was initially done poorly in them? Perhaps you would like to add something important?
Of course, in .NET and C # today there are things that both Microsoft and I personally would like to implement differently. 13 years ago, the world was different. Now we are focused on mobile development, 13 years ago, the focus was on web services. Thus, what would be worth doing is to make .NET more “clean”, minimal, so that it does not use as much memory as it does now, it is not so “heavy”.

There is after all. NET Micro Framework - isn't it for that?
There are several ways to look at the .NET platform. First of all, it is a set of standards that any company can take and implement, and these implementations will be compatible as long as they adhere to the standards. Microsoft itself supports several .NET implementations:
1. The classic version, which runs all desktop programs, servers with ASP.NET, Silverlight, etc.
2. .NET Compact Framework
3. .NET Micro Framework

The first and most important implementation, of course, was the usual .NET, but then we thought: “what about phones or watches - devices that do not have much memory and not so powerful processors?”. There was no way to get .NET to work on them quite well, which is why the “trimmed” versions appeared. If today all this could be written "from scratch", I think it would be worthwhile to select a small core of the entire platform - a CLR-type system and a garbage collector. This should be the basis, but everything else could already be connected to the platform with something like “plug-ins”. For example, Reflection is quite resource-demanding and slow technology, while not so many programs are actively used by it. We could, for example, leave Reflection in the desktop version of .NET and remove from the Micro and Compact versions. Thus, the same core would work in all versions of the platform, which would give greater flexibility. And already the development teams of a specific platform could add the rest of the functionality, according to the plug-and-play model. Do you need any specific functionality? Ok, take it and add it. But .NET was never designed this way. It was originally created as a solid, monolithic platform.

But after all, with a monolithic approach, we can write an application - and be sure that it will work everywhere. And what about the “modular” approach you offer?
The application itself can declare what "modules" it needs for work. In the end, even today we cannot write one application that would actually work on the .NET, .NET Micro Framework and the .NET Compact Framework. What I propose actually increases the flexibility of the platform.

Do you think this was the right decision for Microsoft to release and maintain .NET only under Windows? What do you think about Mono, Xamarin, and the future of .NET in general on platforms other than Windows?
This is a good question. This was definitely a political decision from Microsoft. 13 years ago, Bill Gates, Stephen Ballmer, and others who were at the forefront of the company decided that Microsoft was making a lot of money selling Windows, and it was very important to strengthen and maintain it by all means. The release of .NET exclusively for Windows was a strong move for this purpose. As for today, Microsoft has definitely realized that Windows has strong competitors (at least Android and iOS) and they are not represented on these platforms. In addition, both Bill Gates and Steve Ballmer have already left the company, and I think that modern Microsoft will be a more open company. Do I believe in Xamarin? Sure. People can finally write programs (well, at least their business logic) once and for all platforms. Yes, each platform will require refinement of the visual part of the application, but it is not so bad. Overall, I think Xamarin is very good at pushing the .NET platform forward.

Speaking of different platforms, some people ask: “Why should I write code in .NET, getting an application that can work only under Windows, when can I take Qt or Java and create a product that will work everywhere?”. What can you answer these people?
Each operating system has its own characteristics. One of the important features of the operating system is its approach to interfaces, user interaction, intuitiveness and ease of operation. Windows in its latest versions offers its own vision of these things - for example, a tiled interface that conveniently displays “live” application icons. It is enough for me to open the start screen - and I already see on the tiles my tasks in the calendar, the presence of letters in the mail, messages from my friends. The use of these elements unique to the operating system makes the application user-friendly, which is what we should strive for. Using .NET and Windows Runtime, such interfaces are easier to build than using universal libraries, so Microsoft makes developer's life more enjoyable. In addition, if, for example, a user opens the Windows 8 start screen and notices that your application’s tile has been updated, it may make him want to open the application and check what has changed, and in this place you can offer him a paid service or show advertising. And now we can see how the support of the Windows platform features influenced the monetization of the application.
In terms of supporting the new features of Windows, I really like the Windows Runtime. This is the most modern, “clean” and simple API that you can imagine. It is much easier to write on it than, for example, on Objective-C under iOS. You may argue that iOS programming can bring more profit today, but Microsoft today is doing everything to conquer the mobile market. This is a big battle and it has just begun.

What do you think about the Windows Azure platform (which, by the way, was recently renamed Microsoft Azure)? What do you think about the future of this platform? Are you planning to write a book about Azure?
Yes, I have already said that I will write a book about Azure. Rather, about Microsoft Azure Storage. When Azure came out, I, in truth, did not really believe in it. I thought that the time had not come yet when the companies were ready to place their data and services in other data centers. In addition, Microsoft did not have much experience in public cloud products - yes, at that time outlook.com, bing and some other products already existed, but Microsoft didn’t have large public clouds. But they did it. Since the advent of Azure, its reliability, functionality, prices have drastically increased, and people have believed in this product. We hear all the new success stories from companies using Azure. Even the site of my company today is working on Azure, eliminating the need to think about the mass of things that we would not like to think about. My favorite part of Azure is Azure Storage. In each application, the most important is its condition. What data we store, what we show the user. All this needs to be stored somewhere - and this task is of concern to each developer. And when I write a book, it will be about how Azure Storage allows you to work with data, queues, tables, how to do it efficiently, with minimal costs. This is a large amount of information, not everything can be found in the official documentation and recommendations of Microsoft, I think I can highlight important and interesting details.

Do you think an ordinary developer needs to understand how Microsoft Azure works inside? Working with local files and services, I can always understand why this or that operation took a lot of time or failed, I have debugging and profiling tools. When working with Microsoft Azure, if something went wrong or took too much time - I can only guess about the reasons.
Well, Microsoft Azure services work over the Internet, and the Internet, in general, does not have standards for guaranteed speed of delivery and processing of data. Performance problems may be related to your device, software, router, provider, server or its software. I do not think it is so important to concentrate on the insides of Microsoft Azure. After all, even in a locally running .NET application there are a lot of hidden, implicit behavior, for example, the work of the same garbage collector. However, many people use this garbage collector, obtaining acceptable application speeds. The operating system itself is also a “black box” - even with a simple file reading operation, dozens of functions are called, the internal OS kernel code, drivers work — you don’t know the implementation details of these systems, but as long as they work at a speed that suits you, you are using. It is the same with Microsoft Azure: just try, if you are satisfied with the speed of work - use, no - ok, look for something else. This approach seems normal to me. People build higher and higher levels of abstraction to solve more and more complex tasks.

Are you familiar with the Roslyn project, which provides APIs for C # and VB.NET compilers? Do you consider this project just a toy, or a truly powerful tool for expanding existing languages, creating new important products? Do you believe in the future of this project?
Yes, I know this project. Its creation took a lot of time, it is still not included in Visual Studio, but it will become more and more significant in the coming years. The project performs several tasks at once. First, he made the developers of the C # compiler rewrite it to C #. Since now the compiler can be developed faster, the speed of introducing new features of the language will increase. Secondly, now the task to write a refactoring tool for C # has become much easier. Microsoft expects the emergence of a large number of such products, competition between them and improve their quality. In addition, it became possible to write code translators from one language to another.

Do you think that Roslyn will always support the latest version of compilers in the future, with all the current features of C #?
Yes of course. When developing Roslyn, all the features of the currently available version of C # were implemented, then a new version was released - C # 6, the capabilities of which are also being added to Roslyn. In addition, the development of the C # compiler has moved from the native code to the code on C # itself, which will also contribute to a simpler integration of new features into Roslyn.

As a C ++ programmer, I am interested in your opinion on C ++ / CLI and C ++ / CX. Do you think that these projects have a future as separate, holistic languages, or their destiny is just to be a bridge between new Microsoft technologies and old projects with native code?
C ++ / CLI - never had much success. I was once offered to adapt my book on C # to C ++ / CLI. The project did not take place - we did not find anyone who would like and could do it. This language was a strange Microsoft initiative for ... I don't even know ... I have never met a single person using C ++ / CLI as the main programming language. As for C ++ / CX, its purpose is to simplify working with COM. COM is a technology created back in the 90s, you yourself know how awful it is with all this reference counting, interface conversion and so on. One of the reasons for the emergence of .NET was precisely the desire to get rid of this heritage. The components are good, but let the CLR, not the programmer, deal with the issues of allocating and freeing memory. In Windows Runtime, Microsoft has returned to native components, and C ++ / CX is a way to make working with these components transparent, in the style of working with .NET components. The C ++ language itself remains the same, the Component Extensions extension only saves us from the horrors of working with COM.

There is an interesting situation - Microsoft itself is actively using C ++ for native development (the same Windows Runtime in recent versions of Windows is not written in .NET, but in the form of native components), while the company does not encourage third-party developers to use C ++, but promotes .NET and C #. Why?
Despite the large size of Microsoft, its resources are still limited. You can not cover everything, you can not support all the technologies. For each thing, specific decisions are made: “How many people will use it? What is the development potential? How much money will the company earn in the end? ” Obviously, Microsoft’s main priority right now is on .NET and managed code. Of course, both C ++ / CLI and C ++ / CX will be supported, bugs will be fixed, but less resources will be allocated for the active development of these products.

What do you think about the future of the current Microsoft technology stack - .NET, C #, Windows Runtime? Can you tell how they will develop?
I definitely love .NET and C #. And I'm not alone in this. After the release of Windows 8, there was a moment when these technologies seemed ... I will not say abandoned, but somewhat lost positions. First, remember the story of Silverlight. This put faith in the bright future of .NET. In addition, many presentations and examples said that programs for Win8 will be written primarily in Javascript. .NET programmers felt cheated - would .NET really leave the stage? Fortunately, Microsoft thought better of it. Many people who promoted those solutions are no longer at the helm, but most applications in the Windows Store are written in C #. In addition, at one of the recent conferences (I don’t remember exactly which one), Microsoft demonstrated a new version of the C # compiler, which can directly generate native code, without being tied to a .NET virtual machine, exactly the same code that comes out of C + + compiler. Those. Speaking of performance, C # no longer rests on the fact that this is not native code. This compiler will be released in the next 1-2 years. Thus, for me, C # remains the best development technology for the near future.

What do you think about functional languages ​​and in particular about the F # language? Do you consider it appropriate to use these languages ​​in real projects today?
Functional languages ​​are not my profile at all. I wrote quite a bit on F #, but I know that C # in recent versions has gained a lot of ideas in F # - lambda functions, extension methods. And these borrowed features I really use in my work every day. F # definitely doesn’t have the support, popularity, articles and books like C #. The idea of ​​its application can appear only when all the wealth of other (non-functional) programming languages ​​is not enough. But personally, I rarely have to get into such situations, and when I have to - it’s hard for me to assess how much easier this or that functionality will be written and maintained on F #. Programmers, like people of other professions, try to put into practice those tools with which they are already well acquainted. To move on to something completely new there must be very good reasons.

I would like to ask a question about your report today. You talked about the process model for applications from the Windows Store. You said that each application is in a sandbox, which isolates it from the influence of other applications and does not allow it to access user data or damage the system.
Yes it is.

At the same time, this sandbox is not as perfect as, for example, the sandbox applications in iOS. Not only applications from the Windows Store can work in the Windows operating system, but also regular desktop applications. And they can access application processes from the Windows Store — they can kill them, they can intercept their calls, they can even inject their code into them, stealing user data from them or faking information that is displayed to the user. Do you think such a model is unsafe?
Indeed, the processes of applications from the Windows Store live in the sandbox, but desktop applications are not. This is one of the reasons why Microsoft has released a special version of its OS, Windows RT, where normal applications cannot work. To date, there are a number of devices running on this OS, and here they really provide an honest, completely isolated sandbox.This is very important - for the first time Microsoft can refuse the burden of support and compatibility with all its previous operating systems. This allows you to make the product really reliable, safe and modern. What is bad in this product is a marketing error in the names. We have Win RT as an operating system, Win RT as a device on this OS, and there is also a Windows Runtime, which is also reduced to Win RT. However, all these are completely different things, people are a little confused.

Source: https://habr.com/ru/post/218315/


All Articles