I recently ran into a classic case of "our code is using way more memory than it should". So I took my first dive into memory profiling Rust code. I read several posts about this, including the following
a4b.amazonaws.com | |
access-analyzer.amazonaws.com | |
account.amazonaws.com | |
acm-pca.amazonaws.com | |
acm.amazonaws.com | |
airflow-env.amazonaws.com | |
airflow.amazonaws.com | |
alexa-appkit.amazon.com | |
alexa-connectedhome.amazon.com | |
amazonmq.amazonaws.com |
Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-g
option.
Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.
The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from
Open Admin command prompt: bcdedit /set {current} safeboot minimal | |
Restart to BIOS and set to AHCI | |
Restart. Windows will boot into safe mode and will update the driver. | |
Open Admin command prompt: bcdedit /deletevalue {current} safeboot | |
Restart to boot Windows Normally. |
TL;DR has_many
is an anti-pattern which leads straight to monolithic applications.
First - what defines a monolithic application? It is one that cannot be split apart because everything depends on everything else. No part can be extracted to an external library - the library would have to be the size of our entire app. Let this be our working definition of a monolith. Ignore, for the moment, whether it's deployed on more than one machine, but ask could it be separated if you desired.
One major culprit of not being able to split an application up is a dependency cycle.
# | |
# Makefile to perform "live code reloading" after changes to .go files. | |
# | |
# n.b. you must install fswatch (OS X: `brew install fswatch`) | |
# | |
# To start live reloading run the following command: | |
# $ make serve | |
# | |
# binary name to kill/restart |
/*************************************************** | |
---------------------------------------------------- | |
Author: Alexandra Berke (aberke) | |
Written: Summer 2014 | |
---------------------------------------------------- | |
Formats the phonenumber as (222) 333-4444 within the input element | |
Binds only the number 2223334444 to the model |
package main | |
import ( | |
"net/http" | |
"database/sql" | |
"fmt" | |
"log" | |
"os" | |
) |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\