Category Archives: CS-448

Apprenticeship Pattern – Breakable Toys

The pattern “Breakable Toys” can be found here: https://www.safaribooksonline.com/library/view/apprenticeship-patterns/9780596806842/ch05s03.html

This pattern is a little longer than some of the other patterns I have looked over. Long story short, Breakable Toys is a pattern designed to help you learn. Kind of like Be the Worst but is more focused on you as an individual. The problem is that you are working in a company that can’t afford errors to destroy their data/program/whatever (who can afford that?).  However, the other half of the problem is that you are just learning this stuff and need a safe space to practice. You should create your own safe space project that relates to the problem you need to solve in the company, just at a smaller scale. This pattern tells you you need to build these breakable toys from the ground up to learn the insides and outs. Once you have these breakable toys, they are yours forever to use with other jobs and problems.

I thought this pattern was very useful. I was always told that if I want to learn, I have to do. That’s what this pattern is saying. You have to take the initiative and build these projects in order to learn. The best part is, failing only harms your breakable toy, which you built specifically to be broken!

The first line says “If experience is built upon failure as much as success, then you need a more or less private space where you can seek out failure.” (Oshineye, Hoover) I love this first line because it tells you that failure really is okay. That is how you learn. Being successful on the first try only teaches you what works for this situation but not for others. If you fail, you can learn a whole bunch about what doesn’t work and what does work. I don’t think you should intentionally fail, but failing will help you improve your skills and knowledge (so don’t feel too bad). The most important part about failing is getting back up and trying another approach. I could definitely see myself using this in my intended profession. I get worried all the time about breaking things that are important and this pattern gives you a way around that.

From the blog CS@Worcester – Rookey Mistake by Shane Rookey and used with permission of the author. All other rights reserved by the author.

Sprint Retrospective Blog 3

This sprint was particularly rough. Every time we were planned to meet, we had a snow day. Communication was lacking at this time because some people lost power and we definitely couldn’t go drive. Not meeting up with the team left me unmotivated because I had questions and errors that I would of benefited from asking the team questions in person. My team is working really well together. We are all included in a group chat where we remind each other of standups, CATMEs, and tasks we need to get done. We communicate often over texting. I learned that communication is key, especially in person. The reason why in-person meetings are important is because it raises the morale of the team and reassures the team that we are making progress. Now that I know this, in person meetings are much more valuable to me.

I will be honest and say I feel a little bit behind after this retrospective. I am not picking up this new framework as quickly as the rest of my team, but I am trying to get to the point they are at in their knowledge. What is great is that my team will share anything with the group that they think is useful. Caleb was able to get a working implementation of PouchDB into the Ampath App which is an excellent start to our task. Once we were all together we tried to store some data and it worked! It wasn’t exactly what we were looking for, yet, but we are just trying to understand how the PouchDB database works. I think our team has been taking the right steps to getting this project done, I am just frustrated that it is only my computer that the errors can’t be resolved. I could of definitely put more time into getting this to compile and I am working on doing that now. I will be proceeding differently by being proactive and on top of tasks. I don’tlike feeling behind, so I am going to correct that from now on.

The reason I feel behind is because of the struggles I am going through to get the dependencies to install correctly. I have tried every method that team members suggest but to no avail. I have tried installing pouchDB first, then all of the other dependencies our project needs. That made the webpack fail to compile. Next I installed all of the original dependencies, ran npm install, then tried to install the pouchDB dependency into the project and the webpack failed to compile again. I have tried almost every combination of these installs and they all made the webpack fail to compile. I became sick of the errors. I cloned Caleb’s directory into a new folder and copied all of his files into my existing project. I then reinstalled all the dependencies into the project and ran it, it worked perfect (without pouchDB), as soon as I installed pouchDB I got a slew of errors. It’s like the pouchDB dependency is removing some of the packages that  I still need and I am working on how to prevent that.

From the blog CS@Worcester – Rookey Mistake by Shane Rookey and used with permission of the author. All other rights reserved by the author.

Sprint 3 Retrospective

This sprint, I learned about pouchdb, some about crypto-pouch, about the way that JavaScript handles asynchronous behavior, and how to create typescript classes to wrap objects that return from function calls.  My group worked well to distribute and plan our work for this sprint, but we were interrupted by multiple snow days and found that we work better when we’re all present to bounce ideas off of each other.

At the beginning of this sprint, we found five different encryption services that we could potentially use for the AMPATH app.  We decided to build a spike solution for each one, and each took one of them to work on.  I ended up with crypto-db, which is a small encryption extension for the pouchdb database system that other teams are using for offline data storage.  My plan was to follow the simple setup instructions at the pouchdb site to build a local database with one or two items, display the result of a database access without encryption, display the result of a database access with encryption but without the appropriate key, and display the result of a database access with encryption and with the appropriate key.  I also wanted to find one or two different ways to derive salt to use for additional security.

Unfortunately, it didn’t end up quite that simple.

The first step was setting up an Angular CLI project – it turns out Angular CLI updated recently to remove the ng init command, which made it harder to follow guides for project setup.  I also needed to install the dependencies and types for pouchdb, which was a little tricky — they needed to be installed after a general npm install, otherwise they were overwritten.  Once that hurdle was dealt with, I needed to learn how to actually use pouchdb.  Fortunately, there are instructions (linked above).  However, in order to understand them I needed to dig into what a Promise entails in JavaScript.

A Promise is, as I understand it, an object that allows asynchronous functions to exist.  JavaScript won’t run multithreaded, so in order to keep the scripts running properly a function must return something so that the script can continue, even if that return is delayed by a database access.  When the database access actually does come back, the Promise is able to execute a function of some kind (for example, set some object fields to values pulled from the database).

Once I had figured that out, I ended up stuck at another problem: the data that was returning from the database access could print to the console, but would only print [object Promise] when I tried to convert it to a string and display it.  On Monday, Dr. Wurst showed me how to wrap the return (which, for pouchdb, is a JSON) in a class that has the appropriate fields so that I can copy it to a local instance of that class and then access its fields from my html file.  I did not have time to implement this or get farther with my plan this sprint.

My group also had trouble of various kinds working through our spike solutions, so we decided in our retrospective and planning for the next sprint to push our current set of tasks forward.  Hopefully we will actually be able to meet during our designated work times; if not I think we will need to find a way to meet (or schedule digital meetups) so that we can accomplish our goals.

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

Apprenticeship Patterns – Sustainable Motivations

I think most people would say a career in software development is a pretty damn good choice to make. The field is growing at a rapid pace and jobs within the field typically come with high paying salaries and flexible hours. Because of this, it can be easy to find yourself complacent in your current position and lacking the motivation to continue to learn new topics. You may find yourself thinking “I’m making a six-figure salary and I am very comfortable with my current position. Why would I go out of my way to learn new material?” The pattern Sustainable Motivations in Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman[AP] by Dave Hoover and Adewale Oshineye discusses some ideas on how to prevent/get yourself out of this trap. It also discusses how to avoid some other situations that could potentially prevent you from mastering the craft.

The key to becoming a master software developer is to keep yourself motivated [AP]. As I mentioned earlier, sometimes this motivation can dwindle [AP]. The pattern suggests to keep a list of things that you are motivated by to help remind yourself of what is truly important to you [AP]. I think that this is a great idea. It allows you to keep reality in check. Everyone needs that once in a while. If being considered an expert in your field is on that list, then you should do all in your power to prevent yourself from becoming complacent. If it isn’t and you truly feel that your motivations have changed being an expert is no longer a priority than that is ok. Just don’t give yourself that false intention of wanting to be an expert when in the back of your mind you know your motives are in a different place.

The other thing to keep in mind if you find yourself questioning your motivations and/or if you still want to be in the software field is to simply give it some time [AP]. There are going to be bad weeks at work. There are going to be weeks where you are working nights and weekends to meet a deadline that you knew from the beginning wasn’t realistic. There are going to be weeks where you question management’s decisions. I can go on, but you get the point. Not every week at work is going to be all hunky dory. Be mindful not to make a life changing knee-jerk decision that you may regret. Give it some time and your motivation will probably return.

 

Link to pattern in book: https://www.safaribooksonline.com/library/view/apprenticeship-patterns/9780596806842/ch03s03.html

 

From the blog CS@Worcester – README by Matthew Foley and used with permission of the author. All other rights reserved by the author.

Sprint 3 Retrospective

Now that we are at the end of Sprint three and about to start Sprint 4 we are really starting to get into the thick of things. I am looking forward to really starting to dig in and try to implement what we have been working on the past sprint.

Sprint three went smoothly for the most part. Everyone has been really good about the standups and I think people are getting a feel for how much information they need to provide. The statuses are brief and informative. I feel we are also starting to get more done in the class time we have together. We are continuing down the right path. Having the snow days on Thursday and Tuesday set us back a little as I feel it is critical to have that face to face communication. The standups do a good job at keeping each other up to date on what each team member is working on; it is just no substitution for face to face communication and collaboration. However, that is not to say we weren’t able to accomplish what we wanted to get done this sprint…

The biggest goal of this sprint was to understand how APATH currently implements the logon process. This was my primary focus this sprint because we believe we should be able to leverage a lot of what they already have in their code to help implement the logon process. At this point I feel I have a better understanding of how their logon process works, but I don’t feel I have a full understanding of it yet. There code is relatively organized, but it is quite overwhelming. The biggest challenge is understanding how each service and module interacts with one another. Unfortunately, the code is lacking comments, further adding to the challenge of trying to understand what is happening. It would be nice if they had some sort of high level design architecture type diagram/documentation. I think it would go a long way in painting a picture of how everything intertwines.

Although I still don’t have a very clear understanding of how all of the code works, I feel myself and the team has a good enough understanding to make an attempt at implementing the offline login process. We were able to put together a high level diagram using Balsamiq on how we want to go about implementing this design. I think the diagram helped in painting a better picture of what we want to do.  We also collaborated with the ‘Field Idiots’ to get and understanding on how they are going to implement the offline database. We are going to need to leverage their work to store the  user credentials, so it is important that we stay on the same page. I am a bit concerned that we may have a dependency on their database being up and running. I am not sure if there is any way to “mock” that. We also briefly talked with ‘Everyone Else’ a regarding the encryption process. All of these teams need to mesh together so we can ensure all of our work will work with one another’s.

Lastly, we also took some time to look into the bridge pattern, as it seems we are heading down the road of that type of design. There is a ton of documentation of this online so it was pretty easy to find the information we needed.

 

 

 

 

 

From the blog CS@Worcester – README by Matthew Foley and used with permission of the author. All other rights reserved by the author.

CS@Worcester – Fun in Function 2018-03-14 19:50:39

I wasn’t sure if “Share What You Learn” would be applicable at my current level of experience for exactly the reason the writers give for why apprentices might have doubts about the pattern: I assumed this sort of thing should be left to people who know exactly what they’re doing. They brought up points I hadn’t considered in response to this. An apprentice’s minimal knowledge will make their explanations short and to the point, and they won’t make the mistake of assuming the people they’re sharing with have prior knowledge that they don’t. This makes their explanations, in some ways, more useful to other apprentices than an explanation from a journeyman or master.

The benefit to the apprentice sharing what they’ve learned is something I acknowledged in my blog on “Record What You Learn”: the best way you can learn something yourself is to teach it to someone else. The writers mention this benefit, but they also warn of several ways that applying this pattern can end up doing more harm than good which I hadn’t considered. Sharing your knowledge might get you into legal trouble if what you’re sharing is a trade secret, or sharing particular information may actually be harmful to others. You should be careful about what you choose to teach others, and if no one else seems to have explained it, you should consider why. Other concerns include that people might feel as though you’re bragging or explaining concepts in condescending ways if you’re not sharing with humility, or they might assume you have an ulterior motive. Conversely, the writers assert that it’s selfish to seek ways to better your own learning and not consider how others could benefit if you were to share what you know.

They suggest developing a habit of applying this pattern early on, but I still don’t feel like I’m ready to offer anything substantial. If in the near future I learn something I identify as significant enough to record it, I will remember to apply this pattern as well and write an introduction to the topic that others might find useful.

From the blog CS@Worcester – Fun in Function by funinfunction and used with permission of the author. All other rights reserved by the author.

Post #23 – Ampath Application Development – Sprint 3 Retrospective

Our team is currently tasked with creating an offline password-encryption service for the Ampath application.  After consulting with the people at Ampath, we made the decision to devote this sprint to creating test-applications that utilize the 3 encryption-libaries we discussed with them.  Unfortunately, our meetings were interrupted again this sprint; 2 of our 4 meetings were cancelled due to snow.  The days that we did meet, we spent a majority of our time coding and discussing our progress.

I was tasked with creating a test-application that utilizes the encryption libary bcryptjs .  Bcryptjs uses salt and an adaptive function to improve security and its implementation purely in JavaScript provides resistance to brute-force attacks.  I was the team member who suggested bcryptjs, when we compiled options to discuss with the Ampath people, so it felt natural for me to be the one writing the test application.

I did run into some trouble, though –  all of the resources and APIs for bcryptjs are tailored to JavaScript, rather than TypeScript.  This has been quite an impediment for me as I am not proficient in JavaScript, so I have had to learn a bit of JavaScript at the same time as I develop this test-application.  We are using WebCharm to work on development for the application, and WebCharm has a tool to compile TypeScript to JavaScript, and I have been looking into whether it is possible to compile JavaSvcript to TypeSript.  As I mentioned earlier, 2 of our 4 meetings were cancelled due to snow and I was without power for 3 days of the sprint, so I was not able to troubeshoot and push through this problem in time.  The issue of being unfamiliar with JavaScript, as well as installation and compilation errors, has also been afflicting my teammates – nobody was able to produce a working test-application by the end of the sprint.  Spring break is coming up and, while we are not required to work toward sprint goals during break, I intend to try and get myself up to speed with Angular, JavaScript, and bcryptjs so that, upon our return to school, I will be ready to make a meaningful contribution toward meeting this goal for the Ampath organization.

It definitely felt like all the teams had much more direction during this sprint.  We have begun implementation and feel more familiar with the application itself.  Our team has been using our in-class meetings more efficiently and I think we all have more of an idea of each other’s working-pace.  I feel a bit worried about the fact that my teammates and I feel unsure of ourselves within JavaScript, because I think it will be hard for us to have to learn JavaScript at the same time as we work on the Ampath application.  I’m hoping that Spring break will allow us to gather ourselves and come back more productive than ever.  I have still enjoyed working on the application, so far, and I hope that we can make some sort of meaningful contribution(s).

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

Thoughts on “Learn How You Fail”

The “Learn How You Fail” blog pattern is about finding the ways in which you tend to fail or make mistakes.  The solution does not claim to save a programmer from ever failing (that’s not possible), but is instead about learning what tends to lead you to failure.  It’s part of drawing accurate boundaries around yourself as a learner: figuring out where you can grow and improve, what tends to throw you off track, and what may not be worth the effort of improvement.  The authors have a very concrete action step to help: using only a text editor, write an implementation of a simple algorithm, write all of the tests, refine the algorithm until you’re sure it will compile and pass the tests, then actually try to compile and test it to see where you failed.

Learning my weak points, where I tend to make mistakes, is a big part of my life as a gamer.  I try to improve my performance (whether that’s technical gameplay, strategy, tactical decision-making, etc.) with every game.  A very important aspect of that is determining what kinds of mistakes I tend to make.  Where do I overthink?  Where do I underthink?  What can I take away from losses, and when is it worthwhile to acknowledge but let go of a weakness (at least for a while) to focus on something else?

This apprenticeship pattern also resonates with me for a different reason.  I struggled through much of middle and high school with a mild nonverbal learning disability.  It took years of practice and tutoring for me to really be able to work through it.  An important part of that (or, I think, any therapeutic process) was finding points of failure.  I struggled to express myself in writing, especially meeting word counts for papers.  I had (and still have) difficulty breaking focus or task-switching.  Recognizing these things was the first step to improving them.

I think that learning how you fail is not just a skill that’s important for software apprenticeship and craft.  It’s an important life skill; at least, it has been for me.

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

Software Capstone Sprint #3 Retrospective

During the third sprint of my software development capstone, my team and I were assigned the task to figure how an offline data capture service worked and how it would work with AMPATH’s patient database. The reason for creating the offline data capture service is to enable the retrieval of patient data while in an offline status. This is important because villages in Africa may not have internet connection, but AMPATH still wants to add additional information to their patient database.

One thing that I’ve learned from this week’s activities was how to an offline data capture service worked. To figure that out, my team and I also created other small tasks that aid in figuring out the offline data capture service. Another thing that I’ve learned how to do as an individual was creating tasks from scratch. In addition to our product owner assigning tasks to each group, my team and I discussed on how to approach towards the goal of establishing an offline data capture service.  This lead to the tasks that we created for us as a team to do. Throughout the entire process, I wouldn’t have done it any differently because everyone in the team, including myself, was productive in the way that we did things. This experience can be applied in real life situations, especially software development jobs. Since I want to be in the video game development industry, I’m going to have to learn how to approach the goals and objectives by creating my own small tasks that will lead up to completing the overall goal of a project.

What we did during the week was that we tried to create a balsamiq diagram which displays our idea on how an offline data capture operates. We also researched offline data capture services in Angular, and found more tutorials on them. We also checked out pouchdb and how it would be implemented in our offline data capture service and researched encryption to come up with ideas on how our offline data capture service would work cohesively with an encryption service that another team in our class was doing during this sprint. We succeeded in utilizing balsamiq to create our diagram of the offline data capture service, learned pouchdb, understood how an encryption service works, and successfully came up with ideas about how to interpret the offline data capture service by reading online articles and other resources.

The work quality for this sprint was adequate for all of us to do. From the past sprints up until this sprint, everyone contributed fairly if not more for some of us. I’d have to give a lot of credit to my teammates Rick, Jay, and Jerry as they helped me as well as the entire team on making sure everyone was on the same page. Jerry reminded the group about the standups. His contribution to the group has improved from the last sprint and I felt he communicated more in our meetings in class and on slack. Jay and Rick did an exceptional job of finding some resources about the offline data capture service and they both did well creating the diagram as well. What I did throughout this sprint was a lot of information retrieval which I shared as much as I could with my group about pouchdb, the encryption service, and about the offline data capture service. All of efforts played a huge role in getting us to where we are at with the offline data capture service right now as we are putting the pieces together with our diagram and our ongoing research.

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

Looking Back on Sprint 3

During the third sprint, we began digging into the code of the ng2-amrs application and really started to attempt to gain an understanding of the existing implementation. There were quite a few hurdles throughout this sprint, including the cancellation of both the second in-class work day and the in-class review and retrospective day. This made communicating ideas between team members significantly more difficult, and I think this has also impacted our performance for this sprint. I still believe that we are working well as a team, and doing the best that we can given the circumstances. Standup participation was 100% for this sprint, which (I believe) is a first for the team.

For sprint planning this time around, we chose the “Offline Login Service” story from the product backlog, as this most closely aligned with what we had begun researching during the second sprint. We broke this story up into tasks, some of which were assigned to everyone on the team, and some of which were assigned to individual members.

One of these tasks, assigned to Dominique, was the “Collaborate with ‘Field Idiots’ to determine how to decrypt and encrypt user data/passwords” task. I am interested in learning more about what Dominique discovered about the encryption implementation that the Field Idiots team will be using, but am unsure if she was able to do much collaboration because of the cancellations.

The “Collaborate with ‘Everyone Else’ about API for retrieving offline data/user information” task was assigned to Luigi and Matt. Once again, I am unsure whether or not they were able to achieve much collaboration due to the cancellations. This collaboration is critical to our progress moving forward, as we must be aware of the requests that we should be sending to the local storage databases in order to implement an offline login.

The “Investigate session management” task was assigned to myself. The main discovery that I made while investigating how the ng2-amrs application handles sessions is that we may not need to change much about the session itself. If the existing code for session management can be modified for usage offline, this would be a far more effective solution than rewriting an entire session manager ourselves.

The remaining tasks were assigned to all of the team members, and were more for big-picture existing implementation understanding and design strategy. The first task was to “Investigate current logon process,” something that we started as a group on the first in-class work day. While we made some progress, I was hoping to use the second in-class work day to share what I had discovered independently and also hear what others had discovered.

The design-strategy task that we created based on the advice of Dr. Wurst was to “Look into ‘Bridge’ design pattern”. I remember looking at the pattern briefly last semester, but needed to refresh myself. I found some online resources that seemed to give a good overview of the pattern and shared them with the rest of the team in our Slack channel.

The final task shared by all team members was the “Create overall architecture/design of offline login feature using Balsamiq.” This task was started during our first in-class work day by Matthew. The design that he created gives a good high-level picture of what our service should accomplish. While I was hoping to discuss possible additions to our design with the rest of the team, this was impacted by the cancellation of class last Thursday.

While there were certainly some hurdles to overcome during the third sprint, I think that we did a good job of making the best of the situation. We communicated more through Slack during this sprint than in previous sprints, and the quality of information that was shared during the standups has improved significantly. Overall, I am happy with our progress and looking forward to getting more in-person collaboration time in the near future.

 

From the blog CS@Worcester – ~/GeorgeMatthew/etc by gmatthew and used with permission of the author. All other rights reserved by the author.