Blog Post #4: My Encounters with Programming

        Programming has become an increasingly important aspect of my life, not only due to my career choice of electrical engineering, but also due to the increasingly vast use of automation in our society. What once used to be important careers in the manufacturing and hospitality services are now being replaced by robots or ai; McDonalds is cutting out cashiers, manufacturing plants are using increasingly efficient robots to replace manual laborers, and even taxi and ride sharing services in the future may lose human employees as the cars will drive themselves. These factors make learning programming important to just about everyone, and I am grateful to have learned and continue to learn several ways to contribute.

 

        My first encounter with programming would oddly enough have to do with video games, more specifically Minecraft. Minecraft is an open world RPG game where you can build anything from electrical circuits using redstone, to vast cities using simple building blocks. As a child, I loved modding my game using community sourced resources and even ran my own server for a bit. This led to me discovering many facets of the IoT and how the internet and ISP services worked, while also teaching me some simple coding. Video games are a huge resource to teach kids how to program at a young age, without making it seem frightening or confusing, as introducing Python or C++ might be.

 

        University, or more specifically engineering, has forced me to broaden my horizons when it comes to programming knowledge. I have used multiple different programs, resources, and coding languages that all use programming to explore information in different ways. In this post I will discuss the four main resources I’ve used, which are the coding language Python, MATLAB, C, and MathCad which is more of an expanded calculator system.

 

        Python has popped up in my studies multiple times, mostly when it comes to solving logical problems efficiently with coding. It’s an easy language to understand, and has a huge library which is easily accessible. It’s great for automating pesky tasks, and is my preferred language when I’m not using complex numbers or matrix manipulation. As shown in this class as well, its great for text based resources such as text mining. I’m not sure how useful python will be in my future, seeing as most of my work will likely be by circuit analysis, but having python knowledge means having an extremely valuable multi-usage tool at your disposal, which can do almost anything you will need in a computing language. 

 

        The language that I have most grown to love is MATLAB, which was designed for iterative math work and works extremely well with matrix manipulation. It doesn’t work quite as well with text based resources as Python does, but seeing most of my work has nothing to do with that it has not bothered me in the slightest. I have used MATLAB for anything from simple calculations that may be a bit too intense for a graphing calculator, to discussing the usage and analysis of an RLC circuit. MATLAB also has great plotting / graphing tools, which gets the job done and can even work in the 3rd dimension. Attached is an assignment from last year that I did in one of my physics classes, which was just an introductory lesson of demonstrating the wavelengths of the different spectral series in the hydrogen spectrum.

           

        Lastly I’ll discuss my usage of C and the mathcad program. I’ve used C code in the CCS program in my microprocessor based embedded systems class for the labs. This class was all about the usage and discussion of embedded systems, for which C code was great for programming our microcontrollers. An example of a typical C code usage for micro controllers is included below, with the given instructions: 

 

Write a program that does the following (one program that does all of the following):

(a) Configure the ADC for PE4.

(b) Enable the 3-color LED.

(c) Display the value of the ADC from PE4 on the GLCD screen. You can display the value as either Hexadecimal or Decimal.

(d) When the value of the ADC is less than 1300, turn on the Red LED. When the value is greater than 2700, turn on the Blue LED. Otherwise, turn on the Green LED.

As you can see, with programming for physical machines there is often quite a bit of code for very little “results”, or for simple tasks.

 

        Finally this term has forced me to use Mathcad, perhaps the most dreaded computer program I have ever worked with. I will not go into the specifics of my reasoning behind this, but rest assured the program works simply as a graphing computer with loads more storage and more complex programming, along with more advanced graphing usages.

Leave a Reply

Your email address will not be published. Required fields are marked *