Quantcast
Channel: Jacob Carpenter's Weblog
Browsing all 10 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

PC#1: A solution

So, when I initially posed the programming challenge #1 I stated: … since I intended to output HTML, ASP.NET seemed a logical choice. But I was amazed at the amount of code required for such a...

View Article



Image may be NSFW.
Clik here to view.

C# abuse of the day: SwitchOnType

Today I encountered a situation where I wanted to switch based on a type. Maybe I stayed up a little too late reading Foundations of F#, last night. While this is certainly no pattern matching, it...

View Article

Image may be NSFW.
Clik here to view.

Hello, world!

Jonas Adam Carpenter; born June 4th @ 6 lbs. 3 oz., 19 in. (Sorry for the entirely non-technical post. I’ll be blogging more C# again, soon.)

View Article

Image may be NSFW.
Clik here to view.

.Any overload

Nice: if (folderPaths.Any(path => !Directory.Exists(path))) throw new DirectoryNotFoundException(); Nicer: string pathNotFound; if (folderPaths.Any(path => !Directory.Exists(path), out...

View Article

Image may be NSFW.
Clik here to view.

Strange Framework design decision of the day…

Today I encountered the strangest .NET Framework design decision I’ve seen in recent times: HashSet<T>’s GetEnumerator method returns a public struct HashSet<T>.Enumerator. Let’s count how...

View Article


Image may be NSFW.
Clik here to view.

C# reminder of the day

Static data is not shared among constructed generic types. That is, the final line of output from the following program: using System; class Program { static void Main() { NonGeneric.PrintCount(); //...

View Article

Image may be NSFW.
Clik here to view.

C# compiler eccentricity of the day: throwing lambda

Here at work (gratuitous link; oh yeah, and we’re hiring), we have a Verify helper class. Verify lets you succinctly validate (or verify, if you will) various method invariants. For instance,...

View Article

Image may be NSFW.
Clik here to view.

Google Reader Tip

Sorry to break a long hiatus with such a lame, non-programming post. But, here’s a tip for Google Reader users: A coworker of mine appears in my google talk list, but was not able to see my shared...

View Article


Image may be NSFW.
Clik here to view.

Reading large xml files

I’m a huge fan of System.Xml.Linq or “LINQ to XML”. However, some documents really are just too large to efficiently process with an in-memory representation like XDocument. For such documents, we need...

View Article


Image may be NSFW.
Clik here to view.

Hello Roslyn

using System; using Roslyn.Compilers.CSharp; namespace HelloRoslyn { class Program { static void Main() { string program = Syntax.CompilationUnit( usings: Syntax.List(Syntax.UsingDirective(name:...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images