The time I got stuck during my internship in Mozilla!

Carolina Jiménez Gómez
5 min readJun 6, 2019

--

More stickers 🙃 I didn’t know what other image put here :P

Hello there 👋, Carolina here 🙋. I want to talk to you today about the time I got stuck 😫 during my internship (as you might guess from the title). This is just my third week as an intern and I already hit the wall. But it’s OK, I’m fine now.

So, I’m working with another girl in this project (hello Danielle 😁) and in our first weeks our mentors split some tasks for us; as she already has good experience doing front-end development, I got some back-end tasks (for now).

My first task was to set up an RPM (which stands for Remote Page Manager) which consists of two pages (parent and child) communicating with each other, the child sends a message to the parent to get some information back and the parent is listening for a specific URL and specific topics to respond. Fortunately for me, in the same moment there was another person creating another RPM, so I based my solution into what she was doing. I got stuck there for a day because I was missing something small, so I told my mentors about what I did and ask them if I was doing something wrong. They helped me with the problem, and we kept going from there. Also, I was trying to understand how the communication was being done and it is very hard (at least for me) to understand, so I decided to make a draw and share it with all of you 🙌.

How an RPM works.
Inner communication between modules.

My second task was to open a new tab to show the about:certificate page, instead of what is used for the moment, which opens a pop-up window. It wasn’t easy to find but also not too hard.
My third task was the one that made me had a tough time. I was supposed to get the tabID for the page that needs a certificate, pass it like a query parameter in the URL, get that ID in about:certificate, get the tab object, and extract the certificate information from there. It was really hard for me, also because I think is the first time that specific task is implemented, so I wasn’t able to find something similar in the rest of the project. I struggled into it for about two days (16 hours). I was getting some results with certificates that had no problems but with the ones that have some errors on it, I wasn’t able to get the information I needed (never really found a way to do it). As I felt super stuck here, I was starting to consider other ways of doing it (passing information between tabs), also because when asking my mentors they suggested some other approaches. This is some of the other ways I tried (and none of them worked for me!):

  1. Tried to create a communication channel using BrodcastChannel.

2. Tried to send messages using LocalStorage, but is not that easy in Firefox.

3. Tried sending messages using postMessage.

4. Tried sending messages between tabs like here and here.

5. Tried opening a new window and keeping the reference of it, and writing the information to it, like this.

6. Tried using MessageChannel.

(I always search for solutions in Google and Searchfox. Don’t worry if you don’t know something, you can always ask for help, in Mozilla you can do it here) 😀.

Doing this took me another 4 painful days (32 hours). I only remember another time when I felt so stuck in a project, and I started having nightmares with it 🧟‍♂️👹.

I still don’t know why any of those approaches worked for me, I tried so hard on them, but well, who knows what I was doing wrong! 🤔🤷‍♀️

The good thing here is that after thinking and trying different ways of passing the information between tabs, I had an idea💡and I get mad at me for not thinking on that before, because it is the simplest solution of all the rest approaches 🤦‍♀️🤦‍♀️, it is as simple as this: when I open a new tab I can get its reference, so I can do something like tab.message = “message”. Yes, I know, how is that you could not think of that before????!!!!. I suppose is because when you get stuck for so many days you get a lot of stress, you have the pressure of wanting some progress soon and the pressure that you want to prove you are doing your best, among other personal factors, and that doesn’t let you think out of the box 📦.

After telling my mentors the solution, one of them suggested another approach, which I’m working on it right now. I’ll let you know which was our decision in a further post 🙃.

The truth is that is totally normal to get stuck, the important thing here is how you react to it, so don’t be like me and try not to stress too much, and always let your mentor/s know what you have done, so they can give you a rescue hand 🧚‍♂️. Also, one thing that makes me feel good in the project is the fact that I’m not the only intern, so I can always ask Danielle how she feels, how she is doing and share all my pain 😅 (thanks a lot for choosing both of us! 😊) 👩‍💻👩‍💻

I’m really liking the internship, I like that I can manage my time, that I can work on a pijama if I want to, I can transparently share my progress with all of you and I really love the compromise of Mozilla 🦊 and all its people with privacy! They really care about all of us.

That’s all for today, we will keep in touch. Bye 👋.

--

--