Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Hour of Code

The Hour of Code

How we improve our coding skills by blaming discussing other's contribution.

Camunda Tech Talk 12.11.2019

Niklas Kiefer

November 12, 2019
Tweet

More Decks by Niklas Kiefer

Other Decks in Programming

Transcript

  1. The Hour of Code How we improve our coding skills

    by blaming discussing other's contributions Niklas Kiefer @lutki95 @pinussilvestrus 1
  2. Niklas Kiefer - Hour of Code Tech Talk - 12.11.2019

    In the Hour of Code … we meet for a dedicated time slot to talk about our Code Base … anyone is supposed to share Code Snippets … we do not want to blame others … we want to get an understanding about Bad and Good Code ... we want to share different opinions on what Good Code means 6
  3. Niklas Kiefer - Hour of Code Tech Talk - 12.11.2019

    What is a Code Snippet? Everything one team member see a problem or had difficulties to understand or follows bad patterns if (action === 'create-bpmn-diagram') { return this.createDiagram('bpmn'); } if (action === 'create-dmn-diagram') { return this.createDiagram('dmn'); } if (action === 'create-dmn-table') { return this.createDiagram('dmn', { table: true }); } if (action === 'create-cmmn-diagram') { return this.createDiagram('cmmn'); } renderer.on('external:open-url', function(options) { const url = options.url; // .. }); renderer.on('dialog:open-files', async function(options, done) { const { activeFile } = options; // .. }); renderer.on('dialog:save-file', async function(options, done) { const { file } = options; // .. }); 7
  4. Niklas Kiefer - Hour of Code Tech Talk - 12.11.2019

    What’s the Structure? Source: https://github.com/bpmn-io/hour-of-code 9
  5. Niklas Kiefer - Hour of Code Tech Talk - 12.11.2019

    Rule #1 There are no bad code snippets! 10
  6. Niklas Kiefer - Hour of Code Tech Talk - 12.11.2019

    What’s the Outcome? A Code Snippet in our Repository? A Pull Request? An Issue? Nothing? … 11
  7. Niklas Kiefer - Hour of Code Tech Talk - 12.11.2019

    What’s the Outcome? A Code Snippet in our Repository? A Pull Request? An Issue? Nothing? … Awareness of the Problem and Learnings 12 Example
  8. Niklas Kiefer - Hour of Code Tech Talk - 12.11.2019

    What’s the Outcome? A Code Snippet in our Repository? A Pull Request? An Issue? Nothing? … Awareness of the Problem and Learnings 13
  9. Niklas Kiefer - Hour of Code Tech Talk - 12.11.2019

    Backup Slide Code Example Modeling.prototype.moveShape = function(shape, delta, newParent, newParentIndex, hints) { if (typeof newParentIndex === 'object') { hints = newParentIndex; newParentIndex = null; } var context = { shape: shape, delta: delta, newParent: newParent, newParentIndex: newParentIndex, hints: hints || {} }; this._commandStack.execute('shape.move', context); }; 16