 bondscell_results 3$ba0434fc-9c97-470c-a948-7969d016e5a2queued¤logsrunning¦outputbody<div class="markdown"><h1 id="Class-project">Class project</h1>
<ul>
<li><p>Review feedback on project proposals </p>
</li>
<li><p>Review <a href="https://psuastro528.github.io/Fall2025/project/">project instructions and rubric</a> on website</p>
</li>
<li><p>Can continue using repository from project proposal</p>
</li>
<li><p>Next step is the serial implementation, focusing on good practices that we&#39;ve discussed/seen in labs</p>
</li>
<li><p>Serial code should be ready for peer code review by <strong>Oct 8</strong></p>
</li>
<li><p>After this week&#39;s labs, will have everything you need to benchmark, profile and optimize the serial version of your code.</p>
</li>
<li><p>Check <a href="https://github.com/PsuAstro528/PresentationsSchedule2025">project presentation schedule</a>.  If you want to make a swap, find another person/group to swap with, and then</p>
<ul>
<li><p>Click <strong>Fork</strong> button to create your own repository </p>
</li>
<li><p>Edit README.md in your repository &#40;can use web interface for small chagnes&#41;</p>
</li>
<li><p>Commmit change to yoru repo and push &#40;if editting local repo&#41;</p>
</li>
<li><p>Create <strong>Pull Request</strong> to merge your change into the class repository</p>
</li>
</ul>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(9 persist_js_state·has_pluto_hook_features§cell_id$ba0434fc-9c97-470c-a948-7969d016e5a2depends_on_disabled_cells§runtime [published_object_keysdepends_on_skipped_cells§errored$d2cc4026-b2f0-4201-bf3b-c1615bbc9ab7queued¤logsrunning¦outputbody<div class="nice-blockquote nice-blockquote__bordered nice-blockquote--quoted">
<p class="nice-blockquote__text">
<div class="markdown"><p>What are the main causes of thrashing and how does Julia mitigate it? Specifically, how does Julia’s garbage collection reduce thrashing, if there even is a strong connection?</p>
</div>
</p>
<div class="nice-blockquote__text nice-blockquote__text--author">

</div> 
</div> 
<style> 
.nice-blockquote{
padding: 25px;
border: 0.5px solid #ccc;
box-sizing:border-box;
overflow-y:hidden;
}
.nice-blockquote__bordered{
border-left-width: 14px;
}
p.nice-blockquote__text::before,
p.nice-blockquote__text::after{
    content: open-quote;
    font-size: 70px;
    font-family: Arial;
    font-weight: bold;
    color: #ccc;
    display: block;
    /* margin-top: -20px; */
    /* margin-bottom: -40px; */
    font-family: Arial;
    float: left;
    /* padding: 0.1ch 1ch; */
}

p.nice-blockquote__text::before{
    padding-inline-end: .2ch;
    line-height: 0.5;
}
p.nice-blockquote__text::after{
    content: close-quote;
    float: right;
    padding-inline-start: .2ch;
        line-height: .7;
}
    
.nice-blockquote__text{
font-family: Arial;
font-style: italic;
margin:0;
line height: 1.5;
text-align:left;
}
.nice-blockquote__text:not(:last_child){
margin-bottom:10px;
}
.nice-blockquote__text--author{
    font-weight:bold;
    font-style: normal;
    text-align:right;
    margin-block-start: 3em;
}

</style>
mimetext/htmlrootassigneelast_run_timestampAE(Ppersist_js_state·has_pluto_hook_features§cell_id$d2cc4026-b2f0-4201-bf3b-c1615bbc9ab7depends_on_disabled_cells§runtime bpublished_object_keysdepends_on_skipped_cells§errored$a4e4c54b-cda4-43af-b9ae-b1f5337f5fd0queued¤logsrunning¦outputbody<<div class="nice-blockquote nice-blockquote__bordered nice-blockquote--quoted">
<p class="nice-blockquote__text">
<div class="markdown"><p>Can you demonstrate how to import a julia program into python?</p>
</div>
</p>
<div class="nice-blockquote__text nice-blockquote__text--author">

</div> 
</div> 
<style> 
.nice-blockquote{
padding: 25px;
border: 0.5px solid #ccc;
box-sizing:border-box;
overflow-y:hidden;
}
.nice-blockquote__bordered{
border-left-width: 14px;
}
p.nice-blockquote__text::before,
p.nice-blockquote__text::after{
    content: open-quote;
    font-size: 70px;
    font-family: Arial;
    font-weight: bold;
    color: #ccc;
    display: block;
    /* margin-top: -20px; */
    /* margin-bottom: -40px; */
    font-family: Arial;
    float: left;
    /* padding: 0.1ch 1ch; */
}

p.nice-blockquote__text::before{
    padding-inline-end: .2ch;
    line-height: 0.5;
}
p.nice-blockquote__text::after{
    content: close-quote;
    float: right;
    padding-inline-start: .2ch;
        line-height: .7;
}
    
.nice-blockquote__text{
font-family: Arial;
font-style: italic;
margin:0;
line height: 1.5;
text-align:left;
}
.nice-blockquote__text:not(:last_child){
margin-bottom:10px;
}
.nice-blockquote__text--author{
    font-weight:bold;
    font-style: normal;
    text-align:right;
    margin-block-start: 3em;
}

</style>
mimetext/htmlrootassigneelast_run_timestampAE(-Ӱpersist_js_state·has_pluto_hook_features§cell_id$a4e4c54b-cda4-43af-b9ae-b1f5337f5fd0depends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$6853e432-81b5-4761-9e7a-3c48c9867291queued¤logsrunning¦outputbody@<div class="markdown"><h3 id="Some-form-of-tree-when:">Some form of <strong>tree</strong> when:</h3>
<ul>
<li><p>Elements have a meaningful order</p>
</li>
<li><p>Value fast adding/removing and searching of elements</p>
</li>
<li><p>Value not allocating &#40;much&#41; more memory than necessary</p>
</li>
<li><p>Don&#39;t mind taking longer to access individual elements</p>
</li>
<li><p>Willing to spend some time maintaing well-ordered tree</p>
</li>
<li><p>Common in database type applications</p>
</li>
</ul>
<h4 id="Generic-tree-&#40;not-particularly-useful&#41;">Generic tree &#40;not particularly useful&#41;</h4>
<p><img src="https://upload.wikimedia.org/wikipedia/commons/a/a9/Unbalanced_binary_tree.svg" alt="Unbalanced tree" /> - source <a href="https://en.wikipedia.org/wiki/File:Unbalanced_binary_tree.svg">Wikimedia</a></p>
<h4 id="Balanced-binary-tree">Balanced binary tree</h4>
<p><img src="https://upload.wikimedia.org/wikipedia/commons/0/06/AVLtreef.svg" alt="Balanced tree" /> - source <a href="https://en.wikipedia.org/wiki/File:AVLtreef.svg">Wikimedia</a></p>
</div>mimetext/htmlrootassigneelast_run_timestampAE(dpersist_js_state·has_pluto_hook_features§cell_id$6853e432-81b5-4761-9e7a-3c48c9867291depends_on_disabled_cells§runtime upublished_object_keysdepends_on_skipped_cells§errored$9b9e06d6-0566-42f0-93bc-65206e3add02queued¤logsrunning¦outputbodyprefixTuple{Int64, Float64}elements elements8text/plain-0.313855text/plaintypeTupleobjectidb6ac1abd5d26c666!application/vnd.pluto.tree+objectelements8text/plain-1.79197text/plaintypeTupleobjectid6dd97ac6fb69797e!application/vnd.pluto.tree+objectelements4text/plain0.553233text/plaintypeTupleobjectid3cc172565c849644!application/vnd.pluto.tree+objectelements2text/plain0.371891text/plaintypeTupleobjectid526534794d2c20c7!application/vnd.pluto.tree+objectelements9text/plain0.110146text/plaintypeTupleobjectid73d184aad66cf71!application/vnd.pluto.tree+objectelements9text/plain-0.910297text/plaintypeTupleobjectid6d05f4b4b4866d08!application/vnd.pluto.tree+objectelements7text/plain0.784776text/plaintypeTupleobjectid40540c74e72bd71!application/vnd.pluto.tree+objectelements2text/plain-0.891838text/plaintypeTupleobjectidac0f0351f205dd1b!application/vnd.pluto.tree+object	elements9text/plain-1.37612text/plaintypeTupleobjectid1ab508930a153598!application/vnd.pluto.tree+object
elements5text/plain0.515349text/plaintypeTupleobjectid672cc7198953a0b!application/vnd.pluto.tree+objectelements4text/plain0.383913text/plaintypeTupleobjectidd4a52e14fd03c2b0!application/vnd.pluto.tree+objectelements7text/plain-0.130532text/plaintypeTupleobjectid646a3e3ea3fa66cb!application/vnd.pluto.tree+objectelements9text/plain-0.5318text/plaintypeTupleobjectid95a726460963d6c1!application/vnd.pluto.tree+objectelements4text/plain-1.75621text/plaintypeTupleobjectida973920d1f067fca!application/vnd.pluto.tree+objectelements7text/plain-0.194844text/plaintypeTupleobjectid1bd6e89a75f3f46a!application/vnd.pluto.tree+objectelements9text/plain-1.29798text/plaintypeTupleobjectidb75b4b281bf62b22!application/vnd.pluto.tree+objectelements9text/plain1.56636text/plaintypeTupleobjectid536bb75ff2fb4dcd!application/vnd.pluto.tree+objectelements2text/plain1.97173text/plaintypeTupleobjectidbccb1f59c8bc7d06!application/vnd.pluto.tree+objectelements1text/plain-0.0237115text/plaintypeTupleobjectid3eef504cc33d5026!application/vnd.pluto.tree+objectelements2text/plain-1.10625text/plaintypeTupleobjectid7747e18d551d4aa7!application/vnd.pluto.tree+objectmore[elements4text/plain-1.81302text/plaintypeTupleobjectid17d6aa1812c0acbb!application/vnd.pluto.tree+object\elements10text/plain-0.62174text/plaintypeTupleobjectidf711ebda3a06b010!application/vnd.pluto.tree+object]elements8text/plain0.179345text/plaintypeTupleobjectid2414bf5ad3274d53!application/vnd.pluto.tree+object^elements6text/plain-0.752908text/plaintypeTupleobjectidb8d8cfcee3efcb91!application/vnd.pluto.tree+object_elements3text/plain-2.49964text/plaintypeTupleobjectidc547c3d1f2cb4734!application/vnd.pluto.tree+object`elements3text/plain1.01738text/plaintypeTupleobjectid6e349a322069375!application/vnd.pluto.tree+objectaelements4text/plain-0.0531692text/plaintypeTupleobjectid6b04da5c44690382!application/vnd.pluto.tree+objectbelements2text/plain-0.195867text/plaintypeTupleobjectid2707226b31f9c202!application/vnd.pluto.tree+objectcelements5text/plain-0.780832text/plaintypeTupleobjectidb119411e6e97b450!application/vnd.pluto.tree+objectdelements9text/plain1.28198text/plaintypeTupleobjectid4e6ef2d0ad23b2e!application/vnd.pluto.tree+objecttypeArrayprefix_shortobjectid6976fb523ff7196emime!application/vnd.pluto.tree+objectrootassigneelast_run_timestampAE(Lpersist_js_state·has_pluto_hook_features§cell_id$9b9e06d6-0566-42f0-93bc-65206e3add02depends_on_disabled_cells§runtime}ܵpublished_object_keysdepends_on_skipped_cells§errored$840a2af4-4eab-4857-879d-a9c62b1e27a1queued¤logsrunning¦outputbody<div class="markdown"><h2 id="How-to-excel-at-code-reviews-@-BetterProgramming"><a href="https://betterprogramming.pub/13-code-review-standards-inspired-by-google-6b8f99f7fd67">How to excel at code reviews @ BetterProgramming</a></h2>
<ol>
<li><p>The code improves the overall health of the system</p>
</li>
<li><p>Quick code reviews, responses, and feedback</p>
</li>
<li><p><strong>Educate and inspire during the code review</strong></p>
</li>
<li><p>Follow the standards when reviewing code</p>
</li>
<li><p>Resolving code review conflicts</p>
</li>
<li><p>Demo UI changes as a part of code review</p>
</li>
<li><p>Ensure that the code review accompanies all tests</p>
</li>
<li><p><strong>When focused, do not interrupt yourself to do code review</strong></p>
</li>
<li><p>Review everything, and <strong>don’t make any assumptions</strong></p>
</li>
<li><p><strong>Review the code with the bigger picture in mind</strong></p>
</li>
</ol>
</div>mimetext/htmlrootassigneelast_run_timestampAE(Ӱpersist_js_state·has_pluto_hook_features§cell_id$840a2af4-4eab-4857-879d-a9c62b1e27a1depends_on_disabled_cells§runtime *published_object_keysdepends_on_skipped_cells§errored$a876b548-3b0e-48d1-98bf-6bf005230e92queued¤logsrunning¦outputbodyٔ<div class="markdown"><blockquote>
<p>Astro 528: High-Performance Scientific Computing for Astrophysics &#40;Fall 2025&#41;</p>
</blockquote>
</div>mimetext/htmlrootassigneelast_run_timestampAE(persist_js_state·has_pluto_hook_features§cell_id$a876b548-3b0e-48d1-98bf-6bf005230e92depends_on_disabled_cells§runtime C,published_object_keysdepends_on_skipped_cells§errored$373376f2-3557-42f5-bdeb-9ae70ed3d060queued¤logsrunning¦outputbody8<div class="markdown"><h2 id="Week-6">Week 6</h2>
</div>mimetext/htmlrootassigneelast_run_timestampAE(Ŝpersist_js_state·has_pluto_hook_features§cell_id$373376f2-3557-42f5-bdeb-9ae70ed3d060depends_on_disabled_cells§runtime Rpublished_object_keysdepends_on_skipped_cells§errored$083af3e8-77ad-4a30-8d80-282a5403b163queued¤logsrunning¦outputbody%G
<div class='pluto-test call correct pass prefix-operator'>
	<script>
	
	const div = currentScript.parentElement
	div.addEventListener("click", (e) => {
		if(!div.classList.contains("expanded") || e.target.closest("pt-dot:not(.floating)") != null){
			div.classList.toggle("expanded")
			e.stopPropagation()
		}
	})
	
	const throttled = (f, delay) => {
		const waiting = { current: false }
		return () => {
			if (!waiting.current) {
				f()
				waiting.current = true
				setTimeout(() => {
					f()
					waiting.current = false
				}, delay)
			}
		}
	}
	
	const dot = div.querySelector("pt-dot")
	const dot_top = div.querySelector("pt-dot.top")
	const dot_bot = div.querySelector("pt-dot.bottom")
	
	const is_chrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor)
	const is_firefox = /Firefox/.test(navigator.userAgent) && /Mozilla/.test(navigator.userAgent)
	
	// safari is too slow
	
	if(is_chrome || is_firefox){

	const intersect = (r) => {
		const topdistance = r.top
		const botdistance = window.innerHeight - r.bottom
	
		
		const t = (x) => `translate(${2*Math.sqrt(Math.max(0,-50-x))}px,0)`
		dot_top.style.transform = t(topdistance)
		dot_bot.style.transform = t(botdistance)

		div.classList.toggle("show-top-float", topdistance < 4)
		div.classList.toggle("show-bottom-float", botdistance < 4)
	}
	
	intersect(dot.getBoundingClientRect())
	
	const scroll_listener = throttled(() => {
		intersect(dot.getBoundingClientRect())
	}, 200)
	
	window.addEventListener("scroll", scroll_listener)

	let observer = new IntersectionObserver((es) => {
		const e = es[0]
		intersect(e.boundingClientRect)
	},  {
	  rootMargin: '-4px',
	  threshold: 1.0
	});

	observer.observe(dot)
	invalidation.then(() => {
		window.removeEventListener("scroll", scroll_listener)
		observer.unobserve(dot)
	})
	
	Array.from(div.querySelectorAll("pt-dot.floating")).forEach(e => {
		e.addEventListener("click", () => dot.scrollIntoView({behavior: "smooth", block: "center", inline: "nearest"}))
	})
	
	}
	
	</script>
	<pt-dot></pt-dot>
	<pt-dot class="floating top"></pt-dot>
	<pt-dot class="floating bottom"></pt-dot>

	<p-frame-viewer>
	<p-frames>
	<slotted-code>
<line-like><pre-ish>!(all(sorted_merge .== sorted_quick))</pre-ish></line-like>
</slotted-code><slotted-code>
<line-like><pre-ish>!(all(</pre-ish><pluto-display></pluto-display><script id=iaddenlliyxhvvjq>const body = /* See the documentation for AbstractPlutoDingetjes.Display.published_to_js */ getPublishedObject("d80f4b82-bfd9-11f0-2d47-2376ea611b3d/681aba240488a243");const mime = "application/vnd.pluto.tree+object";const create_new = this == null || this._mime !== mime;const display = create_new ? currentScript.previousElementSibling : this;display.persist_js_state = true;display.sanitize_html = false;display.body = body;if(create_new) {        display.mime = mime;        display._mime = mime;}return display;</script><pre-ish> .== sorted_quick))</pre-ish></line-like>
</slotted-code><slotted-code>
<line-like><pre-ish>!(all(</pre-ish><pluto-display></pluto-display><script id=nuduahwtynflzdmm>const body = /* See the documentation for AbstractPlutoDingetjes.Display.published_to_js */ getPublishedObject("d80f4b82-bfd9-11f0-2d47-2376ea611b3d/b5c20fed13a7a164");const mime = "application/vnd.pluto.tree+object";const create_new = this == null || this._mime !== mime;const display = create_new ? currentScript.previousElementSibling : this;display.persist_js_state = true;display.sanitize_html = false;display.body = body;if(create_new) {        display.mime = mime;        display._mime = mime;}return display;</script><pre-ish> .== </pre-ish><pluto-display></pluto-display><script id=qwkqucdnwwjqtzqg>const body = /* See the documentation for AbstractPlutoDingetjes.Display.published_to_js */ getPublishedObject("d80f4b82-bfd9-11f0-2d47-2376ea611b3d/65a3df5471a64b10");const mime = "application/vnd.pluto.tree+object";const create_new = this == null || this._mime !== mime;const display = create_new ? currentScript.previousElementSibling : this;display.persist_js_state = true;display.sanitize_html = false;display.body = body;if(create_new) {        display.mime = mime;        display._mime = mime;}return display;</script><pre-ish>))</pre-ish></line-like>
</slotted-code><slotted-code>
<line-like><pre-ish>!(all(</pre-ish><pluto-display></pluto-display><script id=mtyzgtcmphzojxvx>const body = /* See the documentation for AbstractPlutoDingetjes.Display.published_to_js */ getPublishedObject("d80f4b82-bfd9-11f0-2d47-2376ea611b3d/7e5437732b0c0e01");const mime = "application/vnd.pluto.tree+object";const create_new = this == null || this._mime !== mime;const display = create_new ? currentScript.previousElementSibling : this;display.persist_js_state = true;display.sanitize_html = false;display.body = body;if(create_new) {        display.mime = mime;        display._mime = mime;}return display;</script><pre-ish>))</pre-ish></line-like>
</slotted-code><slotted-code>
<line-like><pre-ish>!</pre-ish><pluto-display></pluto-display><script id=eindpundwylpjykp>const body = /* See the documentation for AbstractPlutoDingetjes.Display.published_to_js */ getPublishedObject("d80f4b82-bfd9-11f0-2d47-2376ea611b3d/10d3e3d51c396ceb");const mime = "text/plain";const create_new = this == null || this._mime !== mime;const display = create_new ? currentScript.previousElementSibling : this;display.persist_js_state = true;display.sanitize_html = false;display.body = body;if(create_new) {        display.mime = mime;        display._mime = mime;}return display;</script><pre-ish></pre-ish></line-like>
</slotted-code><slotted-code>
<line-like><pluto-display></pluto-display><script id=yhclsbcbmjjdggpd>const body = /* See the documentation for AbstractPlutoDingetjes.Display.published_to_js */ getPublishedObject("d80f4b82-bfd9-11f0-2d47-2376ea611b3d/eeaeaa7a973499cf");const mime = "text/plain";const create_new = this == null || this._mime !== mime;const display = create_new ? currentScript.previousElementSibling : this;display.persist_js_state = true;display.sanitize_html = false;display.body = body;if(create_new) {        display.mime = mime;        display._mime = mime;}return display;</script><pre-ish></pre-ish></line-like>
</slotted-code>
	</p-frames>
	
	<p-frame-controls>
		<img src="https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/time-outline.svg" style="width: 1em; height: 1em; transform: scale(-1,1); opacity: .5; margin-left: 2em;">
		<input class="timescrub" style="filter: hue-rotate(149deg) grayscale(.9);" type=range min=1 max='6' value='1'>
	</p-frame-controls>
	
	
	<script>
	const div = currentScript.parentElement
	
	const input = div.querySelector(":scope > p-frame-controls > input.timescrub")
	const frames = div.querySelector(":scope > p-frames")
	
	const setviz = () => {
		Array.from(frames.children).forEach((f,i) => {
			f.style.display = i + 1 === input.valueAsNumber ? "inherit" : "none"
		})
	}
	
	setviz()
	
	input.addEventListener("input", setviz)
	</script>

	<style>
	PlutoTest.PlutoStylesheet("p-frame-viewer {\n\tdisplay: inline-flex;\n\tflex-direction: column;\n}\np-frames,\np-frame-controls {\n\tdisplay: inline-flex;\n}\n")
	</style>
</p-frame-viewer>
</div>
<style>
pt-dot {
	flex: 0 0 auto;
	background: grey;
	width: 1em;
	height: 1em;
	bottom: -.1em;
	border-radius: 100%;
	margin-right: .7em;
	display: block;
	position: relative;
	cursor: pointer;
}

pt-dot.floating {
	position: fixed;
	z-index: 60;
	visibility: hidden;
	transition: transform linear 240ms;
	opacity: .8;
}
.show-top-float > pt-dot.floating.top,
.show-bottom-float > pt-dot.floating.bottom {
	visibility: visible;
}

pt-dot.floating.top {
	top: 5px;
}
pt-dot.floating.bottom {
	bottom: 5px;
}


.fail > pt-dot {
	background: #f75d5d;

}
.pass > pt-dot {
	background: #56a038;
}

@keyframes fadeout {
    0% { opacity: 1;}
    100% { opacity: 0; pointer-events: none;}
}


.pass > pt-dot.floating {
    animation: fadeout 2s;

	animation-fill-mode: both;
	animation-delay: 2s;

	/*opacity: 0.4;*/
}


.pluto-test {
	font-family: "JuliaMono", monospace;
	font-size: 0.75rem;
	white-space: normal;
	padding: 4px;

	min-height: 25px;
}


.pluto-test.pass {
	color: rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
	.pluto-test.pass {
		color: rgba(200, 200, 200, 0.5);
	}
}

.pluto-test.fail {
background: linear-gradient(90deg, #ff2e2e14, transparent);
border-radius: 7px;
}


.pluto-test>.arg_result {
	flex: 0 0 auto;
}

.pluto-test>.arg_result>div,
.pluto-test>.arg_result>div>pluto-display>div {
	display: inline-flex;
}


.pluto-test>.comma {
	margin-right: .5em;
}

.pluto-test.call>code {
	padding: 0px;
}

.pluto-test.call.infix-operator>div {
	overflow-x: auto;
}

.pluto-test {
	display: flex;
	align-items: baseline;
}

.pluto-test.call.infix-operator>.fname {
	margin: 0px .6em;
	/*color: darkred;*/
}


/* expanding */


.pluto-test:not(.expanded) {
	cursor: pointer;
}

.pluto-test:not(.expanded) > p-frame-viewer > p-frame-controls {
	display: none;
	
}

.pluto-test.expanded > p-frame-viewer {
    max-width: 100%;
}
.pluto-test.expanded > p-frame-viewer > p-frames > slotted-code > line-like {
	flex-wrap: wrap;
}
.pluto-test.expanded > p-frame-viewer > p-frames > slotted-code > line-like > pluto-display[mime="application/vnd.pluto.tree+object"] {
	/*flex-basis: 100%;*/
}

slotted-code {
	font-family: "JuliaMono", monospace;
	font-size: .75rem;
	display: flex;
	flex-direction: column;
}
pre-ish {
	white-space: pre;
}

line-like {
	display: flex;
	align-items: baseline;
}

</style>


mimetext/htmlrootassigneelast_run_timestampAE(,0persist_js_state·has_pluto_hook_features§cell_id$083af3e8-77ad-4a30-8d80-282a5403b163depends_on_disabled_cells§runtime#ŵpublished_object_keys5d80f4b82-bfd9-11f0-2d47-2376ea611b3d/eeaeaa7a973499cf5d80f4b82-bfd9-11f0-2d47-2376ea611b3d/681aba240488a2435d80f4b82-bfd9-11f0-2d47-2376ea611b3d/10d3e3d51c396ceb5d80f4b82-bfd9-11f0-2d47-2376ea611b3d/7e5437732b0c0e015d80f4b82-bfd9-11f0-2d47-2376ea611b3d/65a3df5471a64b105d80f4b82-bfd9-11f0-2d47-2376ea611b3d/b5c20fed13a7a164depends_on_skipped_cells§errored$abf68ae8-2327-44eb-b0dc-24f66ae4f603queued¤logsrunning¦outputbody<div class="markdown"><pre><code class="language-python">from julia.api import Julia
julia &#61; Julia&#40;compiled_modules&#61;False&#41;
from julia import Base
Base.sind&#40;90&#41;</code></pre>
</div>mimetext/htmlrootassigneelast_run_timestampAE(persist_js_state·has_pluto_hook_features§cell_id$abf68ae8-2327-44eb-b0dc-24f66ae4f603depends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$76c7abf5-8eb5-4fc0-bca0-7c8098699fc1queued¤logsrunning¦outputbody<div class="markdown"><ul>
<li><p>If using pure Julia, then garbage collector prevents leaks &#40;at least in theory&#41;</p>
</li>
<li><p>In practice, you can use poor practices that cause it to use lots of memory, e.g.,</p>
<ul>
<li><p>Large/many variables in global/module scope</p>
</li>
<li><p>Not organizing code into self-contained functions</p>
</li>
<li><p>Allocating more memory than you really need</p>
</li>
<li><p>Many small allocations</p>
</li>
</ul>
</li>
<li><p>If you call C, Fortran, Python, R, etc., then memory leaks are possible.  </p>
</li>
<li><p>Test your code</p>
</li>
<li><p><code>@time</code> or <code>@allocated</code> to count number/ammount of allocations.  Does it match what you expect?</p>
</li>
<li><p>In ProfileCanvas.jl, can use <code>@profview_allocs</code> to visually find functions/lines that allocate lots of memory &#40;not necessarily a leak&#41;.</p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(ppersist_js_state·has_pluto_hook_features§cell_id$76c7abf5-8eb5-4fc0-bca0-7c8098699fc1depends_on_disabled_cells§runtime Rpublished_object_keysdepends_on_skipped_cells§errored$838815fa-5917-4347-bb3c-bf8300d2d942queued¤logsrunning¦outputbody=<div class="markdown"><p>&quot;Scratch&quot; can mean different things depending on context:</p>
<ul>
<li><p>A separate physical disk or file system that is intended to be used for temporary files.</p>
<ul>
<li><p>E.g., Roar&#39;s <code>/storage/scratch/USERID/</code> provides large storage but autodeletes your files</p>
</li>
</ul>
</li>
<li><p>A portion of memory allocated and reserved for holding scratch data</p>
<ul>
<li><p>E.g., preallocating a workspace to be used for auto-differentiation, integration, factoring a matrix, etc.</p>
</li>
</ul>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(persist_js_state·has_pluto_hook_features§cell_id$838815fa-5917-4347-bb3c-bf8300d2d942depends_on_disabled_cells§runtime 	!Lpublished_object_keysdepends_on_skipped_cells§errored$5797afa6-13ac-457d-aeee-5d4403f61787queued¤logsrunning¦outputbody<div class="nice-blockquote nice-blockquote__bordered nice-blockquote--quoted">
<p class="nice-blockquote__text">
<div class="markdown"><p>The reading talks about being cache friendly– if we were performing a search wouldn&#39;t how cache friendly the search is be dependent on the search algorithm? How do we know what type of search algorithm is being used if we didn&#39;t write the code ourselves? How would we know how to optimize the structure of our code based on the search algorithm we are using and how the program/computer access memory?</p>
</div>
</p>
<div class="nice-blockquote__text nice-blockquote__text--author">

</div> 
</div> 
<style> 
.nice-blockquote{
padding: 25px;
border: 0.5px solid #ccc;
box-sizing:border-box;
overflow-y:hidden;
}
.nice-blockquote__bordered{
border-left-width: 14px;
}
p.nice-blockquote__text::before,
p.nice-blockquote__text::after{
    content: open-quote;
    font-size: 70px;
    font-family: Arial;
    font-weight: bold;
    color: #ccc;
    display: block;
    /* margin-top: -20px; */
    /* margin-bottom: -40px; */
    font-family: Arial;
    float: left;
    /* padding: 0.1ch 1ch; */
}

p.nice-blockquote__text::before{
    padding-inline-end: .2ch;
    line-height: 0.5;
}
p.nice-blockquote__text::after{
    content: close-quote;
    float: right;
    padding-inline-start: .2ch;
        line-height: .7;
}
    
.nice-blockquote__text{
font-family: Arial;
font-style: italic;
margin:0;
line height: 1.5;
text-align:left;
}
.nice-blockquote__text:not(:last_child){
margin-bottom:10px;
}
.nice-blockquote__text--author{
    font-weight:bold;
    font-style: normal;
    text-align:right;
    margin-block-start: 3em;
}

</style>
mimetext/htmlrootassigneelast_run_timestampAE(AWpersist_js_state·has_pluto_hook_features§cell_id$5797afa6-13ac-457d-aeee-5d4403f61787depends_on_disabled_cells§runtime ȵpublished_object_keysdepends_on_skipped_cells§errored$a541ae26-c160-4549-af71-c4473f0eefb7queued¤logsrunning¦outputbody<div class="nice-blockquote nice-blockquote__bordered nice-blockquote--quoted">
<p class="nice-blockquote__text">
<div class="markdown"><p>How severe will thrashing be in a high-level language such as Julia? Should we worry about it immediately or only during optimization?</p>
</div>
</p>
<div class="nice-blockquote__text nice-blockquote__text--author">

</div> 
</div> 
<style> 
.nice-blockquote{
padding: 25px;
border: 0.5px solid #ccc;
box-sizing:border-box;
overflow-y:hidden;
}
.nice-blockquote__bordered{
border-left-width: 14px;
}
p.nice-blockquote__text::before,
p.nice-blockquote__text::after{
    content: open-quote;
    font-size: 70px;
    font-family: Arial;
    font-weight: bold;
    color: #ccc;
    display: block;
    /* margin-top: -20px; */
    /* margin-bottom: -40px; */
    font-family: Arial;
    float: left;
    /* padding: 0.1ch 1ch; */
}

p.nice-blockquote__text::before{
    padding-inline-end: .2ch;
    line-height: 0.5;
}
p.nice-blockquote__text::after{
    content: close-quote;
    float: right;
    padding-inline-start: .2ch;
        line-height: .7;
}
    
.nice-blockquote__text{
font-family: Arial;
font-style: italic;
margin:0;
line height: 1.5;
text-align:left;
}
.nice-blockquote__text:not(:last_child){
margin-bottom:10px;
}
.nice-blockquote__text--author{
    font-weight:bold;
    font-style: normal;
    text-align:right;
    margin-block-start: 3em;
}

</style>
mimetext/htmlrootassigneelast_run_timestampAE(Ӱpersist_js_state·has_pluto_hook_features§cell_id$a541ae26-c160-4549-af71-c4473f0eefb7depends_on_disabled_cells§runtime ڵpublished_object_keysdepends_on_skipped_cells§errored$c247aa92-2803-402d-b1cf-ebbf819c56acqueued¤logsrunning¦outputbody6<div class="markdown"><h1 id="Setup">Setup</h1>
</div>mimetext/htmlrootassigneelast_run_timestampAE({persist_js_state·has_pluto_hook_features§cell_id$c247aa92-2803-402d-b1cf-ebbf819c56acdepends_on_disabled_cells§runtime ʔpublished_object_keysdepends_on_skipped_cells§errored$e00f7ffc-16dd-4e6f-ad85-74f6117eb958queued¤logsrunning¦outputbody:<div class="markdown"><p>First, setup PyCall.jl &#40;to call Python from Julia&#41; by running</p>
<pre><code class="language-shell">&gt; julia -e &#39;import Pkg; Pkg.add&#40;&quot;PyCall&quot;&#41;;&#39;</code></pre>
<p>You only need to do that once &#40;for each system you&#39;re running it on&#41;.</p>
</div>mimetext/htmlrootassigneelast_run_timestampAE(persist_js_state·has_pluto_hook_features§cell_id$e00f7ffc-16dd-4e6f-ad85-74f6117eb958depends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$2ba07b9f-97b0-4ec3-90ae-bdf2b5616370queued¤logsrunning¦outputbody<div class="markdown"><p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Singly-linked-list.svg/640px-Singly-linked-list.svg.png" alt="Linked List" /></p>
<p>Use <strong>linked list</strong> when:</p>
<ul>
<li><p>Likely to insert elements and/or change size often</p>
</li>
<li><p>Don&#39;t mind taking longer to access elements &#40;other than beginning/end&#41;</p>
</li>
<li><p>Value not allocating &#40;much&#41; more memory than necessary</p>
</li>
<li><p>Useful for frequent sorting </p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(^persist_js_state·has_pluto_hook_features§cell_id$2ba07b9f-97b0-4ec3-90ae-bdf2b5616370depends_on_disabled_cells§runtime XUpublished_object_keysdepends_on_skipped_cells§errored$53f5a5ca-201f-4aea-aa4c-fe82ae0249f2queued¤logsrunning¦outputbodyg<div class="markdown"><p>Inside Jupyter notebook:</p>
<pre><code class="language-python">In &#91;1&#93;: &#37;load_ext julia.magic
Initializing Julia runtime. This may take some time...

In &#91;2&#93;: &#37;julia &#91;1 2; 3 4&#93; .&#43; 1
Out&#91;2&#93;:
array&#40;&#91;&#91;2, 3&#93;,
       &#91;4, 5&#93;&#93;, dtype&#61;int64&#41;
In &#91;3&#93;: arr &#61; &#91;1, 2, 3&#93;

In &#91;4&#93;: &#37;julia &#36;arr .&#43; 1
Out&#91;4&#93;:
array&#40;&#91;2, 3, 4&#93;, dtype&#61;int64&#41;

In &#91;5&#93;: &#37;julia sum&#40;py&quot;&#91;x**2 for x in arr&#93;&quot;&#41;
Out&#91;5&#93;: 14</code></pre>
</div>mimetext/htmlrootassigneelast_run_timestampAE(bpersist_js_state·has_pluto_hook_features§cell_id$53f5a5ca-201f-4aea-aa4c-fe82ae0249f2depends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$28d23ac8-ca53-4182-87d7-52fee383f2c5queued¤logsrunning¦outputbody<div class="markdown"><h2 id="Peer-Review-Logistics">Peer Review Logistics</h2>
<ul>
<li><p>Access</p>
<ul>
<li><p>I&#39;ll send you GitHub ID of peer reviewer&#40;s&#41;</p>
</li>
<li><p>Make sure reviewer&#40;s&#41; can access your repo</p>
<ul>
<li><p>If your project repo is private: <code>Settings</code>, <code>Collaborators &amp; Teams</code>, <code>Add people</code>, <code>Read</code>, <code>Add Selection</code>.</p>
</li>
<li><p>Or make your project repo public:  <code>Settings</code>, <code>Change Visibility</code>, plus multiple multiple steps to confirm.</p>
</li>
</ul>
</li>
<li><p>Make sure you can access repo to review</p>
</li>
</ul>
</li>
<li><p>If using Jupyter notebooks, make sure to add Markdown version of code for getting feedback. </p>
</li>
</ul>
<pre><code class="language-julia">julia -e &#39;import Pkg; Pkg.add&#40;&quot;Weave&quot;&#41;; using Weave; convert_doc&#40;&quot;NOTEBOOK_NAME.ipynb&quot;,&quot;NOTEBOOK_NAME.jmd&quot;&#41;&#39;</code></pre>
<ul>
<li><p><a href="https://psuastro528.github.io/Fall2025/project/code_reviews/how_to/">Review instructions</a></p>
</li>
<li><p>Provide most feedback via <a href="https://guides.github.com/features/issues/">GitHub Issues</a></p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(>persist_js_state·has_pluto_hook_features§cell_id$28d23ac8-ca53-4182-87d7-52fee383f2c5depends_on_disabled_cells§runtime 8published_object_keysdepends_on_skipped_cells§errored$626cd1f0-b2d0-48e4-88ee-775e1f037480queued¤logsrunning¦outputbody<div class="markdown"><pre><code class="language-python">from julia import Main as jl
jl.exp&#40;0&#41;
jl.xs &#61; &#91;1, 2, 3&#93;
jl.eval&#40;&quot;sin.&#40;xs&#41;&quot;&#41;</code></pre>
</div>mimetext/htmlrootassigneelast_run_timestampAE(6persist_js_state·has_pluto_hook_features§cell_id$626cd1f0-b2d0-48e4-88ee-775e1f037480depends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$6a0d5ba5-40d0-445d-a0fa-32fcfbad00c9queued¤logsrunning¦outputbodyr<div class="markdown"><h2 id="Code-Review-Best-Practices-@-Palantir"><a href="https://blog.palantir.com/code-review-best-practices-19e02780015f">Code Review Best Practices @ Palantir</a></h2>
<h3 id="Purpose">Purpose</h3>
<ul>
<li><p>Does this code accomplish the author’s purpose? </p>
</li>
<li><p><strong>Ask questions.</strong></p>
</li>
</ul>
<h3 id="Implementation">Implementation</h3>
<ul>
<li><p><strong>Think about how you would have solved the problem.</strong></p>
</li>
<li><p>Do you see potential for useful abstractions?</p>
</li>
<li><p><strong>Think like an adversary, but be nice about it.</strong></p>
</li>
<li><p>Think about libraries or existing product code.</p>
</li>
<li><p>Does the change follow standard patterns?</p>
</li>
<li><p><strong>Does the change add dependencies</strong>? </p>
</li>
<li><p>Think about your reading experience. </p>
</li>
<li><p>Does the code adhere to coding guidelines and code style? </p>
</li>
<li><p>Does this code have TODOs? </p>
</li>
</ul>
<h3 id="Maintainability">Maintainability</h3>
<ul>
<li><p><strong>Read the tests</strong>.</p>
</li>
<li><p>Does this CR introduce the risk of breaking test code, staging stacks, or integrations tests?</p>
</li>
<li><p>Leave feedback on code-level documentation, comments, and commit messages. </p>
</li>
<li><p><strong>Was the external documentation updated?</strong></p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE($persist_js_state·has_pluto_hook_features§cell_id$6a0d5ba5-40d0-445d-a0fa-32fcfbad00c9depends_on_disabled_cells§runtime wpublished_object_keysdepends_on_skipped_cells§errored$4cde0527-defc-4901-bb4c-071bc115e102queued¤logsrunning¦outputbodyJ<div class="markdown"><h1 id="Data-structures">Data structures</h1>
</div>mimetext/htmlrootassigneelast_run_timestampAE(persist_js_state·has_pluto_hook_features§cell_id$4cde0527-defc-4901-bb4c-071bc115e102depends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$0588f080-1da7-4df0-930b-582c065cab75queued¤logsrunning¦outputbodyم<div class="markdown"><p>ToC on side <bond def="toc_aside" unique_id="mbaxvnxuoqwj"><input type="checkbox" checked></bond></p>
</div>mimetext/htmlrootassigneelast_run_timestampAE(Srpersist_js_state·has_pluto_hook_features§cell_id$0588f080-1da7-4df0-930b-582c065cab75depends_on_disabled_cells§runtime{3ߵpublished_object_keysdepends_on_skipped_cells§errored$f508c1c8-945b-4b99-8985-5f10946b0239queued¤logsrunning¦outputbodyR<div class="markdown"><p><img src="https://miro.medium.com/max/560/1*g95FYDe5j9X_9SqEj1tycQ.jpeg" alt="Don&#39;t make assumptions cartoon" /></p>
<p>&#40;Credit: <a href="https://ma.nu/">Manu</a> via <a href="https://betterprogramming.pub/13-code-review-standards-inspired-by-google-6b8f99f7fd67">BetterProgramming.pub</a>&#41;</p>
</div>mimetext/htmlrootassigneelast_run_timestampAE((kpersist_js_state·has_pluto_hook_features§cell_id$f508c1c8-945b-4b99-8985-5f10946b0239depends_on_disabled_cells§runtime /published_object_keysdepends_on_skipped_cells§errored$7b7bd5c8-a8e8-445c-9239-9c7322a81313queued¤logsrunning¦outputbody<div class="markdown"><h2 id="Array">Array</h2>
<ul>
<li><p>Consecutive elements in a 1-d array are stored in consecutive memory locations</p>
</li>
</ul>
<p>Use <strong>array</strong> when:</p>
<ul>
<li><p>Know size at time of creation &#40;or won&#39;t need to change size often&#41;</p>
</li>
<li><p>Value fast access to elements &#40;not just the beginning/end&#41;</p>
</li>
<li><p>Value not allocating more memory than memory</p>
</li>
<li><p>Very common for scientific performance sensitive code</p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(persist_js_state·has_pluto_hook_features§cell_id$7b7bd5c8-a8e8-445c-9239-9c7322a81313depends_on_disabled_cells§runtime 	܆published_object_keysdepends_on_skipped_cells§errored$f965c656-6b7b-441d-8111-855ecfe79ca6queued¤logsrunning¦outputbody<div class="nice-blockquote nice-blockquote__bordered nice-blockquote--quoted">
<p class="nice-blockquote__text">
<div class="markdown"><p>How does memory function from cell-to-cell within a notebook? Is it more efficient to split up code over many cells, or have them operate in the same one? How does this impact runtime and general performance?</p>
</div>
</p>
<div class="nice-blockquote__text nice-blockquote__text--author">

</div> 
</div> 
<style> 
.nice-blockquote{
padding: 25px;
border: 0.5px solid #ccc;
box-sizing:border-box;
overflow-y:hidden;
}
.nice-blockquote__bordered{
border-left-width: 14px;
}
p.nice-blockquote__text::before,
p.nice-blockquote__text::after{
    content: open-quote;
    font-size: 70px;
    font-family: Arial;
    font-weight: bold;
    color: #ccc;
    display: block;
    /* margin-top: -20px; */
    /* margin-bottom: -40px; */
    font-family: Arial;
    float: left;
    /* padding: 0.1ch 1ch; */
}

p.nice-blockquote__text::before{
    padding-inline-end: .2ch;
    line-height: 0.5;
}
p.nice-blockquote__text::after{
    content: close-quote;
    float: right;
    padding-inline-start: .2ch;
        line-height: .7;
}
    
.nice-blockquote__text{
font-family: Arial;
font-style: italic;
margin:0;
line height: 1.5;
text-align:left;
}
.nice-blockquote__text:not(:last_child){
margin-bottom:10px;
}
.nice-blockquote__text--author{
    font-weight:bold;
    font-style: normal;
    text-align:right;
    margin-block-start: 3em;
}

</style>
mimetext/htmlrootassigneelast_run_timestampAE(,tpersist_js_state·has_pluto_hook_features§cell_id$f965c656-6b7b-441d-8111-855ecfe79ca6depends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$7a13c062-b641-4894-9288-4a79c1005c49queued¤logsrunning¦outputbody<div class="markdown"><h2 id="Serial-version-of-Code-Rubic">Serial version of Code Rubic</h2>
<ul>
<li><p>Code performs proposed tasks &#40;1 point&#41;</p>
</li>
<li><p>Comprehensive set of unit tests, at least one integration or regression test &#40;1 point&#41;</p>
</li>
<li><p>Code passes tests &#40;1 point&#41;</p>
</li>
<li><p>Student code uses a version control system effectively &#40;1 point&#41;</p>
</li>
<li><p>Repository includes many regular, small commits &#40;1 point&#41;</p>
</li>
<li><p>Documentation for functions’ purpose and design &#40;1 point&#41;</p>
</li>
<li><p>Comprehensive set of assertions &#40;1 point&#41;</p>
</li>
<li><p>Variable/function names consistent, distinctive &amp; meaningful &#40;1 point&#41;</p>
</li>
<li><p>Useful &amp; consistent code formatting &amp; style &#40;1 point&#41;</p>
</li>
<li><p>Code is modular, rather than having chunks of same code copied and pasted &#40;1 point&#41;</p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(v.persist_js_state·has_pluto_hook_features§cell_id$7a13c062-b641-4894-9288-4a79c1005c49depends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$442d604f-79a0-473d-a5b1-d90ca303fc2equeued¤logsrunning¦outputbodyprefixTuple{Int64, Float64}elements elements1text/plain-0.442368text/plaintypeTupleobjectid8a1ed1b92f112b9c!application/vnd.pluto.tree+objectelements1text/plain1.11572text/plaintypeTupleobjectid412fa3c4b5513e9e!application/vnd.pluto.tree+objectelements1text/plain0.545858text/plaintypeTupleobjectid3d1e46f0c5e73070!application/vnd.pluto.tree+objectelements1text/plain0.251877text/plaintypeTupleobjectid35d5a701232c61!application/vnd.pluto.tree+objectelements1text/plain1.29865text/plaintypeTupleobjectid263c27b84fbb3f0d!application/vnd.pluto.tree+objectelements1text/plain-0.0237115text/plaintypeTupleobjectid3eef504cc33d5026!application/vnd.pluto.tree+objectelements2text/plain1.97173text/plaintypeTupleobjectidbccb1f59c8bc7d06!application/vnd.pluto.tree+objectelements2text/plain-0.835618text/plaintypeTupleobjectid3262905619682fd9!application/vnd.pluto.tree+object	elements2text/plain-1.04491text/plaintypeTupleobjectide05063adcd49096!application/vnd.pluto.tree+object
elements2text/plain-0.954068text/plaintypeTupleobjectid7cd7f23420f5cf8d!application/vnd.pluto.tree+objectelements2text/plain0.29745text/plaintypeTupleobjectidac160ae886f39461!application/vnd.pluto.tree+objectelements2text/plain0.148591text/plaintypeTupleobjectid5460b221229c4555!application/vnd.pluto.tree+objectelements2text/plain-0.367085text/plaintypeTupleobjectid807dd56092218f4a!application/vnd.pluto.tree+objectelements2text/plain-0.313947text/plaintypeTupleobjectid6d0c936bce6ac2f!application/vnd.pluto.tree+objectelements2text/plain0.0804976text/plaintypeTupleobjectid519920afcae9ac16!application/vnd.pluto.tree+objectelements2text/plain-1.10625text/plaintypeTupleobjectid7747e18d551d4aa7!application/vnd.pluto.tree+objectelements2text/plain0.92743text/plaintypeTupleobjectid89ff33733452b75c!application/vnd.pluto.tree+objectelements2text/plain0.371891text/plaintypeTupleobjectid526534794d2c20c7!application/vnd.pluto.tree+objectelements2text/plain-0.195867text/plaintypeTupleobjectid2707226b31f9c202!application/vnd.pluto.tree+objectelements2text/plain-0.891838text/plaintypeTupleobjectidac0f0351f205dd1b!application/vnd.pluto.tree+objectmore[elements9text/plain0.186238text/plaintypeTupleobjectide67be22595a0eb3f!application/vnd.pluto.tree+object\elements9text/plain0.0235584text/plaintypeTupleobjectidbb7c3a6c2a9c8d0d!application/vnd.pluto.tree+object]elements9text/plain-2.37901text/plaintypeTupleobjectid9b8615f6c8abfb11!application/vnd.pluto.tree+object^elements9text/plain0.789989text/plaintypeTupleobjectide5bdead35af83676!application/vnd.pluto.tree+object_elements10text/plain-0.302798text/plaintypeTupleobjectid959120332622e24f!application/vnd.pluto.tree+object`elements10text/plain-1.20217text/plaintypeTupleobjectidb5cf197884a80c77!application/vnd.pluto.tree+objectaelements10text/plain-0.62174text/plaintypeTupleobjectidf711ebda3a06b010!application/vnd.pluto.tree+objectbelements10text/plain-0.474818text/plaintypeTupleobjectid5f3cfdaa444021fc!application/vnd.pluto.tree+objectcelements10text/plain-0.139246text/plaintypeTupleobjectid7c59bc7b206acc58!application/vnd.pluto.tree+objectdelements10text/plain0.390087text/plaintypeTupleobjectid6592aeffe50252d!application/vnd.pluto.tree+objecttypeArrayprefix_shortobjectid1e6f91a0edc207e0mime!application/vnd.pluto.tree+objectrootassigneelast_run_timestampAE(]հpersist_js_state·has_pluto_hook_features§cell_id$442d604f-79a0-473d-a5b1-d90ca303fc2edepends_on_disabled_cells§runtimeWspublished_object_keysdepends_on_skipped_cells§errored$b9baebea-2312-4c28-905c-b47ec3a26415queued¤logsrunning¦outputbody6<!-- https://github.com/fonsp/Pluto.jl/issues/400#issuecomment-695040745 -->
<input
	type="checkbox"
	id="width-over-livedocs"
	name="width-over-livedocs"
    onclick="window.plutoOptIns.toggle_width(this)"
	>
<label for="width-over-livedocs">
	Full Width Mode
</label>
<style>
	body.width-over-docs #helpbox-wrapper {
    	display: none !important;
	}
	body.width-over-docs main {
               max-width: none !important;
               margin: 0 !important;
	       # max-width: calc(100% - 4rem);
               # margin-right: 2rem;
	}
</style>
<script>
	const toggle_width = function(t) {
		t.checked
		? document.body.classList.add("width-over-docs")
		: document.body.classList.remove("width-over-docs") }
	window.plutoOptIns = window.plutoOptIns || {}
	window.plutoOptIns.toggle_width = toggle_width
	
</script>
mimetext/htmlrootassigneelast_run_timestampAE(Q7persist_js_state·has_pluto_hook_features§cell_id$b9baebea-2312-4c28-905c-b47ec3a26415depends_on_disabled_cells§runtime Jpublished_object_keysdepends_on_skipped_cells§errored$fed62143-6d25-4d6a-927b-84f5d20fab0dqueued¤logsrunning¦outputbody<div class="markdown"><ul>
<li><p>Lots of small allocations on the heap</p>
</li>
<li><p>Java &#40;probably the first &quot;major&quot; language to have garbage collection built-in&#41; gave garbage collection a bad reputation because it only allows mutable user-defined types &#40;and passes all objects by pointers&#41;, making it quite hard to avoid heap allocation of even very small objects.  </p>
</li>
<li><p>Julia &#40;and C#&#41; encourage the use of immutable types</p>
</li>
<li><p>Julia pass variables by reference &#40;so they can pass variables on the stack&#41;</p>
</li>
<li><p>C# passes variables by value by default &#40;so they stay on stack, but often unnecessary stack allocations&#41; and can pass by reference.</p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(U*persist_js_state·has_pluto_hook_features§cell_id$fed62143-6d25-4d6a-927b-84f5d20fab0ddepends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$533dbe7a-aae6-41dd-8737-2f995bb6c7f6queued¤logsrunning¦outputbodyD<div class="markdown"><h1 id="Old-Q&amp;As">Old Q&amp;As</h1>
</div>mimetext/htmlrootassigneelast_run_timestampAE(},persist_js_state·has_pluto_hook_features§cell_id$533dbe7a-aae6-41dd-8737-2f995bb6c7f6depends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$3d678919-c197-4c9d-aed9-bf94dd431c4cqueued¤logsrunning¦outputbody<div class="markdown"><h1 id="Admin-Announcements">Admin Announcements</h1>
<h2 id="Labs">Labs</h2>
<ul>
<li><p>No lab this week, so can work on your projects</p>
</li>
<li><p>Still meet this Friday for a group work session</p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(Fpersist_js_state·has_pluto_hook_features§cell_id$3d678919-c197-4c9d-aed9-bf94dd431c4cdepends_on_disabled_cells§runtime <published_object_keysdepends_on_skipped_cells§errored$e2a60b81-1584-4d2d-8b08-9055d362cdfbqueued¤logsrunning¦outputbody<div class="markdown"><h1 id="Learning-from-others-with-more-experience-conducting-Code-Reviews">Learning from others with more experience conducting Code Reviews</h1>
<h2 id="Best-Practices-for-Code-Review-@-Smart-Bear"><a href="https://smartbear.com/learn/code-review/best-practices-for-peer-code-review/">Best Practices for Code Review @ Smart Bear</a></h2>
<ol>
<li><p>Review fewer than 400 lines of code at a time</p>
</li>
<li><p>Take your time. Inspection rates should under 500 LOC per hour</p>
</li>
<li><p><strong>Do not review for more than 60 minutes at a time</strong></p>
</li>
<li><p>Set goals and capture metrics</p>
</li>
<li><p><strong>Authors should annotate source code before the review</strong></p>
</li>
<li><p><strong>Use checklists</strong></p>
</li>
<li><p>Establish a process for fixing defects</p>
</li>
<li><p><strong>Foster a positive code review culture</strong></p>
</li>
<li><p>Embrace the subconscious implications of peer review</p>
</li>
<li><p><strong>Practice lightweight code reviews</strong></p>
</li>
</ol>
</div>mimetext/htmlrootassigneelast_run_timestampAE(tpersist_js_state·has_pluto_hook_features§cell_id$e2a60b81-1584-4d2d-8b08-9055d362cdfbdepends_on_disabled_cells§runtime [published_object_keysdepends_on_skipped_cells§errored$d2d20b37-37c0-4bc4-bd20-ad28d367545aqueued¤logsrunning¦outputbodyٟ<div class="markdown"><p>But be careful... sometimes different algorithms give different results.  E.g., whether sorting is <strong>stable</strong>.</p>
</div>mimetext/htmlrootassigneelast_run_timestampAE(
persist_js_state·has_pluto_hook_features§cell_id$d2d20b37-37c0-4bc4-bd20-ad28d367545adepends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$f0fc9af7-737c-4c08-a772-1136be959a6dqueued¤logsrunning¦outputbodya<div class="markdown"><ul>
<li><p>It&#39;s more efficient to split up code into separate functions &#40;regardless of whether they are in the same cell or not&#41;.</p>
</li>
<li><p>There might be a very slight latency cost of having lots of cells.  But that&#39;s unlikley significant unless you are making a really big notebook.</p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(ưpersist_js_state·has_pluto_hook_features§cell_id$f0fc9af7-737c-4c08-a772-1136be959a6ddepends_on_disabled_cells§runtime kpublished_object_keysdepends_on_skipped_cells§errored$c8b93838-61ee-4c11-82de-e54a1d1b68afqueued¤logsrunning¦outputbodyP<div class="markdown"><h2 id="Garbage-collection">Garbage collection</h2>
</div>mimetext/htmlrootassigneelast_run_timestampAE(Ëpersist_js_state·has_pluto_hook_features§cell_id$c8b93838-61ee-4c11-82de-e54a1d1b68afdepends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$dd6c279f-d09b-4789-8776-7553dd023e1bqueued¤logsrunning¦outputbody
<div class='pluto-test call correct pass prefix-operator'>
	<script>
	
	const div = currentScript.parentElement
	div.addEventListener("click", (e) => {
		if(!div.classList.contains("expanded") || e.target.closest("pt-dot:not(.floating)") != null){
			div.classList.toggle("expanded")
			e.stopPropagation()
		}
	})
	
	const throttled = (f, delay) => {
		const waiting = { current: false }
		return () => {
			if (!waiting.current) {
				f()
				waiting.current = true
				setTimeout(() => {
					f()
					waiting.current = false
				}, delay)
			}
		}
	}
	
	const dot = div.querySelector("pt-dot")
	const dot_top = div.querySelector("pt-dot.top")
	const dot_bot = div.querySelector("pt-dot.bottom")
	
	const is_chrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor)
	const is_firefox = /Firefox/.test(navigator.userAgent) && /Mozilla/.test(navigator.userAgent)
	
	// safari is too slow
	
	if(is_chrome || is_firefox){

	const intersect = (r) => {
		const topdistance = r.top
		const botdistance = window.innerHeight - r.bottom
	
		
		const t = (x) => `translate(${2*Math.sqrt(Math.max(0,-50-x))}px,0)`
		dot_top.style.transform = t(topdistance)
		dot_bot.style.transform = t(botdistance)

		div.classList.toggle("show-top-float", topdistance < 4)
		div.classList.toggle("show-bottom-float", botdistance < 4)
	}
	
	intersect(dot.getBoundingClientRect())
	
	const scroll_listener = throttled(() => {
		intersect(dot.getBoundingClientRect())
	}, 200)
	
	window.addEventListener("scroll", scroll_listener)

	let observer = new IntersectionObserver((es) => {
		const e = es[0]
		intersect(e.boundingClientRect)
	},  {
	  rootMargin: '-4px',
	  threshold: 1.0
	});

	observer.observe(dot)
	invalidation.then(() => {
		window.removeEventListener("scroll", scroll_listener)
		observer.unobserve(dot)
	})
	
	Array.from(div.querySelectorAll("pt-dot.floating")).forEach(e => {
		e.addEventListener("click", () => dot.scrollIntoView({behavior: "smooth", block: "center", inline: "nearest"}))
	})
	
	}
	
	</script>
	<pt-dot></pt-dot>
	<pt-dot class="floating top"></pt-dot>
	<pt-dot class="floating bottom"></pt-dot>

	<p-frame-viewer>
	<p-frames>
	<slotted-code>
<line-like><pre-ish>all(x_sorted_default .== x_sorted_insertion) &amp;&amp; (all(x_sorted_default .== x_sorted_merge) &amp;&amp; all(x_sorted_default .== x_sorted_quick))</pre-ish></line-like>
</slotted-code><slotted-code>
<line-like><pluto-display></pluto-display><script id=flvzadgvbkhigfsj>const body = /* See the documentation for AbstractPlutoDingetjes.Display.published_to_js */ getPublishedObject("d80f4b82-bfd9-11f0-2d47-2376ea611b3d/eeaeaa7a973499cf");const mime = "text/plain";const create_new = this == null || this._mime !== mime;const display = create_new ? currentScript.previousElementSibling : this;display.persist_js_state = true;display.sanitize_html = false;display.body = body;if(create_new) {        display.mime = mime;        display._mime = mime;}return display;</script><pre-ish></pre-ish></line-like>
</slotted-code>
	</p-frames>
	
	<p-frame-controls>
		<img src="https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/time-outline.svg" style="width: 1em; height: 1em; transform: scale(-1,1); opacity: .5; margin-left: 2em;">
		<input class="timescrub" style="filter: hue-rotate(149deg) grayscale(.9);" type=range min=1 max='2' value='1'>
	</p-frame-controls>
	
	
	<script>
	const div = currentScript.parentElement
	
	const input = div.querySelector(":scope > p-frame-controls > input.timescrub")
	const frames = div.querySelector(":scope > p-frames")
	
	const setviz = () => {
		Array.from(frames.children).forEach((f,i) => {
			f.style.display = i + 1 === input.valueAsNumber ? "inherit" : "none"
		})
	}
	
	setviz()
	
	input.addEventListener("input", setviz)
	</script>

	<style>
	PlutoTest.PlutoStylesheet("p-frame-viewer {\n\tdisplay: inline-flex;\n\tflex-direction: column;\n}\np-frames,\np-frame-controls {\n\tdisplay: inline-flex;\n}\n")
	</style>
</p-frame-viewer>
</div>
<style>
pt-dot {
	flex: 0 0 auto;
	background: grey;
	width: 1em;
	height: 1em;
	bottom: -.1em;
	border-radius: 100%;
	margin-right: .7em;
	display: block;
	position: relative;
	cursor: pointer;
}

pt-dot.floating {
	position: fixed;
	z-index: 60;
	visibility: hidden;
	transition: transform linear 240ms;
	opacity: .8;
}
.show-top-float > pt-dot.floating.top,
.show-bottom-float > pt-dot.floating.bottom {
	visibility: visible;
}

pt-dot.floating.top {
	top: 5px;
}
pt-dot.floating.bottom {
	bottom: 5px;
}


.fail > pt-dot {
	background: #f75d5d;

}
.pass > pt-dot {
	background: #56a038;
}

@keyframes fadeout {
    0% { opacity: 1;}
    100% { opacity: 0; pointer-events: none;}
}


.pass > pt-dot.floating {
    animation: fadeout 2s;

	animation-fill-mode: both;
	animation-delay: 2s;

	/*opacity: 0.4;*/
}


.pluto-test {
	font-family: "JuliaMono", monospace;
	font-size: 0.75rem;
	white-space: normal;
	padding: 4px;

	min-height: 25px;
}


.pluto-test.pass {
	color: rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
	.pluto-test.pass {
		color: rgba(200, 200, 200, 0.5);
	}
}

.pluto-test.fail {
background: linear-gradient(90deg, #ff2e2e14, transparent);
border-radius: 7px;
}


.pluto-test>.arg_result {
	flex: 0 0 auto;
}

.pluto-test>.arg_result>div,
.pluto-test>.arg_result>div>pluto-display>div {
	display: inline-flex;
}


.pluto-test>.comma {
	margin-right: .5em;
}

.pluto-test.call>code {
	padding: 0px;
}

.pluto-test.call.infix-operator>div {
	overflow-x: auto;
}

.pluto-test {
	display: flex;
	align-items: baseline;
}

.pluto-test.call.infix-operator>.fname {
	margin: 0px .6em;
	/*color: darkred;*/
}


/* expanding */


.pluto-test:not(.expanded) {
	cursor: pointer;
}

.pluto-test:not(.expanded) > p-frame-viewer > p-frame-controls {
	display: none;
	
}

.pluto-test.expanded > p-frame-viewer {
    max-width: 100%;
}
.pluto-test.expanded > p-frame-viewer > p-frames > slotted-code > line-like {
	flex-wrap: wrap;
}
.pluto-test.expanded > p-frame-viewer > p-frames > slotted-code > line-like > pluto-display[mime="application/vnd.pluto.tree+object"] {
	/*flex-basis: 100%;*/
}

slotted-code {
	font-family: "JuliaMono", monospace;
	font-size: .75rem;
	display: flex;
	flex-direction: column;
}
pre-ish {
	white-space: pre;
}

line-like {
	display: flex;
	align-items: baseline;
}

</style>


mimetext/htmlrootassigneelast_run_timestampAE(!persist_js_state·has_pluto_hook_features§cell_id$dd6c279f-d09b-4789-8776-7553dd023e1bdepends_on_disabled_cells§runtimeѵpublished_object_keys5d80f4b82-bfd9-11f0-2d47-2376ea611b3d/eeaeaa7a973499cfdepends_on_skipped_cells§errored$0969fdf8-9223-4e48-99f9-ef353d92fdb2queued¤logsrunning¦outputbody7<div class="nice-blockquote nice-blockquote__bordered nice-blockquote--quoted">
<p class="nice-blockquote__text">
<div class="markdown"><p>How does one check if the code would cause a memory leak?</p>
</div>
</p>
<div class="nice-blockquote__text nice-blockquote__text--author">

</div> 
</div> 
<style> 
.nice-blockquote{
padding: 25px;
border: 0.5px solid #ccc;
box-sizing:border-box;
overflow-y:hidden;
}
.nice-blockquote__bordered{
border-left-width: 14px;
}
p.nice-blockquote__text::before,
p.nice-blockquote__text::after{
    content: open-quote;
    font-size: 70px;
    font-family: Arial;
    font-weight: bold;
    color: #ccc;
    display: block;
    /* margin-top: -20px; */
    /* margin-bottom: -40px; */
    font-family: Arial;
    float: left;
    /* padding: 0.1ch 1ch; */
}

p.nice-blockquote__text::before{
    padding-inline-end: .2ch;
    line-height: 0.5;
}
p.nice-blockquote__text::after{
    content: close-quote;
    float: right;
    padding-inline-start: .2ch;
        line-height: .7;
}
    
.nice-blockquote__text{
font-family: Arial;
font-style: italic;
margin:0;
line height: 1.5;
text-align:left;
}
.nice-blockquote__text:not(:last_child){
margin-bottom:10px;
}
.nice-blockquote__text--author{
    font-weight:bold;
    font-style: normal;
    text-align:right;
    margin-block-start: 3em;
}

</style>
mimetext/htmlrootassigneelast_run_timestampAE(Ȱpersist_js_state·has_pluto_hook_features§cell_id$0969fdf8-9223-4e48-99f9-ef353d92fdb2depends_on_disabled_cells§runtime 2published_object_keysdepends_on_skipped_cells§errored$5ad00ac5-b689-40b5-ba2d-905b340a47ffqueued¤logsrunning¦outputbody<div class="markdown"><h1 id="Preping-for-Code-Review">Preping for Code Review</h1>
<h2 id="Make-it-easy-for-your-reviewer">Make it easy for your reviewer</h2>
<ul>
<li><p>Provide overview of what your code is doing in README.md</p>
</li>
<li><p>Where should they start?</p>
</li>
<li><p>What files should they focus on?</p>
</li>
<li><p>What files should they ignore?</p>
</li>
<li><p>Include an example of how to run/use code</p>
</li>
</ul>
<h2 id="Make-it-easy-for-you">Make it easy for you</h2>
<p>As code starts getting larger, then</p>
<ul>
<li><p>Move code out of notebooks and into <code>.jl</code> files, as functions mature.</p>
</li>
<li><p>Organize similar functions into <code>.jl</code> files in <code>src</code> directory</p>
</li>
<li><p>Use diretories like <code>examples</code>, <code>test</code></p>
</li>
<li><p>If/when appropiate add more directories &#40;e.g., <code>data</code>, <code>deps</code>, <code>docs</code>&#41;</p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(persist_js_state·has_pluto_hook_features§cell_id$5ad00ac5-b689-40b5-ba2d-905b340a47ffdepends_on_disabled_cells§runtime xpublished_object_keysdepends_on_skipped_cells§errored$0d655992-c218-4f68-b7e8-45aa3454000bqueued¤logsrunning¦outputbody<div class="markdown"><h3 id="Peer-Code-Review">Peer Code Review</h3>
<ul>
<li><p>Constructive suggestions for improving programming practices &#40;1 point&#41;</p>
</li>
<li><p>Specific, constructive suggestions for improving code readability/documentation &#40;1 point&#41;</p>
</li>
<li><p>Specific, constructive suggestions for improving tests and/or assertions &#40;1 point&#41;</p>
</li>
<li><p>Specific, constructive suggestions for improving code modularity/organization/maintainability &#40;1 point&#41;</p>
</li>
<li><p>Specific, constructive suggestions for improving code efficiency &#40;1 point&#41;</p>
</li>
<li><p>Finding any bugs &#40;if code author confirms&#41; &#40;bonus points?&#41;</p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(xpersist_js_state·has_pluto_hook_features§cell_id$0d655992-c218-4f68-b7e8-45aa3454000bdepends_on_disabled_cells§runtime 	Rpublished_object_keysdepends_on_skipped_cells§errored$09199e18-da64-4abb-8053-e3bc0448df8bqueued¤logsrunning¦outputbodyX<div class="markdown"><p>Then from python/Jupyter notebook with Python kernel</p>
</div>mimetext/htmlrootassigneelast_run_timestampAE(Zpersist_js_state·has_pluto_hook_features§cell_id$09199e18-da64-4abb-8053-e3bc0448df8bdepends_on_disabled_cells§runtime published_object_keysdepends_on_skipped_cells§errored$d2f4bb2d-d222-4c61-9c63-a57bdfef1927queued¤logsrunning¦outputbody٤<div class="markdown"><pre><code class="language-python">import numpy as np
x &#61; np.array&#40;&#91;1.0, 2.0, 3.0&#93;&#41;

jl.sum&#40;x&#41;</code></pre>
</div>mimetext/htmlrootassigneelast_run_timestampAE(3ʰpersist_js_state·has_pluto_hook_features§cell_id$d2f4bb2d-d222-4c61-9c63-a57bdfef1927depends_on_disabled_cells§runtime Vpublished_object_keysdepends_on_skipped_cells§errored$531f25b0-2d29-4db1-ab44-b927b6377945queued¤logsrunning¦outputbodymimetext/plainrootassigneelast_run_timestampAE(薰persist_js_state·has_pluto_hook_features§cell_id$531f25b0-2d29-4db1-ab44-b927b6377945depends_on_disabled_cells§runtime4\published_object_keysdepends_on_skipped_cells§errored$e203823e-3a1f-4812-b2a9-6ab80a811860queued¤logsrunning¦outputbodyelementsprefixTuple{Int64, Float64}elementselements1text/plain-0.0237115text/plaintypeTupleobjectid3eef504cc33d5026!application/vnd.pluto.tree+objectelements1text/plain1.29865text/plaintypeTupleobjectid263c27b84fbb3f0d!application/vnd.pluto.tree+objectelements1text/plain0.251877text/plaintypeTupleobjectid35d5a701232c61!application/vnd.pluto.tree+objectelements1text/plain0.545858text/plaintypeTupleobjectid3d1e46f0c5e73070!application/vnd.pluto.tree+objectelements1text/plain-0.442368text/plaintypeTupleobjectid8a1ed1b92f112b9c!application/vnd.pluto.tree+objectelements1text/plain1.11572text/plaintypeTupleobjectid412fa3c4b5513e9e!application/vnd.pluto.tree+objectelements2text/plain0.371891text/plaintypeTupleobjectid526534794d2c20c7!application/vnd.pluto.tree+objectelements2text/plain-0.891838text/plaintypeTupleobjectidac0f0351f205dd1b!application/vnd.pluto.tree+object	elements2text/plain1.97173text/plaintypeTupleobjectidbccb1f59c8bc7d06!application/vnd.pluto.tree+objectmoredelements10text/plain-0.62174text/plaintypeTupleobjectidf711ebda3a06b010!application/vnd.pluto.tree+objecttypeArrayprefix_shortobjectidb27370dcd788a222!application/vnd.pluto.tree+objectprefixTuple{Int64, Float64}elementselements1text/plain-0.442368text/plaintypeTupleobjectid8a1ed1b92f112b9c!application/vnd.pluto.tree+objectelements1text/plain1.11572text/plaintypeTupleobjectid412fa3c4b5513e9e!application/vnd.pluto.tree+objectelements1text/plain0.545858text/plaintypeTupleobjectid3d1e46f0c5e73070!application/vnd.pluto.tree+objectelements1text/plain0.251877text/plaintypeTupleobjectid35d5a701232c61!application/vnd.pluto.tree+objectelements1text/plain1.29865text/plaintypeTupleobjectid263c27b84fbb3f0d!application/vnd.pluto.tree+objectelements1text/plain-0.0237115text/plaintypeTupleobjectid3eef504cc33d5026!application/vnd.pluto.tree+objectelements2text/plain1.97173text/plaintypeTupleobjectidbccb1f59c8bc7d06!application/vnd.pluto.tree+objectelements2text/plain-0.835618text/plaintypeTupleobjectid3262905619682fd9!application/vnd.pluto.tree+object	elements2text/plain-1.04491text/plaintypeTupleobjectide05063adcd49096!application/vnd.pluto.tree+objectmoredelements10text/plain0.390087text/plaintypeTupleobjectid6592aeffe50252d!application/vnd.pluto.tree+objecttypeArrayprefix_shortobjectid1e6f91a0edc207e0!application/vnd.pluto.tree+objecttypeTupleobjectid2152a0956eeede48mime!application/vnd.pluto.tree+objectrootassigneelast_run_timestampAE(H|persist_js_state·has_pluto_hook_features§cell_id$e203823e-3a1f-4812-b2a9-6ab80a811860depends_on_disabled_cells§runtime,ٵpublished_object_keysdepends_on_skipped_cells§errored$9380c6be-90bc-47fa-98b5-92e0e8539110queued¤logsrunning¦outputbody<div class="markdown"><h2 id="Prioritizing-Code-Review-Feedback">Prioritizing Code Review Feedback</h2>
<p><img src="https://miro.medium.com/max/560/1*zOvsiXkzqVJ7O8KalHhDZQ.jpeg" alt="Handle conflicts different based on the severity. Credit: Alex Hill" /></p>
<ul>
<li><p>Credit:  <a href="https://betterprogramming.pub/13-code-review-standards-inspired-by-google-6b8f99f7fd67">Alex Hill</a></p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(Hpersist_js_state·has_pluto_hook_features§cell_id$9380c6be-90bc-47fa-98b5-92e0e8539110depends_on_disabled_cells§runtime *published_object_keysdepends_on_skipped_cells§errored$d8fd8af3-a65d-4230-bb35-e1144e459520queued¤logsrunning¦outputbody`<div class="nice-blockquote nice-blockquote__bordered nice-blockquote--quoted">
<p class="nice-blockquote__text">
<div class="markdown"><p>What exactly is &quot;scratch&quot; memory, and what differentiates it from other kinds of memory?</p>
</div>
</p>
<div class="nice-blockquote__text nice-blockquote__text--author">

</div> 
</div> 
<style> 
.nice-blockquote{
padding: 25px;
border: 0.5px solid #ccc;
box-sizing:border-box;
overflow-y:hidden;
}
.nice-blockquote__bordered{
border-left-width: 14px;
}
p.nice-blockquote__text::before,
p.nice-blockquote__text::after{
    content: open-quote;
    font-size: 70px;
    font-family: Arial;
    font-weight: bold;
    color: #ccc;
    display: block;
    /* margin-top: -20px; */
    /* margin-bottom: -40px; */
    font-family: Arial;
    float: left;
    /* padding: 0.1ch 1ch; */
}

p.nice-blockquote__text::before{
    padding-inline-end: .2ch;
    line-height: 0.5;
}
p.nice-blockquote__text::after{
    content: close-quote;
    float: right;
    padding-inline-start: .2ch;
        line-height: .7;
}
    
.nice-blockquote__text{
font-family: Arial;
font-style: italic;
margin:0;
line height: 1.5;
text-align:left;
}
.nice-blockquote__text:not(:last_child){
margin-bottom:10px;
}
.nice-blockquote__text--author{
    font-weight:bold;
    font-style: normal;
    text-align:right;
    margin-block-start: 3em;
}

</style>
mimetext/htmlrootassigneelast_run_timestampAE(ɠ8persist_js_state·has_pluto_hook_features§cell_id$d8fd8af3-a65d-4230-bb35-e1144e459520depends_on_disabled_cells§runtime *published_object_keysdepends_on_skipped_cells§errored$2097dafd-e457-46b4-b6d6-fdf6f66c6675queued¤logsrunning¦outputbody<div class="markdown"><ul>
<li><p>Read the documentation </p>
</li>
<li><p>Choose the algorithm for your problem &#40;e.g., <a href="https://docs.julialang.org/en/v1/base/sort/#Base.Sort.InsertionSort">Description of sorting algorithms</a>&#41;</p>
</li>
<li><p>Consider order of algorithm and whether <em>in-place</em></p>
</li>
<li><p>Most often, I choose the algorithm that&#39;s best fit for my data.</p>
</li>
<li><p>But sometimes I might change the data structure to be a better fit for my algorithm</p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(persist_js_state·has_pluto_hook_features§cell_id$2097dafd-e457-46b4-b6d6-fdf6f66c6675depends_on_disabled_cells§runtime 	#,published_object_keysdepends_on_skipped_cells§errored$c94864a5-996d-432d-8e14-888991c8e119queued¤logsrunning¦outputbodyP<script>
	
// Load the library for consistent smooth scrolling
const {default: scrollIntoView} = await import("data:text/javascript;base64,dmFyIFE9ZT0+Im9iamVjdCI9PXR5cGVvZiBlJiZudWxsIT1lJiYxPT09ZS5ub2RlVHlwZSxVPShlLHQpPT4oIXR8fCJoaWRkZW4iIT09ZSkmJiJ2aXNpYmxlIiE9PWUmJiJjbGlwIiE9PWUsQT0oZSx0KT0+e2lmKGUuY2xpZW50SGVpZ2h0PGUuc2Nyb2xsSGVpZ2h0fHxlLmNsaWVudFdpZHRoPGUuc2Nyb2xsV2lkdGgpe2xldCBsPWdldENvbXB1dGVkU3R5bGUoZSxudWxsKTtyZXR1cm4gVShsLm92ZXJmbG93WSx0KXx8VShsLm92ZXJmbG93WCx0KXx8KGU9PntsZXQgdD0oZT0+e2lmKCFlLm93bmVyRG9jdW1lbnR8fCFlLm93bmVyRG9jdW1lbnQuZGVmYXVsdFZpZXcpcmV0dXJuIG51bGw7dHJ5e3JldHVybiBlLm93bmVyRG9jdW1lbnQuZGVmYXVsdFZpZXcuZnJhbWVFbGVtZW50fWNhdGNoe3JldHVybiBudWxsfX0pKGUpO3JldHVybiEhdCYmKHQuY2xpZW50SGVpZ2h0PGUuc2Nyb2xsSGVpZ2h0fHx0LmNsaWVudFdpZHRoPGUuc2Nyb2xsV2lkdGgpfSkoZSl9cmV0dXJuITF9LFg9KGUsdCxsLG8sbixyLGkscyk9PnI8ZSYmaT50fHxyPmUmJmk8dD8wOnI8PWUmJnM8PWx8fGk+PXQmJnM+PWw/ci1lLW86aT50JiZzPGx8fHI8ZSYmcz5sP2ktdCtuOjAsJD1lPT5lLnBhcmVudEVsZW1lbnQ/PyhlLmdldFJvb3ROb2RlKCkuaG9zdHx8bnVsbCksdHQ9KGUsdCk9Pnt2YXIgbCxvLG4scjtpZih0eXBlb2YgZG9jdW1lbnQ+InUiKXJldHVybltdO2xldHtzY3JvbGxNb2RlOmksYmxvY2s6cyxpbmxpbmU6YSxib3VuZGFyeTpoLHNraXBPdmVyZmxvd0hpZGRlbkVsZW1lbnRzOnV9PXQsZz0iZnVuY3Rpb24iPT10eXBlb2YgaD9oOmU9PmUhPT1oO2lmKCFRKGUpKXRocm93IFR5cGVFcnJvcigiSW52YWxpZCB0YXJnZXQiKTtsZXQgdj1kb2N1bWVudC5zY3JvbGxpbmdFbGVtZW50fHxkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQsbT1bXSx3PWU7Zm9yKDtRKHcpJiZnKHcpOyl7aWYoKHc9JCh3KSk9PT12KXttLnB1c2godyk7YnJlYWt9bnVsbCE9dyYmdz09PWRvY3VtZW50LmJvZHkmJkEodykmJiFBKGRvY3VtZW50LmRvY3VtZW50RWxlbWVudCl8fG51bGwhPXcmJkEodyx1KSYmbS5wdXNoKHcpfWxldCBXPW51bGwhPShvPW51bGw9PShsPXdpbmRvdy52aXN1YWxWaWV3cG9ydCk/dm9pZCAwOmwud2lkdGgpP286aW5uZXJXaWR0aCxIPW51bGwhPShyPW51bGw9PShuPXdpbmRvdy52aXN1YWxWaWV3cG9ydCk/dm9pZCAwOm4uaGVpZ2h0KT9yOmlubmVySGVpZ2h0LHtzY3JvbGxYOl8sc2Nyb2xsWTp4fT13aW5kb3cse2hlaWdodDpFLHdpZHRoOlQsdG9wOk4scmlnaHQ6TCxib3R0b206WSxsZWZ0OkN9PWUuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCksUj0ic3RhcnQiPT09c3x8Im5lYXJlc3QiPT09cz9OOiJlbmQiPT09cz9ZOk4rRS8yLFY9ImNlbnRlciI9PT1hP0MrVC8yOiJlbmQiPT09YT9MOkMsQj1bXTtmb3IobGV0IEQ9MDtEPG0ubGVuZ3RoO0QrKyl7bGV0IE89bVtEXSx7aGVpZ2h0Omosd2lkdGg6SSx0b3A6UyxyaWdodDpxLGJvdHRvbTp6LGxlZnQ6Rn09Ty5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTtpZigiaWYtbmVlZGVkIj09PWkmJk4+PTAmJkM+PTAmJlk8PUgmJkw8PVcmJk4+PVMmJlk8PXomJkM+PUYmJkw8PXEpYnJlYWs7bGV0IEc9Z2V0Q29tcHV0ZWRTdHlsZShPKSxKPXBhcnNlSW50KEcuYm9yZGVyTGVmdFdpZHRoLDEwKSxLPXBhcnNlSW50KEcuYm9yZGVyVG9wV2lkdGgsMTApLFA9cGFyc2VJbnQoRy5ib3JkZXJSaWdodFdpZHRoLDEwKSxaPXBhcnNlSW50KEcuYm9yZGVyQm90dG9tV2lkdGgsMTApLGVlPTAsZXQ9MCxlbD0ib2Zmc2V0V2lkdGgiaW4gTz9PLm9mZnNldFdpZHRoLU8uY2xpZW50V2lkdGgtSi1QOjAsZW89Im9mZnNldEhlaWdodCJpbiBPP08ub2Zmc2V0SGVpZ2h0LU8uY2xpZW50SGVpZ2h0LUstWjowLGVuPSJvZmZzZXRXaWR0aCJpbiBPPzA9PT1PLm9mZnNldFdpZHRoPzA6SS9PLm9mZnNldFdpZHRoOjAsZXI9Im9mZnNldEhlaWdodCJpbiBPPzA9PT1PLm9mZnNldEhlaWdodD8wOmovTy5vZmZzZXRIZWlnaHQ6MDtpZih2PT09TyllZT0ic3RhcnQiPT09cz9SOiJlbmQiPT09cz9SLUg6Im5lYXJlc3QiPT09cz9YKHgseCtILEgsSyxaLHgrUix4K1IrRSxFKTpSLUgvMixldD0ic3RhcnQiPT09YT9WOiJjZW50ZXIiPT09YT9WLVcvMjoiZW5kIj09PWE/Vi1XOlgoXyxfK1csVyxKLFAsXytWLF8rVitULFQpLGVlPU1hdGgubWF4KDAsZWUreCksZXQ9TWF0aC5tYXgoMCxldCtfKTtlbHNle2VlPSJzdGFydCI9PT1zP1ItUy1LOiJlbmQiPT09cz9SLXorWitlbzoibmVhcmVzdCI9PT1zP1goUyx6LGosSyxaK2VvLFIsUitFLEUpOlItKFMrai8yKStlby8yLGV0PSJzdGFydCI9PT1hP1YtRi1KOiJjZW50ZXIiPT09YT9WLShGK0kvMikrZWwvMjoiZW5kIj09PWE/Vi1xK1ArZWw6WChGLHEsSSxKLFArZWwsVixWK1QsVCk7bGV0e3Njcm9sbExlZnQ6ZWksc2Nyb2xsVG9wOmVkfT1PO2VlPU1hdGgubWF4KDAsTWF0aC5taW4oZWQrZWUvZXIsTy5zY3JvbGxIZWlnaHQtai9lcitlbykpLGV0PU1hdGgubWF4KDAsTWF0aC5taW4oZWkrZXQvZW4sTy5zY3JvbGxXaWR0aC1JL2VuK2VsKSksUis9ZWQtZWUsVis9ZWktZXR9Qi5wdXNoKHtlbDpPLHRvcDplZSxsZWZ0OmV0fSl9cmV0dXJuIEJ9LGY9ZT0+e3ZhciB0O3JldHVybiExPT09ZT97YmxvY2s6ImVuZCIsaW5saW5lOiJuZWFyZXN0In06KHQ9ZSk9PT1PYmplY3QodCkmJjAhPT1PYmplY3Qua2V5cyh0KS5sZW5ndGg/ZTp7YmxvY2s6InN0YXJ0IixpbmxpbmU6Im5lYXJlc3QifX07ZnVuY3Rpb24gYyhlLHQpe3ZhciBsO2lmKCFlLmlzQ29ubmVjdGVkfHwhKGU9PntsZXQgdD1lO2Zvcig7dCYmdC5wYXJlbnROb2RlOyl7aWYodC5wYXJlbnROb2RlPT09ZG9jdW1lbnQpcmV0dXJuITA7dD10LnBhcmVudE5vZGUgaW5zdGFuY2VvZiBTaGFkb3dSb290P3QucGFyZW50Tm9kZS5ob3N0OnQucGFyZW50Tm9kZX1yZXR1cm4hMX0pKGUpKXJldHVybjtpZigib2JqZWN0Ij09dHlwZW9mKGw9dCkmJiJmdW5jdGlvbiI9PXR5cGVvZiBsLmJlaGF2aW9yKXJldHVybiB0LmJlaGF2aW9yKHR0KGUsdCkpO2xldCBvPSJib29sZWFuIj09dHlwZW9mIHR8fG51bGw9PXQ/dm9pZCAwOnQuYmVoYXZpb3I7Zm9yKGxldHtlbDpuLHRvcDpyLGxlZnQ6aX1vZiB0dChlLGYodCkpKW4uc2Nyb2xsKHt0b3A6cixsZWZ0OmksYmVoYXZpb3I6b30pfXZhciBkLHA9KCk9PihkfHwoZD0icGVyZm9ybWFuY2UiaW4gd2luZG93P3BlcmZvcm1hbmNlLm5vdy5iaW5kKHBlcmZvcm1hbmNlKTpEYXRlLm5vdyksZCgpKTtmdW5jdGlvbiBiKGUpe2xldCB0PU1hdGgubWluKChwKCktZS5zdGFydFRpbWUpL2UuZHVyYXRpb24sMSksbD1lLmVhc2UodCksbz1lLnN0YXJ0WCsoZS54LWUuc3RhcnRYKSpsLG49ZS5zdGFydFkrKGUueS1lLnN0YXJ0WSkqbDtlLm1ldGhvZChvLG4sdCxsKSxvIT09ZS54fHxuIT09ZS55P3JlcXVlc3RBbmltYXRpb25GcmFtZSgoKT0+YihlKSk6ZS5jYigpfWZ1bmN0aW9uIHkoZSx0LGwpe2xldCBvPWFyZ3VtZW50cy5sZW5ndGg+MyYmdm9pZCAwIT09YXJndW1lbnRzWzNdP2FyZ3VtZW50c1szXTo2MDAsbj1hcmd1bWVudHMubGVuZ3RoPjQmJnZvaWQgMCE9PWFyZ3VtZW50c1s0XT9hcmd1bWVudHNbNF06ZT0+MSstLWUqZSplKmUqZSxyPWFyZ3VtZW50cy5sZW5ndGg+NT9hcmd1bWVudHNbNV06dm9pZCAwLGk9YXJndW1lbnRzLmxlbmd0aD42P2FyZ3VtZW50c1s2XTp2b2lkIDAscz1lLnNjcm9sbExlZnQsYT1lLnNjcm9sbFRvcDtiKHtzY3JvbGxhYmxlOmUsbWV0aG9kKHQsbCxvLG4pe2xldCByPU1hdGguY2VpbCh0KSxzPU1hdGguY2VpbChsKTtlLnNjcm9sbExlZnQ9cixlLnNjcm9sbFRvcD1zLGk/Lih7dGFyZ2V0OmUsZWxhcHNlZDpvLHZhbHVlOm4sbGVmdDpyLHRvcDpzfSl9LHN0YXJ0VGltZTpwKCksc3RhcnRYOnMsc3RhcnRZOmEseDp0LHk6bCxkdXJhdGlvbjpvLGVhc2U6bixjYjpyfSl9dmFyIE09ZT0+ZSYmIWUuYmVoYXZpb3J8fCJzbW9vdGgiPT09ZS5iZWhhdmlvcixrPWZ1bmN0aW9uKGUsdCl7bGV0IGw9dHx8e307cmV0dXJuIE0obCk/YyhlLHtibG9jazpsLmJsb2NrLGlubGluZTpsLmlubGluZSxzY3JvbGxNb2RlOmwuc2Nyb2xsTW9kZSxib3VuZGFyeTpsLmJvdW5kYXJ5LHNraXBPdmVyZmxvd0hpZGRlbkVsZW1lbnRzOmwuc2tpcE92ZXJmbG93SGlkZGVuRWxlbWVudHMsYmVoYXZpb3I6ZT0+UHJvbWlzZS5hbGwoZS5yZWR1Y2UoKGUsdCk9PntsZXR7ZWw6byxsZWZ0Om4sdG9wOnJ9PXQsaT1vLnNjcm9sbExlZnQscz1vLnNjcm9sbFRvcDtyZXR1cm4gaT09PW4mJnM9PT1yP2U6Wy4uLmUsbmV3IFByb21pc2UoZT0+eShvLG4scixsLmR1cmF0aW9uLGwuZWFzZSwoKT0+ZSh7ZWw6byxsZWZ0OltpLG5dLHRvcDpbcyxyXX0pLGwub25TY3JvbGxDaGFuZ2UpKV19LFtdKSl9KTpQcm9taXNlLnJlc29sdmUoYyhlLHQpKX07ZXhwb3J0e2sgYXMgZGVmYXVsdH07")

const indent = true
const aside = true
const title_text = "Table of Contents"
const include_definitions = false


const tocNode = html`<nav class="plutoui-toc">
	<header>
	 <span class="toc-toggle open-toc"></span>
	 <span class="toc-toggle closed-toc"></span>
	 ${title_text}
	</header>
	<section></section>
</nav>`

tocNode.classList.toggle("aside", aside)
tocNode.classList.toggle("indent", indent)


const getParentCell = el => el.closest("pluto-cell")

const getHeaders = () => {
	const depth = Math.max(1, Math.min(6, 3)) // should be in range 1:6
	const range = Array.from({length: depth}, (x, i) => i+1) // [1, ..., depth]
	
	const selector = [
		...(include_definitions ? [
			`pluto-notebook pluto-cell .pluto-docs-binding`, 
			`pluto-notebook pluto-cell assignee:not(:empty)`, 
		] : []),
		...range.map(i => `pluto-notebook pluto-cell h${i}`)
	].join(",")
	return Array.from(document.querySelectorAll(selector)).filter(el => 
		// exclude headers inside of a pluto-docs-binding block
		!(el.nodeName.startsWith("H") && el.closest(".pluto-docs-binding")) && !el.classList.contains("no-toc")
	)
}


const document_click_handler = (event) => {
	const path = (event.path || event.composedPath())
	const toc = path.find(elem => elem?.classList?.contains?.("toc-toggle"))
	if (toc) {
		event.stopImmediatePropagation()
		toc.closest(".plutoui-toc").classList.toggle("hide")
	}
}

document.addEventListener("click", document_click_handler)


const header_to_index_entry_map = new Map()
const currently_highlighted_set = new Set()

const last_toc_element_click_time = { current: 0 }

const intersection_callback = (ixs) => {
	let on_top = ixs.filter(ix => ix.intersectionRatio > 0 && ix.intersectionRect.y < ix.rootBounds.height / 2)
	if(on_top.length > 0){
		currently_highlighted_set.forEach(a => a.classList.remove("in-view"))
		currently_highlighted_set.clear()
		on_top.slice(0,1).forEach(i => {
			let div = header_to_index_entry_map.get(i.target)
			div.classList.add("in-view")
			currently_highlighted_set.add(div)
			
			/// scroll into view
			/*
			const toc_height = tocNode.offsetHeight
			const div_pos = div.offsetTop
			const div_height = div.offsetHeight
			const current_scroll = tocNode.scrollTop
			const header_height = tocNode.querySelector("header").offsetHeight
			
			const scroll_to_top = div_pos - header_height
			const scroll_to_bottom = div_pos + div_height - toc_height
			
			// if we set a scrollTop, then the browser will stop any currently ongoing smoothscroll animation. So let's only do this if you are not currently in a smoothscroll.
			if(Date.now() - last_toc_element_click_time.current >= 2000)
				if(current_scroll < scroll_to_bottom){
					tocNode.scrollTop = scroll_to_bottom
				} else if(current_scroll > scroll_to_top){
					tocNode.scrollTop = scroll_to_top
				}
			*/
		})
	}
}
let intersection_observer_1 = new IntersectionObserver(intersection_callback, {
	root: null, // i.e. the viewport
  	threshold: 1,
	rootMargin: "-15px", // slightly smaller than the viewport
	// delay: 100,
})
let intersection_observer_2 = new IntersectionObserver(intersection_callback, {
	root: null, // i.e. the viewport
  	threshold: 1,
	rootMargin: "15px", // slightly larger than the viewport
	// delay: 100,
})

const render = (elements) => {
	header_to_index_entry_map.clear()
	currently_highlighted_set.clear()
	intersection_observer_1.disconnect()
	intersection_observer_2.disconnect()

		let last_level = `H1`
	return html`${elements.map(h => {
	const parent_cell = getParentCell(h)

		let [className, title_el] = h.matches(`.pluto-docs-binding`) ? ["pluto-docs-binding-el", h.firstElementChild] : [h.nodeName, h]

	const id = title_el.matches("assignee") ?
		title_el.innerText.replace(/^const /, "") :
		title_el.id ?
		title_el.id :
		parent_cell.id
	
	const inner_html = title_el.innerHTML
		
	const a = html`<a 
		class="${className}" 
		title="${title_el.innerText}"
		href="#${id}"
	>${inner_html}</a>`
	/* a.onmouseover=()=>{
		parent_cell.firstElementChild.classList.add(
			'highlight-pluto-cell-shoulder'
		)
	}
	a.onmouseout=() => {
		parent_cell.firstElementChild.classList.remove(
			'highlight-pluto-cell-shoulder'
		)
	} */
		
		
	a.onclick=(e) => {
		e.preventDefault();
		history.replaceState(null, null, a.href)
		last_toc_element_click_time.current = Date.now()
		scrollIntoView(h, {
			behavior: 'smooth', 
			block: 'start',
		}).then(() => 
			// sometimes it doesn't scroll to the right place
			// solution: try a second time!
			scrollIntoView(h, {
				behavior: 'smooth', 
				block: 'start',
			})
	   )
	}
	   
	// Remove any `id` attributes recursively, because they may interfere with linking-to-id using `#`
	const removeIdAttributes = (el) => {
		if (el && el.nodeType === 1) { // Element node
			if (el.hasAttribute?.("id")) el.removeAttribute?.("id")
			el.childNodes.forEach(removeIdAttributes)
		}
	}
	removeIdAttributes(a)

	// Remove Click-To-Copy-Header-ID feature
	a.querySelectorAll("pluto-header-id-copy-wrapper").forEach(el => el.remove())

	const row =  html`<div class="toc-row ${className} after-${last_level}">${a}</div>`
		intersection_observer_1.observe(title_el)
		intersection_observer_2.observe(title_el)
		header_to_index_entry_map.set(title_el, row)

	if(className.startsWith("H"))
		last_level = className
		
	return row
})}`
}

const invalidated = { current: false }

const updateCallback = () => {
	if (!invalidated.current) {
		tocNode.querySelector("section").replaceWith(
			html`<section>${render(getHeaders())}</section>`
		)
	}
}
updateCallback()
setTimeout(updateCallback, 100)
setTimeout(updateCallback, 1000)
setTimeout(updateCallback, 5000)

const notebook = document.querySelector("pluto-notebook")


// We have a mutationobserver for each cell:
const mut_observers = {
	current: [],
}

const createCellObservers = () => {
	mut_observers.current.forEach((o) => o.disconnect())
	mut_observers.current = Array.from(notebook.querySelectorAll("pluto-cell")).map(el => {
		const o = new MutationObserver(updateCallback)
		o.observe(el, {attributeFilter: ["class"]})
		return o
	})
}
createCellObservers()

// And one for the notebook's child list, which updates our cell observers:
const notebookObserver = new MutationObserver(() => {
	updateCallback()
	createCellObservers()
})
notebookObserver.observe(notebook, {childList: true})

// And finally, an observer for the document.body classList, to make sure that the toc also works when it is loaded during notebook initialization
const bodyClassObserver = new MutationObserver(updateCallback)
bodyClassObserver.observe(document.body, {attributeFilter: ["class"]})

// Hide/show the ToC when the screen gets small
let match_listener = () => {
	const small = (tocNode.closest("pluto-editor") ?? document.body).scrollWidth < 1000
	tocNode.classList.toggle("smallscreen", small)
	tocNode.classList.toggle("hide", small)
}
for(let s of [1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) {
	let m = matchMedia(`(max-width: ${s}px)`)
	m.addListener(match_listener)
	invalidation.then(() => m.removeListener(match_listener))
}
match_listener()

invalidation.then(() => {
	invalidated.current = true
	intersection_observer_1.disconnect()
	intersection_observer_2.disconnect()
	notebookObserver.disconnect()
	bodyClassObserver.disconnect()
	mut_observers.current.forEach((o) => o.disconnect())
	document.removeEventListener("click", document_click_handler)
})

return tocNode
</script>
<style>
@media not print {

.plutoui-toc {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Cantarell, "Apple Color Emoji",
		"Segoe UI Emoji", "Segoe UI Symbol", system-ui, sans-serif;
	--main-bg-color: #fafafa;
	--pluto-output-color: hsl(0, 0%, 36%);
	--pluto-output-h-color: hsl(0, 0%, 21%);
	--sidebar-li-active-bg: rgb(235, 235, 235);
	--icon-filter: unset;
}

@media (prefers-color-scheme: dark) {
	.plutoui-toc {
		--main-bg-color: #303030;
		--pluto-output-color: hsl(0, 0%, 90%);
		--pluto-output-h-color: hsl(0, 0%, 97%);
		--sidebar-li-active-bg: rgb(82, 82, 82);
		--icon-filter: invert(1);
	}
}

.plutoui-toc.aside {
	color: var(--pluto-output-color);
	position: fixed;
	right: 1rem;
	top: 5rem;
	width: min(80vw, 300px);
	padding: 0.5rem;
	padding-top: 0em;
	/* border: 3px solid rgba(0, 0, 0, 0.15); */
	border-radius: 10px;
	max-height: calc(100vh - 5rem - 90px);
	overflow: auto;
	z-index: 40;
	background-color: var(--main-bg-color);
	transition: transform 300ms cubic-bezier(0.18, 0.89, 0.45, 1.12);
}

.plutoui-toc.smallscreen:not(.hide) {
	box-shadow: 0 0 11px 0px #00000010;
}

.plutoui-toc.aside.hide {
	transform: translateX(calc(100% - 28px));
	color: transparent;
}
.plutoui-toc.aside.hide section {
	display: none;
}
.plutoui-toc.aside.hide header {
	margin-bottom: 0em;
	padding-bottom: 0em;
	border-bottom: none;
}
}  /* End of Media print query */
.plutoui-toc.aside.hide .open-toc,
.plutoui-toc.aside:not(.hide) .closed-toc,
.plutoui-toc:not(.aside) .closed-toc {
	display: none;
}

@media (prefers-reduced-motion) {
  .plutoui-toc.aside {
	transition-duration: 0s;
  }
}

.toc-toggle {
	cursor: pointer;
    padding: 1em;
    margin: -1em;
    margin-right: -0.7em;
    line-height: 1em;
    display: flex;
}

.toc-toggle::before {
    content: "";
    display: inline-block;
    height: 1em;
    width: 1em;
    background-image: url("https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/list-outline.svg");
	/* generated using https://dopiaza.org/tools/datauri/index.php */
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmlvbmljb25zLXY1LW88L3RpdGxlPjxsaW5lIHgxPSIxNjAiIHkxPSIxNDQiIHgyPSI0NDgiIHkyPSIxNDQiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS13aWR0aDozMnB4Ii8+PGxpbmUgeDE9IjE2MCIgeTE9IjI1NiIgeDI9IjQ0OCIgeTI9IjI1NiIgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzAwMDtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLXdpZHRoOjMycHgiLz48bGluZSB4MT0iMTYwIiB5MT0iMzY4IiB4Mj0iNDQ4IiB5Mj0iMzY4IiBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojMDAwO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6MzJweCIvPjxjaXJjbGUgY3g9IjgwIiBjeT0iMTQ0IiByPSIxNiIgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzAwMDtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLXdpZHRoOjMycHgiLz48Y2lyY2xlIGN4PSI4MCIgY3k9IjI1NiIgcj0iMTYiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS13aWR0aDozMnB4Ii8+PGNpcmNsZSBjeD0iODAiIGN5PSIzNjgiIHI9IjE2IiBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojMDAwO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6MzJweCIvPjwvc3ZnPg==");
    background-size: 1em;
	filter: var(--icon-filter);
}

.aside .toc-toggle.open-toc:hover::before {
    background-image: url("https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/arrow-forward-outline.svg");
	/* generated using https://dopiaza.org/tools/datauri/index.php */
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmlvbmljb25zLXY1LWE8L3RpdGxlPjxwb2x5bGluZSBwb2ludHM9IjI2OCAxMTIgNDEyIDI1NiAyNjggNDAwIiBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojMDAwO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6NDhweCIvPjxsaW5lIHgxPSIzOTIiIHkxPSIyNTYiIHgyPSIxMDAiIHkyPSIyNTYiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS13aWR0aDo0OHB4Ii8+PC9zdmc+");
}
.aside .toc-toggle.closed-toc:hover::before {
    background-image: url("https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/arrow-back-outline.svg");
	/* generated using https://dopiaza.org/tools/datauri/index.php */
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmlvbmljb25zLXY1LWE8L3RpdGxlPjxwb2x5bGluZSBwb2ludHM9IjI0NCA0MDAgMTAwIDI1NiAyNDQgMTEyIiBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojMDAwO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6NDhweCIvPjxsaW5lIHgxPSIxMjAiIHkxPSIyNTYiIHgyPSI0MTIiIHkyPSIyNTYiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS13aWR0aDo0OHB4Ii8+PC9zdmc+");
}



.plutoui-toc header {
	display: flex;
	align-items: center;
	gap: .3em;
	font-size: 1.5em;
	/* margin-top: -0.1em; */
	margin-bottom: 0.4em;
	padding: 0.5rem;
	margin-left: 0;
	margin-right: 0;
	font-weight: bold;
	/* border-bottom: 2px solid rgba(0, 0, 0, 0.15); */
	position: sticky;
	top: 0px;
	background: var(--main-bg-color);
	z-index: 41;
}
.plutoui-toc.aside header {
	padding-left: 0;
	padding-right: 0;
}

.plutoui-toc section .toc-row {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: .1em;
	border-radius: .2em;
}

.plutoui-toc section .toc-row.H1 {
	margin-top: 1em;
}


.plutoui-toc.aside section .toc-row.in-view {
	background: var(--sidebar-li-active-bg);
}


	
.highlight-pluto-cell-shoulder {
	background: rgba(0, 0, 0, 0.05);
	background-clip: padding-box;
}

.plutoui-toc section a {
	text-decoration: none;
	font-weight: normal;
	color: var(--pluto-output-color);
}
.plutoui-toc section a:hover {
	color: var(--pluto-output-h-color);
}

.plutoui-toc.indent section a.H1 {
	font-weight: 700;
	line-height: 1em;
}

.plutoui-toc.indent section .after-H2 a { padding-left: 10px; }
.plutoui-toc.indent section .after-H3 a { padding-left: 20px; }
.plutoui-toc.indent section .after-H4 a { padding-left: 30px; }
.plutoui-toc.indent section .after-H5 a { padding-left: 40px; }
.plutoui-toc.indent section .after-H6 a { padding-left: 50px; }

.plutoui-toc.indent section a.H1 { padding-left: 0px; }
.plutoui-toc.indent section a.H2 { padding-left: 10px; }
.plutoui-toc.indent section a.H3 { padding-left: 20px; }
.plutoui-toc.indent section a.H4 { padding-left: 30px; }
.plutoui-toc.indent section a.H5 { padding-left: 40px; }
.plutoui-toc.indent section a.H6 { padding-left: 50px; }


.plutoui-toc.indent section a.pluto-docs-binding-el,
.plutoui-toc.indent section a.ASSIGNEE
	{
	font-family: JuliaMono, monospace;
	font-size: .8em;
	/* background: black; */
	font-weight: 700;
    font-style: italic;
	color: var(--cm-var-color); /* this is stealing a variable from Pluto, but it's fine if that doesnt work */
}
.plutoui-toc.indent section a.pluto-docs-binding-el::before,
.plutoui-toc.indent section a.ASSIGNEE::before
	{
	content: "> ";
	opacity: .3;
}
</style>
mimetext/htmlrootassigneelast_run_timestampAE(hepersist_js_state·has_pluto_hook_features§cell_id$c94864a5-996d-432d-8e14-888991c8e119depends_on_disabled_cells§runtime3published_object_keysdepends_on_skipped_cells§errored$603442cb-fdd9-4551-b503-6af0dddc86d7queued¤logsrunning¦outputbody<div class="markdown"><ul>
<li><p>Thrasing is a result of programming practices.</p>
</li>
<li><p>When you&#39;re a beginning programmer, focus on other things first.  Benchmark/profile to find inefficient code and then optimize.</p>
</li>
<li><p>As you gain more experience, you&#39;ll start to recognize places where thrashing could occur as you start to write them.  In that case, a little planning early on can save work down the road. </p>
</li>
</ul>
</div>mimetext/htmlrootassigneelast_run_timestampAE(*persist_js_state·has_pluto_hook_features§cell_id$603442cb-fdd9-4551-b503-6af0dddc86d7depends_on_disabled_cells§runtime Ypublished_object_keysdepends_on_skipped_cells§errored$9e23b40c-e252-438f-a151-0e8c3d0d8271queued¤logsrunning¦outputbody٥<div class="markdown"><pre><code class="language-python">jl.include&#40;&quot;my_julia_code.jl&quot;&#41;
jl.function_in_my_julia_code&#40;x&#41;</code></pre>
</div>mimetext/htmlrootassigneelast_run_timestampAE(IVpersist_js_state·has_pluto_hook_features§cell_id$9e23b40c-e252-438f-a151-0e8c3d0d8271depends_on_disabled_cells§runtime Եpublished_object_keysdepends_on_skipped_cells§errored$55ad7c5d-a8b4-4b35-bb0f-7784bc7f51c6queued¤logsrunning¦outputbodyK<div class="markdown"><h3 id="Hash-table-&#40;aka-dictionary/Dict&#41;-when:"><strong>Hash table</strong> &#40;aka dictionary/<code>Dict</code>&#41; when:</h3>
<ul>
<li><p>Elements unlikely to be accessed in any particular order</p>
</li>
<li><p>Value pretty fast access to individual elements</p>
</li>
<li><p>Don&#39;t mind allocating significantly more memory than necessary</p>
</li>
<li><p>Useful for scripting, non-performance sensitive code</p>
</li>
</ul>
<p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Hash_table_3_1_1_0_1_0_0_SP.svg/1024px-Hash_table_3_1_1_0_1_0_0_SP.svg.png" alt="Hash table" /> - source <a href="https://commons.wikimedia.org/wiki/File:Hash_table_3_1_1_0_1_0_0_SP.svg">Wikimedia</a>, Jorge Stolfi, <a href="https://creativecommons.org/licenses/by-sa/3.0/deed.en">CC-BY-SA-3.0</a></p>
</div>mimetext/htmlrootassigneelast_run_timestampAE($ݰpersist_js_state·has_pluto_hook_features§cell_id$55ad7c5d-a8b4-4b35-bb0f-7784bc7f51c6depends_on_disabled_cells§runtime 	صpublished_object_keysdepends_on_skipped_cells§errored±cell_dependencies 3$ba0434fc-9c97-470c-a948-7969d016e5a2precedence_heuristic	cell_id$ba0434fc-9c97-470c-a948-7969d016e5a2downstream_cells_mapupstream_cells_map@md_strgetindex$d2cc4026-b2f0-4201-bf3b-c1615bbc9ab7precedence_heuristic	cell_id$d2cc4026-b2f0-4201-bf3b-c1615bbc9ab7downstream_cells_mapupstream_cells_map@md_strblockquotegetindex$a4e4c54b-cda4-43af-b9ae-b1f5337f5fd0precedence_heuristic	cell_id$a4e4c54b-cda4-43af-b9ae-b1f5337f5fd0downstream_cells_mapupstream_cells_map@md_strblockquotegetindex$6853e432-81b5-4761-9e7a-3c48c9867291precedence_heuristic	cell_id$6853e432-81b5-4761-9e7a-3c48c9867291downstream_cells_mapupstream_cells_map@md_strgetindex$9b9e06d6-0566-42f0-93bc-65206e3add02precedence_heuristic	cell_id$9b9e06d6-0566-42f0-93bc-65206e3add02downstream_cells_mapvec_of_pairs$442d604f-79a0-473d-a5b1-d90ca303fc2eupstream_cells_maprandn:collectziprand$840a2af4-4eab-4857-879d-a9c62b1e27a1precedence_heuristic	cell_id$840a2af4-4eab-4857-879d-a9c62b1e27a1downstream_cells_mapupstream_cells_map@md_strgetindex$a876b548-3b0e-48d1-98bf-6bf005230e92precedence_heuristic	cell_id$a876b548-3b0e-48d1-98bf-6bf005230e92downstream_cells_mapupstream_cells_map@md_strgetindex$373376f2-3557-42f5-bdeb-9ae70ed3d060precedence_heuristic	cell_id$373376f2-3557-42f5-bdeb-9ae70ed3d060downstream_cells_mapupstream_cells_map@md_strgetindex$083af3e8-77ad-4a30-8d80-282a5403b163precedence_heuristic	cell_id$083af3e8-77ad-4a30-8d80-282a5403b163downstream_cells_map#449#julia_test_result#448#pluto_resultupstream_cells_map CorePlutoTest.Test.ReturnedPlutoTest.WrongCall!PlutoTest.Base.catch_stackPlutoTest.rethrow@testPlutoTest.push!PlutoTest.catch_backtracesorted_merge$442d604f-79a0-473d-a5b1-d90ca303fc2ePlutoTest.ErrorCallPlutoTest.Test.ThrewPlutoTest.===PlutoTest.unwrap_computedPlutoTest.Test.do_test==PlutoTest.throwPlutoTest.CapturedExceptionPlutoTest$531f25b0-2d29-4db1-ab44-b927b6377945PlutoTest.ComputedPlutoTest.CorrectCallallsorted_quick$442d604f-79a0-473d-a5b1-d90ca303fc2ePlutoTest.stacktracePlutoTest.isa#PlutoTest.PartialEvaluatedExceptionPlutoTest.lastCore._expr$abf68ae8-2327-44eb-b0dc-24f66ae4f603precedence_heuristic	cell_id$abf68ae8-2327-44eb-b0dc-24f66ae4f603downstream_cells_mapupstream_cells_map@md_strgetindex$76c7abf5-8eb5-4fc0-bca0-7c8098699fc1precedence_heuristic	cell_id$76c7abf5-8eb5-4fc0-bca0-7c8098699fc1downstream_cells_mapupstream_cells_map@md_strgetindex$838815fa-5917-4347-bb3c-bf8300d2d942precedence_heuristic	cell_id$838815fa-5917-4347-bb3c-bf8300d2d942downstream_cells_mapupstream_cells_map@md_strgetindex$5797afa6-13ac-457d-aeee-5d4403f61787precedence_heuristic	cell_id$5797afa6-13ac-457d-aeee-5d4403f61787downstream_cells_mapupstream_cells_map@md_strblockquotegetindex$a541ae26-c160-4549-af71-c4473f0eefb7precedence_heuristic	cell_id$a541ae26-c160-4549-af71-c4473f0eefb7downstream_cells_mapupstream_cells_map@md_strblockquotegetindex$c247aa92-2803-402d-b1cf-ebbf819c56acprecedence_heuristic	cell_id$c247aa92-2803-402d-b1cf-ebbf819c56acdownstream_cells_mapupstream_cells_map@md_strgetindex$e00f7ffc-16dd-4e6f-ad85-74f6117eb958precedence_heuristic	cell_id$e00f7ffc-16dd-4e6f-ad85-74f6117eb958downstream_cells_mapupstream_cells_map@md_strgetindex$2ba07b9f-97b0-4ec3-90ae-bdf2b5616370precedence_heuristic	cell_id$2ba07b9f-97b0-4ec3-90ae-bdf2b5616370downstream_cells_mapupstream_cells_map@md_strgetindex$53f5a5ca-201f-4aea-aa4c-fe82ae0249f2precedence_heuristic	cell_id$53f5a5ca-201f-4aea-aa4c-fe82ae0249f2downstream_cells_mapupstream_cells_map@md_strgetindex$28d23ac8-ca53-4182-87d7-52fee383f2c5precedence_heuristic	cell_id$28d23ac8-ca53-4182-87d7-52fee383f2c5downstream_cells_mapupstream_cells_map@md_strgetindex$626cd1f0-b2d0-48e4-88ee-775e1f037480precedence_heuristic	cell_id$626cd1f0-b2d0-48e4-88ee-775e1f037480downstream_cells_mapupstream_cells_map@md_strgetindex$6a0d5ba5-40d0-445d-a0fa-32fcfbad00c9precedence_heuristic	cell_id$6a0d5ba5-40d0-445d-a0fa-32fcfbad00c9downstream_cells_mapupstream_cells_map@md_strgetindex$4cde0527-defc-4901-bb4c-071bc115e102precedence_heuristic	cell_id$4cde0527-defc-4901-bb4c-071bc115e102downstream_cells_mapupstream_cells_map@md_strgetindex$0588f080-1da7-4df0-930b-582c065cab75precedence_heuristic	cell_id$0588f080-1da7-4df0-930b-582c065cab75downstream_cells_maptoc_aside$c94864a5-996d-432d-8e14-888991c8e119upstream_cells_mapCore@md_strBasePlutoRunner.create_bondPlutoRunnerCheckBoxCore.applicable@bindBase.getgetindex$f508c1c8-945b-4b99-8985-5f10946b0239precedence_heuristic	cell_id$f508c1c8-945b-4b99-8985-5f10946b0239downstream_cells_mapupstream_cells_map@md_strgetindex$7b7bd5c8-a8e8-445c-9239-9c7322a81313precedence_heuristic	cell_id$7b7bd5c8-a8e8-445c-9239-9c7322a81313downstream_cells_mapupstream_cells_map@md_strgetindex$f965c656-6b7b-441d-8111-855ecfe79ca6precedence_heuristic	cell_id$f965c656-6b7b-441d-8111-855ecfe79ca6downstream_cells_mapupstream_cells_map@md_strblockquotegetindex$7a13c062-b641-4894-9288-4a79c1005c49precedence_heuristic	cell_id$7a13c062-b641-4894-9288-4a79c1005c49downstream_cells_mapupstream_cells_map@md_strgetindex$442d604f-79a0-473d-a5b1-d90ca303fc2eprecedence_heuristic	cell_id$442d604f-79a0-473d-a5b1-d90ca303fc2edownstream_cells_mapsorted_quick$e203823e-3a1f-4812-b2a9-6ab80a811860$083af3e8-77ad-4a30-8d80-282a5403b163less_than_customsorted_merge$e203823e-3a1f-4812-b2a9-6ab80a811860$083af3e8-77ad-4a30-8d80-282a5403b163upstream_cells_map<MergeSortvec_of_pairs$9b9e06d6-0566-42f0-93bc-65206e3add02TuplesortQuickSortisless$b9baebea-2312-4c28-905c-b47ec3a26415precedence_heuristic	cell_id$b9baebea-2312-4c28-905c-b47ec3a26415downstream_cells_mapupstream_cells_mapWidthOverDocs$fed62143-6d25-4d6a-927b-84f5d20fab0dprecedence_heuristic	cell_id$fed62143-6d25-4d6a-927b-84f5d20fab0ddownstream_cells_mapupstream_cells_map@md_strgetindex$533dbe7a-aae6-41dd-8737-2f995bb6c7f6precedence_heuristic	cell_id$533dbe7a-aae6-41dd-8737-2f995bb6c7f6downstream_cells_mapupstream_cells_map@md_strgetindex$3d678919-c197-4c9d-aed9-bf94dd431c4cprecedence_heuristic	cell_id$3d678919-c197-4c9d-aed9-bf94dd431c4cdownstream_cells_mapupstream_cells_map@md_strgetindex$e2a60b81-1584-4d2d-8b08-9055d362cdfbprecedence_heuristic	cell_id$e2a60b81-1584-4d2d-8b08-9055d362cdfbdownstream_cells_mapupstream_cells_map@md_strgetindex$d2d20b37-37c0-4bc4-bd20-ad28d367545aprecedence_heuristic	cell_id$d2d20b37-37c0-4bc4-bd20-ad28d367545adownstream_cells_mapupstream_cells_map@md_strgetindex$f0fc9af7-737c-4c08-a772-1136be959a6dprecedence_heuristic	cell_id$f0fc9af7-737c-4c08-a772-1136be959a6ddownstream_cells_mapupstream_cells_map@md_strgetindex$c8b93838-61ee-4c11-82de-e54a1d1b68afprecedence_heuristic	cell_id$c8b93838-61ee-4c11-82de-e54a1d1b68afdownstream_cells_mapupstream_cells_map@md_strgetindex$dd6c279f-d09b-4789-8776-7553dd023e1bprecedence_heuristic	cell_id$dd6c279f-d09b-4789-8776-7553dd023e1bdownstream_cells_mapx_sorted_defaultx_sorted_insertionx_sorted_quickx_sorted_merge#413#julia_test_resultx#412#pluto_resultupstream_cells_map CorePlutoTest.Test.ReturnedMergeSortPlutoTest.WrongCallPlutoTest.Base.catch_stackPlutoTest.rethrowInsertionSort@testPlutoTest.push!PlutoTest.catch_backtracePlutoTest.===PlutoTest.ErrorCallPlutoTest.Test.ThrewPlutoTest.Test.do_testPlutoTest.unwrap_computed==PlutoTest.throwPlutoTest.CapturedExceptionPlutoTest$531f25b0-2d29-4db1-ab44-b927b6377945PlutoTest.ComputedPlutoTest.CorrectCallrandallPlutoTest.stacktracesortQuickSortPlutoTest.isa#PlutoTest.PartialEvaluatedExceptionPlutoTest.lastCore._expr$0969fdf8-9223-4e48-99f9-ef353d92fdb2precedence_heuristic	cell_id$0969fdf8-9223-4e48-99f9-ef353d92fdb2downstream_cells_mapupstream_cells_map@md_strblockquotegetindex$5ad00ac5-b689-40b5-ba2d-905b340a47ffprecedence_heuristic	cell_id$5ad00ac5-b689-40b5-ba2d-905b340a47ffdownstream_cells_mapupstream_cells_map@md_strgetindex$0d655992-c218-4f68-b7e8-45aa3454000bprecedence_heuristic	cell_id$0d655992-c218-4f68-b7e8-45aa3454000bdownstream_cells_mapupstream_cells_map@md_strgetindex$09199e18-da64-4abb-8053-e3bc0448df8bprecedence_heuristic	cell_id$09199e18-da64-4abb-8053-e3bc0448df8bdownstream_cells_mapupstream_cells_map@md_strgetindex$d2f4bb2d-d222-4c61-9c63-a57bdfef1927precedence_heuristic	cell_id$d2f4bb2d-d222-4c61-9c63-a57bdfef1927downstream_cells_mapupstream_cells_map@md_strgetindex$531f25b0-2d29-4db1-ab44-b927b6377945precedence_heuristiccell_id$531f25b0-2d29-4db1-ab44-b927b6377945downstream_cells_mapPlutoUIPlutoTest$dd6c279f-d09b-4789-8776-7553dd023e1b$083af3e8-77ad-4a30-8d80-282a5403b163PlutoTeachingToolsupstream_cells_map$e203823e-3a1f-4812-b2a9-6ab80a811860precedence_heuristic	cell_id$e203823e-3a1f-4812-b2a9-6ab80a811860downstream_cells_mapupstream_cells_mapsorted_quick$442d604f-79a0-473d-a5b1-d90ca303fc2esorted_merge$442d604f-79a0-473d-a5b1-d90ca303fc2e$9380c6be-90bc-47fa-98b5-92e0e8539110precedence_heuristic	cell_id$9380c6be-90bc-47fa-98b5-92e0e8539110downstream_cells_mapupstream_cells_map@md_strgetindex$d8fd8af3-a65d-4230-bb35-e1144e459520precedence_heuristic	cell_id$d8fd8af3-a65d-4230-bb35-e1144e459520downstream_cells_mapupstream_cells_map@md_strblockquotegetindex$2097dafd-e457-46b4-b6d6-fdf6f66c6675precedence_heuristic	cell_id$2097dafd-e457-46b4-b6d6-fdf6f66c6675downstream_cells_mapupstream_cells_map@md_strgetindex$c94864a5-996d-432d-8e14-888991c8e119precedence_heuristic	cell_id$c94864a5-996d-432d-8e14-888991c8e119downstream_cells_mapupstream_cells_mapTableOfContentstoc_aside$0588f080-1da7-4df0-930b-582c065cab75$603442cb-fdd9-4551-b503-6af0dddc86d7precedence_heuristic	cell_id$603442cb-fdd9-4551-b503-6af0dddc86d7downstream_cells_mapupstream_cells_map@md_strgetindex$9e23b40c-e252-438f-a151-0e8c3d0d8271precedence_heuristic	cell_id$9e23b40c-e252-438f-a151-0e8c3d0d8271downstream_cells_mapupstream_cells_map@md_strgetindex$55ad7c5d-a8b4-4b35-bb0f-7784bc7f51c6precedence_heuristic	cell_id$55ad7c5d-a8b4-4b35-bb0f-7784bc7f51c6downstream_cells_mapupstream_cells_map@md_strgetindexcell_execution_order 3$531f25b0-2d29-4db1-ab44-b927b6377945$a876b548-3b0e-48d1-98bf-6bf005230e92$b9baebea-2312-4c28-905c-b47ec3a26415$373376f2-3557-42f5-bdeb-9ae70ed3d060$3d678919-c197-4c9d-aed9-bf94dd431c4c$ba0434fc-9c97-470c-a948-7969d016e5a2$7a13c062-b641-4894-9288-4a79c1005c49$5ad00ac5-b689-40b5-ba2d-905b340a47ff$28d23ac8-ca53-4182-87d7-52fee383f2c5$f508c1c8-945b-4b99-8985-5f10946b0239$e2a60b81-1584-4d2d-8b08-9055d362cdfb$840a2af4-4eab-4857-879d-a9c62b1e27a1$6a0d5ba5-40d0-445d-a0fa-32fcfbad00c9$9380c6be-90bc-47fa-98b5-92e0e8539110$0d655992-c218-4f68-b7e8-45aa3454000b$4cde0527-defc-4901-bb4c-071bc115e102$7b7bd5c8-a8e8-445c-9239-9c7322a81313$2ba07b9f-97b0-4ec3-90ae-bdf2b5616370$55ad7c5d-a8b4-4b35-bb0f-7784bc7f51c6$6853e432-81b5-4761-9e7a-3c48c9867291$533dbe7a-aae6-41dd-8737-2f995bb6c7f6$d8fd8af3-a65d-4230-bb35-e1144e459520$838815fa-5917-4347-bb3c-bf8300d2d942$c8b93838-61ee-4c11-82de-e54a1d1b68af$0969fdf8-9223-4e48-99f9-ef353d92fdb2$76c7abf5-8eb5-4fc0-bca0-7c8098699fc1$a541ae26-c160-4549-af71-c4473f0eefb7$603442cb-fdd9-4551-b503-6af0dddc86d7$d2cc4026-b2f0-4201-bf3b-c1615bbc9ab7$fed62143-6d25-4d6a-927b-84f5d20fab0d$5797afa6-13ac-457d-aeee-5d4403f61787$2097dafd-e457-46b4-b6d6-fdf6f66c6675$dd6c279f-d09b-4789-8776-7553dd023e1b$9b9e06d6-0566-42f0-93bc-65206e3add02$d2d20b37-37c0-4bc4-bd20-ad28d367545a$442d604f-79a0-473d-a5b1-d90ca303fc2e$e203823e-3a1f-4812-b2a9-6ab80a811860$083af3e8-77ad-4a30-8d80-282a5403b163$f965c656-6b7b-441d-8111-855ecfe79ca6$f0fc9af7-737c-4c08-a772-1136be959a6d$a4e4c54b-cda4-43af-b9ae-b1f5337f5fd0$e00f7ffc-16dd-4e6f-ad85-74f6117eb958$09199e18-da64-4abb-8053-e3bc0448df8b$abf68ae8-2327-44eb-b0dc-24f66ae4f603$626cd1f0-b2d0-48e4-88ee-775e1f037480$d2f4bb2d-d222-4c61-9c63-a57bdfef1927$9e23b40c-e252-438f-a151-0e8c3d0d8271$53f5a5ca-201f-4aea-aa4c-fe82ae0249f2$c247aa92-2803-402d-b1cf-ebbf819c56ac$0588f080-1da7-4df0-930b-582c065cab75$c94864a5-996d-432d-8e14-888991c8e119last_hot_reload_time        shortpathweek6.jlprocess_statusreadypath>/home/runner/work/Notes-Fall2025/Notes-Fall2025/week6/week6.jlpluto_versionv0.20.21last_save_timeAE(Kcell_order 3$a876b548-3b0e-48d1-98bf-6bf005230e92$b9baebea-2312-4c28-905c-b47ec3a26415$373376f2-3557-42f5-bdeb-9ae70ed3d060$3d678919-c197-4c9d-aed9-bf94dd431c4c$ba0434fc-9c97-470c-a948-7969d016e5a2$7a13c062-b641-4894-9288-4a79c1005c49$5ad00ac5-b689-40b5-ba2d-905b340a47ff$28d23ac8-ca53-4182-87d7-52fee383f2c5$f508c1c8-945b-4b99-8985-5f10946b0239$e2a60b81-1584-4d2d-8b08-9055d362cdfb$840a2af4-4eab-4857-879d-a9c62b1e27a1$6a0d5ba5-40d0-445d-a0fa-32fcfbad00c9$9380c6be-90bc-47fa-98b5-92e0e8539110$0d655992-c218-4f68-b7e8-45aa3454000b$4cde0527-defc-4901-bb4c-071bc115e102$7b7bd5c8-a8e8-445c-9239-9c7322a81313$2ba07b9f-97b0-4ec3-90ae-bdf2b5616370$55ad7c5d-a8b4-4b35-bb0f-7784bc7f51c6$6853e432-81b5-4761-9e7a-3c48c9867291$533dbe7a-aae6-41dd-8737-2f995bb6c7f6$d8fd8af3-a65d-4230-bb35-e1144e459520$838815fa-5917-4347-bb3c-bf8300d2d942$c8b93838-61ee-4c11-82de-e54a1d1b68af$0969fdf8-9223-4e48-99f9-ef353d92fdb2$76c7abf5-8eb5-4fc0-bca0-7c8098699fc1$a541ae26-c160-4549-af71-c4473f0eefb7$603442cb-fdd9-4551-b503-6af0dddc86d7$d2cc4026-b2f0-4201-bf3b-c1615bbc9ab7$fed62143-6d25-4d6a-927b-84f5d20fab0d$5797afa6-13ac-457d-aeee-5d4403f61787$2097dafd-e457-46b4-b6d6-fdf6f66c6675$dd6c279f-d09b-4789-8776-7553dd023e1b$9b9e06d6-0566-42f0-93bc-65206e3add02$d2d20b37-37c0-4bc4-bd20-ad28d367545a$442d604f-79a0-473d-a5b1-d90ca303fc2e$e203823e-3a1f-4812-b2a9-6ab80a811860$083af3e8-77ad-4a30-8d80-282a5403b163$f965c656-6b7b-441d-8111-855ecfe79ca6$f0fc9af7-737c-4c08-a772-1136be959a6d$a4e4c54b-cda4-43af-b9ae-b1f5337f5fd0$e00f7ffc-16dd-4e6f-ad85-74f6117eb958$09199e18-da64-4abb-8053-e3bc0448df8b$abf68ae8-2327-44eb-b0dc-24f66ae4f603$626cd1f0-b2d0-48e4-88ee-775e1f037480$d2f4bb2d-d222-4c61-9c63-a57bdfef1927$9e23b40c-e252-438f-a151-0e8c3d0d8271$53f5a5ca-201f-4aea-aa4c-fe82ae0249f2$c247aa92-2803-402d-b1cf-ebbf819c56ac$0588f080-1da7-4df0-930b-582c065cab75$c94864a5-996d-432d-8e14-888991c8e119$531f25b0-2d29-4db1-ab44-b927b6377945published_objects5d80f4b82-bfd9-11f0-2d47-2376ea611b3d/eeaeaa7a973499cftrue5d80f4b82-bfd9-11f0-2d47-2376ea611b3d/681aba240488a243prefixTuple{Int64, Float64}elements elements1text/plain-0.0237115text/plaintypeTupleobjectid3eef504cc33d5026!application/vnd.pluto.tree+objectelements1text/plain1.29865text/plaintypeTupleobjectid263c27b84fbb3f0d!application/vnd.pluto.tree+objectelements1text/plain0.251877text/plaintypeTupleobjectid35d5a701232c61!application/vnd.pluto.tree+objectelements1text/plain0.545858text/plaintypeTupleobjectid3d1e46f0c5e73070!application/vnd.pluto.tree+objectelements1text/plain-0.442368text/plaintypeTupleobjectid8a1ed1b92f112b9c!application/vnd.pluto.tree+objectelements1text/plain1.11572text/plaintypeTupleobjectid412fa3c4b5513e9e!application/vnd.pluto.tree+objectelements2text/plain0.371891text/plaintypeTupleobjectid526534794d2c20c7!application/vnd.pluto.tree+objectelements2text/plain-0.891838text/plaintypeTupleobjectidac0f0351f205dd1b!application/vnd.pluto.tree+object	elements2text/plain1.97173text/plaintypeTupleobjectidbccb1f59c8bc7d06!application/vnd.pluto.tree+object
elements2text/plain-1.10625text/plaintypeTupleobjectid7747e18d551d4aa7!application/vnd.pluto.tree+objectelements2text/plain0.0804976text/plaintypeTupleobjectid519920afcae9ac16!application/vnd.pluto.tree+objectelements2text/plain-0.367085text/plaintypeTupleobjectid807dd56092218f4a!application/vnd.pluto.tree+objectelements2text/plain0.148591text/plaintypeTupleobjectid5460b221229c4555!application/vnd.pluto.tree+objectelements2text/plain-0.954068text/plaintypeTupleobjectid7cd7f23420f5cf8d!application/vnd.pluto.tree+objectelements2text/plain-1.04491text/plaintypeTupleobjectide05063adcd49096!application/vnd.pluto.tree+objectelements2text/plain-0.835618text/plaintypeTupleobjectid3262905619682fd9!application/vnd.pluto.tree+objectelements2text/plain0.92743text/plaintypeTupleobjectid89ff33733452b75c!application/vnd.pluto.tree+objectelements2text/plain0.29745text/plaintypeTupleobjectidac160ae886f39461!application/vnd.pluto.tree+objectelements2text/plain-0.313947text/plaintypeTupleobjectid6d0c936bce6ac2f!application/vnd.pluto.tree+objectelements2text/plain-0.195867text/plaintypeTupleobjectid2707226b31f9c202!application/vnd.pluto.tree+objectmore[elements9text/plain0.789989text/plaintypeTupleobjectide5bdead35af83676!application/vnd.pluto.tree+object\elements9text/plain0.681389text/plaintypeTupleobjectid9cedc3495220bbf!application/vnd.pluto.tree+object]elements9text/plain-0.722642text/plaintypeTupleobjectidfa7f1642d37f0b9f!application/vnd.pluto.tree+object^elements9text/plain1.28198text/plaintypeTupleobjectid4e6ef2d0ad23b2e!application/vnd.pluto.tree+object_elements10text/plain-1.20217text/plaintypeTupleobjectidb5cf197884a80c77!application/vnd.pluto.tree+object`elements10text/plain-0.302798text/plaintypeTupleobjectid959120332622e24f!application/vnd.pluto.tree+objectaelements10text/plain-0.474818text/plaintypeTupleobjectid5f3cfdaa444021fc!application/vnd.pluto.tree+objectbelements10text/plain-0.139246text/plaintypeTupleobjectid7c59bc7b206acc58!application/vnd.pluto.tree+objectcelements10text/plain0.390087text/plaintypeTupleobjectid6592aeffe50252d!application/vnd.pluto.tree+objectdelements10text/plain-0.62174text/plaintypeTupleobjectidf711ebda3a06b010!application/vnd.pluto.tree+objecttypeArrayprefix_shortobjectidb27370dcd788a2225d80f4b82-bfd9-11f0-2d47-2376ea611b3d/10d3e3d51c396cebfalse5d80f4b82-bfd9-11f0-2d47-2376ea611b3d/7e5437732b0c0e01prefixBitVector: elements falsetext/plainfalsetext/plainfalsetext/plainfalsetext/plainfalsetext/plainfalsetext/plainfalsetext/plainfalsetext/plain	falsetext/plain
falsetext/plainfalsetext/plainfalsetext/plainfalsetext/plainfalsetext/plainfalsetext/plainfalsetext/plaintruetext/plainfalsetext/plainfalsetext/plainfalsetext/plainmore[falsetext/plain\falsetext/plain]falsetext/plain^falsetext/plain_falsetext/plain`falsetext/plainafalsetext/plainbfalsetext/plaincfalsetext/plaindfalsetext/plaintypeArrayprefix_shortBitVector: objectid6daa0a97898ab2ca5d80f4b82-bfd9-11f0-2d47-2376ea611b3d/65a3df5471a64b10prefixTuple{Int64, Float64}elements elements1text/plain-0.442368text/plaintypeTupleobjectid8a1ed1b92f112b9c!application/vnd.pluto.tree+objectelements1text/plain1.11572text/plaintypeTupleobjectid412fa3c4b5513e9e!application/vnd.pluto.tree+objectelements1text/plain0.545858text/plaintypeTupleobjectid3d1e46f0c5e73070!application/vnd.pluto.tree+objectelements1text/plain0.251877text/plaintypeTupleobjectid35d5a701232c61!application/vnd.pluto.tree+objectelements1text/plain1.29865text/plaintypeTupleobjectid263c27b84fbb3f0d!application/vnd.pluto.tree+objectelements1text/plain-0.0237115text/plaintypeTupleobjectid3eef504cc33d5026!application/vnd.pluto.tree+objectelements2text/plain1.97173text/plaintypeTupleobjectidbccb1f59c8bc7d06!application/vnd.pluto.tree+objectelements2text/plain-0.835618text/plaintypeTupleobjectid3262905619682fd9!application/vnd.pluto.tree+object	elements2text/plain-1.04491text/plaintypeTupleobjectide05063adcd49096!application/vnd.pluto.tree+object
elements2text/plain-0.954068text/plaintypeTupleobjectid7cd7f23420f5cf8d!application/vnd.pluto.tree+objectelements2text/plain0.29745text/plaintypeTupleobjectidac160ae886f39461!application/vnd.pluto.tree+objectelements2text/plain0.148591text/plaintypeTupleobjectid5460b221229c4555!application/vnd.pluto.tree+objectelements2text/plain-0.367085text/plaintypeTupleobjectid807dd56092218f4a!application/vnd.pluto.tree+objectelements2text/plain-0.313947text/plaintypeTupleobjectid6d0c936bce6ac2f!application/vnd.pluto.tree+objectelements2text/plain0.0804976text/plaintypeTupleobjectid519920afcae9ac16!application/vnd.pluto.tree+objectelements2text/plain-1.10625text/plaintypeTupleobjectid7747e18d551d4aa7!application/vnd.pluto.tree+objectelements2text/plain0.92743text/plaintypeTupleobjectid89ff33733452b75c!application/vnd.pluto.tree+objectelements2text/plain0.371891text/plaintypeTupleobjectid526534794d2c20c7!application/vnd.pluto.tree+objectelements2text/plain-0.195867text/plaintypeTupleobjectid2707226b31f9c202!application/vnd.pluto.tree+objectelements2text/plain-0.891838text/plaintypeTupleobjectidac0f0351f205dd1b!application/vnd.pluto.tree+objectmore[elements9text/plain0.186238text/plaintypeTupleobjectide67be22595a0eb3f!application/vnd.pluto.tree+object\elements9text/plain0.0235584text/plaintypeTupleobjectidbb7c3a6c2a9c8d0d!application/vnd.pluto.tree+object]elements9text/plain-2.37901text/plaintypeTupleobjectid9b8615f6c8abfb11!application/vnd.pluto.tree+object^elements9text/plain0.789989text/plaintypeTupleobjectide5bdead35af83676!application/vnd.pluto.tree+object_elements10text/plain-0.302798text/plaintypeTupleobjectid959120332622e24f!application/vnd.pluto.tree+object`elements10text/plain-1.20217text/plaintypeTupleobjectidb5cf197884a80c77!application/vnd.pluto.tree+objectaelements10text/plain-0.62174text/plaintypeTupleobjectidf711ebda3a06b010!application/vnd.pluto.tree+objectbelements10text/plain-0.474818text/plaintypeTupleobjectid5f3cfdaa444021fc!application/vnd.pluto.tree+objectcelements10text/plain-0.139246text/plaintypeTupleobjectid7c59bc7b206acc58!application/vnd.pluto.tree+objectdelements10text/plain0.390087text/plaintypeTupleobjectid6592aeffe50252d!application/vnd.pluto.tree+objecttypeArrayprefix_shortobjectid1e6f91a0edc207e05d80f4b82-bfd9-11f0-2d47-2376ea611b3d/b5c20fed13a7a164prefixTuple{Int64, Float64}elements elements1text/plain-0.0237115text/plaintypeTupleobjectid3eef504cc33d5026!application/vnd.pluto.tree+objectelements1text/plain1.29865text/plaintypeTupleobjectid263c27b84fbb3f0d!application/vnd.pluto.tree+objectelements1text/plain0.251877text/plaintypeTupleobjectid35d5a701232c61!application/vnd.pluto.tree+objectelements1text/plain0.545858text/plaintypeTupleobjectid3d1e46f0c5e73070!application/vnd.pluto.tree+objectelements1text/plain-0.442368text/plaintypeTupleobjectid8a1ed1b92f112b9c!application/vnd.pluto.tree+objectelements1text/plain1.11572text/plaintypeTupleobjectid412fa3c4b5513e9e!application/vnd.pluto.tree+objectelements2text/plain0.371891text/plaintypeTupleobjectid526534794d2c20c7!application/vnd.pluto.tree+objectelements2text/plain-0.891838text/plaintypeTupleobjectidac0f0351f205dd1b!application/vnd.pluto.tree+object	elements2text/plain1.97173text/plaintypeTupleobjectidbccb1f59c8bc7d06!application/vnd.pluto.tree+object
elements2text/plain-1.10625text/plaintypeTupleobjectid7747e18d551d4aa7!application/vnd.pluto.tree+objectelements2text/plain0.0804976text/plaintypeTupleobjectid519920afcae9ac16!application/vnd.pluto.tree+objectelements2text/plain-0.367085text/plaintypeTupleobjectid807dd56092218f4a!application/vnd.pluto.tree+objectelements2text/plain0.148591text/plaintypeTupleobjectid5460b221229c4555!application/vnd.pluto.tree+objectelements2text/plain-0.954068text/plaintypeTupleobjectid7cd7f23420f5cf8d!application/vnd.pluto.tree+objectelements2text/plain-1.04491text/plaintypeTupleobjectide05063adcd49096!application/vnd.pluto.tree+objectelements2text/plain-0.835618text/plaintypeTupleobjectid3262905619682fd9!application/vnd.pluto.tree+objectelements2text/plain0.92743text/plaintypeTupleobjectid89ff33733452b75c!application/vnd.pluto.tree+objectelements2text/plain0.29745text/plaintypeTupleobjectidac160ae886f39461!application/vnd.pluto.tree+objectelements2text/plain-0.313947text/plaintypeTupleobjectid6d0c936bce6ac2f!application/vnd.pluto.tree+objectelements2text/plain-0.195867text/plaintypeTupleobjectid2707226b31f9c202!application/vnd.pluto.tree+objectmore[elements9text/plain0.789989text/plaintypeTupleobjectide5bdead35af83676!application/vnd.pluto.tree+object\elements9text/plain0.681389text/plaintypeTupleobjectid9cedc3495220bbf!application/vnd.pluto.tree+object]elements9text/plain-0.722642text/plaintypeTupleobjectidfa7f1642d37f0b9f!application/vnd.pluto.tree+object^elements9text/plain1.28198text/plaintypeTupleobjectid4e6ef2d0ad23b2e!application/vnd.pluto.tree+object_elements10text/plain-1.20217text/plaintypeTupleobjectidb5cf197884a80c77!application/vnd.pluto.tree+object`elements10text/plain-0.302798text/plaintypeTupleobjectid959120332622e24f!application/vnd.pluto.tree+objectaelements10text/plain-0.474818text/plaintypeTupleobjectid5f3cfdaa444021fc!application/vnd.pluto.tree+objectbelements10text/plain-0.139246text/plaintypeTupleobjectid7c59bc7b206acc58!application/vnd.pluto.tree+objectcelements10text/plain0.390087text/plaintypeTupleobjectid6592aeffe50252d!application/vnd.pluto.tree+objectdelements10text/plain-0.62174text/plaintypeTupleobjectidf711ebda3a06b010!application/vnd.pluto.tree+objecttypeArrayprefix_shortobjectidb27370dcd788a222nbpkginstall_time_ns   ɬinstantiatedòinstalled_versionsPlutoUI0.7.71PlutoTest0.2.2PlutoTeachingTools0.4.6terminal_outputsnbpkg_sync2
[0m[1mResolving...[22m
[90m===[39m
[32m[1m   Installed[22m[39m Hyperscript ──────── v0.0.5
[32m[1m   Installed[22m[39m ColorTypes ───────── v0.12.1
[32m[1m   Installed[22m[39m PlutoUI ──────────── v0.7.71
[32m[1m   Installed[22m[39m PlutoTeachingTools ─ v0.4.6
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_uwcvdjdwum/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_uwcvdjdwum/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
Waiting for notebook process to start... Done. Starting precompilation...
[92m[1mPrecompiling[22m[39m project...
PlutoUI2
[0m[1mResolving...[22m
[90m===[39m
[32m[1m   Installed[22m[39m Hyperscript ──────── v0.0.5
[32m[1m   Installed[22m[39m ColorTypes ───────── v0.12.1
[32m[1m   Installed[22m[39m PlutoUI ──────────── v0.7.71
[32m[1m   Installed[22m[39m PlutoTeachingTools ─ v0.4.6
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_uwcvdjdwum/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_uwcvdjdwum/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
Waiting for notebook process to start... Done. Starting precompilation...
[92m[1mPrecompiling[22m[39m project...
PlutoTest2
[0m[1mResolving...[22m
[90m===[39m
[32m[1m   Installed[22m[39m Hyperscript ──────── v0.0.5
[32m[1m   Installed[22m[39m ColorTypes ───────── v0.12.1
[32m[1m   Installed[22m[39m PlutoUI ──────────── v0.7.71
[32m[1m   Installed[22m[39m PlutoTeachingTools ─ v0.4.6
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_uwcvdjdwum/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_uwcvdjdwum/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
Waiting for notebook process to start... Done. Starting precompilation...
[92m[1mPrecompiling[22m[39m project...
PlutoTeachingTools2
[0m[1mResolving...[22m
[90m===[39m
[32m[1m   Installed[22m[39m Hyperscript ──────── v0.0.5
[32m[1m   Installed[22m[39m ColorTypes ───────── v0.12.1
[32m[1m   Installed[22m[39m PlutoUI ──────────── v0.7.71
[32m[1m   Installed[22m[39m PlutoTeachingTools ─ v0.4.6
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_uwcvdjdwum/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_uwcvdjdwum/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
Waiting for notebook process to start... Done. Starting precompilation...
[92m[1mPrecompiling[22m[39m project...
enabled÷restart_recommended_msgrestart_required_msgbusy_packageswaiting_for_permission,waiting_for_permission_but_probably_disabled«cell_inputs 3$ba0434fc-9c97-470c-a948-7969d016e5a2cell_id$ba0434fc-9c97-470c-a948-7969d016e5a2codemd"""
# Class project
- Review feedback on project proposals 
- Review [project instructions and rubric](https://psuastro528.github.io/Fall2025/project/) on website
- Can continue using repository from project proposal
- Next step is the serial implementation, focusing on good practices that we've discussed/seen in labs
- Serial code should be ready for peer code review by **Oct 8**
- After this week's labs, will have everything you need to benchmark, profile and optimize the serial version of your code.
- Check [project presentation schedule](https://github.com/PsuAstro528/PresentationsSchedule2025).  If you want to make a swap, find another person/group to swap with, and then
  - Click **Fork** button to create your own repository 
  - Edit README.md in your repository (can use web interface for small chagnes)
  - Commmit change to yoru repo and push (if editting local repo)
  - Create **Pull Request** to merge your change into the class repository

"""metadatashow_logsèdisabled®skip_as_script«code_folded$d2cc4026-b2f0-4201-bf3b-c1615bbc9ab7cell_id$d2cc4026-b2f0-4201-bf3b-c1615bbc9ab7codeblockquote(md"""
What are the main causes of thrashing and how does Julia mitigate it? Specifically, how does Julia’s garbage collection reduce thrashing, if there even is a strong connection?
""")metadatashow_logsèdisabled®skip_as_script«code_folded$a4e4c54b-cda4-43af-b9ae-b1f5337f5fd0cell_id$a4e4c54b-cda4-43af-b9ae-b1f5337f5fd0codeTblockquote(md"""
Can you demonstrate how to import a julia program into python?
""")metadatashow_logsèdisabled®skip_as_script«code_folded$6853e432-81b5-4761-9e7a-3c48c9867291cell_id$6853e432-81b5-4761-9e7a-3c48c9867291codemd"""
### Some form of **tree** when:
- Elements have a meaningful order
- Value fast adding/removing and searching of elements
- Value not allocating (much) more memory than necessary
- Don't mind taking longer to access individual elements
- Willing to spend some time maintaing well-ordered tree
- Common in database type applications

#### Generic tree (not particularly useful) 
![Unbalanced tree](https://upload.wikimedia.org/wikipedia/commons/a/a9/Unbalanced_binary_tree.svg) - source [Wikimedia](https://en.wikipedia.org/wiki/File:Unbalanced_binary_tree.svg)

#### Balanced binary tree
![Balanced tree](https://upload.wikimedia.org/wikipedia/commons/0/06/AVLtreef.svg) - source [Wikimedia](https://en.wikipedia.org/wiki/File:AVLtreef.svg)
"""metadatashow_logsèdisabled®skip_as_script«code_folded$9b9e06d6-0566-42f0-93bc-65206e3add02cell_id$9b9e06d6-0566-42f0-93bc-65206e3add02codeNbegin 
	local n = 100
	vec_of_pairs = collect(zip(rand(1:10,n), randn(n)))
endmetadatashow_logsèdisabled®skip_as_script«code_folded$840a2af4-4eab-4857-879d-a9c62b1e27a1cell_id$840a2af4-4eab-4857-879d-a9c62b1e27a1codemd"""
## [How to excel at code reviews @ BetterProgramming](https://betterprogramming.pub/13-code-review-standards-inspired-by-google-6b8f99f7fd67)
1. The code improves the overall health of the system
2. Quick code reviews, responses, and feedback
3. **Educate and inspire during the code review**
4. Follow the standards when reviewing code
5. Resolving code review conflicts
6. Demo UI changes as a part of code review
7. Ensure that the code review accompanies all tests
8. **When focused, do not interrupt yourself to do code review**
9. Review everything, and **don’t make any assumptions**
10. **Review the code with the bigger picture in mind**
"""metadatashow_logsèdisabled®skip_as_script«code_folded$a876b548-3b0e-48d1-98bf-6bf005230e92cell_id$a876b548-3b0e-48d1-98bf-6bf005230e92codeSmd"> Astro 528: High-Performance Scientific Computing for Astrophysics (Fall 2025)"metadatashow_logsèdisabled®skip_as_script«code_folded$373376f2-3557-42f5-bdeb-9ae70ed3d060cell_id$373376f2-3557-42f5-bdeb-9ae70ed3d060codemd"""
## Week 6
"""metadatashow_logsèdisabled®skip_as_script«code_folded$083af3e8-77ad-4a30-8d80-282a5403b163cell_id$083af3e8-77ad-4a30-8d80-282a5403b163code'@test !all(sorted_merge.==sorted_quick)metadatashow_logsèdisabled®skip_as_script«code_folded$abf68ae8-2327-44eb-b0dc-24f66ae4f603cell_id$abf68ae8-2327-44eb-b0dc-24f66ae4f603code~md"""
```python
from julia.api import Julia
julia = Julia(compiled_modules=False)
from julia import Base
Base.sind(90)
```
"""metadatashow_logsèdisabled®skip_as_script«code_folded$76c7abf5-8eb5-4fc0-bca0-7c8098699fc1cell_id$76c7abf5-8eb5-4fc0-bca0-7c8098699fc1codemd"""
- If using pure Julia, then garbage collector prevents leaks (at least in theory)
- In practice, you can use poor practices that cause it to use lots of memory, e.g.,
   - Large/many variables in global/module scope
   - Not organizing code into self-contained functions
   - Allocating more memory than you really need
   - Many small allocations
- If you call C, Fortran, Python, R, etc., then memory leaks are possible.  
- Test your code
- `@time` or `@allocated` to count number/ammount of allocations.  Does it match what you expect?
- In ProfileCanvas.jl, can use `@profview_allocs` to visually find functions/lines that allocate lots of memory (not necessarily a leak).
"""metadatashow_logsèdisabled®skip_as_script«code_folded$838815fa-5917-4347-bb3c-bf8300d2d942cell_id$838815fa-5917-4347-bb3c-bf8300d2d942codemd"""
"Scratch" can mean different things depending on context:
- A separate physical disk or file system that is intended to be used for temporary files.
  - E.g., Roar's `/storage/scratch/USERID/` provides large storage but autodeletes your files
- A portion of memory allocated and reserved for holding scratch data
  - E.g., preallocating a workspace to be used for auto-differentiation, integration, factoring a matrix, etc.
"""metadatashow_logsèdisabled®skip_as_script«code_folded$5797afa6-13ac-457d-aeee-5d4403f61787cell_id$5797afa6-13ac-457d-aeee-5d4403f61787codeblockquote(md"""
The reading talks about being cache friendly-- if we were performing a search wouldn't how cache friendly the search is be dependent on the search algorithm? How do we know what type of search algorithm is being used if we didn't write the code ourselves? How would we know how to optimize the structure of our code based on the search algorithm we are using and how the program/computer access memory?
""")metadatashow_logsèdisabled®skip_as_script«code_folded$a541ae26-c160-4549-af71-c4473f0eefb7cell_id$a541ae26-c160-4549-af71-c4473f0eefb7codeٜblockquote(md"""
How severe will thrashing be in a high-level language such as Julia? Should we worry about it immediately or only during optimization?
""")metadatashow_logsèdisabled®skip_as_script«code_folded$c247aa92-2803-402d-b1cf-ebbf819c56accell_id$c247aa92-2803-402d-b1cf-ebbf819c56accodemd"""
# Setup
"""metadatashow_logsèdisabled®skip_as_script«code_folded$e00f7ffc-16dd-4e6f-ad85-74f6117eb958cell_id$e00f7ffc-16dd-4e6f-ad85-74f6117eb958codemd"""
First, setup PyCall.jl (to call Python from Julia) by running
```shell
> julia -e 'import Pkg; Pkg.add("PyCall");'
```
You only need to do that once (for each system you're running it on).
"""metadatashow_logsèdisabled®skip_as_script«code_folded$2ba07b9f-97b0-4ec3-90ae-bdf2b5616370cell_id$2ba07b9f-97b0-4ec3-90ae-bdf2b5616370code|md"""
![Linked List](https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Singly-linked-list.svg/640px-Singly-linked-list.svg.png)

Use **linked list** when:
- Likely to insert elements and/or change size often
- Don't mind taking longer to access elements (other than beginning/end)
- Value not allocating (much) more memory than necessary
- Useful for frequent sorting 
"""metadatashow_logsèdisabled®skip_as_script«code_folded$53f5a5ca-201f-4aea-aa4c-fe82ae0249f2cell_id$53f5a5ca-201f-4aea-aa4c-fe82ae0249f2codeimd"""
Inside Jupyter notebook:
```python
In [1]: %load_ext julia.magic
Initializing Julia runtime. This may take some time...

In [2]: %julia [1 2; 3 4] .+ 1
Out[2]:
array([[2, 3],
       [4, 5]], dtype=int64)
In [3]: arr = [1, 2, 3]

In [4]: %julia $arr .+ 1
Out[4]:
array([2, 3, 4], dtype=int64)

In [5]: %julia sum(py"[x**2 for x in arr]")
Out[5]: 14
```
"""metadatashow_logsèdisabled®skip_as_script«code_folded$28d23ac8-ca53-4182-87d7-52fee383f2c5cell_id$28d23ac8-ca53-4182-87d7-52fee383f2c5code0md"""
## Peer Review Logistics
- Access
   - I'll send you GitHub ID of peer reviewer(s)
   - Make sure reviewer(s) can access your repo
     + If your project repo is private: `Settings`, `Collaborators & Teams`, `Add people`, `Read`, `Add Selection`.
     + Or make your project repo public:  `Settings`, `Change Visibility`, plus multiple multiple steps to confirm.
   - Make sure you can access repo to review

- If using Jupyter notebooks, make sure to add Markdown version of code for getting feedback. 
```julia
julia -e 'import Pkg; Pkg.add("Weave"); using Weave; convert_doc("NOTEBOOK_NAME.ipynb","NOTEBOOK_NAME.jmd")'
```
- [Review instructions](https://psuastro528.github.io/Fall2025/project/code_reviews/how_to/)
- Provide most feedback via [GitHub Issues](https://guides.github.com/features/issues/)
"""metadatashow_logsèdisabled®skip_as_script«code_folded$626cd1f0-b2d0-48e4-88ee-775e1f037480cell_id$626cd1f0-b2d0-48e4-88ee-775e1f037480codedmd"""
```python
from julia import Main as jl
jl.exp(0)
jl.xs = [1, 2, 3]
jl.eval("sin.(xs)")
```
"""metadatashow_logsèdisabled®skip_as_script«code_folded$6a0d5ba5-40d0-445d-a0fa-32fcfbad00c9cell_id$6a0d5ba5-40d0-445d-a0fa-32fcfbad00c9codemd"""
## [Code Review Best Practices @ Palantir](https://blog.palantir.com/code-review-best-practices-19e02780015f)
### Purpose
- Does this code accomplish the author’s purpose? 
- **Ask questions.**

### Implementation
- **Think about how you would have solved the problem.**
- Do you see potential for useful abstractions?
- **Think like an adversary, but be nice about it.**
- Think about libraries or existing product code.
- Does the change follow standard patterns?
- **Does the change add dependencies**? 
- Think about your reading experience. 
- Does the code adhere to coding guidelines and code style? 
- Does this code have TODOs? 

### Maintainability
- **Read the tests**.
- Does this CR introduce the risk of breaking test code, staging stacks, or integrations tests?
- Leave feedback on code-level documentation, comments, and commit messages. 
- **Was the external documentation updated?**
"""metadatashow_logsèdisabled®skip_as_script«code_folded$4cde0527-defc-4901-bb4c-071bc115e102cell_id$4cde0527-defc-4901-bb4c-071bc115e102codemd"# Data structures"metadatashow_logsèdisabled®skip_as_script«code_folded$0588f080-1da7-4df0-930b-582c065cab75cell_id$0588f080-1da7-4df0-930b-582c065cab75code:md"ToC on side $(@bind toc_aside CheckBox(;default=true))"metadatashow_logsèdisabled®skip_as_script«code_folded$f508c1c8-945b-4b99-8985-5f10946b0239cell_id$f508c1c8-945b-4b99-8985-5f10946b0239code md"""
![Don't make assumptions cartoon](https://miro.medium.com/max/560/1*g95FYDe5j9X_9SqEj1tycQ.jpeg)

(Credit: [Manu](https://ma.nu/) via [BetterProgramming.pub](https://betterprogramming.pub/13-code-review-standards-inspired-by-google-6b8f99f7fd67))
"""metadatashow_logsèdisabled®skip_as_script«code_folded$7b7bd5c8-a8e8-445c-9239-9c7322a81313cell_id$7b7bd5c8-a8e8-445c-9239-9c7322a81313codecmd"""
## Array
- Consecutive elements in a 1-d array are stored in consecutive memory locations

Use **array** when:
- Know size at time of creation (or won't need to change size often)
- Value fast access to elements (not just the beginning/end)
- Value not allocating more memory than memory
- Very common for scientific performance sensitive code


"""metadatashow_logsèdisabled®skip_as_script«code_folded$f965c656-6b7b-441d-8111-855ecfe79ca6cell_id$f965c656-6b7b-441d-8111-855ecfe79ca6codeblockquote(md"""
How does memory function from cell-to-cell within a notebook? Is it more efficient to split up code over many cells, or have them operate in the same one? How does this impact runtime and general performance?
""")metadatashow_logsèdisabled®skip_as_script«code_folded$7a13c062-b641-4894-9288-4a79c1005c49cell_id$7a13c062-b641-4894-9288-4a79c1005c49codemd"""
## Serial version of Code Rubic
- Code performs proposed tasks (1 point)
- Comprehensive set of unit tests, at least one integration or regression test (1 point)
- Code passes tests (1 point)
- Student code uses a version control system effectively (1 point)
- Repository includes many regular, small commits (1 point)
- Documentation for functions’ purpose and design (1 point)
- Comprehensive set of assertions (1 point)
- Variable/function names consistent, distinctive & meaningful (1 point)
- Useful & consistent code formatting & style (1 point)
- Code is modular, rather than having chunks of same code copied and pasted (1 point)
"""metadatashow_logsèdisabled®skip_as_script«code_folded$442d604f-79a0-473d-a5b1-d90ca303fc2ecell_id$442d604f-79a0-473d-a5b1-d90ca303fc2ecodebegin
	function less_than_custom(a::Tuple,b::Tuple)
		return a[1]<b[1]
	end
	
	sorted_merge = sort(vec_of_pairs,lt=less_than_custom, alg=MergeSort)
	sorted_quick = sort(vec_of_pairs,lt=less_than_custom, alg=QuickSort)
endmetadatashow_logsèdisabled®skip_as_script«code_folded$b9baebea-2312-4c28-905c-b47ec3a26415cell_id$b9baebea-2312-4c28-905c-b47ec3a26415codeWidthOverDocs()metadatashow_logsèdisabled®skip_as_script«code_folded$fed62143-6d25-4d6a-927b-84f5d20fab0dcell_id$fed62143-6d25-4d6a-927b-84f5d20fab0dcodeYmd"""
- Lots of small allocations on the heap
- Java (probably the first "major" language to have garbage collection built-in) gave garbage collection a bad reputation because it only allows mutable user-defined types (and passes all objects by pointers), making it quite hard to avoid heap allocation of even very small objects.  
- Julia (and C#) encourage the use of immutable types
- Julia pass variables by reference (so they can pass variables on the stack)
- C# passes variables by value by default (so they stay on stack, but often unnecessary stack allocations) and can pass by reference.
"""metadatashow_logsèdisabled®skip_as_script«code_folded$533dbe7a-aae6-41dd-8737-2f995bb6c7f6cell_id$533dbe7a-aae6-41dd-8737-2f995bb6c7f6codemd"""
# Old Q&As
"""metadatashow_logsèdisabled®skip_as_script«code_folded$3d678919-c197-4c9d-aed9-bf94dd431c4ccell_id$3d678919-c197-4c9d-aed9-bf94dd431c4ccodeيmd"""
# Admin Announcements
## Labs
- No lab this week, so can work on your projects
- Still meet this Friday for a group work session
"""metadatashow_logsèdisabled®skip_as_script«code_folded$e2a60b81-1584-4d2d-8b08-9055d362cdfbcell_id$e2a60b81-1584-4d2d-8b08-9055d362cdfbcodemd"""
# Learning from others with more experience conducting Code Reviews
## [Best Practices for Code Review @ Smart Bear](https://smartbear.com/learn/code-review/best-practices-for-peer-code-review/)
1. Review fewer than 400 lines of code at a time
2. Take your time. Inspection rates should under 500 LOC per hour
3. **Do not review for more than 60 minutes at a time**
4. Set goals and capture metrics
5. **Authors should annotate source code before the review**
6. **Use checklists**
7. Establish a process for fixing defects
8. **Foster a positive code review culture**
9. Embrace the subconscious implications of peer review
10. **Practice lightweight code reviews**
"""metadatashow_logsèdisabled®skip_as_script«code_folded$d2d20b37-37c0-4bc4-bd20-ad28d367545acell_id$d2d20b37-37c0-4bc4-bd20-ad28d367545acodexmd"""
But be careful... sometimes different algorithms give different results.  E.g., whether sorting is **stable**.
"""metadatashow_logsèdisabled®skip_as_script«code_folded$f0fc9af7-737c-4c08-a772-1136be959a6dcell_id$f0fc9af7-737c-4c08-a772-1136be959a6dcodemd"""
- It's more efficient to split up code into separate functions (regardless of whether they are in the same cell or not).
- There might be a very slight latency cost of having lots of cells.  But that's unlikley significant unless you are making a really big notebook.
"""metadatashow_logsèdisabled®skip_as_script«code_folded$c8b93838-61ee-4c11-82de-e54a1d1b68afcell_id$c8b93838-61ee-4c11-82de-e54a1d1b68afcodemd"""
## Garbage collection
"""metadatashow_logsèdisabled®skip_as_script«code_folded$dd6c279f-d09b-4789-8776-7553dd023e1bcell_id$dd6c279f-d09b-4789-8776-7553dd023e1bcodeObegin 
	x = rand(100)
	x_sorted_default = sort(x)
	x_sorted_insertion = sort(x, alg=InsertionSort)
	x_sorted_merge = sort(x, alg=MergeSort)
	x_sorted_quick = sort(x, alg=QuickSort)
	@test all(x_sorted_default .== x_sorted_insertion) &&  
		  all(x_sorted_default .== x_sorted_merge) && 
		  all(x_sorted_default .== x_sorted_quick)
endmetadatashow_logsèdisabled®skip_as_script«code_folded$0969fdf8-9223-4e48-99f9-ef353d92fdb2cell_id$0969fdf8-9223-4e48-99f9-ef353d92fdb2codeOblockquote(md"""
How does one check if the code would cause a memory leak?
""")metadatashow_logsèdisabled®skip_as_script«code_folded$5ad00ac5-b689-40b5-ba2d-905b340a47ffcell_id$5ad00ac5-b689-40b5-ba2d-905b340a47ffcodeCmd"""
# Preping for Code Review
## Make it easy for your reviewer
- Provide overview of what your code is doing in README.md
- Where should they start?
- What files should they focus on?
- What files should they ignore?
- Include an example of how to run/use code

## Make it easy for you
As code starts getting larger, then
- Move code out of notebooks and into `.jl` files, as functions mature.
- Organize similar functions into `.jl` files in `src` directory
- Use diretories like `examples`, `test`
- If/when appropiate add more directories (e.g., `data`, `deps`, `docs`)
"""metadatashow_logsèdisabled®skip_as_script«code_folded$0d655992-c218-4f68-b7e8-45aa3454000bcell_id$0d655992-c218-4f68-b7e8-45aa3454000bcodemd"""
### Peer Code Review
- Constructive suggestions for improving programming practices (1 point)
- Specific, constructive suggestions for improving code readability/documentation (1 point)
- Specific, constructive suggestions for improving tests and/or assertions (1 point)
- Specific, constructive suggestions for improving code modularity/organization/maintainability (1 point)
- Specific, constructive suggestions for improving code efficiency (1 point)
- Finding any bugs (if code author confirms) (bonus points?)
"""metadatashow_logsèdisabled®skip_as_script«code_folded$09199e18-da64-4abb-8053-e3bc0448df8bcell_id$09199e18-da64-4abb-8053-e3bc0448df8bcode>md"""
Then from python/Jupyter notebook with Python kernel
"""metadatashow_logsèdisabled®skip_as_script«code_folded$d2f4bb2d-d222-4c61-9c63-a57bdfef1927cell_id$d2f4bb2d-d222-4c61-9c63-a57bdfef1927codeSmd"""
```python
import numpy as np
x = np.array([1.0, 2.0, 3.0])

jl.sum(x)
```
"""metadatashow_logsèdisabled®skip_as_script«code_folded$531f25b0-2d29-4db1-ab44-b927b6377945cell_id$531f25b0-2d29-4db1-ab44-b927b6377945code7begin
	using PlutoUI, PlutoTest, PlutoTeachingTools
endmetadatashow_logsèdisabled®skip_as_script«code_folded$e203823e-3a1f-4812-b2a9-6ab80a811860cell_id$e203823e-3a1f-4812-b2a9-6ab80a811860codesorted_merge, sorted_quickmetadatashow_logsèdisabled®skip_as_script«code_folded$9380c6be-90bc-47fa-98b5-92e0e8539110cell_id$9380c6be-90bc-47fa-98b5-92e0e8539110code#md"""
## Prioritizing Code Review Feedback
![Handle conflicts different based on the severity. Credit: Alex Hill](https://miro.medium.com/max/560/1*zOvsiXkzqVJ7O8KalHhDZQ.jpeg)
- Credit:  [Alex Hill](https://betterprogramming.pub/13-code-review-standards-inspired-by-google-6b8f99f7fd67)
"""metadatashow_logsèdisabled®skip_as_script«code_folded$d8fd8af3-a65d-4230-bb35-e1144e459520cell_id$d8fd8af3-a65d-4230-bb35-e1144e459520codenblockquote(md"""
What exactly is "scratch" memory, and what differentiates it from other kinds of memory?
""")metadatashow_logsèdisabled®skip_as_script«code_folded$2097dafd-e457-46b4-b6d6-fdf6f66c6675cell_id$2097dafd-e457-46b4-b6d6-fdf6f66c6675codemd"""
- Read the documentation 
- Choose the algorithm for your problem (e.g., [Description of sorting algorithms](https://docs.julialang.org/en/v1/base/sort/#Base.Sort.InsertionSort))
- Consider order of algorithm and whether *in-place*
- Most often, I choose the algorithm that's best fit for my data.
- But sometimes I might change the data structure to be a better fit for my algorithm
"""metadatashow_logsèdisabled®skip_as_script«code_folded$c94864a5-996d-432d-8e14-888991c8e119cell_id$c94864a5-996d-432d-8e14-888991c8e119code TableOfContents(aside=toc_aside)metadatashow_logsèdisabled®skip_as_script«code_folded$603442cb-fdd9-4551-b503-6af0dddc86d7cell_id$603442cb-fdd9-4551-b503-6af0dddc86d7code|md"""
- Thrasing is a result of programming practices.
- When you're a beginning programmer, focus on other things first.  Benchmark/profile to find inefficient code and then optimize.
- As you gain more experience, you'll start to recognize places where thrashing could occur as you start to write them.  In that case, a little planning early on can save work down the road. 
"""metadatashow_logsèdisabled®skip_as_script«code_folded$9e23b40c-e252-438f-a151-0e8c3d0d8271cell_id$9e23b40c-e252-438f-a151-0e8c3d0d8271codeVmd"""
```python
jl.include("my_julia_code.jl")
jl.function_in_my_julia_code(x)
```
"""metadatashow_logsèdisabled®skip_as_script«code_folded$55ad7c5d-a8b4-4b35-bb0f-7784bc7f51c6cell_id$55ad7c5d-a8b4-4b35-bb0f-7784bc7f51c6codehmd"""
### **Hash table** (aka dictionary/`Dict`) when:
- Elements unlikely to be accessed in any particular order
- Value pretty fast access to individual elements
- Don't mind allocating significantly more memory than necessary
- Useful for scripting, non-performance sensitive code

![Hash table](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Hash_table_3_1_1_0_1_0_0_SP.svg/1024px-Hash_table_3_1_1_0_1_0_0_SP.svg.png) - source [Wikimedia](https://commons.wikimedia.org/wiki/File:Hash_table_3_1_1_0_1_0_0_SP.svg), Jorge Stolfi, [CC-BY-SA-3.0](https://creativecommons.org/licenses/by-sa/3.0/deed.en)
"""metadatashow_logsèdisabled®skip_as_script«code_foldedënotebook_id$d80f4b82-bfd9-11f0-2d47-2376ea611b3din_temp_dir¨metadata