Posting Math Equations with Latex

May 16, 2008 by Dane White

I just read that WordPress has a feature for displaying \LaTeX in your blog, which made me momentarily reminisce about college. I couldn’t resist throwing down an equation to see how it looked. So here’s the Taylor series for the sine function:

\sin x = \sum\limits_{n = 1}^\infty {\frac{{\left( { - 1} \right)^{n - 1} x^{2n - 1} }}{{\left( {2n - 1} \right)!}}}

Here’s a link showing how it’s done:

http://faq.wordpress.com/2007/02/18/can-i-put-math-or-equations-in-my-posts/

Posting Source Code on WordPress

May 9, 2008 by Dane White

Formatting code snippets for display in a blog post can easily become a tiresome battle between you and the WordPress WYSIWYG. Read the rest of this entry »

Yet Another Article on Technical Debt

April 22, 2008 by Dane White

The term ‘technical debt’ was first used by Ward Cunningham to describe the deferment of development costs due to code decisions that are quick, short-term fixes. Here is an excerpt from his talk at OOPSLA ‘92: Read the rest of this entry »

What makes a number magic?

April 21, 2008 by Dane White

An old programming rule is to never use ‘magic’ numbers. As a reminder, a magic number is a numeric literal that appears in the code with no explanation of what the number represents. Here’s a contrived example: Read the rest of this entry »

Guidelines for Collection Properties

April 14, 2008 by Dane White

When writing a class that has a collection property (a property that implements the ICollection or ICollection(T) interface), there are a few guidelines that can help with the decision of what type of collection to use. Read the rest of this entry »

Ground Guidance Geocaching

April 9, 2008 by Randy Milbert

As our Magellan launch approaches, we plan on performing periodic outdoor tests using Ground Guidance Handheld in realistic scenarios such as hiking, hunting, and geocaching.  To that end, we paired up and selected nearby parks to try our hand at geocaching.  Here are excerpts from the resulting trip reports.

Participants: Andrew Seelke and Andreas Robinson

Where did you go?

  • Vadnais Snail Lake Regional Park, Vadnais Heights, Minnesota

What did you like?

  • Trail data was extremely useful, and seemed to be very comprehensive.  Routes following trails performed extremely well.
  • Route at one point cut across a marsh area between trails on opposite sides.  Shortcut was actually quite a bit faster than going around, however, only viable in the winter.
  • Backtrack feature was extremely useful, as was ability to edit and route to locations.

What did you dislike?

  • User interface could use some improvement.  Supporting a degree/minute/second format could be useful.
  • A “North Up” option might be valuable.  Also, an arrow pointing North while the display is following the user might be useful.
  • 100K topo maps are quite low-res and not as useful as the land-cover; perhaps when using those low res topo maps, the software should default to land-cover. 

Participants: Benjamin Post and Kyle Estes

Where did you go?

  • Lilydale/Harriet Island Regional Park, Saint Paul, Minnesota

What did you like?

  • Impressed with the routing itself.  On a 2km path, it kept us on trails for about 1.75 km, and the last 250 meters was out in a grass/marsh area.  In this area, it adhered to the map data and led us on what the map data was showing as grass.  It was all marsh, but this shows the limitations of having to rely on accurate map data.
  • Another routing comment, really appreciated the fact that it routes around difficult areas to pass.  Additionally, it was able to route us to a draw that was not visible from our initial vantage point along the ridge.
  • I found Ground Guidance useful as a “digital handrail”, where it guided me even if I wasn’t exactly following the suggested route, but rather taking the route as a general suggestion and making small navigational deviations to optimize footing and avoid small obstacles

What did you dislike?

  • Display screen was too glossy and made daylight operations difficult.  Even shading the screen wasn’t enough.
  • On the cost grid display, combination of the glossy screen and not enough contrast between the red and green made for difficult reading.
  • Switching maps took a while, and caused other functionality of the device to halt until completed.

Participants: Erik Freed and Robert Dahlstrom

Where did you go?

  • Kaposia Park, South Saint Paul, Minnesota

What did you like?

  • If you use the generated routes more as a guideline rather than a strict course, it works great. The routes give you a basic direction you need to follow, and if you are willing to do a little improvisation, you can resolve the short range details like finding the choice path down a steep hill or an open pass through a thick grove of trees and brush.
  • There was a time when we were walking along a trail, and could see our destination at the top of a steep hill, while the route went around behind it, out of visual range. We contemplated just tackling the hill outright, but instead decided to see what cards the software had to play. When we made the bend in the route we could then see a nice gradual slope up to the top of the hill, a much easier route, even when considering its was much longer.
  • Displaying track was useful for showing general bearing and indicating that we were walking parallel to the route.

What did you dislike?

  • The Magellan unit took over ten minutes to obtain a satellite fix. While it was warming up it provided no feedback as to what it was doing. I didn’t like the idea that we might get to the park and have to wait around, or have to return to the office.
  • The generated routes often crossed difficult, steep hills, and did not seem to recognize a walking trail through the area. On a vehicle the routes given would be virtually impossible to follow strictly.
  • One route required the user to pass over a small flowing creek, and then a few yards ahead, turn around, and go back over the creek in a slightly different direction.

Participants: Nathan Vanderby and Randy Milbert

Where did you go?

  • Central Park, Roseville, Minnesota

What did you like?

  • Majority of routes were good
  • Ground Guidance estimated that our 1.1 mile route to the “Bump Set Spike” geocache would take 22 minutes and it actually took 18 minutes
  • It took two to three minutes to enter geocache; that is not too bad

What did you dislike?

  • No support for degrees and minutes coordinate format (e.g. “N 44° 58.704 W 093° 11.275”) used on the Geocaching (http://geocaching.com) web site
  • Cannot road route to park parking lot.  Had to use separate Magellan device to plan route to park.
  • Route did not regenerate when we were way off course.

How to Unit Test It

April 8, 2008 by Dane White

So you’re creating some unit tests, but aren’t sure what to use as your test cases. Here are a few guidelines to get you started: Read the rest of this entry »

A few words about boxing and unboxing in .NET

March 31, 2008 by Dane White

In short, boxing allocates storage for a value type on the heap by copying it to an object instance. Remember that value types such as int, string, struct and enumerations are allocated on the stack and that reference types (classes) are allocated on the heap. Boxing is simply the process of moving a value type from the stack to the heap. Unboxing then moves a boxed value type from the heap back to the stack, but has to perform a type conversion not required in the boxing process. Read the rest of this entry »

The Manchus Like Land Warrior

March 11, 2008 by Kyle Estes

I stumbled across the Land Warrior Overview 2007 video (wmv) on the Program Executive Office (PEO) Soldier website. In it, soldiers of the 4th Battalion, 9th Infantry Regiment (4-9 INF), the Manchus, talk about how useful the Land Warrior has been during their missions in Taji, Iraq.

Apparently, the 4-9 hasn’t always been impressed with Land Warrior. However, according to Noah Shachtman, some of the the soldiers are coming around, due primarily to decreases in system weight, from about 16 to 10 pounds, and software enhancements like the tactical chem-light (a means of dropping blinking lights on the map to mark locations). I am glad to hear this; ever since I read about the OICW in a 1998 issue of Popular Mechanics, I have been interested in Land Warrior. In fact, I count that interest as one factor which earned me a position here at Primordial in 2004.

The overview video has some great clips of soldiers talking about why they like Land Warrior; here are some that stand out.

SSG Mathew Dodge

SSG Mathew Dodge, B CO 4-9 INF, on the similarities between Land Warrior, FBCB2, and FalconView:

“The biggest plus of the system are the ability to upload map data. It’s almost like having an FBCB2 or a FalconView system right on your face, where you can see and upload maps and tactical graphics. To be able to see the SA, the situational awareness feature, is absolutely outstanding…I love the system sir, I think that I’ve done, like I said, 6 previous deployments without it, used GPS, FalconView. This system is definitely making its money here, I’m very very happy with it.”

On team leaders carrying Land Warrior:

“I’m a big advocate for allowing the team leaders to carry it. I think it helps lower leaders as well as higher leaders to understand the battlespace, what’s going on, real time information, and down to the team leader level, I think it is very necessary.”

CPT Pat Roddy

CPT Pat Roddy, C CO CDR, 4-9 INF, describes the usefulness of the tactical chem-light:

“We had planned a target where we were going to do a cordon and search of a cache, and it was approximately 7 or 8 clicks away from our patrol base. As we were moving towards the objective, the battalion empassed us further information on parts of that target that were located about 7 or 8 hundred meters north of the primary objective. We were able to use the tactical chem light capability to pretty much just drop chem lights on the route, to handrail them from the primary objective to the follow on targets, and box in that objective. So, as they were moving from the patrol base to the target, they could receive that update on the move, hit the primary objective, and move directly to the secondary target without missing a beat.”

I love videos like this one, because they help me understand our users better. I can only hope that with Primordial’s membership in EDGE Warrior, and with our ongoing phase II Small Business Innovation Research (SBIR) effort, maybe we will get the chance to help soldiers using Land Warrior kick even more butt.

Improved Thread Critical Regions in .Net

March 10, 2008 by Dane White

A critical code region is an area of code that must be executed in its entirety to avoid placing the software into an unstable state. For example, the acquisition and release of a mutex lock should be within a critical code region because code failure while the lock is acquired may place the software into deadlock. Critical code regions were introduced to the Thread class in .Net 2.0. Using the Thread.BeginCriticalRegion method notifies CLR (Common Language Runtime) hosts when a failure occurs in a critical region of code, and allows the host to respond accordingly. However, this does not prevent the Thread.Abort() method from killing the thread. We may want to be able to stop a thread, but not risk stopping it in a critical region. We can do this with some usage of a DataSlot on the Thread. Here is the class prototype and private data: Read the rest of this entry »