Count LOC in a VS solution
Option #1: Quick-and-dirty Powershell (count non-empty lines)
C:\> (dir -include *.cs,*.xaml -recurse | select-string .).Count
Option #2: cloc (perl command-line tool)
------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- XML 6 21 0 30818 C# 18 110 148 518 MSBuild scripts 3 0 21 203 ASP.Net 2 0 0 22 ------------------------------------------------------------------------------- SUM: 29 131 169 31561 -------------------------------------------------------------------------------
Get text from PDF file with iTextSharp
string ReadPdfFile(string filename)
{
var pdfText = new StringBuilder();
var reader = new PdfReader(filename);
var pages = reader.NumberOfPages;
for (int page = 1; page <= pages; page++)
{
var tes = new SimpleTextExtractionStrategy();
var pgText = PdfTextExtractor.GetTextFromPage(reader, page, tes);
pdfText.Append(pgText);
}
reader.Close();
return pdfText.ToString();
}
The General Problem
From: http://xkcd.com/974/
I find that when someone is taking time to do something right in the present, they’re a perfectionist with no ability to prioritize, whereas when someone took time to do something right in the past, they’re a master artisan of great foresight.
A perfect storm of technology change
Source: Dion Hinchcliffe, Defrag Keynote on CoIT – November 10th, 2011
Related post: The “Big Five” IT trends of the next half decade: Mobile, social, cloud, consumerization, and big data
Notes on Product Engineering
Notes from this presentation by Mike Lee (@bmf):
- IDEA => (Product Engineering) => PROFIT
- Seek not originality… but quality
- The product is under the ideas (must find it)
- Consider customers: Start at the end by making a commercial
- Picking a platform: Platform is culture
- Building a team: x platforms => x+1 teams
- Test your product: Like enemy – Build what user expects
- Shipping is necessity: Plan-Design-ShipOnTime, Shipping a draft = Amateur Mistake
- When is ready? “Holy Crap!”
- Hook: Magnetic covers in iPad2
Lucene.Net Resources
Lucene.Net is a source code, class-per-class, API-per-API and algorithmatic port of the Java Lucene search engine to the C# and .NET platform utilizing Microsoft .NET Framework.
- Lucene in Action book, First and Second Edition
- Lucene Intro and QueryParser Rules by Erik Hatcher (Java version)
- Introducing Lucene.Net: A plunge intro creating a fast, full text index, with advanced searching capabilities.
- LINQ to Lucene: Providing a custom LINQ solution for the Lucene Information Retrieval System, commonly referred to as a search-engine.
- NHibernate.Search using Lucene.NET Full Text Index by Simon Green
- C# and Lucene to index and search: This sample will show you how to use Lucene from your .NET application to index and search content.
- Fun with Lucene.Net for BlogEngine.Net by Jared
- Apache Lucene.Net 2.1 Class Library API
- Apache Lucene – Query Parser Syntax: Although Lucene provides the ability to create your own queries through its API, it also provides a rich query language through the Query Parser, a lexer which interprets a string into a Lucene Query.
Inspired by: “Apache Lucene and Lucene.Net – Full Text Search Servers” by Jonathan Allen.
BPMN/BPEL posts
Why BPEL is not the holy grail for BPM [P. Vigneras, Oct 21, 2008]
BPMN-BPEL in Perspective: [B. Silver, Oct 25, 2008]
Directly Executing BPMN [K. Swenson, Oct 29, 2008]
BPMN usage and tips
Are Floating Intermediate Events Valid? The issue is an intermediate event (e.g., message or timer) “floating” in a process or expanded subprocess alongside the regular flow, the one bounded by start and end events. The floating event has a sequence flow out, leading eventually to end event, but no sequence flow in.
When Are Error End Events Legal? Is it valid to end a top-level process in BPMN with an error end event?
Workflow (WF) Screencasts
- Your first sequential workflow
- Your first state machine workflow
- Running workflows in your .NET applications: Matt covers the basic steps to host workflows in your applications. He covers the basic hosting steps in a console application, then jump in and run a workflow in an ASP.NET application.
- Using persistence services in WF: Matt presents the basics of add persistence services into the workflow runtime using code or configuration. Additionally, to show off the power of this feature in Windows WF, he uses two different host processes sharing a persistence store: the first host starts a workflow and then it persists, while the second host picks up the workflow after its configured delay and resumes the processing.
- Using the WCF Receive Activity in a workflow: Learn how to use the Receive activity in your workflows to implement WCF services as workflows. In addition, see how to use the WorkflowServiceHost class to host your workflow as a service.
- Using the WCF Send activity in Windows Workflow Foundation: Matt Milner presents the basics of using the Send activity to consume a service from a workflow using WCF.
- Creating Custom Activities:Matt Milner presents the basics of creating custom leaf activities including how to use Dependency Properties to make your properties bindable.
- Pluralsight Online course: Windows Workflow Fundamentals
Link – Synchronous call of a workflow from an activity
Jon Flanders provides an example where an activity creates and calls syncronously another workflow by using a custom service.


