Tag | Windows Live Writer Posts

This post is a message in a bottle. It cast it into the sea in the hope that it will one day return to me, stuffed to the cork with enlightenment. Yesterday I tweeted, what is the name of the pattern where you replace a multi-way conditional with an associative array? I said ‘pattern’ but I meant ‘refactoring’. Anyway, no one replied so I will describe the refactoring here. Programmers tend to think imperatively, which leads to code such as: public int GetPopulation(string country) { if (country ...
You can reach this page anytime at http://tools.michaelcrump.net Thanks to everyone that has contributed so far, we are getting several thousands hits from all sorts of developers a day. Recent Contributors include: Deependra Solanky, Grant, Klaus, James, BlueCollarCritic and Bob Koehn Tweet this list! Add a link to my site! Add me to twitter! This is a list of the tools/utilities that I use to do my job/hobby. I wanted this page to load fast and contain information that only you care about. If I ...
More Adventures in MVVM EDIT: Here is why I love blogging and sharing code so much: Putting your ideas and code out into the public space always manages to add value to the ideas that were originally posted. Case in point: Tobias Richling commented on this post with a fantastic refinement to the Silverlight dynamic property binding. There is a much more simple way to bind against these dynamic properties (including automatic commanding) than my first approach. I have incorporated the changes to the ...
More Adventures in MVVM First, I’d like to say: THIS IS NOT A NEW MVVM FRAMEWORK. I tend to believe that MVVM support code should be specific to the system you are building and the developers working on it. I have yet to find an MVVM framework that does everything I want it to without doing too much. Don’t get me wrong… there are some good frameworks out there. I just like to pick and choose things that make sense for me. As of Silveright 4, they don’t support binding to dynamic properties, so some ...
Tonight the Brisbane Alt.NET group is doing a coding dojo. I am hoping to talk someone into pairing with me to solve the kata in CoffeeScript. CoffeeScript is an awesome language, half javascript, half ruby, that compiles to javascript. To assist with tonight’s dojo I wrote the following micro test framework for CoffeeScript: <html> <body> <div> <h2>Test Results:</h2> <p class='results' /> </div> <script src="http://ajax.googleapis... ...

This is a sample post. Checking out the Windows Live Writer to post to my blog.

(-:

The refactoring I’m talking about is recommended by resharper when it sees a lambda that consists entirely of a method call that is passed the object that is the parameter to the lambda. Here is an example: public class IWishIWasAScriptingLanguage { public void SoIWouldntNeedAllThisJunk() { (new List<int> {1, 2, 3, 4}).Select(n => IsEven(n)); } private bool IsEven(int number) { return number%2 == 0; } } When resharper gets to n => IsEven(n) it underlines the lambda with a green squiggly ...
Sinatra is a Ruby DSL for building web applications. It is distinguished from its peers by its minimalism. Here is hello world in Sinatra: require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end A haml view is rendered by: def '/' haml :name_of_your_view end Haml is also new to me. It is a ruby-based view engine that uses significant white space to avoid having to close tags. A hello world web page in haml might look like: %html %head %title Hello World %body %div Hello World You see ...
SyntaxHighlighter is the de facto standard for syntax highlighting on the web. I am currently working on a tool for publishing BDD specifications on the web and I want syntax highlighting. Unfortunately, SyntaxHighlighter does not support Gherkin, the language Cucumber and SpecFlow use to define BDD specifications. Writing new language parsers for SyntaxHighlighter is very easy, so I implemented one for Gherkin. Here is what a syntax highlighted Gherkin file looks like: # A comment here Feature: ...
Part 1 After I explained my motivation for using YAML instead of XML for my data, I got a lot of people asking me what type of tooling is available in the .Net space for consuming YAML. In this post, I will discuss a nice tooling option as well as describe some small modifications to leverage the extremely powerful dynamic capabilities of C# 4.0. I will be referring to the following YAML file throughout this post Recipe: Title: Macaroni and Cheese Description: My favorite comfort food. Author: Brian ...
Continuing on my series of builders for C# and Ruby here is the solution in Javascript. This is probably the implementation with which I am least happy. There are several parts that did not seem to fit the language. This time around I didn’t bother with a testing framework, I just append some values to the page with jQuery. Here is the test code: var initialiseBuilder = function() { var builder = builderConstructor(); builder.configure({ 'Person': function() { return {name: 'Liam', age: 26}}, 'Property': ...
My last post was about a class for building test data objects in C#. This post describes the same tool, but implemented in Ruby. The C# version was written first but I originally came up with the solution in my head using Ruby, and then I translated it to C#. The Ruby version was easier to write and is easier to use thanks to Ruby’s dynamic nature making generics unnecessary. Here are my example domain classes: class Person attr_accessor :name, :age def initialize(name, age) @name = name @age = age ...
When writing tests, other than end-to-end integration tests, we often need to construct test data objects. Of course this can be done using the class’s constructor and manually configuring the object, but to get many objects into a valid state soon becomes a large percentage of the testing effort. After many years of painstakingly creating builders for each of my domain objects I have finally become lazy enough to bother to write a generic, reusable builder class for .NET. To use it you instantiate ...
I have made a change to my code-based BDD style. I start with a scenario such as: Pre-Editing * Given I am a book editor * And some chapters are locked and some are not * When I view the list of chapters for editing * Then I should see some chapters are editable and are not locked * And I should see some chapters are not editable and are locked and I implement it using a modified SpecUnit base class as: [Concern("Chapter Editing")] public class when_pre_editing_a_chapter : BaseSpec { private User ...
The following code adds a method to javascript arrays that returns a distinct list of values. Array.prototype.distinct = function() { var derivedArray = []; for (var i = 0; i < this.length; i += 1) { if (!derivedArray.contains(thi... { derivedArray.push(this[i]) } } return derivedArray; }; and to demonstrate: alert([1,1,1,2,2,22,3,4,5,6... This produces 1,2,22,3,4,5,6,7 ...
This javascript adds a method to javascript arrays that returns a boolean indicating if the supplied object is an element of the array Array.prototype.contains = function(item) { for (var i = 0; i < this.length; i += 1) { if (this[i] === item) { return true; } } return false; }; To test alert([1,1,1,2,2,22,3,4,5,6... // true alert([1,1,1,2,2,22,3,4,5,6... // false ...
Javascript allows you to declare variables simply by assigning a value to an identify, in the same style as ruby: myVar = "some text"; Good javascript developers know that this is a bad idea because undeclared variables are assigned to the global object, usually window, making myVar globally visible. So the above code is equivalent to: window.myVar = "some text"; What I did not realise is that this applies to for loop initialisation as well. for (i = 0; i < myArray.length; i += 1) { } // is equivalent ...
Why Use Client-side Javascript Templates? When building rich internet applications you often need to construct html on the client. I am going to demonstrate how to construct DOM elements using the jqote jQuery plugin (2.0.0). The naive approach to client-side html generation is to embed html inside javascript like: var text = 'Some text'; $('body').append($('<div id="content>' + text + '</div>"')); This approach fails as the complexity of the html increases. It is also a clear separation ...
Here are steps on setting up a slideshow on your SharePoint site really fast using a Content Editor WebPart (CEWP), jQuery and a Picture Library. The jQuery for the slide show makes use of the Cycle plug-in located at http://jquery.malsup.com/cy... There are plenty of demos on the site along with instructions on using the API. Here are the steps to implement the slideshow on a SharePoint site: Download the jQuery library and the Cycle plug-in and upload them to a document library Create a picture ...
Enumerated constants in C# can be represented 3 different ways: as a C# program constant as a number (typically int) as a string spelled identically to the C# constant Here a sample program demonstrating how to convert between any of these formats. using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication2 { public enum Color { red, white, blue } class Program { static void Main(string[] args) { string toString, fromString = "red"; int toInt, fromInt = 1; Color ...
Just testing the use of Windows Live Writer for blogging. I have downloaded and installed some plugins for adding code snippets. The following examples use this plugin: /// <summary> /// Resets the counters. /// </summary> public void ResetCounts() { StudentsWithFiles = 0; StudentsWithoutFiles = 0; TotalSpaceUsed = 0; TotalFilesCount = 0; } You can also change the colours and fonts: /// <summary> /// Resets the counters. /// </summary> public void ResetCounts() { StudentsWithFiles ...
Part 2 This is the first in a many-part series in which I will be writing about using YAML in the .Net space – particularly within C#. I will cover the whys, the hows, and show some tricks using the dynamic capabilities of C# when using YAML. I might even explore IronRuby a bit. Why YAML? I got the chance to sit in on four days of Ruby on Rails (RoR) training from Joe Obrien a few weeks ago. I hadn’t played with RoR in a few months, and this training was amazingly useful. I always like to see what ...
I’ve recently been looking at better ways to combine IoC functionality with MEF composition. I’ve created a workable solution using just MEF but there is some nasty boilerplate floating around when creating nested containers. As an example to this issue, the data model contains a set of nested objects in which the Root object holds the MEF CompositionContainer and uses that container to satisfy imports on objects it creates. At some point in the heirarchy, an object representing a context needs to ...
Whenever I am working on a project that requires client-side coding, I immediately starting thinking in JQuery. There are other javascript frameworks out there, but so far I haven’t found one that allowed me to structure my client-side applications quite as cleanly as JQuery does. The only thing JQuery doesn’t support out-of-the-box is a decent templating system for emitting DOM elements. Typically you’d wind up building up large strings and passing them to a method like append, html, etc in order ...
Javascript does not have classes in the traditional sense, but we can achieve something similar in a number of ways. C# and Ruby both have standard class syntax. This post is part of a series comparing the language features of the C#, Javascript and Ruby programming languages. Part 1: Installation and hello world Part 2: Variables Part 3: Classes C# public class Vehicle { protected string Make { get; private set; } protected string Model { get; private set; } public Vehicle(string make, string model) ...
This post is part of a series comparing the language features of the C#, Javascript and Ruby programming languages. Part 1: Installation and hello world Part 2: Variables Part 3: Classes Variables C# requires that variables be declared with a specific type. Javascript and Ruby determine the type of variables at runtime. Here is the syntax: C# public string publicMessage = "Hello World"; private string privateMessage = "Hello World"; static string PRIVATE_MESSAGE = "Hello World"; Javascript var message ...
I’m going to be looking at a few different languages and blogging my thoughts. I am not a language dork so it will probably be mostly wrong. The languages I care about are c# (which is what I mostly use), javascript (which I love) and ruby (which everyone else loves). This post is part of a series comparing the language features of the C#, Javascript and Ruby programming languages. Part 1: Installation and hello world Part 2: Variables Part 3: Classes Installation C# is installed by installing visual ...
I've been very frustrated with the lack of flexibility with wordpress.com hosted blogs, so I am yet again moving. This time I wanted to host my own instance of Subtext but discovered that geekswithblogs.net uses Subtext and figured I would give one last attempt to a hosted community online :) I guess I just don't want to deal with running my own server just for a blog. The most important thing I wanted back was Syntaxhighlighter which was about impossible to use with wordpress.com without paying ...
While I was planning to write about the same topic and have the draft ready in my Windows Live Writer waiting to complete, I found an interesting question in StackOVerflow and couldn’t just resist to answer: ORM/Persistence layer Advice The question starts with: I'm starting a new project and I'm looking around for either a very good ORM or for a non-SQL-based persistence layer. Then follows up with a REALLY GOOD summary of what he believes about each known ORM he knew out of his own findings and ...
Postings for blogs i write with Windows Live Writer. To support syntax highlighting a plugin must be used. Actualle source code is formatted with the plugin Code Snippet plugin for Windows Live Writer. Tested formatters The following formatters are tested, but in my opinion thats not a good decision: Insert Code for Windows Live Writer i miss the capability to specify a box which includes the source code content. Live Writer Source Code Formatter Plugin not convincing. Untested formatters The following ...

I recently found that I can use Windows Live Writer to connect to my blog on GWB.

It has a nice editor, can add images and tables easily, save as draft and publish later etc.

Happy Blogging.!

Here’s another email from the internal mailing list of Injazat .NET Ninjas (Ninjazat, AKA as we call ourselves), that I’m sharing with blog readers as well. Just a place holder, until I move one of my 18 (just discovered the number now – terrifying!) drafts in my Windows Live Writer into a published post, or delete them all! Subject: [Learning] Some very interesting videos Some videos from NDC 2009 event (Norwegian Developers Conference 2009) - about software design and related issues: · NDC Video ...
I wanted to write a blog post to document how I do some day-to-day things. It helps me to keep track of my work habits, refine them and perhaps help some others who are looking for some solutions. My current rig is a Apple MacBook Pro 13” unibody. It has the 250Gb drive with 4Gb memory. I am running the latest version of OS X Leopard. I am really enjoying the 13” form factor. It is a little smaller and lighter than the previous 15” unibody which, to me, just felt heavy. I also don't notice the lost ...
In this Issue: Erno de Weerd, Colin Eberhardt, Thanigainathan Siranjeevi, Stefan Olson(2), Dan Wahlin, Chris Klug, and Alex Golesh. Shoutouts: Tim Greenfield has entered the NewCloudApp Windows Azure contest with a Silverlight app and asks us to Look what Silverlight can do... for now he has his submittal, a cool jigsaw puzzle, but he promises to write all about it. From SilverlightCream.com: Silverlight, Windows Live Writer and WordPress Erno de Weerd blogged this and it's been picked up by others. ...
Introduction The WinPHP challenge is running towards it’s closing time. Only a few days before entering I came with the idea to enter the contest. I had to put a lot of my spare time into it, but it was worth it. I learned a lot from exploring the realm of php. It’s fun to work in a language I normally do not work in. And to find ways to implement some thoughts that have been on my mind for a while. Here’s the story about the what, the where and the how of BlogSnor, my entry for the WinPHP challenge. ...
Up to now I haven't explained what my mobile test application does. The main thing I wanted to test was calling a WCF service. If you use .NET CF 3.5 WCF will be available in your application to make the call but you can also call the service as "web service" (asmx) (1) Calling the service as ASMX In you Smart Device Application project just do "Add Web Reference", enter the url of the service (no "mex" part but with final /, like this: http://server:port/Design_T... ...

I am testing how windows live writer will help me post to multiple blogs. I have to manually switch using the Blogs menu.

Yesterday I got the email welcoming me to the First Annual WinPHP Challenge. Microsoft, ibuildings and Leaseweb are sponsoring this contest to show Windows is now a first class citizen for development and deployment of PHP projects. The idea of this contest is very simple, just build an application running on Windows and IIS7. But, do this with PHP. The contests ends June 1st. Until then all contestants have to blog about their progress. On June 13th the winner will be announced at the DPC closing ...
I will explain how to develop a simple application in ASP.NET using a three-tier architecture. The presentation tier The business tier The data tier Concepts: The presentation tier contains the UI (User Interface) elements of the site, and includes all the logic that manages the interaction between the visitor and the client’s business. (ASP.NET Web Forms,Web User Controls,ASP.NET Master Pages) The business tier receives requests from the presentation tier and returns a result to the presentation ...
One of the less obvious features available in Windows Live Writer is the ability to automatically ping (send a signal) to popular blog aggregators every time you publish something to your blog. This feature actively pings the servers of the blog aggregators you specify and to indicate when there is new material. To use this feature in Writer click on Ping Servers in the Options dialog (navigation: Tools | Options | Ping Servers). Then add the names of the servers you want to ping. Start off with: ...
As I mentioned before, I've been using Win7 full time on my laptop. Win7 ships with IE8 beta which has some nice improvements, but overall isn't ready for prime time just yet (such are the perils of beta software.) My recent experiences with FireFox 3 (prior to installing Win7) have left me somewhat cold, so my browser of choice has been Google Chrome. Overall, I really like Chrome a lot and there have only been a few instances where it wouldn't work well with something. One of those things is a ...
Ostatnio, tj. kilka godzin temu, przemierzajac bezgraniczne przestrzenie Internetu trafilem na ciekawe biblioteki sluzace do obslugi bazy danych, a dokladniej przeprowadzania operacji CRUD w uproszczony sposób. Evolutility, bo tak sie projekt nazywa, tworzy prosty UI w ASP.NET pozwalajac edytowac dane w bazie np. Microsoft SQL Server. Wyglad, mimo ze dosc mily "nie zwala jednak z nóg", wiec Evolutility w praktyce bez wiekszej dyskusji nadawaloby sie na sekcje administratorska jakiegos CMS-a/pseudo ...
I know I am not the first to mention Windows Live Writer as a great blogging tool. I’ll mention it anyway, maybe someone will see this post who missed the various positive mentions from other posters (and not just the GWB folks). The install was painless aside from unchecking about seven other MS/MSN junk I did not need. I have used it for a little while now and have had no issues publishing or updating posts. The two main items I like about Live Writer are saving a post before publishing it (i.e. ...
HELLO! Oh man I've missed you guys. I haven't posted in forever and I'm very sorry for it! I'm trying to get this damned Windows Live Writer working with GWB and absolutely cannot get it to work (have been trying since 12/4!). I've found other GWB posters that have written about it but I think Live Writer came out with a new format and they haven't updated something. Either that or I have something wrong, if anyone can help PLEASE let me know. In recent news I've gotten an Xbox! Which means XNA development ...
So I don't know if anyone has noticed something similar recently but shortly after my recent trip away I found that my Posts via "Windows Live Writer" were somehow being truncated or something similar and the Paragraph and Tagging syntax was getting muddled on my WordPress site. At first I thought it might be Windows Live Writer as I had recently upgraded to a beta version 14.x... , so I downgraded (very bloody difficult that...), tried other blogging tools and found that this did not appear to be ...
For the past four months my controllers have had two constructors: one that received my dependencies and one parameterless that called Windsor directly, because parameterless constructors are a requirement for the default MVC ControllerFactory. (These constructors did have a huge //HACK comment on them.) Wiring up IOC with zero friction was quite simple. First, we need to make a new ControllerFactory. In it, we will ask Windsor to give us the controller. public class CastleWindsorControllerFactory ...
My project is on the move, literally. We're migrating from our old data center to a new one; everything is being brought up on new hardware. Since we're using full and incremental backups, an important sanity check is to make sure all the data has been restored, which is being done using the following query: select 'select ''' + TABLE_SCHEMA + ''' as TableSchema, ''' + TABLE_NAME + ''' as TableName, count(*) as [Rows] from ' + TABLE_SCHEMA + '.' + TABLE_NAME + ' union' as [SQL] from INFORMATION_SCHEMA.TABLES ...
In AJAX based applications its common that user might end up breaking your AJAX calls by clicking on numerous places in very short interval of time. Let us assume there is a page where there are several of hyperlinks which make WebService calls and do some stuffs on callback. If user clicks on five hyperlinks being impatient or may be just for fun, there will be five different WebService calls made. All of those calls had the same parameters or UI state while they were invoked. But on completion ...
I prefer to use web-based solutions when possible, but the other day the publish feature of google docs wasn’t working right, so I needed to install Windows Live Writer. I quickly found out that WLW doesn’t play nicely with Windows Server 2008. Since WLW is written in .NET, I just installed it on an XP virtual machine and copied the Program Files folder over to my Server 2008 machine. Simple. Technorati Tags: Windows Live Writer,Server 2008 ...
Here's a simple way to avoid postbacks in your site, still be SEO friendly and degrade gracefully to JavaScript free browsers (and handle middle clicks and copy&paste) in ASP.NET MVC using jQuery. First, we'll create an alternate MasterPage called No.master with no content, only one ContentPlaceHolder: <asp:ContentPlaceHolder ID="MainContent" runat="server" /> Now, we're able to tell via HTTP Headers if a Request is an Ajax Request, so we'll write a new method in our Controller Base class ...