I’m feeling particularly exhausted this week and I figured I would write a blog post to help me get out of this slump.
Week 2 went by pretty well. I got a good foundation working on my extension and I was gearing up to work on the main parts of my program. There wasn’t anything too eventful, but I definitely felt very proud of my progress.
This week I learned about how absolutely frustrating it is to try and fix a work environment. When I first started writing my extension, I used MAMP to run my web server. This was the first time I’ve ever run a web server locally and I was likely to run into problems.
Well, I ran MAMP with no problems for a while, but I wanted a way to debug my code. Dereckson suggested that I use the debug log toolbar. ($wgDebugToolbar = true;) Unfortunately, my logs through wfDebug(); weren’t quite working. I thought it might have been a problem with MAMP and pear. I kept getting a message about how a class in pear wasn’t loading.
So I spent the day (Wednesday) trying to get my debug logs to show up properly. It didn’t work. :( Dereckson was able to see the messages on his console so I was convinced that it was something wrong with my set up. After all, if the same code was displaying properly on someone else’s work environment, then it must be a problem with my work environment. I had my boyfriend, Ofer, try and fix my problems as he’s more experienced with web servers and work environments in general. When we weren’t able to fix the debug log, Ofer suggested a virtual machine (VM).
This was a suggestion made by Mark when I deciding on how to run my web server. I ultimately decided on MAMP, but a VM was always an option. Ofer said that running a VM would be simple and that I could get it running quickly.
Well, he was wrong. He had gotten me set up with Vagrant and Virtual Box the night before and left me to my own devices the next day. Honestly, if you asked me what I did, I couldn’t really tell you. There were so many hack-y things that I did to get things working. I ended up having to download an entire new copy of Mediawiki and a clean clone of my extension. I had to employ the help of my friend, David, to get me through this as well.
So after two days of messing around with my work environment, I came back to the same situation that I started with. Debug toolbar wasn’t working. I decided that enough was enough and went with a logging situation instead.
I have to say, working with a broken work environment is REALLY draining. I think I’m still feeling the effects of it even though I’m working on actual development now. Googling doesn’t always work because your situation might be/probably is unique and there’s a ton of things you need to be wary of like OS versions or set up configurations.
I did learn some stuff though so it wasn’t a total loss. I’ve never worked with a VM before so this is a pretty cool learning how all that works. I think I’ve come to realize that being a programmer doesn’t mean you just sit around writing code all day every day. There’s a lot of research (basically, googling) and thinking involved. If I was writing code for 8 hours straight, it would probably come out horrendous.