developer efficiency

22
Dmitri Nesteruk [email protected] http://nesteruk.wordpress.com dnesteruk dmitri.nesteruk

Upload: dmitri-nesteruk

Post on 13-May-2015

1.094 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Developer Efficiency

Dmitri Nesteruk [email protected] http://nesteruk.wordpress.com dnesteruk dmitri.nesteruk

Page 2: Developer Efficiency

!  Circa ~10yrs in .Net !   C#, F#, Web (HTML+REST), WinForms, etc.

!   Founder & co-ordinator @ St. Petersburg Alt.Net User Group (est. 2008, http://spbalt.net) !   Podcast: http://spbaltnet.podfm.ru

!  Co-ordinator of the St. Petersburg .Net User Group (Ineta, http://sp.ineta.ru)

!  Microsoft MVP – Visual C# (since 2009)

!  Developer evangelist @ JetBrains !   Passionate .Net developer/consultant

Page 3: Developer Efficiency

!   Efficiency = !   How quickly you write code !   How good the code is

!   Efficiency is relative !   Relative to how quickly other people code and

how good their code is !   This talk is about

individual efficiency

Page 4: Developer Efficiency

!  No !   Business model not conducive (e.g., monopoly) !   Management doesn’t care !   Billable hours (outsourcing, etc.)

!   Yes!!!

!   Product company !   Start-up !   Company with ‘engineering culture’

Page 5: Developer Efficiency

!   Intrinsic motivation a.k.a “professionalism” !   “Programming is my pride and joy, I must improve

and do things better”

!   Extrinsic motivation !   If I do things better, I’ll get more

money/respect/casual sex/whatever

!   Efficiency is largely individual. Team efficiency is ƒ(individuals).

Page 6: Developer Efficiency

!  How quickly can you write code? !   Especially mundane code

!  How quickly can you !   Compile !   Run tests !   Deploy

!  Do you need to recompile to fix a program?

Page 7: Developer Efficiency

Demo I

Page 8: Developer Efficiency

!  Mnemonics !   Used to create data structures

!  Code gen features !   Create routine code quickly

!  Custom-written features, e.g., !   Dispose(), IDisposable ! INotifyPropertyChanged

Page 9: Developer Efficiency

!  Compilation and testing eats local CPU !   VS2010 and earlier also freezes UI :(

!   You need results now, not after check-in !   Single-machine solution:

!   Use other (fast) machines to build/test !   Use Dropbox (or similar) to sync !   Build via MSBuild with /m option !   Use a test runner that automatically re-runs tests

when binaries change !   E.g., Gallio Icarus

Page 10: Developer Efficiency

!  Multi-machine solution: !  Compilation:

!   Build project dependency graph !   Topological sort !   Run MSBuild on individual projects !   File sync

!   Testing: !   Quantize by assembly (DLL), fixture or method !   Execute on separate machines !   Collate results (XML merge) and present

!   Existing solutions: IncrediBuild, Electric Cloud

Page 11: Developer Efficiency

!  What about Continuous Integration? !  Multiple TC configurations on multiple

machines !   All will (probably) have to compile everything !   But different agents can run different things

!  Difficult to coordinate!

Page 12: Developer Efficiency

!  Only worth it if !   Cost is high (e.g., compilation time > 5sec.) !   Is automated

! Spolsky’s “Can you make a build in one step?”

!   Parallelizable (often, not always) !   Does not have cryptic dependencies, magic

artefacts !   Caveat: on remote machines, you lose out on

VS integration

Page 13: Developer Efficiency

Demo II

Page 14: Developer Efficiency

!  Conditionally show a lightweight editor !   I use ActiPro, so I have some IntelliSense

!   Instantiate new component and update usage !   Stick to one-class-per-file rule !   Judicious use of dependency injection

!  Write modified source code to original file !   Benefits:

!   Eliminate close-recompile-restart cycle !   Preserve memory state !   See new features immediately

Page 15: Developer Efficiency

!  Code generation - R#, code-gen/UML/MDA tools

!  AOP - PostSharp, your own MSBuild post-build task for IL rewriting (via Mono.Cecil)

!  Dynamic programming - DynamicMethod, LINQ Expression compiler, DLR

! Metaprogramming – Boo/Nemerle, Project Roslyn (post-C#5), D (!) !   Breaks language services (VS, C#)

!  DSLs – F#, MPS

Page 16: Developer Efficiency

!  Do developers have the best tools money can buy? (as per Joel’s Test)

!   Tools = !   Best software for development, quality control !   Best hardware for development, compilation/

testing, virtualization, etc. !   Best workspace equipment (here be dragons)

!  Do developers make their own development tools?

!  Do developers perform R&D on new tools, languages, frameworks?

Page 17: Developer Efficiency

Demo III

Page 18: Developer Efficiency

!   IDE, refactoring support !   IDEA, VS + ReSharper

!  Code insight tools ! FxCop, NDepend

!   Infrastructure tools !   (D)VCS – Git, Mercurial

!   Yes, people do host commercial projects on Github

!   CI systems – TeamCity, Hudson, CC.Net ! Collabotartion tools – issue tracking, wiki,

VSAnywhere

Page 19: Developer Efficiency

!   Bare minimums !   Modern CPU !   Enough RAM (~16Gb+ as of 2011)

!   Laptops notwithstanding

!   SSDs (still using HDDs?!?) !   Multiple monitors !   Fast internet connection (duh!..)

!  Assume that dev software (e.g., VS) is power-hungry and always expects top-end computers

Page 20: Developer Efficiency

!   Fast computers allow a lot more intelligence on developers’ machines !   Resource-heavy code analysis

!   R# misspelt naming (GPGPU) !   Larger, faster, mode detailed caches !   Fuzz/Monte-Carlo testing/simulation !   Integration tests (VMs etc.)

Page 21: Developer Efficiency

!   More time is spent on solving problems rather than implementation

!   Strong AI ain’t here yet !   Development depends on lots of other things

!   Quiet and adequate working conditions (Joel’s Test)

!   Sensible management practices !   Whether people are happy with their pay !   … and a lot more.

!   YMMV – efficiency may or may note give you anything.

!   No substitute for good business model.

Page 22: Developer Efficiency

!  Questions? !  Answers? !  Hate mail? !  MOAR?!?