Monthly Archives: February 2017

Clean Coder Chap 5+6, Week 3

Test-Driven Development: There are rules that the author provides about test-driven development such as you are not allowed to write any production code until you have first written a failing unit test. You are not allowed to write more of a unit test than is enough to fail and the contrary, you are not allowed to write more production code than is enough to pass the currently failing unit test. Working in small key increments making sure the units operate properly will reduce any problems. From my experience, I have noticed trying to write the entire program THEN go back to search for these errors can be troublesome–and not fun.  This incremental testing will reduce defects by 2-10x, increases comfortability of the coder with their code, and more importantly provides certainty that the change will not break anything.

Practicing: Practicing is key is any element in life. Practice what you preach. Code Kata is an exercise in programming that helps a programmer hone their skills through practice and repetition (in relation to the concept of kata in the martial arts). Wasa is a two-person version of the kata where it is done in pair-programming style. Moral of the story, there are several ways to practice, and every coder needs to practice. From being in the field for a few years now, and reading blogs it is very clear how fast this field evolves. You can’t possibly stay up-to-date without studying outside of work. All professionals practice.

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

The Clean Coder, Chapter 5 & 6 (Week 3)

Chapter 5 of the Clean Coder book is about Test Driven Development. There are three laws of TDD:

1) You are not allowed to write any production code until you have written a failing test.
2) You are not allowed to write more of a unit test than is sufficient to fail.
3) You are not allowed to write more production code than is sufficient to pass the test.

There following are the benefits of TDD:
1) Certainty – Since there are a suit of tests for the code, any time you make a change you can run the suit of test to check if your change broke anything. If all the tests pass you can be sure that no new bugs were introduced by your change.

2) Defect Injection Rate – There are documented cases of defect reduction from teams that use TDD.

3) Documentation – The tests serve as a living documentation of the code and what the software is supposed to do.

4) Design – TDD forces you to write code that is decoupled.

Chapter 6 is about practice and its importance. The author recommends professional programmers practice with katas, which a simple program that you do over and over again until perfect mastery. I plan to choose a Kata and master it in my free time.

I liked the last two sentences in the chapter: Practicing is what you do when you aren’t getting paid. You do it so that you will be paid, and paid well.

From the blog CS448 – The blog about software by Sudarshan and used with permission of the author. All other rights reserved by the author.

Up and Running with Public Data Sets

NOTES FROM Up and Running with Public Datasets Curt Frye 1. U.S. Census Bureau and Securities and Exchange Commission American FactFinder link: factfinder.census.gov Most US residents know the United States Census Bureau as the government organization that counts the American … Continue reading

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

Week 2 Reflection

Like the first week, This week was mostly about setting up and trying things with Angular 2.

First we all made a Trello account. This was quite easy as there was a one step sign up.

Next we all needed to make an OpenMRS id and introduce ourselves on the official form. This was also quite easy. One of the team members (Danny) did happen to get banned from the board very fast. This was probably due to a random occurrence.

  • Check out my awesome post if you want!

Then we set up Trello integration into Slack. This was just a simple command.

  • /trello

Then we installed the WebStorm IDE by Jet Brains. Lucky enough students get a year of some Jet Brain software for free. So that was quite helpful.

  • If you are a student looking for professional development software, but want it free click here.

The last of the tasks was to complete the Angular Tour of Heroes. This was the hardest part of the week. It was a quite fluid tutorial, but I got stuck a few times. I had a difficult time with knowing where to put some code portions and some of the spelling mistakes took far too long to figure out. I greatly appreciate the tutorial the Angular team has produced because it gave a great overview of some great things Angular can do. I went through the tutorial a few times to try and get everything down. I don’t know if I completely understand everything. It is always process to learn a new language and I am defiantly on the right path.

  • If you want to try the tutorial here is a link to it!

From the blog CS@Worcester – Conundrums In Computing by patrickgrahamblog and used with permission of the author. All other rights reserved by the author.

Clean Coder, Chapters 3 & 4

Short summary Chapter 3:

In the third chapter the author discusses what “yes” means and the different types of yes. He states that there are three different ways to accept or respond to an inquiry. The first is equivalent to a sure. Not really confident that this request or situation will be accomplished. The next form of yes is similar to I will try, where you really want to get it done and you will try to get it done but you know it probably won’t happen. The last form of yes is a very confident yes,  this is knowing with almost a 100% chance this task will get done. The author suggests that we all should change the way we accept commitments to only use language to suggest the 3rd situation. If it is not a 3rd situation then you should change some of the factors to be certain that it is accomplished on time, and to the fullest extent of your ability.

Comments:

I tend to agree with the author on his points in this chapter. I have found myself on more than one occasion saying to myself “I will try to get this done”or “maybe I will get this done” when deep down I know I will probably put it off. This point he say about making yes possible is defiantly a good mindset to get into going into the business world where everyone has a job to do.

Short summary Chapter 4:

In the fourth chapter the author talks about a variety of situations that you will face while coding. First is to be prepared and fully understand how long a project will take you. This helps cut down on late night coding. Another situation he details is when being distracted by some event in your life. He states that you should break for a little bit to try and remedy the situation stressing you. The author details about the Flow Zone, which is a super focused state of mind.

Comments:

In the fourth chapter the author talks about a handful of topics, But a few stood out to me. The first that really stood out is the concept of the flow zone. I for one did not think that this zone was an actual thing until I read about it and thought back to all of the times I have coded. The author says that the flow zone is not the place to be during coding. Also that the flow zone uses a different part of your brain. He states it is like a zombie state where you are not problem solving to your best potential. I disagree to a point. I understand his thought process, that coding under this focused state might give less efficient outcomes. But I feel as though every time I sit down to do work I do not get anything done unless I am in this flow zone.

From the blog CS@Worcester – Conundrums In Computing by patrickgrahamblog and used with permission of the author. All other rights reserved by the author.

Week 2: 24 January – 30 January 2017

Throughout this week we had much to learn and only a couple cards in our Trello board.

  • Create an OpenMRS ID
    • Easy
  • Post introduction in Welcome thread
  • Install WebStorm IDE and Atom
    • Easy, atom for now I like the experience better. Much more customized
  • Angular Tour of Heroes Tutorial

All but the Angular tour of Heroes was easy, the angular tutorial really was weird to me and retried twice and got it to work fine. It must have been a small syntax error. Taylor has been managing well keeping us in tip top shape!

From the blog CS443 – Triforce Code| Exploring and Learning by CS443 – Triforce Code| Exploring and Learning and used with permission of the author. All other rights reserved by the author.

The Clean Coder Chapter 3 & 4

Saying Yes:

Even though it might be important for you to know when to say “no,” it is just as, if not more important to say “yes.” You will need to learn the language of commitment. The three parts to making a commitment are to “say that you’ll do it,” “mean it,” and “actually doing it.” This chapter helped me learn that using this language of commitment, you can figure out what someone is saying by noticing the words they use. It is rare when people say something, that they actually mean it. and will get it done. Some other people will mean the things that they say, but will still never get them done. And last but not least, there are those people that will commit to big promises and will never even mean to get them done. Specifically, if you want to know signs of non commitment, they can include, using the words “need/should,” “hope/wish,” and “lets.” Chances are that if these words are being used, that the person doesn’t feel that it is feasible to do these tasks or even if they just don’t mean it. Starting to use these language tricks instead of following your gut can help you tremendously in your professional career and help you understand if people really mean what they say or not. This helped me realize that subconsciously sometimes I will have a task at hand that I will want to have done by a certain time, but sometimes might not be able to, and that it might be because of non-commitment to myself, by either not believing that I will be able to finish certain parts or even have it straight undone. I need to understand and not overestimate how much overtime I can put into a certain project.

Coding:

We also learned about when to and when not to code. It talks about how it is either good or bad thing depending on the level of focus or concentration you have on the topic. Since coding can be a strenuous activity, it can require you to juggle a couple different factors together at once. These factors could include things like having your code actually work. Secondly, your code must solve the problem, given to you by the customer. Your code your fit well into the system that you already have, and most importantly, your code must be readable and understandable by others. Not concentrating o these factors can have you exposed to distractions that otherwise would not be present in your team of developers if you were organized. Even if you try to ignore these things and code your way anyway, the code you come up with will be wrong. It will be convoluted and filled with bugs and it wouldn’t really solve the customer’s problem so it will have to be redone. Much like being tired or distracted, or even having the time be really late like 3 am, do not code, it will not come out as well as you plan it to. Professionalism can be related to the amount of hours and dedication you put into it. It can be seen i your work. But also we are warned about coding in “the zone.” It will have you lose sight of your big picture and have you seeing tunnel vision. This chapter helped me realize, that no matter what, and no matter how good you are, your life will always involve throwing your curve balls and challenges as you code, you will just need to find fixes and ways around it to come up with good code but it can always be done and distractions can be put to the minimum.

From the blog CS@worcester – CS Blog by Gautam by csblogbyg and used with permission of the author. All other rights reserved by the author.

The Clean Coder Chapters 3&4

The importance of saying yes is something that many take for granted. This is the general theme of chapter 3. The reason Robert Martin of The Clean Coder, uses this chapter to talk about saying yes is to compliment and explain in a professional context the act of agreeing to take on work etc. I think much of this book is common sense on how to act, yet it was refreshing to have a rubric to see what your agreement means to the other person or organization you are working with. This could be even an agreement with yourself. When you agree to take on work its a test of character and really shows what your word is worth and I like this point of doing what you say.

Now Chapter 4 is another animal…it has many points brought up by many classes in the past. Everything from working too late/hard/too much, to what to when you are late on a project. These are great points to take to heart for my career and I hope I can reflect many of these perfectly throughout my career. I definitely find this chapter useful, I can tell that this author thinks TDD is the only way to clean code :D.

From the blog CS443 – Triforce Code| Exploring and Learning by CS443 – Triforce Code| Exploring and Learning and used with permission of the author. All other rights reserved by the author.

Week 2: Reflections

This past week most of my time was spent on setting up the environment for Angular 2 and starting to use it in small applications. I ran in to a small snag while setting up the environment, after installing nodejs and npm I was getting an issue running the server. This was resolved by installing the package nodejs-legacy. I also spent some time on various tutorials. As a group we did set up a number of tools that we will be using through the semester to organize the scrum team. We are using Slack for most of our communications including daily Scrum meetings as it is not possible to meet. We are using Trello to organize our sprints with a board for the project backlog, the sprint backlog, and the completed tasks. I was also looking in to some Trello power ups that would help with the burn down chart.

My first impressions of Angular 2 were pretty positive. I like the system that is use to run the development web server. It reminds me a lot of Python’s Django. The sever is also nice as it processes the files as you save them. This means you have more freedom when it comes to text editors and IDE’s.

From the blog CS@WSU – :(){ :|: & };: by rmurphy12blog and used with permission of the author. All other rights reserved by the author.

Yes; but sometimes, maybe. (Clean Coder Week 2: Ch 3 & 4

The previous chapters in the Clean Coder book talked about professionalism and saying no. This week, the book zooms in how “saying yes” and coding principles that might be useful to follow. Before going into the chapters, something I’ve realized that I hate but also love about this book is the fact that is partially opinionated. What I mean by that is, for example, in chapter 3 the author talks about the different situations and scenarios in which you would say yes and really mean it and other situations where you might not want to say yes because you know you might not be committed to it. In this case, its pretty much straight facts in the sense that the chapter only talks about saying yes and the commitment that comes with it. There’s not really anything that is up for debate. On the contrary, in chapter 4 the author talks about coding principles that he believes one should follow to become a better professional and to write good-clean code. However, in this chapter it is more opinionated because not everything he talks about is applicable to all programmers. There are some tips that he gives that may work for one programmer but may not work for other programmers.

Going back to my original thought; the reason why I hate and love this style of book is because even though it provides facts, there are also times where you as a reader have to determine for yourself if what he is saying is applicable to your style of programming so its not just another book that is just a computer science textbook, its somewhat like a conversation where sometimes you agree and sometimes you disagree.

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