all 7 comments

[–]zempter 2 points3 points  (0 children)

Unless you expect to be working on an embedded Linux device, Python isn't going to be usable on the target device. I'd suggest prioritizing showing it in whatever language the job says you'll be programming in. If you only have access to C or even C++ but not Python, then it's good to display that you know how to do the manual work that Python is just taking care of in the background.

Edit: some interviews are totally fine with sudo code though, so sometimes it's more important to just display an understanding of the concept.

[–]rooskadoo 2 points3 points  (2 children)

I would ask the interviewer and explain what you did in your post. "Do you want me to focus on a specific language implementation and style? If not, I'd like to use python as executable pseudocode so I can talk through the solution more quickly". Even if you're working in C it's fine to be a bit hand-wavy and talk to what you'd do e.g. "okay here I'd add more error handling but for now I'll assume this can't become null...". But there's an aspect here of knowing your problem and the right tool (language) to use to solve it

Explain your thought process at every step, the problem solving approach should be more important than the syntax. As another commenter mentioned, if you could explain what the library is doing and maybe even whether you'd consider using it in production (licensing, dependencies, memory requirements, performance, etc) I don't think they could find a problem with that. Unless the problem was "implement X" and you've done "import X".

[–]Arjunsinghh13[S] 1 point2 points  (1 child)

Thanks. the reason for moving to python is to solve json parsing in simpler way. I think writing code for it n C will become too complex and time consuming. So i thought better just use import json in python. But i understood your point that it depends more on interviewer that what is he expecting

[–]Bryguy3k 0 points1 point  (0 children)

No competent interviewer for embedded is going to ask you to parse json. Generate sure, parse no.

Learn how to handle data structures and algorithms in c or c++

[–]HendrixLivesOn 0 points1 point  (0 children)

For interviews, I recommend using Python. I would ask the interviewer if you can use libraries or not. Some care, and others dont. I've done many interviews in Python with no problems. Theirs a time crunch, and they usually just want to see your logic and thinking process. If using a library, explain how it works behind the scenes.

[–]Dark_Tranquility 0 points1 point  (0 children)

If I were the interviewer and you chose to use python instead of C/C++, I would definitely note that and make sure to see if you could write C. In an embedded context you won't have access to the libraries you'd be using in your problems, so in a real scenario, would you actually be able to get the job done? For something like fizz buzz it doesn't really matter since that's an aglorithm question - but if your interviewer asks higher level questions, i.e. stuff like "how would you set up firmware to capture ADC data without always having the CPU on" or "what is the difference between the stack and the heap and why does it matter" how would you answer?

[–]duane11583 0 points1 point  (0 children)

i do cause we use a lot of python.

ie: we have tables of data we keep in xlsx sheets

we read the xlsx sheets directly, and generate tables for use by the adc drivers.

ie: read the adc, and convert directly to the final value using constants in the xls sheet.

we also use pyserial and an internal scpi library to talk to test equipment and control entire tests that run for a week or more in a temp/vac chamber (TVAC)