The Project Management ‘Instinct’:

Project management is a difficult topic to learn in college. Sometimes it can take years for a developer to grow an acute instinct for project timelines. A project could take a year, a month, or a week. I think it’s difficult to get a good understanding of this at college because every project that we have to work on has the scope laid out beforehand. Let me explain, working on a project in an engineering course, you get the requirements list from the professor, and you have to slowly work your way through the requirements as the term progresses. This is different when the project scope is not defined, when you speak directly to stakeholders about what they envision the project to be, what functionalities they will need, and the timeline that they are working with. 

It’s not until you spend time being a software engineer that gain a general understanding for how long it will take to move a project from the design stage to the production deployment. I learned to handle project scope and stakeholder input the hard way. Let me explain, I got a freelance job designing and deploying a simple landing page for a business back in my hometown. I met with the owner and we spoke about the functionality of his website, the UI design, and the timeline to come up with it. In general terms, he wanted to replace his Facebook page and instead have an official domain to showcase his shop. 

I wrote almost everything he said that I could use to build his website. Having just Googled “10 stepsfor professional development project design” the night before meeting him. I was new to the space, and I think he knew it, but he was still generous enough to give me the chance. I wasn’t sure how long it was going to take; I think I told him three months because one of the “steps” in managing a big project like building a website from scratch said to give a longer timeline than anticipated so if you finish early it looks good. I did that and sure enough I finished a month in advance.

In college, courses where I am working on a term project feel like the most realistic scenario to what real-life project development is like. Spending time working with people is another aspect of project development that often gets overseen at college because students hate the dreaded group project. Perhaps colleges don’t do a good enough job telling students group projects are there because that is how most development projects get done in the real world.

These students are not alone, I often struggle with group projects in college and even at work. It’s difficult to manage timelines, people’s schedules, and scope creep if you add new features mid-development. Practice and patience are my best advice for those who struggle with this part of your professional development. Perhaps find a low-stake avenue where you can work on implementing a good project from start to finish to develop your own project management instinct.

Shortcomings in a Software World

Starting the computer science program at OSU and getting a full-time job as a developer, I didn’t know how big a role effective communication plays in software engineering. Throughout my undergraduate degree in physics I avoided communication courses and getting into a career where I would have to communicate a lot because I am terrible at it. Today, I finally realize that communication is essential in software engineering. If you are working on a project with other developers, you are going to need to communicate your ideas efficiently and effectively. For example, I am working on a project for the CS capstone with two other developers and a big part of planning our tasks is communicating ideas. I am also working on multiple projects at work that involve daily communication to stakeholders. 

I dread the idea of having to go up to the front of the room and present my ideas to all stakeholders. In the back of my mind, I often think about how I will make communication errors that will cost me the attention of people. At work, I have made unusual comments or asked questions at the wrong time, and at school I have misunderstood my teammates on what they were doing and what I was tasked to do. But there has been a saving grace, I love programming and that pushes me to overcome my fears of sharing, asking questions, or making a fool out of myself. 

I am an open and creative person. Yet, there have been times when I want to quit because I feel like I will never be able to communicate my software engineering ideas. I fear not being able to implement my ideas to their full potential because I can’t put them into words other people will understand and take seriously. But when I have these doubts, I like to remind myself that there is always writing. I can always write and edit. Writing is helping me at work, and these blog posts keep me focused and aimed at the objectives of my capstone project. At work I keep a journal of the daily things I do, and what I plan to do the following day. 

I don’t think communication is difficult for me because English is my second language. I strongly believe this because I also struggle to communicate in Spanish (Christmas in Mexico with my family is rough). I have always been a slow reader, I hate manuals, and I was always the last one working in my physics labs because I couldn’t read the lab instructions and follow them continuously. Despite this, I managed to finish my physics degree and continue onto computer science. 

Communication with normal languages has been difficult for me. My other saving grace is that software languages are different than speech. Computer languages make sense to my brain at an instinctive level. I can translate between computer languages easily and have been blessed with the ability of learning several of them. Of course, the difficult of communication always arises when the source documentation is a bunch of English writing with no code examples or links to projects. 

I still want to become better at communicating my ideas because I want to collaborate with people. I like working with others and having others to push myself and learn new things from. I hope this blog post helps people like myself who have shortcomings and struggle with them at school and/or work. It’s difficult, but I think that if we learn to manage it and circumvent in different creative ways, we can achieve our goals. For me it’s been writing some lengthy Slack messages. Writing down notes when I have a creative thought, and drafting emails multiple times. Drawing up an ugly picture of an idea, or even just coding it. Find a path, because your shortcomings shouldn’t keep you away from your next big idea. 

Making a Python Data Structure

Dictionaries in Python

Making a dictionary in python is easy. It’s a common data structure that you probably learned in an introductory course or a short stackoverflow code snippet. The dictionary data structure looks like this: 

my_dictionary = {‘artist’: ‘owl city’, ‘songname’: ‘hello seattle’}

The following dictionary contains information about an artist (which is an immutable string type) and a songname (which is also an immutable string type). The values are also string types and can be accessed with the usual dictionary[‘key’] notation:

my_dictionary[‘artist’] 

If we print, it would yield this: 

print(myDictionary[‘artist’)
output: owl city

It is best to think of a dictionary as a set of {key: value} pairs, with the requirement that the keys are unique (within one dictionary). A pair of braces creates an empty dictionary: {}. Placing a comma-separated list of {key: value} pairs within the braces adds initial {key: value} pairs to the dictionary; this is also the way dictionaries are written on output [1].

For my project, I want to make a dictionary, but it will contain parameters that the neural network model will need. The keys will be the name of the parameters (mean square deviation, spectral centroid, zero crossing rate) see other blog for more background information [2]. The values will be the result from the calculations from Librosa using the sampling rate and the audio time series. Thankfully Python has a built-in constructor that builds dictionaries from key-value pairs. The syntax for this constructor is:

dict() 

dict() will be applied to a list of tuples: 

dict([(‘key_1’: value_1), (‘key_2’: value_2), (‘key_3’: value_3)])

The dict() constructor will return a dictionary with the following format:

{
‘key_1’: value_1, 
‘key_2’: value_2, 
‘key_3’: value_3
}

Functional Programming

I will use a functional function called make_dictionary() that will take an array of tuples and return the dictionary. 

def make_dictionary(array_tuples):
						return dict(array_tuples)

This will be a functional function because it doesn’t change the array_tuples itself, but instead creates a new data structure while not having to rely on a global variable or other data structure that is on the outside of the function. To make the array of tuples I will use two of these functions. One to make a tuple with the parameter name and its value. The other one to make the dictionary and return it.

def make_tuple(key, value):
    return (key, value)

def make_dictionary(array_tuples):
    return dict(array_tuples)

I can use these new functional functions to construct my new data structure.

tuple_1 = make_tuple(‘spectral_width’, 1)
new_dict = make_dictionary(tuple_1) 

I can then use the new_dict as a data structure that I will be able to feed to the neural network model for it to classify the new input dictionary. I can now return the new_dict and get my data structure with the data that my model will need. 

That was a lot to follow. But the main message that I want to highlight is that you can start with a simple data structure like a list, tuple, or a set and then slowly turn it into a more complex data structure that you can reuse and remake as many times as you like. 

References:

[1] https://docs.python.org/3/tutorial/datastructures.html

[2] https://maryrosecook.com/blog/post/a-practical-introduction-to-functional-programming

Abstraction in Action

One of the most difficult things I am facing this term is getting comfortable with the software engineering vernacular. I am taking two computer science courses and working full-time. Between school and work I hear “class instance”, “procedural programming”, and “type referencing”. These are some random examples of all the different phrases you will hear throughout your computer science career. I consistently struggle to put the correct meaning to the idea of abstraction. In Wikipedia abstraction is defined as the following: 

The process of removing physical, spatial, or temporal details or attributes in the study of objects or systems to focus attention on details of greater importance; it is similar in nature to the process of generalization [1].

Abstraction as a concept has been difficult for me to understand because it often tells you what it means but it never shows you what it’s like to implement it in real-time. Leaving me in a state of confusion because it feels like it’s an idea hiding simple code with confusing code. 

In the programming world, I will often hear “Did you initialize your class constructor?”  Or “Did you use an anonymous function?” These questions operate at different levels of abstraction. One is talking about object-oriented programming and one is talking about functions explicit without names. But in my mind, there is always a disconnect between what the question says explicitly and what it means implicitly. I always seem to miss the correct level of abstraction at which I should operate when answering these questions. I will give an example. At work, I am building an interactive activity with HTML5, BootStrap5, and vanilla JavaScript – otherwise known as ECMAScript or just “pure” JavaScript. That means I can’t use any front-end (React, Vue, Angular) or back-end (Express, Next.js, Django, Flask) frameworks. The abstractions begin to take place, should I make my activity using object-oriented techniques or should I stick to functional programming? I could just hardcode the entire activity and make no reusable code or modules. 

A Simpler Example: 

Create some objects with the following characteristics:

‘Ford’, 1990, ‘Sedan’, ‘Taurus’
‘Chevy’, 1991, ‘Pickup Truck, ‘Silverado’
‘Jeep’, 2000, ‘SUV’, ‘Wrangler’

Const object = {‘animal’: ‘dog’, ‘name’: ‘Doge’, ‘legs: 4}
Const objectOne = {Make: ‘Ford’, year: 1990, Type: ‘Sedan’, Model: ‘Taurus’};
Const objectTwo = Make: ‘Chevy, year: 1991, Type: ‘Pickup Truck, Model: ‘Silverado};
Const objectThree = {Make: ‘Jeep, year: 2000, Type: ‘SUV, Model: ‘Wrangler};

I hard coded each object and now I can use them. But if I write a function and “abstract away” the process of writing an object to a function, building objects will be easier for me if I can make a function that correctly abstracts the procedure of building objects. 

function buildObject(make, model, year, type){
	return {Make: make, Year: year, Type: type, Model: model};
}

I only have to pass the characteristics that I want in my object to my buildObject function and it will return an object. I don’t have to write the curly braces every time I want a new object. I just have to manage the work of putting in the characteristics into the function. I could use my function 10 times or 10,000 times to make a large number of objects. 

This example helps me get a firm grip on the idea of abstraction and how useful it is. This is because when we look at the question that we have to answer I can quickly see that I need to write code that can be reused any number of times. Because of this I can easily reach for a function declaration and make my objects in that manner. I could have gone another level of abstraction and created a class that builds the objects. However, I would have to operate at the object-oriented level of abstraction and would have to manipulate classes and instances to build my objects. This might be simple when the coding context is well defined, say you work at a dealership and are making their new website. You could create a class called Inventory() that holds all the objects that will be in the inventory. And the objects themselves might be classes. 

Personally, I like to go case by case and sort out the details once I have a good understanding of the scope of the project. 

[1] https://en.wikipedia.org/wiki/Abstraction_(computer_science)

Processing Audio Data for a Neural Network

For my capstone project I am collaborating with two other students in writing a neural network that will be able to classify music genres using audio files. For this post, I want to talk about the process of getting the data ready to train the model we will be using. Processing audio data involves a lot of background knowledge. Knowing a little bit about Librosa, Spectrograms, zero crossing, and Spectral Centroid(s) will save you research time. I think that knowing the general layout of TensorFlow and some background on Fast Fourier Transforms is essential and will help you hit the ground running.

I will begin by talking a bit about Librosa. Now Librosa is a Python library used to analyze and extract useful features from audio files. You can pip install it on a virtual environment or pip install to your local machine (or to install all requirements) [5].

pip install Librosa
pip install -r requirements.txt

I prefer the local machine since I will be using it for the entire term. After you have Librosa, you will need TensorFlow, matplotlib, os, numpy, pandas, sklearn, and a lot of other libraries that I will not mention but you will be able to see in the requirements.txt file in our project directory. 

To process the audio data and get it ready to be processed by our model, common preprocessing methods will be used.  The following is a description of how the data was processed, what parameters were taken into account to process them, and what technology was used to achieve this. 

We begin this process by extracting the short-term Fourier transformation (STFT) to compute Chroma features. STFT represents information about the classification of pitch and signal structure [3]. I also had to obtain the root-mean-square deviation, 

Formula (1): root mean square deviation.

                                                 

Formula (1) is a necessary parameter and thankfully it’s already integrated with Librosa, you simply had to call it as a method function to the library. I also needed to get the Spectral Centroid, this parameter indicates where the ”center of mass” for a sound is located and is calculated as the weighted mean of the frequencies present in the sound. If the frequencies in music are same throughout then spectral centroid would be around a center and if there are high frequencies at the end of the sound, then the centroid would be towards the end [1].

I also calculated the spectral bandwidth; this is also a feature from Librosa and is defined as the band width of light at one-half the peak maximum [4]. The last features from the audio that we needed were a bit more complicated to obtain. They are the zero crossing and the Mel-Frequency Cepstral Coefficients. The Zero Crossing is the simpler of the two so I will begin there. The zero-crossing rate is the rate of sign-changes along a signal. This feature has been used heavily in both speech recognition and music information retrieval. It usually has higher values for highly percussive sounds like those in metal and rock [1]. The Mel-Frequency Cepstral Coefficients (MFCC) are a small set of features (usually about 10–20) which concisely describe the overall shape of a spectral envelope [1]. All these features were extracted from 1000 30-second long .wav files that consisted of 10 different genres or 100 snippets per genre. 

Building a neural network is complicated. There are a lot of moving parts that need to be put in place. Thankfully, I have a great team that has been working in different features of our neural network. This week, I got to learn about processing data and getting it ready for our model to use it to train and test. Next week, I will be able to run with the script I wrote and let our model take in the processed data for training. 

References:

[1] https://towardsdatascience.com/extract-features-of-music-75a3f9bc265d

[2] http://cs229.stanford.edu/proj2018/report/21.pdf

[3] https://www.researchgate.net/figure/Mel-Spectrogram-3-Chroma-STFT-The-Chroma-value-of-an-audio-basically-represent-the_fig4_346659500

[4] http://www.perseena.com/index/newsinfo/c_id/37/n_id/7.html

[5] https://github.com/cannon-steven/MusicGenreClassification_NeuralNetwork

Work, School, and Covid

This week has been longer than expected.

Monday was a day of remembrance and of paying special tribute to Martin Luther King Jr. and all those who like him fought for human rights. Tuesday started with a full day of work, but to my surprise I had a fever. I proceeded to log into my workstation and begin my morning meetings. It’s times like these when being a remote worker is a blessing I don’t have to commute. Since it’s telework, I proceeded to check my emails, go over my notes, and get ready for a long day of meetings. By 9am, my first meeting began and I realized that I was not going to be able to produce any substantial work because my brain is fried. I quickly messaged my supervisor and informed the web team lead. He rightly told me to head out to get better. 

I wasn’t sure if it was that serious, maybe it was a slight cold. By midday I had chills and a fever. Thankfully I live with my partner and she’s an EMT and she was able to bring me a rapid COVID test. We both had slight sore throats Monday night but it was beginning to be obvious that I had covid. A rapid test is said to take 15 minutes to show a result. Mine took 8 minutes. I was positive and rapidly declining into the worst head aches and body aches I’ve experienced. 

I had a team meeting that evening to finish creating our project plan. That was not going to happen. I laid all evening in a state of delirium and surprisingly kept day dreaming that all programming languages were interconnected by a set of simple laws and if I just kept thinking about them they would come to me. These same dreams plagued me throughout the following nights.

Not everything was bad. I was able to get an extension and my workplace has up to 80 hours of COVID leave. So I figured I would use the buffer to regain my strength and take a break from everything. I continue to have a small routine and take my dog for small walks. While in this quarantine I am noticing my actionable voice in writing which is a relief. Without having to worry about work for another week I can slowly work on school assignments (cause school doesn’t stop even for covid). And that’s okay, if I didn’t have these moments where I can sit up and write a bit, I would be more grumpy. I feel lucky to be in this while being a remote worker and an online student. Meeting with my group is as easy as logging into discord. My main objective for the rest of the term is to not let this bump in my path deviate my learning objectives for this term. Once I’m less delirious and the fever is gone I want to just sit down and write some code. I miss it, but I also feel like if I sat down and tried to do it right now my head would explode. 

The silver lining to all of this is that I get to spend time with my partner and my dog. Get a break from the same 6am-6pm routine and I finally got to watch the Toy Story movies. This evening I also got to meet with my capstone group and we were able to iron out the details of our project.

Front-end vs. Back-end development

I am a “Front end” developer – I have been working as one for about a month this coming week and I have been loving it and realizing how different coding for fun and coding for work is. Don’t get me wrong, it’s not all bad. There are good things like getting paid to do something you enjoy every day. Getting better at coding and being paid to do so. There are so many things that I want to continue learning and getting better at. I believe a good career should be like that. Getting paid to become better and better every day, whether it’s becoming more familiar with the latest software frameworks or the latest JavaScript standards.

This week, we were tasked with coming up with a project for a hackaton. I was struggling to come up with a good idea for it and ended up tinkering with the idea of Time-based factor authentication, my plan was to write my own hashing functions using the MAC algorithm standards and I think it was too much for me to chew on in a week. After spending a day following a tutorial on building a HOTP algorithm (otherwise known as a hash one-time password) I decided that the blog post code was not something that I could use. Not because it was bad code, but because I did not know if it had undergone testing. I found a TOTP-generator library and I plugged it into my project. Late into the week I began to realize that I am a front-end developer and I should be spending time learning front-end techniques. 

I began to realize that what I’m doing is back-end development. Let me explain a bit, I was just finding the right libraries and sticking them all together without me actually writing any code that accomplished flashy and unique UI components. I fell into my workflow of writing a server and setting up the home route, specifying the HTML views engine for my express app, and passing objects to my views from the server otherwise known as back-end development. Not everything was lost, because in my attempts at writing a front-end application using server-side rendering (SSR) techniques I learned the difference between the two. 

I will elaborate, in a front-end development framework like React, Vue, or Angular, the JavaScript files don’t have to be imported for the server to use. Instead, the JavaScript files are executed by the client’s browser. Initially, this upset me because I had spent all this time learning SSR and now here I am un-learning those techniques to implement front-end development techniques. But there is a silver lining, because now I understand – at least at a conceptual level of abstraction – the difference between a “front-end” developer and a “back-end” developer. I was a back-end developer and now I am becoming a front-end developer.

I had mistakenly assumed that in the workplace there were back-end and front-end developers working with the same framework (expressjs) and that the front-end people just did HTML and CSS and some JavaScript. While the back-end developers would build the routes, add the middleware, and implement the database call functions. Now I realize that is not how it works in the real world.  Not all is lost with this week’s hackaton. I am presenting my back-end product this Friday and I will talk about what I learned and how this project helped me see the important difference between FE and BE when it comes to frameworks. This new knowledge will help me set my development and evaluation goals for my job which is something that I have been trying to figure out. And for tomorrow’s meeting I will be bringing a back-end app to a front-end fight. 

Beginnings

My programming roots

Writing my first program in PBASIC was thrilling. I had entered Junior year of high school and upon joining the robotics class taught at my local community college my love for coding began. Working on my first project was exciting because I wrote code that enabled a small robot to move around and follow an electric tape roadway I laid out. I also started with web development as a senior in high school, specifically with Adobe Dreamweaver. I wasn’t fancy about any of my websites, they all had awful contrasting colors, but playing around with the syntax and the elements fun.  

At my current job I am officially a front-end developer. I work building single-page applications with frameworks such as React, Vue.JS, and NodeJS. Having experience with front-end development has carved a path for me to get into mobile development. I am taking Mobile Development asynchronously with this course and a full-time job – fingers crossed.

As a web developer and mobile developer, I am interested in cybersecurity. I am learning more about all the new technologies that are out there and becoming better at designing secure systems.

In the long-term, I am heading into quantum computing. I started off as a physics major and somehow ended up with two degrees: physics and computer science. I plan on leveraging the skills gained thanks to those two degrees to work on the development of quantum computing algorithms and programming languages.

My favorite technologies at the moment are NodeJS, Python3, C++, JavaScript, Qiskit, and HTML5. My favorite languages that I am exploring at the moment are Rust and Dart. Some of the favorite listed projects are the Mobile Research security app because it involves programming but also doing research. I have a curious interest in doing both for academic and collaborative reasons. I also like the WasmFiddle project because it involves web assembly which is something that I am learning more about.

For this course, I hope to make new friends, work on a fun project, and become a better blog post writer!

Happy Coding/Writing!