Sunday, November 19, 2023

Coding in Python

I have a new project at work that has me interested in doing some Python programing. I always say that Python is one of those languages where even the largest programs are only 50 lines long. That is a bit of an exaggeration but most of the code I have seen fall into that categorization. The reason programs can be so small is because there is an ever-growing list of libraries to help. If you are trying to read in a comma separated values (CSV) list and process it, somebody wrote a library for it. You don't need to reinvent the wheel. Instead you can use the CSV library and focus on what you need to do.

The project at work is kind of simple. We just need to read in a CSV file and apply a hashing algorithm to one of the columns in the file. Then we will write the resulting modified file into a database. As with the CSV library, there is a library to do the hashing for us. There is also a library to write to the database. Furthermore we have source code from one of the teams in Japan that serves as a great sample code to follow.

There is another engineer on the team who is responsible for writing the code and I am merely to act as an advisor. We started by reviewing the sample program and I stepped through each line of code with my coworker. At first I felt glad that he is responsible for doing the coding on the project. The more we reviewed though, the more I felt I wanted to take a shot at doing the work. I don't think it would take me more than a day and I think I would do a great job. Unfortunately that would be overstepping my bounds and my job really is to serve as a mentor. I wonder if it would be okay to add a piece or two to the sample code we already have as there is one difference that I think would be fun to address. Tomorrow I have a progress meeting and will see how far the other engineer has gotten. Hopefully he has figured it out on his own. If not, I'll play with it on Tuesday.

No comments:

Post a Comment