Archives
-
Mandatory look back at 2010
-
Migrating a blog from Orchard 0.5 to 0.9
My personal blog still runs on Orchard 0.5, because the theme that I used to build it is not yet available for more recent versions, but it is still very important for me to know that I can migrate all my content and comments to a new version at any time.
-
Switching the layout in Orchard CMS
The UI composition in Orchard is extremely flexible, thanks in no small part to the usage of dynamic Clay shapes. Every notable UI construct in Orchard is built as a shape that other parts of the system can then party on and modify any way they want.
-
Displaying an image on a LED matrix with a Netduino
In the previous post, we’ve been flipping bits manually on three ports of the Netduino to simulate the data, clock and latch pins that a shift register expected. We did all that in order to control one line of a LED matrix and create a simple Knight Rider effect.
-
Doh! Use the right constants when you talk to a Netduino
When programming a Netduino microcontroller, you are going to use constants from the SecretLabs.NETMF.Hardware.Netduino namespace. In particular, there are constants defined for each of the microcontroller’s output and input ports, enabling you to write for example:
var button = new InputPort(
Pins.ONBOARD_SW1,
false,
Port.ResistorMode.Disabled); -
Improving the Netduino Knight Rider effect with a shift register
In my last Netduino post, I showed how to create a simple Knight Rider effect. One of the problems of that implementation was that we were occupying one digital port of the Netduino for each light in the ramp. It’s fine for that simple effect, but in future posts we’ll look at controlling our whole 8x8 LED matrix, which has 16 pins whereas the Netduino has only 14 digital ports.
-
FluentPath 1.0
Last Sunday, I published version 1.0 of my little FluentPath library.
-
More Netduino fun
Last time, we ran a very simple program on the Netduino. This time around, we’ll actually connect some real hardware to that microcontroller and blink some lights! You know what? Let’s go crazy! Let’s go for Knight Rider lights! Woohoo!
-
Hello Netduino!
We’re makers, all of us, we build stuff for work and pleasure. Software development is a great discipline for people like us as the ticket to entry is relatively modest. All you need is a computer and that is pretty much it. There is no real limit to what you can do.
-
A quick look at what’s new in Orchard 0.8
We shipped Orchard 0.8 on Monday and it’s the last release we will make before 1.0, which is scheduled for January 2011. We think it’s a pretty nice release in that it wraps up the UI story for the platform.
-
Using LinqPad to open SQL CE 4.0 databases
I love SQL CE 4.0 because it promises to solves a problem that only SQLite has been able to solve thus far: no-install, x-copy deployable relational engine with good performance.
-
Building my new blog with Orchard – Part 3: one way to skin a cat
These last few weeks I’ve been refraining from starting any deep work on my new Orchard-powered blog because most of what I had in mind involved widgets, which are being built right now. Version 0.8 is just around the corner: the team is just putting the final touches to the new theme engine and to the widget system.
-
0x81000037, 0x80070002 and how I finally convinced Windows Backup to do its job
When trying to backup my machine onto a USB drive, a few weeks ago I have been starting to get a very unhelpful 0x81000037 error. Of course, the first thing I did was to bing it but I didn’t like what I found. There is a “How to troubleshoot Windows Backup and Restore issues when a reparse point folder or its subfolder is added to a user library in Windows 7” KB article that unfortunately does not live up to its title. It does some hand waving around “reparse points” but does not even bother to explain what a reparse point is, let alone how to discover and remove them.
-
Please read if you have public ASP.NET sites
Yesterday, a new crypto oracle-type vulnerability was publicly disclosed. It is an important vulnerability that is likely to be exploitable on a large proportion of ASP.NET sites, even those that are using configuration settings that were previously considered safe.
-
Building my new blog with Orchard – part 2: importing old contents
In the previous post, I installed Orchard onto my hosted IIS7 instance and created the “about” page.
-
Building my new blog with Orchard – Part 1
Several people have asked me if I would move my blog to Orchard. There are actually several challenges with this that have nothing to do with Orchard itself, but suffice it to say that right now I’m not really considering it.
-
Clay: malleable C# dynamic objects – part 2
In the first part of this post, I explained what requirements we have for the view models in Orchard and why we think dynamic is a good fit for such an object model.
-
Clay: malleable C# dynamic objects – part 1: why we need it
When trying to build the right data structure in Orchard to contain a view model to which multiple entities blindly contribute, it became obvious pretty fast that using a dynamic structure of sorts was a must.
-
Optional named parameters work pretty well
Rob has found a use for dynamic:
http://blog.wekeroad.com/2010/08/06/flexible-parameters-with-csharp -
Orchard 0.5 is out
Before I joined Microsoft seven years ago, I had spent a couple of years building a Web CMS. It wasn’t open-source unfortunately but the experience convinced me that most public-facing web sites would shortly use some form of CMS. I also forged strong opinions about the right level of component granularity that a CMS must implement.
-
What did you start programming on?
There’s some kind of controversy going on today in our microcosm. I don’t want to enter that controversy because I think nobody’s willing to listen to anybody but themselves.
-
Oh yeah, CallStream is great to express monads
It has been pointed out by several commenters that CallStream was a reinvention of monads. Not quite so, but the nuance is subtle.
-
How I understood monads, part 2/2: have we met before?
The first post in this series can be found here:
http://weblogs.asp.net/bleroy/archive/2010/06/16/how-i-understood-monads-part-1-2-sleepless-and-self-loathing-in-seattle.aspx -
How I understood monads, part 1/2: sleepless and self-loathing in Seattle
For some time now, I had been noticing some interest for monads, mostly in the form of unintelligible (to me) blog posts and comments saying “oh, yeah, that’s a monad” about random stuff as if it were absolutely obvious and if I didn’t know what they were talking about, I was probably an uneducated idiot, ignorant about the simplest and most fundamental concepts of functional programming. Fair enough, I am pretty much exactly that.
-
How Orchard works
I just finished writing a long documentation topic on the Orchard project wiki that aims at being a good starting point for developers who want to understand the architecture, structure and general philosophy behind the Orchard CMS.
-
When failure is a feature
Warning: this post is going to be slightly off-topic and non-technical. Well, not computer science technical at least.
-
Writing the tests for FluentPath
Writing the tests for FluentPath is a challenge. The library is a wrapper around a legacy API (System.IO) that wasn’t designed to be easily testable.
-
JavaScript local alias pattern
Here’s a little pattern that is fairly common from JavaScript developers but that is not very well known from C# developers or people doing only occasional JavaScript development.
-
The fastest way to resize images from ASP.NET. And it’s (more) supported-ish.
I’ve shown before how to resize images using GDI, which is fairly common but is explicitly unsupported because we know of very real problems that this can cause. Still, many sites still use that method because those problems are fairly rare, and because most people assume it’s the only way to get the job done. Plus, it works in medium trust.
-
What happens to C# 4 optional parameters when compiling against 3.5?
Here’s a method declaration that uses optional parameters:
-
RSS feeds in Orchard
When we added RSS to Orchard, we wanted to make it easy for any module to expose any contents as a feed. We also wanted the rendering of the feed to be handled by Orchard in order to minimize the amount of work from the module developer.
-
Netbook vs. iPad
Troll bait!
-
Ban HTML comments from your pages and views
Too many people don’t realize that there are other options than <!-- --> comments to annotate HTML. These comments are harmful because they are sent to the client and thus make your page heavier than it needs to be.
-
A C# implementation of the CallStream pattern
Dusan published this interesting post a couple of weeks ago about a novel JavaScript chaining pattern:
-
NoSQL is not about object databases
NoSQL as a movement is an interesting beast. I kinda like that it’s negatively defined (I happen to belong myself to at least one other such a-community). It’s not in its roots about proposing one specific new silver bullet to kill an old problem. it’s about challenging the consensus.
-
FluentPath now on CodePlex
My FluentPath library is now available on CodePlex. I’ve also modified the code so that it can now be compiled against .NET 3.5SP1 and not just .NET 4.0.
-
Binding a select in a client template
I recently got a question on one of my client template posts asking me how to bind a select tag’s value to data in client templates. I was surprised not to find anything on the web addressing the problem, so I thought I’d write a short post about it.
-
FluentPath: a fluent wrapper around System.IO
.NET is now more than eight years old, and some of its APIs got old with more grace than others. System.IO in particular has always been a little awkward. It’s mostly static method calls (Path.*, Directory.*, etc.) and some stateful classes (DirectoryInfo, FileInfo). In these APIs, paths are plain strings.
-
Setting up a continuous integration server for a CodePlex project using TeamCity and Mercurial
Continuous integration enables developers to have an automated way of validating the quality of their check-ins. A CI server will monitor your version control repository and on every check-in will build the project and at the very least run unit tests. If anything goes wrong (compilation error, failing test, etc.), the server will send e-mail to the team so the developer responsible for the faulty check-in can investigate and fix the problem.
-
Why isn’t there a CTRL+ALT+DEL key?
I vaguely understand why this weird key combination from the 20th century offers some security advantage that somehow justifies that it’s still present on enterprise versions of Windows, but why does it have to be so hard and inaccessible?
-
How to build 2D glasses
It’s the week-end, which is the perfect time for a slightly off-topic post. It’s still engineering of sorts though in that it provides what I think is an original and cheap solution to a real problem.
-
“Badgifying” an ASP.NET page
I apologize for the neologism. What I’m going to demonstrate in this post is a technique I prototyped a few months ago to make it very easy to embed an ASP.NET page’s content in another page, even if it’s using another server technology. This of course works cross-domain.
-
How I got attacked by Windows Update
I was writing a wiki page when it happened. The system restart dialog from Windows Update had been blinking helplessly in the task bar for a few hours as I didn’t have time for a reboot yet.
-
Server-side resizing with WPF: now with JPG
I’ve shown before how to generate thumbnails from ASP.NET server code using the WPF media APIs instead of GDI+ (which is unsupported when used in server code).
-
Search Engine Optimization got a lot easier
Dear readers, if you haven’t checked out the SEO Toolkit yet, you owe it to yourself to go there now, download it and start using it. Point it to your sites and it will explore them and give you a full report of all the little problems that are getting in the way of search engines.
-
My video setup
As I’m in vacation, I thought I’d make a post on something different but still quite geeky. I really like to see how people set-up their video systems: there isn’t just one way to do it right and I can’t think of two friends of mine who have something even remotely similar. So I’ll describe my setting and invite you to drop me a comment and describe yours. I’ll also tag a few friends and ask them to describe theirs. I’ll post links here.