Scrum References

If you interested in learning more about Scrum:

1) I got this book on Audible and have listened to it at least 4 times now ( I like listening to it while driving to and from work). I highly recommend it as it is written by one of the Jeff Sutherland who co-created Scrum: http://www.amazon.com/Scrum-Doing-Twice-Work-Half-ebook/dp/B00JI54HCU/ref=sr_1_2?s=books&ie=UTF8&qid=1435408832&sr=1-2&keywords=twice+as+much+in+half+the+time

2) I like this website. It has some great videos to explain concepts and how Scrum meetings operate (ok, they are corny but they are still really good): http://scrummethodology.com/

3) Scrum Reference Card: http://scrumreferencecard.com/scrum-reference-card/

Scrum Diary: Entry 2 – Pushing through to get better

Sometimes things we do are harder than we expect. In fact almost every time we do something new, it ends up being more difficult than we expect, to get good at it.  There is often an initial period of ‘oh, this is easy’, ‘I can’t believe I thought this would be hard’, and then we are quickly off and running after minimal practice.  A great example that I can easily relate to is tennis, but for you it will most likely be something else.

At my first tennis clinic, I was spraying balls everywhere, and had no skill, but I enjoyed being out there, running around, and it felt great when I’d finally hit a ball cleanly. Eventually, within a couple weeks I improved dramatically. At this point I felt like tennis is really easy, and thought ‘Wow, I’m really good at this!‘  I soon joined my first USTA team, and that team made it to the NC state championships. We spent several days in Pinehurst, NC battling for the state championship eventually losing out.  I wasn’t depressed that we didn’t win the championship because I was so thrilled that we were ‘so good’ that we made it there, and our team had a great time.

The next year I got bumped up a level due to making it to the states. I was now playing against more skilled players. I played 3-6 times a week and got better, but one thing was very clear. Remembering back to those days when I first started and thought that I was ‘really good at this’, I was clearly wrong.  In fact, I don’t consider myself to be that good at tennis now even though I’m much better than I was back then.  I’ve been playing regularly for 8 years now, and have been through many cycles of feeling that I’ve improved, followed by periods of thinking that I’m awful at it. I still play on USTA teams, and I still take tennis clinics to try to get better.

What does all that have to do with Scrum?

We’ve been doing Scrum at work for the last few months (actually the team I’m on has been doing it longer than I’ve been here). Last month I became a CSM, and have been absorbing as much info as possible about Scrum in order to make the most of it.  After my scrum training I felt like I was on THE team in our office that knew Scrum, and excelled at it. Just like with my tennis, I thought ‘we are already really good at this‘, and this will be easy for us to keep up.  I’ve heard a lot of stories of teams, or companies trying Scrum, and after a few sprints deciding that it doesn’t work well for them, or it is difficult so they abandon it to return to their old methods (methods that weren’t working before they decided to adopt scrum. I emphasize this because I find it striking that people return to what they KNOW didn’t work well before because it seems more comfortable than pushing through a learning curve).

Perserverance.
Perserverance.

So this sprint has been a tough one. We very likely won’t hit our sprint commitment. Perhaps we over committed. Perhaps we didn’t get into a good flow. Probably a combination of those and some other factors. Also, our acting team ScrumMaster is leaving the company to pursue other opportunities, and at this point I’m not sure if we’ll be putting one of own into that role, or bringing in someone else to our team to fulfill that role.

In addition we are not truly following the Scrum framework, or I don’t feel like we are. In Scrum we should have:

  1. Daily Scrums (15 min team stand up meetings)
  2. Sprint Planning meeting at start of the sprint
  3. Sprint Review meeting at the end of the sprint, with demo of product.
  4. Sprint Retrospective meeting after the Sprint Review
  5. Backlog Planning meeting (optional/helpful meeting for Scrum)

We are having our Daily Scrums (1), and Backlog Planning (5), but our other meetings have been combined into a single meeting at the beginning of each sprint (Sprint Review/Retrospective/Planning meeting on the first day of sprint).  I suspect these meetings got combined because it is summer and we are having conflicts with vacation times. These meetings were scheduled for Fridays and Mondays due to our cycle times. These of course happen to be the days people are most likely out for scheduled time off.

I am hopeful that our team will take this opportunity to double down on Scrum and improve our processes. It would be easy to ‘pretend to do scrum’, by keeping daily stand ups and not improving on, or incorporating the rest of Scrum, or we could abandon it altogether like the companies mentioned above. However this is also a great opportunity for us to look at our situation and improve it (Inspect and Adapt). I feel like Scrum is a great framework for working together as coherent team, and we are doing a good job. Now it is time for us to reflect about where we are, where we want to be, and are we willing to do what it takes to be great.  I know that that the people I work with want to be great, and want to build a great product, so I’m hopeful we push through, and keep building our Scrum team skills.

Bootstrap nesting

Working with Bootstrap makes designing a nice website much easier, but there are some fundamentals that need to be understood. The most basic issue in Bootstrap is layout, and something I struggled with early on was to keep my data properly aligned as I got deeper and deeper into nesting containers, rows and columns.  This post looks at how to keep your data lined up properly.

Bootstrap provides us with the following classes to structure our layout.

  • container (or container-fluid)
  • row
  • col (col-xs-#, col-sm-#, col-md-#, col-lg-#)

Let’s establish some simple rules:

  1. Start with a container. This will be a div with a class of ‘container’ or ‘container-fluid’.
  2. Put rows inside the container (this will be div’s with the class set to ‘row’).
  3. Put cols inside your rows (this will be div’s with a the class set to ‘col-xs-#’, ‘col-sm-#’, ‘col-md-#’, or ‘col-lg-#’. (replace the # with a number between 1 and 12). I’m assuming you already know how the grid system works with 12 columns max. You can refer to the http://getbootstrap.com/getting-started/ for details on that.
  4. If you want to nest deeper, and you will, then it gets tricky so just follow these very simple rules.
  5. If you have a col that you want to break down further, then put rows into the col, then put cols into that those rows (repeat as necessary).
  6. Do NOT nest containers. You have a top-level container and that is it. After that you just want to repeat rows contain cols. Cols contain html, text and more rows.

Here is a sample page I put together that you can tinker with if you want to see what happens when you nest containers, rows, and cols. It is easy to see from this that sticking with the following pattern keeps things neatly aligned:

  • Container
    • row
      • col
        • row
          • col
            • row
              • col
                • … continue as needed

Bootstrap nesting

Let’s look closer

Bootstrap Nesting Zoom

Here is a zip file of all files needed to reproduce and tinker with this layout test.

Site1 bootstrap nesting

If you know an alternate way to keep your page properly aligned that is elegant to work with, please leave a comment. Thanks!

Edit: I just ran into this on SO which explains the how the .make-row class is used in bootstrap to automatically correct for indenting. Basically it confirms that rows are used to correct for padding of a container (whether it be an actual container or col)  by adding a negative margin. – http://stackoverflow.com/questions/22748673/fix-bootstrap-padding-on-nested-columns

PartialView into a Modal from a button click

In this example the first bit of code is on the main page. It consists of a button and PartialView. The partial view is actually a bootstrap modal window so you won’t see it at all when the page initially loads, but once the user clicks the button, it will open the modal window from the partial view:

@Html.Partial(“ModalPartial”, new ModalTaskManageViewModel() { ModalTaskId = 0, ModalTaskParentId = Model })

        <!– Button trigger modal –>

        @if (Model > 0)

        {

            <button class=”btn btn-link ” data-toggle=”modal” data-target=”#modalTaskModal”>

                Create Subtask

            </button>

        }

The partialView contains the following code. What you need to understand about this is that your form attributes set this as a AJAX form so it can post back data without doing a full postback of the window, and the insertionMode tells it to reload the data within the ‘Modal_TaskPartial’ tags. This way if the form submits but isn’t done because of something like invalid input, it can continue to stay on this modal form.

If a post back is successful, the C# code in the cotroller must call some javascript to make the modal disappear. I’ll show that further down the page.

@model ModalTaskManageViewModel

           @{

               var baseurl = Request.Url.Scheme + “://” + Request.Url.Authority;

           }

<!– Modal –>

<div class=”modal fade” id=”modalTaskModal” tabindex=”-1″ role=”dialog” aria-labelledby=”modalTaskModalLabel” aria-hidden=”true”>

    <div class=”modal-dialog”>

        <div class=”modal-content”>

            <div class=”modal-header”>

                <button type=”button” class=”close” data-dismiss=”modal”><span aria-hidden=”true”>&times;</span><span class=”sr-only”>Close</span></button>

                <h4 class=”modal-title” id=”modalTaskModalLabel”>Manage task</h4>

            </div>

            <div class=”modal-body”>

                <div id=”ModalTask_Partial”>

                    @using (Ajax.BeginForm(“ModalPartial”, “Task”,

        new AjaxOptions

        {

            HttpMethod = “Post”,

            InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace,

            UpdateTargetId = “ModalTask_Partial”

        }, new { area = “TaskMgmt”, @class = “form-horizontal”, @role = “form” }))

                    {

                        @Html.AntiForgeryToken()

                        @Html.ValidationSummary(false)

                        @Html.HiddenFor(model => model.ModalTaskId)

                       

                        <input class=“btn btn-primary btn-sm” type=“submit” value=“Save” />

                       

                     

                           

                            

                    }

                </div>

            </div>

            <div class=”modal-footer”>

                <button type=”button” class=”btn btn-default” data-dismiss=”modal”>Close</button>

                

            </div>

        </div>

    </div>

</div>

Now we need to see how to handle the form being submitted in your controller. Here is the meat of the function:

[HttpPost]

        [ValidateAntiForgeryToken]

        public ActionResult ModalPartial(ModalTaskManageViewModel vm, FormCollection fc)

        {

            PopulateFKLists();

            if (!ModelState.IsValid)

            {

                TempData[“ModalTask_ErrorMessage”] = “Error trying to save object.”;

                return PartialView(vm);

            }

            else

            {

                try

                {

                   “removed code here for readability…”

                  

                    if (entity.Id > 0)

                    {

                        //TempData[“Message”] = “Changes saved.”;

                        return JavaScript(“location.reload(true)”);

                    }

                    else

                    {

                        //TempData[“Message”] = “Item created successfully.”;

                        return JavaScript(“location.reload(true)”);

                    }

                }

                catch (Exception ex)

                {

                    //LogHelper.Log.Error(ex);

                    //TempData[“ModalTask_ErrorMessage”] = “Error trying to save object.”;

                 

                    return PartialView(vm);

                }

            }

        }

Notice that if everything is great and it is done, it uses a javascript function to reload the page, which will make the modal go away as it redisplays the page it was called from.  Otherwise it returns the PartialView to be reviewed or fixed.

Simple Partial Views in MVC

Including a partial view when the page loads is as simple as including @Html.Action in your page. Here I include 2 subviews in the page…

 <div class="tab-pane active" id="notes">
 <div class="panel panel-primary">
   <div class="panel-heading"><span class="panel-title">Notes</span> </div>
     <div class="panel-body">
       <div id="AddNotePartial">
         @Html.Action("TaskNotesPartial2", "Note", new { area = "TaskMgmt", id = Model })
       </div>
     </div>
   </div>
</div>
<div class="tab-pane" id="subtasks">
 <div class="panel panel-primary">
   <div class="panel-heading"><span class="panel-title">Subtasks</span> </div>
     <div class="panel-body">
        @Html.Action("SubTasksPartial", "Task", new { area = "TaskMgmt", id = Model })
     </div>
   </div>
</div>

Scrum Diary: Entry #1

Three weeks ago, my employer sent a large group of us from our IT department to a ScrumMaster certification course, for 2 days of immersive training. The next weekend I took my ScrumMaster certification exam to become Certified ScrumMaster (CSM). Although our team was already using Scrum, we are making some minor adjustments in order to get more benefits from it. Our team seems happy to work together experiment a little so we can find the best ways to make this work for us.

Rugby scrum
Rugby scrum

I’ve been developing software professionally for almost 15 years now, and most of that time I’ve worked very independently on my projects, or my parts of larger projects. This is the most collaborative work I’ve ever done, and working this closely with other developers is refreshing and energizing. Previously I worked in the quietest place I could find and purposefully avoided being around others when coding, so I could concentrate. Now I work in an open area surrounded by my Scrum Team and we are openly talking throughout the day as we work. Conversations I would have previously considered distractions, I now see as insightful bits of information that help me to better understand the larger picture of the project we work on together.

I have to say that I’m loving the way Scrum works, and have been soaking up information from other sources including ‘The Art of Doing Twice the Work in Half the Time’, by Jeff Sutherland (one of the developers of Scrum), and ’30 Days to better Agile’ by Angela Druckman.

The benefits I’m seeing right away:
1) When one person on the team gets stuck, others join in to push past the sticking point.
2) A sense that we are in this together.
3) I feel obligated to get things done for my team.
4) I know my team members feel an obligation support each other in order to accomplish our team goals.

I think we still have a lot to improve on and look forward to the opportunities ahead.