The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,404 other followers

Archive for the ‘.NET’ Category

Why Skylake CPUs Are Sometimes 50% Slower – How Intel Has Broken Existing Code – Alois Kraus

Posted by jpluimers on 2018/08/09

[WayBack] Why Skylake CPUs Are Sometimes 50% Slower – How Intel Has Broken Existing Code – Alois Kraus reports that the PAUSE instruction on Intel Skylake architecture takes an order of magnitude longer than on previous architectures.

This impacts spinlock code in .NET 4.x and .NET Core 2, and likely impacts other spinlock code as well. The .NET core fix gets back-ported to .NET 4.x.

Since Delphi XE, the Delphi RTL code has borrowed ideas from .NET implementing this kind of code, so I filed [WayBack] QualityCentral: 144063 PAUSE instruction on Intel Skylake takes order of magnitude longer: important for SpinWait/SpinLock code (because Google can index it).

It is no coincidence that a Senior Scaleability Engineer at Booking.com mentioned it on his G+ stream ([WayBack] The “Pause” instruction changed timing dramatically in Skylake. Spinlock implementation based on pause will need adjustments. – Kristian Köhntopp – Google+) as changes like this can heavily impact server systems.

–jeroen

via: [WayBack] The “Pause” instruction changed timing dramatically in Skylake. Spinlock implementation based on pause will need adjustments.I hope a fix for this will be back-ported for many Delphi versions. – Jeroen Wiert Pluimers – Google+

Posted in .NET, .NET 4.0, Delphi, Development, Software Development | Leave a Comment »

Pretty printing HTML is the same as formatting code: How do you format code in Visual Studio Code (VSCode) – Stack Overflow

Posted by jpluimers on 2018/07/18

I was looking for a HTML pretty printer (…) but in Visual Studio code, that is called code formatting, which supports many languages out of the box (including HTML) without requiring extensions like Atom.io (see below).

The shortcuts are at [WayBack] How do you format code in Visual Studio Code (VSCode) – Stack Overflow.

For Mac OS X/OS X/MacOS they are (the second one only appears when you have a code selection):

  • document: ShiftOptionF
  • selection: CommandK CommandF

Read the rest of this entry »

Posted in Development, Software Development, Visual Studio and tools, Visual Studio Code | Leave a Comment »

Professional techniques for C# – Lecture Notes Parts 1..4 of 4 – CodeProject

Posted by jpluimers on 2018/07/10

If you’re new to C#, below is a good series of articles to get started.

Even if you’re not so new, there are quite some interesting bits to learn from them:

  1. [WayBackAn advanced introduction to C# – Lecture Notes Part 1 of 4 – CodeProject
    1. Introduction
    2. The right development environment
    3. Basic concepts
    4. Namespaces
    5. Data types and operators
    6. Reference and value types
    7. Control flow
    8. Object-oriented programming
    9. Inheritance and polymorphism
    10. Access modifiers
    11. Properties
    12. The constructor
    13. Abstract classes and interfaces
    14. Exception handling
    15. Outlook
    16. Other Articles in this Series
    17. References
    18. History
  2. [WayBackMastering C# – Lecture Notes Part 2 of 4 – CodeProject
    1. Introduction
    2. Enumerations
    3. Delegates
    4. Auto-generated properties
    5. Generic types
    6. Generic methods
    7. Constraints
    8. Lambda expressions
    9. Anonymous objects & inferring types
    10. Extension methods
    11. LINQ
    12. Windows Forms development
    13. Custom drawing in Windows Forms
    14. Outlook
    15. Other Articles in this Series
    16. References
    17. History
  3. [WayBackAdvanced programming with C# – Lecture Notes Part 3 of 4 – CodeProject
    1. Introduction
    2. Events
    3. The .NET standard event pattern
    4. Reflection
    5. Dynamic Types
    6. Accessing the file system
    7. Streams
    8. Threads
    9. Thread-communication
    10. The Task Parallel Library
    11. Tasks and threads
    12. Awaiting async methods
    13. Outlook
    14. Other Articles in this Series
    15. References
    16. History
  4. [WayBackProfessional techniques for C# – Lecture Notes Part 4 of 4 – CodeProject
    1. Introduction
    2. More control on events
    3. Overloading operators
    4. The yield statement
    5. Iterators
    6. Understanding co- and contra-variance
    7. Using attributes effectively
    8. Elegant binding
    9. Unsafe code
    10. Communication between native and managed code
    11. Effective C#
    12. Outlook
    13. Other Articles in this Series
    14. References
    15. History

 

–jeroen

Posted in C#, Development, Software Development | Leave a Comment »

Visual Studio – Add File As Link

Posted by jpluimers on 2018/07/04

Since I forget where they hid the [WayBack] Visual Studio – Add File As Link feature, two images from the linked post:

  1. The icon in the link is different from the normal file:
  2. Adding as a link is  not a separate menu item, but a modification of the file open dialog overlaying the default Add button with two more options: Add; Add as Link (note Show Previous Versions is a feature of non-Home version of Windows Vista and up).
    Do not double click the file name, as that will add (AND COPY TO THE CURRENT PROJECT DIRECTORY !!!1!!!) that file to your current project.

A step by step instruction is at [WayBack] c# – Add File as a Link on Visual Studio – Debug vs Publish – Stack Overflow.

–jeroen

Posted in .NET, Development, Software Development, Visual Studio and tools | Leave a Comment »

VM disk sizes

Posted by jpluimers on 2018/06/29

I forgot to schedule the post below. It is still relevant if you create a machine with lots of Delphi versions on it.

Read the rest of this entry »

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, Database Development, Delphi, Delphi 2007, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Firebird, InterBase, Power User, Software Development, Windows, Windows 8 | 2 Comments »

 
%d bloggers like this: