PSA: Evel Knievel, Dead at 69


Evel Knievel, the hard-living motorcycle daredevil whose jumps over Greyhound buses, live sharks and Idaho’s Snake River Canyon made him an international icon in the 1970s, died Friday. He was 69.

via Fark with the headline: “Evel Knievel has died of natural causes… who would have seen that coming 40 years ago?”

Sick and Finals

I’m come down with a rather nasty cold (or something, crossing my fingers for cold though). It’s been really bad today and yesterday, so I’m hoping that I’m reaching the peak of this thing and will be back in full force for next week.

Next week also happens to be the last week of school before finals. Four days of school, Friday off, and then finals on Saturday, Monday and Wednesday.

I think the good news about finals is that two of my classes are going to be 100% take home finals (Digital Logic and Engineering Circuit Analysis). Advanced Engineering Math is also going to have a take home section.

Finished Star Trek: The Next Generation

I finished watching all 176 episodes of Star Trek: The Next Generation (TNG). According to NetFlix, I started watching late January of 2007. Call it 300 days. So, 1.7 days to watch each episode. Don’t forget that I also was also interspersing movies throughout the entire time.

TNG is what I grew up with and wanting to see every single TNG episode is what started me on this quest just over two years ago (I returned the first disc of Star Trek: The Original Series on 10/17/2005). I’m honestly not a huge fan of the Original Series. This and the fact that the Original Series only has two episodes per a disc is why it’s taken almost 2 years to get almost 40% of the way through.

My unofficial goal is to be finished with everything by time I graduate in May 2009. That’s 446 episodes in 528 days; 1.18 days per an episode. I can manage that.

The goal is to finish the TNG movies by the end of finals and then maybe start on DS9. My guess is that I probably won’t get a solid start on DS9 until after I come to school in January.

Stats as of completing Star Trek Generations Movie:

Minutes Seen: 13125
Hours Seen: 18.75
Days Seen: 9.11458333333333
Episodes Seen: 287 (movies count as one episode)
% Complete: 39.50%

Stay updated at:

Other Properties of Prussian Blue

As told by Wikipedia:

  • It is electrochromic-changing from blue to colorless upon reduction. This change is caused by reduction of the Fe(III) to Fe(II) eliminating the intervalence charge transfer that causes PB’s blue color.
  • It undergoes spin-crossover behavior. Upon exposure to visible light the Fe(III) centers change from low spin to high spin. This spin transition also changes the magnetic coupling between the Fe atoms, making PB one of the few known classes of material that has a magnetic response to light.

Despite the presence of the cyanide ion, PB is not especially toxic because the cyanide groups are tightly bound.

As a note, the chemical formula of Prussian Blue is Fe7(CN)18(H2O)x where 14 ≤ x ≤ 16. Cyanide is the CN part.

I was able to find out this relatively useless, albeit interesting, information due to a flaw in Wikipedia that allows one to wonder through the system aimlessly.

I had watched and then was reading up on the Star Trek: The Next Generation episode “Thine Own Self” on Memory-Alpha which links to the Goiânia accident which links to Prussian Blue.

Combination Lock

I have a long standing desire post my school work online. There are a couple reasons for this:

  • I usually work too long and too hard to just turn it in to teacher
  • I believe that by posting my work, I will help others

There is always the concern that someone may just cold spike it1, but I think the benefits are clearly present.

Now a slight tangent on “cold spiking.” I just now looked it up on Urban Dictionary:

cold spike

To copy homework with no understanding of how to do it. Typically accomplished in the 10 minutes before said homework is due.

Originates from the Colorado School of Mines, where cold spiking is so revered that every year they award a prize for the best spiker.

Hey Jeremy! Let me cold spike your thermo or I’ll beat you bloody.
by Spjorkster Mar 10, 2005

A couple thoughts: I don’t know who “Spjorkster” is. I don’t cold spike; it’s stupid and I rather not turn in the homework. The term has been around since at least 2005, that’s amazing.

So now the project. The object reads:

The objective of this take-home project is to design and implement an electronic combination lock. The combination lock is to have a start-up combination code of 1-2-3-4 that MUST be changed immediately upon first-time activation. Furthermore, if the new combination code has three numbers all the same then an error message is to be sent and a different code has to be entered as the combination. Each number in the four-number combination code is to be an eight-bit vector.

The requirements are thus:

The combination lock design MUST be implemented as a state machine (using VHDL), with a minimum of three states: open, lock, set_combo. More that three states may be used (may or may not require greater than 3 states). The outputs should include a lock signal, indicating that the lock is currently locked, an open signal indicating that the lock is currently unlocked. The data inputs are to include the combination code (for when setting a new unlock code.) Additional there is to be a mechanism for resetting the entire circuit. Plus your design is to handle the succession of three wrong guesses at the combination by going into a security mode in which the initial code (1-2-3-4) followed by the entry of the correct code is required to unlock the lock. In your simulation waveforms, you MUST display the state variable (this will display the states traversed in setting, locking and unlocking the combination) along with the inputs and outputs.

There must also be at least four cases in which the combination is incorrect and at least three cases in which the combination is correct. And there is to be a string of three consecutive wrong attempts to unlock putting the circuit in the the security mode in which the initial code (1-2-3-4) immediately followed by the entry of the correct code is required to unlock the lock Remember to include in your report all schematics and/or VHDL code, simulation waveforms and state diagram/table.

Doing this all in VHDL isn’t as painful as I thought, but it was still very painful. I think the only thing I hated programing more so far was threaded tasks in Java. The idea of using states is somewhat similar, but not the same functionally.

Here’s the plan in a nutshell:

Yes, I did that state diagram. Isn’t it pretty?

Here’s the code:

LIBRARY ieee;	
USE ieee.std_logic_1164.all;

ENTITY combinationLock IS
	PORT(	Clock, Reset		: IN		STD_LOGIC; -- use positive logic for the reset
			w					: IN		STD_LOGIC_VECTOR (1 DOWNTO 0); -- user action: 00 is no action; 01 is action; 11 is lock
			a					: IN		STD_LOGIC_VECTOR (7 DOWNTO 0); -- digit a input
			b					: IN		STD_LOGIC_VECTOR (7 DOWNTO 0); -- digit b input
			c					: IN		STD_LOGIC_VECTOR (7 DOWNTO 0); -- digit c input
			d					: IN		STD_LOGIC_VECTOR (7 DOWNTO 0); -- digit d input
			aCode				: BUFFER	STD_LOGIC_VECTOR (7 DOWNTO 0); -- code of the first digit
			bCode				: BUFFER	STD_LOGIC_VECTOR (7 DOWNTO 0); -- code of the second digit
			cCode				: BUFFER	STD_LOGIC_VECTOR (7 DOWNTO 0); -- code of the third digit
			dCode				: BUFFER	STD_LOGIC_VECTOR (7 DOWNTO 0); -- code of the fourth digit
			unlockAttempt		: BUFFER	STD_LOGIC_VECTOR (1 DOWNTO 0); -- to keep track of how many attmpts have been made to unlock
			isLock				: OUT		STD_LOGIC; -- is the safe locked
			isError				: OUT		STD_LOGIC); -- is there error -- both lights on indicate in combo setting mode!
END combinationLock;

ARCHITECTURE Behavior OF combinationLock IS
	SIGNAL y : State_type;
	PROCESS( Reset, Clock)
		IF Reset = '1' THEN
			aCode <= CONV_STD_LOGIC_VECTOR(1,8);
			bCode <= CONV_STD_LOGIC_VECTOR(2,8);
			cCode <= CONV_STD_LOGIC_VECTOR(3,8);
			dCode <= CONV_STD_LOGIC_VECTOR(4,8);
			y <= SET_COMBO;
		ELSIF (Clock'EVENT AND Clock = '1') THEN
			CASE y IS
					IF (w(1) = '0' AND w(0) = '0') THEN
						y <= SET_COMBO;
					ELSIF (w(1) = '0' AND w(0) = '1') THEN
						IF ( ( (a = b) AND (b = c) ) OR ( (a = c) AND (c = d) ) OR ( (a = b) AND (b = d) ) OR ( (b = c) AND (c = d) ) )THEN -- three numbers are repeated -- ----- 
							isError <= '1';
							y <= SET_COMBO;
						ELSE -- program new code
							aCode <= a;
							bCode <= b;
							cCode <= c;
							dCode <= d;
							isError <= '0';
							y <= LOCK_OPEN;
						END IF;
					END IF;
					isLock <= '0';
					unlockAttempt <= CONV_STD_LOGIC_VECTOR(0,2); -- reset the security lockout
					IF (w(1) = '0' AND w(0) = '0') THEN
						y <= LOCK_OPEN;
					ELSIF (w(1) = '0' AND w(0) = '1') THEN
						y <= SET_COMBO;
					ELSIF (w(1) = '1' AND w(0) = '1') THEN
						y <= LOCK_SECURE;
					END IF;
					isLock <= '1'; -- set the lock indicator
					isError <= '0'; -- clear all errors because it's locked now

					IF (w(1) = '0' AND w(0) = '0') THEN
						y <= LOCK_SECURE;

					ELSIF ( w(1) = '0' AND w(0) = '1') THEN
						IF (unlockAttempt = CONV_STD_LOGIC_VECTOR(0,2) ) THEN
							IF (a = aCode AND b = bCode AND c = cCode AND d = dCode) THEN
								y <= LOCK_OPEN;
								unlockAttempt <= CONV_STD_LOGIC_VECTOR(1,2);
								y <= LOCK_SECURE;
							END IF;
						ELSIF (unlockAttempt = CONV_STD_LOGIC_VECTOR(1,2) ) THEN
							IF (a = aCode AND b = bCode AND c = cCode AND d = dCode) THEN
								y <= LOCK_OPEN;
								unlockAttempt <= CONV_STD_LOGIC_VECTOR(2,2);
								y <= LOCK_SECURE;
							END IF;
						ELSIF (unlockAttempt = CONV_STD_LOGIC_VECTOR(2,2) ) THEN
							IF (a = aCode AND b = bCode AND c = cCode AND d = dCode) THEN
								y <= LOCK_OPEN;
								unlockAttempt <= CONV_STD_LOGIC_VECTOR(3,2);
								y <= SECURITY_MODE;
							END IF;
						ELSIF (unlockAttempt = CONV_STD_LOGIC_VECTOR(3,2)) THEN
								y <= SECURITY_MODE;
						END IF;
					END IF;
					IF (w(1) = '0' AND w(0) = '0') THEN
						y <= SECURITY_MODE;
					ELSIF (w(1) = '0' AND w(0) = '1') THEN
							unlockAttempt <= CONV_STD_LOGIC_VECTOR(2,2);
							y <= LOCK_SECURE;
						END IF;							
					END IF;
END Behavior;

In all states (except Reset, which isn’t defined as typical state), ’00’ is used to stay within the state. ’01’ is used as an action key and ’11’ is used to lock the device (as noted with comments within the VHDL code). isError is ‘1’ when a user has entered a new invalid combination (any combination with where 3 digits are the same). Security Mode is entered when three unsuccessful attempts have been made to unlock the device. When this happens, the Security Mode-state is entered and the user must enter ‘1 2 3 4’. When this happens, the user is sent back to the Lock Secure-state and is granted one try before being kicked back to the Security Mode-state. However, if the attempt is correct, the user is sent to the Lock Open-state where they can change the combination or lock the device again.

Here’s the schematic:

…and the waveforms, which shows that it does indeed work:


Note: realACode, realBCode, realCCode, realDCode, realUnlock[1] and realUnlock[0] are debugging variables used to ensure that the device is working properly during testing. real*Code is used to display the stored combination code and realUnlock[*] is used to count how many attempts have been tried to unlock the device.

All in all, pretty cool. Minus the nine hours or so it took to do it.

1 Amanda turned me on to this phrase.

Dad’s in Town

Dad called me today to let me know that I should print my boarding pass online when I fly back for Thanksgiving.

Then he wanted to know if I wanted to grab some food tomorrow. He’s in town!

Brian flies back tomorrow, Dad flies back Sunday, and I fly back Monday.

Poor Mom, she’s going to be driving to the airport a lot.

This Is The Story of a Girl

This is pretty sick and twisted. The end will surprise you.

Here’s the recap:


Megan Meier, who had trouble controlling her weight and was self-conscious about it, was thrilled when a 16-year-old hottie calling himself Josh Evans approached her online one day and asked to be added to her MySpace friends list. The two became fast friends, though they never met in person. Then one day Evans turned on Meier and began sending her hateful messages. His negative comments grew in intensity and left Megan feeling deeply wounded. Already prone to depression and low self-esteem, she took the attacks on her worth to heart and hung hanged herself.

Okay, sad and tragic. Girl meets boy, girl falls in love with boy, and perhaps in series of events somewhat similar to Romeo and Juliet, girl takes her own life. Here’s where things get down right creepy.


Six weeks after Megan died, on a Saturday morning, a neighbor down the street, a different neighbor, one they didn’t know well, called and insisted that they meet that morning at a counselor’s office in northern O’Fallon.

She told the Meiers that Josh Evans was created by adults, a family on their block. These adults, she told the Meiers, were the parents of Megan’s former girlfriend, the one with whom she had a falling out.

According to Tina, Megan had gone on vacations with this family. They knew how she struggled with depression, that she took medication.

Like I said, the end would be surprising. Interestingly enough, no criminal charges are going to be filed. The St. Charles Journal decided not to publish the names of the persons involved for safety reasons, however some bloggers have been able to out at least one of the people involved based on information within the article. You should really read the entire article because it is well written.

Thanks to Amanda for the original heads on up this.

The Nerd Handbook

I’m a nerd. You should all know that by now and if you don’t, well, now you do. I happened to stumble across The Nerd Handbook. It’s a short blog post, just over 2500 words. It seems to be targeted at nerd’s significant other, however, I think there are valuable insights for everyone, such as:


Understand your nerd’s relation to the computer. It’s clichéd, but a nerd is defined by his computer, and you need to understand why.

First, a majority of the folks on the planet either have no idea how a computer works or they look at it and think “it’s magic”. Nerds know how a computer works. They intimately know how a computer works. When you ask a nerd, “When I click this, it takes awhile for the thing to show up. Do you know what’s wrong?” they know what’s wrong. A nerd has a mental model of the hardware and the software in his head. While the rest of the world sees magic, your nerd knows how the magic works, he knows the magic is a long series of ones and zeros moving across your screen with impressive speed, and he knows how to make those bits move faster.

There’s more great stuff. I promise. Read it all and let me know what you think in the comments.