Posts, page 3 of 7

Tuesday, 27th August 2024

For work I have a mandatory secure development course that includes a web security lab. PortSwigger has a broad array of details topics on web security covering the ones you'd expect but also advanced, newer topics like Web LLM attacks.

One thing I did learn was that, even though I have multi-factor authentication set up for AWS, it's not truly multi-factor. I use a password and a passkey but they both are provided by password manager using my fingerprint. It's very convenient though. Maybe I should continue getting a second factor from my phone's authenticator app, which is slightly more time consuming, but more secure.


Monday, 26th August 2024

Here are a few way I explore CSV files, with DuckDB being a new entrant.

CSVKit

I find myself working with CSV files these days. I sometimes need to look around inside. For 10s of rows, a text editor will do - I just use VS Code. csvlook from csvkit is great too.

The following command will allow me to scroll through the first 500 lines of a file. The --no-inference flag informs csvlook to not infer data type and format values accordingly.

head -n 500 yourfile.csv | csvlook --no-inference | less -S

Sometimes I find myself needing to filter out rows. The following command will filter rows based on the presence of \\N in any of the columns between 1 and 12, and output the inverse (-i) results (good data) to a file.

csvgrep -c 1-12 -m "\\N" -i -a file_with_unwanted_data.csv > file-with_unwanted_rows_removed.csv

SQLite

Sometimes I want to explore the file a bit and csvkit tools becoming a bit unwieldy. SQLlite is perfect for the job. Remember, SQLite is included in macOS and Mac OS X by default, so sqlite-utils will just work once installed.

This command switches to CSV mode and imports the CSV file into a table called prices:

sqlite>.mode csv
sqlite>.import prices.csv prices

Julia Evans mentioned sqlite-utils in her blog post sqlite-utils: a nice way to import data into SQLite for analysis It's another tool from the prolific Simon Willison.

The following command installs sqlite-utils and uses it to create a new databases called prices.db (sqlite is a file-based database) with a table called prices with records inserted into the table from the CSV file:

brew install sqlite-utils

Once installed, you can import with this command:

sqlite-utils insert prices.db prices prices.csv --csv

With large files, Simon notes sqlite-utils can be slower compared to using SQLite directly. You can import JSON and other formats just as easily.

Once you have a SQLite database, use standard SQL to query.

DuckDB

I just listed to a podcast on Software Engineering Daily about DuckDB. The founder, Hannes Mühleisen, makes a claim that the DuckDB team have inadvertently built the worlds best CSV reader.

duckdb -c  "select * from read_csv('prices.csv')"

DuckDB doesn't need to ingest the data into its database engine. There are clients for various programming languages. And you can read from many different data formats beyond CSV. Paul Gross has started to use DuckDB as a replacement for jq.


Sunday, 25th August 2024

Wednesday to Friday

Working. I was asked to help with a pitch for some central government work which was a good prompt to get back in touch with a few ex-colleagues.

The start-up I'm working for now has a marketing website. A few of us went for after-work drinks. £7.85 for a Neck Oil! wtf.

Saturday

The boy and I went to Brighton on the train to meet up with my sisters and my nephews. Annoyingly I bought single fare train tickets. Returns are marginally more expensive whereas two single trips is double the price. Doesn't seem like single-leg fares have been realised yet. The train journey was time to play more Front Armies.

Sunday

Early morning walk, quickly followed by addressing the aphid infestation on one my plants in the front of house flowerbed with the help of Claude, packed away the last bits from last week's camping trip, weeded the back garden and lugged the tent from garage to car to dry it in K's garden.

📺 Watched the first episode of Celebrity Race Against the World.

🏃‍♂️‍➡️ I went for a 5k run. I've changed the running screen on my Coros watch to remove pace as I'm only focussed on zone 2 running at the mo, which means keeping my heart rate between 125 and 145 BPM.

I bought compost and mulch and two varieties of spinach seeds. This autumn I'm going to see if I can turn the raised beds into food producing beds. I need to do a second, more intricate weeding session this week, and I'll pop the seeds in after the forecast heat wave.

📺 Alone, series 11 is on the History Channel. We watched three episodes!

🎧 Geeky listens

Great discussion about DuckDB on Software Engineering Daily. Kind of like SQLite but optimised for analytical use-cases.

Learnt a lot about lambdas and containers from two AWS developers who work on the serverless team.

I love Andrea Goulet's work. I first came across her on the Legacy Code Rocks podcast. Her main focus these days is empathy in tech. This conversation features systems thinking, a great cog metaphor for influence and a great description of systems engineering.

Douglas Crockford was the guy who came up with JSON data format, amongst other things. He received a death threat from someone in the XML community in the early days of JSON! He's writing a book on mathematics for kids without all the historical mistakes that's still used when teaching maths today. Might get that for E.


Sunday, 18th August 2024

Holiday, again 😁

Monday = work and evening of packing and playing tetris loading the car and its roof-box.

🕹️ On the ferry over to France, the boy and I played Front Armies, connecting two phones via hotspot to play the LAN version. It's the first time I've played a computer game for ages. It certainly made the crossing go faster.

🐚 We had three beach days. Utah beach was good for sandcastles and a game of Mölkky. It's not so great for swimming. At low tide you can walk out a few hundred metres and you're still up to your knees only. On Plage d'AnneVille-sur-mer it was 1km walk to the sea from the dunes where we set up camp. A sign warned us not to swim because of strong currents. Later in the day, kite surfers appeared as the tide came in. Omaha beach was third time lucky with swimming.

🛶 We paddled three Canadian canoes downstream for an hour and picnicked. Beautiful, picturesque countryside, bales of hay, cows and horses watching us as we meandered. Coming back was physically hard. It was upstream and windy in the wrong direction. It took two hours of constant rowing. If I stopped, we went backwards. Occasionally we got spun round and headed in the wrong direction because of a strong gust. Massive sense of achievement at the end!

🐠 Our only rainy day was spent at La Cité de la Mer. The Ocean of the Future exhibition was excellent and the boy really enjoyed it, which isn't always a given. Aquariums and interactive displays in the dark. A quick caffeine break resulted in a coffee with whipped cream; order a cappuccino at your peril in France. We queued 1.5 hours to go aboard the Le Redoutable which was well worth the wait. Being up close gives you an appreciation of the engineering required to manoeuvre a submarine, sustain human life for months, run a mini nuclear power station to fuel and keep the sub quiet, let alone house atomic missiles.

After each day out we came back to the campsite, swam, drank local beer, made food, played games, kids went feral with other camp kids and slept soundly. Go there.


Sunday, 11th August 2024

Thursday to Wednesday

I was in Pembrokeshire up until Wednesday, staying with K's parents. It's E's second summer trip. We:

🚴‍♂️ cycled 9 miles round Llys-y-Frân Lake

🏃‍♂️‍➡️ ran Teifi Marshes Nature Reserve parkrun

🌊 got wet, bashed around and felt fear jumping from heights (or not actually having the nerve to jump in my case) taking part in coasteering led by Martin (book direct @ https://www.coastal-adventures.co.uk/)

🐚 dug a whole and buried E in sand at Cwm-yr-Eglwys, got involved in a few of the regatta activities (didn't win the egg and spoon) and swam in the sea 🌊

🍺 fed and watered ourselves at The Sloop and The Royal Oak which also had a bunch of people in the corner playing folk music

🏠 tuned into the Olympics, introduced E to Shithead the card game back at the ranch and I yak-shaved this blog every so often

📺 watched Rams, the aussie version

Thursday and Friday

Would usually go into the office on a Thursday but E was home. Friday went in for a leadership meeting focussing on company strategy and how we adapt it to make it relevant to my local business unit (called club in AND Digital vernacular) level. Also met with other practice leads to sync on competency frameworks.

Saturday and Sunday

🏋️‍♂️ Whilst exercising at the gym I listened to tunes instead of podcasts. Brain needed a rest.

🎧 I mostly use Qobuz to listen and discover music. They have a magazine of sorts. The article I clicked on was "Merge Records in 10 Albums". The article was peppered with bands. I tried listening to Mountain Goats but they were not for me. The next band, described as "offbeat '80s dreap-pop" was Destroyer. They've been going since 1995. The top tracks suggested to me have me hooked so will be coming back for more.

Slowly getting ready for holiday two in Normandy. Camping for the 3rd time this year! Back to the same French campsite as last year.

⚽️ Walked over to Selhurst Park to watch Crystal Palace vs Nantes, a pre-season friendly. We were joined by with neighbours and met a couple of friends along the way. Great day for the 5 kids! They played a footie afterwards, thankfully in the shade.

Surfing


Saturday, 10th August 2024

Complexity is the gotcha of event-driven architecture. David Boyne talks about the inevitable complexity of EDAs at part of GOTO's most recent EDA Day.

What was new to me was the The project paradox which is summed up by the question "Why do we take the biggest decisions at a time when we have the least knowledge?".

EDAs ease this because they are evolutionary by nature but can get complex quickly if not managed, which you do by documenting your events and architecture.


Thursday, 8th August 2024

programming for kids. Borislav has been teaching his 10 year old daughter how to code. He views programming as something to be literate in, not something to have a career in necessarily. I agree. I wonder how E will respond if I try to teach him a bit every day. Borislav has kept a record of each day's lesson. He has managed to teach on 403 days so far! Wow, what a gift to his daughter.


Tuesday, 14th May 2024

I noticed the senior engineers at work didn't have a space to come together. Senior engineers are distributed over many client projects and, from experience, they too need a support group. I, as a tech principal, need their help elevating the the technical capabilities across the organisation.

Here's the process I took:

  • validate what my senses were telling me
    • On an individual basis, I told each senior engineer what I was thinking and asked whether they felt a need for a space for senior engineers to connect.
    • Each engineer responded positively with their own personal take
  • invited senior engineers to discuss further
    • shared the positive responses anonymously in an email invitation
  • prepared a one pager to guide our discussion, including steps for:
    • context setting
    • purpose - potential topics, initiatives, opportunities,
    • membership - who was in this group and who was not
    • structure - how often, the formats (round table, lean coffee, knowledge sharing, etc)
    • needs - what might the needs be of the group
    • roles & responsibilities - rotation of various roles, e.g. facilitator, note-taker, knowledge curators, etc...
  • have the discussion for 45 minutes

The pace of the session went well, we covered all the steps, I made sure all voices were heard, and it felt like everyone was on the same page.

We agreed to meet fortnightly, have a mixture of formats, limit membership to level 5 engineers and above to keep group small and manageable. There were a lot of ideas covered when we spoke about purpose of the group and needs of the members, including:

  • cohesive set of standards for common tech we use
  • port of call for feedback on strategic objectives
  • working out what messages to amplify to wider engineering discipline
  • peer support
  • fostering sense of belonging and collaboration outside of client work
  • coordination of talent development, training needs and cultural change

All in all, a very worthwhile session that I should have made happen sooner.


Monday, 13th May 2024

At work, I've enrolled for a programme called Inclusion Mentoring. After an hour of an explainer, I was paired with a colleague who was different enough from me so we could both learn new perspectives. Different backgrounds, different teams and different identities.

Session one was about finding out about each others background and agreeing a charter that makes sense to both of us. We agreed that there's no hierarchy, we will swap from mentee to mentor numerous times in a conversation and we everything that's said will remain confidential. I spoke about coming from a broken home, my teenage years, summarised my 20s and 30s, and where I'm at right now in my mid 40s. I also highlighted my privileges: race: white; gender: cis male; physical ability: able-bodied; class: wealthy (relatively but grew up working class); nationality: western; orientation: hetero. Plus two other bits of my identity: religion: nothing organised, maybe spiritual; mental ability: neurodiverse (self diagnosis).

We got into some excellent topics and I learnt a bunch of new perspectives. I shan't go into them here otherwise I'll betray confidence if someone reads from work.

If you get the chance to do this, go for it. You'll learn a lot from a deep, focused conversation.


Monday, 6th May 2024

Over the past few weeks I've been using a 5k speed improvement program suggested by my Corus watch. It's:

  • Warm up: 3.2km at threshold pace of 69% to 81%, which is my aerobic endurance pace
  • 8 sets of
    • 200m at threshold pace of > 114%, which gets me into anaerobic power
    • 3 minutes recovery pace, basically walking
  • 1.6km threshold pace of between 92% and 102%
  • Cool down: 2.4km threshold pace of 69% to 81%

I've been doing this a few weeks now. Yesterday, I switched to place in my local park which had a flat strip that was near enough 200m, so I could visually see the finishing line approaching, making me keep the pace as fast as I could. On the 4th time, a muscle fibre in my left hamstrung went twang. I tried gently running after a few minutes but it felt uncomfortable. Very annoying.

After reading a few blogs, I think I have a grade 1 strain where there is "There is little structural disruption, and the muscle heals quickly".

There are a bunch of exercises I should do on https://www.sportsinjuryclinic.net/sport-injuries/thigh-pain/back-thigh/pulled-hamstring-exercises. When I can run again, I should not sprint as fast as I can. I should gradually increase the speed over many weeks, whilst at the same time strengthening my hamstrings so they can handle the extra load sprints put on to the muscle.