My book is for sale !

My book “Aide-Mémoire C++” published by DUNOD is available in stores and at Amazon, FNAC, Lelcerc, Hachette, Dunod and others. Available the 7th July.

MIDI Technology is awesome

Using LMMS and VST plug-in from Korg and Roland, you can make music loud ! You can find midi files on  the web (example: https://www.midiworld.com/search/?q=U2) and then you attach a VST to a track.

Don’t miss the rythm box with the famous Roland TR-909 and the bass line with the Roland TB-3030. I also put some legendary synths like Roland D50 and Korg M1. Look at  this screen pictures.

C++ Code and Assembly traduction in Release

Do you know why C++ is the best ? Because it can be high level and very focus on optimized asm code generation. Here a sample of code:

 

#include "pch.h"

class Param
{
};

template<typename T>
class Factory
{
public:
static shared_ptr<T> CreateObject(const Param& param)
{
shared_ptr<T> pObj = nullptr;
pObj = make_shared<T>();

_pLastElement = pObj;
return pObj;
}

static shared_ptr<T> GetLastCreatedObject()
{
return _pLastElement;
}

private:
static shared_ptr<T> _pLastElement;
};

template<typename T>
shared_ptr<T> Factory<T>::_pLastElement = nullptr;

class Employee
{
};

class Product
{
};


template<typename T>
class Vector
{
public:
Vector(int size)
{
_size = size;
_data = new T[_size];
}

~Vector()
{
delete[] _data;
}

T GetData(int index)
{
return _data[index];
}

void SetData(int index, T value)
{
_data[index] = value;
}

private:
T* _data;
int _size = 0;
};

int main()
{
Vector<int> v1(10);
v1.SetData(2, 20);
int value = v1.GetData(2);
cout << value << endl; //20

Vector<string> v2(1000);
v2.SetData(10, "string 10");
v2.SetData(100, "string 100");
string value2 = v2.GetData(10);
cout << value2 << endl; // string 10

Vector<Product> v3(200000);

Param param;
shared_ptr<Employee> p1 = Factory<Employee>::CreateObject(param);
if (p1 != nullptr)
{
cout << "OK" << endl; //OK
}
shared_ptr<Employee> p2 = Factory<Employee>::CreateObject(param);
shared_ptr<Employee> p3 = Factory<Employee>::CreateObject(param);

shared_ptr<Employee> pLast = Factory<Employee>::GetLastCreatedObject();
if (pLast == p3)
{
cout << "OK ptr" << endl;
}
}

The result is an associated asm code generated : here

There is approximatively 1000 lines of asm for 100 lines of C++ with templates and shared_ptr. It’s amazing !

C++ rocks.

Creating Softwares is an art

When I add new features to my UltraFluid Modeler, I need icons for the ribbon. And When I found something good, I jump into GIMP to enhance my icons.

gimp_1

It is calculated to be 16×16 pixels width and height. Precision is important here. Then I export the world toolbar as PNG : writesmall.png. It’s my toolbar for small icons. My last icons are positionned at 38th, 39th, 40th, 41th block of 16 pixels wide. Here is how it is converted into the Ribbon code creation:

pPanelFormat->Add(new CMFCRibbonButton(ID_FORMAT_ALIGN_LEFT, _T("Align Left\nal"), 38));
pPanelFormat->Add(new CMFCRibbonButton(ID_FORMAT_ALIGN_RIGHT, _T("Align Right\nar"), 39));
pPanelFormat->Add(new CMFCRibbonButton(ID_FORMAT_ALIGN_TOP, _T("Align Top\nat"), 40));
pPanelFormat->Add(new CMFCRibbonButton(ID_FORMAT_ALIGN_BOTTOM, _T("Align Bottom\nab"), 41));

Then I need to add the ID for the event corresponding to my ribbon icons:

#define ID_ID_FORMAT_ALIGN_LEFT 421
#define ID_ID_FORMAT_ALIGN_RIGHT 422
#define ID_ID_FORMAT_ALIGN_TOP 423
#define ID_ID_FORMAT_ALIGN_BOTTOM 424

Then, I need to add the UI handlers to this events in the messages map in cpp file and header file:

ON_COMMAND(ID_FORMAT_ALIGN_LEFT, &CModeler1View::OnFormatAlignLeft)
ON_UPDATE_COMMAND_UI(ID_FORMAT_ALIGN_LEFT, OnUpdateFormatAlignLeft)
ON_COMMAND(ID_FORMAT_ALIGN_RIGHT, &CModeler1View::OnFormatAlignRight)
ON_UPDATE_COMMAND_UI(ID_FORMAT_ALIGN_RIGHT, OnUpdateFormatAlignRight)
ON_COMMAND(ID_FORMAT_ALIGN_TOP, &CModeler1View::OnFormatAlignTop)
ON_UPDATE_COMMAND_UI(ID_FORMAT_ALIGN_TOP, OnUpdateFormatAlignTop)
ON_COMMAND(ID_FORMAT_ALIGN_BOTTOM, &CModeler1View::OnFormatAlignBottom)
ON_UPDATE_COMMAND_UI(ID_FORMAT_ALIGN_BOTTOM, OnUpdateFormatAlignBottom)
 afx_msg void OnFormatAlignLeft();
afx_msg void OnUpdateFormatAlignLeft(CCmdUI* pCmdUI);
afx_msg void OnFormatAlignRight();
afx_msg void OnUpdateFormatAlignRight(CCmdUI* pCmdUI);
afx_msg void OnFormatAlignTop();
afx_msg void OnUpdateFormatAlignTop(CCmdUI* pCmdUI);
afx_msg void OnFormatAlignBottom();
afx_msg void OnUpdateFormatAlignBottom(CCmdUI* pCmdUI);

You can see there is a handler and an update handler that determines if it is possible that handler to be enable or not. In our case, it will enabled only if there is an active selection of objects. Look at the code:

void CModeler1View::OnFormatAlignLeft()
{
    GetManager()->AlignLeft(this);
}

void CModeler1View::OnUpdateFormatAlignLeft(CCmdUI* pCmdUI)
{
    pCmdUI->Enable(GetManager()->HasSelection());
}

void CModeler1View::OnFormatAlignRight()
{
    GetManager()->AlignRight(this);
}

void CModeler1View::OnUpdateFormatAlignRight(CCmdUI* pCmdUI)
{
    pCmdUI->Enable(GetManager()->HasSelection());
}

void CModeler1View::OnFormatAlignTop()
{
    GetManager()->AlignTop(this);
}

void CModeler1View::OnUpdateFormatAlignTop(CCmdUI* pCmdUI)
{
    pCmdUI->Enable(GetManager()->HasSelection());
}

void CModeler1View::OnFormatAlignBottom()
{
    GetManager()->AlignBottom(this);
}

void CModeler1View::OnUpdateFormatAlignBottom(CCmdUI* pCmdUI)
{
    pCmdUI->Enable(GetManager()->HasSelection());
}

Here is the code for AlignLeft() routine:

void CElementManager::AlignLeft(CModeler1View* pView)
{
 if (HasSelection())
 {
  shared_ptr<CElement> pElementBase = m_selection.m_objects[0];

  for (vector<std::shared_ptr<CElement>>::const_iterator itSel = m_selection.m_objects.begin(); itSel != m_selection.m_objects.end(); itSel++)
  {
    std::shared_ptr<CElement> pObj = *itSel;

    int width = pObj->m_rect.Width();
    pObj->m_rect.left = pElementBase->m_rect.left;
    pObj->m_rect.right = pObj->m_rect.left + width;
    pObj->m_point = pObj->m_rect.TopLeft();
    InvalObj(pView, pObj);
   }

  pView->GetDocument()->SetModifiedFlag();
 }
}

When a selection is made, you can align objects ! It works !

ulnt_1

 

 

How to become a Windows Expert ?

This article is the continuation of How to become a Microsoft Expert? (http://netazurerangers.com/blog/comment-devenir-un-expert-microsoft/)

Windows has been Microsoft’s technological flagship for 25 years. You will tell me, yes but now there is Azure. OK but what is Azure? It is ; if I ignore the Linux part; Windows Server and Service Fabric… and that’s Windows. It’s C / C ++. And yes, again! There is no secret. it must work quickly and well. It must be reliable, robust, fast and secure.

In one of my last post “C ++ unsafe and unsecure?” (http://netazurerangers.com/blog/c-unsafe-et-unsecure/), I explain why C / C ++ is the best and why Microsoft is doing 95% of its products with. Microsoft is the # 1 company in the software industry. It’s not an advertising agency like Google or Facebook, it’s pure juice Tech. Microsoft sells Products and Services. Anyway next…

How to become a Windows expert? The question is asked. First, we learn about the operating system principles via Microsoft Docs (ex: MSDN LIbrary) on https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/overview-of-windows -components

Then, we read the passage on User mode and Kernel mode via https://docs.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/user-mode-and-kernel-mode

From there, we know the basic architecture of Windows. now we attack the elements on the operating system, namely the kernel and the thread scheduler. Windows order threads, Linux order processes. These two systems do not work the same way. The Processes & Threads doc is here: https://docs.microsoft.com/en-us/windows/win32/procthread/about-processes-and-threads

Then we go to practice, how to create a thread, a process, reach the end, etc. the API doc also called reference doc is here: https://docs.microsoft.com/en-us/windows/win32/procthread/process-and-thread-reference

The easiest examples can be viewed via https://docs.microsoft.com/en-us/windows/win32/procthread/process-and-thread-functions#process-and-thread-functions and more specifically the CreateThread function: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createthread?redirectedfrom=MSDN and its example: https://docs.microsoft.com/en-us/windows / win32 / procthread / Creating-threads

To test this, you must install Visual C ++ available in Visual Studio 2019 for example, Community Edition or Pro 30 day trial. If you received money from Santa Claus, buy the following books:

Windows via C / C ++ by Jeffrey Richter and Christophe Nasarre

Windows Internals ex-Inside Windows NT (https://docs.microsoft.com/en-us/sysinternals/learn/windows-internals)

I bought Inside Windows NT in 1992 and got the virus.

Windows is huge. It’s powerful. You read the Windows Internals book and you will have vision; you will understand how the OS works. It’s very interesting and you will have no trouble understanding new Microsoft technologies with that. Microsoft NET, CLR, BCL, it’s done with C ++ and parts of the Windows API aka Win32. Watch the code on GitHub of CoreCLR (https://github.com/dotnet/runtime)

There are urban legends that Microsoft rewrites Windows from scratch; this is for managers and IT 01. For technicians, the truth is that Windows is sitting on the same code and has been evolving for 25 years. The code is improved and regularly revised in Modern C ++. I can certify it because I have the source code of Windows NT 4, Windows 2000 and access to the latest source code of Windows 190x. The code is made in:

C for kernel and drivers
in C / C ++ for the rest.
What is Modern C ++?

automatic memory release with smart points
using the Standard Template Library (STL)
use of C ++ 11/14/17 with auto, lambdas, etc.
Windows uses COM technology a lot. A COM component is registered in the registry and is invoked via APIs (https://docs.microsoft.com/en-us/windows/win32/api/_com/)

A COM component is a class with AddRef, Release, QueryInterface and methods:

The COM component is created via CoCreateObject and the COM factory:

For more information on COM components, I made in 200x a translation of some elements of “Inside COM + Base Services”: Apartments | Threads | Apartments types | Threading for In-Proc components | Apartment and languages

For more information on COM, get your hands on Inside COM + Base Services (http://www.windowscpp.com/Books/MSPress-InsideCOMBaseServices.zip) or on docs but on docs, the doc is spartan.

201x saw Microsoft turn to open source so you can find Windows components in open source:

Windows Terminal (https://github.com/microsoft/terminal)
Windows NET CoreCLR (https://github.com/dotnet/runtime)
Do like me, study these two modules and try to contribute in GitHub. And who knows, one day, you may work for Microsoft!

Chick!

Christophe | http://www.christophepichaud.com

My Microsoft’s resolutions for 2020

Friends Softies,

(EMail sent to my old Microsoft coworkers)

Here are my good resolutions for 2020…

Let me make an announcement: I want to work again for Microsoft and more particularly for Corp. It may go through Services before, I don’t know, but I’m working on it. As I told my friends Alain and the zErics, working at Microsoft was a dream but it stopped suddenly. I would not go back on this episode and the reasons for this stop, the page is turned.
Since I’m an MVP, I’ve had access to a lot of things and it’s great. Microsoft is the number 1 software company, there’s no question about it. You are working on it and you know it. This company is magnificent, the products are nickel and especially the technology is fantastic. Who doesn’t have a passion for an SDK or a product? Our job is made of passion, laughter and tears. Today’s failures will be tomorrow’s successes.

When I read Windows code, it’s complex but it’s beautiful. C ++ code contains something that other languages ​​do not have. The Microsoft style based on COM is very special. The mix between Windows types (COM strings, VARIANT, UINT, DWORD, UNICODE LPWSTR, wchar_t and char *) and C ++ types (wstring and string) means that the code is made with several styles. We find the business code mostly made in COM components or in C ++ ISO code and the specific glue in Win32 API. Don Box said “COM is love”. That is true. A coclass of a COM component is a C ++ class. We have a class in shared_ptr mode, an ambiguous AddRef ctor, an ambiguous Release dtor, a QueryInterface cast to obtain the different interfaces (a C ++ class can implement several interfaces and can inherit from several classes unlike C # which can only inherit from d ‘only one class).

In the Windows Terminal code, there is for example the WinUI code of the frame (tabbed and Window and popup menu and menu) written in pure Windows API and XAML Islands, the code of the cmd with its char buffer engine, its interpreter and the code Ancestral Windows rewritten in modern C ++. The code is improved. It’s like a good Burgundy, it gets better over time. The C ++ 98/03 code is improved in C ++ 11/14 code and gradually this Modern C ++ makes the code nickel, it is beautiful! For example, I made a contribution with PR (pull-request accepted on June 19, 2019 https://github.com/microsoft/terminal/pull/1161) which consisted of putting a shared_ptr on a raw pointer and doing the plumbing that goes with it to play with a reference behind. The memory is released automatically via the smart pointer. It’s beautiful. There is plenty of TODO and FIXME in the code to improve the Windows legacy code. I saw that it has been 4 years since the CMD code has been refactored and improved. It may be my memory that betrays me but I think that’s it; seen in code comments. You don’t realize the power of Windows tools. The GitHub code archive for Windows Terminal (https://github.com/microsoft/terminal) alone is 9.3 MB. There are 6.3 MB of .h and .cpp files. It’s not bad already. Huge for a single individual to understand. CMD is a complex tool that goes beyond a simple dir c: \! It’s a pillar of Windows. Our system admins know this. I intend to continue to invest a little more on Windows Terminal because it is exciting. This is my first resolution.

Then there is the CoreCLR (https://github.com/dotnet/runtime) which is the NET runtime. There I put myself thoroughly because it is a part of my future that is playing on it. I will learn and potash the beast to understand how it works. The archive is 99MB and unzipped is 777MB. It’s huge but good, there are unit tests & co but good C ++ code is about 76MB in size without the tests. Suffice to say that this is huge from huge. OK Windows is 1 GB of source code but we are just talking about the Windows \ NET Framework folder mscoree.dll and company… with the DLLs of the BCL system.xxx. & co. I have 3 months to navigate, explore and understand the code. This is my second resolution. Then I try the Isue … I have to find something easy at first, a FIXME or TODO basic to get into it.

Then there is the Windows code via the NDA Shared Source Initiative and there it is my regular favorite: read the Windows source code. For those who do not know C ++, this is the opportunity to get started. Buy my book “C ++ Aide-Mémoire” and ask for access to the Windows source code and admire the quality of the Windows Engineers code. I have a lot of respect for Windows code. Since I got my hands on the Windows NT4 and Windows 2000 leak (2 GB of source code) in the years 2000/2002, I have spent many hours studying this code. The kernel, RTL NTUser & co dlls, Shell, File Explorer. This is a Star Wars novel in 350 Volumes. It’s beautiful. It’s complex but at the same time subtle and organized. Damn, it’s good! That’s why I have so much admiration for Bill Gates. Windows is a flagship of technology. OK sometimes it’s good old C / C ++ but it works fast and well.

When I discovered Windows Internals (7th edition Part 16th Edition Part 16th Edition Part 2) in the 2000s, I saw the virgin because it helped me understand Windows sources then when I discovered Windows Protocols (https://docs.microsoft.com/en-us/openspecs/protocols/ ms-protocolslp / 9a3ae8a2-02e5-4d05-874a-b3551405d8f9), that was the grail. When I was at Services in 2017, I was surprised, people don’t know that. The culture of the NET means that people are very little cultivated on Windows while it is the flagship of the company. OK, now there is Azure but hey Azure is Windows Server and Service Fabric and all that is Windows. I ignore the Linux part … Each Microsoftie should be offered to deliver Windows Internals for its arrival in the company!

In short you will understand, my goal is to work for Corp. I’m working on it. Being blacklisted at Services France, I will find a way to get out of it via GitHub and my relationships with the Visual C ++ team in the US. My friend Simon Brand is a good C ++ advocate and yet lives in Edinburg, UK. France is very special … C ++ is limited. The companies for Services make, for the development with Microsoft Technologies, C # / NET.

Happy New Year to all the girlfriends.

Kisses to my mentor EricV. Kisses to EricMitt. Kisses to Alain.

Kisses to Agnes, my HEXV2 Project Director of OBS in 2006…. We got on well with GGray, PCP, Nicolas. I’m still in touch with the ex-OBS colleagues for whom we had to replace their Linux system (700,000) BAL POP / IMAP with Exchange Server via HMC… We meet regularly over a beer with Gael Roualland, the little genius from OBS who gave us a hard time and his friends at the time. Since I also switched to Debian Linux and Ubuntu (C ++ requires), they accept me but chamber me by saying that Microsoft is my best enemy so I love you either. They tell me to dump everything on builder than on Linux and that I would be more successful than with Microsoft … I disagree. 25 years of C ++ Microsoft, it does not give up, on the contrary, it is currency. And when you love, you don’t count your efforts.

Christophe | www.christophepichaud.com

C++ unsafe and unsecure ?

My colleagues in the Microsoft world and others tell me that C ++ is outdated, too difficult, too old, too hard to master and there are even some who tell me that it is unsafe and unsecure!

I laugh.

If C ++ had all of these flaws, Microsoft wouldn’t make 95% of these products with it. I’m going to come back to unsafe and unsecure because it’s very interesting. But before a reminder: EVERYTHING YOU HAVE ON YOUR PC AND MAC IS DONE IN C ++. Windows, Office (Word, Excel, PowerPoint, Outlook), IE, Chrome, VLC, Notepad ++, Calc, MSPaint, Photoshop, File Explorer, Process Explorer, etc…

To sell .NET Marketing has tried to discredit C ++ because it is too rich, too powerful and does not need advertising or marketing. In the 2000s, marketing tried to sell the idea that a language that manipulates memory finely is likely to crash and that the panacea was the Garbage Collector. This reasoning is an intellectual scam.

Just because a language like C or C ++ allows you to manipulate memory finely to the byte does not mean that it crashes or corrupt memory. Marketing, which is a contingent of people coming out of business schools, knows nothing about the technique and therefore these people are making crude short cuts. It must be said.

For those who are curious, the NET or CLR (Common Language Runtime) virtual machine is made in C ++ so here, the loop is complete. If C ++ was that bad, CLR would not be done in C ++. The garbage collector and the JIT either! The problem is that NET has to fight against an opponent that was there before it, namely Java and that the competition is raging. Java is much more established in companies than NET and that in spite of billions invested in marketing and publicity.

So I ask the question: was trying to discredit C ++ a good way to sell NET to the developer world? I do not believe. C ++ is ISO standardized and has millions of developers. The C ++ language does not need advertising, it is the language of industry, medical, software publishing, games, etc. C ++ has been there for 40 years and has undergone extensive renewal. It’s no longer C ++ at Papa, the famous C ++ 98 or C + 03. We moved to Modern C ++, the one that frees memory automatically via intelligent pointers or smart pointers, that of lambdas, that of move semantic. Marketing doesn’t talk about it, of course… Marketing isn’t mathematics, it’s not scientific and that’s why we should be wary of it.

In the field of software design, you should never believe in marketing and always rely on scientific reasoning. You have to test the technologies and make your own opinion and always be factual.

I have access to the Windows source code and everything is done in C / C ++. It’s modern C ++ and it’s clean. Windows will always be written in C ++.

The last news of the moment is to push Rust as a kernel language to solve memory problems. This is a false debate because the kernel includes a Memory Manager (mm) which manages virtual memory and only C ++ can write such a module. Some researchers have no knowledge of operating systems and are trying to make the buzz around Rust with a marketing approach … that’s it, they are setting the scene. Let them speak, Microsoft will never rewrite Windows in Rust. There are millions of lines of code. And contrary to what newspapers say for managers like 01 Informatique, Microsoft does not rewrite the OS from scratch. That would be known. Microsoft has been evolving Windows for 25 years. And it’s C ++. No offense to Marketing.

Large software is made in C ++. Another Nth example? Chrome and NodeJS. We cannot salute the JavaScript revolution without thinking of C ++. NodeJS is pure C ++ and Chrome too. Microsoft has made it its new browser with Chromium. Chrome is browser-based software that powers billions of computers and is fast, reliable, and powerful. Long live C ++!

C ++ RENAISSANCE

POWER AND PERFORMANCE

“THE WORLD IS BUILT ON C ++”, Herb Sutter.

Send me your comments on my email: christophep@cpixxi.com.

Visual Studio Online Test

I have tested C# compilation under VS Online.

This kind of paid products is not for me. As a developer, I build on a local machine and I want to be offline and not always connected. More, I don’t want to pay for and IDE and a free compiler.

MVP Wall at Microsoft Ignite 2019

My name is on the wall… Thanks Estelle Auberix !

Microsoft’s UI development model

The future of graphic world (UI) at Microsoft is called WinUI. WinUI are the XAML controls of Windows 10. They’re made of C/C++.

Windows 10 makes extensive use of them and offers them (finally) full access to everyone: NET, C++, Win32.

Microsoft is committed to C++. Windows too. Microsoft makes its software in C/C++ because It’s fast and efficient. Do you understand my innuendo? On the Microsoft site, if you are looking to do software development, you are referred to .NET by default. I ask the question: but why?

Microsoft doesn’t. Why would I? Microsoft is no longer in dog-fooding as before. There is an internal discourse and an external discourse.

Internally, there is no debate, we do almost everything (90%) C/C++. Windows, Office, Edge, etc.

Externally, we only promote .NET, the web, JS/TS, Angular and python!

Where I laugh is that Microsoft evangelists who spend their time taking pictures of their hamburger meal on twitter know nothing about the native world and there is a problem for example, on WinUI. There is no one left to explain the real Microsoft, the one from the inside.

On WinUI, you have to promote XAML Islands, Controls in C++ and how to explain how to mix it with MFC and Win32 controls for example. Result: nothing. There’s no one who knows how to do it.

As an MVP, I’m going to focus on that. but it’s not normal for Microsoft not to fulfill its share of Learning.

Sometimes I have discussions with developers who think that Windows is made in C#???? WTF! The level of knowledge of the Microsoft company is leveled from the bottom. .NET architects believe that desktop graphics interfaces should be made in WPF. Oh, yes? Why doesn’t Microsoft do it then?

The future is C++ and .NET Core. It’s not ony .NET and C#. NET and its CLR is powered by C++.

Multiplatform development with C++

To develop multi-platform applications, there are not fifty possible choices, there is only one that is free and efficient: it’s C++.

Only the C/C++ can take advantage of the latest developments in Windows, Linux, Android and iOS SDKs because the system and its environment are made with it. The advantage of C++ is that it ‘builds on the metal’: there is no faster. It takes advantage of the software architecture of the operating and hardware systems of the latest x86, x64 and ARM processors. For forty years, C++code optimizers have guaranteed the best possible quality of code.

C, It’s the new assembler. C++, It allows the object oriented: abstractions, inheritance and polymorphism (virtual functions), overload of operators, templates. With its STL (Standard Template Library) bookstore and in conjunction with a bookstore such as Boost (boost.org), the C++ a-has a universal toolbox that handles strings, containers (collections), algorithms, I/O, threads, smart pointers, communications, etc.

Take the plunge. Install Visual C++ Windows, GCC Linux, XCode on Mac and share business code. Make rich graphical interfaces and take advantage of the best development language that’s C++.

You will tell me there are hybrid solutions like NET or Java? These solutions are a set of thousands of heavy, slow sheets that do not create world-class applications. In cars, there are Fiat 500s and Ferraris. At the same price (see cheaper), what do you take? There’s no photo…

Article for Programmez November 2019

In Issue n°234 or French magazine Programmez for November 2019, I have written an article about How to become a Microsoft Technical Expert.

Article for Programmez October 2019

In the N°233 Issue of Programmez magazine, I have written a technical article about Windows Subsystem for LInux v2 (WSL2).

How to become a Microsoft Expert ?

Through the exchanges I have with my students at THE ESGI or on the forums, the question that often comes up is “how do you become a Microsoft Expert?”. Indeed, the stack of products and technologies is so wide that we do not know where to…

I will give you my opinion and it only hires me, neither Microsoft nor my employer.

For starters there are fundamentals: an expert is not a marabout. He doesn’t read in crystal balls but books. This could be the conclusion of this article…!

Tip 1: Read, read everything, be greedy, be voracious. Whether you are a bachelor, a bachelor’s degree, a master’s degree and even an engineer. You’re lucky, the technical works all exist in PDF format and are easily accessible live (I never said you had to go on allitebooks.com but the idea is there) or on torrents … Use the “try before buy” Pattern: if you like a book, you buy it.

In the Azure, Windows world, there are many free books at Microsoft Press: see https://blogs.msdn.microsoft.com/microsoft_press/tag/ebooks/ Look for example at the following books:

.NET microservices: Download .PDF
Docker – Microsoft: Download
Enterprise Application with Xamarin Forms: Download
The ideal is to know how to create an application architecture that looks like this:

The PDF on microservices explains this. From there, you are up to date with the latest technologies because the eShopOnContainers sample solution implements ASP.NET MVC, Docker, Azure, back-end, C- , SQL Server, cache and NoSQL, etc. The code source of the solution is available on Github: https://github.com/dotnet-architecture/eShopOnContainers/

The step can always be raised to be crossed at once. First, we have to start on a good footing.

Tip 2: Read the Windows V2 Architecture Guide; download here: http://windowscpp.com/Books/AppArchGuideV2.pdf. This guide will explain the principles of architecture to achieve a good solution and a good application design. Here is the classic diagram of a layered application:

The C-language is one of the fundamentals. That is the basis of development. There are many specialized books such as:
– C 5 in a Nutshell
– C 7 Pocket Reference
– Pro C 7
– The C-Programmer’s Study Guide (MCSD)

Tip 3: If you want to be a true .NET development pro, there’s a reference book at Microsoft Press: CLR by C. It’s the Bible. Buy. He explains everything on .NET: BCL, JIT, garbage collector, CLR, etc.

Tip 4: Pass certifications. Start with something simple: 70-483 Programming C. Then choose your course. Web, Mobile, Azure. Your choice.

Then there are no secrets: you have to practice. Microsoft makes free editions of Visual Studio 2019 available with a Windows SDK, SQL Server is also available for download or Docker image, and Windows 10 provides IIS. In short, you have everything to become a Microsoft development pro.

Will you be an Expert? I don’t know, but in any case, I’ll give you all the information to do it. To be an expert it takes between 5 and 10 years of experience and practice on a daily basis; not before.

MVP Tip: Read Windows Internals. Don’t forget that the jewel is Windows…

And Windows is made of C/C so read too: Windows via C/C

Microsoft makes all of these products in 95% C/C so if you’re curious (real experts are), find out about Windows SDK and Win32’s C/C development. Windows, Office, SQL Server, Windows Server, Chrome, VLC: everything you have on your PC is done in C/C; Don’t forget it!

Disclaimer: The links given for the download here are given as an indication and does not commit to piracy but to “try before buy”. If you like a book, buy it!

Stupid coding games recruitment tests

Do you know the technical tests that companies take before recruiting a candidate for services? It’s to cry, I explain … In addition to providing a CV that holds the road, certifications, now fashion is to make you pass tests in the form of games. The problem is that it favors the competition animals and it does not demonstrate anything: I explain.

You are asked trick questions about language (C, C, Java, Javascript), and then there are exercises to perform.

Example: a Node structure – left, right, value – must be crossed. Make the Find feature that finds value in a Node tree. OK for that. It’s a recursive function, we have to manage the null, nothing to say. Don’t show anything.

Example: you have to return the change. There are 10-, five-, 2-pieces. How to make Struct [b10, b5, P2 – RenderLaMonnaie (int value)? It is a question of making transactions divided, multiplied and subtracted to get the tickets and the rest in cash … Nothing too complicated. Don’t show anything.

So far, I don’t think that proves anything. 10 lines of code to make. It doesn’t mean anything. Each time, it’s 20 or 30 minutes to complete the exercise. Delusional.

Next exercise: In an int[] ar table – 1.2,3,4,5,7,7,8,9,10.11 .. 98.99, you must add up the items one by one and following a bogus rule, keep only certain results in a result table. Beast and villain. Don’t show anything.

Next exercise: The function int VaDeDroiteàGauche (int value) materializes a dance. Once we take a step to the right, once we take two steps to the left. We start at 0, on the right it’s 1 2 3 4 5 and on the left it’s 61 -2 -3 -4 -5. Code the function VadeRight to Left (int) a returns an int. that’s the kind of thing that’s used for that slab and that’s taken from cabbage. That’s the essence of these crap tests, taking cabbage on screwed-up algorithms that serve no purpose. We’re asking the candidate to code something that’s useless!

Next exercise: we have a collection of orders – customer-name, price -. You have to make a LINQ query to find the customer-name so the orders are over x. Just make a where, then iterate via a foreach on the collection to create an intermediate collection of string… Possibly valid to find out if the candidate knows LINQ. But hey does not show anything, too simple.

Don’t move, I have 20 in stock.

For those who have an internet connection, they do technical tests, search the web; This is allowed as well as dev environments!; and it will come across Github rests that contain the solutions… Suffice to say that the candidates don’t get in the way.

I have complied for various reasons for these tests and I have average grades. It’s not my thing. It doesn’t make me want to.

On the other hand, the customer I can give him for his money: Show your code, and I do the audit live in 1:30 on your code at 1,500 euros a day as if you had called Microsoft. I’m sure you’re going to be more interested than phony algos, right? And then we could see if your code is well done and start apprehending a serious relationship or Else I could realize that your solution is “rotten” and that I do not want to waste my time on it despite you going to sell it to me telling me we are f Microsoft ull! I could explain to you scenarios of Architecture that you have not thought of, what to rewrite, what to keep, what to throw away. Wouldn’t that be more relevant?

Ask me some serious questions? Example: how to migrate a legacy solution to OOP? How do I rewrite an app or wear it on Azure? How do I migrate a VB6 app to .NET? How do I migrate a client-server application to .NET? Now I could talk to you about it for hours! I have dozens of certifications so it’s as if someone who has a master’s degree in finance, you ask him how much is 2’2? I’m not answering and I’m doing the next question, just to piss you off and show my displeasure! If I pass Microsoft certifications at 150 degrees each and that requires me weeks of preparations, it’s not to get me crunched by bogus tests. Niet.

In the last test that was forced to do, I had 8/100 and 13/100, the worst score of all the candidates. Not even scared. When the stupid test, I despise. I’m MCSD certified, MCAD.NET, MCSD.NET, MCTS.NET, Windows Expert and Contributor, MVP Developer Technologies so if you don’t want to waste time seriously just talking with bogus tests, we won’t do business together. Too bad for you.

Real-life Technical Interview – No bullshit

Here’s the kind of thing I approach with a client to earn his trust and show him that I could be useful to him…

How do I migrate a procedural legacy application to OOP (Object Oriented Programming)? The techniques, the choices…

How do I migrate a client-server legacy application to .NET based on REST web-services or micro-services?

You have a huge IT solution with multiple technologies from the Microsoft stack (time makes its law). We need to update everything. You don’t have the time or the budget to rewrite everything. How do you do it?

I have an IT solution of 4,000,000 lines of code. You have to audit the solution and give me an axis. We keep, we throw, we factor, we reorient, we do what ??? How do you do it: give me leads?

I own ASP.NET Forms, ASP.NET MVC (several versions), VB.NET, WinForms, WPF, there are everywhere, what should I keep? How do I get by with Microsoft technologies?

I want to switch from Oracle to SQL Server for cost reasons. . How do I do that? Best practices?

I want to migrate a set of applications to Azure, how do I do it? Where to start?

Can I do an audit of your IS just looking at your code in an hour and a half? Way microsoft audits at 2,000 euros a day. Do you like it? Ok let’s go…

These are real complex questions that you won’t find answered on StackOverflow. It’s more serious than coding games and its bogus tests whose solution is on any search engine…

My favorite tasks for customers

You have an IT solution with 4.000.000 lines of code. You want an audit ? What need to be rewritten, cut, reorganized. Want some ideas ? I can give you ideas with one hour !

You want to migrate your legacy apps into a modern Microsoft solution ?

You want to put some deprecated stuff on Docker, reorganize some others stuff ?

You need to look at a large amount of various source code ? You are lost with your source code, I can help !

You have old Microsoft technologies, ASP.NET Forms, various ASP.NEt MVC appz, WinForms or WPF APps, C++ Win32 or MFC Appz and you want to stay on the edge ? Call me !

My C++ Book

In January 2020, I will have finished my Book “Aide-mémoire C++“.

It’s a medium size book (300 pages) for students, engineers and professionals about C++17 and STL.

It covers the language, the C++17 features and the STL.

Article for Programmez September 2019 Issue

In September, I write about Docker. It’s an introduction Level 100. Easy to read and understand.

From the past…

I have played with GIMP and MSPaint… to reconstruct my blue badge.

Alumni_Badge