Skip to content

Instantly share code, notes, and snippets.

@jdittrich
jdittrich / Tricks of the Trade Becker.md
Last active April 28, 2018 14:52
Summary of "Tricks of the Trade" Howard S. Becker
  • 9 this is not an ordered or orderly process
  • 20ff assume how things would be if totally randomly assigned, then show how they are not
  • 24 unlike possibilities are important to consider
  • 27 gradual steps lead to "crazy results" e.g. gender change is not sudden but the result of many steps
  • 39 think of a machine that would produce the results you observe – how does it need to be built?
  • 44 think of activities rather than people
  • 56 don't control local variations and peculiar things – built them in your analysis
  • 58 ask "how" rather than "why". It will lead to richer data and less to justification
  • 86 carefully consider which data you want to collect – don't just do it ritualistically
  • 87 "it could have been otherwise" – find cases that change your thinking

Law, John. 2004. After Method: Mess in Social Science Research. London ; New York: Routledge.

page/comment

3 is "knowing" the metaphor we need?

4 standard research methods are not generally wrong

5 to have rules seems natural

@jdittrich
jdittrich / Bruno Latour – Eine Neue Soziologie für eine Neue Gesellschaft
Last active March 5, 2018 12:25
Bruno Latour "Eine Neue Soziologie für eine Neue Gesellschaft" – Themenzusammenfassung und Seitenangaben
# THEMEN
## ANT und lokal/global
* 95,105 ANT ist nicht lokaler oder weniger Abstrakt als andere Soziologische Theorien (auch: 392, 352)
* Akteur/Netzwerk entspricht Lokales/verbundenes
* 315 Abstraktes soll werden zu: "Wo", "Wann", "Womit"
* 352 Nichts ist nur lokal oder nur global
* 392 Globales und Lokales existieren gleichzeitig, nicht entweder oder
* 407 Je mehr verknüpfungen, desto besser
@jdittrich
jdittrich / gist:3f589ab7d2cd360bb31ae97f990d9371
Created January 9, 2018 22:23
marks for improving english text
var s = document.createElement("script");
s.type = "text/javascript";
s.src = "https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.0/mark.js";
$("head").append(s);
var markinstance = new Mark(document.querySelectorAll("p,ul,li,quote, cite"));//all common elements pandoc puts out.
markinstance.markRegExp(/(\.|;|—|\:)/gim, {className:"strongHighlight"}); //sentence lenght
markinstance.markRegExp(/(was |will |do |is |of )/gim); //simple passive verbs
markinstance.markRegExp(/( is that)/gim); //no "is that"
@jdittrich
jdittrich / jsonToCsv.js
Last active August 25, 2017 08:48
JSON to CSV
//Data for testing it
var dataobject = {
rows:[
{Preis:"100",Geraet:"Android Phone"},
{Preis:"600",Geraet:"iPad"},
{Preis:"1000",Geraet:"Thinkpad"}
]
};
//get all column names. Use the first object in rows for that.
@jdittrich
jdittrich / treecreator.py
Last active June 18, 2017 10:25
creates a tree. Each item (the things with "name") can be in multiple paths. Imagine it like a tree for a media collection with nested tags – every photo can have multiple (nested) tags
'''
The function call behaviour seems to be identical to the javascript version; I could not find any differences
However, the resulting tree is not identical, the javascript version "reuses" the paths,
whereas the python one seems to create a new path on every occasion.
'''
#following adapted from https://stackoverflow.com/a/44185784/263398 and ported to Python
from functools import reduce
@jdittrich
jdittrich / treecreator.js
Created June 18, 2017 10:11
Create Tree, JS version
//following adapted from https://stackoverflow.com/a/44185784/263398
var data2 = [{
name: "Children C1",
paths: [["A", "B", "C"],["A", "B"]]
}, {
name: "Children C2",
paths: [["A", "B", "C"]]
}, {
name: "Children C3",
paths: [["A", "B", "C"]]
@jdittrich
jdittrich / TrumpRmutt
Last active January 30, 2017 17:51
install npm install -g rmutt, run rmutt thistextinafi.le
Output: Sentence "\n";
Sentence: SentenceIamGreat, SentenceBlaming, SentenceProduct, AdviceStupid, SentenceMake;
SentenceIamGreat: "It is a " HowItIs " "Thing ". " ParticleAfterMe;
AdviceStupid: "They say: " Advice "." ("I mean, like " areLike " programmers do?!",ParticleAfterOthers);
SentenceBlaming: (mainAntagonist=Antagonist) ParticleBefore ": The " mainAntagonist "is " evil (".","!"{1,6}) ParticleAfterMe;
@jdittrich
jdittrich / grep hashtags to clipboard
Last active December 8, 2016 08:36
grep hashtags to clipboard. Needs xclip installed
xclip -out | grep '#\w\+' -o | xclip -selection clipboard
<!doctype html>
<html lang="us">
<head>
<!--
needs jquery.js, jqueryUI.js, jquerUI.css
and an image showing the revision slider bars like http://imgur.com/e7LNEDA
-->
<meta charset="utf-8">
<title>Slider Prototype</title>
<link href="jquery-ui.css" rel="stylesheet">