Green Folly

April 21, 2009

First experience teaching about meteorites in a classroom

Filed under: Meteorites — Tags: , , , — greenguy @ 7:41 pm

On Friday I had the opportunity to teach a unit on meteorites to a 6th grade science class.  The class was wrapping up a unit on Earth and Space and through my daughter, the teacher was very interested in me bringing in meteorite samples to show the class.  I had no idea what to expect so I created a simple set of definitions and fun facts (listed below) and I chose some representative specimens from the stony, iron, and stony-iron groups:  a 350g SAU 001 end cut that is also shows a great fusion crust example, an etched Campo del Cielo slice as an example for a Widmanstatten pattern, and a very large Pallasovka pallasite slice as an example of a stony-iron.  In addition, as the proud owner of the facecitiously named “World’s ugliest Halloween Meteorite” lot, I also brought in a set of NWA Unclassified specimens from this lot in order to hand out to the kids.

The session lasted for 40 minutes and started pretty slow.  I started going down the one-sheeter I brought while also circulating the SAU 001 and Campo items to the kids for them to feel and look at.  Most could not believe that it had come from outer space.  A few sniffed the meteorites (which I never thought to do!) and said they smelled metallic/coppery.   As they looked at the fusion crust on the SAU 001, I was able to get them to understand that the amount of friction/heat involved when a meteoroid enters our atmosphere is large enough to start melting the specimen.

Once I brought out the large Pallasovka, questions started flying.  The children were engaged and started asking some great questions:

  1. How do people find meteorites?
    1. I explained how many meteorites are found in desert like conditions due to the distinct color differences between the meteorite and the surrounding area
  2. How big of an impact crater would each sample make?
    1. While I could not give exact numbers, I was able to explain that a meteorite would make an impacat crater that is bigger than the meteorite itself.
  3. Why is it called a Widmanstatten pattern?
    1. This was a good time to explain a perk of scientific discovery.  If you are first, you have a good shot to have the discovery named after you.
  4. How does the meteor move through the atmosphere?
    1. This was an interesting one.  I did not understand this one at first ut he was interested in how the fusion crust formed uniformly.  I explained how it most likely rotates while falling, allowing the fusion crust to be somewhat uniform.  This was an off the cuff answer but seemed to suffice.
  5. Are we able to track meteorites before they hit us?
    1. Even though this just happened, I said that they are able to do this for asteroids but that they can’t do it as well for meteorites yet due to the size differences.  In addition, I was able to explain the concept of distance from an astronomical point of view.  Specifically, if someone says that an asteroid is “close”, it is not the same as “my house is close to the school”.  It is more like “Mars is close to Earth”.
  6. The ambitious boys asked if the NWA Unclassified meteorites could be sold on eBay.
    1.  I told them that it is possible but their best bet was to get it classified.  After raised their hopes, I let them down by telling them that classification costs money - more than a 11 year old would have most likely.

Overall, I had a great time and hope I can do it again.  Here is the one sheeter I used to guide my discussion:

Some Definitions

meteoroid, meteor, meteorite: A small rock in space is called a meteoroid. As the meteoroid passes through our atmosphere and generates light, it is called a meteor (or a shooting star). Once the meteor hits the ground, it is called a meteorite.

Fusion Crust: When a meteoroid is entering our atmosphere at high rates of speed, it compresses the air in front of it, generating massive amounts of heat and light. As a result, the meteor starts to melt. Once the melting stops and the meteor starts to cool down, a thin glossy coating forms on the meteor. This is the fusion crust

Widmanstätten Pattern: patterns formed by iron - nickel crystals as they cooled over many years in space. Once a meteorite is etched with acid, you can see the pattern.

Oxidation: when a meteorite with iron in it is exposed to oxygen (like in our atmosphere), the iron will turn to rust due to the process of oxidation

Impact Crater: A depression formed by the high velocity impact of a smaller body into a larger one (think of the craters on the moon - they came from meteoroids!)

Some facts

  1. Meteorites contain the oldest known rocks in our solar system.
  2. The Chesapeake Bay was formed by an impact from an object from space (perhaps a meteorite or comet) over 35 million years ago. The Bay is an impact crater. It is the largest impact crater in the United States!
  3. Meteorites are named for the locale, region, or nearby town in which the “fall” occurred (like Campo del Cielo, Argentina or Pallasovka, Russia).

April 7, 2009

Using DbFit and Fit fixtures on the same FitNesse page

Filed under: Software Development — Tags: , , , — greenguy @ 8:51 pm

A situation has come up at work where I want to use DbFit to test some business logic that is stored in stored procedures.  This is part of our company’s overall effort to reduce technical debt and to get all parties (Product, QA, Dev) talking the same language about our product’s features.

DbFit provides a lightweight and quick way to test this logic.  One of the many benefits of DbFit is that, if you connect to the database in flow mode, DBFit will do transaction management for you.  The DbFit documentation states that when you are in flow mode, “the current transaction is automatically rolled back at the end of the page”.  The alternative to flow mode is standalone mode.  In standalone mode, you need to specify when you want to commit or rollback the transactions (using the DatabaseEnvironment fixture).  In both flow mode and standalone mode, the transaction automatically starts when you connect to the database.

As I was building my DbFit tests, I realized I needed to set up some test data beforehand in the database so that the stored procedure could operate on the test data.  In addition, I would need to delete this data when my test completed so that the test did not leave a footprint.  In my case, I needed to set up a full customer account.  To do this, about 16 tables need data inserted into them.  While I could add all the necessary sql statements to the DbFit test in order to add this data, my group and I had previously created Fit sequence fixtures that we use in other areas that take care of setting up and tearing down a test customer account.  These Setup/Teardown fixtures were already in use in the more “traditional” parts of our FitNesse test suite where the bulk of test pages have been created.

At this point, I am feeling pretty good.  I have a Fit fixture library that can be used to set up a full account and I have DbFit tests that can operate on the test data via the respective stored procedures under test.

However, using database aware Fit fixtures and DbFit fixtures on the same page opens up a slightly thorny issue.  The DbFit tests were originally created to connect in flow mode in order to take advantage of the built in transaction management.    The Fit sequence fixtures I used also created transactions.  As a result, it became very important for me to know what DbFit considers the “end of the page”.

Consider the following flow of my test.  In this example, each line also has a reference to what transaction the statements will run in.

MyAwesomeDbFitTest.SetUp
DBFit:  connect to database in flow mode (TRANSACTION 1)
DBFit: set up a small piece of test data  (TRANSACTION 1)
Fit Fixture:  set up full test customer  (TRANSACTION 2)

MyAwesomeDbFitTest

DbFit:  run queries, execute stored procs, other testing (TRANSACTION 1)

MyAwesomeDbFitTest.TearDown
Fit Fixture:  teardown the full test customer (TRANSACTION 3)

If DbFit considers the test page “the end”,  I am ok.  The DBFit transaction will be rolled back and will not collide with the statements running in Transaction 3 when the Fit fixture is looking to teardown the test account in the database.

However, what I found is that DbFit considers the TearDown page (whether it is a TearDown page for just that page or a TearDown page at the Suite level that is used for each test) as part of the test and thus my overall test started to create blocks in the DB.  Specifically, TRANSACTION 1 was blocking TRANSACTION 3.

As I wondered how long it would be before the DBA police came to my door and revoked my access rights due to the blocks my tests were creating (it was all in a DEV environment, I swear!), I started to think about what I could do to solve this issue.  I thought of two options:

1.  Port the Fit Fixture setup/teardown code to sql statements that could be executed as DbFit fixtures.  This was quickly discarded due the fact that I am not keen on maintaining two copies of code that do essentially the same thing.

2.  Drop into standalone mode for the DbFit tests so I can maintain a tighter level of control as to when the transactions rollback/commit.

After experimenting with option 2, I found that the following test flow will allow for the transactions to commit/rollback as needed and not create any blocks.

MyMoreAwesomeDbFitTest.SetUp
DBFit:  connect to database in standalone mode (TRANSACTION 1)
DBFit: set up a small piece of test data  (TRANSACTION 1)
Fit Sequence Fixture:  set up full test customer  (TRANSACTION 2)

MyMoreAwesomeDbFitTest
DbFit:  run queries, execute stored procs, other testing (TRANSACTION 1)

MyMoreAwesomeDbFitTest.TearDown
DbFit:  issue rollback statment via the DatabaseEnvironment fixture (TRANSACTION 1)
Fit Sequence Fixture:  teardown the full test customer (TRANSACTION 3)

After making the necessary tweaks, the tests ran fine.  However, I still have concerns about the maintainability of this approach.  In order  for other developers to leverage this pattern, they need to understand when the transactions are being created and they need to explicitly manage the transactions.  This is not optimal.  Ideally, a FitNesse page will contain only one type of database aware fixtures, DbFit or homegrown Fit fixtures.  By doing this, transaction management can be pushed to the background and the developer can focus on test writing.

In an ideal world of my own making, another DbFit fixture would be available called QueryUsingFile (this is in addition to the free beer that would be present in this ideal world as well).  It would allow me to specify a path to a file and would execute the SQL statements within the file.  By doing this, I could organize a set of scripts to be used by any DbFit test and I could keep the test page code to a minimum.  DbFit already has a ConnectUsingFile option so it  seems a QueryUsingFile fixture would not be a big leap.

If I get a chance, I’ll post a sanitized version of the DbFit test that illustrates the pattern above.

March 21, 2009

Interesting pics of new NWA 5437 meteorite

Filed under: Meteorites — Tags: , , , — greenguy @ 7:56 pm

NWA 5437 is the provisional number of the first meteorite I have ever gotten classified.  It is classified as a LL3.5 ordinary chondrite.
The LL in the classification stands for low-iron and low metal.  These type of meteorites typically have fairly large chondrules.  This type of classification is rare and the meteorite also has a low total known weight, adding to the overall rareness of this fall.

While cutting a set of pieces today, I came across two nice specimens.  The first one illustrates the beautiful chondrules that are contained in this meteorite.

In the second item, I was pleasantly surprised to see a matrix that went from grey to brown.  The grey matrix is usually associated with meteorites that are not very weathered.  As a result, less oxidation has occurred within the meteorite.  A brown matrix is indicative of slightly more weathering.  In the pic below, the transition is pretty clean.  Perhaps part of this meteorite was buried or protected in some way?  Since I did not find this item in situ, I can only guess.  In any case, I am certainly pleased with the result of the sawing and preparation.  If I had cut this item in a different way, I may have never come across this part of the matrix.  This is definitely a case of being more lucky than skilled!

July 7, 2008

Thing2 Summer Project: Part 1

Filed under: LifeShock — thing2 @ 9:25 pm

[note from GreenGuy:  my two older daughters (Thing1 and Thing2) have taken on summer projects to keep their brains from turning to mush over the school break.  Thing2’s summer project is to learn about and simulate a tornado.]

My summer project is on natural disasters. I will do an experiment on one natural disaster…in other words a tornado. I am doing this project because I want to know what harm tornadoes do to living organisms and the environment. I first got interested in natural disasters in third grade when our class did posters on natural disasters.

For my tornado project I will take every day items to represent a tornado. I want to to get 2 big empty plastic soda containers and put them together, top to top. I will put water in one bottle filled almost to the top. I need to make sure the 2 bottles are secured tightly. Then I put the bottles vertically and I’ll shake the bottles until it makes a tornado in the water.

In addition to the tornado experiment above, I will learn many details about tornadoes like

  • When tornadoes occur

  • Where tornadoes occur

  • What happens during a tornado

  • What happens to living organisms during a tornado

  • What type of storms make tornadoes

Thing1 Summer Project: Part 1

Filed under: LifeShock — thing1 @ 9:03 pm

[note from GreenGuy:  my two older daughters (Thing1 and Thing2) have taken on summer projects to keep their brains from turning to mush over the school break.  Thing1’s summer project is to learn about and build a computer.]

What am I doing for the project?

I am going to build my own computer with a little help from my Dad. My goal is to be able to access the Internet and other programs.

Why did I pick this project?

  • I think it will be a great experience
  • I have a big interest in computers now
  • I want to set a goal for myself to reach
  • I would like to have my own computer

How?

  1. Test the computer before it is taken apart to make sure it works
  2. My Dad will take it apart and give me the parts
  3. I will put it back together using diagrams/manuals
  4. I will test it to make sure it still works and I have succeeded

July 6, 2008

Sunday morning boredom

Filed under: General — Tags: , , — greenguy @ 10:51 am

I watched the Andre the Giant biography on A&E yesterday.  As a result, I started to wonder about the other wrestlers that were burned into my brain back in the 80s when I was a young and impressionable kid.  Below is what I found over the course of about 1 hour on wikipedia.  I was flabbergasted that Jimmy Snuka was still wrestling.  He was old (for a wrestler) when I watched him 20 years ago.

Lastly, I have become way too knowledgeable about wrestling lingo (heel? facekayfabe?).  I need to read some Sun Tzu or Lao Tzu and get my brain cells back in balance.

  • Andre the Giant - died 1993
  • Big John Studd - died 1995 from liver cancer and Hodgkin’s disease
  • Bam Bam Bigelow - died 2007 of drug overdose
  • Hulk Hogan - alive
  • Jimmy “Superfly” Snuka - still alive and wrestling
  • Ricky ” The Dragon” Steamboat - still alive
  • British Bulldog - died 2002 from heart attack
  • Owen Hart - died 1999 during a wrestling stunt (fell 78 feet to ring)
  • Bret “the Hitman” Hart - still alive
  • Jim “the Anvil” Neidhart - still alive
  • Junkyard Dog - died 1998 from car accident
  • Ultimate Warrior - still alive
  • “Ravishing” Rick Rude - died 1999 from heart failure/ drug overdose
  • Randy “Macho Man” Savage - still alive
  • Ted “Million Dollar Man” DiBbiase - still alive
  • King Kong Bundy - still alive and wrestling
  • Hillbilly Jim - still alive
  • Razor Ramon - still alive
  • Jake “the Snake” Roberts - still alive and wrestling
  • Brutus “the Barber” Beefcake - still alive and wrestling

Now on to house chores.  I need to fish a HDMI cable through a wall.

June 23, 2008

Poor man’s file compare with Powershell

Filed under: Powershell, Tech — Tags: , , — greenguy @ 6:41 pm

Frustration levels went high today as I was burned by another bad config in our prod environment.  While we wait for a more robust config file management tool that will handle all our web app configs and service configs, we have relied on a Powershell script that stages code for prod and tweaks the config files so that any environment specific changes for prod are made.  In the latest case, a bad config was checked into our repository and the Powershell script failed to catch the new pattern.  To get around running a diff tool against each file before each release (we have dozens of configs), I wrote the following script that serves as an indication as to what files are out of sync.  Operations can now run this script to understand what config changes are about to happen.


function CompareFileContents([string]$filepath1, [string]$filepath2, [string] $logFile)
{
write-output “Comparing $filepath1 to $filepath2″ | out-file $logFile -append
Compare-Object -referenceObject $(Get-Content $filepath1) -differenceObject $(Get-Content $filepath2) -syncWindow 0 | out-file $logFile -append
}

$date = Get-Date
$configDiffLogFile = “D:\builds\ConfigFileCompare{0}{1:d2}{2:d2}-{3:d2}{4:d2}.txt” -f $date.year,$date.month,$date.day,$date.hour,$date.minute
write-output “The config file diff output will be stored at $configDiffLogFile”

CompareFileContents \\qapapp01\e$\SAJServices\ReleaseStage\PriorRelease\svc\SnagAJob\SAJ.EmployerSearch\SnagAJob.EmployerSearch.WinHost.exe.config \\qapapp01\e$\SAJServices\ReleaseStage\ReleaseToDeploy\svc\SnagAJob\SAJ.EmployerSearch\SnagAJob.EmployerSearch.WinHost.exe.config $configDiffLogFile

Couple of items on the script:

  1. The “-syncWindow 0″option ensures that each lines match sequentially. So if someone moves a line further down in the difference file, even though it has a match in the reference file, the change will be logged.
  2. The filename format came from this post about a nifty way to use the -f format operator

June 7, 2008

Thoughts on volunteering at Special Olympics

Filed under: General — greenguy @ 8:43 pm

Yesterday I had the chance to help out at a Special Olypmics event that was held at the University of Richmond.  A coworker at SnagAJob.com had broadcast a need for volunteers.  Her sister was the coach for the Area 26 team out of Northern Virginia.  I was attempting to volunteer as a chaperon but somehow my volunteer form was “lost in the mail” so I was not able to volunteer in that capacity.  Nevertheless, I was able to help the coach out during the day.

I essentially functioned as gopher for the coach and a supervisor for the atheletes while they waited for there events to start.  Even though the weather was extremely hot and humid (97 degrees and 80% humidity), the athletes were ready to roll.  I met some wonderful people and passed the time via long converstations with some of the athletes (namely David and Catie).  I was interested in one of the athletes, Bruce, who looked to be in a trance as he ran a very effective 1500m race (good pace, especially in the heat).  I hope I can reach that level of calmness during my training.

Overall, I was impressed with the motivation of the athletes and the show of support that the athletes showed for each other.  In addition, one of the athletes on a different team was most definitely an elite athlete.  She was fast while competing in the pentathlon and I found out from one of the other parents that she had completed a marathon.  Regardless of their level of disabilities,  the simple ability to train and ultimately compete in these type of adverse weather conditions was very impressive.  I am glad that I was able to help out in a small way.

Helpful hints on connecting to Cisco VPN on Ubuntu Hardy Heron

Filed under: ubuntu — Tags: , , , , , — greenguy @ 8:23 pm


The Long Story

You can get to the Short Story by scrolling down

After getting a new wireless router and moving my desktop PC (running Windows XP) upstairs to the hallway, I went to work getting my VPN connection to SnagAJob.com up and working again. My plan was to try it out from the desktop PC (which worked when it was directly connected to the cable modem) and ensure that the VPN connection worked over the wireless network. Afterwards, I would then try to get a the Cisco VPN client working on my laptop, which is running Ubuntu (v8.04).

I was completely unsuccessful in getting my XP box to connect to the VPN client. The client would attempt to initialize the connection but would fail each time. The obvious culprit must have been the router. I am using the Netgear WPN824v3 Rangemax router. I tried changing the following settings on the router but with no success:

  • turned off the SPI (stateful packet inspection) firewall

  • turned off NAT filtering

  • turned on “respond to ping requests from the internet”

  • turned on port forwarding that are relevant for my type of VPN connection.

After a few hours of increasing frustrating results and feeling strangely exposed to the bad boys on the internet, I let things idle for a while. A couple days later, I attempted to connect to the VPN using my laptop. I wanted to use the Cisco VPN client and found the following instructions (http://www.longren.org/2007/05/17/how-to-cisco-vpn-client-on-ubuntu-704-feisty-fawn/). However, the instructions make clear that the client would not work on my version of the Linux kernel.

Feeling dejected and alone (and still exposed), I searched for other VPN clients that would work. Very quickly, I found that KVpnc (http://home.gna.org/kvpnc/en/index.html) may work. I installed that and then installed the free Cisco client, vpnc (http://www.unix-ag.uni-kl.de/~massar/vpnc/) using the Synaptic Package Manager. I fired up KVpnc and imported the Cisco client profile for my VPN connection (*.pcf). I selected the imported profile and went to connect. Success! I then started dialing back all the router changes I made and testing connectivity after each change. Each time, I was successful in connecting.

Next on the list was to remote desktop into my work machine so I could access my dev environment. I fired up rdesktop and tried to connect to my work machine over port 3389. I had no luck. After a little more searching, I found that the tsclient program was better suited for my needs. I fired that up and entered the relevant info. I experimented with different resolution sizes, but ended up selecting the full screen option. I was able to remote into my work PC. However, I had no way to get back to my local desktop. Tsclient does not have a toolbar like the Windows version does. I could log off my work PC to end the session but I like to toggle from local to remote a lot during a work day. After more searching, I found that Ctrl+Alt+enter should toggle me back to my local PC. I did this and the screen flickered to the local workspace and then went back to the remote PC. After more searching (as an aside, I would be a complete idiot without Google search – I need a direct neural interface to their search engine) I found that this behavior was due to a bug in rdesktop. It appeared to revolve around the Desktop Effects feature that makes things “pretty”. There were a multitude of workarounds suggested but after reviewing these, it seemed the most practical solution was to just turn off desktop effects altogether. Just like I want my coffee black, I like having a desktop that is “effect free” I kept the OS default desktop effect option up until now since it did not appear to impact system performance, but this rdesktop bug was a great excuse to turn the effects off. After turning the Desktop effects off, I was able to use the Ctrl+Alt+Enter key combo to toggle from local to remote. Finally!

I still have not had success in getting my XP desktop to connect to my work VPN.  I am giving up on that box since my laptop now works.

The Short Story

To connect to a Cisco VPN from Ubuntu 8.04 (note that there are different Cisco VPN configs out there. These steps worked for me but mileage may vary).

Environment

  • Ubuntu 8.04 (Hardy Heron) on local machine
  • Windows 2003 server on remote machine
  • Wireless network with Netgear WPN824v3 Rangemax router – default router options
  • Cisco VPN (unsure of exact type used at work)
  • Already have a known Cisco client profile that works in XP (when directly connected to local cable modem)

Assumptions

You know how to install applications on Ubuntu using the Synaptic package manager or the Applications → Add/Remove feature. If not, see

Steps used to connect to VPN

  1. Open up first bottle of Sam Adams, take small swig
  2. Install KVpnc using the Synaptic package manager or using the Applications → Add/remove feature
  3. Copy your Cisco client profile from your Windows box to a directory on your Ubuntu installation
  4. Run KVpnc (should be located at Applications → Internet) and select Profile → Import Cisco pcf file. Navigate to the location where you stored the pcf file and select it. Click OK.
  5. Install vpnc using the Synaptic package manager or using the Applications → Add/remove feature
  6. In KVpnc, go to Settings → configure kvpnc and select “Daemons” under “Programs”.
  7. Check that the path used for vpnc is correct and that it points to where the vpnc program was installed to. Once you are set, click OK.
  8. Get another beer.
  9. On the main kvpnc window, you should see a Profile dropdown that has the name of the profile you imported. Select that profile and click Connect.

You should now be connected.

If you want to remote desktop into a another PC follow the following steps:

  1. Go to System → Preferences → Appearance
  2. Go to the Visual effects tab and select “None”. Click Close.
    1. If you really are attached to the visual effects used in Ubuntu, you can try the workarounds located at https://bugs.launchpad.net/ubuntu/+source/rdesktop/+bug/153995. I have not tried them and do not know if they work.
  3. Run tsclient (Applications → Internet → Terminal Server Client)
  4. Click the Display tab.
  5. Select “Operate in full screen mode”
    1. Note: you can select your own resolution as well here. The default was 800×600 but that just doesn’t fly with me.
    2. Note 2: Do not click “use alternate full screen switch”. It added an invalid command to the command list for rdesktop and hosed the connection attempt
  6. Go back to the General tab and enter the computer name and your user name and password. You can save this info via the “Save As” button. Once you do this, the profile will be available under the “Quick Connect” dropdown
  7. Click Connect
  8. Get the nachos and another beer if you are so inclined.
  9. Sit back back down and wonder if the ability to log back into work from home is such a good thing after all.

May 29, 2008

Twitter Updates for 2008-05-29

Filed under: General — Tags: , — greenguy @ 11:59 pm
  • In a demo of iRise #

Powered by Twitter Tools.

Newer Posts »

Powered by WordPress