Tag: C#
-
Wrapping C APIs in Python
When working in Python, there are times when you have cpu-bound processing and need real threads. This is usually when I reach for C. The interop between the languages is clean, minimal, and fast. I’ll give a quick example. First, the basic problem. How do you compose a C lib into your Python application? Fortunately,…
-
Accepting Invalid SSL Certificates in .NET WCF Clients
There are times when SSL certificates are used to verify identity and to provide TLS and there are cases when only the wire encryption matters. In the later case, I sometimes need to be able handle server certificates that are not valid by SSL’s standard rules. This could be because the cert is not signed…
-
XML Interoperability of Serialized Entities in Java and .NET
Abstract: In order to exchange structured data directly between the platforms, we must be able to easily take the marshalled or serialized definition of the object and turn it into an object in memory. There are standard ways of marshalling of objects to XML in both Java and .NET. I have found it a little…
-
Hacking C#’s Lambda Expressions Into Hash Rockets
As I move between C# and Ruby, I have found my brain’s internal syntax parser always needing to switch gears and repurpose its understanding of Fat Arrow, =>. In Ruby, it provides a visually salient means of expressing key => value pairing within a Hash. C# on the other hand uses it to indicate the…
-
C# Deserves A Better Message Passing API
The structured programming model of C# is decisive and straightforward. There is generally one or only a handful of idiomatically correct ways to facilitate a particular design need. In the case of API design, the language’s conception of access modifiers is fundamental. Exposures of behaviors to client code are controlled by applying public, private, or…