Showing posts from July, 2020

NestJS tutorials

NestJS is a react framework for building efficient, scalable, server-side applications. It also provides built in dependency injection out of the box, which I really like the sound of! I plan on learning about this framework and the ansillary frameworks, libraries and modules that surround it. I’m fairly new to front-end development, so I hope this will be useful to people in a similar position. Getting Started First up, read the NestJS intro and overview docs , which shows how to setup the dev environment, how to generate a hello world app, and some of the basics of how things fit together. I often come up with trivial problems to solve when having a go of new frameworks. In this case I wanted to eventually implement these rules: AskQuestion - what's for tea? - get strategy based on person asked - if mike, provide response based on day of the week - if mrs, randomise response between "beans on toast" and "scrambled eggs on toast" - i

Fun Retros - Crazy 8 + Impact Effort Map

This 60 minute session is designed to find problems that we might not collectively be aware of, gather ideas on how to solve them, prioritise those ideas, and ensure that they are enacted. [10 minutes] on the jamboard, ask the group to write post-its of problems that need to be solved. These post-its should follow the sentence structure how might we… e.g. How might we get customers to contact us when they have an issue with our product? , or How might we migrate more of our customers from our old system to the new one [4 minutes] ask them to dot vote the post-its with 2 or 3 votes each. Choose the top voted How might we.. question, or if there is no clear winner, ask the group to collectively choose one. [10 minutes] Crazy eight : ask the group to write one post-it every minute for 8 minutes with ideas on how to solve the chosen problem. Start a timer, and when each minute passes ask the group to move on to their next idea. [10 minutes] ask each participant to talk through the

next.js testing with jest

I stumbled upon the testing overview in the react docs, which says The default template of React Native ships with [Jest]( testing framework . Interesting. I’ll have a quick go of Jest just to see what’s what. Jest [about 30 minutes later…] Well… I wish I’d stumbled across this first, this was super easy! yarn add --dev jest in package.json: { "scripts" : { "test" : "jest" } } Create a ./tests/foo.spec.js file with the contents: test ( 'true is true' , ( ) => { expect ( true ) . toBe ( true ) ; } ) ; And run yarn test The nice thing about Jest, is that it: has fluent syntax so I don’t feel the need for chai, appears to have mocking functionality, but we’ll see later if that’s any good for TDD. This might mean we don’t need sinon. it clearly is a replacement for mocha, so we can swap that out Enzyme on the other hand might still add value if it makes testing components easier! We’ll

next.js testing frameworks

I figured the next step was to learn how to approach writing react components using TDD. I found this guide that recommends some libraries for assertions , spies , and also a testing framework and DOM simulator . Also a test runner … Ahhh so many to learn! Why so many libraries?!? This is one of the reasons I’ve previously been so detracted from starting to learn a front-end development framework, as the learning curve appears very steep. Spoiler alert, I don’t end up using most of these, so just read on. Let’s try and understand what each library is for and where it fits in. I’ve been a C# developer for a long time, so I’ll draw a parallel between the two ecosystems. Sinonjs Sinonjs is a spies, stubs and mocks framework. To draw a parallel; it’s pretty much how I’ve used AutoMocker on C# projects. Par examplĂ© : it ( 'needsLogin returns false when the user has been authenticated' , ( ) => { spy = spyOn ( service , 'isAuthenticated' ) . and

next.js tutorials

I figured I’d keep track of the resources I’ve consumed on my road to learning React with the nextjs framework. I’ve previously had a play with straight React, but I’m starting from practically zero so… let’s see how this goes! Next.js Tutorials First up, I took a look at , which seems to have pretty good documentation and tutorials . I just followed this tutorial through from start to finish one morning. This tutorial gives you plenty of code to copy and paste, but sometimes doesn’t give much explanation as to what each bit is doing. It’s worth spending some time actually reading the code you’re copy/pasting to understand what is going on. There are links for further reading for most sections, which are also worth a read. You can also read further into any given feature in the next.js docs . I also configured a CNAME record under my domain name Name : nextjs . portfolio Data : cname . vercel - dns . com . Resulting in

Clean Engineering

In the last couple of years or so, I’ve been getting more into researching clean code and quality engineering in general. I figured I’d keep track of the resources I’ve consumed, so that I can revisit them in the future. Youtube Video Watched Clean Code - Uncle Bob / Lesson 1 Yes Clean Code - Uncle Bob / Lesson 2 Yes Clean Code - Uncle Bob / Lesson 3 Yes Clean Code - Uncle Bob / Lesson 4 Yes Clean Code - Uncle Bob / Lesson 5 Yes Clean Code - Uncle Bob / Lesson 6 Yes DevTernity 2019: Ian Cooper – The Clean Architecture Yes Agility ≠ Speed - Kevlin Henney Yes GOTO 2016 - Small Is Beautiful - Kevlin Henney No The Forgotten Art of Structured Programming - Kevlin Henney [C++ on Sea 2019] No Books Book Owned? Read? Test Driven Development: By Example 1st Edition - Kent Beck Yes No Agile Principles, Patterns, and Practices in C# 1st Edition - Robert C. Martin Yes Reading Clean Architecture: A Craftsman’s Guide to Sof

Fun Retros - Liberating Structures - Wicked Questions

Articulate the Paradoxical Challenges That a Group Must Confront to Succeed (25 min.) The aim is to find one or more paradoxical questions in roughly the form of “How is it that we are ____ and we are ____ simultaneously?”. (put this template at the top of your jamboard) It’s important that both sides of the question are appreciative, otherwise this exercise can quickly turn into finger pointing. Once we’ve found some wicked questions, we’re not actually aiming to solve them. A really good wicked question just represents an undeniable reality. An example to help explain it, without anchoring thought processes: “How is it that we are raising our children to be very loyal and attached to the family and also independent individuals?” [5 mins] on the jamboard, add post-its of positive traits of the team. [5 mins] go through each post-it, see if there is already an appreciative opposite or paradox elsewhere on the board. If not can you think of one? [10 mins] pick out the most

Fun Retros - Liberating Structures - Min Specs

Specify Only the Absolute “Must dos” and “Must not dos” for Achieving a Purpose (35-50 min.) [10 mins] On the jamboard, put everything that you strive to do on a yellow post-it. And everything you try to avoid doing (bad practices, or processes) in orange. xp practices agile practises coding practises whatever you can think of [10 mins] Now imagine you’re a consultant, going into a business and trying to encourage the adoption of these practices. Your time is finite, so between yourselves choose 5 do, and 5 do-not cards that you absolute can not do without. [5 mins] All of these tickets should be important to you. So instead of dot-voting, you have $100 budget. Allocate your $100 among the tickets.