Skip to main content

My 2024 in Review

· 8 min read

lago di garda view from riva View over Lago di Garda from Riva.

(...) it's the place I will remember for the rest of my life.

I've been meaning to write a yearly review, and I aim to stick to the plan. It's already June 2025 and 2024 came to a close quite a while ago. What can I say? I've been a bit busy, and maybe a bit uninspired. However, 2025 has been for me one of the best years in my life, and I've wanted to share a bit about it. There were some good parts, some not so good, and some that were actually amazing. I've met the love of my life, and for the first time ever, things have beginning to feel as they should have. I feel I'm in the right place and I'm excited for whatever comes next. I'm happy.

Goals for 2024

In my 2023 year in review, I also set some goals for myself, and there were some successes.

Let's see.

  • Finish the A11y course and do 2 more courses on Frontend Masters. Same as last year, but I'll actually do it.

    Did it, it's done. It was a good course, but not as useful as others to be honest. I would recommend it for accessibility beginners, not so much for experienced.

  • Read at least 10 books. Again, same as last year.

    Fell short, unfortunately. How short? Keep on reading.

  • Go on a trip to Asia. Anything really, Japan, China, Thailand. All three. I don't care, but I want to go there.

    Nope. But I feel 2025 has something in the works.

  • Bump Downshift to v9. We do have in plan some API changes, apart from the fixes we want to implement.

    Yep, we're at v9, and we improved the API and Typescript.

  • Cook 3 new recipes.

    I didn't. But I "helped".

  • Hike at least 6 times. Once every couple of months. Should not be too difficult.

    Exceeded it, by one, and most of the trails were in Tenerife!

  • Make a big move. It has been quite some time since I did not do anything radical, ever since I came back from Prague in 2020. I feel that it's time I changed something dramatically about myself.

    Unfortunately nothing to share here.

  • Start doing yoga.

    I'm still struggling to do things at home, whether it's yoga, reading, dancing.

It's a mix of things, no doubt. I believe my morning routine suffered a bit, and, as a consequence so did some of my goals.

Coding Stuff

I became more confident in my role as a Senior Engineer in Microsoft, and led a few critical initiatives, which are now in production by the way. It feels great to see your work used and useful, and I would like this to continue in the future. I am lucky to be able to choose what I would like to work on, and even though these are becoming quite uncertain times for software engineers, I'm confident that my dedication to deliver a great experience for users, build things the right way and learn continously will help me be successful in the future as well.

My Downshift continued, and now I plan to refactor it to Typescript, while also improving its API offerings. The refactor is not a trivial one, given all the generic functions we use, but it's a great challence and I enjoy working on it so far. As part of the developer experience I was able to write an article about how we inform our cosumers about calling the API correctly.

And Downshift was not my only OSS contribution. I'm happy to say I successfully pushed a change in jest-dom and also wrote an article based on this contribution.

Hobbies

I continued taking salsa classes and feel that I improved quite a lot. I'm not going out as much as I used to, but still joined a couple of dance festivals, in Sunny Beach and Brasov. However, I miss bachata to be honest, but there is literally so much we can do. I am going to the gym 3 times per week, with an extra day which is either basketball or body bump. Working out became a priority since I fell it's becoming more difficult to stay in shape. Maybe it's because I'm not running as much as I used to, and I believe that cardio helped me significantly to lose fat and just feel better.

Land of Legends AntalyaPalermo Architecture
land of legends in antalyaarchitecture of palermo

I'm happy that my girlfriend supports my hiking hobby directly, and we went on a few trails both in Romania and in Tenerife. When I went to Tenerife by myself I also included some trails in the itinerary, and they were so spectacular. I will always remember the Mount Guajara trail where I kind of had a heat-stroke, or the trails around Punta del Hidalgo in the Anaga natural park. It always feels great to climb stuff, it helps clear the mind and the sights are always incredible.

Books

Same as before, 10 books at least, but this year, wow, it has been quite bad. I'm not proud of it, and 2025 feels the same unfortunately. In any case, the books I managed to read were not bad at all.

  1. The Great Expectations, Charles Dickens. It was a great tale, a bildungsroman, of Pip, and how he perceived family, friends, love, and society in 19th century England. I might re-read David Copperfield after this, since I remember nothing since I've read it in childhood.
  2. The Intelligent Investor, Benjamin Graham. Filled with a lot of terminology and graphics and studies, it actually proved to be quite useful to my amateur investor mindset. Or should I say passive?
  3. Animal Farm, George Orwell. Probably my favorite out of the whole list, it opens up a lot of doors of thinking about politics, work and the world in general.
  4. The Da Vinci Code, Dan Brown. I had little expectations from it, given that I'm not really a fan of the genre, but it impressed me by the pace of the story, as well as the plot itself. Really good!

That's it, that's the list. I need to do better next year, damn.

Travelling

I thought 2023 was crazy. 2024 was incredible. Take a deep breath, here they are:

  • Madrid, January. A great start. A great city, simply beautiful, everything about it was great. I fell in love with it, would definitely return for a Real match.
  • Athens, February. A great continuation. A trip about coffee, food, long walks, and the Greek architecture.
  • Bellagio, March. Biking around Lake Como is always a good idea!
  • Tenerife, April. This is paradise. So much to see, so much to do, 2 weeks is simply just not enough. It needs at least one more trip. Oh wait ...
  • Palermo, May. It was a great follow up to the Catania trip, and it's the place I will remember for the rest of my life. Will come back for an opera show.
  • Prague, June. Working trip, but always great to be back over there.
  • Lago di Garda, July. Biking around the Garda lake is always a good idea. It was refreshing to see the lake again, this time on 2 wheels, after a previous cruise we did a few years ago (also a biking trip). Definitely a place to visit again and again.
  • Vienna, August. Despite the hot temperatures, the city is a gem, and we enjoyed both the Schonbrunn and mami im vierten brun place.
  • Stockholm, September. Interesting city, a great follow up to Oslo from the year before. The cruise around the city canals was really cool, and the pizza was not bad either.
  • Antalya, September. Shifting gears, enjoying the beach vibes one last time for 2024. Or not. Anyway, it's great to grab a pumpkin cream cold brew and then go to the beach bar. Antalya probably impressed me the most, apart from Tenerife. Definitely a place I will return soon, and not for the all inclusive.
  • Budapest, October. It's one of the best cities to eat in, period. And the sights, wow. The Parliament, Buda Castle, Fisherman's Bastion, and of course, Gellert, the legendary place from Hitman.
  • Seville-Tenerife-Valencia, December/January. Because Wizz Air direct flights are expensive. Anyway, one of the best trips in my life. So far.

12 trips in total. I will take that, thank you very much.

Us hiking in Tenerife
us hiking in tenerife

Goals for 2025

Let's see.

  • Get promoted at work.
  • 1 course from Frontend Masters done.
  • Refactor Downshift to Typescript and release useTagList.
  • Read 6 books at the very least.
  • Go to Thailand.
  • Travel at least 6 times.
  • Keep doing sports at least 4 times per week.
  • Start waking up at 6 AM again.
  • Start running again, at least once a week.
  • Decrease my phone screen time to 1 hour and 45 minutes per day.

Until next review folks! I hope you also had an amazing 2024, and 2025 will be better!

Tenerife 2024

· 12 min read

anaga view of the ocean Rural Park of Anaga view near the ocean.


There's also a Starbies on the promenade, perfect to sip on a Cold Brew while watching surfers just getting destroyed by the waves. Oh, bliss.

Surf's up! It was time for a much more longer trip, and the place we chose was Paradise. Tenerife does have a reputation. It's a go-to place for many Europeans, as it's not very far from home, it's warm, it's beautiful, and there's so much to do, from lying on the beach to hiking next to a volcano. Our hopes were higher than the volcano, honestly, and we were not prepared to be disappointed.

Las Americas & Los Cristianos

We initially decided to book an airbnb in the Las Americas surfing and slow lifing part of Adeje, but unfortunately, the place turned out to be quite bad, and we moved out the next day. Not a very good start, but we eventually were over it, as we moved to a better apartment in the town next to Adeje, Los Cristianos. As a rule of thumb, make sure the accomodation has great and many reviews, otherwise there may be surprises, and, frankly, you don't want to stay in a dump while in Paradise.

Buenavista del NortePine Forest on the road to Teide
buenavista del nortepine forest on the road to teide

Los Cristianos is a nice place to stay while in Tenerife. The weather is great, it has a few beaches, albeit quite standard city beaches. The more exotic ones are further away, we'll get to those in a minute. We found a nice Romanian owned coffee shop in town, Norio, which was great, even though there was no speciality coffee option. Too bad. However, for food options, well, oh my Lord. Just a few: Palmera for brunch, El Cine for fish and Sal Fina for Italian. What I liked a lot was the promenade along the beach, that stretches from Los Cristianos all the way to Las Americas. It's a great place to have a run during the morning, or a relaxing walk at dusk. There's also a Starbies on the promenade, perfect to sip a on Cold Brew while watching surfers just getting destroyed by the waves. Oh, bliss. Oh, probably important. Rent a car.

Now, I get it. The place is 100% for tourists, no doubt. Half of the UK was there, especially in the Las Americas part. But for good reason. When you just sit on the beach, or on the balcony, and just look into the distance at the landscape filled with picturesque mountains and cliffs, you realise that the place is really special, and you're suddenly happy you're there. I was for sure, and was terribly excited to discover some nature, which brings me to ...

Mount Guajara

Was it a great idea to choose the Mount Guajara trail for a hiking session? Definitely. Was it so poorly planned that everything turned out to be on the edge? Also yes. At the end of the trip, I was exhausted, sunburned, out of water, the sun was setting and it became quite windy and cold. All worth it, and lessons were learned.

The Teide National Park is probably the number one spot in Tenerife, with a scenery so incredible you'd probably mistake it for Mars. It's really special. Right across the famous Teide volcano, there's another peak, not as high as the former, but definitely imposing: Mount Guajara. And, surprise, surprise, it has a hiking trail that starts from the Cañada Blanca, just off the main road. The trail itself is not easy. There's a lot of walking at the start, then the climbing begins steadily. The difficulty itself is not the climbing itself, but the steady pace you need to have in order to reach the peak in time, as well as come down the other part of the trail, that's more abrupt. It may be a better idea to do it the other way around, climb like hell and then steadily come down to the summit.

Mount Guajara Trail landscapeTeide Volcano
mount guajara trail landscapeteide volcano

And there's the sun. Look, the landscape does look like you're on Mars, and there are no trees on Mars. No shade. Zero. Consequently, it would have been a great idea to pack enough sunspray, more water, and a cap. Apart from these minor inconveniences, the trail offers incredible views and it's enough challenging such that, when coming back to the car, you're filled with a refreshing sense of accomplishment and happiness. AllTrails was my hero and helped me not get lost, even though the trail itself is quite well marked physically.

And there's the main view, at the top. There are a couple of reasons to climb on top of Mount Guajara. Firstly, you can see Mount Teide very well from the top, and, well, everything else around you. It helped me trully appreciate the beauty of the Teide National Park. And secondly, Mount Guajara served as an astronomical observatory. I would assume that it's a great place to spend the evening and see the stars. All in all, even though the trail really makes you work for the views, I would say it's a must do if you're a hiking fan and plan to go to Tenerife. Just, pack accordingly, please.

Mirador Aguaide

Chaning gears, but not the car, I chose as my next hike to be in the Anaga Natural Park, also a must see if you're spending time in Tenerife. It's on the opposite side of the island, and it takes a bit more than an hour to get there from Los Cristianos. Once I got there, the scenery changed abruptly yet again. No more Los Cristianos beach vibes, or mountain volcanoes on Mars. This time, I was deep into the Jumanji jungle, and it was just staggering! We parked the car at the Cruz del Carmen, a parking spot that served as the start of the trail, which was supposed to be a downhill hike all the way to Punta del Hidalgo. The parking place is convenient, although it lacks any security cameras, so don't forget to lock your car.

Since the trail was supposed to be quite long all the way to the end, I've decided to cut it short, at least to the Mirado Aguaide, especially because getting back was supposed to be much harder. Starting the trail, your usual vine forest trails, all dark, humid and full of mud. However, after about half an hour downhill into the forest, the trail cleared up, and the really beautiful scenery started to show itself. We were walking on the edge of the cliffs, with a deep valley to our left, and the cliffs were filled with trees, aloe vera as tall as trees and some picturesque houses scattered around. This view, combined with the gorgeous sun rays we cought, made the view so good that it was nothing short of perfection.

Cruz del Carmen Trail LandscapeMasca Landscape
cruz del carmen trail landscapemasca landscape

We walked next to ravines, then some people's homes, then through a sheepfold, and eventually we reached the village of Chinamada. There, we took a 2 minutes break, before doing the last part of the hike, a 10 minute uphilll to the scenic spot, Mirador Aguaide, our destination. From here, we could just admire the jagged peaks of the Anaga, like a fortress against the vastness of the ocean. It was quite late and we had to get back, but the view was just intoxicating, and it made me feel so happy to be alive and be part of this beautfiul world. I'm lost for words, but really, if you're in Tenerife, I would definitely recommend going there, either from Carmen, or from Hidalgo, or just by car all the way to Chinamada, although I do believe the feeling is more potent after a few hours of breaking a sweat and enjoying the Anaga hilly landscape.

Life's a Beach

Enough hiking (for now), let me tell you a thing or two about the beaches in Tenerife. Yes, the ones in the South are quite good to just relax, grab a coffee from Starbies, or two, go for surfing and whatnot. Los Cristianos or Duque ar really good, but it's not setting them apart in any way. Just your regular golden sand beach, close to the shopping center, a few palm trees here and there. Las Teresitas is probably more impressive, due to its size, so if you're planning to stay or take a trip to Santa Cruz, definitely check that out. I especially liked the fact that the water was quite warm, warm enough to go for a quick swim.

Bollullo Santa Ursula Trail LandscapeBenijo Black Sand Beach
bollullo santa ursula trail lanscapebenijo black sand beach

On the other hand, I believe that Tenerife is actually more about natural beaches, and there are quite a few of them, especially those with black sand. Those are, indeed, quite special. We went to Bollullo, right next to Puerto de la Cruz, and it was a blast! Great scenery, perfect sand, beach bar up the coast, and a great sunset mix of colors that were perfect for taking pictures. Other great beaches we went to were Playa del Roque de las Bodegas and Playa de Benijo, but these are more up to the north, in the Anaga Park region. However, picture this. You just came back fron a hiking trip in Anaga, it's the afternoon, and you just throw your hiking shoes, crash on a beach with black sand and enjoy the calming sound of the waves.

More Trips and Hikes

One nice hike we did was around the Plaja del Bollullo, in the Santa Ursula area, which was more like a walk overlooking the beaches. Until the walking stopped, and a full climbing session started, until we reached the Mirador a Santa Ana, with a great view over the area. Afterwards, it was time to enjoy the rest of the day on the Bollullo beach, which you probably guessed by now, it's my favorite. Another good hike we did is in Anaga, starting from Benijo and climbing to the Mirador Cabezo del Tejo. The landscape on that part of the Anaga is not as impressive as the one around Aguaide, but it was still worth to enjoy the Anaga cliffs embracing the ocean. All from an altitude of 900m.

Cabezo del Tejo Trail LandscapeGarachico
cabezo del tejo trail landscapegarachico

Last hike I will mention, which is more of a walk, is on the road to the Teide national park, as you're going from the South. This area is covered with pine trees, which, again is different from other areas of the island. And this is probably the most incredible part of Tenerife. It's not a big island, but there are so many different areas in terms of vegetaion and landscape, that you can easily forget that you're on the same island. Anyway, this walk is through a pine forest, which is split into 2 by a swathe of basalt, a kind reminder that the volcano is still active.

You probably think that all I did during the trip was hiking, but that's not really the case. We also went for day trips to different areas of the island, all of which I really recommend. Some worth mentioning are:

  • Mount Teide by cable cart, it's really cool to be on top of the volcano.
  • Masca Village, just make sure the driver is not the emotional kind, as the road is really challenging.
  • El Rayo Buenavista Del Norte, perfect for a walk close to the ocean and taking pictures with unique landscapes.
  • Garachico, which has a great restaurant, Silogia.
  • Puerto de la Cruz, where I was introduced to the Zaperoco.

That's a Wrap

Tenerife is probably one of my favorite places so far, along with the Algarve in Portugal, or New York. There's so much to do, and so much to see, and the weather is almost always great. Consequently, I've went there a second time last year, during the Christmas break, and I would still go there tomorrow if possible. I love it, it deserves the hype, I can't find much against it. As long as you rent a car, book an accomodation that has many good reviews and a great rating, and you make sure to keep your bags secure, the place is really nothing short of Paradise on Earth.

Mount Guajara TrailCruz del Carmen - Punta del Hidalgo Trail
mount guajara trailcruz del carmen - punta del hidalgo trail
Bollullo - Santa Ursula TrailBenijo - Draguillo Trail
bollullo santa ursula trailbenijo draguillo trail

Bellagio 2024

· 7 min read

como lake view in lecco Lecco view of the Lake Como.


Just reading a book and enjoing a coffee. Niiice.

I've been contemplating of booking a cheap flight to Milan, only with a backpack, rent a car, drive all the way to Como to a hotel near the lake and stay for a couple of nights. And, while there, rent a bike, pack a sandwich and a San Benedetto, pick a couple of trails and don't look back. Maybe you should, too.

Found a nice hotel in Bellagio that had breakfast included, Seta. There was also a bike renting shop nearby, Bike It! Bellagio, and the best thing about it was that they had a website which contained a few bike trail suggestions, so it was easy to start the trip with minimum preparation. Bellagio, as a town is quite nice, but there was a lot of construction going around and there weren't many places to eat or have a coffee, at least I did not find any. That was not on the convenient side, but the main topic of the trip was biking, so I forgave the shortcoming.

Bellagio - Como and back

A quite classic trip to start with, not very hard, but not very easy, as it involved a few ups and downs along the way. The first checkpoint was the town of Nesso, as it was almost half way to Como and had a couple of highlights: a waterfall and a small bridge, Orrido di Nesso. It's worth a visit, don't mind the reviews on Google, you don't need to be a pro climber to take the stairs. There is also a small bar nearby, Bar la Cascata, to recharge the batteries with a authentic Italian espresso and croissant.

View of the Alps on ComoBoat on the Como Lake
view of the alps on comoboat on lake como

Back on the road and Como was not that far away, and the ride was pleasant. Legend says that George Clooney owns a villa somewhere in the area, but I was not lucky enough to find it. Dropping by and enjoing one cup of his Nespresso was totally planned for the trip. Shame. Anyway, arrived in Como, beautiful as ever, and quite crowded for March. The weather was nice, though, so I guess that was the reason for such a large audience. But there was not enough time to loiter, as daylight was not going to last forever in order to bike back to Bellagio. There was a ferry to catch in Griante in order to make it back to Bellagio. This second part of this trip was not that pleasant, since it involved picking up the pace and avoid being on the road at night.

That being said, even with the faster pace, I did manage to enjoy the splendid scenery Como has to offer. Every corner of water, every boat, every villa on the shore, every bird in the sky. Everything was just perfectly part of the scenery and it makes sense why owning a property on the lake is such a good idea. Just reading a book and enjoing a coffee. Niiice.

strava route of the bike route from bellagio to como and back

Overall it was 65km ride and someone deserved some rest.

Griante - Villa del Balbianello - Porlezza and back

Day 2, and surprisingly, not everything was hurting that much. For the second part of the trip, I chose a route that involved going north all the way to Lake Lugano. It started by taking the ferry from Bellagio to Griante, and a short visit to Villa del Balbianello, in order to start things slow. After enjoying the very well trimmed courtyard, it was time to hit the road again, and the route went north to Menaggio but before entering the city, the route would diverge from the main road, and it was uphill time baby. After this challenging part, the route went west.

Lago di PianoVilla del Balbianello
lago di pianovilla del balbianello

The route was actually not that scenic to be honest, but it had a special bike lane all the way, which was much appreciated. However, there was nothing that special about the countryside, just farms, villages and a few cows here and there. Lago de Piano was actually beautiful, with it being next to the mountains, and it proved to be a good place to take a break. After taking a few pics of this gorgeous mountain lake, it was time to finish the first half of the route, in Porlezza. This very cozy town, just next to Lake Lugano, has a very nice boardwalk to enjoy the lake from, and right next to it, a gelato place. How thoughtful!

After a very needed break with coffee and icecream to lift the spirits back up, it was time to head back home. The route back was different until Menaggio, and this time, it was pure torture. It was a lot, and a lot, and a lot of uphill. I died at least 5 times until reaching Naggio, the place where the route would change from uphill to full speed downhill. Which was supposed to be good, right? Wrong, as the downhill part was so steep, and it involved so many turns, it proved that all the torture involved for reaching it proved to be not such a good investment. Ideally, folks, do this one the other way around.

strava route of the bike route from bellagio to porlezza and back

Anyway, the route was shorter than the first one, only 47km, but I believe it was quite more challenging, due to all that uphill part. But eating icecream next to the Lake Lugano? Priceless.

Lecco

Day 3, time to go back home. Since the flight was scheduled for the evening, Lecco was decided to become the third and last stop of the trip. The weather was a mix of sun and rain, which was not all bad, given the really great pictures I managed to take as a result of the shifting light. The town itself is quite nice to stop for half a day, but the best bits involve the scenery. The view towards Corni di Canzo is simply breathtaking, and I highly recommend going for a walk along the Como promenade and enjoy the views. Quite impressive, and, again, the sunlight really made it even better.

View of the Alps from BellagioSunset over Como from Tremezzo
view of the alps from bellagiosunset over como from tremezzo

After going for a pizza (duuuh) at Pizzeria la Rosa and for a coffee (double duuh) at Coffee&Coffee, it was time to take the rental to the car lot, enjoy the airport van ride and the short trip back home. Biking on the Como proved to be an excellent choice for a weekend getaway, and there would be more such trips in the future for sure.

Delivering the Feature

· 8 min read

the praetorian fountain in palermo The Praetorian Fountain in Palermo.

All stages in the software development lifecycle are important, but some stages are more important than others.

There are many important parts of the software development lifecycle. It's important to understand a business need, otherwise your feature won't be useful. It's important is to devise its requirements, create the designs, split the work and estimate it. Then comes the implementation, testing, delivering it to production and measuring its performance and usage through telemetry.

All stages in the software development lifecycle are important, but some some stages are more important than others. Is it true? Hard to say, maybe it depenends case by case. Are you a startup? A big tech company? Is there a similar product already on the market? There are many aspects to consider when you're prioritising.

We're not going to debate that here. Instead, I would like to advocate the importance of delivering the feature. If it's not being used by costumers, nothing else matters.

The Problem

I was fixing an issue in Microsoft Teams related to a selection inside a search box. After fixing and testing it manually, my next step was to write a unit test using Jest and React Testing Library to make sure the issue won't surface again as a regression. The issue itself is not important, but the test looked, more or less, something like this:

test('should render the search box with the value selected', () => {
const defaultValue = 'good morning'
const {getByRole} = render(<SearchBox defaultValue={defaultValue} />)
const searchBox = getByRole('textbox', {name: 'search for gifs'})

expect(searchBox).toHaveFocus()
expect(searchBox.selectionStart).toEqual(0)
expect(searchBox.selectionEnd).toEqual(defaultValue.length)
})

The test is rendering our search box component, which we expect to be already focused and, if it has default text passed to it, to have it already selected, so the user can overwrite it in one go. The test looks fine, it's easy to understand, it covers the scenario, so we should be all done. In order to take it one step further, I asked myself if jest dom could have a convenience function to test this in one go, and also improve the readability. Something like this:

expect(searchBox).toHaveSelection(defaultValue)

Now, there's nothing wrong with the fist approach, but we can agree that the second one conveys the message better. After checking the functions available in VSCode, and noticing there's no helper expect function, I went to their repo with the thought of submitting a feature request, as I believe it could be a useful addition. Not only did the library already have a feature request, but it also had an open PR to add the function.

The feature request is, at the time of writing this article, almost 4 years old, and the PR is 3 years old. At first guess, I would expect that the changes introduced in the PR were not correct, or did not solve the problem one way or another. However, after checking the discussion and the code itself, the PR was actually in a very good state. It introduced the correct function, which covered all the required scenarios. It was able to check both input elements and their selection, and also random elements that could contain text, from paragraphs to divs. And for this second use case, the checks were mostly done by using the range and selection native JS objects, and covered the following:

  1. whole elemenent was part of the selection.
  2. the element containing the whole selection.
  3. element contains part of the selection.

So, why wasn't this PR merged already? There was quite a lot of effort put into the changes, and users of jest-dom were not reaping the benefits. It made me curious enough to dive deeper.

The Solution

It turned out that the code coverage target of 100% was not met, there was no documentation and no TypeScript support for the changes. Considering all the work that was done until that point, the rest seemed to be a piece of cake. What I did first was to fully understand requirements and the implementation.

We basically need to get the selection for the element we are asserting and return it. If our element is an input (not a checkout or a radio) or a textarea, we basically just return the selected text with element.value.toString().substring(element.selectionStart, element.selectionEnd).

The more challenging part is to get the selection of an element that's not an input. It could be a paragraph, a div, a span, doesn't matter, it should work in all cases. For this second case, there are actually 3 scenarios we need to consider. These scenarios need to account for one action: when user drags a selection by mouse, trackpad or keyboard (holding Shift). Our function has the element passed to it, so we get the document selection using element.ownerDocument.getSelection(). Afterwards, we need to check how much of that selection is included in element. We have 3 cases.

  1. Whole element is inside the selection.

    • condition is selection.containsNode(element, false)
    • for example, our element is <span> that's contained in a <p> which got a partial or full selection, including the span.
    • we get the selection of the element with selectNodeContents(element) and return it.
  2. Element contains the selection.

    • condition is element.contains(selection.anchorNode) && element.contains(selection.focusNode)
    • here we do nothing, since element fully contains selection, no need to change anything in the initial selection.
  3. Element contains a partial selection

    • this means the selection either starts in the element, or ends in the element.
    • you can check in the source code from the link above the API used to get that partial selection that's relevant to the element, based on the 2 cases.

With the selection relative to the element received, we will use the already established template to build toHaveSelection and it's job done. However, as I ran the tests, there were a couple of Else branches that were not reached by the unit tests. I realised that with a bit of refactoring getSelection, it would be actually easier to test the changes, so I submitted a slightly different version for the partial selection condition.

Moreover, even though there was a complete coverage on the tests, I added a few more actions to the test cases, which were missing. 100% test coverage does not mean that you are testig your changes fully. However, less than 100% test coverage means most likely you are not fully testing. Consequently, aim for 100% coverage, but stay skeptical even with that percentage, since it's not a guarantee that your feature is fully tested.

OK, so we've written the tests, we refactored the code, we got full coverage. Since the repo is written in JS, we need to provide separate TS support, but luckily that was easy to do, given the templated previous functions alread written. Finally, I've written a README entry to serve as documentation, and this was actually based on the unit tests, given our function was actually going to be used as a unit test assertion.

Changes done, commited on my forked repo, and submitted a PR to jest-dom, asking the primary maintainer to review. I provided all the context, given the situation, so it would help speed up the process. A few days later, the PR was approved, merged, and included in jest-dom@6.6.0.

The Conclusion

There is a lot of effort which involved so much hard work that is wasted if it's not delivered to your users. We see it all the time, in open source, in a small company that did not finish the product it aimed to deliver, in big tech where there are so many initiatives, hackathon projects and experimental features that do not reach their intended audience. It's probably why I chose to write this article. I want to emphasize that even if your work is not 100% ready to be delivered, that doesn't mean it shouldn't. It's better to aim to finish it 80% feature wise, deliver it and do the 20% later, than implement it 100% and shift focus at 97%. Deliver it at 80%. Hell, maybe even less. Who knows, maybe after reaching the costumers, you may realise that you don't need to do that 20%. Or that the rest of 20% after costumer feedback is now completely different from the initial 20% you initially imagined.

This does not mean that testing, accessibility, telemetry, performance monitoring and all other steps of the software development lifecycle are not important. Far from it. I'm not going to de-emphasize their importance. Just to point out that your effort is only useful when it's used by people, if it makes their life easier or their job less annoying.

Until next time, good luck in delivering great value to the world!

Athens 2024

· 5 min read

the odeon of herodes atticus The Odeon of Herodes Atticus.


But anyway, here I was, Syntagma square, baby.

Ever had that urge to just go some place, do nothing but eat, chill, have a few walks with some coffee in between. Well, folks, how about some Athens in February? After enjoying Madrid and Malaga in January and December, I developed quite a passion for Mediterranean destinations during winter. All I wanted was some place that was still warm, not that crowded but still offering relevant stuff to do. And Athens really hit the nail in the head on this one.

Also, as a side note, notice that I'm writing about my February trip at the end of September. I'm quite behind on this little travel blog I have going on, and I decided to cut my articles short. I'll focus only on the good stuff, throw some of the best pictures and I'll wrap it up sooner than expected. I'm not going aiming to turn this blog into the Song of Ice and Fire.

Athens Food & Walks

So, Athens. A very short flight from Bucharest. The train from the airport to the city center takes longer than the flight, and it's even less enjoyable. That says a lot considering I travelled low cost. But anyway, here I was, Syntagma square, baby. I took my bags and went by bus to Koukaki, this popular neighbourhood right next to old town, with more restaurants, bars and cats than you can count. So, what's so special about the place? Well, it's the chill place full of stuff to eat and drink that I was looking for. Found the local coffee shop, Caffeine Dealer, and realised that Espresso Freddo and Iced Flat Whites are a thing. Completely changed my life, this. As for eating, hmm, I would probably say Karimino, Neratzia and Bite Box are quite nice, with both brunchy things but also late meals.

Building on the AcropolisView of Athens from the Acropolis
building on the acropolisview of athens from the acropilis

There's also a nice Turkish place just next to Koukaki, Cappadocia Grill Cafe, where you can enjoy a good old Adana Kebab or some chicken if you prefer lighter meat. However, probably the best place to get something to eat is the city center. There's Usurum Brunch & Cocktails, with one of the best pancakes in the world. There's Choureal, with, well, you can figure this one out. And Dope Roasting, with coffee and some quick bites that are also healthy. This place is also quite popular to work remotely. Right next to old town there's also Coffee Joint, where you can eat the most civilized omelette, have an orange juice and be on your way, no fuss included.

But, Silviu, Athens is a great cultural spot, one of the most relevant cities of the Antiquity, with so much to offer in terms of culture and history and much much more. Yeah, I've been to the Acropolis, it was nice, quite well preserved. Oh well, visiting sights and museums was not the point, so I did not bother that much. Anyway, there was another sight, sort of, that I visited as a recommendation from a friend, and that was the Stavros Niarchos Foundation Cultural Center. Apparently, some naval shipping tycoon built this place and, when I first saw it, I was not sure if I was still in Athens. It seemed like a building you would find more likely in Oslo. It's quite huge, with huge glass windows, and with greenery on top of it. Really fancy, I loved it. I also loved the walk from Koukaki to this place, all (ALL) the way throguh all (ALL) of Kallithea. It was refreshing to walk through a neighbourhood that does not probably make the top list of visiting.

View of the Acropolis from a nearby hillThe garden and a view of Stavros Niarchos
view of the acropilis from a nearby hillthe gandern and the stavron niarchos

I had some other nice walks as well, like the ones in the Athens National Garden, next to the Syntagma square. Or the ones around Kallimármaro and Kolonaki. Overall, the city has that special something, you can feel it has personality and that it has been around for a while. And that brings me to the part where it's falling apart in many places, with so many ruined buildings, unkept streets and sidewalks. You can feel that, from the economical point of view, it's still struggling.

Even with the last downside, I loved my trip to Athens, it was exactly what I needed at the time, and I'm actually looking forward to return soon.

Calling Mandatory Getter props

· 12 min read

hilly landscape in the village of simon, brasov Hilly Landscape in the Village of Şimon.

...there's a lot going on with the attributes and the handlers and the ref and the other properties...

Let's assume that we have the following scenario. We have a custom hook that returns getter props, and we want to make sure that those getter props are called correctly. But, first things first:

What is a getter prop?

It's a function that gets returned from the custom hook, which is supposed to be called and its result used for some reason. Let's take the getInputProps getter prop from downshift:

import * as React from 'react'
import {useCombobox} from 'downshift'

const items = ['red', 'green', 'blue']

const {getInputProps} = useCombobox({
items,
})

return (
<div>
<input {...getInputProps()} />
</div>
)

The getInputProps result is an object with properties such as: aria-labelledby, aria-expanded, role, onChange, onClick etc. These properties are going to make our input more or less acting like a combobox. The combobox logic is kept inside the custom hook, the inputs are retrieved through the event handler functions (onClick, onChange) and the combobox related information is passed through the other attributes (aria-labelledby, aria-expanded). Of course, there are many more handlers and properties, but we are keeping it simple for now.

There's also the ref property that is going to be returned from getInputProps, and this is needed in order to allow useCombobox to access the input element and perform some custom .focus() actions when needed.

The Problem

Given that there's a lot going on with the attributes and the handlers and the ref and the other properties, we want to make sure that the getInputProps getter function is called correctly.

  • First of all, we want to make sure that it is called.
  • Secondly, that is called on an <input> element, or in such a way that it has access to an <input> element.
  • Thirdly, in case it is not called correctly, we want to inform the user through a console error and give them enough information to fix the getter function call.
  • Moreover, we also want to show the console error in the development environment, not production. -In addition, we would like to show this error only on the first render, as we believe it's enough in terms of checks and informations.
  • Last, but not least, we will also provide an escape hatch to avoid getting this error if the consumer just cannot call getInputProps properly on the first render.
    • We are going to document this escape hatch and make sure the consumer knows why we are adding it. Ideally, if a consumer will use the escape hatch, they are aware how getInputProps works, how it should be called, and if they, for some reason, cannot call it on first render (using a Portal for example), they will use the escape hatch to avoid the error, but they will test their implementation to make sure that it works as it would by calling getInputProps normally.

The Solution

Inside the getInputProps function we return, we would like to have a mechanism that checks whether the function is called withing the right conditions. We can do so with a function to which we supply the call parameters. This function will be called at render time, since getInputProps is called on render time. The actual check happens after the first render, so we will involve a React.useEffect hook. After a bit of thinking, the solution is actually simple: a custom React hook that will keep call information inside a React ref. This call information will be supplied by a function which we will return from the hook. The returned function will store the call information inside that ref. And inside the effect function, we will perform the check and show the errors if needed.

The Tests

We actually have a good and simple solution in mind, so let's see what do we actually expect from this solution.

  • we want an error displayed when getInputProps is not called.
  • we want an error displayed if getInputProps is not called with a ref pointing to an element.
  • we don't want an error displayed if getInputProps is not called on subsequent renders.
  • we don't want an error displayed if getInputProps is called correctly.
  • we don't want an error displayed if we use the escape hatch provided and getInputProps is not called with a ref pointing to an element.

We will use React Testing Library renderHook and together with Jest, we will set up our tests suite.

describe('non production errors', () => {
beforeAll(() => {
jest.spyOn(console, 'error').mockImplementation(() => {})
})

afterAll(() => {
jest.restoreAllMocks()
})

test('will be displayed if getInputProps is not called', () => {
renderHook(() => {
// we just render the hook, we don't call getInputProps.
useCombobox({items})
})

expect(console.error.mock.calls[0][0]).toMatchInlineSnapshot(
`downshift: You forgot to call the getInputProps getter function on your component / element.`,
)
})

test('will be displayed if element ref is not set and suppressRefError is false', () => {
renderHook(() => {
const {getInputProps} = useCombobox({
items,
})

getInputProps()
})

expect(console.error.mock.calls[0][0]).toMatchInlineSnapshot(
`downshift: The ref prop "ref" from getInputProps was not applied correctly on your element.`,
)
})

test('will not be displayed if getInputProps is not called on subsequent renders', () => {
let firstRender = true
const {rerender} = renderHook(() => {
const {getInputProps} = useCombobox({
items,
})

if (firstRender) {
firstRender = false
getInputProps({}, {suppressRefError: true})
}
})

rerender()

expect(console.error).not.toHaveBeenCalled()
})

test('will not be displayed if called with a correct ref', () => {
// we supply a mock ref function to getInputProps.
const refFn = jest.fn()
const inputNode = {}

renderHook(() => {
const {getInputProps} = useCombobox({
items,
})

// getInputProps returns a ref function which will make the element
// usable both outside and inside useCombobox.
const {ref} = getInputProps({
ref: refFn,
})

// we call the final ref function received with a dummy node.
ref(inputNode)
})

expect(console.error).not.toHaveBeenCalled()
})

test('will not be displayed if element ref is not set and suppressRefError is true', () => {
renderHook(() => {
const {getInputProps} = useCombobox({
items,
})

getInputProps({}, {suppressRefError: true})
})

expect(console.error).not.toHaveBeenCalled()
})
})

The tests are quite self explanatory given our 5 expected use cases. For now, they will obviously fail, and we will consider our job done once we write the implementation and the tests are green.

The Implementation

To recap, the getter prop is called on render, so we would like our check to be performed after the render. We will store the call information inside a React ref, and we will check it using a React useEffect. Since we need our check to be performed in development mode, not production, we will define the custom hook like this:

let useGetterPropsCalledChecker = () => {}

if (process.env.NODE_ENV !== 'production') {
useGetterPropsCalledChecker = () => {
// the actual implementation.
}
}

First and foremost, we would like to set up our ref object that we will use for the check.

if (process.env.NODE_ENV !== 'production') {
useGetterPropsCalledChecker = (...propKeys) => {
const getterPropsCalledRef = useRef(
propKeys.reduce((acc, propKey) => {
acc[propKey] = {}

return acc
}, {}),
)
}
}

And we will call this hook inside useCombobox like this:

useGetterPropsCalledChecker(
'getInputProps',
'getToggleButtonProps',
'getMenuProps',
)

Notice that we will most definitely want the hook to check that other getter props are called correctly as well. We are going to stick to getInputProps here purely for explanatory purposes. Anyway, for each prop key we pass to the hook, we will create an empty object container inside the ref. We add this empty object as we want, during our checking phase, to be able to tell if the getter prop with that prop name was not called. We cannot perform this check if we do not store any initial information about the getter props. What prop keys should we actually check, right?

Next, we want to give the consumer, which is the getter prop function, to be able to store the call information. For that, we will return a function from the hook, which stores this information within the ref.

if (process.env.NODE_ENV !== 'production') {
useGetterPropsCalledChecker = (...propKeys) => {
const getterPropsCalledRef = useRef(
propKeys.reduce((acc, propKey) => {
acc[propKey] = {}

return acc
}, {}),
)
}

const setGetterPropCallInfo = useCallback(
(propKey, suppressRefError, refKey, elementRef) => {
getterPropsCalledRef.current[propKey] = {
suppressRefError,
refKey,
elementRef,
}
},
[],
)

return setGetterPropCallInfo
}

And the usage within getInputProps is going to be something like this:

// this is going to end up on the input element via getInputProps
const inputRef = React.useRef(null)

const getInputProps = useCallback(
({refKey = 'ref', ref, ...rest} = {}, {suppressRefError = false} = {}) => {
setGetterPropCallInfo('getInputProps', suppressRefError, refKey, inputRef)

// rest of the logic

return {
[refKey]: mergeRefsUtil(ref, inputNode => {
inputRef.current = inputNode
}),
// the rest of the attributes and handlers that will end on the input
}
},
)

In case the above ref logic is not clear, it ensures that all ref objects have access to the same input element. We need the input ref in useCombobox. The consumer might also need the input ref for some additional logic, hence the merge of these ref objects and passing the merged object to the <input> element. Also, suppressRefError is the escape hatch we talked about previously.

Now the checking part. We have the initial object created for each getter prop on render phase, when useGetterPropsCalledChecker is called. We have the call information stored when getInputProps is called, also on render phase. Now we have to check if the function is called correctly, on first render only, so we add a React useEffect hook inside our custom hook:

useEffect(() => {
Object.keys(getterPropsCalledRef.current).forEach(propKey => {
const propCallInfo = getterPropsCalledRef.current[propKey]

if (!Object.keys(propCallInfo).length) {
// eslint-disable-next-line no-console
console.error(
`downshift: You forgot to call the ${propKey} getter function on your component / element.`,
)
return
}
})
})

Our first test should pass. If the object is empty, then it means that we did not call the getter prop at all, so we show an error. If the getter prop is actually called, then we need to check if the element exists, which means that the getter prop is called correctly on an element.

useEffect(() => {
Object.keys(getterPropsCalledRef.current).forEach(propKey => {
const propCallInfo = getterPropsCalledRef.current[propKey]

if (!Object.keys(propCallInfo).length) {
// eslint-disable-next-line no-console
console.error(
`downshift: You forgot to call the ${propKey} getter function on your component / element.`,
)
return
}

const {refKey, elementRef} = propCallInfo

if (!elementRef?.current) {
// eslint-disable-next-line no-console
console.error(
`downshift: The ref prop "${refKey}" from ${propKey} was not applied correctly on your element.`,
)
}
})
})

Our second test should now pass. The element check is, sure, not ideal, since we're not checking for an actual HTML input element, but let's say it suffices for now. The fourth test which checks that there is no error logged was passing already, but now with the actual element check, we make sure that, when it's passing, it does so for the right reason.

To fix the second test, we need our hook to be called only once, on first render, so we add [] as the second parameter to useEffect.

And to fix the fifth test, which checks the escape hatch, we will also involve the suppressRefError parameter from the call information. Our final implementation will look like this.

if (process.env.NODE_ENV !== 'production') {
useGetterPropsCalledChecker = (...propKeys) => {
const getterPropsCalledRef = useRef(
propKeys.reduce((acc, propKey) => {
acc[propKey] = {}

return acc
}, {}),
)

useEffect(() => {
Object.keys(getterPropsCalledRef.current).forEach(propKey => {
const propCallInfo = getterPropsCalledRef.current[propKey]

if (!Object.keys(propCallInfo).length) {
// eslint-disable-next-line no-console
console.error(
`downshift: You forgot to call the ${propKey} getter function on your component / element.`,
)
return
}

const {suppressRefError, refKey, elementRef} = propCallInfo

if (suppressRefError) {
return
}

if (!elementRef?.current) {
// eslint-disable-next-line no-console
console.error(
`downshift: The ref prop "${refKey}" from ${propKey} was not applied correctly on your element.`,
)
}
})
}, [])

const setGetterPropCallInfo = useCallback(
(propKey, suppressRefError, refKey, elementRef) => {
getterPropsCalledRef.current[propKey] = {
suppressRefError,
refKey,
elementRef,
}
},
[],
)

return setGetterPropCallInfo
}
}

Recap

Basically, we initialize an empty object for each getter prop we want to check, using the getterPropsCalledRef React ref object. Then we return the setGetterPropCallInfo function that will store information for each getter function when called. Finally, inside the useEffect function, for each getter prop, we get the call info from the ref, we check for an empty object and show the getter function not getting called error. In case we our object in not empty, we get the call information, and do nothing if suppressRefError is true. Otherwise, we check the actual element ref and show an error if it's falsy.

We may go even further with the tests and check if the hook is actually an empty object on production environments, but at this point I'm not sure if it's possible to implement such a test, or if it's even worth it. Bottom line is that, using this custom hook, we are able to perform the function getting called check, or other checks as well, in order to make sure our consumers are doing the right thing and the solution we ship works for them.

Madrid 2024

· 6 min read

parco del rotiro lake View over the lake in Parco del Rotiro.


If you think you know already the meaning of tasteful luxury, visit this place and reset your standards.

Today, damas y caballeros, we stay in beautiful Spain, but this time we leave the sunny South for Mardrid, the capital of football, culture and, well, Spain. It was a long time coming, and I was super excited to start 2024 travelling season with this one. I had high expectations, given the reviews I received from my friends, and, honestly, I was still amazed by what the city had to offer.

Royal Palace and Surroundings

If you like your trips cultural, you're in the right place. We started the trip with the Royal Palace of Madrid, and, Dios mio, what a start. I've seen palaces and museum, and quite plenty, until that point, but the Royal Palace of Madrid exceeded my expectation by far. If you think you know already the meaning of tasteful luxury, visit this place and reset your standards. Every single piece of furniture, tapestry, design and artwork was exactly where it was supposed to be, and the level of detail for every single one of them was incredible, from engravings to finishing touches. They don't let you take pictures inside, and it's really a shame, as it's probably one of the most exquisite places you could feast your eyes upon.

Catedral de la AlmuedaRoom inside Royal Palace of Madrid
catedral de la almudenainside the royal palace of madrid

We left the palace exactly when it was closing time, so there was no more time left to visit the Almueda Cathedral unfortunately, but we did enjoy a very nice walk around Plaza de la Almeria, and took some pictures with Campo del Moro in the background. Quite close to the palace there's the Mercado de San Miguel, which is quite a great place to stop by for an hour or two and enjoy some empanadas and cervejas. Back to the hotel and ready for another day. We stayed at the Room Mate Alba Hotel, which is located in the city center, but in a very quiet area, and the hotel itself is quite nice. Between the Mercado and the hotel we passed through Plaza Mayor, which is another landmark worth checking out, given its surrounding buildings, coffee shops and vibrant atmosphere.

Prado Museum, El Rotiro Park, Food and Coffee

Prado Museum is probably a must go if you're going to Madrid, and for good reason, since it boasts such a vast collection of art pieces from artists such as Francisco Goya and Diego Velazquez. You could spend a few days here without a doubt, but we also had some other places in mind so we were happy to be done in just a few hours. Outside, there's the beautiful park El Retiro, with its signature pond decorated with the colonnades of the Alfonso XII monument. It was a great walk to bask in the sun and forget that it's the middle of January for a few hours. Right next to the park there's also the botanical garden, which would have been a better pick in any other season, but we still enjoyed the impressive collection of bonsai trees.

Monument of Alfonso XIIMadrid Street at Dusk
monument of alfonso xiistreet in madrid at dusk

After leaving the botanical garden we went for a stroll through the upscale Goya neighbourhood. It's nice over here. All buildings are very, very well maintained, and they are simply beautiful and elegant. The city is just amazing, I don't think I encountered anything that was either bad or at least "could be better". Maybe the coffee was not as great as in other places, but there were some coffee shops that were quite good, for instance the Norah Coffee & Brunch in Goya. Don't forget to try the sweets. Another great option is Pascal Specialty Coffee & Brunch, which was closer to the hotel, and features a brunch selection more on the healthy side. If the coffee could have been better, the food was actually amazing. Spain has great food, without a doubt, and other places we could recommend in Madrid are Los Porfiados, for a cozy dinner, or Fiaschetteria La Saletta, if you crave Italian. Other coffee options worth mentioning are Alchemy and Dale.

Santiago Bernabeu, Sorolla Museum and Gran Via

I'm not much into football, but when I watch it's most probably a Real Madrid game, either in La Liga or Champions League. Visiting the Santiago Bernabeu was something I really wanted to do, especially now with the updates it received. From the outside it's quite a piece of art, I love the facade with its gray shiny blades. On the inside, well, it's huge there are lots of big screens everywhere and a retractable roof, letting you know that it's proudly representing the 21st century. We could not enter the locker rooms, which was quite a shame, but at least we saw the hall of trophies, and there are a lot of them. This team knows what winning is about.

Santiago Bernabeu StadiumGran Via
santiago bernabeu stadiumgran via view at night

After we left the stadium we went back towards the city center by foot and we stopped at the Sorolla Museum on the way. It's actually the former house and studio of Joaquin Sorolla, who travelled throughout Spain in order to create a considerable collection of paintings. The art pieces inside the museum are organised in a timeline manner, so we could follow along his interests and favorite places as he aged, from his home city of Valencia, to the Spanish countryside and the capital of Madrid, where he was very passionate about his garden. The garden itself is a great place to relax on a bench, looking at the pond and enjoying the shade of the trees.

Sorolla Museum GardenSorolla Museum Interior
sorolla museum gardensorolla museum interior

The last but not least landmark I would like to mention is the Gran Via, and I would not miss it especially during the night, when I believe it really shines. Both the buildings, the landmarks and the street itself are spoiled by huge amount of light and it's a great way to end the day with a stroll to the shops and just enjyoing the vibrant heart of this otherwise amazing city. It's trully a great city, and probably one of my favorites so far. It's amazingly beautiful, it does not seem to be that crowded, the people are friendly, the food is great, the weather is pleasant and there are so many things to do. I would definitely come back here one day, definitely on a Real Madrid match day. Looking forward, hasta luego!

Malaga 2023

· 8 min read

view of Malaga from the Miradon de Gibralfaro View of Malaga from the Mirador de Gibralfaro.


Truth be told, I don't mind palm trees with Christmas lights. I could live with that.

Finally, the South of Spain. It took a while to get here, but here we are. It's December, sure, but not in Malaga though. Good thing I brought a couple of T-shirts, otherwise it would have been a tough time. Christmas decorations while the weather's so good is just out of this world. Truth be told, I don't mind palm trees with Christmas lights. I could live with that.

So far so good. It turned out that going to Malaga at the beginning of December is a great idea. That was the good part. The bad part was that also half of Spain thought it was a good idea, and the place was packed with visitors. I believe they also had a day off during the week we chose to visit, and everyone took advantage of it. Our apartment was in the center (Be Mate Malaga Centro, great place, check it out) and we had to park somewhere, but, really, there was absolutely no place to park a bicycle, yet alone a car. We finally found a payed multi level car park nearby, barely. Inside it, we found an empty spot on the last floor. Lucky us.

Malaga by Day

I believed that using a rental car was the way to go, since we planned to visit at least some other town besides Malaga, but we did not leave the city eventually. However, the car was cheap to hire, and since I used it only to drive from the airport and back, I did not even bother to refuel. Anyway, we got to our apartment, super nice, way above what we got in Naples or Catania. Yes, it was a touch more expensive, but we got a lot for our money. Totally recommend the place, it was spacious, modernly furnished, right in the city center, but in a very quiet area.

Now the city itself. The historical city center is, I would say, a pretty standard Spanish city, and that's a very good thing. It's clean, it's very well maintained, the buildings are superb, and the amount of restaurants and coffee shops is insane. Spain does not offer the best coffee in the world, not even in the specialty coffee shops. It's not bad, by any means, but certainly not the best. On the other hand, the food, well, that's something else. From the standard brunch toasts, Benedicts and avocados to the seafood, meats and deserts, the food in Spain is just glorious. I think Portugal still tops it up, but Spain is definitely top 3 in my book. Definitely check out Next Level Specialty coffee, and you must, absolutely must, get the French Toast: toasted bread with cream, bananas, strawberries, blueberries and honey. Combined: magic.

Walkway to AlcazabaCatedral de la Encarnacion
walkway to alcazabacatedral de la encarnacion

Obviously, there are some sights to absolutely deserve a visit. But just walking through the city center is pleasant enough, while going to the stores, getting ice cream, the usual stuff. As we strolled around, we got to the Catedral de la Encarnacion, which is Malaga's main church, and it's imposing both on the outside and on the inside. Definitely worth paying for the entrance. From there, the Alcazaba is just at "a stick throw" distance, and it's the main atraction of the city. For good reason, to be sure. The castle itself is very well preserved, and they are obviously very proud of their monument. And walking through the courtyards is a great experience, especially because of the many beautiful gardens and beautiful architecture. And, of course, the views over Malaga are simply gorgeous.

Right next to the Alcazaba there's the Gibralfaro Castle, and since we visited Alcazaba, we might as well do both simultaneously. Gibralfaro is not as special as the Alcazaba, but it has better views, especially from the Mirador de Gibralfaro. We could not see the Malagueta from there, due to the buildings around the Plaza de Toros. But we did, of course, enjoyed a great view over the stadium for the bullfighting shows.

Gibralfaro view to MalaguetaAlcazaba view to Malagueta
gibralfaro view to malaguetaalcazaba view to malagueta

Another point of interest is the Malaga Museum, which definitely has a lot to offer. I found the painints from Moreno Villa particularly interesting, and there should be enough art for everybody. Actually, I think the Spanish museums are the best I visited so far, so if art is your thing, make Spain your priority. I enjoyed museums not only in Malaga, but also Barcelona, Madrid and Zaragoza. One thing that's actually a bit not so great is the fact that, when it's 15 minutes to closing time, they smiply kick you out, without any sign of politeness. It happened to us in Malaga and also in Madrid, and the fact that they insist for you to leave is just, well, not great. On the bright side though, once you exit the Malaga museum, there's a very nice terrace with palm trees that screams Instagram and Vice City, so we definitely took a few pics with the palm trees at dusk.

Malaga by night

Remember the part when I mentioned half of Spain was in Malaga for the weekend? That was not immediately obvious by day, save for the parking situation. However, by night, it was a completely different story. The whole city center, from the Plaza del Constitution, all the way down the Marques de Larios and towards Malaga park, including it, was so crowded it was just impossible to move. It was quite scary at times since I was not used to these kinds of crowds, but apparently, in Spain, it's completely normal. Nobody was even remotely mad about the whole thing.

Every person in the crowd was happy, everyone was singing, there was a smile on each and everybody's face, and I realised just how happy people are over there. In lived in Bucharest and Prague all my life, and I am mostly used to seeing gloomy faces that were quick to snap and constantly one small second away from getting angry. And it felt good to see happiness, just randomly manifesting itself on the street.

Marques de Larios with Christmas DecorationsHistorical Center Building
marques de larios with christmas decorationshistorical center building in malaga

Probably the holiday also helped to create all this joie de vivre, and we were lucky enough to be in the city center when they blasted music through the speakers, along with a light show using the Christmas decorations. Everyone, obviously, knew the songs, so they were singing along. It was absolutely amazing, probably one of the best feelings I had for a moment, and I will always remember Malaga for that show and for how it made me feel.

One evening we also met with a couple of friends who happened to be around Malaga at that time, and we went for a walk towards the Malagueta and then back to the city center, where we went to a ramen place. I'm not a fan of the soup, but luckily they also served sushi, so it worked out well for me as well.

Since I am also watching games in La Liga from time to time, I know that Malaga has a very famous football team. Consequently, I could not leave before going for a walk to the La Rosaleda stadium. Sadly, it was already dark outside, and could not see much of the stadium, and since it was already evening, visiting it on the outside was not possible either. It did not seem to be as grand as the Bernabeu or the New Camp, but I was happy to see it anyway, as I'm also a fan of its name, La Rosaleda.

Wrapping up

It was a very short trip, and I'm quite OK with the fact that we did not go other places we planned to, like the Caminito del Rey or Granada, but this leaves us with the opportunity to go back and make up for it. And, most probably, I will be back in Spain multiple times from now on, given its rich history, great Western architecture and Moorish influences, incredible museums, incredible food and good enough coffee. Next on the list was, obviously, Madrid, for a strong 2024 start in the travelling department.

Catania 2023

· 5 min read

view of Etna from the ancient theater in taormina View of Etna from the Ancient Theatre in Taormina.


The food was delicious, from the Tagliere di Salumi e Formaggi to the Pesce Spada a Siciliana.

I had Sicily in mind for some time, and going to Catania was definitely something I looked forward to. Initially, Palermo was the preferred destination, until I realised I bought the tickets for Naples instead. Anyway, Catania was supposed to be better as it was closer to Etna and Taormina, so off we went to this place full of history. And cannoli.

Catania

After arriving at the airport and getting into the car, I realised that I'm about to drive in Siciliy and that came a bit scary. Oh, and the parking. Bad move. However, after leaving the airport and arriving into town, I realised it's actually pretty straightforward. People are actually quite nice, since I did not know the way and struggled at times. If I was doing the same in Bucharest, outward chaos whould have ensued. Parking was a bit of a hassle, due to the limited space, but once we found a spot, we payed at a nearby parking meter and went on with our business. Quite nice.

The apartment was near the Teatro Massimo Bellini, a very popular and charismatic place with a plaza in front. Apparently, we stayed in (or near, I did not quite understand) a building that was built by Mussolini. Yeaaah. Anyway, it was close to the center, where we could stroll on the Via Etnea and explore the shops and restaurants, and there were quite a few of them. The place was quite popular all day long, and we enjoyed the very lively atmosphere, as well as the nearby monuments of Sant'Agata church, University Square and the Elephant Fountain.

Basilica Cattedrale di Sant'AgataTeatro Massimo Bellini
basilica cattedrale din sant&#39;agatateatro massimo bellini

Near the Etnea we found a very good (quite excelent, actually) restaurant, Deliziosa, and we enjoyed it so much we went there twice. The food was delicious, from the Tagliere di Salumi e Formaggi to the Pesce Spada a Siciliana. Again, most excelent, would totally return. Also near the center is the fish market, and it's exactly what you would expect from a good ol' Sicilian market. If you're into fried fish, make sure to check out Scirocco. If you're into a coffee spot with a quite charming host that does magic tricks, go to Ciao. I must say, overall, the whole experience was pretty unique.

We also walked away from the center a few times, but the sights were not as impressive. Sure, the city does have its charm, and there's no denying that it has rich history and charm, but it does feel that it needs a little more maintenance. And it's such a shame, given the city's potential. We walked towards the waterfront then through San Cristoforo all the way to the Porta Garibaldi, and although it was a relaxing walk, there was nothing much to see. Also, towards the north, the Piazza Carlo Alberto di Savoia is, again, not the best of sights. We had a pretty standard Italian coffee at a nearby coffee shop, ate a brioche and went back towards San Berillo.

Taormina and Aci Trezza

The weather proved to be better than expected, so we took the car one day for a trip to Taormina, which was top of the go-to list. Once there, we parked and went into town, and again, even though the place was undenyingly beautiful, it felt that that it was not as great as we had hoped. Maybe the fact that we went there in November did not help either, and many places and restaurants were closed. We did find the Ancient Theatre open, and it was a great sight to see the Etna from this impressive monument built by the ancient Greeks. The weather was sunny and we were lucky to see the wonderful volcano in the distance very clearly. And it was incredible, I could've stared at it forever. The trip was totally worth it, even though we could not find much to do in the town itself.

Taormina BuildingAci Trezza
taormina buildingaci trezza

Consequently, we went back in the car and drove towards Catania, only to stop on the way in Aci Trezza, a small town on the beach. We went for a walk on the waterfront, enjoyed the town'n port and took pictures of the Cyclops. Unfortunately, apart from this, there was nothing else to do, so we turned back and drove all the way to Catania airport.

Wrapping up

I'm going back to Sicily for sure, and will try to visit Palermo and the surroundings next time, maybe even Syracuse, given its rich ancient history. I did like the trip, for sure, although it was not my favorite out of 2023. Maybe the Palermo option will be different, let's see, there's only one way to find out.

My 2023 in Review

· 11 min read

silviu hiking in the baiului mountains View over the Baiului Mountains.

I've learned to do the Corpse Reviver #2 and the Paloma.

I plan to write each of my year in review articles at the end of December. This one lands at the end of February, so things are not really going as planned so far. To be honest, during the whole year I felt that I've pushed many deadlines, and at times it felt quite overwhelming, but, looking back, my 2023 was not as bad as I thought it would be. Motivation was low throughout the year, sure, but consistency did help quite a lot, and I'm thankful for the habits that helped me decisively.

Goals for 2023

In my 2022 year in review, I set a list of goals for myself, and I am curious how many did I manage to accomplish. Let's start this article with a disappointment, shall we?

  • update Downshift to v8

    Actually, we're at v8.3.1 and, even though we still have some important things to fix, we are React 18 compatible, we support fully the ARIA 1.2 pattern, we have TS type support for the getter props (a long time coming) and overall API improvements. Actually, I'm not very mad with the current of the library.

  • finish Marcy's course and 2 more Frontend Masters web development courses.

    The biggest fail for 2023 was in fact the learning aspect. I did not finish Marcy's course, I still have a lot to go, and, obviously, the Frontend Masters courses were out of reach.

  • read at least 10 books, starting with Don Quixote.

    I fell short of the number 10, but not by far, and the books I've read were actually quite impressive. More on that later.

  • improve to 3 times per week gym schedule.

    Done. Big win. Not that big gains, but still fine.

  • attend at least one dancing congress.

    I am going to my first salsa congress in Brasov at the end of January, so let's consider it done.

  • visit the south of Spain and New York.

    2023 main achievement was travelling, and yes, I did check Spain and New York, among many others. More on that, later.

  • revive the Tab Order Testing library I worked at in Adobe.

    I reviewed the current state of the art in Microsoft and decided that the library is not going to be useful anymore.

Overall, not half bad. Yes, motivation was not my gratest 2023 asset, but it wasn't motivation that helped me achieve my initial 2023 plans, or the things I achieved on top of them. It was consistency, it was habit. Motivation comes and goes. Habit is there once it's built. I heard about it in most motivational content, and 2023 helped me actually understand why it is so valuable.

Coding Stuff

I've enjoyed quite a successful year at Microsoft, and so far I'm quite happy with the projects I'm contributing to. Microsoft Teams is a very used product, and even though it does have its reputation, it's packed with features and it became better through the years, and I'm happy to contribute to that effort. My favorite part was the March hackathon when I successfully presented my project to the leadership, which got very favorable reviews and we might even see it one day fully implemented in Teams. Super excited about that.

Apart from my normal job, I also continued to code for open source, and updated Downshift to include React 18 and ARIA 1.2 pattern support, among many other fixes. What I'm also proud about is that I continued to write on this blog, and not just tech related articles, but also from my trips, and everything is coming along nicely. Oh, and I also achieved something quite big in the work department, but, at least for now, it's classified.

Hobbies

Quite a few updates here as well. I've started to go 3 times a week to the gym, and it feels so good. I've also resumed basketball once per week and also running, even though it became mostly a once per week event as well. Overall, I'm quite satisfied with my current active shape, and I look forward too keeping it. I only wish that I've been more times on hiking trails, as 2023 was not my best, so I hope to improve the hiking frequency in 2024.

A big change for me was giving up bachata classes, but, on the flip side, I continued my salsa classes, and I'm having a blast. I'm super happy at my current dance school and I feel that I'm improving. To top it off, I went to my first salsa congress in Brasov in January 2024 and, even though I dislike staying awake at night, doing only that while not doing anything else during the day is, let's say, manageable. The congress itself was super fun, I feel like going again next year.

Algarve Beach HikingGuns 'N Roses Concert
selfie over a beach in algarve while hikingguns &#39;n roses concert view from the stage

Another event worth mentioning for me was the Guns 'N Roses concert from July at the Arena Nationala. I was lucky to receive tickets for the concert and wow, what a show. It was an incredible experience, and a top notch performance from the band. I won't forget it anythime soon. Even though the sound from their microphones was annoyingly cut out many times, the event was unlike anything else.

Oh, and did I mention that my banana bread is probably the best in the world? I perfected my technique quite a bit. Also, I added the lemon and like cakes to my portfolio, so the coffee shop does not sound like a bad idea at all. Oh, and cocktails! I've learned to do the Corpse Reviver #2 and the Paloma.

Books

I aimed to read at least 10 books during 2023, and I fell short of that number, but not by far. Here's my list:

  1. Don Quixote, Miguel de Cervantes. I had so much fun reading this, even though it was quite a long book. It wasn't only fun, but a great insight into human nature, idealism, and reality versus imagination. The other stories inside the book are fun as well, especially the one with the husband that used his friend to check on his wife's loyalty.
  2. The Little Prince, Antoine Saint-Exupery. This tiny book is a great opener into subjects such as human relationships, love and innocence.
  3. Augustus, Adrian Goldsworthy. I'm a sucker for ancient history and I've previously read Caesar from the same author. Augustus did not disappoint, as it tells the story of Octavian, with his early blunders and not so many achievements, as he took advantage of his situation in the context of the late Roman Republic and became the de facto ruler of the Roman world.
  4. Lord of the Flies, William Golding. As with 1984, it reminds us of what human nature really is when left unchecked.
  5. Myth of Sysyphus, Albert Camus. I'll be honest, I got nothing here.
  6. Invisible Man, Ralph Ellison. I've enjoyed this one quite a lot, as the narrator grappled with racism, injustice and political manipulation as he endlessly searches for his personal identity.
  7. The Richest Man in Babylon, George S. Clason. It was a very useful read to refresh my own ideas related to wealth and budgeting.
  8. Jane Eyre, Charlotte Brontë. A very refreshing book, as it goes beyond the love story into feminism, the search for identity and social justice.

So, not really 10 books, but not very far off. My favorite was probably Jane Eyre, given the main character's complex journey and the very deep insight of her thoughts. The Invisible Man was not very far off.

Travelling

If there was a personal highlight of 2023, travelling would have been that one. I love travelling, but 2023 was on a whole different level for me, and, to be honest, it felt really good. I enjoy spending both a few days in a different place, as well as a full 2 week vacation far from home. It helps me clear my thoughts, re-energise and even become more creative within my daily work. I only wish 2024 to be quite similar in this regard. Here it goes, the list of all the places I've been to:

  • Prague, January. It "happened" for me to be in Prague for Microsoft's Winter Party. What a coincidence.
  • Perugia, March. One of those random destinations you pick because plane tickets are cheap, and it proved to be a very good idea. The biking along the Lago Trasimeno was the highlight, for sure.
  • New York & Seattle, April. Best vacation for a while, maybe the best ever. I now have a new favorite city and can't wait to go back there. Seattle is also great, given its laid back atmosphere, greenery and nearby hiking spots.
  • Oslo, April. Another random destination, can't wait to go back to Norway for a more hiking & nature oriented experience. Oslo was quite nice as well, and it has great museums too.
  • Prague, June. Business trip with a little bit of fun. The biking trip to Karlstejn was, well, quite something.
  • Malta, August. It was so hot, but everything else was great. Can't wait to go back to the island, it's full of fun stuff to do. Need to book that Katamaran experience in advance, though.
  • Naples & the Amalfi Coast, September. Naples is a great city to visit, as it has a quite strong personality. Also, the beauty of the Amalfi Coast is unrivaled. Can't wait to go back there again, as Capri and Amalfi are next on the list.
  • Prague, October. Yeah, it's my favorite place to visit. This time there was no hardcode bike trip, just coffee, food and walks. And I finally went to visit the Prague Castle.
  • Lisbon & Algarve, November. The other long 2 week trip, and what a trip it was. Everything was perfect, I hiked on the sea shore, I climbed on top of castles, I rested on the beach surrounded by dramatic cliffs. I also missed Web Summit this year, but really, whatever. I made the most out of it. Oh, and that entrecote, oh my.
  • Catania, November. Maybe my hopes for this one were quite high, and it was maybe a bit disappointing, but I would still return to Sicily, maybe in the spring is better.
  • Malaga, December. I'm going to return to the south of Spain, for sure. This place is marvellous, the weather is incredible, the people are smiling, and I loved it.
Central Park Selfie
selfie in central park with horia

11 trips in total. Not bad. I want more. More is better.

Goals for 2024

Let's see.

  • Finish the A11y course and do 2 more courses on Frontend Masters. Same as last year, but I'll actually do it.
  • Read at least 10 books. Again, same as last year.
  • Go on a trip to Asia. Anything really, Japan, China, Thailand. All three. I don't care, but I want to go there.
  • Bump Downshift to v9. We do have in plan some API changes, apart from the fixes we want to implement.
  • Cook 3 new recipes.
  • Hike at least 6 times. Once every couple of months. Should not be too difficult.
  • Make a big move. It has been quite some time since I did not do anything radical, ever since I came back from Prague in 2020. I feel that it's time I changed something dramatically about myself.
  • Start doing yoga.