|
|
@ -1,43 +1,43 @@ |
|
|
|
## Level 1 Questions |
|
|
|
## Level 1 Questions |
|
|
|
How would you prove the code is correct? |
|
|
|
1. How would you prove the code is correct? |
|
|
|
To prove the code is correct I suppose I could set up a test environment |
|
|
|
To prove the code is correct I suppose I could set up a test environment |
|
|
|
where I could account for all connections and run tests like |
|
|
|
where I could account for all connections and run tests like |
|
|
|
ssh connections, dhclient or dig (dns) connections, nmap port |
|
|
|
ssh connections, dhclient or dig (dns) connections, nmap port |
|
|
|
scans, and then ensure the connections I expect from the tests |
|
|
|
scans, and then ensure the connections I expect from the tests |
|
|
|
appear in the program's output. |
|
|
|
appear in the program's output. |
|
|
|
|
|
|
|
|
|
|
|
How would you make this solution better? |
|
|
|
2. How would you make this solution better? |
|
|
|
I'd improve the solution by making the functions more focused on |
|
|
|
I'd improve the solution by making the functions more focused on |
|
|
|
specific tasks, improving how I present the interface of each |
|
|
|
specific tasks, improving how I present the interface of each |
|
|
|
function to each other to more specifically eliminate type |
|
|
|
function to each other to more specifically eliminate type |
|
|
|
or value errors. I'd also allot more time to complete the task |
|
|
|
or value errors. I'd also allot more time to complete the task |
|
|
|
since I wasn't able to find enough before the deadline. |
|
|
|
since I wasn't able to find enough before the deadline. |
|
|
|
Is it possible for this program to miss a connection? |
|
|
|
3. Is it possible for this program to miss a connection? |
|
|
|
Yes, if the connection is brief enough so as not to last more than 10 |
|
|
|
Yes, if the connection is brief enough so as not to last more than 10 |
|
|
|
seconds and thereby be missed by the most recent read of the |
|
|
|
seconds and thereby be missed by the most recent read of the |
|
|
|
/proc/net/tcp file |
|
|
|
/proc/net/tcp file |
|
|
|
If you weren't following these requirements, how would you solve the problem of logging every new connection? |
|
|
|
4. If you weren't following these requirements, how would you solve the problem of logging every new connection? |
|
|
|
I would likely find a solution that leverages inotify to detect any change to the file and then read it, |
|
|
|
I would likely find a solution that leverages inotify to detect any change to the file and then read it, |
|
|
|
rather than polling it every 10 seconds. |
|
|
|
rather than polling it every 10 seconds. |
|
|
|
|
|
|
|
|
|
|
|
## Level 2 Questions |
|
|
|
## Level 2 Questions |
|
|
|
Why did you choose 'x' to write the build automation? |
|
|
|
1. Why did you choose 'x' to write the build automation? |
|
|
|
I would simply choose bash, as it's what I'm most familiar with and it |
|
|
|
I would simply choose bash, as it's what I'm most familiar with and it |
|
|
|
can reliably use the go build tools as well as invoke testing |
|
|
|
can reliably use the go build tools as well as invoke testing |
|
|
|
systems like kvm/qemu, docker/podman and the like. |
|
|
|
systems like kvm/qemu, docker/podman and the like. |
|
|
|
Is there anything else you would test if you had more time? |
|
|
|
2. Is there anything else you would test if you had more time? |
|
|
|
If I had more time I'd spend it fleshing out my testing as outlined above |
|
|
|
If I had more time I'd spend it fleshing out my testing as outlined above |
|
|
|
and doing a more thorough job of structuring my data in the way |
|
|
|
and doing a more thorough job of structuring my data in the way |
|
|
|
that I've modeled it in my head - the choice of go definitely |
|
|
|
that I've modeled it in my head - the choice of go definitely |
|
|
|
consigned me to reading more than writing with the little time |
|
|
|
consigned me to reading more than writing with the little time |
|
|
|
I had. Should have gone with bash I think. |
|
|
|
I had. Should have gone with bash I think. |
|
|
|
What is the most important tool, script, or technique you have for solving |
|
|
|
3. What is the most important tool, script, or technique you have for solving |
|
|
|
problems in production? Explain why this tool/script/technique is the most important. |
|
|
|
problems in production? Explain why this tool/script/technique is the most important. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Level 3 Questions |
|
|
|
## Level 3 Questions |
|
|
|
|
|
|
|
|
|
|
|
If you had to deploy this program to hundreds of servers, what would be your |
|
|
|
1. If you had to deploy this program to hundreds of servers, what would be your |
|
|
|
preferred method and why? |
|
|
|
preferred method and why? |
|
|
|
|
|
|
|
|
|
|
|
I would use ansible and use git to clone, build, and install the script. |
|
|
|
I would use ansible and use git to clone, build, and install the script. |
|
|
@ -45,7 +45,5 @@ |
|
|
|
troubleshoot in the event that I run into issues and |
|
|
|
troubleshoot in the event that I run into issues and |
|
|
|
ansible doesn't require a central orchestrator node. It's |
|
|
|
ansible doesn't require a central orchestrator node. It's |
|
|
|
also the Infrastructure-as-code tool I'm most familiar with. |
|
|
|
also the Infrastructure-as-code tool I'm most familiar with. |
|
|
|
What is the hardest technical problem or outage you've had to solve in your |
|
|
|
2. What is the hardest technical problem or outage you've had to solve in your |
|
|
|
career? Explain what made it so difficult? |
|
|
|
career? Explain what made it so difficult? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|