More Shakespearean Monkeys

  While I was in high school, I attended a lecture at Yale University in 1974 about monkeys at a typewriter by William R. Bennet, Jr, one of the inventors of the helium-neon laser. Quote: He was also frequently seen at various sites around the Yale campus collecting data for his popular course on “The…

0

Create a Concordance for a Word Document from C# using Automation

I was talking to my son about some of his homework assignments. He had to write several essays. We talked about the power of Microsoft Word and how I had to count the words manually when writing a 5000 word essay on a typewriter, but Word shows the word count easily. Then we talked about…

1

Drawing old playing card images for bridge

About 11 years ago I wrote a blog about Contract bridge card distributions. When you play bridge, with a normal 52 card deck, it helps to know about how often a particular suit distribution might occur. For example, if you and your partner have 9 Spades, then the opponent’s spade holding of 4 spades might…

1

Cartoon animation works great on Surface Pro

I showed my 9 year old son a cool drawing program called Physamajig, in which users can draw objects, which behave like real physical objects, including reacting to gravity, friction, and bounce. He was having fun with it on my Surface RT and it reminded me of another program. Years ago (around 1981) when I…

1

Advanced debugging: change your program execution without Edit and Continue

Last time (Improve your managed debugging skills: examining registers and memory) we examined some debugging techniques to understand the behavior of managed code.   It might take a long time or many manual steps to reproduce a particular software behavior in an application. Changing the instructions that are executed by the target program while it’s…

1

Embed a ListView inside another ListView for one to many relationships

In the old days (about 16 years ago), FoxPro’s object, containership and inheritance models made it easy to put objects inside other objects. So, for example, a FoxPro grid of Customers could have a column containing a grid of each customer’s orders, and each order, in turn, could have a grid of the order detail…

1

Write your own Linq query viewer

Sometimes you just want to see data in a tabular format. It could be stored in a server somewhere in the cloud, in a SQL server, a FoxPro database, an EntityFramework object, or just a local object. You’d like to see all columns, without having to write code to select each column.   Linq allows…

0

Make your Task Switcher Window bigger

One of the best features of Windows is the ability to Cut and Paste data within an application or from one application to another.     You can alt-tab or click on the task bar to switch between actively running applications, like Word and Visual Studio. When you hit Alt-Tab, a window comes up.  …

0

Area fill algorithm: crayons and coloring book

Kids know how to use crayons and a  coloring book. How do you write such a program?   In my last post (Which pixels do you turn on when you draw a line?) I showed how to draw a line. Now suppose you have some lines or shapes already drawn. How would you write code…

4

Comment/Uncomment code to switch versions quickly without using macros

In a typical day, I write or debug programs in several languages: typically Foxpro, C#, VB, C++ and 32 bit assembly, with an occasional MSIL, IDL and 64 bit ASM thrown in.   Sometimes, I like to switch between one version of code and another. This is useful if I want to do side by…

7