Week 3: Finalizing the Firefox extension
Last week I mentioned that I have started creating my first ever Firefox extension in my life and it was fun to create those simple extensions. Later, we started building an extension with a team, and that is the point where things started not going in the direction I have expected. Yes, we have finished “coding” our extension, repcage, but it wasn’t super easy to get there. I knew that this exercise was not about writing fancy code but about understanding the structure of an open-source project and learning to work with other people. Still, writing only 4 lines of code to replace images in a website didn’t seem enough to me:
Array.prototype.forEach.call(document.querySelectorAll('img'), function (img) {
var height = img.height;
var width = img.width;
img.src = 'https://www.placecage.com/' + width + '/' + height;
});
I tried convincing my teammates to add at least one more functionality, but they didn’t want to code more than the 4 lines above. Again, it is all about teamwork, and if the majority of the team doesn’t want to do something, pushing alone doesn’t help. I guess I was expecting to see more enthusiastic teammates, but it is OK. I think that is a part of collaborating with other people, and this class activity reminded me of this situation one more time. Humans don’t always have the highest motivation to create something. I think that is what I learned about collaborating with other people from this project. These being said, I think we did a good job of creating the README file and other supporting documents. We could have added a section explaining how to install the extension, but it is self-explanatory already. This activity also helped to practice JavaScript, and I am very happy about it. I usually read a lot of JavaScript code to use some open source libraries on websites, but I rarely write JavaScript.
Meanwhile, my classmates presented their Firefox extensions during class time, and I liked them! There were useful ones like StudyBuddy and fun ones like mockbob. It was a lot of fun to see other people’s work and asking questions. The most common issue I have observed was the unlicensed usage of various images. These days it is effortless to get every single image we want. We only need to use Google Images to search and right-click to save the image, that’s it! Not all images are free to use, and the owner of the image can even file a lawsuit against the improper use of their image. Luckily, we are all here to learn about these kind of issues, and I am sure these people will be more careful next time they use a random image from the internet.