Programmer's Diary
In my last post, I mentioned mentoring a new colleague. Today is Monday, the start of a new week, and the journey of mentoring continues. However, today I witnessed the boundless creativity of a newbie.
In the morning, I taught him how to use CREATE TABLE to create an "Employees" table. It was supposed to be a simple task, but he somehow managed to "improve" the design—he set salary as VARCHAR and misspelled the position field as posision. He explained that this allows for "Negotiable" salaries. I was speechless but amused. I patiently taught him how to use ALTER TABLE to fix the mistakes and emphasized the importance of strict field types.
In the afternoon, I assigned him some practice tasks involving INSERT and SELECT statements. He forgot to add a semicolon, which caused the SQL to hang, and he slammed the desk, exclaiming, "There’s something wrong with the database!" I pointed to the missing semicolon, and he suddenly had a light-bulb moment. “Oh, that’s why!” His bug-fixing skills are definitely in the early stages of development.
Before leaving for the day, the UPDATE exercise turned out to be the highlight. He forgot to add a WHERE clause and ended up updating the salaries in the entire table to the same value. I quickly interrupted the operation and seized the opportunity to explain the importance of conditions. Embarrassed, he muttered, “Good thing this isn’t the production environment.”
Overall, not a bad day: he went from creating tables to writing queries and even learned how to avoid "self-destructive" operations. The process of teaching, though occasionally nerve-wracking, gives me quiet satisfaction. Watching him grow bit by bit, I feel hopeful. Someday, this kid will write code that doesn’t give anyone a cold sweat.
How long you will teach your new colleague? Starting from scratch is not really easy and might take long time too. I hope your colleague interested in what he is learning now :)
This part starts directly with hands-on practice, teaching him through practical application, and it's been about three weeks. Today, I discovered that he forgets a lot of things after I've taught him.