hack.summit() was held in early December 2014. It was a virtual conference where you could attend from home and view everything over the internet. I was unable to view it while it was underway, but there is a playlist of the sessions available on YouTube. I have been catching up on the sessions in my spare time. There are several sessions that I would recommend:

  • Reuven Lerner’s presentation comparing Ruby and Python
  • Alex Gaynor’s presentation on Code Review
  • Kimber Lockhart’s presentation on Inheriting Bad Code
  • Yehuda Katz’s presentation on Indie OSS. (I think several of his suggestions can be applied to any project, not just OSS.)
  • Floyd Marinescu’s presentation on Running Virtual Teams

Happy New Year

Just wanted to wish everyone a Happy New Year!

This is the time of year when people start thinking about new year’s resolutions and setting goals.

I listened to a podcast a few weeks ago that discussed setting goals. One of the ideas that was discussed was setting daily or weekly “micro-goals”. A micro-goal is a small goal that is easy to meet. One of the examples they gave was setting a goal of doing a single push-up every day. That is a goal that is easy to meet and you can feel good about keeping the streak of met daily goals continuing. An example why that they gave was when he was sick with the flu, he could still meet the daily goal. There is a psychological benefit of keeping the streak going which is why having a “micro-goal” is more beneficial than saying 20 push-ups every day and failing to meet the goal. Another thing that was discussed was setting measurable goals. A goal that says become a better “_____” is not very good because it cannot be measured and it is tough to know if you achieved it. One example of a goal that I have set is to make a blog post every week. I actually started this one a couple of months ago.

It is important to note that these are short term goals being discussed and not bucket list type of items. You can still have goals like visiting Australia or climbing a mountain. Those are more of an achievement than something you do regularly and can measure.

I hope some of these thoughts are of benefit to you as you start the New Year.

Merry Christmas

I would like to wish everyone a Merry Christmas!

I want to encourage you to take time away from the hustle and bustle that can get going this time of year and remember the real reason for the season. I know it’s a cliche, but it is true as well. Let’s remember God’s gift to us and count all the blessings we have in our lives.

2 Corinthians 9:15 Thanks be to God for his indescribable gift!

Developer Podcast Recommendations

I would like to recommend a group of podcasts that are hosted by Charles Max Wood. They are all similar in format – a panel of people that can change from show to show discussing development topics. You can find them all at DevChat.tv. I have not listened to all of the podcasts he hosts, but based on the ones I do listen to, they are all recommended.

Here are the ones that I do listen to:

  • The Ruby Rogues is the first podcast of his I started listening to. I was interested in learning more about Ruby, but quite a few of these are good general developer oriented podcasts that would be beneficial even if you don’t use Ruby.
  • Javascript Jabber, as you can guess from the title, is JavaScript focused. A lot of these are focused on various JavaScript libraries.
  • The Freelancer’s Show is targeted to consultants and freelancers. Some of the shows are focused on good development strategies or habits to develop. I think this is valuable as well.

Chuck also has 3 more podcasts that I don’t have time to listen to, but check them out if they are of interest to you. I find all of these help me stay up-to-date with development trends.

Dan Carlin’s Hardcore History Podcast

I would like to recommend Dan Carlin’s Hardcore History Podcast. I had heard several recommendations for this podcast, but had not gotten around to checking it out. I finally did and think it is a great podcast. I have only listened to his series on World War I and I have gained lots of insight.

In my schooling, WWI was largely overlooked and the teachers always jumped to the 20’s, the Great Depression and then World War II. From this podcast, I have learned a lot about the origins of this conflict, how it changed society and how it is still affecting us until now. It is more than just a recitation of facts. He brings history alive with insights and stories from a unique perspective.

I will warn you though, this is a long podcast series. They appear to be coming out quarterly and each episode is 3-4 hours long. Even at that, I still consider it a good investment of time. I am looking forward to the completion of the WWI series. I also intend to listen to more of the archive. He also has a podcast called Common Sense which I would recommend. It is focused on current events. I have only listened to one of those and enjoyed it as well.

Monthly TAP Meeting

Just went to the monthly TAP meeting. TAP is the Tulsa Agile Practioners meetup. I have been going for the last few months. They meet on the first Tuesday of every month. If you are in the Tulsa area, I would highly recommend it.

This month was a follow on to last month’s meeting. We continued to discuss User Story Maps and actually did a demo workshop this month. Jason Knight did a great job leading the discussion. The workshop clearly demonstrated how you can get a better understanding of a project and how to do effective release planning.

Knockout Repeat plug-in

I had a request to display the newest items added at the top of the table, but in the data storage, the newest items needed to be added at the bottom. The built-in foreach binding in knockout does not have an order option. It always traverses the observable array from 0 to the last item. So, I needed to figure out another option for building the table. One option, using only built-in knockout functionality, was to create a second array and using the reverse function on the array to recreate the second array whenever the first array was updated. I just saw too many possible problems with that and, having 2 copies of data, they were liable to get out of sync.

I searched for options on Stackoverflow and found a Repeat plug-in that had been created by Michael Best. It works similar to foreach, but it does have a reverse option which would do what I need. There are some differences in how they work. The main difference is the context that has scope within the loop. In “foreach”, the context changes to the observable array. So, if I specified “foreach: payments”, within the loop, I would just use “amount”. While using the repeat binding, the context stays with the original parent object. So, if I specified “repeat: {foreach:payments, reverse:true}”, within the loop, I would use “$item().amount” to access properties of the object stored in the observable array.

The differences are very minor, but the functionality provided is quite beneficial. This is a plug-in I highly recommend.

Have a Happy Thanksgiving.

Knockout.js Select bindings

Knockout.js is versatile in how you can bind to HTML SELECT inputs. Most of the examples show bindings to simple arrays, but there is a lot more functionality available. The tricky part is knowing where to look. You might think to look for a select binding, but you actually want to look at the documentation for the options binding.

Let me show you an example. Instead of having a simple array of single values to bind to, you want to have an array of objects.

var invlist = [{"id":"PGT_MUM-A","desc":"Decorative pot red mum","combodesc":"A - Decorative pot red mum","price":"25.00","altid":"A"},
{"id":"PGT_MUM-B","desc":"Refill pot red mum","combodesc":"B - Refill pot red mum","price":"20.00","altid":"B"},
{"id":"PGT_MUM-C","desc":"Decorative pot white mum","combodesc":"C - Decorative pot white mum","price":"25.00","altid":"C"},
{"id":"PGT_MUM-D","desc":"Refill pot white mum","combodesc":"D - Refill pot white mum","price":"20.00","altid":"D"}];

In this example, we have inventory items that have an id, description, price and some additional fields. Here is the way the HTML SELECT would look:

<select id="zSaleItem" data-bind="value:currItem, options:invlist, optionsValue:'id', optionsText:'combodesc', optionsCaption:'Item Number'"></select>

In the data-bind, we still specify the value which ties to the field in the viewmodel that this input field is bound to. The rest of the data-binding creates all of the options to be in the select. The first field is “options” which links the array holding all the options to be used to populate the select. In this example, it is “invlist” which is the sample array shown above. The next field is “optionsValue”. This tells the binding what property of the object in the array to place in the value mapped to the viewmodel after a selection is made. “optionsText” specifies the property to be displayed as the text value of the option in the select. When there is not a value selected, you use “optionsCaption” to specify what to display. In this case, it is “Item Number”. Other examples could be “Choose”, “Select”, etc.

I have found this gives a lot of flexibility in defining how you want the SELECT to display and function.

Random Thoughts

Some random thoughts for now. I am going to try and start posting regularly. I have added a calendar reminder to make sure I don’t get busy and forget.

I recently opened a Bitbucket account. I chose Bitbucket over Github because Bitbucket will give you private repos as part of the free plan. I have started integrating it with my daily workflow and it is easier and less intrusive than I thought. I also started using Source Tree, which is a free Git client from Atlassian. That may be why using Bitbucket has been so easy. Atlassian also has a set of Git tutorials that helped with the learning process.

I am still using Knockout.js for some work projects. I enjoy using it. The 2-way data binding really makes things simple to work with. One update that I made in 15 minutes would have taken about 2-3 hours if everything was coded by hand. The documentation has been helpful and anything I haven’t found in the documentation I have been able to figure out with help from Stack Overflow.