How to learn Meteor and Apollo quicker and make friends
People
Saturday in Las Palmas in Gran Canaria was warm and sunny and the city was crowded. It was a day of the Grand Carnival Parade and streets were filling up fast. Our group was growing. Students were arriving not just from various European countries but also from Canada and Libya.
For Derick, it was a shock therapy. He started his journey more than 24 hours before in a snowy and freezing Canada. So it was for Marwan, a computer engineer from Libya who escaped the horrors of civil war in his home country and got a refugee status in Spain. I invited him to attend the course just a month before.
Our trainers Jaap and Jasper from Q42, a nerd-agency based in Amsterdam, arrived also in the evening. The Grand Parade started. Thousands of people, wearing funny clothes were flooding the main street, walking from the Old Town, accompanied by furious sounds of drums. It was just the beginning of the most awaited night of the year. At least a hundred of open-deck buses filled with people dancing to booming live music followed the parade. Santa Catalina Square, where we moved later, hosted the biggest open air party this year. We had fun!
On the following day, we jumped on the surfboards. We made friends and chilled out at the Las Canteras beach awaiting Monday.
Soppa de Azul
On Monday morning, Soppa de Azul, the co-working space and an art gallery located only 200m from the beach, was buzzing. Meteor in Flip Flops kicked off.
Apart from Q42’s trainers and students, we had two special guests. Xavier Cazalot, who attended the first Meteor in Flip Flops camp last year, was there. He works now as a full-stack developer at OK GROW! and contributes to the Meteor-Apollo integration and Vulcan.js.
My dream came true this year. Sacha Greif, a co-author of “Discover Meteor” and the creator of Vulcan.js — an open-source full-stack framework, was there too.
First class
We will be building Slick, a Slack clone for the first 3 days.
To put all participants on the same page, we used Atom as the editor of choice. Jasper explained how to install ESLinter and all the necessary Atom plugins. ESLinter encourages you to write standardised and concise code. Annoying at the beginning but pays back later.
We spent the rest of the day refreshing our React knowledge. We deepened our understanding of stateful and stateless components, event handlers and concise method of styling our applications.
Before 4 pm, our sketches were ready and translated into React components. It was time to take a break and go for another surfing class. It was hard to unglue some participants from computer screens. In the end, they stayed in Soppa de Azul, and kept tweaking the Slick’s front-end.
Apollo and GraphQL
On Tuesday, we dove head first into Apollo and GraphQL. Thanks to Jaap, we were able to quickly build our first Slick schema. We used graphql-tools that let to write schema using GraphQL.js.
The Apollo server was created with the meteor-apollo package and we were up and running in no time. We could inspect our schema and run first queries using GraphiQL.
Later, we moved our persistence logic to connectors and implemented the MongoDB backend. The last task for the day was to connect all the loose parts and inject data from the server to React components. Thanks to the ApolloProvider, it wasn’t that difficult at all. Although my brain started to melt down slowly. It was a long day. We were coding for 12 hours straight with only one short break for lunch.
On Wednesday we learned how to write mutations in GraphiQL and then create wrappers around React containers to actually execute them in Slick.
When the mutation executes, it’s not reflected on the front-end. You need to update queries to see the effect on your client. To make the changes visible for others you have to add “pollInterval” that periodically updates queries on all other connected clients.
At first, I was missing the ‘magic’ of Meteor’s pub/sub solution. You have also to write more code. But the advantages outweigh the time invested. The magic is replaced by a deeper understanding of the data flow. You start to become a magician yourself.
Initially, Apollo/GraphQL seems not to be that easy, but once you wrap your mind around the concept, all pieces fall into place. With Apollo and GraphQL, it is you who decides which data needs to be updated, when, and how often. It’s an empowering feeling.
The students represented different levels. They were freelancers, web developers or building their own projects. Having such a diverse group was a huge plus. We were learning not only from the trainers but also from each other. We were sharing code snippets, hacks and we improved our teamwork skills.
Projects
After three days of lectures and coding labs, Slick was ready. It was time to split into teams and test the newly acquired knowledge in the battlefield. Code, have fun, repeat is the best formula to let the knowledge sink.
Tell me and I forget. Teach me and I remember. Involve me and I learn.
- Benjamin Franklin
We got new tasks from the Q42 trainers: Build a simple social platform. We quickly split into teams of 3 and sketched our apps. Teamwork takes some skill. You can either get the synergy effect or you fall into the trap of never-ending conversations or arguments.
With a limited amount of time and fresh knowledge at hand, we decided to move forward quickly. Every member of the team was focusing on implementing a small feature. If it works, commit and push to github.
You should consolidate the code the team builds as often as possible. It lets you avoid conflicts that require time to get resolved. Agree with other team members not to touch files that you don’t need to complete the feature. Even if you feel the urge to do so. It will save you time. Trust me.
Having Jaap, Jasper, Xavier and Sacha at hand, allowed us to progress at the lightning speed. The natural behaviour for most of us when we struggle with code is to google for the answer. In Las Palmas it was different. We were asking professionals that were sitting just next to us.
It’s unbelievable how quickly you can learn and progress with experienced full stack developers showing you the way. You don’t struggle, you ask, you get the answer and you move forward.
After 3 days of coding our applications were ready and deployed to Galaxy. We were ready to present them to the rest of the students and our trainers.
Epilogue
Just within 6 days, we have learned how to build web applications with Meteor and Apollo/GraphQL. Working together with other inspiring web developers and project builders it a very empowering experience. You learn quicker, struggle less and make friends. Our skills skyrocketed in just a few days.
We were ready to go back home energised, full of new ideas and with a bunch of new friends.
New coding camps are in works. You can find them on Codecamps. Together with Sacha Greif and Justin Jackson we are working also on a IndieDojo — a one-week bootcamp for indie hackers and bootstrappers.