Compare commits
16 Commits
ae400e1a78
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8abc5932b5 | |||
|
|
98323532c5 | ||
|
|
de60f3113c | ||
|
|
8c18f8e67b | ||
|
|
fdccb56b92 | ||
|
|
694b84e69b | ||
| 76f11a463f | |||
|
|
ae633c55fc | ||
|
|
961406dd67 | ||
| a50f603a64 | |||
|
|
739be9ed87 | ||
| 4832b812b2 | |||
| 11b9f68b02 | |||
| 19baf1946c | |||
| 4a38bf1fdd | |||
| 29170aa80e |
33
content/blog/Coding Review Process.md
Normal file
33
content/blog/Coding Review Process.md
Normal file
@@ -0,0 +1,33 @@
|
||||
+++
|
||||
title = "Coding Review Process"
|
||||
date = "2026-04-03"
|
||||
tags = ["software"]
|
||||
+++
|
||||
|
||||
## Evaluate the commits you make.
|
||||
|
||||
Do this as you code and commit. Paying attention here, spending an extra 5 minutes to deeply understand the changes you made - and refreshing your mind on previous commits - will save time and potential headache ten-fold later down the line.
|
||||
### Questions to ask yourself
|
||||
1. Does each commit make sense where it is?
|
||||
2. Are the names of functions and variables correct?
|
||||
3. Are the _diffs_ in the right place and in the correct order?
|
||||
4. Does each commit compile and pass the tests?
|
||||
5. What impact does each commit have?
|
||||
## Review your own code
|
||||
|
||||
This should be done in a separate environment to the one you code in. For me, this could be GitHub (or any other online PR viewer), or in a local diff view.
|
||||
### Questions to ask yourself
|
||||
1. Does each commit _still_ make sense?
|
||||
2. __High level overview__: Does it actually work? Are you wiring the correct functions to the correct place? We often miss the bigger picture when we're down in the code.
|
||||
3. Does the architecture make sense? Are the functions you choose and the abstraction you made worth it?
|
||||
4. Does it work end-to-end?
|
||||
5. __Nits__. Do the names make sense, is the spacing correct. Less important, but still very important. If you can't understand your own code, how can others?
|
||||
|
||||
## Optional: Have AI review your code
|
||||
|
||||
You can use a good agent, with a good prompt, and access to your code base (it must be aware of coding style and general abstractions), to review your code. The agent should have some understand of the code base. Otherwise it might have to go and find it each time.
|
||||
|
||||
It will catch things you didn't think of, and act as a barrier between you and the reviewer, so that the reviewer has less to catch.
|
||||
## Review from a reviewer
|
||||
|
||||
Hand the PR to another engineer in your team, who has an understand of the areas you've changed. This process is last, and takes the longest, so you want to arrive at this step having made sure that lower level errors have been corrected, and let the reviewer worry about higher level reviewing (although the reviewer should still pick things apart and comments their _nit picks_).
|
||||
8
content/gists/Just Code.md
Normal file
8
content/gists/Just Code.md
Normal file
@@ -0,0 +1,8 @@
|
||||
+++
|
||||
title = "Just Code"
|
||||
date = "2026-04-03T20:29:14Z"
|
||||
+++
|
||||
|
||||
Just Code. Making this is fun, you should do it often.
|
||||
|
||||
Just Code.
|
||||
13
content/places/Bacaro.md
Normal file
13
content/places/Bacaro.md
Normal file
@@ -0,0 +1,13 @@
|
||||
+++
|
||||
title = "Bacaro"
|
||||
date = "2026-04-03T20:45:13Z"
|
||||
location = "51.319617583056065,-0.5572360470167215"
|
||||
lon = -0.5572360470167215
|
||||
lat = 51.319617583056065
|
||||
+++
|
||||
|
||||
The best restaurant in [Woking](https://en.wikipedia.org/wiki/Woking).
|
||||
|
||||
It's a family owned, Italian restaurant, with amazing pasta and superb service.
|
||||
|
||||
It's my #1 recommendation for food in Surrey.
|
||||
10
content/places/Impulse.md
Normal file
10
content/places/Impulse.md
Normal file
@@ -0,0 +1,10 @@
|
||||
+++
|
||||
title = "Impulse"
|
||||
date = "2026-04-03T21:00:28Z"
|
||||
lon = -0.5572360470167215
|
||||
lat = 51.320283468687144
|
||||
+++
|
||||
|
||||
My favourite corner shop.
|
||||
|
||||
I always get my elixir of wakefulness from here!
|
||||
3
content/places/_index.md
Normal file
3
content/places/_index.md
Normal file
@@ -0,0 +1,3 @@
|
||||
+++
|
||||
title = 'Places'
|
||||
+++
|
||||
20
content/places/velvet-revival.md
Normal file
20
content/places/velvet-revival.md
Normal file
@@ -0,0 +1,20 @@
|
||||
+++
|
||||
title = 'Velvet Revival'
|
||||
lon=-0.5598389213990184
|
||||
lat=51.31993995350889
|
||||
date = "2026-03-30"
|
||||
author = "John Costa"
|
||||
tags = ["Places", "Clothes", "Shops", "Woking"]
|
||||
+++
|
||||
|
||||
[Velvet Revival](https://www.velvet-revival.co.uk/) is a vintage shop which sells up-cycled goods. It's in [Woking](https://en.wikipedia.org/wiki/Woking).
|
||||
|
||||
I found the selection to be great. I bought a [Carhartt](https://www.carhartt.com/en-gb/) t-shirt, which is very nice, and I suspect a new trend in my wardrobe.
|
||||
|
||||
If you're ever in Surrey, or fancy a stroll outside London (the train is 25 minutes), this is a cute little shop to visit.
|
||||
|
||||
### Flyer
|
||||
|
||||
| Front | Back |
|
||||
| :--------------------------------------------------------------------------: | :------------------------------------------------------------------------: |
|
||||
|  |  |
|
||||
@@ -6,6 +6,6 @@ toc = true
|
||||
tags = ["Software", "Advent of Code"]
|
||||
+++
|
||||
|
||||
Git Repo: https://github.com/JohnCosta27/AdventOfCode
|
||||
Git Repo: https://git.johncosta.tech/JohnCosta27/AdventOfCode/
|
||||
|
||||
I'm a massive fan of the Advent of Code, I have created a big mono repo of all the years solutions.
|
||||
|
||||
@@ -22,6 +22,10 @@ theme = 'risotto'
|
||||
weight = 10
|
||||
name = 'Gists'
|
||||
pageRef = '/gists'
|
||||
[[menu.main]]
|
||||
weight = 15
|
||||
name = 'Places'
|
||||
pageRef = '/places'
|
||||
|
||||
[params.about]
|
||||
title = "John Costa"
|
||||
|
||||
19
layouts/_default/li.html
Normal file
19
layouts/_default/li.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<li class="post-item">
|
||||
{{ $format := "02 Jan 2006" }}
|
||||
<a href="{{ .Permalink }}" class="post-item__link">
|
||||
<span class="post-item__title">{{ .Title | markdownify }}</span>
|
||||
<span class="post-item__date">{{ .Date.Format $format }}</span>
|
||||
</a>
|
||||
{{ if .Summary }}
|
||||
<p class="post-item__summary">{{ .Summary | plainify | truncate 150 }}</p>
|
||||
{{ end }}
|
||||
{{ with .Params.tags }}
|
||||
<div class="post-item__tags">
|
||||
{{ range . }}
|
||||
{{ with $.Site.GetPage (printf "/tags/%s" .) }}
|
||||
<a href="{{ .Permalink }}" class="post-item__tag">{{ .Title }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</li>
|
||||
12
layouts/_default/list.html
Normal file
12
layouts/_default/list.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ define "main" }}
|
||||
<h1 id="{{ .Title | urlize }}">{{ .Title | markdownify }}</h1>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
<ul class="post-list">
|
||||
{{ range .Pages.ByDate.Reverse }} {{ .Render "li" }} {{ end }}
|
||||
</ul>
|
||||
|
||||
{{ end }} {{define "aside" }} {{ if .Params.description }}
|
||||
<p>{{ .Params.description }}</p>
|
||||
{{ end }} {{ end }}
|
||||
@@ -1,6 +1,6 @@
|
||||
<h2>Recent Posts</h2>
|
||||
<ul>
|
||||
{{ range first 5 (where site.RegularPages "Section" "in" (slice "blog" "gists" "books-and-tv" "projects")) }}
|
||||
{{ range first 5 (where site.RegularPages "Section" "in" (slice "blog" "gists" "books-and-tv" "projects" "places")) }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>{{ if .Date }}<p>{{ .Date.Format "2006-01-02" }}</p>{{ end }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
56
layouts/places/list.html
Normal file
56
layouts/places/list.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{{ define "main" }}
|
||||
<h1 id="{{ .Title | urlize }}">{{ .Title | markdownify }}</h1>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" />
|
||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
|
||||
|
||||
<div id="map" style="height: 500px; width: 100%; border-radius: 4px; margin-bottom: 1rem;"></div>
|
||||
|
||||
<script>
|
||||
var map = L.map('map').setView([30, 0], 2);
|
||||
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
var places = [
|
||||
{{ range .Pages }}
|
||||
{{ if and .Params.lat .Params.lon }}
|
||||
{
|
||||
title: {{ .Title }},
|
||||
lat: {{ .Params.lat }},
|
||||
lon: {{ .Params.lon }},
|
||||
url: {{ .RelPermalink }}
|
||||
},
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
];
|
||||
|
||||
var bounds = [];
|
||||
places.forEach(function(place) {
|
||||
var marker = L.marker([place.lat, place.lon]).addTo(map);
|
||||
marker.bindPopup('<a href="' + place.url + '">' + place.title + '</a>');
|
||||
bounds.push([place.lat, place.lon]);
|
||||
});
|
||||
|
||||
if (bounds.length > 0) {
|
||||
map.fitBounds(bounds, { padding: [50, 50] });
|
||||
}
|
||||
</script>
|
||||
|
||||
<ul>
|
||||
{{ range .Pages.ByDate.Reverse }}
|
||||
{{ .Render "li" }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ define "aside" }}
|
||||
{{ if .Params.description }}
|
||||
<p>{{ .Params.description }}</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
170
static/css/custom.css
Normal file
170
static/css/custom.css
Normal file
@@ -0,0 +1,170 @@
|
||||
/* ============================================
|
||||
Global readability improvements
|
||||
============================================ */
|
||||
|
||||
body {
|
||||
font-size: 17px;
|
||||
line-height: 1.5;
|
||||
letter-spacing: 0.015em;
|
||||
color: var(--base06);
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 0 2rem 0;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin: 3rem 0 1rem 0;
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
Links
|
||||
============================================ */
|
||||
|
||||
a:link,
|
||||
a:visited {
|
||||
transition: color 0.15s ease;
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
Blockquotes
|
||||
============================================ */
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 2rem 0;
|
||||
padding: 0.75rem 1.25rem;
|
||||
border-left: 3px solid var(--base0E);
|
||||
background-color: var(--base01);
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
blockquote::before {
|
||||
content: none;
|
||||
}
|
||||
|
||||
blockquote p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
Code blocks
|
||||
============================================ */
|
||||
|
||||
pre {
|
||||
border-radius: 6px;
|
||||
padding: 1.25rem 1.5rem;
|
||||
}
|
||||
|
||||
code {
|
||||
border-radius: 3px;
|
||||
padding: 0.15em 0.35em;
|
||||
}
|
||||
|
||||
pre code {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
Post list
|
||||
============================================ */
|
||||
|
||||
.post-list {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.post-list .post-item {
|
||||
padding: 1.5rem 0;
|
||||
border-bottom: 1px solid var(--base02);
|
||||
}
|
||||
|
||||
.post-list .post-item:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.post-list .post-item::marker {
|
||||
content: "";
|
||||
}
|
||||
|
||||
.post-item__link {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
gap: 1.5rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post-item__title {
|
||||
font-size: 1.15rem;
|
||||
font-weight: 600;
|
||||
color: var(--link);
|
||||
}
|
||||
|
||||
.post-item__link:hover .post-item__title {
|
||||
color: var(--hover);
|
||||
}
|
||||
|
||||
.post-item__date {
|
||||
font-size: 0.8rem;
|
||||
color: var(--muted);
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.post-item__summary {
|
||||
margin: 0.4rem 0 0 0;
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.4;
|
||||
color: var(--base04);
|
||||
}
|
||||
|
||||
.post-item__tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.4rem;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.post-item__tag {
|
||||
font-size: 0.7rem;
|
||||
padding: 0.15rem 0.55rem;
|
||||
background-color: var(--base02);
|
||||
color: var(--base0E);
|
||||
border-radius: 3px;
|
||||
text-decoration: none;
|
||||
transition: background-color 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
|
||||
.post-item__tag:link,
|
||||
.post-item__tag:visited {
|
||||
color: var(--base0E);
|
||||
}
|
||||
|
||||
.post-item__tag:hover {
|
||||
background-color: var(--base03);
|
||||
color: var(--hover);
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
Mobile
|
||||
============================================ */
|
||||
|
||||
@media (max-width: 30rem) {
|
||||
.post-item__link {
|
||||
flex-direction: column;
|
||||
gap: 0.2rem;
|
||||
}
|
||||
|
||||
.post-item__date {
|
||||
order: -1;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.post-item__tag {
|
||||
font-size: 0.75rem;
|
||||
padding: 0.25rem 0.65rem;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user