Skip to content

Instantly share code, notes, and snippets.

View dearshrewdwit's full-sized avatar
🤖
17 is my number.

Edward Withers dearshrewdwit

🤖
17 is my number.
View GitHub Profile
@dearshrewdwit
dearshrewdwit / tasks-start.js
Created April 19, 2023 07:29
Starting point
// src/App.js
import { useState } from 'react' // state hook
import './App.css';
import Task from './components/Task'
const initialTasks = [
{ id: 1, text: 'Go shopping', completed: false },
{ id: 2, text: 'Work out', completed: false },
{ id: 3, text: 'See the doctor', completed: true }
]
@dearshrewdwit
dearshrewdwit / dev-process.md
Last active March 1, 2022 11:42
Development Process

Double the array!

You are going to be given an array of elements. Your job is to return an array which has duplicated each element

Examples:

[1,2] => [1, 1, 2, 2]
['a', 'b'] => ['a', 'a', 'b', 'b']

Orientation – MSE – June 28th 2021

Day 1

Morning
  • 9:15am – Say hi on the cohort discord channel, and then join the cohort zoom
  • 9:30amWelcome to MSE from your coach
  • 10:45am - break
  • 11amLife at DF from your coach
  • 12pm - Lunch!
@dearshrewdwit
dearshrewdwit / add-test-ouput.groovy
Created May 12, 2021 08:01
Add test output summary for gradle projects using `.gradlew test`
// add to the top of build.gradle
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
// add to the bottom of build.gradle
tasks.withType(Test) {
testLogging {
// set options for log level LIFECYCLE
events TestLogEvent.FAILED,
TestLogEvent.PASSED,
@dearshrewdwit
dearshrewdwit / secretDiary.js
Created March 8, 2021 12:13
Demo of secret diary encapsulation example
// using classes together
// lower cohesion
class SecretDiary {
constructor() {
this.entries = []
this.isLocked = true
}
lock() {
@dearshrewdwit
dearshrewdwit / mse-2103-a-welcome.md
Created February 25, 2021 18:17
Digital Futures Academy | mse-2103-a - Welcome

Succeeding at Digital Futures Academy

success (noun)

The achievement of one's aim or goal

The Academy is designed to help you prepare for success in the world. We have carefully crafted the learning environment to give you the best resources available to achieve your goals, but the responsibility is yours alone to take advantage of them. From the smallest living-room start-up to the most successful multinational, from community enterprises to the world's most impactful charities, throughout history people have taken responsibility to aim for a goal, bringing about the world they wanted to live in.

The goal-related skills you develop here will help you take control of your career and your life. The technical, communication, and learning skills you’ll improve on will give you the most powerful tools that presently exist for achieving those goals.

@dearshrewdwit
dearshrewdwit / mse-2103-a-orientation.md
Last active February 25, 2021 18:18
Digital Futures Academy | Orientation - mse-2103-a

Orientation – MSE – March 1st 2021

Day 1

Morning
  • 9:00am – Say hi on the cohort discord channel, and then join the cohort zoom
  • 9:30amWelcome to MSE from your coach
  • 10:45am - break
  • 11amLife at DF from your coach
  • 12pm - Lunch!
@dearshrewdwit
dearshrewdwit / intro-to-mse.md
Last active January 13, 2021 17:56
Digital Futures: Intro to MSE

Intro to Modern Software Engineering at Digital Futures

Agenda

  • 6:30pm - Intro
  • 6:45pm - Main
  • 7:45pm - Reflection
  • 8:00pm - Wrap-up

1. Intro

Fill out the quick survey as we wait for everyone to join and then there'll be a welcome to the session, then there'll be a short introduction to Digital Futures followed by small group introductions.

// using class component and lifecycle method to manage lifecycle event: ComponentDidMount
import React, { Component } from 'react'
class Headlines extends Component {
constructor(props) {
super(props)
this.state = { items: [] }
}
componentDidMount() {
// using class component to manage state
import React, { Component } from 'react'
class Counter extends Component {
constructor(props) {
super(props)
this.state = { counter: 0 }
}
addOne = () => {