But reading a file, doing some parsing adjustments, and calling an API sounds like a small amount of python code... so I guess not so bad :\
But reading a file, doing some parsing adjustments, and calling an API sounds like a small amount of python code... so I guess not so bad :\
for num in $(egrep --only-matching '^[0-9]+' input-file); do curl -vv -X GET "http://example.com/api/v1/foo?num=${num}" -o "resp-${num}"; done
edit: assuming "parameter" means query paramYour one liner is neat and all, but now you have to do 2-3 hours of initial work + w/ever time it takes for adjustments in 2 hours scheduled for an interview.
You could've thought out this toy architecture up front with initial simple implementations or at least discuss what they expect you to provide, but instead you wrote a shell script for some nefarious reason, even though you saw obvious disconnect between estimated time and time you actually spent.
When I was a junior developer, I was just trying to get code to work. When I learned design patterns, and had some bad experiences, then I started architect "robust" architectures for everything. After perhaps 6 or 7 years of doing this, I started to question my insanity. Sure there were several instances where I was like "Damn, really glad I built it like that" but there were an equal amount where it just ended up turning a simple problem into a complex problem. There's no good excuse for that.
So now, I go high school simple first, and college hard later. If it means I have to do some rework, fine. I'm okay with a little rework, because in the end it aggregates to a simpler platform that took less time to build.
Anything beyond 10-20 lines for the solution to this problem is pointless levels of abstraction and would be a huge red flag.
$ cat file
1
1.2
3
4.5
$ egrep --only-matching '^[0-9]+' file
1
1
3
Surely still demonstrates ability, but an automated testing suite is going to throw it out.Never had a problem with that. It's well known that C++ can't do anything on it's own.
We have an in office test--the dev sits down at a laptop with internet access, gets clear instructions and scaffolding code. We know that the tasks take n minutes because we see the time that candidates take.