About Adam Young

Once upon a time I was an Army Officer, but that was long ago. Now I work as a Software Engineer. I climb rocks, play saxophone, and spend way too much time in front of a computer.

Soldier Design Competition at MIT

Last night, USMA and MIT went head to head in a design competition. The details are here:

It was cool to be with the Cadets and MIT Students  in such a creative environment.  The designes were smart, focused, low cost, and viable.  Not all of them could be deployed as-is, but even those furthest from from field ready had something to contribute to solving the problems that soldiers face in the field.  While there was not a lot of cross talk between competitors, I think the real value of a compeition like this would be the cross breeding of ideas.

Two different teams provided solutions to trying to keep soldiers cool, in order to prevent heat casualties.  In both cases, the teams approached the solution from trying to cool off the head.  The MIT team made “cool pack” inserts that replaced a portion of the pad in the Kevlar Helmet.  THe packs were activated by punching them, starting an endothermic chemical reaction.  The packs in the display room registered 56 degress, well below the 75 degree or so room temperature.  The problems with the design were that the packs didn’t last long enough, and the helmet had to be removed in order to replace the pads.  That Cadet team created an insert that was composed primarily of lightweight aluminum (There should be another I in that word, dammit!) that acted as a heat conductor.  Small cartridges  at the back of the helmet made of sponges activated the system by evaporation.  The problems with this design were the requirement for low ambient humidity (not a problem in Iraq) and the weight of the solution.  However, What occurred to me is that you could combine the two solutions, use the cold pack to power the conductor, and get the best of both worlds.  I suspect the final design will be somewhere along those lines.

One MIT student had done a stellar job with a wearable Solar energy based electricity generator.  He used fragile solar cells that converted 20% of the sunlight that contacted them, providing 18 Watts of power, just under the 20 Watt target.  The innovative part of his research was in the attempt to make the panels rugged enough to survive the beating soldiers put on them.  Another team of Cadets made a strobe light that was only visible through the latest versions of night vision devices.  THe idea was that older versions had fallen into the hands of the enemy.  The strobe was fragile, and one point they stated that was grounds for further research was making it more durable.  The materials work of the Solar panel project would be a great starting point.

Many of the other projects were wprthy of note:

  • a firewall that was capable of blocking Skype
  • A two battery UPS system for the radios, also field chargeable.
  • A spring and  cable based system designed to pull a HMMWV  turret gunner back into the vehicle in case it is about to flip.
  • A Wireless network for a minefield, allowing the friendly forces to turn off the mines to minimize friendly casualties and collateral damage
  • A “Spy Rock”
  • Two different position systems based on things like gyros, accelerometers, and cheap wireless transceivers
  • A radio controlled dirigible with autopilot capable of carrying a 3 pound payload.

The proejcts were judged by a panel with members from industry, academia, and the military.  It was especially good to see two Command Sergents Major in the panel, with a solid understanding of the harsh reality of the life of the soldiers.  One was the CSM of the Infantry School at Fort Benning.  I can’t think of anyone better equipped to say “Good Idea”, “That is too heavy”, or to ask the question “Is that addressing the right problem.”

There were six prizes donated by several  companies, each of several thousand dollars.  The USMA team won the highest award and the overall trophy.  I was really impressed by the creativity and ingenuity of the students, and the quality of the design process they employed.

Echos of Erudition

Mr. Homer, My Ninth grade English teacher once made a point of describing the joy he felt on that day in Spring when you first notice the buds on the trees.  I’d long forgotten  that description until moving back to Massachusetts.

In California, there are always some trees that have leaves.  The winter months there mean rain and a return to lushness from the brown of Summer.

New England is defined by the transition of colors:  orange, gray,  white, gray, green.
Biking to work these past few days has required a quicker set of reflexes to avoid the reemergence of the joggers.  Many exposed legs and arms iterating above the root-knarled path along the Charles.  They wear t-shirts that don’t quite hide the thin layer of Winter insulation that motivates their activity.

The buds are on the trees, and I only noticed yesterday.  Thanks, Mr. Homer

Faking out PAM Authentication

I am working on a server application that uses Pluggable Authentication Modules (PAM) for authentication support.  This application  must run as root. As part of development, people need to log in to this server.  I don’t want to give out the root password of my development machine to people.  My hack was to create a setup in /etc/pam.d/emo-auth that always allows the login to succeed, provided the account exists.  The emo-auth configuration is what the application looks up to authenticate network connections.

$ cat /chroot/etc/pam.d/emo-auth

account   required   pam_permit.so
auth      required pam_permit.so
session   required pam_permit.so

Now people login with root, and any password will allow them to get in.
Since this is only for development, this solution works fine, and does not require any code changes.

Scripting GDB For a stack trace

I got a stack trace generated from an application like this:

Backtrace[0] 0xee8df698 eip 0x87c3b39
Backtrace[1] 0xee8df6e8 eip 0x87c9dbc
Backtrace[2] 0xee8df838 eip 0x85e3f19

And so on. Here’s how I converted it to something useful:

Copy and past the trace into emacs.

Mark the top left corner (ctrl-space)

Move to the last line, right at the end of the eip.

Alt-X kill-rectangle.

This is a great way to do editing by columns in emacs.

Added the words “info symbol to the begging of each line. I did this by first cutting a return chacter, then doing a search and replace, pasting in the cut ‘return’ as the search criteria, andreplaceing it with the ‘return’ followed by “info symbol “. I use this hack a lot to modify the start or end of all the lines in a file.

Once done, I ran

gdb –command=~adyoung/bugs/myapp/backtrace.txt ./myapp core

Red Day, Green Day

I have started tracking stocks on Yahoo. Not that I am investing, but I find that looking a certain set of stocks helps explain the news. Specifically, I have a list that has two main types of stocks: Tech and Oil. Here is the list:

VMW 10:29AM ET 46.76 Up 0.38 Up 0.82% 251,554 17.93B Chart, Messages, Key Stats, More
YHOO 10:34AM ET 28.33 Up 0.24 Up 0.85% 4,203,632 37.88B Chart, Messages, Key Stats, More
AAPL 10:34AM ET 143.57 Up 3.32 Up 2.37% 8,182,315 126.18B Chart, Messages, Key Stats, More
JAVA 10:34AM ET 16.06 Up 0.15 Up 0.94% 1,501,868 14.46B Chart, Messages, Key Stats, More
DELL 10:34AM ET 19.84 Up 0.37 Up 1.91% 3,191,453 43.34B Chart, Messages, Key Stats, More
EMC 10:29AM ET 14.40 Up 0.07 Up 0.52% 4,446,405 30.26B Chart, Messages, Key Stats, More
IBM 10:29AM ET 114.99 Down 0.53 Down 0.46% 1,447,515 159.18B Chart, Messages, Key Stats, More
ORCL 10:34AM ET 19.79 Up 0.36 Up 1.85% 11,308,559 101.65B Chart, Messages, Key Stats, More
MSFT 10:34AM ET 28.30 Up 0.25 Up 0.89% 10,469,087 263.39B Chart, Messages, Key Stats, More
GOOG 10:33AM ET 449.14 Up 5.06 Up 1.14% 1,378,627 140.75B Chart, Messages, Key Stats, More
GGP 10:28AM ET 38.58 Down 0.13 Down 0.34% 727,075 9.41B Chart, Messages, Key Stats, More
RHT 10:29AM ET 18.31 Up 0.78 Up 4.45% 1,322,182 3.56B Chart, Messages, Key Stats, More
NOVL 10:34AM ET 6.24 Up 0.07 Up 1.13% 304,018 2.20B Chart, Messages, Key Stats, More
BP 10:29AM ET 60.73 Up 0.07 Up 0.12% 1,307,600 191.53B Chart, Messages, Key Stats, More
HAL 10:29AM ET 39.29 Up 0.19 Up 0.49% 2,895,156 34.58B Chart, Messages, Key Stats, More
SLB 10:29AM ET 86.40 Up 1.02 Up 1.19% 1,678,732 103.48B Chart, Messages, Key Stats, More
KBR 10:28AM ET 28.97 Up 0.59 Up 2.08% 140,700 4.92B Chart, Messages, Key Stats, More
XOM 10:29AM ET 86.95 Up 0.75 Up 0.87% 3,768,280 465.18B Chart, Messages, Key Stats, More
MT 10:29AM ET 79.93 Up 1.08 Up 1.37% 1,044,700 113.63B Chart, Messages, Key Stats, More
COP 10:29AM ET 76.21 Up 0.48 Up 0.63% 2,057,477 119.00B Chart, Messages, Key Stats, More
 

A couple of steel stocks are mixed in at the end, and KBR is Kellog Brown and Root, the company that Haliburton spun off and that fed me while I was deployed to Haiti all those years ago. GGP is General Growth Properties, and represents both real estate and the retail market. What I look at first and foremost is the overall color. I don’t care about any particular stock so much as if the tech sector is all red but the oil sector is green, or if the whole thing is one or the other.

I realize that all of this summary info is available on the headlines of the Wall Street Journal or on the finance pages, but there is something about being able to draw your own conclusion from the presentation of the data that makes it easier to comprehend quickly.

Another piece of information that leaps out from this display is if a given stock is behaving differently from its market. There is a difference between Oracle going up 5% on a tech green day and a tech red day.

Tufte would be proud .

Things you can send to Soldiers in Iraq

www.anysoldier.com

Based on What Soldiers have requested, here are things you can send to Iraq. Different units have different degrees of support. Personally, I try to find line Infantrymen like the folks in my old unit 1st Battalion 27th Infantry, The Wolfhounds. Not that everyone else doesn’t need support, too. But these guys are the ones out on the streets patrolling.

  • batteries
  • beef jerky
  • Brownies
  • bumble bee chicken,
  • Camping Food
  • Canned Tuna Fish
  • cereal (whole grain),
  • chapstick,
  • chips and salsa (bean/cheese dip),
  • DVDs
  • energy/Protein bars
  • face wipes
  • Foot Powder
  • Good Coffee, preground.
  • granola bars
  • Letter Writing Material
  • lifting supplements
  • magazines (Maxim, MensHealth, FHM, STUFF, Flex, MuscleFitness, Time, the Economist, Kiplingers, Gun and Auto Magazines)
  • Minute Rice
  • Multi Vitamins
  • Music CDs
  • Olive Drag Green Wool Socks (Army Issue)
  • Oreos
  • peanut butter
  • Playing Cards
  • popcorn (regular, cheese, and caramel flavored)
  • Poptarts
  • Powdered Gatorade
  • Pringles
  • protein powder
  • Razors
  • Sardines
  • shampoo
  • Shaving crème
  • Soap
  • Socks, White
  • Sunscreen
  • Toothpaste
  • trail mix/nuts
  • Video Games (XBOX 360 …)
  • Vienna Sausages
  • White socks, with no patterns

A couple of gdb tricks

If you run a command with arguments in gdb like this

>run -a -b -c

The next time you go to run, gdb will assume you want the same arguments.   You can work around this by running:

>run —

Which tells the standard options to not process anything after the double dash as an option.

Also, If you have a stack track but not a complete core dump, you can find the line that corresponds with an address (say 0x80808881) in the trace  by using

info symbol 0x80808881

More musings

Synagogue would be a hell of a lot more fun if more people heckled the Rabbi.

Ayn Rand seems to appeal to men in their mid twenties.

Martin Fowler is responsible for popularizing some of the most important ideas in software design.

There is an amazing power in large combinations of simple things. The universe is defined by a very small number of rules repeated a lot of times.

Even if we accept that there should be a categorical imperative, how can we determine which aspect of our action should be the generalizable part and which is the part that is adapted to our present situation?

Considering how much information is stored on me in computers, I still have to fill out my address an excessive number of times. Shouldn’t we be at the point that my address is be pre-filled in a web form?

High fiber cereal does not make a good dinner.

Wrestling and rock climbing a very complimentary sports. Both require a sense of balance in your body. Rock climbing develops hand grip strength that is a benefit to wrestling. Both require and develop a strong core.

Binary search is the primary tool of debugging anything.

The build-execute-change cycle is the key to productivity in software. Building high performance software usually kills you in the build step.

We wasted too much time on Drill and Ceremony at West Point. If Napoleon Bonaparte ever invades, the United States Corps of Cadets will be ready.

No drug can be more addictive than the sound of your own child’s laughter.

How to extract from tgz, rpm, and deb files

The most common way to move a bundle of files around in Linux is a combination of tar (tape archive), which appends all of the files together into a single large file,  and gzip, a compression utility.  These are often referred to as tarball. They will have an extension like tar.gz or tgz.  Sometimes bzip2 is used as the comprseeion utility, and they file will end with tar.bz2.

To see the list of files in the  tarball for sage, run:

tar -ztf  sage-2.10.2-linux-ubuntu64-opteron-x86_64-Linux.tar.gz

To extract the files, create a target directory and change to it, thenextract the file from it’s original location

mkdir /tmp/sage

cd /tmp/sage

tar -zxf  ~/Desktop/sage-2.10.2-linux-ubuntu64-opteron-x86_64-Linux.tar.gz

All of the files will be put into the current directory.  There is no rule that says that all the files in a tarball are under on subdirectory, so it really behooves you to do this in a empty directory.  That way you know all of the files you see post extraction are files from the tarball.

Debian uses a package management system called dpkg based on this technology.  The packages will end with .deb, but you can see what Linux thinks the  file type is by using the file command.  Here it is run on automake_1.10+nogfdl-1_all.deb:

 adyoung@adyoung-devd$ file ~/Desktop/automake_1.10+nogfdl-1_all.deb
/home/adyoung/Desktop/automake_1.10+nogfdl-1_all.deb: Debian binary package (format 2.0)

To See the list of included files, run:

dpkg –contents automake_1.10+nogfdl-1_all.deb

And to extract use the –extract command line parameter.  Note that you have to supply the target directory as well.

dpkg –extract automake_1.10+nogfdl-1_all.deb /tmp/deb/

Again, make sure the target directory is empty to avoid intermingling your own files and files from the package.

The letters RPM stand for Redhat Package Manager.  The file extension rpm is used for packages of software designed to be installed on a some distributions of GNU/Linux.   RPM is used on Redhat, SuSE, and distributions based off of these two major distributions, such as Fedora, CentOS, and  OpenSuSE.  RPMs are shipped in a format called cpio. This format has the advantage of allowing longer file names, and providing stroage and compression all in one utility and format.  However, RPMs are not exactly cpio format, and you have to run a converter first, before you can extract the files.  This converter is called rpm2cpio.  It reads the filename in as the first command line parameter, and outputs the cpio file to standard output.  So if you run it without redirecting output, you are going to spew binary data all over your terminal.  Better to redirect it into the cpio utility, with the command line switches -di.  These switches mean extract the files, and build any subdirectories required.  Again, run this in a clean directory:

rpm2cpio ../testware-e.x.p-00000.i386.rpm | cpio -di