Category Archives: Week 13

Apprenticeship Pattern: Expand Your Bandwidth

Christian Shadis

In the apprenticeship pattern Expand Your Bandwidth, Hoover and Oshineye explore the importance of learning as much new information as possible as a new developer. They talk about how many developers have relatively low understanding of programming concepts when they enter the workforce, and how these new programmers can take advantage of the wealth of knowledge available for consumption. They make the analogy of drinking out of a straw versus out of a firehose – increase the volume of information you consume as much as possible.

This pattern particularly resonated with me. I feel as though I have a very solid low-level understanding of several different concepts in the world of software development and data analytics. I lack that high-level expertise in all the subjects I have studied in the past three years. I have attempted to emulate this pattern before learning about it: I have a shelf stuffed with books about everything from CS basics to networking to Machine Learning, and I do my best to read as much as possible about the subject.

As mentioned in my previous post, I entered the Computer Science world far later than I would have preferred and faced the difficulty of entering a vast industry filled with passionate, lifelong learners as a programmer with absolutely no knowledge of anything related to computer science. I believe I have spent my time wisely, learning lots of information about several different subjects, and managed to build up a solid toolkit before graduating.

I hope to use this pattern throughout my career, but especially so over this coming summer. I will be seeking employment as a software developer or engineer, and I feel as though some gaps in my knowledge should be plugged up as soon as possible. I plan to do a deep dive on full-stack development and connecting the frontend and backend of a system and use my newfound knowledge to do a complete rebuild of my website (ctshadis.github.io) with a proper full stack and domain name. I believe this will require learning lots of new information and applying it immediately in a way that will make me more qualified for any full-stack development jobs I apply for.

Reference: Hoover, D. H., & Oshineye, A. (2010). Perpetual Learning. In Apprenticeship patterns: Guidance for the aspiring software craftsman. O’Reilly.

From the blog CS@Worcester – Christian Shadis' Blog by ctshadis and used with permission of the author. All other rights reserved by the author.

Share What You Learn

To avoid frustration, I try to keep myself motivated by thinking about the feeling when I complete my task. Along with the feeling of completion, sharing information among people is some sort of motivation that I want to show off every time I learn something useful.

In my view, I am not a beginner applying this method introduced in Dave Hoover’s book since I am not feeling strange when I explain to my mates what I have learnt, instead, I actually like doing it because it is not only a way to help my mates understand the part that I have been working on but also a great opportunity to test my understanding over subject and enhance my memorization onto it.

I started feeling the benefits of sharing information with other people since high school. Back then, I mostly helped my friends when they didn’t understand some math problems in class, and every time I do it, I remember that issue much longer, and I feel more comfortable with the technique used to solve that problem. The more I “teach” them, the better my “teaching” skill and my sense of learning improves as well. As they started counting on me in these difficult tasks, I would perceive the sense of motivation to push my learning into the higher level.

We are afraid of having a conversation about a topic that we do not really comprehend. In both math and code, exchanging information, in my opinion, is an infamous problem since I have encountered lots of people who suffer from it. Coding and mathematics have a similar concept (it is like a feeling, but I cannot think of a more specific word to describe it) that once you understand the flow, solving their problems is utterly attractive. Therefore, besides the benefit of improving my apprehension, I also want to help my friends be able to comfortably debate when it comes to specialized topics.

As we grow, we have less confidence to ask other people, searching for problems online is therefore becoming a more popular approach. Hence, publishing blog posts to share my learning will be my next path to maintain my motivation and improve my understanding. Stay tuned!!

From the blog CS@Worcester – Vien's Blog by Vien Hua and used with permission of the author. All other rights reserved by the author.

Find Mentors

Many apprentices in this craft are inexperienced and have little knowledge of what’s next in store for them or how to prepare for what’s to come. Luckily, most apprentices, are not the first person to walk down the same path, and there are many people who are experienced and knowledgeable who could provide help and guidance when needed. This apprenticeship pattern is about finding these people and having them mentor you in your journey to becoming a master craftsman.

Mentors can be quite hard to find. It may be easy to locate authors of books on the craft, accomplished conference speakers, committers on popular open-source projects, and developers of successful websites. However, it is difficult to convince them to mentor you. They may not be interested, or they feel intimidated by the request. One should expect rejection as a risk. However, the risk of being rejected by a mentor is fairly low, while the payoff is massive. The key when searching for mentors is to be tenacious and appreciative.

One thing to keep in mind when searching for mentors is that it’s important to understand that mentors are also going through their own journeys towards becoming master craftsmen and that no one person knows everything. It’s tempting to want your mentor to be a master because of their vast and deep knowledge of the craft. However, such temptations should always be resisted. You shouldn’t dismiss mentors by over-focusing on their inevitable weaknesses or blind spots, these mentors still have a lot to offer.

Although this apprenticeship pattern discusses a simple concept, it is extremely important. Finding people to guide you in your journey is invaluable. Mentors can help you make the right decisions for you, they can teach you new techniques, they can give you tips about the craft, and they can give insight into what you can expect. Every apprentice should actively look for mentors and learn as much as they can from them. By the same token, it’s important to realize that just as you are looking for mentorship from people ahead of you, there are also people who are behind you who seek mentorship from you. Being able to pass on your knowledge and experience is one of the ways where an apprentice can begin to transition into a journeyman.

From the blog CS@Worcester – Fadi Akram by Fadi Akram and used with permission of the author. All other rights reserved by the author.

Find Mentors

Programming alone can be difficult with unclear paths to take with lots of uncertainty about which approach will be the best. Without someone who can give you guidance, it makes it difficult to move forward alone. It is necessary to find a mentor who will be there to guide you in times of uncertainty. The mentor you find does not need to be someone who knows all, but someone who has more knowledge and experience than you in a particular programming area. Finding a mentor requires a lot of searching because they may be hard to find, especially finding someone who is willing to spend the time to help. However, when you find one, they will provide a world of experience.

I found it interesting the author himself found a mentor after a few years of already being a programmer. It shows that it is never too late to find someone who knows more than you and to ask for help. This practice relates back to a previous pattern about exposing your ignorance. You must be willing to do this in order to get the proper guidance.

This pattern focuses on the theme of approaching programming as a craft where you must start as an apprentice. This reminds me of my grandfather who was a carpenter. When he was young, he started small jobs without much knowledge. He learned from the other men on the job who were eager to teach him what they knew. Eventually, he learned as much as they did and in his later years went on to share his knowledge with those who were younger just learning their craft.

After reading this far into the book, I have reshaped the way I view the development landscape. I feel that it requires the perspective of apprenticeship and the need for finding others to help you develop your craft. I think it is possible that at the same time you are being mentored, you can also be mentoring someone else. There are no areas in this pattern where I disagree with the author. I find that his recommendations and personal experience are well thought out and are great advice.

From the blog CS@Worcester – Jared's Development Blog by Jared Moore and used with permission of the author. All other rights reserved by the author.

Retreat into Competence Pattern

For this week’s apprenticeship pattern, I did a reading on “Retreat into Competence”. Retreat into Competence pattern about feeling overwhelmed, realizing how little you know about or taking on a big project and things may not be working so well for you. In this pattern it talks about how you should “pull back and then launch forward like a stone from a catapult”. What this means it to retreat to a zone where you’re comfortable with and once you feel ready, you’ll be able to launch yourself even further than before you might have felt ‘stuck’. An example I found from this pattern is pick something that can be self-contained that you know really well and stick with it, by doing this, opportunities will emerge, and it will allow you to capitalize on those opportunities and you will end with great gains.

Unlike my other blog posts, my initial reaction is not quite the same since I have yet to experience this. The closest time I ever felt overwhelmed is just the pressure of trying to find a job by graduation. Its not exactly related to what this pattern talks about but the same concept. For me, it was a matter of constantly getting rejection emails from companies, so I took a step back to look at what I may be missing. Once I was able to go over my resume and qualifications, I started to reapply and now I am starting to receive multiple invitations to take coding assessments and scheduling interview dates. This pattern goes hand to hand with ‘Expose Your Ignorance’ and ‘Confront Your Ignorance’.

The pattern has changed the way I view my profession because I never thought about needing to take a step back in programming. Maybe because I never ran into a situation where I needed to? However, after reading about this pattern I started to reflect on the things I’ve done so far and what else could I do to improve my programming skills and knowledge. I am also trying to figure out what I am really good at so I can focus a little bit more on that skill and work around it so when the time comes and an opportunity presents itself, I will be able to capitalize on it.

From the blog CS@Worcester – Michael's Developer Blog by michaelchaau and used with permission of the author. All other rights reserved by the author.

The Long Road

This week I have decided to write about the long road. As we reach the end of the semester, it seems like a good time to acess the road ahead of me as a software craftsmen. Thus far, I have seen my road as just getting a software job. And everything else was secondary to that. That road included going to school, creating a resume, appying for jobs, studying for interviews, and interviewing. Many of these tasks included programming, but most of this time was not actually spent programming. Now I will be starting my first software job after graduation, and it is the perfect time to consider the road ahead.

Dave mentions that a craftsmen can achieve almost anything if he stays with his craft for 20 years. And that learning is a lifetime skill. He also mentions that the craftsmen should value long term growth over all else, including salary. I have seen online that senior engineers can make comparable salaries to technical managers. So I don’t think that craftsmen need to choose between salary and growing their craft. There seems to be plenty of roles that provide learning oppurtunities, and high salaries. But Dave argues that money should not be the main motivator of the craftsmen.

The action is to imagine my career 20, 30, and 40 years from now. It is difficult for me to say what my career will look like this far out. But I know that I want to work in tech for my entire career. I do know for the next five years I want to work as a Software Engineer. With the hopes of moving from Junior level, to a mid level engineer. From there, I may decide to take on a leadership role, while still focusing on the codebase most of the time. This could be a tech lead, or Senior Engineer role. Twenty years from now, I could either be in leadership, or a may be a very accomplished engineer. It would be very rewarding to be the guy that everyone goes to with questions, and I do like helping other people succeed. So this could be a good path. Thirty years from now I could see myself being a leader of a tech focused small business, or maybe freelancing. Going out on my own is something I have always been interested in. Forty years from now I will be sixty eight. So I will likely be getting ready to retire. But who knows, maybe I will still be coding at that time.

From the blog CS@Worcester – Jim Spisto by jspisto and used with permission of the author. All other rights reserved by the author.

Docker: The Differences Between a Dockerfile, Image, and Container

Docker is a program used to package applications and their dependencies into bundles that can run on any computer. A running instance of the bundle is a container. Docker containers help developers build software by isolating applications, sandboxing projects, and guaranteeing running software. To have a docker container, one needs to write a Dockerfile, build it into an image, and run the image. When I was learning the process, my instructor explained the process and terms by using only an analogy. He compared them to the process of how source files became executables, and then running processes.  Because analogies only help understand concepts (not define them), the goal of this post is to define Dockerfiles, images, and containers as well as their relationships. To achieve the goal, I will be using information from the article, “Differences Between Docker Images and Containers,” written by Eugen Baeldong, an author who has written about software development extensively. His article differentiates Docker images from containers.

The Dockerfile is a text file that contains instructions on how to find, install, and configure an application and its dependencies. In the same way an embryo is a baby at the first stage of development, a Dockerfile is a container at the first stage of development. Some commands that can be used to create instructions are RUN and COPY. RUN is used to install a package or application and COPY is used to copy files and directories from one location to another. With the commands, instructions are created. The set of instructions tell a computer how to find and install the applications and its dependencies.

When a computer executes the instructions in a Dockerfile, an image is built. According to Baeldong, an image is a template for creating the environment one wants. In other words, it is a snapshot of a system one wants. Returning to the baby analogy, an image is a container at the second stage of development in the same way a fetus is a baby at the second stage of development.  I imagine an image as one’s desktop environment. The icons in the environment represent the application and its dependencies in a dormant state. The application is not running yet in the same way desktop applications do not run until one double-clicks their icons.

When a computer runs an image, a container is created. A container is an environment where an application and its dependencies are running. The application in the container is independent from the applications on the computer. In other words, the contents inside a container and one’s computer are unaffected by one another. I imagine it as a computer inside a computer; however, the second computer will not have a graphical interface because it is not necessary for an application to run.


https://www.baeldung.com/ops/docker-images-vs-containers

From the blog CS@WORCESTER – Andy Truong's Blog by atruong1 and used with permission of the author. All other rights reserved by the author.

A Very Small Introduction to JavaScript

Since we’ve been using JavaScript for the past several weeks in class and in homework, I thought it would be beneficial to help run through some elements of JavaScript I found weird or difficult at first. I’ve noticed some people have a harder time understanding JavaScript’s syntax or how its variables work, so I wanted to make this as a sort of reference.

Types

JavaScript contains primitive and non-primitive types. A variable can be declared with “var”, “let”, or “const”, more on const later. The main primitive types are1:

  • Boolean: true, false
  • Null: null
  • Undefined
  • Number: 72, -174.21
  • String: “Hello, ”, ‘world’

For an object type, objects are very loose and can for the most part be defined with relative ease. 

Let’s take a simple object, named “car”.

This object has three properties, wheels, year, and color. When declaring or assigning properties, the syntax shifts from the typical use of “var num =”, to “num: ”. These properties in an object are pairs: “wheels” and “4” are a pair, specifically a key-value pair as well as an object. This means that there is more than one way to access an object’s properties. 

The second one looks suspiciously similar to a map, specifically one in C++. Objects may be iterated through using a for-loop directly.

Functions

Functions may be defined in a few ways. If inside of an object, the function would be defined as:

Else, it may be defined as the following:

The bottom function declaration is known as arrow notation. A function with arrow notation is not bound to an inherited constructor or the keyword “this”, and its usage with scopes may be troublesome. Its parentheses may be dropped if there does not exist any parameters, such as “getProps => {}”2.

JSDoc

JSDoc is a markup language used to comment JavaScript code, and is similar to JSDoc in many ways. JSDoc may be created by typing “/**”, then pressing enter upon this pop up:

JSDoc is, in my opinion, very useful in declaring classes, functions, objects, types, or declaring types. This is especially important with JavaScript, since types are handled dynamically.

JSDocs can use the following my pressing “@” inside of the comment, revealing a large list of descriptors, with users being able to make any and anytime3:

Upon creating a simple JSDoc annotation:

Hovering over the object “car” will read:

For our function getValue:

This is rendered as: 

Hopefully, this post can be helpful. JavaScript was odd for me when I first started, with these topics being some of the things that took me a while to get used to. The sources contain a wealth of information that I have and will continue to refer to and learn from, and hopefully they can help you too.

Links:

  1. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures (Types)
  2. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions (Arrow Functions)
  3. https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html (JSDoc)

From the blog CS@Worcester – Chris's CS Blog by Chris and used with permission of the author. All other rights reserved by the author.

DRY PRINCIPLES

The DRY meaning “Don’t repeat yourself” principle is a best practice in software development that recommends software engineers to do something once, and only once. The concept, which is often credited to Andrew Hunt and David Thomas, authors of “The Pragmatic Programmer”, is the tongue-in-cheek opposite of the WET principle, which stands for “write everything twice”.

According to the DRY principle, every discrete chunk of knowledge should have one, unambiguous, authoritative within a system. The goal of the DRY principles is to lower technical best by eliminating redundancies in process and logic whenever possible.

Redundancies in logic

To prevent redundancies in logic (code), followers of the DRY principle use abstraction to minimize repetition. Abstraction is the process of removing characteristics until only the most essential characteristics remain.

Redundancies in process

To prevent redundancies in processes (actions required to achieve a result), followers of the DRY principle seek to ensure that there is only one way to complete a particular process. Automating the steps wherever possible also reduces redundancy, as well as the number of actions required to complete a task.

An important goal of the DRY principle is to improve the maintainability of code during all phases of its lifecycle. When the DRY principle is followed, for example, a software developer should be able to change code in one place and have the change automatically applied to every instance of the code in question.

As programmers, we collect, organize, maintain, and harness knowledge. We document knowledge in specifications, we make it come alive in running code, and we use it to provide the checks needed during testing.

Violations of DRY

“We enjoy typing” (or, “Wasting everyone’s time”.): “We enjoy typing”, means writing the same code or logic again and again. It will be difficult to manage the code and if the logic changes, then we have to make changes in all the places where we have written the code, thereby wasting everyone’s time.

How to Avoid DRY

To avoid violating the DRY principle, divide your system into pieces. Divide your code and logic into smaller reusable units and use that code by calling it where you want. Don’t write lengthy methods, but divide logic and try to use the existing piece in your method.

DRY Benefits

Less code is good: It saves time and effort, is easy to maintain, and also reduces the chances of bugs. One good example of the DRY principle is the helper class in enterprise libraries, in which every piece of code is unique in the libraries and helper classes. I chose this topic because as a programmer, it is always important to know why design principles are useful for us, what and how to implement them in our programming.

Software Design Principles DRY and KISS – DZone Java

The DRY Principle: Benefits and Costs with Examples (thevaluable.dev)

What is DRY principle? – Definition from WhatIs.com (techtarget.com)

From the blog CS@Worcester – Software Intellect by rkitenge91 and used with permission of the author. All other rights reserved by the author.

Week 13: Why You Need a CSS Developer

https://www.toptal.com/css/why-you-need-a-css-developer

Keeping in line with my front-end blog posts, I wanted to read another blog post on front-end stuff so I decided to pick this blog post from toptal.com on CSS developers. I also decided to choose this blog post because I think CSS is the first programming language I was aware of, I only knew that it was part of web design but I was always confused looking at it’s syntax. In this blog post from Silvestar Bistrović, he runs over what CSS developers do and why we need one.

He introduces the reader with CSS developers and what they are. They’re web professionals whose primary responsibility is to deliver a polished and styled product to the visitor’s browser. Practically every website uses CSS, but CSS is often not considered an “equal” in the modern web development stack. This has led to CSS being taken for granted, sometimes even overlooked. He then goes on to explain why CSS developers are a necessary good and to have a dedicated CSS developer instead of someone who isn’t.

The blog post is sectioned into 3 sections: What Do CSS Developers Do, Why Do You Need a CSS Developer, and Wrapping Up with every section having subsections explaining further on the section. What Do CSS Developers Do covers what they do, CSS tools, techniques, and principles, CSS, the fact Javascript is everywhere, and that writing tidy HTML always matters. Why Do You Need a CSS Developer covers CSS coding standards, CSS design implementation, organizing your CSS code, CSS code in production, and what CSS developers can do for you. Wrapping Up is self explanatory, it’s a conclusion.

As mentioned earlier, CSS was the first programming language I stumbled upon. I stumbled upon it as a kid playing online games and trying to customize my profiles for sites. I didn’t know what it was at the time and just took CSS code from others and used that to format my profile for those online games. It wasn’t until now that I would stumble upon it again in class during In-class activity 15-16 and realize how important it actually is. CSS is one of the forefronts of frontend design and that was something I didn’t know until now because I haven’t dipped my toes in web dev stuff yet. At first I thought front-end web developers were supposed to be jack of all trades for front-end development but after reading this I think having someone who specializes in CSS is essential to your team and as the author says, “do you want to leave your product in the hands of a specialized professional that could polish it to perfection, or would you settle for good enough?”

From the blog CS@Worcester – Brendan Lai by Brendan Lai and used with permission of the author. All other rights reserved by the author.