Wow was I in for a scare when I got back home today. For my independent study at Penn State, my professor wants me to speed up this “Sonoluminescence” program that a guy at UCLA wrote for his dissertation. He wanted me to use a program profiler. I found out that Visual Studio’s profiler was only available in the Premium and Ultimate editions - I can only get Professional through the MSDNAA program at school. I found out that Netbeans has a profiler for C++, so I downloaded it and tried it out on my current project (JAGS). Well, I found out two things:
-
The Netbeans C++ profiler only works on Solaris/Linux. (The Java profiler works on Windows, though, for what it’s worth.)
-
Back up your freaking files, because you never know when you will accidentally move them instead of copying them, delete them because you thought you’d copied them, and then uninstall some massive program, making file recovery programs useless.
I was in a panic for a while. I tried out three different programs before realizing I had barely changed the very error-prone version of my program (read my last post) after I’d copied it into a new solution. It turned out I basically had backed up the entire thing. If that error hadn’t popped up, forcing me to create a new solution, instead of wasting a day in frustration I would have lost my entire project.
Irony, anyone?
As for the profiler, I downloaded a nice program made by AMD called AMD CodeAnalyst. Actually, that’s what made me realize my project was gone, because it couldn’t find any source code. I am also trying out a profiler called “Very Sleepy.” I’ll post back on which one is better next.
On backups, I looked around and couldn’t find anything that was automatic except for SVN/Source control, which I don’t want to have to set up right now. Thanks to this blog post, I’ve discovered DPack, which includes a nice manual backup utility. It does other things too, but I don’t know what. It zips your project for you and everything; I just have to remember to hit a button every so often, and thanks to this experience, I will. My project in zipped form is only 54kb. Nice.