I recently finished the first month of my internship as Firmware Testing Intern. Here’s some lessons I’ve learned.
1. Oral communication is mostly a waste of time
I’ve noticed that my coworkers rarely talk. Even when they’re sitting right next to each other they’ll be texting.
At first I thought this was just by convention, but I’ve come to realize that it’s a much more efficient way to communicate.
Firstly, oral conversations require you to follow the cadence of the conversation.
It’s important to say something when it’s you turn, even if you don’t have any new ideas.
This is antithetical to deep thinking and problem solving. It’s kinda like the postgame interview joke:
Secondly, it’s very hard to remember what was said in the conversation. You have to be memorizing and understanding at the same time.
If you miss something or don’t understand it right away you won’t understand the next part.
And there’s no time to pause and rewind. Some people take notes but I think that’s kinda fake.
Conversely, texting is automatically a record of what was said. 100% of the information is saved. Including photos and links and quotes.
You have as much time to think as you’d like. And you don’t need to coordinate schedules to talk.
If the other person is busy, they can just reply to your message when they’re free.
2. It’s important for PRs to be small
Oftentimes when writing a new test I get excited and want to add more cool stuff into it.
This isn’t the right way to do it. When writing a new test, the initial PR should focus on the infrastructure.
The actual assertion should be very simple.
As an example, if you wanted to end-to-end test the camera functionality of your board, you could have a setup:
- camera
- DUT
- Test PC
- computer monitor (to stimulate the camera)
The initial PR should contain
- Code to establish connection to DUT
- Code to send command to DUT to start/stop capture
- Code to control colors on the screen
The assertion should just be that you can read an all white screen vs an all black screen with loose bounds.
You can add other cool stuff later:
- Resolution
- FPS
- Latency
- Color accuracy
- Exposure
- Contrast
But for now… just get it merged!
3. It’s important to be candid about what you know and don’t know
It isn’t bad to not know something. It is bad to be confidently incorrect. But at the same time you can’t be unconfident about everything.
A lot of the the time it feels like firmware is really a job about hardware understanding.
You don’t get rewarded for writing clever algorithms, it’s mostly straightforward code.
The alpha comes from understanding what the hardware is capable of and configuring it in an efficient way.
No CPU algorithm can beat a well configured peripheral.
4. It’s important to keep stuff visible to the boss
I’ve been sending a message in a group chat of the mentor and the boss and all the guys I work with pretty much.
Just a couple bullet points saying what I did today and what I’m aiming to do tomorrow.
It’s a lot more efficient than 1 on 1s. And it’s also a good way to keep yourself organized.
Especially by writing the plan for tomorrow at the end of today: you’re compacting the context you spent all day loading so you can get a quick start tomorrow.
5. Automated HIL tests are extremely important for correctness
In general there’s a very strong correlation between a pervasive validation culture and high code quality.
It’s easy to lie to yourself that you’re saving time by focusing on development and not validation.
But instead of validating code as you write it (and writing tests that prevent future regressions on the same behaviour),
you’ll get pings about your component not working in production.
Now have to debug code you wrote 6 months ago and already forgot about.
With no infrastructure to run experiments that stimulate your hardware in different situations.
And instead of institutionalizing the learnings from this into test code that carries forward into every future PR, it gets remembered by the most senior guy.
What happens when he quits?
HIL tests are very important. They’re a force multiplier for the rest of the team.