Herding Code 197: Summer Stories, C# 6, Vim and Atom, Terrible Keyboards, Poorly Aged Hipster Code, React and the Apple Watch

It’s time for a discussion show!

Download / Listen: Herding Code 197 – Summer Stories, C# 6, Vim and Atom, Terrible Keyboards, Poorly Aged Hipster Code, React and the Apple Watch

Show Notes:

  • (01:22) What’s new for Kevin? Node, Backbone, working at Brandcast, some talk about how the shop runs. Plus he’s been busy moving.
  • (03:12) What’s new for K Scott? Lots of JavaScript, C# / MVC, AngularJS, MongoDB. Jon asks how Mongo is working in production in the healthcare application K Scott had mentioned earlier. K Scott talks about some performance issues he’s looked at, including some that came down to C# queries, and an issue with a 16MB document size limit. Jon asks if they’re using Redis or other front end caching outside of Mongo. K Scott says they’re just map-reducing and storing the information in other collections. He’s not travelling quite as much
  • (06:50) Jon asks K Scott about his recent posts on C# 6 and EcmaScript 6. K Scott talks about looking into traceur to write current code today in ES6, compiling to ES5 to work in current browsers.
  • (07:25) Jon asks K Scott about his recent C# posts on property initializers and primary constructors. K Scott talks about those as well as the new "using static" feature to invoke static members without needing to use the type name.
  • (08:42) Scott K mentions a discussion about required properties with property initializers. K Scott says he was hesitant about a few things with the new syntax, and problem being that there’s no initializer body for validation. You can mitigate that a little using an assert in a the initializer. It’s nice not having to write explicit setters.
  • (11:06) Scott K says he doesn’t even think about property syntax all that much because Resharper and CodeRush handle that for him. Jon speculates how long it will take for Resharper to start yelling at him to use primary constructors everywhere. Scott K says he uses CodeRush for that reason and turns off the code hints.
  • (12:27) K Scott asks what software Kevin is using: OSX and MacVim.
  • (12:40) Jon asks if anyone’s using Atom.io. Scott K says he tried it and it was way too slow. Kevin says that after using Vim he has a hard time with heavy IDE’s – even WebStorm. He’s skeptical about the longevity of new code editors, while Vim is eternal. Jon says he’s interested in Atom.io because it’s cross-platform and open source.
  • (16:05) What’s new for Jon? He’s been doing some courses for Microsoft Virtual Academy – Introduction to ASP.NET MVC and a Bootstrap course including some advanced stuff like Bootstrap Mix-ins. Wrox Professional ASP.NET MVC book is out. He went to Norway for fun and went to pulpit rock. He’s been spending some more time on non-Microsoft web stacks and platforms now that Azure and ASP.NET vNext are cross-platform. Scott K and Kevin talk about the fun of switching operating systems and remembering keyboard shortcuts. Jon says the biggest frustration is that he keeps trying to touch the screen on a MacBook and it doesn’t do anything.
  • (21:30) What’s New for Scott K? He got a new computer a Lenovo U530 – he calls it the consumer version of the Carbon. He talks about some of the confusing things about the Lenovo keyboard, especially the function keys. Everyone talks about function keys and keyboard problems. K Scott has a newer Carbon, and the keyboard is driving him nuts. Scott K says he’s constantly hitting the touchpad because his keyboard is off-center, which always brings up the Windows charms. Jon mentions touchfreeze and other ways of disabling the touchpad while typing. Jon says he rarely uses the touchpad because he just uses the touchscreen. Scott says he never uses it, he thinks it’s weird that you use two fingers to scroll on the touchpad and one on the screen. K Scott said he accidentally put his Carbon in caps lock, but he doesn’t have a caps lock button so it was hard to turn off. Kevin is unhappy with the Microsoft Sculpt Keyboard’s function keys. Everyone, please stop messing up the function keys.
  • (34:13) Jon asks if anyone’s use the CODE keyboard. He and Jon both agree that it looks great, but they can’t use non-ergo keyboards. Scott K wants keyboards to keep it simple and last a long time.
  • (35:27) Scott K get back to telling us about his summer activities. He was working on upgrading a MonoRail that drove him crazy due to being "craftstmanned up" with lots of opinions in the code like fluent extension methods, Brails view engines and difficulty in upgrading libraries due to dependency injection and breaking changes in NHibernate. Jon says that he’s developed an aversion to things that make great blog posts but will be hard to work with in a few years. Scott K says 90% of the problems came from strong naming – binding redirects and ILMerge with aliases didn’t help. They’ve been evaluating MongoDb and AngularJS a bit at work
  • (41:50) Scott K used React with Grunt in his MonoRail project to allow him to add client-side functionality into a frightening legacy application. Jon asks how he sets it up so it works at dev time and Scott K explains. Kevin’s been hearing a lot about React lately. Scott K like that it’s not trying to be MVC, just the V – e.g. no two-way binding – and the virtual DOM diffing is so fast that people are even using it with AngularJS and Ember just to speed up diffing large lists. Plus it’s used by Facebook for Instagram and the commenting / messenging on Facebook, so it’s been proven to work in big apps. He thinks it’s going to be bigger than Angular and Ember in the next few years.
  • Lightning round
  • (46:34) Who’s getting the new Apple Watch? Kevin says it seems iPad 1-ish. Jon likes some things about the watch UI, including the automatic answer prompts from instant messages with questions. He says the Moto 360 looks better, and we haven’t heard anything about battery life. He’s not sure what he’d do with today’s smart watches, but hopes watches will be really cool in a few years. Jon doesn’t like all the proprietary stuff – payment, chargers, etc. Scott K says he could easily switch to Android and it wouldn’t bother him, so he’s not going to be getting the new iPhone. He’s got a Pebble and likes the notifications and battery life. He thinks the Apple Watch is too little too late. He thinks everything from Apple has gone downhill post-Jobs. He also talks about his recent laptop purchase – if he wanted a posix system, he’d rather just buy a laptop and put Linux on it. He starts ranting about npm and K Scott cuts him off. But then the guys start complaining about the live stream and things go off the rails again.
  • (1:02:32) Jon asks why nobody’s moved to CouchDb. K Scott says the company behind MongoDb is pretty pushy. Nobody had looked at DocumentDb yet, and both Kevin and Scott K are bullish on Postgres.

Show Links:

Sponsor

This show is brought to you by Runscope – find out more at http://runscope.com/herdingcode

Herding Code 196: Matias Niemela on ngAnimate

The guys talk to AngularJS committer Matias Niemela about AngularJS and Angular animations with ngAnimate.

Download / Listen: Herding Code 196: Matias Niemela on ngAnimate

Show Notes:

  • Hello. How’d you get started with AngularJS and ngAnimate?
    • (01:00) K Scott notes a tweet from Matias that he liked Angular before it was popular and asks Matias about how he got started with Angular and how he became a contributor, primarily contributing to animation. He’s also contributed to angular-dart and forms. (03:17) K Scott asks about the history of Animations. Matias talks about how things evolved to working with CSS classes. K Scott talks about how he found the source code for animations was pretty interesting, and Matias agrees.
  • Dart and Google Material Design
    • (04:47) K Scott asks about AngularDart relates to Angular. Matias explains that both are from Google, and they want to make sure that it’s easy to build Angular applications using Dart if you want to.
    • (05:39) Jon asks is Matias is working in both the 1.x and 2.0 source. Matias says he’s mostly focused on the 1.2 and 1.3 release and lately incorporating Google’s new Material Design, especially with animations and components. Angular Material Design includes styles and animations, but is built to allow you hooks to add your own styles and animations, transparently syncing them together in a consistent way.
  • Animation internals
    • (08:14) K Scott asks for Matias’ thoughts on CSS Animations. Matias says the API is too isolated, so there’s no way to hook into the keyframe system. CSS Transitions do allow for that, but you can’t repeat transitions. Putting them together, it’s difficult to create a comprehensive system that’s guaranteed to always run. The Material Design animations work with the Web Animations API, which is a more robust animations API. Currently only Chrome support the .animate method, and the Web Animations API spec is still being written, but Polymer has a polyfill.
    • (10:16) Jon asks about browser support and whether Matias is able to write to standards or if he has to do a lot of special casing. Matias says that the Polymer polyfill and the animations API covers almost everything without special casing.
    • (11:11) K Scott asks what the most challenging part of Angular Matias has worked on so far. Matias says the challenge has been the animations, especially in refactoring over time.
  • Testing in JavaScript
    • (12:56) K Scott asks how Matias tests animations. He says that the tests are all mocked, so they’re not running against animation engines. He says it’s been difficult testing asynchronous code in a synchronous manner.
    • (14:38) Jon asks if Matias uses Javascript libraries to deal with asynchronous code. Matias says that’s all handled by Angular itself.
  • ECMAScript 6
    • (15:15) K Scott asks for Matias’ thoughts on ECMAScript 6. Matias says that Angular 2 is built with ECMAScript 6 using traceur for backward compatibility. He likes the classes and generators an syntactic features, but after working with Dart there are a lot of other features he’s missing. The problem is that JavaScript is non-blocking, so the code will always be a series of callbacks with variables to see if a callback has fired. Promises are great, but they’re just packaged callbacks in a way.
  • Getting Started, Form Validation
    • (16:50) Jon asks for pointers for someone who’s new to ngAnimate. Matias says he’s written documentation for 1.2, but some of it isn’t up to date. There’s a SitePoint article about it, and when 1.3 is out Matias will have an article out about it.
    • (17:38) K Scott asks about form validation. Matias talks about the work they’ve been doing with forms in 1.3.
  • ECMAScript 6 and JavaScript Development
    • (18:55) Twitter question from Steve Strong asked for news on Angular 2.0 and how important ECMAScript 6 is to it. Matias talks about how ES6+ (ES6 with annotations support) simplify dependency injection.
    • (21:13) K Scott asks if Matias liked using JavaScript back when he was doing more full stack development. Matias talks about how he used to write a lot of JavaScript to do things that Angular just handles.
    • (22:38) K Scott says that Matias’ blog and twitter names, Year Of Moo, made him thing that Matias might have been involved with Moo Tools. Matias says he used to be heavily invested in Moo Tools because it supported proper object oriented programming (as opposed to jQuery’s looser approach). He eventually switched to jQuery and then to Angular. He’d originally named his blog around an idea of writing a new Moo Tools plugin each month for a year, but kept the name because it’s unique.
  • More Testing
    • (23:50) K Scott asks Matias when he became passionate about testing. He talks about how valuable tests have been to him.
    • (24:45) Jon asks if Matias has any recommendations on testing. His suggestion is to pay attention to what you’re after. Your tests are to make sure that the code you’ve written work, so test the main points of functionality. Look for friction points – things that will not change – and test those. Try to write some of your own unit tests first, and when you get frustrated look at how projects like Angular are writing their tests.
  • Inspiration and Design
    • (26:12) K Scott asks Matias what he’s been looking to for inspiration. Matias has lately inspired by Clojure and books on software patterns and refactoring.
    • (26:51) Jon asks Matias about his site’s design and use of color. Matias says the cartoons on his site are by his girlfriend who is a graphic designer. He says that most technical bloggers are not focused on writing articles. His goal is to push the boundaries of technical blogging and to address the frustrations he’s had in reading other technical blogs.
    • (28:41) Jon says he really likes Matias’ use of multiple em classes with different colors. Matias discusses that, and says that he’s rewriting the website from Jeckyl to Hugo (which is built with Go).
  • Wrap up
    • (29:58) K Scott asks what Matias does for fun. He mentions travel (he’s from Finland), golf and going to the gym. But computers is a big passion of his, so it’s rare that he’s away from the computer.
    • (30:28) K Scott says he used to play golf a lot, but he’s been making an effort to get out golfing at least once a week. Matias says it’s definitely a challenge a lot of programmers face – most of us like what we do, and going outside requires intention. Jon talks about his friends in other professions who leave their work at work. Matias talks about the portability aspect of computing.
    • (32:24) K Scott asks Matias about what’s on the way for for him. He mentions some posts and upcoming speaking engagements, especially ngEurope in October in Paris, talking about what’s new with Angular and ngAnimate.

Show Links:

Sponsor

This show is brought to you by Runscope – find out more at http://runscope.com/herdingcode