Skip to content

Instantly share code, notes, and snippets.

@miparnisari
Last active November 20, 2016 02:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miparnisari/e3b397b11a48620a612f43d6298e95bb to your computer and use it in GitHub Desktop.
Save miparnisari/e3b397b11a48620a612f43d6298e95bb to your computer and use it in GitHub Desktop.
○ Unicode:
§ Unicode comprises over one million characters divided in 17 different planes (contiguous groups of characters): BMP are mostly everyday characters, Astral, etc.
§ Astral characters include emojis but they aren't well supported because they are considered two characters, so regexes that use them may often work in unexpected ways.
§ Use the /u flag in ES6 to overcome this. Use it with caution.
○ El codigo es dato
§ Harvard architecutre: code + data in different places
§ Von Neuman architecture: code + data in the same place (it won)
○ Ethereum:
§ Ether is the cryptocurrency
§ Blockchain: records that store the transactions
§ Smart contracts: the protocol
§ "Ethereum is a computer"
§ Each transaction has an associated cost (except reading a transaction)
§ It's a decentralized system, uncorruptible. It cannot be DDoSed.
§ Read "Ethereum for dummies"!
○ Nodejs Microservices:
§ The opposite of monolithic applications. Each service does one thing and does it well.
§ Need to think of a messaging system to communicate between services
§ They are more resilient
○ Building scalable HTTP apis:
§ Do authentication once, do authorization per endpoint.
§ Validate every input
§ Rate-limit calls with buckets and make client self manageable.
§ Do automated documentation.
§ Do stress tests.
○ Empathetic communication:
§ Silence is the enemy of comunication. Encourage people to speak up.
§ Why won't people speak up? People don't want to be wrong, people don't want to be misunderstood
§ Technology will not replace face to face communication.
○ Memory profiling:
§ Leaks occur mostly when event handlers aren't deregistered.
§ You are 90% done with finding a memory leak if you can reproduce it locally.
§ Name all anonymous functions to debug easily.
§ Run code, take snapshot of heap, run code, take another snapshot, run code a 3rd time, take snapshot. Compare the heap for snapshots 1 and 3.
§ See https://github.com/thlorenz/v8-perf
○ Personalize experiences with ambient data.
§ Use data from user to generate immersive experiences.
§ Example: analyze text in tweets or in emails to find out what the user likes. (Invasion of privacy?) Analyze tone of the voice to detect emotions
§ Use location awareness.
○ Rauch:
§ Now: instant, immutable cloud deployments
○ On writing friendly documentation:
§ Use simple words, images, short paragraphs, links for people to research on unknown topics, headers, conversational vocabulary
§ Don't include cultural references because many people won't get them
○ Automate NPM releases
§ People are bad at doing trivial stuff. Automate things!
§ Greenkeeper.io: tracks npm dependencies and if a new version is detected, it branches the code + triggers the tests + creates Issue if a breaking change is found OR creates PR if the tests pass
§ Semantic-release: semver is made up of <breaking>.<feature>.<fix>. If commit messages are meaningful, this node package scans them and creates release notes, changelog, etc.
○ Internet of Peers
§ Get rid of servers, establish direct connections between clients using UDP hole punching.
§ Firewalls will not allow incoming connections to a client unless the client started the connection first.
§ Use a third-party server to establish the connection behind the clients firewalls. The server stores temporarily the IP addresses and ports of the clients.
○ Continuous Security
§ Security is an infinite stair upwards.
§ Idea: instead of hackathons to build new features, do hackathons to find new bugs
§ OWASP provides guidelines for web security.
○ Electron
§ Electron = node + chromium + v8 engine
§ Many apps use it! Slack, Now, Visual Studio Code, GitKraken
§ It makes a lot of things easier: automatic updates, notifications, app crash reports, debugging, etc
○ HapiJS
§ Configuration-based, extensible
§ Can use extension points to do stuff in various points of the request lifecycle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment