Author Archives: James Young

The Long Road

When I started programming, I was hoping to be a professional programmer within a year. Maybe two. I pictured myself as an expert, and studied the minutia of Python. If I memorized the documentation, I’d be an expert, wouldn’t I?

This apprenticeship pattern describes why that line of thinking is false. Becoming an expert is a lifelong experience, and the expert realizes there is always more to learn. It warns against taking the best, highest-paying job as soon as possible. Instead, value learning and accept the role of an apprentice.

I beat myself up for not pursuing my interest in programming when I was a child. I asked a cousin how he programmed video games when I was 10 years old, but didn’t write my first line of code for 5 years. Even then, I found the task daunting. Obsessing over details slowed me down. I didn’t completely dive into bigger projects until my 20’s.

The best learning experience I’ve had was an internship. I had freedom to try new things, make mistakes, and overcome challenges. I built a large project on my own, which my team loved. At a larger company, I would have likely worked on a much smaller piece of a huge puzzle. The experience of starting on my own will pay dividends for my entire career.

Similarly, while returning to college after a few years of programming was frustrating, it was helpful. I had thought CS-101 would be a complete waste of time. Instead, it was a chance to dive deeper into subjects I was already familiar with and gain exposure to concepts I hadn’t. It provided a foundation, which is the essence of this pattern.

This section of the book says there is no one so far ahead that you cannot catch up if you think decades ahead. This idea is an extreme relief to those of us who started a bit late. It’s tempting to compare ourselves to the teenage CEOs of the world and take shortcuts to catch up tomorrow. But I plan to write software for the rest of my career, so this pattern is a reminder to take my time, enjoy the process, and understand that consistent, continual effort will get my skills where I’d like them to be.

From the blog CS@Worcester – Inquiries and Queries by James Young and used with permission of the author. All other rights reserved by the author.

Android Activities and Fragments: Getting Them Straight

AndroidX has brought a few changes to the Android framework, but the general architecture remains the same. Likewise, the few years since I’ve first learned Android has completely changed how I feel about Android. At this point, I am developing the basic architecture of my independent study app.

There are a lot of conflicting opinions about Activities and Fragments in the Android Developer community. A few years ago with my limited Android experience, I did not completely understand. I likely don’t completely understand now. However, I have better tools and more programming experience to see how they should be used, as well as to make my own decisions on how to use them.

At first, I found myself paralyzed with confusion on how Google wants its developers to use Activities and Fragments. As an example of how programming concepts translate well to other technologies, learning Angular helped me understand the difference. Activities are a single “thing” that a user does, and can be thought of as a web page. A Fragment should be used for a modular UI component, and function as Components do in Angular.

This isn’t a perfect analogy, as the frameworks are very different, but this is a good way to proceed when deciding how to structure your app. Google’s Introduction to App Architecture guide is a great explanation, and the most important thing to remember is to maintain a separation of concerns. In the end, Activities and Fragments aren’t a significant part of your app. They contain your app. They are something your app uses to work within the Android framework, and your business logic should be elsewhere because Android will pause or stop any Fragments or Activities it needs to if, for example, memory is running low. There is no guarantee they will maintain state unless you take additional steps to ensure it does so.

In researching opinions on how to use them, some people mentioned that they’ve seen developers decide on having a single Activity, and adding all features with Fragments. This is a tempting solution, but that might result in complex logic to control navigation. Furthermore, Fragments are meant to communicate through their parent Activity. In a large app, this would likely result in many implemented interfaces and complicated callbacks. Bloated Activities a big NO.

Likewise, others mentioned only using Activities and not adding complexity with Fragments. This seems a bit more reasonable, but restricts reusability of the Fragments in the UI. Only one Activity can run at a time. The beauty of Fragments is they can easily be dropped into a layout and reused. If they are designed to interact through their parent Activity, two Fragments can be shown at the same time on a larger tablet, even if they must be shown on different screens on a phone. Creating Activities only would mean either creating new Activities with repeated code for a tablet, or reusing the phone UI at the expense of user experience.

I’ll reiterate: separation of concerns. In Android, or any framework, understand the philosophy behind a class and component before deciding to try to simplify things. It’s likely that they were designed to prevent the problems you will run into.

From the blog CS@Worcester – Inquiries and Queries by James Young and used with permission of the author. All other rights reserved by the author.

Confront Your Ignorance

This week, I’d like to discuss the next step from last week’s apprenticeship pattern. Once you’ve exposed your ignorance to others and realized it yourself, you have to own it and fix it. If others can’t help you, you’re on your own.

This pattern can be used in isolation, without showing others. This is helpful if it’s something very basic which would be embarrassing to admit to, or something you lied about knowing, which is never a good idea. The downside to learning on your own is an isolationist mindset. In a team where everyone is working on their own, this could create a culture where ignorance is frowned upon.

I generally agree with the ideas in this pattern. It is good to keep its downsides in mind, especially since I know I generally prefer to learn on my own. Sometimes, it is simply more efficient. In college, I’ve saved about 2 semesters’ worth of time (and money) by taking CLEP exams, learning the material on my own. For some subjects, it’s simply much more efficient to create my own study guide, find the gaps in my knowledge, and fill them in.

The result of doing so has been much clearer, broader, and more detailed understanding of the subject matter as a whole than I would have otherwise had taking a class. Taking a single exam held me more accountable than a class generally does, which is broken up into smaller assignments with the goal of preparing you for the final exam.

This would never be the case for learning to work on a software team, as we are in our software development capstone. Reading about Agile won’t make you an expert in Agile. Collaboration is a practice.

While not always ideal, I think this pattern can be extrapolated to professional applications. If you’re learning a technology on your own, you don’t know what someone might ask of you. The pressure is on to learn as much as you possibly can. If your goal is to appear as knowledgeable in a subject as possible, this pattern might be the way to go.

The warning against taking this pattern to the extreme is valid in cases of working with a team. It is important to use discretion when choosing between exposing ignorance to others, or confronting it on your own. I plan to lean toward exposing ignorance and asking for help in the future.

From the blog CS@Worcester – Inquiries and Queries by James Young and used with permission of the author. All other rights reserved by the author.

Machine Learning Problem Framing

Last week, I gave an overview of my planned independent study project. This week, I’ll give a bit more detail on what I’ve done.

I have a habit of preparing for classes before they start. I buy the text books, get an overview of the material, and prepare to apply learning techniques throughout the semester. This helps me identify problems before the semester starts and address them in class as I go. Likewise with this project, I had hoped to get as much as I could done with machine learning before this semester started to hit the ground running with the software portion. Naturally, my ignorance led me to assume the problem was easier than it actually is. After a great conversation with a communications professor, I realized the problems I was trying to solve had to be broken down.

Counter-intuitively, the broken down problem is more difficult. To recap, my project involves machine learning and audio signal processing. Although great leaps have been made in this field and many problems have been solved, they mostly use clever tricks to achieve the results they get. Take speech recognition for example: your text-to-speech software transcribes nearly 100% correctly. Machine learning models can use huge datasets of audio, as well as commonly-spoken phrases to decide which words you’re most likely to say. The result is that mumbling, stuttering, or ambient noise is a bit more forgivable. On the contrary, transcribing each and every syllable is not nearly as easy, and in fact it’s a problem that has yet to be solved. That’s a shame, considering I was hoping to transcribe an audio sample into phones as part of my process and I somehow doubt I can do it without first getting a PhD.

This realization has led me to take a quick course on machine learning problem framing. It teaches the process of developing an hypothesis and developing a model to prove it, as well as resisting the temptation to shoehorn a problem into machine learning when a heuristic solution is as good or better. I did manage to find examples of using machine learning to solve some of the problems I wanted to (dating back 20+ years, even), but unfortunately they were each limited in scope and would be difficult to use to make a cohesive app. My goal isn’t a Frankenstein project.

In an effort to dig deeper, I’ve also done an introduction to Pandas tutorial, and started on a Tensorflow tutorial. These are surface-level in and of themselves, but help in understanding the higher-level frameworks. My hope is that understanding the basics will allow me to create a model that has an exciting application. In the meantime, I can implement the prerequisite features in software: audio recording and signal processing.

I’m going to dive into more specific problems as the semester goes on and I get more comfortable with the topics. I’ve already come up with a list of ideas and find myself wanting to write posts on small things like Android project flavors and build configuration. Posting thoughts and lessons in a public place has been great for accountability, and my goal is to know these technologies inside and out 4 months from now.

From the blog CS@Worcester – Inquiries and Queries by James Young and used with permission of the author. All other rights reserved by the author.

Expose Your Ignorance

This apprenticeship pattern concerns something that most people are afraid to do. Nobody wants to look ignorant in their profession, because we are expected to be competent and knowledgeable and that is what we are paid for.

The main idea is simple: don’t pretend to know something you don’t. This leads to headaches in many ways, but most importantly it will make it more difficult to learn what you need to learn. In software there is an endless supply of new technology to learn and throughout a software career, there will be countless projects that use something you don’t understand. Admitting this fact and asking others for help is the quickest way to learn it. At the same time, you will build trust with your team and show that you know how to learn.

We are trained to look competent from a young age. We need good grades to get into better classes, a better college, the best job possible. Getting a poor grade reflects lack of preparation rather than exposing ignorance, so it’s natural to think that we will be seen as unprepared if we show ignorance in our work. If this fear is realized, it is likely a problem with the culture.

The most important idea in this pattern is showing others that learning is part of the software process. Speaking from experience, I’ve never judged a coworker or classmate for something they didn’t know. Each of us has our expertise, and if I don’t have time to teach something, I can at least be there for support if they need it. What would become an issue, is when someone says they can get something done and only much later admit that they can’t, when it’s too late to get them up to speed.

Likewise, people have always been willing to help in the times I’ve admitted not knowing. More often than not, the response has been mutual frustration. I’ve saved myself a lot of worry by admitting confusion and hearing from tenured employees that “it’s just confusing, I don’t really understand it either”. The result is a collaborative effort where both people come out knowing more, and having a better rapport in the future.

This pattern is an excellent reminder that we’ll never know it all, and that pretending to is not a long-term solution. The suggested action is to write down five things that you don’t understand about your work, and showing it where others can see it. This seems like a good tactic, and I plan to do this on a whiteboard at work. Coworkers who know better than I will hopefully guide me in the right direction.

From the blog CS@Worcester – Inquiries and Queries by James Young and used with permission of the author. All other rights reserved by the author.

CS-499: Independent Study Introduction

This semester, I’m building an Android app for an independent study.

The Proposal

After building a breadboard computer and beginning to understand electronics, I started to learn about audio electronics. This sparked (or reignited) a latent interest in audio processing. Working in a call center selling audio equipment is actually the reason I was motivated to return to school to study computer science, so I feel there is good reason to pursue it in my final semester.

I also began with Python, and moved to Android apps in my early programming learning process, so I’d like to refresh these skills and dig deeper. This project will serve as a constant reminder to how far I’ve come from those early struggling days.

So the app will use Python machine learning libraries to analyze user audio data and provide the user feedback based on this data. I am purposely being vague; not because I think I have the next big idea on my hands, but because I expect many changes as I struggle with the machine learning model.

Regardless of where the model winds up, this is a software development independent study. I will have a working, professional app within the next 4 months, using the technologies I have proposed.

The Motivation

Why, though? As an independent study, with an already-busy schedule, I’m going to have to set aside time each week when I work on this project, no matter what. Originally, I wanted to take Robotics this semester and I was signed up for it originally, but unfortunately there is not enough time in my schedule. On Tuesdays I’m sure I will find my mind wandering, dreaming of playing with robots instead of struggling through machine learning and Android Studio.

But that is part of my reasoning. I want to find the motivation to do things with a self-imposed deadline. These are tools I want to learn, to create and potentially sell a product. At the end of this degree, I want to be able to show a project to future employers that say, “this is what I did. Not because I had to, but because I enjoy it”. I want to be able to have users who give me unfiltered feedback. I want to fail, figure out why I failed, and eventually succeed.

Of course, I have done all of these to some extent already. But this is my following my current interests and goals.

The Progress

I have made a couple small spike projects to begin relearning Android and get started with Tensorflow. I have already built the back-end and gotten an app to communicate with it. I’ve also done basic user authentication.

When I first proposed this project, I set a schedule of features and tasks to complete. Due to other projects which used the same technologies and flashes of motivation I’ve already worked ahead a bit, but I still plan to complete each portion according to the schedule, as best as I can. The machine learning model will be concurrent work as I adjust it.

Next week, I will go into more detail on the tasks I’ve completed so far.

From the blog CS@Worcester – Inquiries and Queries by James Young and used with permission of the author. All other rights reserved by the author.

Apprenticeship Patterns Introductions

After reading the Apprenticeship Patterns book introductions and a few of the patterns, I have to say they are very straightforward, which the book itself admits. The utility in reading them is that is is very easy to forget these ideas, or never apply them to your work.

I was ready to condemn the book from the beginning, as it introduced the idea of apprenticeships in medieval through industrial revolution times. I thought to myself how naive it is to write a book about such bad situations, and that the authors must be romanticizing this time. This thought was immediately shut down as I read the line, “we believe it is possible to reject the romantic fantasy”, in favor of something better. This served to drive further points home, as I had just fallen victim to some of the behaviors it warns against.

This book describes patterns that “are tools that solve one set of problems and create new ones.” And it says that “the trick is to use your judgment to choose the problems you prefer.” I love this idea because it illustrates the fact that one doesn’t need to be able to solve every problem if you can figure out how to solve it with the tools already at your disposal.

At the same time, it provides a framework for learning more tools. The idea of “exposing your ignorance” stands out most, because most of us want so badly to be intelligent and competent. Having spent some time in the workforce without a degree, I have become sensitive to this: trying hard to prove that I’m not “dumb”. Maybe it was actually that, that had slowed me down.

On “Emptying the Cup”

It’s always a good reminder that you might not know as much as you think. Or if you do, that you might be biased and closed to new ideas. I am very proud of some of my work, having had moments where I feel like a programming God, and in the face of a new technology, I am always humbled. But I feel that I run the risk of using my past professional and education experiences get in the way of new methods.

On “Accurate Self-Assessment”

I had to read some of these patterns, because I tend to self-assess in the negative direction. I already usually assume I’m “the worst”, or that my work isn’t good enough, and seek improvements. Still, the patterns themselves are useful, describing how to solve this problem. I tend to spend too much time assessing. I need to consciously tell myself to move on to new things, rather than dwelling on what has been done and how it can be done better.

…And Onward

My capstone team has been discussing learning some new technologies, and these introductions have lessened the fear of diving in and trying them. At the end of my college career, I have been reflecting on what I could have done differently, or how I could have done it faster, so this book comes at the perfect time.

Haven’t we all sometimes wanted a chance to start over again? How exciting to have a chance to be at the beginning of something.

From the blog CS@Worcester – Inquiries and Queries by James Young and used with permission of the author. All other rights reserved by the author.

LibreFoodPantry Overview

The LibreFoodPantry website has a description of the project and is professional, complete with a vision, mission, values, and license.

The most useful and interesting link on the website is the Principles behind the Agile Manifesto. This is clearly the work of software developers who were fed up with time-consuming processes and being locked in to a specific process or tool.

Working software is the primary measure of progress.

Principles behind the Agile Manifesto

Change is inevitable in software, and the most important thing is that it works. That is important to remember going into this field, and I hope writing about it solidifies the concept. It is tempting to set a plan and stick to it, as one does in most contexts.

This semester I am lucky to work with “motivated individuals” and hope to create great work with a “self-organizing team”.

From the blog CS@Worcester – Inquiries and Queries by James Young and used with permission of the author. All other rights reserved by the author.

Software Development Capstone

I am finally in my last semester of my Computer Science degree, Spring 2020. CS-448 is our Software Development Capstone, in which we will be developing an open source project for LibreFoodPantry.

I’m very excited for this project. It will be real development experience with a close team, gaining hands-on experience in Agile. Contributing to an open source project is good experience as well, and it will be for a good cause.

I get a warm, fuzzy feeling knowing that seniors who are itching to graduate will be struggling with our legacy code for years to come. Here’s to minimizing the damage.

From the blog CS@Worcester – Inquiries and Queries by James Young and used with permission of the author. All other rights reserved by the author.