Read the statement by Michael Teeuw here.
Funny, yet not funny ...
-
Last night I got home and decided I wanted to tinker with some more on my MM² code. After some lines were written, I popped a browser open … and saw no change. Huh? Went back, double checked my code, refreshed the browser … nothing. Oookay, I started adding debug lines and commenting out others. Still nothing, no debug, no console, no change, anywhere. Well this is annoying … the mirror is still running, but it seems none of my changes are taking. Ok, so maybe I need to restart the process. So I popped open another SSH session, logged in, and hit
'pm2 restart MM'
. Boom, the mirror restarts no problems. But what’s this? Even on the mirror I don’t see my code changes. Did the rpi suddenly get corrupted and it can’t read data? Crap. Time to restart the rpi and do a file systems check. That came back fine, memory test, fine … so what gives? Flipped back to the first SSH window to check on code … yep still there. What’s going on?!By now I was getting irritated so I did the next best thing I could think of: recloned everything from github, reset it all, and try again (from the first SSH window session - can you guess what’s going on here yet?.) Hit reload …ok, it comes up. Let’s make code changes again … nothing. No changes, it’s like all my code was being completely ignored.
So I flipped back to the second SSH session I had opened to start looking at the filesystem again and then it hit me … I’m working on the wrong device! UGH! The window title correctly tells me that I was on a different address, I just never looked UP to see it.
See, I have an identical installation on my office server, it’s an exact clone of the rpi at home. When I code at home, I push up to github, when I get to the office, I clone it back down. When I leave the office at the end of the day, I push changes up to github and when I get home, I reclone again. So the two devices always stay the same. In the first SSH session window, I was already logged into the one at the office, I just didn’t realize it. So all my code changes were being done there while I was trying to see the changes from the rpi at home.
It’s at that point I decided it’s time to just go to bed. :)