"Always be smart enough to realize you don't know everything"
Which is my mantra as a software engineer, as I have stated before.
That came into focus again today, at a job interview. I was led into a conference room, which had an entire whiteboard wall where the hiring managers write programming questions for the candidates. On the wall from the previous interview, was a problem involving finding the set of integers in two different arrays that are closest together- for example:
A: {5, 10, 15, 20}
B: {10, 15, 20, 21}
The answer is the fourth element in the arrays, because 21 is the closest to it's counterpart 20. Someone had written the solution function's signature underneath:
int[] ClosestIntsInArray(int[] a, int[] b)
At first, I thought it was not in C# because Arrays are fixed size. Then, I realized that it was in C#. "But", I thought to myself, "can you pass Arrays as arguments or have a function return them?" I looked it up on my smartphone- when I saw that you can, I realized "Why would you not be able to pass arrays this way? They are being passed / returned by reference; as long as the calling code passes the parameters as a fixed array, and as long as the array returned is defined within the function, this is good C# code." So basically, it boils down to this: I have been a C# programmer for almost four years, and I did not realize this.
I know it sounds strange that I was not aware of this, but I have worked with collections of objects a lot more than arrays, especially in terms of function parameters and return types. As you can see, because I am blogging about this, I am not ashamed to admit that "I don't know".
So, programmers: Always be smart enough to realize (and admit) you don't know everything. Ask your fellow programmers. Google it. Check stackoverflow.com through Google- I invariably find good information there. If you are a role-player (or even if you aren't), RPG.Net has a really good Coders and Programmers forum: http://forum.rpg.net/forumdisplay.php?154-Programmers-and-Coders (you can post there as a guest, but it would be better to create a user account).
And hiring managers: Remember, Experience != Ability. A junior-level programmer with an eagerness to learn new techniques and a willingness to do what it takes to solve a problem is better than a senior-level programmer who is fixed in his/her ways.
