The Wiert Corner – irregular stream of stuff

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

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

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

    Join 1,750 other followers

Archive for the ‘C#’ Category

Anders Hejlsberg on Modern Compiler Construction | Seth Juarez | Channel 9

Posted by jpluimers on 2017/05/18

One of those “must watch” videos if you are remotely or more interested in how compilers influence our day to day coding activities.

The Red Dragon Book, first edition: Compilers. Principles, Techniques and Tools.

The Red Dragon Book, first edition: Compilers. Principles, Techniques and Tools.

It starts out with referring to the Dragon Book (well, actually the first edition of the Red Dragon Book, as there are three) describing the compilers as having front-ends consisting of a Lexer, Parser and Type Checker and back-ends consisting of Code Generator and Emitter. A full compilation is going through all five stages and there is an increasing cost using these traditional stages when going from syntax highlighting via collapsible regions to red squiggles and code completion will need to go further along those stages taking an increasing time – like seconds or even longer – whereas the user experience requires responses in ~ 100 milliseconds where his code might not even compile in the first place.

Then Anders goes on describing Roslyn, TypeScript and Compiler API JSON interfaces to them so you can run them as a service and keep compiler state, rebuilding just enough of the state on source code changes. He goes on talking about how Visual Studio, Visual Studio Code, Command-Line Compiler, Sublime Text and other tools (can) use these APIs to interact with the compiler so it keeps state of slowly evolving code of which the tools than can emit what they need.

Anders explains this much better and much more visually than I do: so it’s a highly recommended video.

Read the rest of this entry »

Posted in .NET, C#, Delphi, Development, Software Development | 2 Comments »

How to secure memory? – Medo’s Home Page

Posted by jpluimers on 2017/03/15

Sometime you might want to protect your data in memory – the greatest example is when dealing with anything related to passwords. It is simply not smart to keep that data around in a plain-text. In .NET there are multiple methods you can use for this purpose, starting with SecureString, ProtectedMemory, and my favorite ProtectedData.…

Source: How to secure memory? – Medo’s Home Page

via: Found this via +Ilya S a post from +Josip Medved – Stuff like this should be way built into an OS, and RTL’s should have a secureMalloc()… – Joe C. Hecht – Google+

–jeroen

 

Posted in .NET, .NET 4.0, .NET 4.5, C#, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Software Development | Leave a Comment »

An exponential back-off implementation I used somewhere; probably room for improvement, but it works good enough.

Posted by jpluimers on 2017/01/17

I will probably need this again somewhere in the future: An exponential back-off implementation I used somewhere; probably room for improvement, but it works good enough.

It’s Delphi, but I’ve not seen practical implementations in C# either.

(the updated version thanks to Anders Melander).

–jeroen

Posted in .NET, C#, Delphi, Development, Software Development | 5 Comments »

.NET/C# some links on querying the ActiveDirectory

Posted by jpluimers on 2016/12/15

Without dsquery installable, I had to query an ActiveDirectory spanning two domains.

Here are some links that helped:

–jeroen

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Software Development | Leave a Comment »

Unity IoC container: tips, tricks and dirty hacks

Posted by jpluimers on 2016/11/03

The #Fellows | Unity IoC container: tips, tricks and dirty hacks post is a very readable and to-the-point introduction to Unity IoC focussing on Dependency Injection. Implementation details of various IoC/DI frameworks differ, so some keywords:

  • Container
  • InjectionConstructor
  • InjectionProperty
  • Inversion of Control
  • Named registration (or keyed registration)
  • PerResolveLifetimeManager
  • Register
  • RegisterType
  • Resolve
  • ResolvedParameter

–jeroen

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Software Development | Leave a Comment »

 
%d bloggers like this: