Category: Developer’s Musings

  • The Rise of AI

    As an engineering leader, I encourage my reports to responsibly use AI to speed up their work. There’s great value in automating mundane coding by delegating the work to AI. I trust them to be able to evaluate the output from AI and to reason about the correctness of the code being generated. Thus far, I have seen it be a boon to my developers. However, the explosion of AI has started showing up in different areas, ones that are challenging to address as a remote company.

    I have recently seen an explosion of AI usage within the hiring process and has inserted a sense of uncertainty when screening and interviewing candidates. I have started seeing resumes that have been produced using AI by taking the job description and rewording the candidate’s description of their most recent role to be an exact match to the job description. Firstly, this is clearly dishonest as they are most certainly not doing 100% of the exact same thing. It may get past an ATS keyword search, but it will not pass muster when it comes to hiring manager review. While this may get their resume to be seen by me, this isn’t the most egregious since I haven’t necessarily wasted significant time interviewing the candidate.

    The more egregious behavior that I have seen and feel that it’s an irresponsible usage of AI is during the actual interview process. You can argue that interviews are not necessarily the best way to determine qualifications of a candidate, but equally, dishonesty is a quality that no company wants. Discretely using AI during an interview falls squarely in that camp. Currently, the AI interview assisting technology is still in their nascent stages and that still allows interviewers to catch inhuman-like behavior. The more recent examples are linear development of code in coding interviews — nobody writes code perfectly linearly the first time around, there’s almost always edits to the code as you write it. The second is ultra-detailed responses to questions, with a higher-than-normal degree of detail in every sentence. These are tell-tale signs that I am relying on as an interviewer to determine potential dishonesty, but it’s unfortunately a matter of time before the AI technology is tuned to behave more human-like.

    It’s not clear to me currently how we will deal with this rise of AI. Back to in-person interviews? This seems to only work for companies that aren’t fully distributed and limits the talent pool significantly. Testing centers for interviews? Similar to getting a certification, maybe the answer is that they will need to show up somewhere to conduct the interview. Ultimately, only time will tell, but it feels like a never ending race.

  • using namespace std;

    Today, I was tutoring a classmate for CS16, one of our beginning CS classes at UCSB. One of the first things that almost all the CS professors teach students to begin their C++ code with is using namespace std;. However, this is often without explanation of what is happening behind the scenes and I would argue that this is a horrible practice which leads students to have hidden bugs in their code.

    To illustrate the problem with this, allow me to illustrate with an example of how using namespace std; leads students down a path of potential confusion. In the class, they were learning about pass-by-value, pass-by-pointer, and pass-by-reference. In the class, the following code was given:

    #include <iostream>
    using namespace std;
    
    void swap(int *px, int *py) {
        int tmp = *px;
        *px = *py;
        *py = tmp;
    }
    
    int main(int argc, char **argv) {
        int x = 10, y = 20;
        cout << "Before:" << endl << x << " " << y << endl;
        swap(x, y);
        cout << "After:" << endl << x << " " << y << endl;
    }
    

    Now, if you noticed the way that swap is being invoked by main, you would quickly observe that this should be a compiler error since the swap function is expecting an int *, and you have passed it an int. However, if you run the code through a compiler, “magically” it works and you get the values that you expected!

    What happened in the compiler was that the code utilized a built-in version of swap from std, making it “work”. This is only one simple example of how an error like this can confuse students and how having students blindly insert using namespace std; is a huge mistake waiting to happen.

    Thus, I think it is a very bad idea to teach students to blindly use using namespace std; without understanding what it does to the students’ code. There are many functions in the std namespace, and it makes it extremely hard to detect errors in examples like this. And, in all honesty, learning to prefix things like cout and use std::cout is good practice and enhances students’ understanding of their code.