Category Archives: Week 6

MINIX3: Scheduler Research II

I’ve had to change my approach the past week or so with this independent study. When confronted with the source code, I think I began to feel overwhelmed by the amount of concepts I had to dive into. As a result, I attempted to take it from square one and relearn many systems concepts while also working on understanding the scheduler. As it turned out, this was a bit stressful for me. So I have decided to instead look at the relevant source code and, line by line, take notes learn things as they come. Perhaps this is the traditional way to handle diving into a large system of work, but since I don’t have a large amount of experience in large-scale work this is a learning process for me. It seems that this new direction is working a bit better for me.

Let’s start with /minix/servers/sched/main.c. The main() function is the primary function of the scheduler. When a message is passed into the scheduler, the main() function defines variables for the message, system call number, the caller’s number, and the result of the system call. Then, it enters an infinite loop. This loop saves the message’s info in the variables that were defined for it, and then checks for special situations such as system notifications, etc. (I’m not totally positive on the function of that, but it says that the balance_queues() function is called in this event.) Then, based on the call_nr (the system call number), a switch statement determines what call from /sched/schedule.c should be executed next, with functions like do_noquantum() (which executes when a process is out of quantum) and do_start_scheduling() (which seems to start the scheduling of the process). So long as the process is executed correctly, a reply is sent back that communicates success, and the loop continues on to the next kernel message.

So hopefully soon, I’m actually going to start tinkering with the scheduling policy and see what I can come up with. In the scheduling report I discussed in my previous post, it was suggested that with the current interface a Round Robin, Priority Scheduling, Staircase Scheduler, or Rotating Staircase Deadline algorithm can be easily implemented, so I’ll learn one of those and aim for that. I’m sure it’s going to take me longer than just a week to fully implement, but we’ll see what kind of magic I can work. I’m also sure I’m going to have to write a couple more of these research-related blog posts before I fully understand the workings and can proceed forward, but having changed my plan of attack, I’d like to finish those this week. Ready to move forward once again!

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

Every little bit helps!

For the sixth week’s reading, I chose to read the pattern, Sweep the Floor. This pattern focuses on a problem where you are a new apprentice on a project. The real-world experience of joining on a team means that you have to learn about the team and the team has to learn about you. These situations are uneasy and earning the trust to contribute to the development that they have worked on before you joined is a problem to be solved. The solution provided for this is to start contributing to the project by completing tasks that the other members do not want to do. Examples provided do not entirely mean that it has to be about coding and could be other tasks such as code review, setting up a project wiki, or updating documentation. As long as you contribute to the team, they will have an easier time and appreciate your work and build trust. The objective is to build enough trust that you can take on bigger challenges and eventually become one with the team.

What I found interesting about this pattern is the excerpt in the second to last paragraph. It is the last thing a student that is about to graduate from university would want to hear. Completing your tertiary education, after spending the four years or more getting the degree, accruing massive student loans to hear someone devalue your education is heart wrenching. However, those who chose the route of getting a degree should be fully aware that this is the reality. The knowledge you gain from school is like a baseline for real work experience. Being accepted to work at a place does not automatically mean you are on the same page as everyone else. You will have to spend time as a newbie and learn about everything the company, team, or workspace has to offer.

This pattern has not changed the way I think about the profession or how it will work because everyone has to start from somewhere. As someone fresh out of school should realize that education doesn’t mean all that much when compared to actual experience in the field.

From the blog CS@Worcester – Progression through Computer Science and Beyond… by Johnny To and used with permission of the author. All other rights reserved by the author.

Craft Over Art

When I read Apprenticeship Patterns, the patterns which tend to stand out to me the most are those patterns which offer a unique perspective and an illustrative focus that is clear and easy to follow. Oftentimes when I am deciding how to proceed with my learning or implementation of code, I get lost in the possibilities, and the guidance the authors provide in this book gives me some much needed clarity.

This apprenticeship pattern is called “craft over art”, because the point of our vocation is to in the end provide a useful product to customers. The value the authors place in this section is on the practical and usable skills that makes up a good developer. The authors illustrate this point well by reasserting and contrasting what it means to be a software craft-person.

At its heart, craftsmanship is making something useful or necessary with an additional style or beneficial features that are added based on the creator’s methods. The authors definitely make this point clear when comparing software development to a craft, and even more so by comparing crafts with the arts. The key difference is that while crafts focus on making a functional product, the fine arts are focused on pure beauty itself.

So what the authors suggest we focus on as apprentices is not the beauty of the product but the functionality of it. Additionally, they describe how often in practice in order to deliver value in time a compromise might need to be made between utility and beauty.

This pattern definitely helped me hone in on which particular skill sets and goals I should be orienting myself around to be successful. Often I worry that I need to be focusing on making the most elegant code or learning the newest fanciest technology, which are definitely good things to aspire for, but in the moment of me beginning my professional journey, it is more important that I pick up practical, concrete skills, and that I focus on delivering the most value and utility. What I gained most from reading this was understanding that bells and whistles will make a product shine, but you famously cannot polish a turd.

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

Confront Your Ignorance

For this week’s blog, we will talk about confronting your ignorance from the Apprenticeship Pattern book. This will be a continuation from the last blog Exposing Your Ignorance.

Now that you have let your teammates know that you are lacking in some skills, it is now time to deal with your ignorance. There are tools and techniques that you need to master but you do not know where to begin. Some of them are things that are expected knowledge from you that everyone around you already knows.

So what should you do?

The book’s solution is to pick one skill or tool and actively fill in the gaps in your knowledge about it. How should you do it is up to you. Whatever works best for you. For some, the best approach is reading all the introductory articles. Others find that looking at the code is a better way to understand it. They also recommended asking around if anyone is also trying to master these skills or ask a mentor that already have these skills and if they are willing to share what they learned.

I find this chapter interesting since it was tied to Exposing Your Ignorance chapter. To do this pattern, you will need to expose your ignorance first. Using this pattern in isolation might lead to a culture where failure and learning are unacceptable and everybody just keeps to themselves. Also, your employer has certain expectations from you and might not be understanding of your educational needs that would get in the way of the successful delivery of its project.

Confronting your ignorance is probably one of the things that you will be doing over and over again in your workplace. Most likely, your first few months in the job would be a learning curve for you. Figuring out what tools they use, how it works, and how you could use them would be the first challenge you will face.

This pattern changed the way I think about confronting my ignorance. Usually, I do everything alone and try to solve things alone. But that seems like a band-aid solution to the problem. It is better to ask people who have mastery of such skill and see if you are doing it the right way, so in the future, you will be more knowledgable and can be a master of this skill as well.

From the blog CS@Worcester – Computer Science by csrenz and used with permission of the author. All other rights reserved by the author.

Apprenticeship Patterns – Kindred Spirits

The Kindred Spirits apprenticeship pattern is about how you need to keep in contact with people who are on the same path as you in order to continue learning and growing your passion. This is important because you may find yourself working in an organization that does not encourage software craftsmanship and does not provide mentors for you to follow. Working with a community provides an environment for exploration and learning that is not as intimidating as working with a mentor. However, when you are working with a community you must continue to think for yourself and not just blindly follow along with what everybody else is doing.

I thought that this pattern was very useful because keeping in contact with peers is one of the most important things that you can do if you want to stay passionate about software craftsmanship. I’m sure that many people find themselves in jobs where they are programming very boring things and start to forget whey they had a passion for software in the first place. If you are in contact with similar people, you can learn about and explore new ideas in a relaxed environment. This will allow you to continue growing and nurturing your passion even though you may be stuck in a job that is stagnant and uninteresting.

I enjoyed reading the two examples about people who followed this pattern because they showed how people were actually able to connect with each other and keep in contact to become kindred spirits. I also think that the recommended action of listing all communities that you could potentially join and going to each is a good idea. There are probably many communities around me that I may be interested in but have never discovered simply because I haven’t sought them out. Reading this pattern has definitely inspired me to find communities to join because now I realize how important it is to be in touch with other people in the field, especially after graduating college. Overall I think that this pattern is very useful and I don’t disagree with anything that was written.

From the blog CS@Worcester – Computer Science Blog by rydercsblog and used with permission of the author. All other rights reserved by the author.

Breakable Toys || S.S. 6

Sams Ships (7)Recently, I have been seeing plenty of messages along the lines of “We learn from failure, not from success.” As someone who used to regularly watch all of Casey Neistat’s vlogs from the beginning days, it is something that has been ingrained in me to take risks and know that if I fail, then at least I did not give up and allowed myself to try.

When I saw the Breakable Toys apprenticeship pattern, I thought this would be the perfect opportunity to discuss trying things! This pattern is basically trying to explain to us that you need a safe space to learn something even if you work in an environment that may not allow for failure. It encourages us to seek our own way to sharpen our skills and take initiative, which would increase our confidence.

I found that this pattern is thought-provoking because where would you be if you did not take all the risks or new experiences beforehand to get to where you are today? I used to study biology and chemistry until I gave computer science a real chance. It was a little daunting at first to catch up but I made it (so far). If I did not take on leadership opportunities when given the chance, would I have the observation skills I have today when it comes to being involved on a team? Probably not!

If you do not allow yourself to try something out or practice something, I think you would feel a lot more pressure. It was reassuring to hear that someone like Steve Baker also experienced something like that, which makes it a lot more normalized.

As kids, we started learning how to interact with the world by playing with toys and developing our own sense of physics. Through that, we took risks like throwing things, sliding things down places, and etc., until we figured things like “oh, maybe I should not have accidentally thrown that ball too high and it went to the neighbors yard!” But at the same time, you’re a little proud that you’ve gotten better at throwing the ball harder.

That’s the same thing with developing yourself in your professional career. I will allow myself some time and space to learn something without that pressure and it may surprise me, once again, how far I may go.

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

B6: Find Mentors

          The “Find Mentors” pattern is explained as the search for when beginners start looking for developed craftsman to show them a specified path. The book explains that the first step is to find someone who is already ahead of you and try to learn as much as you can from them. Eventually, someone will take on an apprentice and you will be able to establish a better idea of your future from there. It can be difficult to get attention from a single master as they try to teach you and try to work on their own projects. This can lead to having multiple people looking over your growth to make sure that there are multiple inputs to your learning experience. The important part of this step is to make sure to not get frustrated or confused with the multiple sources of information. Masters also have their own weaknesses, so make sure that you understand exactly what those weaknesses are and how you would change your learning methods to accommodate those weaknesses such that they aren’t mirrored onto you.

          I found the Find Mentors pattern interesting because it explains the benefits of having someone who can guide you while also explaining how to further enhance your learning with multiple masters. It taught me to understand the issues of having a working mentor when it comes to workloads. I had never thought about how the masters have their own lives to juggle while also trying to teach their students. I found that the idea of getting multiple master was useful but that it could also come with its own drawbacks in some scenarios. It would be tough to find a reliable master and the more masters you have, the more likely it is that one of them may be leading you astray. This idea is what I don’t like about this pattern and I intend to apply it to my own learning. I don’t mind finding a master as long as I feel comfortable double checking them to make sure that everything, I’m learning is correct and won’t harm my growth. Other than those drawbacks, I understood and enjoyed this pattern. It’s repetitive nature of the learning process for students is easy to grasp which makes that much easier to apply.

From the blog CS@Worcester – Student To Scholar by kumarcomputerscience and used with permission of the author. All other rights reserved by the author.

Apprenticeship Patterns: Learn How You Fail

Similar to last week, I continued to read through Chapter 5: Perpetual Learning. This time, the pattern I am writing about is Learn How You Fail, and I’m finding it extremely relevant to my independent study at the moment. The pattern itself discusses that the path to success isn’t just all about learning and knowledge acquisition, but that it is equally important to pay attention to how your learning progresses and analyze why it stalls when it does — because it will stall. Sometimes we have behavioral patterns that negatively influence our ability to learn and perform. Once we become conscious of these behavioral patterns, we’re faced with a choice. You either accept that you will not change and attempt to collide with the issue forever, or you work to fix the problem. In the world of software development, this pattern may come up where there are gaps of knowledge in things that you have failed learning before. When you come across this, try sitting back and examining the trajectory you were on when you originally attempting to learn it and recognize what caused the interference. Try to reiterate on what mistakes you made originally, and intentionally spend time on those issues.

This pattern was particularly good for me to read at the moment because I’m attempting to tinker with the MINIX 3 operating system for my independent study and feel as though I’m struggling to make progress. I’m a fairly reflective person and I try to recognize any mistakes I’m making so I can work on them, but sometimes when something causes much stress and feels overwhelming it is very easy to get sucked in and forget the bigger picture. Taking time to step back, create a new plan of attack, and going at things from a different angle is key to overcoming obstacles. There is always an angle that will work, and it does just take finding it sometimes.

This, perhaps above any other patterns so far, may be the most important lesson to take from this book. It can be applied to every aspect of life and is absolutely critical for success in a field. Not only for success, but for staying in the right mindset (and for staying humble) in your advancement. Recognize that everyone, including yourself, has made and will make mistakes. It is precisely how you proceed forward from those mistakes that makes the difference in the long run.

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

Confront Your Ignorance

This method talks about how there are tools that we need to master but we may not always understand how to master them. A lot of the times we try to be a master of all, when in reality that doesn’t necessarily work all of the time. What I mean by this is that when we are faced with  a task, sometimes we think we understand each little aspect of the specifications. However, upon actually tackling that task, we aren’t really sure where to go. Like one of my previous entries on “Exposing Your Ignorance”, confronting your ignorance really focuses on selecting on skill, tool, or technique and really honing in to fill gaps in your knowledge about it. One of the points in this method that really caught my attention was it’s mention of humble, ignorant, and dependent team building. If you are working with a team of developers and each team member has this ideology that everything is “just because of the way it is”. this can lead to a multitude of problems.

One of these problems is bad team building. When you assemble a team of people for some sort of project, you want to be able to work together to share ideas. If a problem arises you all want to be able to come together and understand what the issue is so you can solve it as a team. If you all think that things are just the way they are because they are, this can often lead to disagreements among team members. Some team members might even think you are against them just because you disagree with them on something. It’s this idea of confronting your ignorance that is vitally important to understand. You should learn one thing at a time, that way when a problem arrives, you can put aside  what you know, and focus on what you don’t know. Failure in a public place can be embarrassing, but it is exactly these failures that make it better. If you failed at something, you wouldn’t want to be ridiculed for it. Instead, you should learn from it and always be willing to learn more and more about the issue.

From the blog CS@Worcester – Amir Adelinia's Computer Science Blog by aadelinia1 and used with permission of the author. All other rights reserved by the author.

“Sweep the Floor”

To continue with chapter four “Accurate Self-Assessment”, int his chapter we learn how to assessment ourselves. We learn our value in the team, how to work with each other. Everyone is beginner of craftsman at one point. We all at some point is a new apprentice on a project. This is where you’re unsure of your place on the team, and the team is unsure of you. This is not just when you are new software developer, its also apply to you are new to the group.

“Sweep the Floor”, a job not a lot of people want to do. Everyone in the group should contribute same amount of work, but that’s not always the case. Most people would want to be the best craftsman, but there are other important job that need to do. One way I discover while at school, to get group trust when you are newbie to the group is be active volunteer for work. We want to show our desire to work, it is the easy way for group get to know you. Also, a great way gets to know how the group operate/code design from bottom up. For example in the book, task as “maintaining the build system, production support, responding to maintenance requests, bug fixing, code review, eliminating technical debt, setting up the project wiki, updating documentation, acting as a sounding board for other people’s ideas, and so on.” This is do so for the group benefit. There are also a few negative consequences, your teammate also takes you wrongly as someone who doing job that no one else will do. You will not have opportunity to do changeling one. If we know our value, though our hard work we can earned their trust. With this mentality, we have the flexible to be in any environments. This also apply when there is other new addition to the group, you can understand them and show them the right way.

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