The Best Container

, tagged: phpactor php
There are few things that I really like about Phpactor, but its DI Container [link] is one of them. In seven years it has hardly changed at all. It’s modular, supports tags, parameters (with schemas) and the has only 233 lines of code including comments and whitespace[1] There is no YAML, XML or compilation. No auto wiring, no property injection, factory modifiers, weird ways to extend services. All services are singletons. Read more...

Phpactor 2022.10.11

, tagged: phpactor
Today I have tagged version 2022.10.11. This is the first (and hopefully not the last) monthly release, the full changelog is on the release page. I’ll run through some of the highlights in this post. Generate Decorator ¶ Thanks to the perserverance mamazu there is now a code action to generate a decorator: Generate Decorator This is an LSP only action, and must be invoked in a file with an empty class which implements one or more interfaces. Read more...

Encountering Go as a PHP developer

, tagged: php go
One morning I sat down at my laptop and looked at a Go service, written 2 months previously, that represented my first attempt with the language. When I wrote it I had been unsure about everything, questioning each line and frequently googling things like “how to do a foreach in Go”. In just two months I was now able to look at this code and immediately see several ways in which it could be improved. Read more...

Phpactor 2022.09.11

, tagged: phpactor
Phpactor 2022.09.11 Today I have tagged Phpactor 2022.09.11. The previous release was Phpactor 18 all the way back in January. It has been a significant 8 months for Phpactor: Conversion to a mono-repository. Completely refactored type system. Phpactor theme song. Numerous features and improvements (see highlights) Converting Phpactor to a monorepo has accelerated development significantly, it has been far easier to fix bugs and add features. It is imaginable to say that more progress has been made in these 8 months than in the past 3 years and it’s still awful. Read more...

Reflection

, tagged: ireland2022
I have now been in Weymouth for a few days and have had time to recover and reflect a little bit on my journey. My bum still hurts. As usual the experience was challenging and enlightening. I’ve greatly expanded my knowledge of Ireland, and notably how welcoming and friendly the Irish people are. Strangers in towns will smile, say hello and start a conversation with you. The longer you stay in Ireland the more sociable you become, as the default is to at least greet people. Read more...

Oporto 2013 Blog Restoration

, tagged: oporto2013
Today I plugged in my old X40 laptop, I purchased this laptop in Portugal after my bicycle was stolen while I was at the start of my loosely defined and ultimately failed “tour around the world”. I had prepared for the tour, I was leaving in February, and I was just going to carry on cycling, I thought about crossing Iran and going to India. It was cut short however when my bicycle was stolen in Oporto, Portugal. Read more...

Migrating this site to Hugo

, tagged: hugo blog
Today I migrated this blog from Sculpin to Hugo. I created the site originally in 2018 using the wonderful, PHP based, Sculpin static site generator. It has proved to be a good decision, previously my personal homepages used a database and anything I wrote on them is lost to history (a mournful loss to posterity), now all of my blog posts are on github, and I can author them locally in my favourite editor. Read more...

Day 28 - Weymouth (the end)

, distance: 106km, time: 7h9m , tagged: ireland2022
Most of my entire route in purple There was an alcoholic at the hostel last night. I was sitting in the reception area, reading a book and the paramedics arrived, 10 minutes later they came down the stairs and reported that the lady was “fine and just had a bit too much to drink” 10 minutes after that the lady came down the stairs and started verbally abusing the man behind the counter when he wouldn’t hold her drink for her while she made an epic quest up the stairs to fetch something, I’m not sure she knew what. Read more...

Day 27 - Bath

, distance: 100km, time: 6h40 , tagged: ireland2022
Map This is the day before last, the penultimate day, the day where I cycle to the town where went to University and got my first job, Bath. It was good to sleep in a bed. When I got in last night, before 10pm, the house was quiet and the lights were off, I crept upstairs to use the bathroom as I assumed at least 3 people were sleeping. I woke early, as could be expected when going to bed at 10am, and lazily used the internet checking in on my open-source project and briefly interacting with somebody who was developing an extension for it. Read more...

Day 26 - Pontypool

, distance: 70km, time: 4h50m , tagged: ireland2022
Map Today had different expectations and it would define when my tour would finish. Today or the day after I would visit my auntie and uncle in Pontypool, after Pontypool it is two rides (or one very long ride) back to Weymouth. I had to find accommodation and organise the meeting. Thankfully everything happened quite easily. After waking up I looked on Air B&B and found a place in Cymbran (5k from Pontypool) for a good price and I phoned my uncle and he suggested collecting me when I got there. Read more...

Day 25 - Swansea

, distance: 113km, time: 7h50m , tagged: ireland2022
Map This campsite cost £25, which is €28 euro. Phil warned me yesterday that campsites charge this much, but I didn’t expect it seeing as my most expensive campsite in the past 30 days was €17 with the best one of them all costing only €8.50. What do I get for £25? Well I don’t get anywhere where I can plug my laptop in for free. I’m sitting in a small room with a washing machine and sinks and a single power point, which is on a meter which requires 20p every 5 minutes. Read more...

Day 24 - Pembrokeshire

, distance: 93km, time: 7h15m , tagged: ireland2022
Map I didn’t sleep well, I dozed until about 9am then forced myself out of the sleeping bag and made my way to the facilities to have a morning shower, when I returned I made my coffee and cereal and read the news on my phone, packed up my stuff and wheeled the bike off the pitch. The owner was standing close by “where you going today?” “that’s the question!” I said. Read more...

Day 23 - Leaving Ireland

, distance: 83km, time: 5h18m , tagged: ireland2022
Current Position I’m sitting in the ferry terminal at Roselare, my eyes are heavy from the early start. I got here with 3 hours to spare. There is free WiFi and power sockets and I added more content to last nights short blog post and had a quick wash in the toilets. My laundry situation isn’t very good, most of my stuff is damp and nothing is clean. I’m due a rest day and I’m hoping to find a good place in Wales to stay a couple of nights. Read more...

Day 22 - Waterford Greenway

, distance: 121km, time: 6h55m , tagged: ireland2022
Map I’m now 70k or so from the Ferry terminal in Roslare, if I can wake up at 8am I should be able to make it to the ferry terminal easily for the 17:30 boarding cut-off. Until I got to the campsite last night I thought it would be at least another 3 or 4 days, but I am now in “get out of Ireland” mode. Midleton - lots of Ironman stuff here Read more...

Day 21 - Carrigtwohill

, distance: 107km, time: 7h , tagged: ireland2022
Map Today is another “sit cross legged in the tent and write a blog post” day, the last time I was sitting by the beach, today I am in a very generic campsite off the side of a dual carriageway. I’m cooking pasta, pasta which I realised I didn’t have 30 minutes ago. I had cheese, pasta sauce, but to my shock, no pasta. So I just got back from an additional cycle ride to the nearest shop 1 kilometer away. Read more...

Day 21 - Ultima Peninsular

, distance: 113km, time: 7h50m , tagged: ireland2022
Map I slept well last night and in the morning performed my usual routine of packing up my stuff and emerging from the tent. I went up to the campers kitchen for coffee and to see what I could eat for breakfast. The two French girls were already there and were discussing there plans for the day. I put the kettle on and started unloading my food bag for inspection: Penguin bars, beer snacks, yoghurt covered raisins, 3/4 of a demi-baguette. Read more...

Day 20 - Sheeps Head

, distance: 120km, time: 7h51m , tagged: ireland2022
I’m finally sending this at lunchtime having failed to send this blog post yesterday evening. I’m sitting in a tourist information office which has WiFi. I seem to be in a region with very poor mobile phone coverage. Current position (blue dot) “How long you here for?” “In Ireland?” “No” “Just one night” “No, how long you been waitin'?” “About 10 minutes” “You rang the door bell on the Tardis and all that? Read more...

Day 19 - Allihies

, distance: 109km, time: 7h23m , tagged: ireland2022
Current position (blue dot) No wild camping today. I’m sitting in a campsite, the sea is about 50m away, the sun is shining, I can hear the swoosh of the waves and I’m cooking pasta, sheletered from the wind behind my tent which is wronly positioned so the door opens into the wind. It’s very quiet, just the occasional scream from the few people dipping into the waves. Camping Today was a good day, good scenery, good climbing, good flat sections, and importantly I purchased some new headphones so I can finally listen to music while I’m riding, which I have enjoyed. Read more...

Day 18 - Mordor

, distance: 82.22km, time: 5h30m , tagged: ireland2022
Map I had just done a couple of climbs and was 80k into my ride and I noticed a place called the “Climbers Inn” which, I knew, was a hostel. I also knew that it was a full hostel, I didn’t realise that it had camping however. The sign clearly said “camping”. The next campsite was about 80k, I didn’t want to do 80k but I also knew I could wild camp. Read more...

Day 17 - Rest day

, tagged: ireland2022
Today was my second rest day. I wasn’t planning on taking a rest day, but the campsite is very comfortable and it has actually been a week since my last rest day, so it’s good timing. I slept a bit better last night, and didn’t feel ill. I drank a couple of beers which may or may not have helped. In the morning I made breakfast, stealing a little bit of some unlabled milk from the fridge for my cereal and coffee. Read more...

Day 16 - Ring of Kerry

, distance: 81.7km, time: 5h18m , tagged: ireland2022
Map Last night was another tough night. There were campers who at first were annoying and then as the hours wore past 12, 1 and finally 2 became unbearable and almost caused me to lose my mind. On top of this I had the same headache and pain as the previous night, which I now suspect is something to do with the angle at which my neck is resting (I have no pillow). Read more...

Day 15 - Inch Strand

, distance: 75km, time: 5h30m , tagged: ireland2022
Current position in Ireland (blue dot) As I finished writing my blog post last night I was absolutely exhausted. I retired to my tent, there was an ambient sound of children playing and they occasional tschhhh! of a drinks can being opened, but I was soon asleep. I awoke however at around 2am feeling quite unwell, I had a headache and felt a little nauseous. I think it was probably a combination of dehydration and something I ate. Read more...

Day 14 - Tralee

, distance: 121.7km, time: 7h56m , tagged: ireland2022
Inaccurate Map It seems inevitable that I cannot hold on to nice things. I got a great wicking hoody for this trip, it was warm and everytime I put it on I thought “this is a good item of clothing”. It’s gone. In contrast, I have several pieces of clothing that I’d like to lose but which stubbornly remain with me for decades. I really have no idea what happened to it, I would have had it on this morning, maybe I left it on the back of the bike, perhaps it fell off a cliff. Read more...

Day 13 - Doolin

, distance: 93.34km, time: 6h07m , tagged: ireland2022
Inaccurate Map It turns out the moody weed smoking youth I shared my bunk with was not unsociable at all, but rather anxious and potentially stoned. When I returned in the evening after dinner he told me “I had pizza before going to the concert, normally I drink too much, but this time I ate too much and left early”. He had come down from Donegal for the concert. I peeped out of the dormitory window, it was raining. Read more...

Day 12 - Galway

, distance: 83km, time: 4h28m , tagged: ireland2022
Rough Route For breakfast there were flapjacks, toast and coffee. All complementary at the Ben Lettery Hostel. I was joined for breakfast by the Munich girl, she was going to stay another night and climb the mountain, presumably the Benlettery mountain which the hostel is named after, after that she would be doing my last ride in reverse and staying at the Valley House on Achill island (although driving). Reflections Read more...

Day 11 - Ben Lettery Mountain Hostel

, distance: 141.96km, time: 7h46m , tagged: ireland2022
Rough Route I’m now sitting in the lounge of the Ben Lettery Hostel. This is a big hostel, there are groups and individuals, French, Spanish, German. Mostly French. There are lots of French about in general. For dinner I cooked baked-beans-on toast à la cacouette (baked beans on toast with peanut butter). Peanut butter has previously been trialled in other expeditions and was found to be highly suitable to put into anything. Read more...

Day 10 - Rest Day

, distance: 10km, time: 1h , tagged: ireland2022
TL;DR Nothing happened today. In a dormitory everybody has a common purpose, to sleep. Sleeping in groups can actually be soothing. I’ve slept in dormitories hundreds of times and with few exceptions have slept very well. Last night was one of the exceptions. We had just turned off the lights and a few of us were in bed and “can somebody let me in” was heard. I roused myself slightly, happy to open the door if somebody forgot the code, but there were no more importations, no tapping at the door. Read more...

Day 9 - Achill

, distance: 120.3km, time: 6h56m , tagged: ireland2022
Rough Route I’m now sitting in a pub with a Guinness, the pub is part of a larger facility that also has a hostel and I’ve booked in for 2 nights. I’m waiting for a pizza which I may have ordered a prematurely as I’m not feeling particularly hungry right now, but it can’t do any harm. Today was a good day, it was cloudy. There is a group of young Irish adults imitating wolf cries on the next table. Read more...

Day 8 - Peat and Sea Stacks

, distance: 88km, time: 6h , tagged: ireland2022
Current position (the blue dot) Even though the bed was exceedingly comfortable and clean, and there was no sound at all, I didn’t sleep great last night. I could hear the blood rushing in my left ear and my body was restless from the exercise. Before I went to bed I got a message from Sharron saying that breakfast would be in the kitchen I should help myself when I got up. Read more...

Day 7 - Frog Installation

, distance: 114km, time: 7h7m , tagged: ireland2022
Map “Hi, it’s Dan, I booked the single bed room, I think I’m outside but I’m not sure because there is no internet, I can see a greenhouse” “Hi Dan, yes that’s us. I left the door open, your room is at the end of the corridor”. It’s quite strange to walk into somebody elses house and have a shower without having met the person whose house it is. Today was the first time I tried Air B&B. Read more...

Day 6 - Chana Palak

, distance: 130km, time: 8h (approx) , tagged: ireland2022
Highly accurate map The man wheeled up to me on a bicycle “the accomodation is round the back, follow me”. We went round “the back” and there were 3 people, 2 swiss people smoking and a local you wouldn’t want to get in a fight with. “Your room is here, but I haven’t got a key, because I’ve given the keys to the others - but it’s OK, you can just put your hand through the window” and he looked at me and the swiss people as if it was self evident and normal. Read more...

Day 5 - Sleep Hollow

, distance: 75km, time: 5h30m (approx) , tagged: ireland2022
Map I’m currently sitting in the corner of a shelter on what is probably one of the best campsites I’ve stayed on. There is a fire burning and josticks are burning, everybody is very sociable and it feels more like a good hostel than a campsite. It has a filter of over 18s only, so no kids running about. Although there are a bunch of school kids doing their Duke of Edinburugh but they are very civilised. Read more...

Day 4 - Wild Atlantic

, distance: 137km, time: 8h50m , tagged: ireland2022
Map hostels and campsites (route in purple) I’ve got a small tent. A small and expensive tent. I used to have a lovely 2 man Colemans tent. It had a porch big enough that I could stack all my baggage up in it and the entire side of the tent would open up, it would fit comfortably on my rear rack. I got the small expensive tent because weight. It was only after buying this tent that I don’t care about weight, I care about space. Read more...

Day 3 - Houses of the Holy

, distance: 110km, time: 7h15m , tagged: ireland2022
I got out of bed this morning at 8am and quietly climbed down from my bunk and gathered my bags. I was sharing a room with the Australian cyclist and a man from Southport. The Australian was already up and reading and I nodded goodbye to him as I left the room. I put my stuff in the baggage room and announced to the Canadian at reception that I would be back in two hours. Read more...

Day 2 - To the Giants Causeway

, distance: 100km, time: 6h (approx) , tagged: ireland2022
Map with “Liquor store” locations Currently sitting in a hostel in dinning room in Bushmills eating chips-cheese-and-beans[1]. I just had a conversation with an Australian who is riding around the coast on a Brompton bike. I’m drinking a ginger beer and it’s been an interesting 24 hours. Last night the campsite was very noisy, there were 6 year old kids running about everywhere and a group of 14 year olds having a small party in the next field (not part of the campsite) blaring house music through a portable speaker. Read more...

Day 1 - Leaving Scotland

, distance: 35.5km, time: 2h23m (net) , tagged: ireland2022
I am now sitting in a ferry teriminal in Craegvany waiting for the Stena Lines ferry to Belfast. Unusually I was instructed to wait inside the terminal until somebody will show me to the ferry rather than waiting with the cars outside. From Belfast I’ve decided to head north and follow the northern coast in order to join the EV 1 (Euro Velo 1). I had intended to follow the EV1 inland from Belfast, but I couldn’t see any reasonable accomodation en-route. Read more...

Ireland Prelude

, tagged: ireland2022
It’s been 2 years since I blogged about about a cycle tour, but only one year since my tour: I cycled with a good friend from Paris to Ouistream, taking in the Normandy coast. It was a a slower paced and more relaxing tour, which ended with me sailing to the UK. This year I will be going on another solo tour. The original plan was to visit all of the Inviqa offices in the UK. Read more...

Lineage OS on Mi Pico

, tagged: phone lineageos
I just installed Lineage OS on a new phone Breaking the Pixel 4a ¶ I was out running a few weeks back, with my phone in my hand, listening to music, when I tripped over a paving stone and fell flat on my face. The phone landed squarely on it’s front and with the amount of force that I knew instantly that it was done for. Lying on my back I turned upwards and shouted theatrically in pain, then just to be sure, I picked up my phone to check, and of course it was done for: Read more...

Skin O' My Teeth (Megadeth Cover)

, tagged: song2022
Skin O' My Teeth I guess this one is for last month and it’s another cover. I’ve been listening to alot of Megadeth recently, and got a tablature book: Countdown To Extinction Tab Book Drums ¶ In previous songs probably the thing that took the longest was programming the drums. In this cover I saved time by finding a MIDI file (warning contians ads). I imported the MIDI file, muted the other instruments and the drums mapped almost perfectly to DrumGizmo. Read more...

Holy Diver Cover

, tagged: song2022
This song is a cover of “Holy Diver” by Dio: ⚠ WARNING: My singing on this song may cause irreversible nerve damage. Holy Diver Holy diver You’ve been down too long in the midnight sea Oh what’s becoming of me This is this months effort at recording a song. I tried to record a song about the Agile Manifesto on Saturday, but it didn’t succeed, so I decided to record a cover of a song I’ve been listening to on repeat for the past 3 weeks. Read more...

Phpactor's (New) Type System

, tagged: phpactor
Phpactor (it’s a Language Server) has a new type system, the most interesting features of which might be: First Class Types Generics Type Combination Type Literals In the examples below the function wrAssertType is used. This is an assertion used in Phpactor’s tests. History ¶ When I started Phpactor 7 years ago I had absolutely no clue about type systems (that’s only slightly less true today). As a consequence types were represented as a single class: Read more...

Phpactor Theme Song

, tagged: song2022
This is a song about phpactor: Phpactor Theme Song Phpactor - It’s a Language Server Don’t use it on a project that it is to big It will crash I have spent the majority of my spare (project) time this month working on Phpactor, this weekend was my last opportunity to record a song, and I had not written any lyrics, so on Sunday I decided to just record some music and I had the Phpactor documentation page open in my browser. Read more...

Phpactor is a monolith

, tagged: phpactor
Phpactor is a monolith with some exceptions. Over 20 packages have been imported into the main repo and their github repositories abandoned. This should make development far easier going forward. Background ¶ You may have heard me tell this story before. Hopefully this will be the last time I tell it. When I started Phpactor in 2015 I had just read “principles of package design”, and wanting to be a good developer, I decided to architect Phpactor as a set of decoupled packages, in general there would be four classes of package: Read more...

Ballad of Senior Dev

, tagged: song2022
February song, it’s called “Ballad of Senior Dev” Ballad of Senior Dev It’s about being a good senior developer. This was recorded over the past couple of days during the criminal invasion of Ukraine. Today I attended a anti-war demonstration in Berlin where 100,000 people gathered in support of Ukraine. The Russian Embassy Russia invaded Ukraine two days later I invested a short amount of time over two evenings writing the lyrics, the following weekend I then recorded an initial version of the song (version 1), a very poor Nick-Cave style ballad, it was out of time and not very great. Read more...

Fansong

, tagged: song2022
This song is a cover of “Fansong” by Dethklok: Fansong You people out there give us something more than just record sales You give us something to hate And we hate you, you brainless mutants I recorded it between 14:00 and midnight on Saturday, the idea was to try and learn stuff. As such it may not actually count towards my 2022 goal of recording a song every month (ideally on the topic of software engineering). Read more...

The Testing Song

, tagged: song2022
15 years ago I was having a conversation with a friend: “I don’t know what to write songs about” “Write about something you know” “I only know computer programming” “Then write songs about that” So that’s what I’m doing this year. This is a song about software testing: The Testing Song What people said about it: “I had no idea what’s going on, it’s shit” - My brother “Nine Inch Nails meets Layla” - Jason “I thought it captured the emotional trajectory of the development cycle beautifully” - Quentin Resolutions ¶ This year I made some new years resolutions, one of which was to record a song once a month. Read more...

Phpactor 18

, tagged: phpactor
TL;DR;: Check the 0.18.0 release notes Phpactor 17 was released 11 months ago. After some busy months working on Phpactor I switched focus to phpbench for better or for worse and because of that there has been very little development on Phpactor for the past 6 months. During which time PHP 8.1 has been released. Phpactor 18 does not support PHP 8.1 features (e.g. Enum) currently, but thanks to tolerant-php-parser it supports the syntax and won’t crash if you use a readonly modifier. Read more...

Hrtime and Loops

, tagged: php phpbench
PHPBench currently samples the time taken (in microseconds) to run code around a loop. This post aims to provide some insight into: If there is a benefit to using a loop (@Revs) when taking a time sample. The value of using hrtime instead of microtime. Background ¶ PHPBench samples the time taken for your code to run. The default executor does this by iterating over your code a number of times (@Revs) and dividing the total time in microseconds (i. Read more...

New Laptop

, tagged: sway linux
Today my new laptop arrived. My previous X1 Carbon lasted for around 4 years - I say lasted: it still works, but the keyboard was completely destroyed: It could have been repaired. I feel guilty. On the plus side this laptop actually has a UK layout keyboard (for the past 4 years I got very good at typing without looking at my keys due to the German layout). This is probably my 10th Thinkpad Laptop. Read more...

PHPBench 1.2.0

, tagged: phpbench php
PHPBench 1.2.0 has been released, the highlights are: In reports you can now dynamically create and group columns in tables Memory can be displayed in binary memory units Support for filtering by variant name Support for filtering reports Report Improvements ¶ PHPBench 1.1.0 improved report generation, allowing you to use components such as tables and bar charts. This release improves table generation, adding support for grouping and expanding columns dynamically: Read more...
1 of 4 Next Page