Friday, October 28, 2005

C? on Wikipedia.
Another C? page at MS research.

An Overview of C?

Integrating XML into Popular Programming Languages

Dare Obasanjo
Microsoft Corporation

January 13, 2005

Summary: Dare Obasanjo covers the C? programming language created by Microsoft Research by augmenting C# with constructs to make it better at processing information, such as XML and relational data. (18 printed pages)

Design by Contract Framework for .NET

This class library provides a Design by Contract framework for use in .NET projects. A Visual Basic .NET version is also included in the download but the following discussion is in C#. In both cases the library can be used by a .NET client written in any .NET language. (Though if the VB.NET version is used IntelliSense code comments will not be visible in the client application.)

"Design by Contract" is a method made famous by Bertrand Meyer in the Eiffel programming language where support is built right into the language constructs.

See Chapter 11 of Object-Oriented Software Construction - 2nd Edition (Prentice Hall, 1997) by Bertrand Meyer and Building Bug-free O-O Software: An Introduction to Design by Contract.

From Lambda the Ultimate:

An Overview of the Singularity Project

Singularity is a research project in Microsoft Research that started with the question: what would a software platform look like if it was designed from scratch with the primary goal of dependability? Singularity is working to answer this question by building on advances in programming languages and tools to develop a new system architecture and operating system (named Singularity), with the aim of producing a more robust and dependable software platform. Singularity demonstrates the practicality of new technologies and architectural decisions, which should lead to the construction of more robust and dependable systems...
Singularity... starts from a premise of language safety and builds a system architecture that supports and enhances the language guarantees.

An interesting overview of what sounds like an intersting project.

The choice of implementation language is also interesting:

Singularity is written in Sing#, which is an extension to the Spec# language developed in Microsoft Research. Spec# itself is an extension to Microsoft’s C# language that provides constructs (pre- and post-conditions and object invariants) for specifying program behavior. Specifications can be statically verified by the Boogie verifier or checked by compiler-inserted run-time tests. Sing# extends this language with support for channels and low-level constructs necessary for system code....integrating a feature into a language allows more aspects of a program to be verified. Singularity’s constructs allow communication to be statically verified.

An interesting aspect is the support for meta-programming, which is implemented in an unusal manner:

Compile-time reflection (CTR) is a partial substitute for the CLR’s full reflection capability. CTR is similar to techniques such as macros, binary code rewriting, aspects, meta-programming, and multi-stage languages. The basic idea is that programs may contain place-holder elements (classes, methods, fields, etc.) that are subsequently expanded by a generator.

Many other intersting design decisions are discussed in the paper (e.g., various DbC facilities), so do check it out.

Tuesday, August 30, 2005

Some links from the Code Project:

ASP Code Analyzer - A simple tool to find unused subs, functions and variables in your ASP code.

DHTML Tree View of Arbitrary Depth using AJAX

Automated Document conversion with OpenOffice

A word-wise Html text compare and merge engine - C#.net implementation of html text compare and merge engine based on similar algorithm as unix diff

.NET Scheduled Timer - A timer that easily supports absolute schedules like run at 4:00 AM every day or at 5:00 PM on Fridays.

A Fast CSV Reader - A reader that provides fast, non-cached, forward-only access to CSV data.

Sunday, October 24, 2004

From MSDN Library:
Monitor Synchronization Technology Sample -- This sample demonstrates how to use the Monitor class for thread synchronization. The Monitor type's static functions are used to enforce mutually exclusive access to a protected block of code.

Readme Location

For more information, see the Readme file at <SDK>v1.1\Samples\Technologies\Threading\MonitorSynchronization

Concepts Presented in This Sample

thread synchronization, samples; Monitor class, samples; AutoResetEvent class, samples; Interlocked class, samples; Threading namespace, samples; ThreadPool class, samples; WaitCallback class, samples; Thread class, samples; delegates, samples; ThreadStart delegate, samples; threads, samples; Delegate class, samples

Communicating Sequential Processes, or CSP, is a language for describing patterns of interaction. It is supported by an elegant, mathematical theory, a set of proof tools, and an extensive literature. The book Communicating Sequential Processes was first published in 1985 by Prentice Hall International (who have kindly released the copyright); it is an excellent introduction to the language, and also to the mathematical theory.
From this Wikipedia page: Communicating sequential processes

Friday, October 22, 2004

Working With Events Over Remoting by Russ Nemhauser: Subscribing to events of objects instantiated via remoting can be a tricky business. However, it is possible to build solid event publish/subscribe applications while using remoting simply by applying a few extra strategies then might not seem immediately obvious. Throughout the document, I will refer to the process that exposes the object for remoting as server and the process that instantiates an instance (local proxy) of a remote object as client. However, all of these processes may in deed take place on the same machine.
Murphy's Law calculator

.NET Remoting FAQ -- includes Changes for Remoting in .NET Framework 1.1 / Visual Studio 2003: Adjusting the typeFilterLevel to enable events, delegates and client-activated objects

Sunday, October 10, 2004

Learning Classifier Systems Software
Scientists Define Murphy's Law - things don't just go wrong, they do so at the most annoying moment.The formula, ((U+C+I) x (10-S))/20 x A x 1/(1-sin(F/10)), indicates that to beat Murphy's Law (a.k.a. Sod's Law) you need to change one of the parameter: U for urgency, C for complexity, I for importance, S for skill, F for frequency and A for aggravation.

Or in the researchers' own words: "If you haven't got the skill to do something important, leave it alone. If something is urgent or complex, find a simple way to do it. If something going wrong will particularly aggravate you, make certain you know how to do it."

Wednesday, August 04, 2004

Free SSH and SCP for Windows 9x, NT, ME, 2000 and XP -- Includes instructions on how to automate SSH logins.

There's also the "snail book" -- SSH: The Secure Shell: The Definitive Guide -- from O'Reilly

Tuesday, July 20, 2004

.NET TOOLS: Ten Must-Have Tools Every Developer Should Download Now

Lutz Roeder's Programming.Net -- lots of cool little programs! Kalok -- see the "Writer" program.

Adventures in Visual Basic .NET -- Take a ride on the Visual Basic .NET Express with Billy Hollis and Rockford Lhotka.

Everyone Into the Pool -- Rocky Lhotka delves into object pooling, a .NET Framework feature that allows you to pre-create a group of objects on the server that are shared by all clients.

Developing the ChalkTalk Sample Application, Part 1
-- very cool. Talks about using multiple forms and transparency to implement a cool drawing app.

Working with Queued Components


Implementing a Background Process in Visual Basic .NET -- Rocky Lhotka recommends and implements a structured framework sample to mediate between the worker threads and the UI thread, simplifying the process of writing multithreaded worker code and a UI to control it. The framework can be modified to suit your application needs; includes a downloadable code sample.

Creating Visual Basic .NET Controls from Scratch -- How to build a visual control from scratch that renders its own interface.