Posts tagged '.NET'

Simplest C# code to post a tweet using OAuth

I recently needed to post tweets programatically and found myself lost in a maze of OAuth and bloated Twitter libraries so decided to see what was the simplest code I could create to post tweets using OAuth.

HTML5 Pong in 20min with C#/Bridge.NET

I had a quick go at creating a simple Pong game using Bridge.NET to run in the browser. It took around 20 min for basic functionality and scoring/countdown timer.

DaChip8JS - My C# Chip-8 Interpreter running in the browser

Using Bridge.NET I was able to easily get my Chip-8 interpreter running in the browser (and working on mobile!)

Building a Chip-8 Interpreter in C#

I'm trying to build a NES emulator but since I've got a little stuck on the rendering code I decided to have a break and try something far simpler first!

Simple Windows utility to act as default browser and launch different browsers based on domain

I created a small utility that you can set as your default web browser in Windows and tell it which (real) browsers to launch for which domains; useful if you have some web apps that only work in one browser.

(Web) Development Sucks, and It's Not Getting Any Better

We can do so much better than the way we're building web applications today, but it doesn't seem like anyone is investing in trying to solve the biggest issues. Here's my ideas about what should be being done.

Is F# Ready for Production?

I'm a huge fan of F#, but now that all the obstacles for introducing it to production codebases are gone; I'm starting to wonder whether right now, it's the right choice to make...

My Favourite Open Source Software

Scott Hanselman suggested that open source software doesn't get enough praise; so I thought it'd be nice to blog a list of my favourites. Some of this is used on a daily basis and important to my work; yet I've never paid a penny for it!

Easily Calling Windows APIs from PowerShell

I received an email asking about more easily calling Windows APIs from PowerShell. I don't know much about calling Windows APIs, but the included samples looked a bit clunky to extend, so I tried to simplify them somewhat.

Useful PowerShell Profile Snippets

Some snippets of code from my PowerShell profile that might be useful to others; including coloured server names for remote PowerShell sessions and launching Visual Studio for thesolutions in the current folder.

Functional Programming Challenge; Words with Indexes

A colleague has also been starting to learn F#, and today gave me a problem he'd been trying to solve in F# in a "functional style". After much head-scratching, here's my attempt so far!

Opt-in Nulls; an F# Feature Worth Switching For?

Unlike C# (and VB.NET); F# has support for non-nullable reference types; and even makes you have to opt-in to them by default. I think this feature is incredibly valuable, and might even be worth considering switching language for!

Thoughts on TypeScript, Dart, and the future of browser-based coding

Had a bit of a discussion on Twitter with Kevin Darty about TypeScript. It started off with this tweet:

Free dependency graph generation using PowerShell and yUML

I don't like the idea of paying for (or installing) a tool to just show me some simple relationships between my Visual Studio projects, but it's something that is pretty useful when trying to tidy up a huge legacy codebase.

Adding Tab-Expansion to Andrew Nurse's PSGet (NuGet Powershell Module)

If you subscribe to my blog or follow me on Twitter you'll probably know I'm quite a fan of NuGet. Recently I was playing around with Andrew Nurse's PSGet module that wraps NuGet.exe for PowerShell (which, by the way, is an awesome idea, and should be added as built-in functionality!). I decided a good way to learn a little more about PowerShell would be to try and add Tab Expansion to PSGet, similar to the functionality in the Visual Studio Package Manager Console.

Extending MarkdownHelper/MarkdownDeep.NET to support Google Code's Prettify Syntax Highlighter

I'm in the process of rewriting my blog in ASP.NET MVC to move it from Google App Engine to AppHarbor. One of the important changes is that all my articles will be stored as Markdown instead of HTML.

Setting up NuGet to Automatically Fetch Packages When Deploying to AppHarbor Without Storing Binaries in Source Control

Over the last few days I've been blogging and tweeting about using NuGet without committing the packages folder to source control. David Ebbo blogged about using a pre-build event to fetch packages at build time.

Formatting PowerShell Objects using the Razor Engine

I've been meaning to look into PowerShell for a while - it's been on an ever-growing list of things I'd like to learn more about. Recently I got around to spending some time with it and decided an interesting way to learn a little would be to create a module that allowed you to format objects using the Razor Engine.


MarkdownHelper on NuGet, using MarkdownDeep

Last month I posted a small HtmlHelper to make transforming Markdown in an ASP.NET MVC application a little easier. Unfortunately, getting it up and running wasn't quite so easy... You had to go and download MarkdownSharp (or copy the code file from the Google Code site) and put it in your project, then copy/paste my code into a file, add the namespace to a Views/Web.config, and blah blah, you gave up already.

Writing Comments in Code is *NOT* a Waste of Time

I was recently discussing the value of comments in code with some colleagues. After the discussion, one of them sent me a link to "Don't Waste Your Time Commenting Source Code" written by Riyad Mammadov.

Windows Phone 7 Part Deux

Update (19th March): I've added some additional info I received at the end of the post.

An ASP.NET MVC HtmlHelper Extension Method for Markdown using MarkdownSharp

Update: I changed from using MarkdownSharp to MarkdownDeep.NET and pushed the helper to NuGet to make it easier to use. Sure, it's only a few lines of code, but this way one command will import the MarkdownDeep.NET library and add the namespace to your views Web.config easily. It'll also make updates much simpler if you use it in many places :-)

Why I'm Close to Giving Up on Windows Phone 7, as a User and a Developer

Jun 2013 Update: I've made the switch to Android. More info can be found here!

(Solved) Intermittent Server."CreateObject Failed" 'ASP 0177 : 8000ffff' Error Creating .NET COM Components

Over the past year or so we've been wrestling with an intermittent error from classic ASP when trying to instantiate .NET components with Server.CreateObject. Everything works fine 90% of the time, and now and then we'll start seeing this error:

ASP.NET MVC HandleError Attribute, Custom Error Pages and Logging Exceptions

I'm sure I don't need to tell you how bad serving a Yellow Screen of Death to your users is. Nonetheless, it seems to be pretty common practice across the web. One of the first things I do when setting up a new ASP.NET project is set up custom error pages and ensure all exceptions are logged (who wants to find out about their errors from their visitors?). Since things work a little differently in ASP.NET MVC, I thought I'd dig in and find the best way to do the same sort of thing.

Using OpenID in your ASP.NET MVC Application/Blog

Over the last few days I've been rewriting this blog in ASP.NET MVC. As it gets closer to a state where I can upload it, I found myself needing to implement security for the administration section (adding, editing posts, etc.). I don't want yet another username/password to remember, and I don't want to IP-restrict it because that's not very flexible (and I don't know how static my IP is!), so what are my options?

Reducing Duplicate Content with ASP.NET MVC

As you're all no doubt aware, ASP.NET MVC recently went RTM. This brings the MVC-style of coding, made very popular by Ruby-on-Rails to the ASP.NET world. I've been eager to start using MVC for months, but I've been holding off until I knew the API was locked down so I don't have to change anything.

VS 2008: Testing Tools to be included in Professional edition of Visual Studio 2008

In case you hadn't already heard, the testing tools that were previously only available in the Team System edition of Visual Studio are included in Visual Studio 2008! This is great news for those using Nunit because they couldn't afford the Team System editions. Unlike Nunit, these tools full integrate with the IDE!

The WPF Designer (Cider) part 2...

After Mark Wilson-Thomas, the Program Manager on the WPF Designer team responded to my post about my WPF issues, I thought I owed it a second chance having read his comments.

Visual Studio 2008 Beta 2 First Impressions: WPF Applications

Visual Studio 2008 Beta 2 is now available. That means all of the cool things Microsoft have been tempted us with for the last few years are available to use: Linq, Linq to SQL, Lambda Expressions, (more stable) WPF Designer!