At Revelry, we believe in sharing and learning from one another (beliefs that are rooted in our Core Values). Among the many things we do to encourage internal knowledge exchange is to have a different team member present at each week’s Engineering Meeting. These presentations don’t have to be lengthy, formal, or complicated; in fact, many are brief, but also powerful in that they teach our Revelers something new, inspire conversation, and encourage collaboration.
In the spirit of sharing, we share our This Week I Learned presentations (aka RevTWILs”) here. We hope you find them helpful.
THIS WEEK: We offer an assortment of shared learnings from our engineering team.
- If you’re debugging tests on a LiveView, you can call open_browser(view) at any point to see what has been rendered to the page so far.
- Phoenix cookies by default don’t set an expiration, which makes them session cookies. When the browser is closed, session cookies are removed and the user is logged out. However, you can set the max_age
- If you’re testing that an element does not exist in the html of a page, remember that if it’s hidden, it’s still in the html.
- Phoenix LiveDashboard allows you to easily monitor the performance of your LiveView app. It comes with a great GUI and a super simple set up.
- In a livebook you can cmd+enter to re-evaluate a code block, and you can alt+shift+f to format a given code block.
- While connecting your LiveBook to your project is a lot of fun, it also runs an instance of your project, which can lead to confusing outcomes if your project runs Oban workers…especially if your LiveBook is running slightly older code (since it doesn’t hot-reload) and ends up processing the jobs that you expect to use the newer code.
- In Bash, always wrap your “$variables” in quotes. If the value of the variable contains symbols – especially an asterisk – it can cause headaches if you don’t.
Want to be the first to know when we share a RevTWIL?
Sign up here. We’ll email you whenever we post something new we’ve learned…typically 3-4 times per month.
"*" indicates required fields