Category Archives: Week 3

The Importance of Concurrency

The computer has gone a long way compared to now. Modern computers have several CPU cores or CPUs. We utilize these cores to create high-volume applications. This week I read a blog discussing concurrency in programming. This blog, “Concurrent Programming – Introduction” by Gowthamy Vaseekaran, defines concurrency as the ability to run several programs or several parts of a program in parallel. Vaseekaran then goes further by saying that programs that take longer to perform certain tasks can benefit from using concurrency and that tasks can be done in parallel or asynchronously. This will, for the most part, upgrade the performance of the program. Vaseekaran also goes on to say that computers didn’t have operating systems back in the day, so single programs were executed from start to end. These programs had access to all the resources of the machine. Nowadays, executing a single program at a time is seen as an inefficient use of expensive and a waste of computer resources.

 Several factors led to the development of operating systems that allowed multiple programs to run, such as resource utilization, the author explains that programs must wait for external operations, so using that time to let another program run was way more efficient. Fairness would allow multiple users and programs to have equal claims on a machine’s resources. It is fairer to let them share the computer rather than having one program run from start to end and then another. Also having convenience is very neat, so that several programs can coordinate to perform a single task. It’s interesting while reading this because currently I’m taking a class on algorithms, and so in this class, we will discuss how some programs will take longer than others. There is the worst solution to how a problem or program in this case should be run, and the best solution. Concurrency could fit into making programs run more efficiently.

 The author then goes on to discuss computer threads which are a facility to allow multiple activities within a single process, a series of executed statements, a nested sequence of method calls, etc. We use threads to help perform background or asynchronous processing. The thread takes advantage of multiprocessor systems, and it simplifies program logic when there are multiple independent entities. Java will utilize threads very often. Every Java program creates at least one thread.

Threads can also pose risks; the main problem is the shared variable/resource problem. Solutions for this problem include not sharing any variables, making variables immutable which is the process of making variables unchangeable to their value or state, and using a lock. A lock is a thread synchronization mechanism in java. Another problem includes race condition which is the most common concurrency correctness problem, which pays attention to compound actions, which is when two threads access a shared variable at the same time. Vaseekaran also goes on to explain deadlocking which is a condition where two or more threads are blocked forever, waiting for each other. Deadlocks are caused by inconsistent lock ordering and limitation of resource capacity when a thread is waiting for another lock.

It’s very interesting to see how important concurrency is when it comes to making or even running programs, it brings a whole new understanding of how modern programs work. It’s also interesting to hear about terms such as “deadlock” because it’s a refresher of what it means and what role it plays when talking about concurrency. Reading about how computers used to run programs gives me a new perspective on how these programs run within a system and seeing how solutions were created so that we can run programs more efficiently. When making software I want to come back to this, knowing that one of these days’ problems such as deadlocking or shared variables will happen to me and so using the solutions Vaseekaran has listed in the post they wrote will help me a ton.

Link to “Concurrent Programming – Introduction”: https://gowthamy.medium.com/concurrent-programming-introduction-1b6eac31aa66

From the blog CS@Worcester – FindKelvin by Kelvin Nina and used with permission of the author. All other rights reserved by the author.

Object-Oriented Programming

Object Oriented Programming is a topic that I wanted to brush up on because it has been a long time since I have programmed with it or learned about it.

 I read a blog by Omar Elgar called “The Story of Object-Oriented Programming” which was a great help with relearning the terms and use of object-oriented programming. Omar goes over the major aspects of object-oriented programming which are objects, abstraction, encapsulation, inheritance, and polymorphism. Omar explains objects in programming are meant to represent real-world objects like a car, phone, etc. When Omar gets to abstraction, he sums it up by saying it is focusing on common properties and behaviors of objects and getting rid of what is not important. For encapsulation, Omar explains it is breaking down a program into small mini-programs in the form of classes as well as hiding content that is not necessary to expose. Inheritance is when we take the common properties we created in an abstract class and apply them to the class that is more specific. The last topic Omar covered was polymorphism which is when an object takes the shape of many different forms. Omar even gives some code at the end of his post to show the readers a real example of object-oriented programming being used which is a nice touch and helps to see.

I chose this blog post to read because I wanted to get a clearer understanding of object-oriented programming and how it worked. I have coded using object-oriented programming in the past, but I do not think I had completely understood it and how useful it can be until now. Omar did a great job going over all the important pieces of object-oriented programming and explained them in an easy to understand way.  After reading his blog I feel like I got exactly what I was looking for out of his work. I will be able to apply what I learned from Omar’s blog to my programming and be able to effectively explain object-oriented programming to someone else if I needed to. I have a feeling that having a strong understanding of how object-oriented programming works is going to be important to have not only for my university classes but my future career as a software developer. I would highly recommend this blog post to someone who needs a straightforward and easy to understand overview of object-oriented programming.

Link: https://medium.com/omarelgabrys-blog/the-story-of-object-oriented-programming-12d1901a1825

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

Apprenticeship Patterns: Using Your Title

                When entering the workforce, one aspect that can cause a great deal of frustration is the job title you are given. Many software focused companies will have different titles to differentiate developers of various skill and seniority. Junior developer, developer, senior developer all carry with them an expectation of skill. Depending on which title you are given, it can have an adverse effect on how you view yourself and your skill level.

                ‘Apprenticeship Patterns’ delves into this explaining the common reactions to situations involving being given a seemingly improper title. Those who are given titles such as ‘senior’ or ‘lead’ developer may find themselves frustrated in the fact that they themselves do not feel worthy of such a title. Or on the other side, a person may far surpass their peers in skill and yet be given the same title as them.
Dave Hoover and Adewale Oshineye reflect upon this stating that a title is merely a distraction from the improvement of one’s own skill. Those with a high position of authority should refrain from becoming complacent and those with an unimpressive title must not let fact cloud their judgment.  

The authors explain that the conundrum of titles is a sign that “our industry has a problem” and should be used as a point of judgement for the organization rather than yourself (Hoover, Oshineye pg 51) . Being given a title that seems to be above your skill is often a byproduct of a “shortage of craftsmen in our industry” (Hoover, Oshineye pg51). Being given a title below your skill level can be frustrating but must not distract from your goal as an apprentice. Hoover and Oshineye mention keeping connections with your Mentors (See Last week’s post) and kindred spirits will help keep you grounded in reality.

                I myself have felt at times that my contributions at my old workplace far outpace my current job title. As stated in this pattern, I used this as a measurement of the organization I worked for which clearly did not recognize the skills of those lower in the ladder. Others may feel that their current title implies they are capable of more than they are currently feeling anxious of living up to such a title. All of this comes down to a matter of proper recognition and belonging which is sadly pushed aside in todays fast paced work environments. There is no way to change the industry overnight but having mentors who can reassure you in times such as these goes a long way in ensuring you remain focused on your goals of improvement as an apprentice.

Bibliography

Hoover, Dave H., and Adewale Oshineye. Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman. O’Reilly, 2010.

From the blog CS@Worcester – George Chyoghly CS-343 by gchyoghly and used with permission of the author. All other rights reserved by the author.

Post #1 for Individual Apprenticeship Patterns

Perpetual Learning Pattern: Expand your Bandwidth

This pattern is a very interesting to me. I worked as a software developer from 1980 – 2015. During this time, I found it necessary to take advantage of many resources. Some of these resources were offered to me by the companies I worked for, but more often, it was necessary for me to discover information on my own. I work for over 30 companies. In this 35-year span, I worked as an employee for 15 years, and as a contractor/consultant for the other 20. The employers were usually really generous about paying for tuition reimbursement, computer related conferences, and in-house training. As a contractor, more often I was required to pay for any career advancement benefits myself.

I really didn’t mind this, since they generally paid better, and there is far less politics involved in being a consultant. I was expected to be able to do the work I was hired for, and that usually sufficed.

I was lucky in the sense that I was really motivated to learn new technologies as they came out, and as a result I spend many hours outside of work reading over 100 textbooks, trade journals, attending conferences, and developing my own products.

I managed to gain a large skill-set learning for my own personal development efforts, and this knowledge, along with all I learned “on the job” was parlayed into knowledge, as well as resume entries, making myself more valuable, and allowing my career to “ride the wave” of progress in software as it occurred.

Yes, it is great to expand your skill-set, but if I have any word of caution to those seeking this path, make sure you study a skill as deeply as you can, so as to avoid being a “jack of all trades and a master of none”. I found the best balance to be found in trying to stay with a project for at least a year, but less than 4. In this range, you get deep enough into the peripheral skills they require, as well as sharpening your primary skills.

I worked as a mainframe developer in the 80’s and migrated to being a windows developer by buying my own equipment, teaching myself C and the Windows SDK (with a lot of help from the Boston Computer Society). I made a similar jump in 2008 from C#.NET enterprise level development to becoming an Android developer by jumping at the chance to develop an Android application by my company, but this was only possible because I had already developed the skill-set on my own.

From the blog cs@worcester – (Twinstar Blogland) by Joe Barry and used with permission of the author. All other rights reserved by the author.

Apprenticeship Pattern “Confront Your Ignorance”

In this first apprenticeship pattern, it talks about how a person may have realized they have gaps in their skill set and walks us through ways we can resolve this issue. I decided to do this apprenticeship pattern as my first one because I feel like I relate to this topic. Throughout my undergraduate career, I bounced around from major to major mostly because I am an indecisive person, but also because I am a person who has very diverse interests. I wanted to learn and do everything despite how unrealistic that may all seem. I often took classes out of order so that they would all fit in my schedule. As a result, for some of my classes, I felt like I was always playing catch up because I did not take the previous class that the class was built off or was either taking that class concurrently or at a later date. Because I was taking the classes out of order, I was always trying to learn things that I already should have known before taking the class. This left gaps in my knowledge because I wasn’t always sure that I learned everything that I needed to learn for the class.

One of the topics that the author talks about in this apprenticeship pattern is that often times when a person identifies the fact that they have gaps in their knowledge they don’t know where to start. This was how I felt sometimes when I realized I had a gap in class. In the book, it talks about how everyone learns differently and how we just need to find a way that works best for ourselves. For others it may be going online and reading a lot of articles and working through problems. For me, when I get stuck, I find myself staying late after class or going to my professor’s office hours and working through problems step-by-step with others. One thing that I found really interesting about this section is the topic of finding a balance between trying to hone your skills to confront your ignorance and fulfilling the needs of the team. I found this topic to be interesting because it was something that I never really thought about before. It is important for a person to confront their ignorance and hone their skills because that will make them a better programmer, but it is also just as important that you are mindful of others that you work with because in whilst in the process of honing your skills, you may inadvertently drag your team down. This made me realize this is something I need to think more about and work on in the future.

From the blog CS@Worcester – Just a Guy Passing By by Eric Nguyen and used with permission of the author. All other rights reserved by the author.

Your First Language

No matter the area, everyone must start from somewhere. In Apprenticeship Patterns, the author addresses this concern for learning to program in his patten “Your First Language.” Your first language will determine your career direction, and it is essential to make sure your initial language aligns with your desired career path. For instance, an individual who aspires to be a Game developer should learn C++, whereas someone interested in data science should learn python as their first language. For someone who wants to be a software developer, their first language is flexible and can solve as many problems as possible that their work demands. The author also suggests that tests should be used frequently while learning your first language to check your understanding of the language over time.

While reading this pattern, I reflected on how I learned my first language, JavaScript, using NodeJS. I personally related to the pattern’s recommendations. This pattern is beneficial for individuals who have yet to learn a programming language or are still on the fence about which one to dive into deeper. I found it interesting the pattern recommends focusing on learning testing libraries to check your knowledge of the language while you are also learning to program in it.

Doing this would be challenging at first but prove to be beneficial in the long-term because of how necessary testing is in the software world. I have created software in the past while completely excluding testing from the project, and I did this from lack of knowledge of how to test and not understanding the importance of testing long-term. If I had known this pattern earlier, I would have incorporated testing into my process of learning my first language.

I slightly disagree with the pattern’s suggestion that you choose your first language based on whether you have someone in your network who can act as a teacher to guide you with learning that language. I think it would be beneficial in some situations, but if someone cannot network with a person who knows about the language they want to learn, I do not think this should be a limiting factor. There are many online resources and forms that can act as learning opportunities that can stand in place of a single person who can act as a teacher or a guide.

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.

Apprenticeship Pattern: “Your First Language”

This Apprenticeship Pattern deals with a beginner programmer trying to enter the field by learning his first programming language. The pattern suggests various ways the beginner programmer can increase his experience, including but not limited to: learning a programming language from a friend, reading books based on it, and or joining a community around that language.

One of the things I find particularly surprising that is mentioned in this pattern is utilizing “test-driven development techniques”. While I have used testing before as I was learning my first programming language, it may have helped me learn features about the language and development in general that I haven’t yet thought of. For instance, if I create a class and I need to test it, creating test cases allows me to break down a class that I understand and view it from a different perspective.

This pattern has somewhat changed the way I think about my profession. Much of the changes in my thought about my career have to do with an explicit acknowledgement from reading this pattern, especially in relation to things I’ve known but never completely acknowledged. Mastering a programming language really does make the most sense to me, and it is something I’ll recommend when others who want to get into programming ask me.

I do disagree with two parts of this pattern. The first is in relation to which programming language one should choose. This may cause difficulty due to the issue of a complete beginner not having appropriate context to the uses of a language, and thus if left alone he could make a decision that could limit his beginning programming experience, and thereby causing a ripple effect down his career. 

The select part I disagree with follows up from the first. If he decides to learn a programming language based on his friends, this may cause a similar issue. If he decides to learn JavaScript from his friends, which he could eventually master, he could have a hard time contextualizing other features present in other languages. Thus, even though the pattern mentions not to be pushed towards a “one-size-fits all approach”, learning a more general programming language like C++, though fairly dense, can give more context to other languages, from JavaScript to x86 Assembly. 

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.

Concrete Skills

This pattern starts off with a strong quote by Pele McBreen by saying, “Having knowledge is not the same as having the skill and practical ability to apply that knowledge to create software applications. This is where craftsmanship comes in”. I agree 100% to this quote. Until I was a junior, I had no idea where to apply my coding skills I learned this far from classes such as cs140, cs101, cs242 or any computer science classes. Then I decided to think of some side projects I can do, or I can try to do, and the first thought was a discord bot. I did create a discord bot for a group of mobile gamers using java. The bot basically returned how much time is left for a game tournament, and the bot also greeted every new members that came to the group. This was a fun project, but it was not enough for me, so I decided to focus on a project which I can keep on building overtime. Something to enhanced my both frontend and backend skill, so in order to do that I made my own simple static website with the custom domain name of sandeshgurung.com. Now my primary goal is to add more content to my website while also showing my skills at the same time.

As for the pattern, it felt like what I need to read at the moment as I am applying for jobs, intern, or any contract jobs. The context is to get a hold of a talented team of craftsmen who can provide me with a better learning opportunities than I currently have. The problem is that no team or company want to hire someone who can slow them down or even can be any help to them at all. The solution is to acquire some concrete skills that would get me past the crude HR filters and managers. Some concrete skills examples can be writing build files which many open source frameworks such as Vue.js that we are using for our capstone project.

The best knowledge I got from this pattern is from the Action section, which basically said to get the CV from the people whose skills I respect. Locate their skills and identify which can be immediately useful on the type of team I want to join. Plan a project based on that skill and implement it.

From the blog cs@worcester – Dream to Reality by tamusandesh99 and used with permission of the author. All other rights reserved by the author.

Apprenticeship Pattern “The White Belt”

This apprenticeship pattern describes as how we as programmers are comfortable with the language that we are best at and then how we try to apply our knowledge to learning something else. In the end it is hard to learn something new that way. What we realize by doing this is that it is difficult to then try and learn something new, and then we may end up becoming stagnant in our growth. The white belt method tells us to forget everything we thought we knew previously and come into learning something new with the mindset of a beginner. Although we lose productivity in the beginning, it will end up being a big step in mastering something new.

One of the most interesting things I enjoyed while reading about this pattern was an example of how to reimplement a Java pattern into another language like Io and then into something like J. we can notice how the code can change drastically from one to another and yet at the end of the day they all do the same thing. This example is eye opening to showing how similar and different every language is and that we can’t just take the same knowledge we have in something and apply it to something else. We have no make sure we go in with a fresh mind and try and follow the new language’s nuances and set of rules and forget everything we think we should know instead of trying to apply it to something new.

This pattern is very insightful and applies to what I’m currently working on in class. We are attempting to learn how to code in React Native and I feel as though my growth in learning and the progress that I want to achieve is not what I want to. It might be because I’m trying to apply my skills in java to a front-end language and that does not mesh well whatsoever. I’m an impatient person when it comes to learning something new, but this pattern is a great way for me to keep in the back of my mind because progression shouldn’t come in an instant, it comes with slow and steady progress and constant repetition.

From the blog CS@Worcester – Life as a CS Student by Dylan Nguyen and used with permission of the author. All other rights reserved by the author.

Apprenticeship Pattern: Craft over Art

The pattern I decided to read is titled “Craft over Art” from chapter 3 of Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman by Dave Hoover and Adewale Oshineye. The line that best summarizes this pattern is the one that states how the programs we create can be beautiful, but must be useful. This pattern starts off with a quote by Richard Stallman in “Art and Programming” that defines programming as, “a craft, which is a kind of art, but not a fine art.” This distinction is important because it shows how making beautiful programs is a good thing, but how its beauty should never outweigh the utility of the program that has been created. This pattern ends by giving us two tasks. The first task asks us to find something to do where we can prioritize usefulness over beauty. The second task is a reflective one that has us think about times we have chosen artistry over utility in our craft.

One of the sentences that I found interesting was the one that described how “utility and beauty are not opposed to each other, but interdependent.” This sentence stood out to me because although there is no denying that programs must be useful, it reminded me that I can not completely neglect the aesthetics of my program either because it goes hand in hand with how it is used practically.

As far as how this pattern has caused me to change the way I think, I would say that this pattern has made me be more mindful about the kinds of choices we make in our capstone project. We have already had a couple of conversations around this topic and I’m happy to say that our team has erred on the side of practicality over aesthetics. One of the things we have said in our team is that we should focus on setting the foundation of our project, and if we have enough time, we can come back and worry about our application’s appearance some more.

Overall, there isn’t anything that stands out that I strongly disagree with. It was a reassuring chapter to read after reflecting on some of the decisions my capstone team has already made on this topic. Additionally, it is a great message to instill early on in my programming career.

From the blog Sensinci's Blog by Sensinci's Blog and used with permission of the author. All other rights reserved by the author.