Tuesday 31 January 2017

Damo's January 2017 Podcast Highlights

I subscribe to many podcasts, you can see the list as it was in 2015 here: Developer podcasts v2. I'm keeping a podcast blog here of the episodes that I find interesting or useful in some way.

Devops

[RunAs Radio] The DevOps Handbook with Gene Kim http://runasradio.com/Shows/Show/510
  • The DevOps Handbook is finally released! Richard chats with the one-and-only Gene Kim about the five years of effort that have gone into making the DevOps handbook. Gene talks about how the Handbook was supposed to come out before the Phoenix project, but as the scope of the book grew, they realized it needed more time. The benefit of time has been a ton of case studies and great detailed evidence of how automating workflows, instrumenting systems deeply and a culture of experimentation leads to better applications, happier employees and customers, and a better business all around. You need to read this book!

[Radio TFS] A New Year with Donovan Brown http://www.radiotfs.com/Show/129/ANewYearwithDonovanBrown
  • Donovan is a Principal Program Manager for DevOps in the Developer Division at Microsoft, focusing on developer tools including Visual Studio Team Services and Team Foundation Server.
  • In this episode Greg, Martin, Josh and Angela are joined by Donovan Brown to talk TFS, VSTS and, of all things, DevOps!

Programming and Testing

[No Fluff Just Stuff] REST is Dead, Long Live the Web! http://blog.nofluffjuststuff.com/2015/12/28/podcast-rest-is-dead-long-live-the-web/
  • REST is dead, long live the Web

[Full Stack Radio] Toran Billups - Test Driving the Front-end http://www.fullstackradio.com/49

[No Fluff Just Stuff] Professional Git with Brent Laster http://blog.nofluffjuststuff.com/2016/12/28/professional-git-brent-laster/
  • He talks and trains in-depth on not only in Git and source control, but continuous delivery concepts, and a variety of different topics. He’s just published his book, “Professional Git,” by Brent Laster. It’s available on Amazon. We sat down to dive deep and talk all things Git

[Software Engineering Daily] Bots Podcast with Jon Bruner https://softwareengineeringdaily.com/2016/12/15/bots-podcast-with-jon-bruner/
  • Over the next few years, bots will pervade our lives more and more. These smart, conversational text interfaces provide a new way of engaging with the computer systems that we have been mostly interacting with through web and mobile app interfaces for the last decade.
  • Bots are a necessary complement to the voice interfaces of the future, because we don’t always want to talk to the computer, and natural language processing is not yet good enough to always translate our vocal request accurately. Bots are not toys, they aren’t trivial, and they aren’t going away any time soon.

[Complete Developer Podcast] Learning A Second Language http://completedeveloperpodcast.com/episode-67/
  • Before starting to learn a new programming language you should take a few considerations. How different is the new language from your current one? Compare the envivornment, paradigm, syntax, and level of automatic operations between the languages.
  • Tim Ferris wrote up twelve rules for learning a a new language. His rules were for a spoken language but they can also be applied to programming languages.
  • Learn the right words, the right way.
  • Learn cognates, things that are the same across languages.
  • Interact daily in the language through spaced repetition in a controlled environment.
  • Daily spoken practice.
  • Look for free resources.
  • Realize that experience makes it easier to infer rules.
  • Learn to effectively use mnemonics.
  • Embrace mistakes.
  • Create Smart goals (Specific, Measurable, Attainable, Relevant, Time-Bound).
  • Jump from conversational to mastery.
  • Learn to sound more native through the use of idioms.
  • Keep going until you actually get things down.

[Software Engineering Radio] Peter Hilton on Naming http://www.se-radio.net/2016/12/se-radio-episode-278-peter-hilton-on-naming/
  • why naming is much harder than we think, why naming matters in programming and program comprehension, how to create good names, and recognize bad names, and how to improve your naming skills.

[Cucumber Podcast] Cucumber Anti-Patterns https://cucumber.io/blog/2016/05/09/cucumber-antipatterns
  • Matt, Steve, and Aslak from the core Cucumber team discuss writing good gherkin and avoiding common pitfalls.
  • We’ll unpick why it’s important to write your gherkin before you write the code, consider if you should ever delete scenarios, and give tips on incorporating your team’s different perspectives into maintainable, predictable cukes!

[Software Engineering Radio] Gerald Weinberg on Bugs Errors and Software Quality http://www.se-radio.net/2017/01/se-radio-episode-280-gerald-weinberg-on-bugs-errors-and-software-quality/
  • Gerald Weinberg about software errors, the fallacy of perfection, how languages and process can reduce errors, and the attitude great programmers have about their work. Gerald’s new book, Errors: Bugs, Boo-boos, and Blunders, focuses on why programmers make errors, how teams can improve their software, and how management should think of and discuss errors. We learn why all programs are perfect (for something), quality can be judged only by the end user of the software, and computers act as “error amplifiers” for our own human imperfections.

Architecture

[Software Engineering Daily] Reactive Microservices with Jonas Boner https://softwareengineeringdaily.com/2016/12/19/reactive-microservices-with-jonas-boner/
  • For many years, software companies have been breaking up their applications into individual services for the purpose of isolation and maintainability. In the early 2000s, we called this pattern “service-oriented architecture”. Today we call it “microservices”.
  • The reactive manifesto is a collection of principles for how to build applications. When the reactive manifesto is applied to the idea of microservices, we get reactive microservices, which Jonas and I discuss in today’s episode.

[Software Engineering Daily] Self-Contained Systems with Eberhard Wolff https://softwareengineeringdaily.com/2017/01/03/self-contained-systems-with-eberhard-wolff/
  • Self-contained systems is an architectural approach that separates the functionality of a system into many independent systems. Each self-contained system is an autonomous web application, and is owned by one team. Communication with other self-contained systems or 3rd party systems is asynchronous where possible.
  • As Eberhard Wolff explains in this episode, self-contained systems is not the same thing as microservices, but they are not mutually exclusive. Organizations often adopt a mix of architectural ideas, and it is worth understanding these different models so you can decide which of them to apply to your own projects.

[Software Engineering Daily] Evolutionary Architecture with Neal Ford https://softwareengineeringdaily.com/2017/01/05/evolutionary-architecture-with-neal-ford/
  • Evolutionary architecture supports incremental, guided change as a first principle along multiple dimensions. A company with an evolutionary architecture is structured to evolve in response to changes inside the company (such as a decision to change the product) or outside the company (such as the emergence of Docker). Neal Ford is an architect at ThoughtWorks and one the creators of the evolutionary architecture concept.

[AWS Podcast] Serverless Special https://aws.amazon.com/podcasts/aws-podcast/#171
  • Bryan Liston, Developer Advocate for AWS Serverless, speaks with Matt Weagle, Ant Stanley & Ben Kehoe. They discuss server less architectures, testing and other fun topics!

Agile, Teams and Business analysis

[Mastering Business Analysis] Split Your Stories! https://www.acast.com/masteringbusinessanalysis/mba101-split-your-stories
  • The problems big user stories can cause
  • How big your user stories should be
  • Why splitting stories helps create a shared understanding
  • How just four splitting techniques apply to almost all stories

[Agile for Humans] Agile is a cancer http://ryanripley.com/003-agile-for-humans/
  • Zach is an independent consultant who recently posted a provocative article called: “The Subversion of Agile: Agile is a Cancer”. We discussed his post, talked about what the cancer is in the community that needs to be removed about posts from others in the community about the “death of Agile”.

[Developing Up] The Four Attributes of a Great Development Team http://www.developingup.com/7
  • The four attributes of a great development team:
  • Communication
  • Responsibility
  • Positive attitudes
  • Collaboration

[Developing Up] The Importance of one-on-ones http://www.developingup.com/8
  • Great developers need great support, feedback and communication. In today's episode we talk about the importance of regular one-on-one meetings for both developers and managers. We discuss how managers can establish and maintain successful one-on-one meetings. We then discuss how as a developer you can take ownership of and benefit from these meetings.

[Mastering Business Analysis] Using Behavior Driven Development for Better User Stories http://masteringbusinessanalysis.com/episode-023-using-behavior-driven-development-for-better-user-stories-interview-with-jeffrey-davidson/
  • Better understand how to get better at user stories and how behavior driven development (BDD) helps create a shared understanding. We also discuss how to create the nirvana state of living requirements.

[.NET Rocks!] Punishment Driven Development with Louise Elliott https://www.dotnetrocks.com/?show=1406
  • The beatings will continue until morale improves!
  • Louise talks about getting rid of blame and punishment, whether self-inflicted or team-inflicted, so that the individual unique contributions and capabilities of every member of the team are valued. The conversation also dives into creating constructive incentives - not pitting team members or separate teams against each other, actually making sure everyone is focused on making sure the business is successful.

Other interests and stuff

[Revisionist History] Blame Game http://revisionisthistory.com/episodes/08-blame-game
  • How can we all make human error
  • The simplest solution often is
  • Cars with runaway acceleration. And what to do if it does. It can happen to you, honestly
  • In the summer and fall of 2009, hundreds of Toyota owners came forward with an alarming allegation: Their cars were suddenly and uncontrollably accelerating. Toyota was forced to recall 10 million vehicles, pay a fine of more than $1 billion, and settle countless lawsuits. The consensus was that there was something badly wrong with the world’s most popular cars. Except that there wasn’t.
  • “Blame Game” looks under the hood at one of the strangest public hysterias in recent memory. What really happened in all those Camrys and Lexuses? And how did so many drivers come to misunderstand so profoundly what was happening to them behind the wheel? The answer touches on our increasingly fraught relationship to technology and the dishonesty and naiveté of many in the media.

[TED Talks] How to gain control of your free time https://www.ted.com/talks/laura_vanderkam_how_to_gain_control_of_your_free_time
  • There are 168 hours in each week. How do we find time for what matters most? Time management expert Laura Vanderkam studies how busy people spend their lives, and she's discovered that many of us drastically overestimate our commitments each week, while underestimating the time we have to ourselves. She offers a few practical strategies to help find more time for what matters to us, so we can "build the lives we want in the time we've got."

[TED Talks] Bring on the female superheroes! https://www.ted.com/talks/christopher_bell_bring_on_the_female_superheroes
  • Why is it so hard to find female superhero merchandise? In this passionate, sparkling talk, media studies scholar (and father of a Star Wars-obsessed daughter) Christopher Bell addresses the alarming lack of female superheroes in the toys and products marketed to kids — and what it means for how we teach them about the world.

[Developer On Fire] Neal Ford - Architecting Appreciation http://developeronfire.com/podcast/episode-197-neal-ford-architecting-appreciation

[No Fluff Just Stuff] Lifelong Learning with Venkat Subramaniam http://blog.nofluffjuststuff.com/2016/11/16/lifelong-learning-venkat-subramaniam/

Tuesday 24 January 2017

Using beyond compare with Git on Linux (and windows)

EDIT - See footer for more info and an alternative to the main body of this post.


I'm a massive fan of Beyond compare, I use it a lot. It's brilliant for all the tasks related to file and folder diffs, either on the file system or in source control when viewing changes between revisions or branches.

Using git diff is ok when you are looking at a small set of changes but if there are many changes across many files I much prefer to use beyond compare to visualise the change set.

Git / Beyond Compare integration

The following code snippets are taken from a centos linux build, but there is no reason that with a little tweak this wont work on a windows machine. (In fact the little tweak is shown in the appendix at the bottom).

Edit your ~/.gitconfig (c:/users/UserName on windows) by adding the following:

[diff]
  tool = bcompare
[difftool "bcompare"]
  cmd = bcompare \"$LOCAL\" \"$REMOTE\"
  prompt = false
[merge]
  tool = bcompare
[mergetool "bcompare"]
  cmd = bcompare \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
  keepBackup = false
  trustExitCode = false
[alias]
  diffdir = difftool -dir-diff -tool=bcompare -no-prompt


The above assumes that you have installed beyond compare and it is now accessible from the terminal as bcompare. In fact you can see how I install beyond compare in my vagrant bash scripts here: https://github.com/DamianStanger/centos-node-developer-build/blob/master/scripts/beyondcompare.sh

Usage - launching beyond compare from the git command line:

#View all un-staged differences one by one
git difftool

#View all committed differences between the current HEAD and the penultimate commit one by one
git difftool HEAD HEAD~1

#View all differences between master branch and bugfix branch in beyond compares directory view
git diffdir master bugfix

#View all differences between two change sets (SHA-1 ) in beyond compares directory view
git diffdir 6b6aa87 4f7d15d

#View the diff of one un-staged file, note the use of -no-prompt to stop the prompt on the terminal
git difftool -no-prompt myfile.txt

#View all changes both staged and modified one by one.
#As soon as you close beyond compare the next change will pop open (due to the -no-prompt flag)
git difftool HEAD -no-prompt


You might notice that when you use the diffdir command that the files are not editable, where as if you use the more interactive difftool command that the local files are available for changing and saving in beyond compare. This is because behind the scenes when you use the -dir-diff flag, git copies the modified files to a temporary location and then performs a directory diff on them. So if you do want to modify the files as you do a comparison you must use the more interactive difftool command.

references:

https://git-scm.com/docs/git-config
https://git-scm.com/docs/git-diff
https://git-scm.com/docs/git-difftool
https://git-scm.com/docs/git-mergetool

Windows

On windows its just as easy. The users gitconfig is located at c:\users\UserName\.gitconfig

Just replace the difftool and mergetool commands from the above code snippets with the following:
cmd = "'c:\\Program Files\\Beyond Compare 4\\BCompare.exe' $LOCAL $REMOTE"
cmd = "'c:\\Program Files\\Beyond Compare 4\\BCompare.exe' $LOCAL $REMOTE $BASE $MERGED"


EDIT

Since writing this post I’ve done more playing with git, difftool and beyond compare and have made the following revelations. Which I've only tested on linux centos 7.0 with git 1.8.3.1:
  • Out of the box you can use beyond compare as your difftool
    • Use 'git difftool -tool-help' to show all the options you have, do you see bc3 in the list? if so you are set to go.
    • Use 'git difftool -tool bc3' to open your diffs in beyond compare
  • Same with the mergetool
    • git mergetool --tool-help
    • git mergetool --tool bc3
I’ve also found that you can actually edit and save files whilst using the diffdir commaand, here’s how/why:

As I said before when using the -dir-diff command git makes copies of the files into a temp location. Well if one of the sides contains the modified (current working directory) files then the copy is not a hard file copy it’s a simlink to the file in the working directory. So, that means that if you have the option ‘Handling -> follow symbolic links’ in the ‘session settings – folder compare’ dialogue of beyond compare (I recommend that you save this as a session default) then any editing of files that you do WILL be in the working folder of your git repo. Bonza.

So what does all this mean to me? Do I actually need to edit my .gitconfig then?

Well, no, and yes. Beyond compare integration is there out of the box but I would create some alias entries so you don’t have to type in the full command as that would be painful.
[alias]
  bc3 = difftool -tool=bc3
  bc33 = difftool -no-prompt -tool=bc3
  bc3dir = difftool -dir-diff -tool=bc3


You now can issue the same commands as outlines above but with 'git bc3' or 'git bc3dir' rather than 'git difftool' and 'git diffdir'

Notice that I’ve made a distinction between bc3 and bc33. bc33 will not prompt you for opening the changes and so if you use it with a large change set you will have to cancel through a lot of files until the process ends. But I guess you could always ctrl+c on the terminal to kill the process, either way I find the distinction useful for just one extra character to type.