LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

T4 template to make a factory class.

Introduction Some jobs are tedious and errorprone. To avoid the errors we should unittest, but to avoid the tediousness we can make use of code generation. One such code generation tool is T4. It is available in Visual studio so why not use it? Well I can think of a few reasons. No intellisense no code coloring and no refactoring. But I guess we will have to learn to live with that.

Read More...

WPF and the splashscreen

Introduction Making a splashscreen in WPF is easy, since the .Net framework SP1 there is even a built in method to do this. But this method only accepts a static image. I would have liked a more dynamic thing. Something that says what it is doing. And something that fades in and out and has a custom shape. I’m not very demanding but I know this would be very complicated in windows forms.

Read More...

Resources for Professional Development

Waiting for your company to provide training courses or advancement opportunities? It might be a long wait. Unfortunately many companies overlook professional development or consistently sacrifice it when the first round of annual budget cuts occur. Even when we do get training opportunities, many of us continue to select classes at random, based on what seems interesting at the moment. We live in a field that is expanding daily, where the environment we work in is drastically different from what it was 5 years ago and from what it will be 5 years from now.

Read More...

RID Lookup take me down

This is your query on a rollercoaster. Not a fun trip and sometimes bringing a paper bag with you is a necessity. **It really happens** The scenario starts with a phone call from the support desk reporting failed integrations from the ERP system to the WMS system. This integration process is critical for the production of items with the company to fulfill orders and build inventory. Without the process, finished goods inventory is not posted and thus does not become available for sale.

Read More...

WPF and wordwrap/wordtrimming in a listbox

I have been doing most of my frontend in windowsforms but I thought it was time to switch to WPF after all it is already at version 4.0 so most of the little quirks should be gone by now. First thing I did was to convert my dashboard over to it. I can use all the same controllers and model so I only need to worry about the views. On my dashboard there is a ListBox which shows the user some messages of the system (not that anybody really reads them, but it looks cool).

Read More...

WPF and Silverlight difference

Today I was in the process of making my own copy-paste Analog clock. I went aruond the internet and found this pretty thing. Of course I could have used that code and gone on with life. But that was not the point of the exercise. I wanted to learn something of this. I liked the way he did the animations, no more need for a timer to update the angles, all is done in XAML.

Read More...

Model-View-Presenter: Looking at Passive View

Model-View-Presenter is an architecture pattern that defines a structure for behavior and logic at the UI level. M-V-P separates the logic of the presentation, such as interacting with back-end services and the business layer, from the mechanics of displaying buttons and interface components. I often build small projects to help understand and grow my skills as a developer, architect, and all-around technologist (as may be apparent from the wide range of topics I post on).

Read More...

Yes, I did indeed dig myself into this hole...

Folks, please remember to refactor early and often… private Element ReadMemberExpression() { var queue = new Queue<Element[]>(); var newDepth = 0; var argsCount = 0; _scanner.CreateRestorePoint(); while (true) { _scanner.CreateRestorePoint(); { var a = ReadArguments(); if (a != null) { argsCount++; if (argsCount > newDepth) { _scanner.Restore(); break; } queue.Enqueue(new[] { default(Element), default(Element), a }); _scanner.DeleteRestorePoint(); continue; } } _scanner.DeleteRestorePoint(); var pe = ReadPrimaryExpression(); if (pe != null) { queue.Enqueue(new[] { pe }); continue; } var fe = ReadFunctionExpression(); if (fe !

Read More...

T-SQL Tuesday

Robert Davis (Twitter | Blog) has the control this month and who better to have it other than him. I’ve come to respect Robert greatly over the last few months (yes, had no idea who he was just a short time ago). That’s the point of community though, isn’t it? We meet these leaders and professionals daily and scale up and out endlessly. It truly has no limits and I’m honored to be part of it.

Read More...

Change Data Capture rundown 100 (setup)

Many times as a database administrator, you’re going to find yourself being asked, “When did this change?” In fact, it is a common question that can come in so often, if you don’t have the answer readily available, the business will quickly become frustrated with you. This can have an adverse effect on your reputation of being able to manage the databases in question. Some databases (and software packages) simply do not track changes in the database.

Read More...