SlideShare a Scribd company logo
1 of 70
Download to read offline
@stadolf @coding_earth
Hack it like it’s hot 😅
a 1 year hackathon wrap up
2
Stefan Adolf
Developer Ambassador
#javascript #mongodb #serverless
#blockchain #codingberlin #elastic
#aws #php #symfony #react
#digitalization #agile #b2b #marketplaces
#spryker #php #k8s #largescale
#turbinejetzt #iot #ux #vuejs
@stadolf
elmariachi111
@stadolf @coding_earth
Hackathons. They’re all the same.
1. You pitch an idea
2. you find friendly team mates
3. you hack 40 hours
4. you present what you’ve done.
5. you do a team selfie
@stadolf @coding_earth
Buy By ID
Self sovereign identity meets eCommerce
T-Labs Blockchain Group - “Decentralizing the Enterprise” - Jan 2019
@stadolf @coding_earth
Challenge: Self Sovereign Identity
•authenticate / SSO by using an
identity under your control
•enabled by self signed DID
documents on Ethereum
•support verifiable claims
• “my government claims that
I’m Stefan and over 21”
1. You pitch an idea
@stadolf @coding_earth
Buy By ID: Idea
•add a “login with your identity” button to an headless shop system
•integrate with Vue Storefront (headless adapter for Magento e.a.)
•use Jolocom’s Smart Wallet for claim exchange
2. you find friendly team mates
3. you hack 24 hours
@stadolf @coding_earth
Tools / APIs
•Jolocom: Typescript
•Vue Storefront: ECMAScript / Vue
•node / express, Redis & socket.io
@stadolf @coding_earth
Brainkillers / pitfalls
•Both projects rely on Redis (VSF: cache, Jolocom: wallet storage)
•Jolo’s samples rely on socket.io to detect phone activities (QR scanned)
•socket.io can’t be bound to express apps (only to a http.Server inst)
• socket.io relies on https
•had to activate body parser on VSF
•conflicting build setup (Jolocom / VSF) - had to align start scripts / ts-node
•asynchronous calls conflicts with express route wiring
@stadolf @coding_earth
bind Jolocom backend to VSF
const { getAsync, setAsync, delAsync } = configureRedisClient()
const registry = JolocomLib.registries.jolocom.create()
const vaultedKeyProvider = new JolocomLib.KeyProvider(seed, password)
module.exports = async (expressApp: Express, server: http.Server) => {
const identityWallet = await registry.authenticate(vaultedKeyProvider, {derivationPath:
JolocomLib.KeyTypes.jolocomIdentityKey, encryptionPass: password})
configureRoutes(expressApp, {setAsync, getAsync, delAsync}, identityWallet, password)
configureSockets(server, identityWallet, password, new DbWatcher(getAsync), {getAsync, setAsync, delAsync})
return identityWallet
}
const configureRoutes = (app: Express, redisApi: RedisApi, iw: IdentityWallet, password: string) => {
/**
* An authentication endpoint route for deep linking for demo-sso-mobile;
*/
app.get('/mobile/credentialRequest', async (req, res, next) => {
…
@stadolf @coding_earth
listen to smart wallet events in Vue
continueWithJolo () {


const randomId = randomString(8);
this.getQrCode(randomId).then(image => {
this.$bus.$emit('modal-show', 'modal-jolo-user', null, 

{image: image})
this.awaitUserData(randomId).then(data => {
const parsed = JSON.parse(data)
const userData = parsed.data
this.personalDetails = {
firstName: userData.givenName,
lastName: userData.familyName,
}
this.$bus.$emit('modal-hide', 'modal-jolo-user')
this.sendDataToCheckout()
})
}).catch(err => {
console.log(err)
})
},
awaitUserData(randomId: string): Promise<string> {
const socket = io(`/sso-status`, {
query: { userId: randomId }
})
return new Promise<string>(resolve => {
socket.on(randomId, (data: string) => resolve(data))
})
}
/* server: http.Server */
const baseSocket = io(server).origins('*:*')


baseSocket.of('/sso-status').on('connection', async socket => {
const { userId } = socket.handshake.query
console.log(`sockets.ts: waiting until ${userId} logs in`)
dbWatcher.addSubscription(userId)
dbWatcher.on(userId, async () => {
const userData = await getAsync(userId)
await delAsync(userId)
socket.emit(userId, userData)
})
})
getQrCode (randomId: string) {
const socket = io('/qr-code', {query: { userId: randomId } })
return new Promise<string>(resolve => {
socket.on(randomId, (qrCode: string) => resolve(qrCode))
})
},
Wait for auth Redis
Checkout form
4. you present what you’ve done.
@stadolf @coding_earth
Demo
5. you do a team selfie
@stadolf @coding_earth
💡team building
•find your team ahead of the event if possible
•be very careful of people who
• consider themselves “very senior” (they’re not pragmatic)
• are “designers” without knowing CSS (“Photoshoppers”)
• talk about everything but the hackathon (just want to hire you)
•first thing you do: agree on a messenger protocol (Slack) / channel
@stadolf @coding_earth
Tech Tinder
Customize your Tech radar
Schwarz Group - “CodeCamp Heilbronn” - Nov 2018
@stadolf @coding_earth
Challenge
•“Schwarz group”: 2nd largest grocery / supermarket in Germany / LIDL
• ~500 developers over the world
• no one knows all requirements
•Build a tool that helps their dev teams to keep track of their tech stack
1. You pitch an idea
@stadolf @coding_earth
Idea: Tech-Tinder
•a tech radar controlled by employees
•everyone can add new technologies
•vote on technologies using a “tinder” interface
2. you find friendly team mates
3. you hack 36 hours
@stadolf @coding_earth
Tools / APIs
•Backend: MongoDB Atlas / Stitch (FaaS)
•Frontend: Vue.js / Bueify
•integrate “swing” swiping library (vue-swing2)
•copy / paste and adjust Zalando’s TechRadar project
@stadolf @coding_earth
stitch FaaS editor
@stadolf @coding_earth
technology_aggregate.js (stitch)
exports = function(technologyId){
const colTech = context.services.get("mongodb-atlas").db("tech-
tinder").collection("technology");
const colVotes = context.services.get("mongodb-atlas").db("tech-
tinder").collection("votes");
const aggregationPipeline = [
{"$group": {
"_id": { tech: "$ref", opinion: "$op" },
"total": { "$sum": 1 }
}
},
{"$group": {
"_id": "$_id.tech",
"count": {"$sum": "$total"},
"stats": {
"$push": {
op: "$_id.opinion",
total: "$total"
}
}
}
}
];
var pipeline;
if (technologyId) {
pipeline = [{$match:{ref: BSON.ObjectId(technologyId)} }]
.concat(aggregationPipeline);
} else {
pipeline = aggregationPipeline;
}
return new Promise( (resolve, reject) => {
//let technology = colTech.findOne({_id: techId});
colVotes.aggregate(pipeline).toArray().then(ag => {
const techIds = ag.map(agg => agg._id); //stitch doesnt
support $lookup
colTech.find({_id: {"$in":
techIds} }).toArray().then(technologies => {
const combined = ag.map(agg => {
let base = technologies.filter(tt => {
return tt._id.toString() == agg._id.toString();
})[0];
if (!base) {
return null;
}
base.votes = {
total: agg.count,
results: {}
};
agg.stats.forEach(s => base.votes.results[s.op] =
s.total );
return base;
});
resolve(combined.filter(c => c != null));
});
});
});
};
@stadolf @coding_earth
vote.js (“tinder”)
<div class="container" v-if="technologies.length > 0">
<span class="tag is-info is-large tag-hint tag-top" :style="{ opacity: opacity.top }">interested</span>
<span class="tag is-info is-large tag-hint tag-left" :style="{ opacity: opacity.left }">discouraged</span>
<span class="tag is-info is-large tag-hint tag-right" :style="{ opacity: opacity.right }">using</span>
<span class="tag is-info is-large tag-hint tag-bottom" :style="{ opacity: opacity.bottom }">evaluating</span>
<div class="card-viewport">
<div class="card-stack">
<vue-swing
v-for="technology in technologies"
:key="technology._id"
:config="cardConfig"
@throwout="throwout"
@throwin="throwin"
>
<div class="card card-item" :data-key="technology._id" >
<div class="card-image">
<figure class="image">
<h1 class="title is-3">{{ technology.name }}</h1>
</figure>
</div>
<div class="card-content">
<p class="is-5" v-html="technology.description"/>
</div>
</div>
</vue-swing>
</div>
</div>
</div>
4. you present what you’ve done.
@stadolf @coding_earth
Demo
5. you do a team selfie
@stadolf @coding_earth
👍 hackers’ rules of thumb
•you can’t learn a new language during a hackathon
•use as much SaaS and PaaS services as possible
• Contentful, Heroku, AWS Lambda / RDS, Firebase, now.sh, netlify
•never do “microservices”
•use DX-friendly frontend tech stacks
• vue-cli, create-react-app, Gatsby, ionic
•don’t to TDD!
@stadolf @coding_earth
Green Fee
let drivers pay for their air pollution in real time
“Blockchain Hackathon Stuttgart 2” - Feb 2019
@stadolf @coding_earth
Challenge
•sponsored by huge German banks, Daimler, blockchain agencies
•improve “mobility” with ledger tech
• other challenges were “Industry 4.0 / IoT”, “Finance”
•they expect a “business” presentation 🙄
1. You pitch an idea
@stadolf @coding_earth
Idea: Green Fee
•track vehicles’ motion
•track environmental conditions (current air pollution ratio)
•price = constant * (your pollution / environmental pollution)
•track your pollution cost in “real time”
•compensate “the planet” in near realtime
2. you find friendly team mates
3. you hack 40 hours
@stadolf @coding_earth
Tools / APIs
•IOTA MAM (Masked Authenticated Messaging)
• write pollution costs onto an IOTA DAG ledger MAM
• every message contains an due amount of IOTA
• asnychronous process polls MAM stream and triggers payments
•open air pollution data service
• public.opendatasoft.com
•Leaflet / OSM / plain jQuery, Webpack Encore for fast asset building
•expressjs as backend
@stadolf @coding_earth
– The official IOTA project
It is possible to publish transactions to the Tangle that contain only messages, with no value. This
introduces many possibilities for data integrity and communication, but comes with the caveat that
message-only signatures are not checked. What we introduce is a method of symmetric-key
encrypted, signed data that takes advantage of merkle-tree winternitz signatures for extended
public key usability, that can be found trivially by those who know to look for it.
@stadolf @coding_earth
– Alexey Sobolev, Oct 2017
“The ID published to the tangle is the hash
of the hash of the message key seed.”
🤔
@stadolf @coding_earth
publish.js
const Mam = require('@iota/mam/lib/mam.client.js')
const { asciiToTrytes } = require('@iota/converter')
const fs = require("fs");
const mamState = Mam.init(config.provider, config.seed);
const lastState = fs.existsSync(LAST_STATE_FILENAME) ? fs.readFileSync(LAST_STATE_FILENAME).toString() : null;
if (lastState) {
mamState.channel = JSON.parse(lastState);
}
app.post('/msg', async function (req, response) {
var t = new Date()
const payload = {
d: t.toLocaleDateString() + " " + t.toLocaleTimeString(),
data: req.body
};
const trytes = asciiToTrytes(JSON.stringify(payload))
const message = Mam.create(mamState, trytes)
await Mam.attach(message.payload, message.address, 3, 9)
if (!mamState.channel.currentRoot) {
mamState.channel.currentRoot = message.root;
}
mamState.channel.lastRoot = message.root
fs.writeFileSync(LAST_STATE_FILENAME, JSON.stringify(mamState.channel))
response.json(mamState)
})
4. you present what you’ve done.
@stadolf @coding_earth
Demo
5. you do a team selfie
@stadolf @coding_earth
💡ideation
•if there are “sponsors”, select 1 with an API you can relate with
•don’t put all the sponsors’ APIs in one app
•do a design thinking session
• plan your idea for 2-3 hours!
•remove everything that’s not absolutely necessary
•do a “good looking” UI that’s responsive and usable on mobile
• vuetify, MUI, ionic, Bueify, Reactstrap
@stadolf @coding_earth
Blockstagram
Instagram on the blockchain
“Blockstack Hackathon Berlin” - Mar 2018
@stadolf @coding_earth
Challenge
•build something meaningful with “Blockstack”
•self sovereign “blockstack.id": a socially / stake backed identity (BTC)
•use their “Gaia” hub: file storage decentralization concept (~IPFS / Storj)
• P2P synced decentralized storage. 

Bring your own cloud or trust Blockstack
1. You pitch an idea
@stadolf @coding_earth
Idea: Blockstagram
•“Instagram” on Blockstack
•Upload your pictures to Gaia hub (controlled by you)
•acknowledge “friend” identities for read access
•provide a symmetric key for them to decrypt your images
•to unfriend (hide) someone, reencrypt all the images with a new key
2. you find friendly team mates
3. you hack 36 hours
@stadolf @coding_earth
Tools / APIs
•Blockstack
• Identity & Gaia Hub
•ReactJS / CRA (ejected)
•Netlify deployment
@stadolf @coding_earth
read your friend’s instagram data
async readSingleSubscribersImages(username) {
const indexData = await blockstack.getFile('index.json', {
username: username,
decrypt: false
})
const data = JSON.parse(indexData);
console.log('Subscribers indexData is', indexData);
data.images.forEach(async indexEntry => {
if (!this.subscriberImageLoaded({ ...indexEntry, username })) {
const imageData = await blockstack.getFile(indexEntry.path, { username,
decrypt: false })
this.updateFeed({ path: indexEntry.path, username: username, image:
imageData, created: indexEntry.created });
}
})
}
4. you present what you’ve done.
@stadolf @coding_earth
Demo
5. you do a team selfie
@stadolf @coding_earth
💡task distribution
•is very hard since you don’t know / trust each other
•one (experienced) guy must control the repo
• everyone must commit to the same repo!
•mock it till you make it
• https://www.mockbin.org
• use postman shared collections
•“I’m done, what can I do next?” -> “I’m done. I’d like to add xyz”
@stadolf @coding_earth
Survival Guides
Bonus
@stadolf @coding_earth
2pm: the idea wasteland
•talk to others and listen closely
•you may steal and reiterate their ideas!
• Most likely you’ll build sth else anyway!
•google the APIs and find related Stackoverflow questions
•try to come up with a real problem that you personally could have
😩
@stadolf @coding_earth
8pm: the desperation zone
•you will not get done anything until 8pm. That’s normal!
•Pair! Sitting next to each other always helps.
•look at the other teams. You’ll note that they’re also struggling *very* hard
•don’t argue or overthink! Do!
• you usually will never look back at the code!
•if you want to win: get rid of people who disturb the team. (Just ignore them)
•if you want to learn / earn karma points: discuss it out with them
🤯
@stadolf @coding_earth
4am: the blue hour of devastation
•things will start to work when you’re most desperate and expect it least
•stay awake!
• Fresh air, do a break every 10m if necessary. But stay on it!
• Bananas and cold pizza work better than coffee and Red Bull.
•tiredness goes away around ~8am (and punches you out by 1pm)
•do some simple tasks (e.g. frontend polish) for success feelings
☠
@stadolf @coding_earth
10am: prepare your presentation
•select one dedicated presentation guy
•usually your presentation will win the game, not your code
•build a story
• “my friend Dyrk called me yesterday and we’re solving his problem here”
•fake the demo if necessary but make it run!
•have 1 WOW effect
•skip “market research”, “business model” and “rollout strategy”
💁
@stadolf @coding_earth
too long, didn’t listen.
•Hackathons are for pragmatic developers, not clean coders
•solve as much as possible on the frontend (learn React or Vue & node!)
•it’s really a “thon”: you need to suffer to take away the grand prize
•it’s incredibly rewarding when your demo starts working at 4am
•the more tools and services you use, the better.
•people will remember you. Everything happens for a reason.
•never give up, never surrender.
6. not winning makes you weirder!
@stadolf @coding_earth
That’s all, folks
Stefan Adolf

https://www.facebook.com/stadolf

https://twitter.com/stadolf

https://github.com/elmariachi111

https://www.linkedin.com/in/stadolf/

More Related Content

Similar to Hack it like its hot!

Expanding APIs beyond the Web
Expanding APIs beyond the WebExpanding APIs beyond the Web
Expanding APIs beyond the WebTim Messerschmidt
 
Testing API platform with Behat BDD tests
Testing API platform with Behat BDD testsTesting API platform with Behat BDD tests
Testing API platform with Behat BDD testsStefan Adolf
 
Automated malware analysis
Automated malware analysisAutomated malware analysis
Automated malware analysisIbrahim Baliç
 
Flare - tech-intro-for-paris-hackathon
Flare - tech-intro-for-paris-hackathonFlare - tech-intro-for-paris-hackathon
Flare - tech-intro-for-paris-hackathonCisco DevNet
 
IstSec'14 - İbrahim BALİÇ - Automated Malware Analysis
IstSec'14 - İbrahim BALİÇ -  Automated Malware AnalysisIstSec'14 - İbrahim BALİÇ -  Automated Malware Analysis
IstSec'14 - İbrahim BALİÇ - Automated Malware AnalysisBGA Cyber Security
 
Scaffold your dApp with ink!athon
Scaffold your dApp with ink!athonScaffold your dApp with ink!athon
Scaffold your dApp with ink!athonNeven6
 
BigchainDB: Blockchains for Artificial Intelligence by Trent McConaghy
BigchainDB: Blockchains for Artificial Intelligence by Trent McConaghyBigchainDB: Blockchains for Artificial Intelligence by Trent McConaghy
BigchainDB: Blockchains for Artificial Intelligence by Trent McConaghyBigchainDB
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsLewis Ardern
 
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...KAI CHU CHUNG
 
A tech writer, a map, and an app
A tech writer, a map, and an appA tech writer, a map, and an app
A tech writer, a map, and an appSarah Maddox
 
Playing with parse.com
Playing with parse.comPlaying with parse.com
Playing with parse.comJUG Genova
 
Encode x Tezos: Building a dApp on Tezos
Encode x Tezos: Building a dApp on TezosEncode x Tezos: Building a dApp on Tezos
Encode x Tezos: Building a dApp on TezosKlaraOrban
 
Building a dApp on Tezos
Building a dApp on TezosBuilding a dApp on Tezos
Building a dApp on TezosTinaBregovi
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumTechday7
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titaniumNaga Harish M
 
Building AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptBuilding AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptFITC
 
Algorand Educate: Intro to Algorand
Algorand Educate: Intro to AlgorandAlgorand Educate: Intro to Algorand
Algorand Educate: Intro to AlgorandTinaBregovi
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularTodd Anglin
 
Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)ClubHack
 

Similar to Hack it like its hot! (20)

Expanding APIs beyond the Web
Expanding APIs beyond the WebExpanding APIs beyond the Web
Expanding APIs beyond the Web
 
Testing API platform with Behat BDD tests
Testing API platform with Behat BDD testsTesting API platform with Behat BDD tests
Testing API platform with Behat BDD tests
 
Automated malware analysis
Automated malware analysisAutomated malware analysis
Automated malware analysis
 
Flare - tech-intro-for-paris-hackathon
Flare - tech-intro-for-paris-hackathonFlare - tech-intro-for-paris-hackathon
Flare - tech-intro-for-paris-hackathon
 
IstSec'14 - İbrahim BALİÇ - Automated Malware Analysis
IstSec'14 - İbrahim BALİÇ -  Automated Malware AnalysisIstSec'14 - İbrahim BALİÇ -  Automated Malware Analysis
IstSec'14 - İbrahim BALİÇ - Automated Malware Analysis
 
Scaffold your dApp with ink!athon
Scaffold your dApp with ink!athonScaffold your dApp with ink!athon
Scaffold your dApp with ink!athon
 
BigchainDB: Blockchains for Artificial Intelligence by Trent McConaghy
BigchainDB: Blockchains for Artificial Intelligence by Trent McConaghyBigchainDB: Blockchains for Artificial Intelligence by Trent McConaghy
BigchainDB: Blockchains for Artificial Intelligence by Trent McConaghy
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript Applications
 
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...Dev fest 2020 taiwan   how to debug microservices on kubernetes as a pros (ht...
Dev fest 2020 taiwan how to debug microservices on kubernetes as a pros (ht...
 
A tech writer, a map, and an app
A tech writer, a map, and an appA tech writer, a map, and an app
A tech writer, a map, and an app
 
Playing with parse.com
Playing with parse.comPlaying with parse.com
Playing with parse.com
 
Encode x Tezos: Building a dApp on Tezos
Encode x Tezos: Building a dApp on TezosEncode x Tezos: Building a dApp on Tezos
Encode x Tezos: Building a dApp on Tezos
 
Building a dApp on Tezos
Building a dApp on TezosBuilding a dApp on Tezos
Building a dApp on Tezos
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
Building AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptBuilding AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScript
 
Demystifying Apple 'Pie' & TouchID
Demystifying Apple 'Pie' & TouchIDDemystifying Apple 'Pie' & TouchID
Demystifying Apple 'Pie' & TouchID
 
Algorand Educate: Intro to Algorand
Algorand Educate: Intro to AlgorandAlgorand Educate: Intro to Algorand
Algorand Educate: Intro to Algorand
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
 
Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)
 

More from Stefan Adolf

Blockchains - Technical foundations
Blockchains - Technical foundationsBlockchains - Technical foundations
Blockchains - Technical foundationsStefan Adolf
 
HOW TO SURVIVE A 2DAY HACKATHON?
HOW TO SURVIVE A 2DAY HACKATHON?HOW TO SURVIVE A 2DAY HACKATHON?
HOW TO SURVIVE A 2DAY HACKATHON?Stefan Adolf
 
Digitale Selbstbestimmung mit Hilfe dezentraler Technologien
Digitale Selbstbestimmung mit Hilfe dezentraler TechnologienDigitale Selbstbestimmung mit Hilfe dezentraler Technologien
Digitale Selbstbestimmung mit Hilfe dezentraler TechnologienStefan Adolf
 
Digitale Selbstbestimmung | Anwendungsfälle der Dezentralität
Digitale Selbstbestimmung | Anwendungsfälle der DezentralitätDigitale Selbstbestimmung | Anwendungsfälle der Dezentralität
Digitale Selbstbestimmung | Anwendungsfälle der DezentralitätStefan Adolf
 
Decentralized technology: a (short) survey
Decentralized technology: a (short) surveyDecentralized technology: a (short) survey
Decentralized technology: a (short) surveyStefan Adolf
 
Productive web applications that run only on the frontend
Productive web applications that run only on the frontendProductive web applications that run only on the frontend
Productive web applications that run only on the frontendStefan Adolf
 
DePA - die dezentrale Patientenakte (29.1. FU Berlin)
DePA - die dezentrale Patientenakte (29.1. FU Berlin)DePA - die dezentrale Patientenakte (29.1. FU Berlin)
DePA - die dezentrale Patientenakte (29.1. FU Berlin)Stefan Adolf
 
DePA - die dezentrale Patientenakte
DePA - die dezentrale PatientenakteDePA - die dezentrale Patientenakte
DePA - die dezentrale PatientenakteStefan Adolf
 
Was ist eine Datenbank - und was hat Blockchain damit zu tun?
Was ist eine Datenbank - und was hat Blockchain damit zu tun?Was ist eine Datenbank - und was hat Blockchain damit zu tun?
Was ist eine Datenbank - und was hat Blockchain damit zu tun?Stefan Adolf
 
Never Code Alone: Von Symfony Forms zu einer SPA auf APIs
Never Code Alone: Von Symfony Forms zu einer SPA auf APIsNever Code Alone: Von Symfony Forms zu einer SPA auf APIs
Never Code Alone: Von Symfony Forms zu einer SPA auf APIsStefan Adolf
 
Decentralize all the things
Decentralize all the thingsDecentralize all the things
Decentralize all the thingsStefan Adolf
 
Indexing Decentralized Data with Ethereum, IPFS & The Graph
Indexing Decentralized Data with Ethereum, IPFS & The GraphIndexing Decentralized Data with Ethereum, IPFS & The Graph
Indexing Decentralized Data with Ethereum, IPFS & The GraphStefan Adolf
 
Gatsby (Code.Talks) 2019
Gatsby (Code.Talks) 2019Gatsby (Code.Talks) 2019
Gatsby (Code.Talks) 2019Stefan Adolf
 
A micro service story
 A micro service story A micro service story
A micro service storyStefan Adolf
 
Api Platform: the ultimate API Platform
Api Platform: the ultimate API PlatformApi Platform: the ultimate API Platform
Api Platform: the ultimate API PlatformStefan Adolf
 
Pump up the JAM with Gatsby (2019)
Pump up the JAM with Gatsby (2019)Pump up the JAM with Gatsby (2019)
Pump up the JAM with Gatsby (2019)Stefan Adolf
 
api-platform: the ultimate API platform
api-platform: the ultimate API platformapi-platform: the ultimate API platform
api-platform: the ultimate API platformStefan Adolf
 
Webpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usWebpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usStefan Adolf
 
(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of usStefan Adolf
 
Pump up the JAM with Gatsby
Pump up the JAM with GatsbyPump up the JAM with Gatsby
Pump up the JAM with GatsbyStefan Adolf
 

More from Stefan Adolf (20)

Blockchains - Technical foundations
Blockchains - Technical foundationsBlockchains - Technical foundations
Blockchains - Technical foundations
 
HOW TO SURVIVE A 2DAY HACKATHON?
HOW TO SURVIVE A 2DAY HACKATHON?HOW TO SURVIVE A 2DAY HACKATHON?
HOW TO SURVIVE A 2DAY HACKATHON?
 
Digitale Selbstbestimmung mit Hilfe dezentraler Technologien
Digitale Selbstbestimmung mit Hilfe dezentraler TechnologienDigitale Selbstbestimmung mit Hilfe dezentraler Technologien
Digitale Selbstbestimmung mit Hilfe dezentraler Technologien
 
Digitale Selbstbestimmung | Anwendungsfälle der Dezentralität
Digitale Selbstbestimmung | Anwendungsfälle der DezentralitätDigitale Selbstbestimmung | Anwendungsfälle der Dezentralität
Digitale Selbstbestimmung | Anwendungsfälle der Dezentralität
 
Decentralized technology: a (short) survey
Decentralized technology: a (short) surveyDecentralized technology: a (short) survey
Decentralized technology: a (short) survey
 
Productive web applications that run only on the frontend
Productive web applications that run only on the frontendProductive web applications that run only on the frontend
Productive web applications that run only on the frontend
 
DePA - die dezentrale Patientenakte (29.1. FU Berlin)
DePA - die dezentrale Patientenakte (29.1. FU Berlin)DePA - die dezentrale Patientenakte (29.1. FU Berlin)
DePA - die dezentrale Patientenakte (29.1. FU Berlin)
 
DePA - die dezentrale Patientenakte
DePA - die dezentrale PatientenakteDePA - die dezentrale Patientenakte
DePA - die dezentrale Patientenakte
 
Was ist eine Datenbank - und was hat Blockchain damit zu tun?
Was ist eine Datenbank - und was hat Blockchain damit zu tun?Was ist eine Datenbank - und was hat Blockchain damit zu tun?
Was ist eine Datenbank - und was hat Blockchain damit zu tun?
 
Never Code Alone: Von Symfony Forms zu einer SPA auf APIs
Never Code Alone: Von Symfony Forms zu einer SPA auf APIsNever Code Alone: Von Symfony Forms zu einer SPA auf APIs
Never Code Alone: Von Symfony Forms zu einer SPA auf APIs
 
Decentralize all the things
Decentralize all the thingsDecentralize all the things
Decentralize all the things
 
Indexing Decentralized Data with Ethereum, IPFS & The Graph
Indexing Decentralized Data with Ethereum, IPFS & The GraphIndexing Decentralized Data with Ethereum, IPFS & The Graph
Indexing Decentralized Data with Ethereum, IPFS & The Graph
 
Gatsby (Code.Talks) 2019
Gatsby (Code.Talks) 2019Gatsby (Code.Talks) 2019
Gatsby (Code.Talks) 2019
 
A micro service story
 A micro service story A micro service story
A micro service story
 
Api Platform: the ultimate API Platform
Api Platform: the ultimate API PlatformApi Platform: the ultimate API Platform
Api Platform: the ultimate API Platform
 
Pump up the JAM with Gatsby (2019)
Pump up the JAM with Gatsby (2019)Pump up the JAM with Gatsby (2019)
Pump up the JAM with Gatsby (2019)
 
api-platform: the ultimate API platform
api-platform: the ultimate API platformapi-platform: the ultimate API platform
api-platform: the ultimate API platform
 
Webpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usWebpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of us
 
(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us
 
Pump up the JAM with Gatsby
Pump up the JAM with GatsbyPump up the JAM with Gatsby
Pump up the JAM with Gatsby
 

Recently uploaded

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

Hack it like its hot!

  • 1. @stadolf @coding_earth Hack it like it’s hot 😅 a 1 year hackathon wrap up
  • 2. 2 Stefan Adolf Developer Ambassador #javascript #mongodb #serverless #blockchain #codingberlin #elastic #aws #php #symfony #react #digitalization #agile #b2b #marketplaces #spryker #php #k8s #largescale #turbinejetzt #iot #ux #vuejs @stadolf elmariachi111
  • 4. 1. You pitch an idea
  • 5. 2. you find friendly team mates
  • 6. 3. you hack 40 hours
  • 7. 4. you present what you’ve done.
  • 8. 5. you do a team selfie
  • 9. @stadolf @coding_earth Buy By ID Self sovereign identity meets eCommerce T-Labs Blockchain Group - “Decentralizing the Enterprise” - Jan 2019
  • 10. @stadolf @coding_earth Challenge: Self Sovereign Identity •authenticate / SSO by using an identity under your control •enabled by self signed DID documents on Ethereum •support verifiable claims • “my government claims that I’m Stefan and over 21”
  • 11. 1. You pitch an idea
  • 12. @stadolf @coding_earth Buy By ID: Idea •add a “login with your identity” button to an headless shop system •integrate with Vue Storefront (headless adapter for Magento e.a.) •use Jolocom’s Smart Wallet for claim exchange
  • 13. 2. you find friendly team mates
  • 14. 3. you hack 24 hours
  • 15. @stadolf @coding_earth Tools / APIs •Jolocom: Typescript •Vue Storefront: ECMAScript / Vue •node / express, Redis & socket.io
  • 16. @stadolf @coding_earth Brainkillers / pitfalls •Both projects rely on Redis (VSF: cache, Jolocom: wallet storage) •Jolo’s samples rely on socket.io to detect phone activities (QR scanned) •socket.io can’t be bound to express apps (only to a http.Server inst) • socket.io relies on https •had to activate body parser on VSF •conflicting build setup (Jolocom / VSF) - had to align start scripts / ts-node •asynchronous calls conflicts with express route wiring
  • 17. @stadolf @coding_earth bind Jolocom backend to VSF const { getAsync, setAsync, delAsync } = configureRedisClient() const registry = JolocomLib.registries.jolocom.create() const vaultedKeyProvider = new JolocomLib.KeyProvider(seed, password) module.exports = async (expressApp: Express, server: http.Server) => { const identityWallet = await registry.authenticate(vaultedKeyProvider, {derivationPath: JolocomLib.KeyTypes.jolocomIdentityKey, encryptionPass: password}) configureRoutes(expressApp, {setAsync, getAsync, delAsync}, identityWallet, password) configureSockets(server, identityWallet, password, new DbWatcher(getAsync), {getAsync, setAsync, delAsync}) return identityWallet } const configureRoutes = (app: Express, redisApi: RedisApi, iw: IdentityWallet, password: string) => { /** * An authentication endpoint route for deep linking for demo-sso-mobile; */ app.get('/mobile/credentialRequest', async (req, res, next) => { …
  • 18. @stadolf @coding_earth listen to smart wallet events in Vue continueWithJolo () { 
 const randomId = randomString(8); this.getQrCode(randomId).then(image => { this.$bus.$emit('modal-show', 'modal-jolo-user', null, 
 {image: image}) this.awaitUserData(randomId).then(data => { const parsed = JSON.parse(data) const userData = parsed.data this.personalDetails = { firstName: userData.givenName, lastName: userData.familyName, } this.$bus.$emit('modal-hide', 'modal-jolo-user') this.sendDataToCheckout() }) }).catch(err => { console.log(err) }) }, awaitUserData(randomId: string): Promise<string> { const socket = io(`/sso-status`, { query: { userId: randomId } }) return new Promise<string>(resolve => { socket.on(randomId, (data: string) => resolve(data)) }) } /* server: http.Server */ const baseSocket = io(server).origins('*:*') 
 baseSocket.of('/sso-status').on('connection', async socket => { const { userId } = socket.handshake.query console.log(`sockets.ts: waiting until ${userId} logs in`) dbWatcher.addSubscription(userId) dbWatcher.on(userId, async () => { const userData = await getAsync(userId) await delAsync(userId) socket.emit(userId, userData) }) }) getQrCode (randomId: string) { const socket = io('/qr-code', {query: { userId: randomId } }) return new Promise<string>(resolve => { socket.on(randomId, (qrCode: string) => resolve(qrCode)) }) }, Wait for auth Redis Checkout form
  • 19. 4. you present what you’ve done.
  • 21. 5. you do a team selfie
  • 22. @stadolf @coding_earth 💡team building •find your team ahead of the event if possible •be very careful of people who • consider themselves “very senior” (they’re not pragmatic) • are “designers” without knowing CSS (“Photoshoppers”) • talk about everything but the hackathon (just want to hire you) •first thing you do: agree on a messenger protocol (Slack) / channel
  • 23. @stadolf @coding_earth Tech Tinder Customize your Tech radar Schwarz Group - “CodeCamp Heilbronn” - Nov 2018
  • 24. @stadolf @coding_earth Challenge •“Schwarz group”: 2nd largest grocery / supermarket in Germany / LIDL • ~500 developers over the world • no one knows all requirements •Build a tool that helps their dev teams to keep track of their tech stack
  • 25. 1. You pitch an idea
  • 26. @stadolf @coding_earth Idea: Tech-Tinder •a tech radar controlled by employees •everyone can add new technologies •vote on technologies using a “tinder” interface
  • 27. 2. you find friendly team mates
  • 28. 3. you hack 36 hours
  • 29. @stadolf @coding_earth Tools / APIs •Backend: MongoDB Atlas / Stitch (FaaS) •Frontend: Vue.js / Bueify •integrate “swing” swiping library (vue-swing2) •copy / paste and adjust Zalando’s TechRadar project
  • 31. @stadolf @coding_earth technology_aggregate.js (stitch) exports = function(technologyId){ const colTech = context.services.get("mongodb-atlas").db("tech- tinder").collection("technology"); const colVotes = context.services.get("mongodb-atlas").db("tech- tinder").collection("votes"); const aggregationPipeline = [ {"$group": { "_id": { tech: "$ref", opinion: "$op" }, "total": { "$sum": 1 } } }, {"$group": { "_id": "$_id.tech", "count": {"$sum": "$total"}, "stats": { "$push": { op: "$_id.opinion", total: "$total" } } } } ]; var pipeline; if (technologyId) { pipeline = [{$match:{ref: BSON.ObjectId(technologyId)} }] .concat(aggregationPipeline); } else { pipeline = aggregationPipeline; } return new Promise( (resolve, reject) => { //let technology = colTech.findOne({_id: techId}); colVotes.aggregate(pipeline).toArray().then(ag => { const techIds = ag.map(agg => agg._id); //stitch doesnt support $lookup colTech.find({_id: {"$in": techIds} }).toArray().then(technologies => { const combined = ag.map(agg => { let base = technologies.filter(tt => { return tt._id.toString() == agg._id.toString(); })[0]; if (!base) { return null; } base.votes = { total: agg.count, results: {} }; agg.stats.forEach(s => base.votes.results[s.op] = s.total ); return base; }); resolve(combined.filter(c => c != null)); }); }); }); };
  • 32. @stadolf @coding_earth vote.js (“tinder”) <div class="container" v-if="technologies.length > 0"> <span class="tag is-info is-large tag-hint tag-top" :style="{ opacity: opacity.top }">interested</span> <span class="tag is-info is-large tag-hint tag-left" :style="{ opacity: opacity.left }">discouraged</span> <span class="tag is-info is-large tag-hint tag-right" :style="{ opacity: opacity.right }">using</span> <span class="tag is-info is-large tag-hint tag-bottom" :style="{ opacity: opacity.bottom }">evaluating</span> <div class="card-viewport"> <div class="card-stack"> <vue-swing v-for="technology in technologies" :key="technology._id" :config="cardConfig" @throwout="throwout" @throwin="throwin" > <div class="card card-item" :data-key="technology._id" > <div class="card-image"> <figure class="image"> <h1 class="title is-3">{{ technology.name }}</h1> </figure> </div> <div class="card-content"> <p class="is-5" v-html="technology.description"/> </div> </div> </vue-swing> </div> </div> </div>
  • 33. 4. you present what you’ve done.
  • 35. 5. you do a team selfie
  • 36. @stadolf @coding_earth 👍 hackers’ rules of thumb •you can’t learn a new language during a hackathon •use as much SaaS and PaaS services as possible • Contentful, Heroku, AWS Lambda / RDS, Firebase, now.sh, netlify •never do “microservices” •use DX-friendly frontend tech stacks • vue-cli, create-react-app, Gatsby, ionic •don’t to TDD!
  • 37. @stadolf @coding_earth Green Fee let drivers pay for their air pollution in real time “Blockchain Hackathon Stuttgart 2” - Feb 2019
  • 38. @stadolf @coding_earth Challenge •sponsored by huge German banks, Daimler, blockchain agencies •improve “mobility” with ledger tech • other challenges were “Industry 4.0 / IoT”, “Finance” •they expect a “business” presentation 🙄
  • 39. 1. You pitch an idea
  • 40. @stadolf @coding_earth Idea: Green Fee •track vehicles’ motion •track environmental conditions (current air pollution ratio) •price = constant * (your pollution / environmental pollution) •track your pollution cost in “real time” •compensate “the planet” in near realtime
  • 41. 2. you find friendly team mates
  • 42. 3. you hack 40 hours
  • 43. @stadolf @coding_earth Tools / APIs •IOTA MAM (Masked Authenticated Messaging) • write pollution costs onto an IOTA DAG ledger MAM • every message contains an due amount of IOTA • asnychronous process polls MAM stream and triggers payments •open air pollution data service • public.opendatasoft.com •Leaflet / OSM / plain jQuery, Webpack Encore for fast asset building •expressjs as backend
  • 44. @stadolf @coding_earth – The official IOTA project It is possible to publish transactions to the Tangle that contain only messages, with no value. This introduces many possibilities for data integrity and communication, but comes with the caveat that message-only signatures are not checked. What we introduce is a method of symmetric-key encrypted, signed data that takes advantage of merkle-tree winternitz signatures for extended public key usability, that can be found trivially by those who know to look for it.
  • 45. @stadolf @coding_earth – Alexey Sobolev, Oct 2017 “The ID published to the tangle is the hash of the hash of the message key seed.” 🤔
  • 46. @stadolf @coding_earth publish.js const Mam = require('@iota/mam/lib/mam.client.js') const { asciiToTrytes } = require('@iota/converter') const fs = require("fs"); const mamState = Mam.init(config.provider, config.seed); const lastState = fs.existsSync(LAST_STATE_FILENAME) ? fs.readFileSync(LAST_STATE_FILENAME).toString() : null; if (lastState) { mamState.channel = JSON.parse(lastState); } app.post('/msg', async function (req, response) { var t = new Date() const payload = { d: t.toLocaleDateString() + " " + t.toLocaleTimeString(), data: req.body }; const trytes = asciiToTrytes(JSON.stringify(payload)) const message = Mam.create(mamState, trytes) await Mam.attach(message.payload, message.address, 3, 9) if (!mamState.channel.currentRoot) { mamState.channel.currentRoot = message.root; } mamState.channel.lastRoot = message.root fs.writeFileSync(LAST_STATE_FILENAME, JSON.stringify(mamState.channel)) response.json(mamState) })
  • 47. 4. you present what you’ve done.
  • 49. 5. you do a team selfie
  • 50. @stadolf @coding_earth 💡ideation •if there are “sponsors”, select 1 with an API you can relate with •don’t put all the sponsors’ APIs in one app •do a design thinking session • plan your idea for 2-3 hours! •remove everything that’s not absolutely necessary •do a “good looking” UI that’s responsive and usable on mobile • vuetify, MUI, ionic, Bueify, Reactstrap
  • 51. @stadolf @coding_earth Blockstagram Instagram on the blockchain “Blockstack Hackathon Berlin” - Mar 2018
  • 52. @stadolf @coding_earth Challenge •build something meaningful with “Blockstack” •self sovereign “blockstack.id": a socially / stake backed identity (BTC) •use their “Gaia” hub: file storage decentralization concept (~IPFS / Storj) • P2P synced decentralized storage. 
 Bring your own cloud or trust Blockstack
  • 53. 1. You pitch an idea
  • 54. @stadolf @coding_earth Idea: Blockstagram •“Instagram” on Blockstack •Upload your pictures to Gaia hub (controlled by you) •acknowledge “friend” identities for read access •provide a symmetric key for them to decrypt your images •to unfriend (hide) someone, reencrypt all the images with a new key
  • 55. 2. you find friendly team mates
  • 56. 3. you hack 36 hours
  • 57. @stadolf @coding_earth Tools / APIs •Blockstack • Identity & Gaia Hub •ReactJS / CRA (ejected) •Netlify deployment
  • 58. @stadolf @coding_earth read your friend’s instagram data async readSingleSubscribersImages(username) { const indexData = await blockstack.getFile('index.json', { username: username, decrypt: false }) const data = JSON.parse(indexData); console.log('Subscribers indexData is', indexData); data.images.forEach(async indexEntry => { if (!this.subscriberImageLoaded({ ...indexEntry, username })) { const imageData = await blockstack.getFile(indexEntry.path, { username, decrypt: false }) this.updateFeed({ path: indexEntry.path, username: username, image: imageData, created: indexEntry.created }); } }) }
  • 59. 4. you present what you’ve done.
  • 61. 5. you do a team selfie
  • 62. @stadolf @coding_earth 💡task distribution •is very hard since you don’t know / trust each other •one (experienced) guy must control the repo • everyone must commit to the same repo! •mock it till you make it • https://www.mockbin.org • use postman shared collections •“I’m done, what can I do next?” -> “I’m done. I’d like to add xyz”
  • 64. @stadolf @coding_earth 2pm: the idea wasteland •talk to others and listen closely •you may steal and reiterate their ideas! • Most likely you’ll build sth else anyway! •google the APIs and find related Stackoverflow questions •try to come up with a real problem that you personally could have 😩
  • 65. @stadolf @coding_earth 8pm: the desperation zone •you will not get done anything until 8pm. That’s normal! •Pair! Sitting next to each other always helps. •look at the other teams. You’ll note that they’re also struggling *very* hard •don’t argue or overthink! Do! • you usually will never look back at the code! •if you want to win: get rid of people who disturb the team. (Just ignore them) •if you want to learn / earn karma points: discuss it out with them 🤯
  • 66. @stadolf @coding_earth 4am: the blue hour of devastation •things will start to work when you’re most desperate and expect it least •stay awake! • Fresh air, do a break every 10m if necessary. But stay on it! • Bananas and cold pizza work better than coffee and Red Bull. •tiredness goes away around ~8am (and punches you out by 1pm) •do some simple tasks (e.g. frontend polish) for success feelings ☠
  • 67. @stadolf @coding_earth 10am: prepare your presentation •select one dedicated presentation guy •usually your presentation will win the game, not your code •build a story • “my friend Dyrk called me yesterday and we’re solving his problem here” •fake the demo if necessary but make it run! •have 1 WOW effect •skip “market research”, “business model” and “rollout strategy” 💁
  • 68. @stadolf @coding_earth too long, didn’t listen. •Hackathons are for pragmatic developers, not clean coders •solve as much as possible on the frontend (learn React or Vue & node!) •it’s really a “thon”: you need to suffer to take away the grand prize •it’s incredibly rewarding when your demo starts working at 4am •the more tools and services you use, the better. •people will remember you. Everything happens for a reason. •never give up, never surrender.
  • 69. 6. not winning makes you weirder!
  • 70. @stadolf @coding_earth That’s all, folks Stefan Adolf
 https://www.facebook.com/stadolf
 https://twitter.com/stadolf
 https://github.com/elmariachi111
 https://www.linkedin.com/in/stadolf/