Skip to content

Instantly share code, notes, and snippets.

View diogorb's full-sized avatar
🎯
Focusing

diogorb

🎯
Focusing
View GitHub Profile
@diogorb
diogorb / tdd-outside-in-mancuso-style.md
Created August 18, 2021 14:29 — forked from xpepper/tdd-outside-in-mancuso-style.md
Sandro Mancuso on Outside-In TDD

I'm putting here some of the things Sandro said in his 3-part session on Outside-In TDD (see the github repo here), and highlights some parts that are significant to me.

Sandro Mancuso on Outside-In TDD

TDD does not lead to a good design if you don't know what a good design looks like.

The way I code in this video is the way I normally code but not the way I normally teach.

Some of you will notice that I skip the traditional refactoring steps a few times and I do quite a lot of design up-front (or "just in time design" as I prefer to call it) without much feedback from my code.

@diogorb
diogorb / AdbCommands
Created August 13, 2021 18:51 — forked from ernestkamara/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
function getElementByXpath(path) {
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
@diogorb
diogorb / getelementbyxpath.js
Created October 2, 2020 18:13 — forked from tit/getelementbyxpath.js
Javascript => getElementByXPath
document.getElementByXPath = function(sValue) { var a = this.evaluate(sValue, this, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); if (a.snapshotLength > 0) { return a.snapshotItem(0); } };
document.getElementsByXPath = function(sValue){ var aResult = new Array();var a = this.evaluate(sValue, this, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);for ( var i = 0 ; i < a.snapshotLength ; i++ ){aResult.push(a.snapshotItem(i));}return aResult;};
document.removeElementsByXPath = function(sValue) { var a = this.evaluate(sValue, this, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for ( var i = 0 ; i < a.snapshotLength ; i++ ) { a.snapshotItem(i).parentNode.removeChild(a.snapshotItem(i)); } };