Skip to content

Commit 3c29eb4

Browse files
committed
update toc formatting
1 parent 34bc4c8 commit 3c29eb4

8 files changed

Lines changed: 124 additions & 80 deletions

File tree

_includes/sidebar.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
{% endfor %}
2626

2727
<a class="sidebar-nav-item{% if page.url == '/' %} active{% endif %}" href='{{ site.baseurl }}/'>about</a>
28-
<a class="sidebar-nav-item{% if page.url == '/building/' %} active{% endif %}" href='{{ site.baseurl }}/building/'>building</a>
29-
<a class="sidebar-nav-item{% if page.url == '/reading/' %} active{% endif %}" href='{{ site.baseurl }}/reading/'>reading</a>
30-
<a class="sidebar-nav-item{% if page.url == '/archive/' %} active{% endif %}" href='{{ site.baseurl }}/archive/'>writing</a>
28+
<a class="sidebar-nav-item{% if page.url contains '/building/' %} active{% endif %}" href='{{ site.baseurl }}/building/'>building</a>
29+
<a class="sidebar-nav-item{% if page.url contains '/reading/' %} active{% endif %}" href='{{ site.baseurl }}/reading/'>reading</a>
30+
<a class="sidebar-nav-item{% if page.url contains '/archive/' or page.url contains '/writing/' %} active{% endif %}" href='{{ site.baseurl }}/archive/'>writing</a>
3131
<!--<a class="sidebar-nav-item" href='{{ site.baseurl }}/presenting/'>presenting</a>-->
3232
</nav>
3333

_layouts/post.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@
77
<div class="reading-progress" id="reading-progress"></div>
88
</div>
99

10+
<!-- Smart Back Button -->
11+
<div class="back-button-container">
12+
{% if page.categories contains 'reading' %}
13+
<a href="{{ site.baseurl }}/reading/">
14+
<span class="back-arrow"></span> Back
15+
</a>
16+
{% elsif page.categories contains 'writing' %}
17+
<a href="{{ site.baseurl }}/archive/">
18+
<span class="back-arrow"></span> Back
19+
</a>
20+
{% endif %}
21+
</div>
22+
1023
<div class="post">
1124
<h1 class="post-title">{{ page.title }}</h1>
1225

@@ -30,7 +43,6 @@ <h1 class="post-title">{{ page.title }}</h1>
3043
<!-- Table of Contents (for posts with toc enabled) -->
3144
{% if page.toc %}
3245
<nav class="toc" id="toc">
33-
<h3><i>Table of Contents</i></h3>
3446
<ul id="toc-list"></ul>
3547
</nav>
3648
{% endif %}

_posts/2019-11-16-compentence_over_comprehension.md

Lines changed: 31 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,31 @@ they have. Understanding is another whole level above being competent at somethi
1414
an unnecessary part.
1515

1616
Birds evolved the capacity for flight (competency), which comes with all types of evolutionary
17-
advantages (for capturing prey, for evading predators, etc.), but they didn't evolve the ability to
17+
advantages (capturing prey, evading predators, etc.), but they didn't evolve the ability to
1818
to understand why flight is useful or why they evolved the ability in the first place (comprehension).
1919
The capacity for understanding an ability is totally separate from the ability itself. At the very
2020
least, they are orthogonal, and more likely they're in slight opposition.
2121

2222
Arguably, humans have great capacity for understanding. Arguably, we don't need competency for
2323
abilities, like flight, where if we just understand them enough we can just engineer and/ or
24-
manufacture them from our understanding. Some might argue this is why we now have the ability for
25-
flight, augmented by machines we've engineered and/ or manufactured.
24+
manufacture them from our understanding.
2625

27-
## Competence > Comprehension
26+
## Competence Precedes Comprehension
2827

29-
Except that's now how the technology for flight originally developed, and that's not how technology
30-
generally develops. Aviation technology didn't develop by taking the laws of aerodynamics and
31-
building a machine that harnesses them in a clever way to produce flight. That's not how it worked,
28+
Except that's not how the technology for flight originally developed, and that's not how technology develops in general.
29+
30+
Aviation technology didn't develop by taking the laws of aerodynamics and building a machine that harnesses them in a clever way to produce flight. That's not how it worked,
3231
the first great breakthrough in human flight didn't come from physicists or scientists. The first
3332
great breakthrough came from 2 brothers who were bicycle mechanics, experimenting, iterating and
3433
imitating what they thought worked for birds. Their genius wasn't from understanding, it came from
3534
mechanical competence and application of that competence. The understanding of why exactly it worked
3635
came later, the science trailed the engineering.
3736

3837
And, believe it or not, this is the dominant pattern in human technological development. We don't
39-
understand how many drugs that we know work well, and use daily, actually work (e.g. aspirin's mechanism
40-
of action is still unknown). The inventions of written human language and the telegraph preceded
41-
information theory. We still don't have a good understanding for why deep neural networks work as
42-
well as they do. And then, the biggest kicker of them all, there's the machine/ organ we rely on for
43-
literally everything---that which you trust to determine what to trust---our brains, the interworkings
44-
of which we still only have a cursory understanding of.
38+
understand how many drugs that we know work well, and use daily, actually work (e.g. aspirin's mechanism of action is still unknown). The inventions of written human language and the telegraph preceded information theory. We still don't have a good understanding for why deep neural networks work as well as they do.
39+
40+
And then, the biggest kicker of them all, there's the machine/ organ we rely on for
41+
literally everything---that which you trust to determine what to trust---our brains, the interworkings of which we still only have a cursory understanding of.
4542

4643
With all of the talk of the danger of black boxes in machine learning and scientific research, it's
4744
amazing how little white boxes--things where we understand and can explain their mechanics--there
@@ -51,35 +48,27 @@ things which we undestand as a society, but individuals take for granted and eff
5148
black boxes (e.g. cars, again your own brain, etc.).
5249

5350
And I don't think this is such a bad thing. My point here is this: when it comes down to it, what
54-
matters most is competency, that things work. Not how they work, or understanding why they work.
55-
This is why compentence is better than comprehension 100% of the time. If you need your car fixed,
56-
you hire a mechanic, not a physicist.
57-
58-
## Value Added By Comprehension Requires Competence
59-
60-
That's not to completely do away with comprehension, that would be silly. Science is comprehension
61-
and obviously that's not something we want to do away with. Comprehension does a lot to offer as
62-
well, but it's at higher levels of value, it's more difficult and importantly it requires competence.
63-
64-
Part of the reason why great athletes or artists aren't always the best coaches or teachers is because
65-
they're too steeped in competence, too reliant on their intuition and can't seem to develop (because
66-
they never needed to develop) good ways of communicating that competence to others. The best coaches
67-
many times come from subpar athletes that love the game and dedicate time to *studying* it, rather
68-
than *playing* it.
69-
70-
Great coaches make for great teams, and dynasties. There would be no Patriots without Belichick
71-
(comprehension). However, equally true, there would also be no Patriots without Brady (competence).
72-
You can't play the game without the players, the coaches just add another level at which to be great.
73-
74-
Which brings us to what competence is: competence is execution, is the physical work or product
75-
produced. The quality of the output, which using metrics over time can be quantified, is the mark
76-
of the level of competency. Competency speaks in concrete terms by way of capability (physical, in
77-
the case of sport) and in results. Comprehension doesn't speak concretely, it speaks in abstractions.
78-
79-
Given these facts, although comprehension can add value at higher levels--think great coach building
80-
a great team--preference goes to competence. There would be no game without players playing
81-
it, part of a great coach's job is ensuring the team's competence. At the highest levels of
82-
performance, strong conprehension is necessary but it simply can't exist without competency.
51+
matters most is competency, that things work. Not how they work, or understanding why they work. If you need your car fixed, you hire a mechanic, not a physicist.
52+
53+
## Comprehension Requires Competence
54+
55+
That doesn't mean we should completely do away with comprehension.
56+
57+
Science is comprehension and that's obviously not something we want to do away with at all. Comprehension can be very valuable, even though it's more difficult. Once we've developed a new technology, we gain a deeper understanding to optimize and take it to the next level.
58+
59+
One thing to remember though: competence is a typically a prerequisite for understanding.
60+
61+
Part of the reason why great athletes/ artists aren't always the best coaches/ teachers is because
62+
they're too steeped in competence, too reliant on their intuition and never needed to develop ways of communicating that competence to others. The best coaches many times come from subpar athletes that love the game and dedicate time to *studying* it, rather than *playing* it.
63+
64+
No doubt great coaches make great teams. There would be no Patriots dynasty without Belichick
65+
(comprehension). However, even more true, there would also be no Patriots dynasty without Brady (competence). Competence is execution; comprehension is strategy.
66+
67+
This is why competence > comprehension. You can't play the game without the players. You can't win without executing.
68+
69+
Competency speaks in concrete terms, in execution and in results. Comprehension doesn't speak concretely, it speaks in abstractions.
70+
71+
It can't actually play the game.
8372

8473

8574

_posts/2022-03-15-re_seeking_wisdom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ hidden: true
1212
| **Published** | January 1, 2007 |
1313

1414

15-
_This was book dense with rational and highly useful frameworks for thinking. Loved it. A couple nuggets below._
15+
_This book was dense with rational and highly useful frameworks for thinking. Loved it. A couple nuggets below._
1616

1717
### Status Quo and Do-Nothing Syndrome
1818

_posts/2024-11-01-re_elon.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ I love this approach because everyone upstream in the development process unders
130130

131131

132132

133-
### Risk, Being All In and “Burning the Boats” Strategy
133+
### Risk, Being All In and “Burning the Boats”
134134

135135
Elon loves “burning the boats”, where there’s no way to turn back after committing to a decision. He rarely has a fall back option. He goes all in and that’s clearly taken a huge part in his success.
136136

public/css/custom.css

Lines changed: 74 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,21 @@ li {
9999
padding: 0;
100100
display: flex;
101101
flex-direction: column;
102+
counter-reset: toc-counter;
102103
}
103104

104105
#toc-list li {
105-
margin: 0.25rem 0;
106+
margin: 0.1rem 0;
107+
counter-increment: toc-counter;
108+
}
109+
110+
#toc-list li::before {
111+
content: counter(toc-counter) ". ";
112+
color: #666;
113+
font-weight: bold;
114+
margin-right: 0.5rem;
115+
display: inline-block;
116+
vertical-align: top;
106117
}
107118

108119
#toc-list .toc-h3 {
@@ -112,23 +123,20 @@ li {
112123

113124
#toc-list a {
114125
text-decoration: none;
115-
color: #303030;
126+
/*color: #303030;*/
116127
transition: color 0.2s ease;
117-
display: block;
118-
padding: 0.25rem 0.5rem;
128+
display: inline-block;
129+
padding: 0rem 0.5rem;
119130
border-radius: 3px;
131+
color: #ac4142;
132+
width: calc(100% - 2rem);
133+
vertical-align: top;
120134
}
121135

122136
#toc-list a:hover {
123-
color: #ac4142;
124-
background-color: #f0f0f0;
137+
text-decoration: underline;
125138
}
126139

127-
#toc-list a.active {
128-
color: #ac4142;
129-
font-weight: bold;
130-
background-color: #f0f0f0;
131-
}
132140

133141
/* Smooth Scrolling */
134142
html {
@@ -168,3 +176,58 @@ html {
168176
width: 100% !important;
169177

170178
}
179+
180+
/* Back Button Styling */
181+
.back-button-container {
182+
margin: 0.5rem 0;
183+
padding-right: 1rem;
184+
text-align: right;
185+
}
186+
187+
.back-button {
188+
display: inline-flex;
189+
align-items: center;
190+
padding: 0.75rem 1.25rem;
191+
background-color: #f8f8f8;
192+
border: 1px solid #e0e0e0;
193+
border-radius: 6px;
194+
color: #555;
195+
text-decoration: none;
196+
font-size: 0.9rem;
197+
font-weight: 500;
198+
transition: all 0.2s ease;
199+
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
200+
}
201+
202+
.back-button:hover {
203+
background-color: #ac4142;
204+
color: white;
205+
border-color: #ac4142;
206+
text-decoration: none;
207+
box-shadow: 0 2px 6px rgba(172,65,66,0.2);
208+
transform: translateY(-1px);
209+
}
210+
211+
.back-arrow {
212+
margin-right: 0.25rem;
213+
font-size: 1rem;
214+
transition: transform 0.2s ease;
215+
}
216+
217+
.back-button:hover .back-arrow {
218+
transform: translateX(-3px);
219+
}
220+
221+
/* Responsive adjustments for back button */
222+
@media screen and (max-width: 600px) {
223+
.back-button-container {
224+
padding-right: 0.5rem;
225+
margin: 1rem 0;
226+
text-align: right;
227+
}
228+
229+
.back-button {
230+
padding: 0.6rem 1rem;
231+
font-size: 0.85rem;
232+
}
233+
}

public/css/poole.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ th {
248248
}
249249
tbody tr:nth-child(odd) td,
250250
tbody tr:nth-child(odd) th {
251-
background-color: #f9f9f9;
251+
background-color: transparent;
252252
}
253253

254254

public/js/script.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,27 +64,7 @@
6464
}
6565
});
6666

67-
// Highlight current section in TOC
68-
var tocLinks = toc.querySelectorAll('a');
69-
70-
function highlightTOC() {
71-
var scrollPosition = window.scrollY + window.innerHeight / 3; // More forgiving scroll detection
72-
73-
headings.forEach(function(heading, index) {
74-
var headingTop = heading.offsetTop;
75-
var headingBottom = headingTop + heading.offsetHeight;
76-
77-
if (scrollPosition >= headingTop && scrollPosition < headingBottom) {
78-
tocLinks.forEach(function(link) { link.classList.remove('active'); });
79-
if (tocLinks[index]) {
80-
tocLinks[index].classList.add('active');
81-
}
82-
}
83-
});
84-
}
8567

86-
window.addEventListener('scroll', highlightTOC);
87-
highlightTOC(); // Initial highlight
8868
}
8969

9070
// Initialize features when DOM is loaded

0 commit comments

Comments
 (0)