Skip to content

Robert Greiner

Professional optimist. I write a weekly newsletter for humans at the intersection of business, technology, leadership, and career growth.

Members Public

Continuous Code Improvement Using Ratcheting

I read a great article over the weekend dealing with the concept of (sorry, this website has been shut down) a legacy codebase in order to achieve the ultimate goal of quality code using incremental improvements over time. I must admit that reading this article was a bit of a

Members Public

Using LINQ to sum up a list of numbers

I don't really like foreach loops. They are difficult to read and easy to abuse. Let's say, for example that we want to sum up the following list of numbers: private int[] numberList = {1, 2, 4, 8, 16, 32}; //sum = 63 Conventional programming wisdom says that

Members Public

How to get a temp directory in any OS with Ruby

I needed this over the weekend and the existing online help is less than helpful. As it turns out, just like with everything I try to do in Ruby, the solution is simple. require 'tmpdir' temp = Dir.tmpdir() puts temp #C:/Users/Robert/AppData/Local/Temp This is

Members Public

NumberText: Converting numbers into words in C#

I created a project over the weekend called NumberText [http://github.com/robertgreiner/NumberText] which provides a ToText() method that will return the textual representation of an integer. Let's say that we have the number 1234567 and want to output one million two hundred thirty four thousand five

Members Public

Later Equals Never

When developing software, it is far too easy to hack something together knowing full well you can do a better job and justifying your actions by saying "meh, I'll fix it later." We've all been in this situation before (and I'm just

Members Public

Using a Content Delivery Network to host jQuery

A Content Delivery Network [http://en.wikipedia.org/wiki/Content_delivery_network] (CDN) is a system of computers that exist all over the world and cache files for users to access. CDNs can greatly reduce the load time of a page by offering files at a higher bandwidth from a

Members Public

How to Get Your Entire Work Item History in TFS

The more I use TFS [http://msdn.microsoft.com/en-us/vstudio/ff637362?ppud=4] at work the more I like it. However, with large development teams the sheer number of work items that are created over time can be staggering and searching through them to find a particular work item

Members Public

Generating an XML Document Using LINQ to XML

In the past, programmaticly creating XML documents in any programming language was extremely tedious and error-prone and .NET was no exception. Fortunately, LINQ remedied this for us in .NET 3.0. In this post, I will demonstrate how mind-numbingly easy it is to create an XML document using LINQ to

Members Public

Efficient Page Reloading in ASP .NET

Today I ran into a situation where I needed to change some session state information on an ASP page I was developing and have it instantly update the current page. This can be accomplished with the following code: //Stop processing and reload the current pageServer.Transfer(Request.Path); Server.Transfer(

Members Public

How to set a default browser when debugging in VisualStudio

I am constantly switching preferred browsers for my day-to-day browsing. But, when I am writing web applications I actually prefer my browser to be Internet Explorer for one simple reason: it saves time. Visual Studio knows when you close down the IE window that is running your current application and