Wednesday, April 13, 2016

Agile simulations - lego game

I teach an introductory class at University of Houston. This semester I did half technical and half soft skills (like Agile). 

Given that I have a 3 hour class, I had the ability to try out the Agile simulation using legos ( http://www.lego4scrum.com/ )

I had introduced agile to my class, but didn't go into any depth about Scrum or any of the other flavors. We basically had a conversation about if you were going to spend a lot of money on something that you were unsure about the final result (like a full sleeve tattoo), what steps would you go through to ensure that it matched your expectations. 

All of this saying, they were not familiar with actually implementing agile or scrum. 

I brought in a huge tub of my kids legos and set them in the middle of the class. I also brought 8 smaller storage containers that would allow the students to take scoops of legos back to their desks / work area. 

I introduced the project explaining that we were going to be building a lego city, my lego city, and that I recommend that they break into small groups of 3-5 people (class of 25, although about 50% decided to not show up), and rearrange the furniture as they saw fit to prepare to build the city. 

While they moved a couple of desks to sit on the floor, they generally used this time to come scoop up containers full of legos to take back to their spots. Meanwhile I covered the "land" with paper.  I informed them that this paper was were the city was to be built and that for certain things, like roads, it was okay to draw them on the paper rather than make them out of legos. 

Then I introduced the things that I wanted in my city. I had, in my head, organized them by potential teams, but I never mentioned that to the class.  I also intentionally didn't mention the acceptance criteria unless asked. 
  • Living: 
    • 4 x 1 story homes 
      • Must have a window 
    • 2 x 2 story homes 
      • Twice the size of a 1 story home 
    • Apartment 
      • 3 stories, outside stairs 
  • Recreation 
    • Park 
      • Trees 
      • Playground 
    • Stadium 
      • Open roof 
    • Zoo 
      • One animal and enclosure 
  • Business 
    • TV station 
      • Satellite dish or Broadcast tower 
    • Retail shops 
      • 4 doors, each shop a different color 
    • Hospital 
      • Has a red plus on it 
  • Education 
    • Elementary school 
      • Has a fence 
    • University 
      • Looking down on the top of the univeristy it should look like UH 
  • Worship 
    • Religious symbol on it 
  • Infrastructure 
    • Power station 
      • Wind turbine (ie propeller) 
    • Waste water treatment 
      • Visible Pipes 
    • City Hall 
      • Dome on top 
    • Transportation 
      • Mass transit 
        • 8” and 6+ wheels 
      • Dedicated bike lanes 
        • Barrier from cars 
      • Roads 
        • Drawn + 1 car 
      • Airport 
        • 1 plane + terminal

I wrote each item on sticky notes, and used Team estimation game to size the stories. (Think bubble sort). We were about 60% of the way through (when we got to the university), that they started to ask about what I was expecting for the university.

Since we had been sizing the stories as we went, we decided that we needed to start over. This time through we talked about the acceptance criteria before they determined left, right or same for the sizing.

Once all of the stories were grouped and positioned, I assigned Fibonacci numbers to them for the points. We had 1,2,3,5,8,13,21 and 50.

I then organized the stories into a priority order. (I wished I had taken a picture of the final priority order before doing sprint planning). Meanwhile I had told the class to figure out if they were going to represent themselves as the separate teams, or as the company as a whole and to determine what they think is a good number of points to take on for the first sprint, which was 8 minutes.

We had 4 minutes for sprint planning, where the class, having decided that they were one company (instead of 5 teams) choose the items from the backlog that they were going to deliver for the first sprint. (They completely ignored the priority order and choose what they wanted to work on, including the lowest priorty highest point story). Also somewhat independently, some of the students had already started building, while others where choosing the stories from the backlog.

We started our first 8 minute sprint with a 106 point commitment. When the bell rang, there was nothing on the "land", so they got zero points. They were pretty disappointed, because they didn't realize that their structures needed to be on the table by the end of the sprint.

We did a 4 minute retrospective, where again 5-8 students participated and another 4 minute planning, the others continued building. The planning was essentially moving over all of the unfinished stories, but they did add another 3 point story. Sprint 2 started with a 108 point commitment, but many of the structures were "done" and on the land within the first couple of minutes.

The different groups, not surprisingly didn't talk to each other, and using the single story house as a scale reference, the "3 story apartment" was about 1/3 the size of a 1 story house. The hospital was about 1/2 the size of the house. The stadium, (the lowest priority and highest points), was done and used up a significant amount of lego bricks (that they would want for the next round).

Sprint 2 ended with 96 points of the 108 awarded. The Sprint 2 retro was largely ignored as everyone just kept building. One person participated in sprint planning. They didn't move any of the unfinished stories over, but they did add 2 more stories. Ultimately they ended up committing to 6 points but completing 46.

Here is a photo of the finished city.
Front L to R: Water treatment, power station, place of worship, university, stadium, hospital, airport
Back L to R: zoo, elementary school, playground, 1 story house, tv station, 1 story house, 2 story house, apartment

From the debriefing after the last sprint, here is what the students said were issues, especially after talking about some of the things in red from above:
  • knowing the scale of the buildings
  • not knowing what the other groups were working on
  • Initially there was no talking, but it really improved towards the end when the groups started working together
  • Pain point: What does the client expect to see
  • Pain point: Client Priority
  • Pain point: Dimensions / scale
  • Pain point: 8 min sprints were stressful
  • Pain point: looking for resources / running out of resources
We talked about how they were overall more interested in building (playing with the legos) and less interested in understanding the clients needs. We talked about how they were also skipping the planning, which helps communicate expectations to the client, as well as the retro which would help them improve the internal processes.

We then talked about variations and improvements. Interestingly enough most of them expressed that even though there were improvements that could have happened in the delivery of the exercise, they valued the mistakes that they made as it were, and ultimately decided that I should not add any more explanation or details the next time around.

Overall, it was an incredibly useful exercise and discussion around teamwork and communication with the client.


Wednesday, January 14, 2015

Treadmill desk as a software developer - injury

So a couple of days after my last post, I did have a treadmill related injury.... sort of. It wasn't cringe-worthy youtube kind of injury. It wasn't even an injury that was ON the treadmill.

I was turning left to go into my closet and something BAD happened within my calf. It was crippling and I could barely put weight on that leg for two days. I used a lot of RICE (Rest, Ice, Compression, Elevation) and was able to start bearing weight again.

My theory is that being on the treadmill, is that given it is a very straight and even surface for such long durations (10+ miles) and low impact, that I have been over developing my "walk straight muscles". So when I went to turn a corner, my now weaker "turn muscles", were literally squeezed out of place by my others.... It is my theory anyways.

Some loose proof that I have that supports this, is that while I was recovering, I was acutely aware of variations in the ground, unevenness, and different textures.

So now that I'm recovered and nearly able to to 10 miles again, I'm spending more time on the treadmill walking sideways. I'm also stretching mulitple times a day, using foam rollers and hard massage balls, and making sure that I spend more time off the treadmill and outside on the un-even sidewalks.

Wednesday, December 17, 2014

Treadmill desk as a software developer - 3 month

So we've been going on three months now. I'm able to walk about 30K (~14 miles) steps at least twice a week without feeling too bad. I've killed my tennis shoes that I bought during the summer, so I guess one side effect is that I'll be going through shoes much faster now.

Things I've noticed:

  • There was an online conference, that I was watching while I was working. This was great, but given that I was already switching between 2 engaging contexts, I didn't notice that I was walking, and I over did it again (37K steps, 2 days in a row before I noticed what was happening - I guess that means I'm getting better endurance). 
  • On the day that my fitbit battery died, I wasn't motivated to walk until it was charged. Apparently I definitely want my steps to "count" 
  • Grading my class assignments is MUCH more enjoyable while walking. Previously I could barely get through 1 without needing a break, now I can do them all in one "sitting"
  • There is a nice pile of dust, crumbs, etc that ends up on the mat at the back of the treadmill. 
  • I hardly ever sit down anymore at work. Although I do still stop and stretch occasionally. As I try to hit 30+K once or twice a week. 
  • I keep a set of hand weights on my desk for meetings, where I don't have to participate or take notes. 
Overall I've lost 12 lbs (fluctuating wildly as we go through Thanksgiving and the holidays :))

Still nothing but good things to say about the treadmill desk.

Monday, December 8, 2014

What I learned about coding from 5th graders

So today I was mentoring / volunteering for Kolter's Hour of Code (www.code.org) and I got to observe 3 different 5th grade classes come through to try to program a visual game like Angry Birds or Lightbot.

Just for context, both of these games involved sequencing directional puzzle pieces to perform a task. For Angry birds, you would move the bird towards the pig, and for Lightbot, you'd move the robot along a grid lighting blue squares.

Not surprising nobody read the directions or prompts before diving right in. The part that I found interesting, was that very few would try to solve the problem in small steps.

Nearly every pair (they were pair programming.... woot!) whether they read the prompt or not, tried to solve the entire puzzle before hitting play. It of course wouldn't work. Then they'd throw nearly the whole thing away and create another complete solution, which also wouldn't work.

One of the things that I coached them on was to test often.... put down one or two commands and see where you are on the sequence. Basically to get faster feedback.

So I'm curious as to where in life do we learn that we have to solve the whole puzzle at once?


Tuesday, October 7, 2014

Treadmill desk as a software developer - 1 month

Last month I posted my first week experiences on my treadmill desk: http://squaredi.blogspot.com/2014/09/treadmill-desk-as-software-developer.html

Now I'll be moving into my one month review.

My metrics are:
Steps: 19.3K / day avg (darn weekends killing my average :) )
Distance: 11 miles /day avg
Max steps / distance: 31K / 14 miles

So far I've lost 5 lbs. I'm stretching every night. I'm still taking breaks as needed, but overall I'm taking standing breaks instead of sitting breaks. I have to have some foresight into the evening plans though. If there is a kids soccer game where I'll be helping run around, or a dance lesson that I'm teaching, I will need to stop walking early afternoon and sit so that my legs are capable of the evening activities.

I've noticed an increase in my endurance, where I've gotten 30K steps in a day  a couple of times now and not been sore. I was also able to run the length of our street. (Note, I'm not particularly fond of running, but I was late for pickup from school. I was happy that I made it the whole street length, which is longer than I've run in recent past).

Given that I'm farther from the ground in the office,  both with standing, and with the small step up onto the treadmill, that fans alone don't cut it. I've had to lower the A/C to help keep the room comfortable.

But the bottom line is that I'm loving it. I love being able to walk this much everyday and that it is not something "extra". I love that I can walk and work at the same time. I love that for a having a desk job, and working from home, that I'm lightly active to fairly active 6-8 hrs a day.


Tuesday, September 9, 2014

Treadmill desk as a software developer

Background:
I got a treadmill desk and will be writing my review from the perspective of a software developer who works from
home.

All metrics are tracked from fitbit, and just as a baseline, I average about 10K steps a day without the treadmill, but it has taken some dedicated effort.

Day 1(Thurs)
Based on the corner of the office that I put this in, I noticed that my overhead ceiling fan was less effective. I didn't break a sweat on the treadmill, I just needed to move some floor based fans to me. (FYI all of the computer equipment in my office gets warm, and instead of air conditioning the whole house, I use several fans in my office. )
I found myself looking forward to meetings, especially those that I wasn't an active participant, so I could up my speed to around 3 mph. If I'm an active participant I found that 2 was about right for me.
The treadmill is super quiet and my colleagues couldn't hear any background noise coming from my end of the call. Personally though, due to my own cognitive processing inability to separate noises, I found that I needed to move to loud speakers / headphones so I could hear better. But as I said, even though my hearing is fine, I know that I'm not able to separate sounds, so the treadmill, fans, and meeting was slightly indistinguishable for me.
I didn't get bored as much, so I found myself talking less breaks. I also noticed that when I did feel like taking a break, there was a "stop" action. Literally pressing pause on the treadmill, was a more commitment to the break, then my usual get up to go to the bathroom or grab a snack from the kitchen. 23K steps - a little more than double my average up to that point

Day 2 (Fri)
Okay, I was a little stiff today. Clearly I pushed myself too hard. Today my pace was more around 1.5 for the whole day. I found myself inverting my day. Previously my breaks were to get up and walk around. I'd go to the farthest bathroom in the house, or to walk around and pace while eating my lunch to get more steps in. Today I found myself not doing those things. I even took a couple of breaks just to go sit on the couch for a couple of minutes. Then around 2pm. I couldn't walk anymore. I moved the laptop back to my desk and sat for about an hour or so. That night I had to stretch.

Stretching isn't a bad thing, it means that I'm actually doing something with my muscles. 22K steps, which is still more than I was planning. I was hoping to only get to around 18K today.

Thankfully a weekend is coming up, so I can start fresh again on Monday.

Day 3 (Mon)
Spent all day at 1.5 MPH. Still needed a significant sitting break around 2 pm. I've been drinking alot more water, because I also realized that I wasn't drinking enough the other days. It is really easy to overdo it, especially if you hit flow for a couple of hours. One tricky bug and 4 hours later I've walked nearly 6 miles. Unfortunately I hit 30K steps today. That is my all time high. I stretched a lot, but still woke up sore.

Day 4
Today I'm going to sit through the morning, and then start walking for my noon meeting. I only walked on the treadmill for 2 hours today, but since it was mostly a non-participatory meeting, I still managed to eek out 20K. In addition to stretching I had to use my wife's foot massager.

Day 5
So here is my new plan: I'll start the day sitting, then probably just after lunch I'll start on the treadmill. I'll put in an hour or two, then move the laptop to the desk. I'll leave the laptop unplugged and when I run low on battery, finish out the rest of the day on the treadmill. That should get me around 20K steps.

Day 6:
Throwing in some tech geekery. Given that I'm walking for a couple of hours and sitting for a couple of hours; I've got two separate external monitors that I'm hooking up to. The one on the treadmill is 25" and the one at the desk is a measly 17". It was very annoying that whenever I switched, I lost the locations of my windows. Be on the lookout for another blogpost regarding Slate for managing my Mac windows state across multiple monitor configurations. I just started with it today, and it is awesome, but will need to dive in more to be able to write up the post.

Week 1: Metrics
19.5K step average
62 Miles



Day etc.
I'll do a followup post in a couple weeks, after a month or so of use. But as of today, I'm still following the sit in the morning, walk in the afternoon approach. This works well for me, that way I'm walking when I'm most awake / alert. I do need to stretch every night, which is not a bad thing. I'm feeling really good and haven't noticed a decline in productivity - actually I feel more focused when I'm walking. I have discovered that if I'm in the middle of something, and don't want to shift spaces from the treadmill to the desk, I'll sometimes just stand at the treadmill for a break. That works better than I expected. It is quiet enough to use at night with the kids asleep in the next room, but the kids informed me as they were going to sleep, that if I had my speed too high, that my steps were too loud (me walking, not the machine). I had one co-worker that could hear the treadmill  (my steps) when I wasn't on the headset, but just on the computer, but when pushed, she said she really had to strain to hear it and it was very faint.



Friday, July 25, 2014

No Fluff Just Stuff - Lone Star Symposium Review

The NFJS conference (July 2014 in Austin) was a perfect fit for me. It markets to a Java audience, but there was plenty of other topics covered. For me there was the technical Java track (immediately relevant to my current work), a functional programming track (future focused), and a soft skills track, which I found to be a pleasant and perfect balance. I'm definitely going to go back!


I started out with Javascript Design Patterns by Pratik Patel. He was particularly found of underscore.js, not only for the features set that it offered, but it's use in the mixin pattern, which he asserts is easier to maintain than the decorator pattern. I personally liked his example of this command pattern, which I'm showing below.




Java memory by Ken Sipe was really deep, but it explained a whole lot of stuff that I never understood. Essentially the JVM segments the memory into 2 spaces, new and old. The idea being that for the most part, there are two types of objects occupying memory: the super short, like a message or request; and the incredibly long, like models which are needed for pretty much the whole time the server is up.

Given this idea, there is two main segments of memory, new and old. The new space is divided into Eden (brand new), SS0, and SS1, where SS* is a "survivor space" for not new, but not old objects. The old space is also divided into Old and PermSpace (Aha! that is what the JVM config -XXMaxPermSize goes). 

(BTW, -XX is an experimental flag, while -X is standardized)

The idea is that GC is misnamed, it is not garbage collector, but really a garbage avoider. It actually never touches the dead, but does promote the living to the next level (from Eden to SS*, then to Old, etc) 

There are two types of GC, major and minor. Minor happens only when Eden is full, which moves the living the the SS space, and resets Eden to write over the dead. Major GC affects all areas of memory and is slow and should be avoided if possible. The goal is a high morbidity rate in new space, and a very low morbidity in old space. 
After optimization
Before optimization

XX:NewSize = 256m

XX:MaxNewSize =256m

XX:SurvivorRatio = 8

XX:PermSize = 32m












Finally he gave a list of tool recommendations for Java tuning
  • JPS
  • JSTAT
  • JMAP
  • JHAT
  • VisualVM* (his favorite, open source all in one troubleshooting tool)
  • VisualGC
  • MAT

Functional JS by Pratik Patel was a great overview of the difference between functional and OO.  Basically if comes down to that OO in JS is messy for the things that we need to do, and functional is a "recipe for simplicity". Again he talks about underscore.js, but this time we go deeper into

  • composing
  • currying (special composition where first argument is the composed function
  • chaining
Transitivity is defined as "always getting the same result with the same input"
And in general OO talks about nouns, where FUN talks about verbs. 



Narcissistic Design by Stuart Halloway


Just as setting the context, Stuart is extremely passionate about Clojure and functional programming, so he generally exposes all of the evils of OO. And this talk is a humorous portrayal of that.  Although if you listen with an open mind, putting aside your OO education, there are some interesting points of view to consider.

The premise behind his talk is that by thinking only about "me", that you can add lots of complexity to the code base, all in the name of best practices. So here is a list of best practices that increases the complexity of the code base and makes it harder to share.

  1. Embrace setter methods :
    Setters undermine the two best parts of OO: constructors and interfaces
  2. Prefer APIs over data:
    data forces decoupling, while API couples by temporality, language, mutability, semantics, and esoteric features
  3. Start with DSLs (Domain Specific Languages)
  4. Always connect, never enqueue
  5. Create abstractions for information
  6. Use static typing across subsystem boundaries
  7. Put language semantics on the wire
  8. Write lots of unit tests
    He argues that once tests are passing, they tend to always pass
    He also argues that generative testing would test more options then a handful of pathways
  9. Update information in place
    This practices comes from assumptions that memory / storage is expensive and resources are dedicated
    It is not needed anymore and immutable data facilitates easy sharing, distribution, concurrency, access, and caching
  10. Leverage context
One of the neat ideas was to learn some of the data languages like you would a programming language:

  • avro
  • bson
  • csv
  • edn
  • fressian
  • hessian
  • java
  • json
  • kryo
  • protobuf
  • thrift
  • yaml
  • xml



Build your own technology radar by Neal Ford of Thoughtworks was by far the best / most inspiration session of NFJS.

This is basically a snapshot in time by opinionated technologists. It is not comprehensive nor strategic. It is not a technology lifecycle assessment tool. It is ultimately a tool to montior ("keep on the radar") technologies.

"You can't tell that the technology is stable or collapsing when you are on the inside"

The interactive version is at http://www.thoughtworks.com/radar/#/

The rings of the radar from outer to inner are

  • Hold - proceed with caution (notice there is no "avoid" category)
  • Assess - worth exploring with the goal of how it will affect you
  • Trial - worth pursuing on a low risk project. Get to know its strengths, limitations, and use cases
  • Adopt - finished a trial and found usage patterns
    • Mason Razor: "I'll make fun of you at the pub if you aren't doing this"
Neal strongly encouraged each developer to make their own radar. It is part of your knowledge portfolio, that needs to by managed. A simple API exsits for plotting one already at https://github.com/bdargan/techradar

As far as evaluating new technologies, here is the litmus tests that were recommended:
  • Testability
  • Integratability
  • Learnability
  • External references (books, blogs, conferences talking about it)
One of the best tactical / practical / immediately applicable comments was to write unit tests in a different language. For example write Java unit tests in Groovy. Given that tests are a form of overhead, there is a benefit to make it as efficient as possible. Besides you get to practice in a new language. 

That night, I sat in the lobby of the hotel and attempted to re-write one of our test classes to Groovy. I ended up with 4 people pairing with me and it was SUPER simple. Within an hour, I had nearly the whole class in Groovy, and that was GDD (Google driven design, given that this was my first exposure to the language. 

Neal also strongly recommends that COMPANYS create a technology radar as well. 
  • Gives you a platform for continual analysis
  • Unified message to non-technical but interested people
  • Excuse to get together to have an impassioned conversation

"The future is already here, it just is not evenly distributed" 

Research shows that your next job comes from your weak links in your social network, instead of your strong links, like friends and family.

The top pitfalls that lead to agile troubles by Andy Painter was just a wealth of nuggets for my scrum master position.

I enjoyed this presentation so much, that I even asked Andy to join me for lunch, so we could continue talking. I had several questions for him, and he provided great insight.



  • Agile vs waterfall
    •  Agile is like flying an airplane, you continually have to course correct for wind, weather, traffic etc. Waterfall is like riding a train, where the plan has already been laid down for you to follow. 
    • You can't say that Agile is faster than waterfall because they are not the same product. It is an apples to baseballs comparison. You can't assume that the finished agile project is anywhere near the same thing that would have been delivered via waterfall
  • Scrum master
    • Is about teaching
    • In order to teach, they need to be able to listen
    • Also needs to provide a safe place to fail, so that learning / improvements can happen
  • Product Owner
    • Available, knowledgeable, and empowered
    • PO as proxy should be a temporary position
  • Learning from Failures
    • True failure is not working through the challenges and giving up
    • "I welcome failure, not because I desire it as an ultimate end, but because I recognize that any true success must be born through some amount of failure. And because of this allowance, I expect my team to be better next year than they are today. 
  • Cargo Cult
    • I hadn't heard this term before, but it describe the condition of imitating actions expecting to produce the desired results. 
    • For example, if a team says "we have a backlog, daily standups, and demos; therefore we are Agile", without understanding the why or treating style over substance, might be an example of the cargo cult. 
  • Standup
    • If what you did yesterday, doesn't equal to what you committed to in yesterday's standup, that is an impediment
    • It isn't a status meeting, but at daily planning meeting
    • It is a layer PDCA cycle - Plan, Do, Check, Act
    • If "I'm working on it" for a couple of days, means that there isn't enough visibility.
  • Velocity
    • It is a PLANNING tool, not an accelerator
    • By definition it is a constant rate of motion
    • In retrospect, it should have been named "pace" instead, to take away the stigma that it can be throttled
    • Best stats is from the last EIGHT (8) sprints (3-4 months). This encompasses the average amount of stuff - vacations, sick days, life events. 



Javascript toolchains by Nathaniel Schutta
Here is their take on the JS toolchain

  • Node.js - Even if not for the server-ness, it is needed for the other essential tools
  • Grunt - build tool
  • Jasmine - testing
  • Mocha -testing with built in async and code coverage
  • Karma - automatic test execution
  • Phantom - Headless browser for CI
  • Sinon - spies, mocks, and stubs
  • Istanbul - code coverage
  • JSHint - static code analysis (more configurable then JSLint)
  • Plato - static code analysis with complexity reports & maintainability indexes
  • Angular - MVC large application management
  • Bootstrap - CSS framework
  • Require - dependency management
  • Uglify - JS compressor



For the rest of the sessions that I attended, while they were interesting, I'm not going to summarize them.

  • Leading Technical Change, while good to hear again, was all common sense. There was a good quote that came out it though. "Attention is our best resource, don't waste it." "Attention is a bit like real estate, in that they're not making any more of it. Unlike real estate, though, it keeps going up in value" 
  • Web Security was amazingly interesting, especially in the fact that we didn't just go over the obvious vectors, but we actually did the OWASP's web goat security demonstration application as a group lab. That was AWESOME!
  • Clojure in 10 big ideas was great at getting my head around a purely functional language. It would do no good to summarize or list the 10 points, because without the 15 supporting slides for each point, it is useless. 


Book Recommendations from the conference