Blog

Blogging on programming and life in general.

  • Published on
    -
    4 min read

    Is AI Coding The False Messiah?

    I recently started using Claude Code for my development work, and I have to admit, it is without a doubt the most powerful AI coding assistant I have ever tried. It sets an entirely new precedent for what agentic AI can achieve. The sheer competence of it caught me off-guard. You give it a prompt whilst connecting it to your project, and it effortlessly navigates through all the files you give it access to and spits out its logic in seconds.

    Witnessing the steadfastness of completing tasks that would normally take hours to be resolved in a matter of minutes leaves you constantly wanting more, pulling you into a different mindset where you realise that truly anything is now possible.

    This exact power has triggered a profound doubt. When AI can handle the intricate architecture and the tedious implementation with little to no thought required on my part, the following question emerges: What use is there for me as a developer?

    It reminds me of a scene from the very first episode of the popular 80s classic, Knight Rider. During one of his initial exchanges with Devon Miles after test-driving KITT, Michael shares his unease over the car's terrifying level of autonomy:

    Michael: Oh, great. You mean it can decide to take off and go for gas, or a car wash. Just like that? Well, that would be terrific if I happened to be working under it.
    Devon: It wouldn't do anything to harm you, I assure you.

    Like Michael, we are sitting behind the wheel of a machine that seems fully capable of driving itself. AI might not "harm" us in the physical sense, but if we aren't careful, letting it take over entirely can quietly crush the craft we have worked on for years.

    For the past couple of years, the developer world has been swept up in the era of vibecoding — the practice of letting Large Language Models (LLMs) do the heavy lifting while we sit back and play the role of high-level orchestrators. But as tools like Claude Code, Gemini and Copilot continue to push the boundaries of autonomy, I've come to a quiet realisation: AI is actively eroding our ability to code for ourselves.

    Getting High On AI

    The constant influx of new capabilities is not just exhausting to keep up with; it slowly chips away at the parts of the job we genuinely love. When the machine does all the thinking, we stop being developers and become prompt-aholics. Writing a story to get the perfect output becomes our only real skill, leaving the underlying code as a black box we no longer care to understand.

    I am concerned at the potential loss of the muscle memory we have acquired over the years where we have been able to patiently read through class libraries, trace logic through multiple files, and meticulously debug a stubborn issue. Like a drug-addict on crack cocaine waiting for the next hit, we are trading our skill of problem-solving for a quick hit of instantly generated code.

    Delusions of Grandeur

    AI coding agents are remarkably good at writing units of code that look perfect in isolation. If you need a specific algorithm or a standard component, AI will provide a clean, consistent snippet that perfectly matches your prompt. But here is the danger: LLMs are the ultimate yes-men. They will rarely push back and tell you that the feature you are building is fundamentally flawed, or that the architecture you are releasing is absolute rubbish.

    This creates a dangerous divide. An already experienced developer can look at the generated code, question its validity, and make an informed judgement call on whether it is genuinely acceptable for the production environment. They have the hard-earned scars to know when a shortcut will result in technical debt.

    Conversely, novice developers or non-technical managers wielding these tools can quickly fall victim to delusions of grandeur. Just because they can suddenly spin up a functioning web app or a complex API in an afternoon, they begin to believe they possess senior-level engineering prowess. However, software engineering is not just about stringing together functioning isolated components; it's about cohesive architecture, long-term maintainability, and understanding how a change in one area of an application effects the entire system.

    When you blindly stitch together AI-generated code for months on end without that seasoned oversight, the results aren't going to be pretty. To quote a fellow developer I know, it becomes "AI slop". You eventually wake up to a codebase filled with inefficiencies, repetitive patterns, and short-sighted design choices. AI was consistent with the immediate prompt, but it failed entirely to maintain the long-term context of the project's evolution.

    Conclusion

    So, what is the solution? It certainly isn't a total retreat back to the analogue days of manual coding. The precedent Claude Code has set proves that AI is far too valuable a tool to discard. The answer lies in finding a fine balance.

    We must stop treating AI as an outsourced developer that writes our code from start to finish, and start treating it as a brilliant, if occasionally short-sighted, peer reviewer. When AI offers a solution, we shouldn't just hit "accept" and move on. We need to dissect it. We must judge if its suggestion truly fits the broader architecture, learn from the new techniques it introduces, and actively verify its logic.

    This approach keeps you engaged in the "why" and "how" of the code rather than just the "what". AI cannot be allowed to act as a substitute for human reasoning. It is there to assist, not to take the steering wheel completely.

    We are the engineers; AI is the co-pilot. By finding this balance, we maintain was is required to actually learn and grow, ensuring we build software that stands the test of time without losing the joy of the craft itself.

  • Published on
    -
    3 min read

    5 Years of Investing

    I can still remember the very first stock I invested in. It was the Vanguard S&P 500 Accumulating index fund (VUAG), led by some other random and very bad stock picks. In fact, it has been 5 years to the day. How time flies!

    If I could tell my novice investor self to do just one thing, that would be to start my investment journey by sticking to a single index fund and not act foolhardy in the quest to try and make a load of money by picking individual stocks.

    It's quite easy to have a false sense of confidence investing in a passive fund, like the S&P 500 (where you aren't doing anything complicated), when you see you're in the green making a profit. The human condition is wired to always want more. We're never happy with what we have and convince ourselves that we could accelerate growth by picking overhyped assets just because everyone else seems to be getting rich quickly. The moment we step outside the safety of a simple fund to chase bigger returns, we end up fighting our own psychology.

    Instead of trying to figure out how to get rich quickly, focus on how to avoid losing money. Warren Buffett's two famous rules of investing are: 1) Don't lose money, and 2) Don't forget rule number one.

    Trying to pick individual winning companies is incredibly difficult, and the odds are stacked against the average investor unless you really do your due diligence and ask the right questions.

    The Bessembinder Study looked at 26,000 companies between 1926 and 2016, where researcher Hendrik Bessembinder found that just over 4% (about 1,000 companies) delivered all of the stock market's returns. It is much simpler to own the racetrack, like an index fund, instead of trying to pick the winning horse.

    Even though I started out investing in the S&P 500 that solely tracks top American companies, you might want to consider a global index that embraces both developing and emerging markets. Thanks to rising US tariffs and protectionist trade policies, the rest of the world is actively reducing its reliance on America, making global investing incredibly timely. Today, around 85% of global trade flows through alternative channels, and the US's share of world trade has hit its lowest point since 2014.

    You may think having a single index is quite boring. A boring portfolio can end up being the most fruitful one! If I take my wife's investment portfolio, which I manage, it simply consists of three funds, and year-to-date she has already made around a 4.8% return. This might not sound like much, but when you consider the S&P 500 returns 8-10% annually, she is already hitting half those returns and we're only 2 months into this year.

    Interestingly, a Fidelity study from 2013 looked at which investors had the best-performing portfolios over a decade. The top performers had one thing in common: they were dead. They couldn't tinker, panic, or second-guess themselves. A "nice" morbid fact to put your investment mindset into perspective.

    Even though my portfolio is bigger in monetary and position terms, it hasn't reached the heights my wife's has this year so far, as I am more bullish on specific sectors and companies from looking at the financials. I may not be making much of a return at this moment in time, but if everything goes to plan, the returns should outpace my wife's. I enjoy the investing process and looking for potential. In whatever decisions I make, in the back of my mind I always remember what Eugene Fama famously said:

    Money is like soap. The more you handle it, the less you'll have.

    So, I am always treading carefully by doing my due diligence and investing with conviction!

    The overarching lesson I've learnt is that complexity is not a prerequisite for success. If you are just starting out, do yourself a massive favour and begin with the absolute basics. Investing regularly into a single, globally diversified index fund, regardless of whether the market is up or down, is more than enough to get the compounding snowball rolling while you learn the ropes.

    You can always expand your horizons later, branching into individual stocks or specific sectors only once you have built a solid foundation of knowledge and genuinely enjoy the process of analysing the financials. Until then, there is absolutely no shame in keeping things boring. In fact, for the vast majority of people, a simple, hands-off approach isn't just fine—it is the optimal strategy for building long-term wealth. Start simple, stay consistent, and let the market do the heavy lifting.

  • An image doesn't just consist of pixels. It is a container full of additional information and structural inefficiencies hidden from the naked eye. When you capture a photo with a smartphone or a professional DSLR, the resulting file is almost always significantly larger than it needs to be for the web.

    This "image bloat" generally falls into two categories: Informational and Structural.

    • Informational: EXIF (Exchangeable Image File Format) data is metadata stored within the image header that includes GPS coordinates, camera serial numbers, and date-time stamps. While useful for photographers, this data adds unnecessary kilobytes to every upload and can even pose a privacy risk.
    • Structural: This is mainly down to resolution overkill, where modern cameras capture images at 12MP or higher - perfect for a billboard print, but massive for a website. But other reasons could be due to Sensor Noise where the digital sensor captures random variations in colour that the human eye can't distinguish, but the file's compression algorithm works overtime to preserve.

    The Hidden Cost of Raw Uploads

    When it comes to the process of uploading images online, we are often causing unnecessary strain on the end-user's connection as well as our own servers. By forcing a browser to transmit raw, unoptimised files, we create a high probability of failure through multiple, redundant requests.

    Every time a user on a unstable connection attempts to push a 10MB high-resolution photo, they are essentially gambling with the connection's stability. If that connection blips at 95%, the request fails, and the server is left with garbage data it can't use. The user is forced to start the entire process over again. This cycle doesn't just waste bandwidth; it inflates server CPU usage as it struggles to manage timed-out threads and increases the physical storage costs for data that the user never actually intended to be so large.

    Real-World Scenario

    I encountered this exact bottleneck while developing a valuation form. In this scenario, users were required to upload multiple high-quality photos of their assets for appraisal. On paper, this sounds simple. However, in the real world, users aren't always sitting on high-speed fibre-optic broadband. They are often out in the field, where the connection could be unstable.

    What was required is the ability for the image to be compressed on the users device before the upload process even starts. I found a JavaScript library that was worth a try: browser-image-compression.

    How The Client-Side Compression Works

    This library works by leveraging the browser's internal Canvas API and Web Workers to perform a digital reconstruction of the image. When a file is processed, it is drawn onto an invisible canvas at a set resolution, which instantly strips away all bloat like EXIF metadata and GPS coordinates. Then re-encodes the pixels using lossy compression algorithms to discard high-frequency noise.

    This entire magical process happens on a background thread (Web Worker), the image is crunched down to a fraction of its original size without freezing the user interface, ensuring the new lean file is ready for a faster upload.

    Results

    The difference in upload performance was night and day. Images that were originally 8–10MB were now being compressed to approximately 900KB. It is worth noting that the compression could have been even more aggressive; however, we capped the maximum size at 1MB, as we felt that was the perfect "sweet spot" for maintaining high visual quality in this scenario.

    By hitting that 900KB mark, we effectively reduced the data transfer requirements by 90%!

    Demo

    To see these performance gains in action, I have put together a live demo where you can upload your own high-resolution photos and see the real-time reduction in "image bloat" without any loss in visual quality.

    Browser Image Compression - Demo

    Conclusion

    Implementing client-side compression isn't just a nice-to-have feature. It is a fundamental shift in how we handle user data and server resources. By moving the processing to the user's device, we achieve three major wins:

    • Reliability: Small files don't just upload faster; they succeed more often. By reducing an 8MB file to 900KB, you remove the timeout risk that plagues users on unstable connections.
    • Privacy by Default: Because the library reconstructs the image on a canvas, sensitive EXIF data and GPS coordinates are stripped before they ever reach your cloud storage. This reduces your liability and protects your users.
    • Infrastructure Savings: The backend no longer needs to spend expensive CPU cycles stripping metadata or resizing massive blobs. You save on bandwidth, processing power, and long-term storage costs.
  • In my previous post discussing my foray into the world of AI, I mentioned working on a personal project called "Stockmantics". But what exactly is Stockmantics, and why did I decide to build it?

    Stockmantics started because I needed a project where I could apply my AI knowledge to a real-world problem. In the end, I didn't have to look further than my own hobbies.

    Aside from coding, I’ve become heavily invested (pun intended) in the stock market. It all started shortly after COVID, when there was so much buzz online about people putting money into companies and index funds. Seeing the returns made by those who invested at the right time (during the lockdown of March 2020) opened my eyes to a potential new income stream. I didn't want to miss out on the fun, so I decided to learn the ropes of an area I knew nothing about. I just didn't expect it to turn into a full-time hobby.

    However, unlike most hobbies, I considered this one fraught with danger; one must err on the side of caution. After all, real money is at stake, and acting foolhardy or investing incorrectly can lead to significant losses.

    The Requirement

    When I became more confident in my investment strategy and the type of trader I wanted to be, I found one aspect consistently time-consuming: finding an easy-to-read daily digest in one place. I was tired of hopping from website to website or subscribing to endless newsletters just to get a clear picture.

    So, with the help of AI, I decided to build a tool that would do this for me, and Stockmantics was born. My requirements were as follows:

    • Market Snapshot: A quick look at key indices (S&P 500, FTSE 100, NASDAQ, Commodities, etc.).
    • Daily Summary: A single, concise sentence summarising what happened that day.
    • Global News: Key events from the USA, Europe, and Asia.
    • Crypto Updates: High-level developments in cryptocurrency, focusing on the majors.
    • Investor Action: A conclusion based on the day's news, suggesting what an investor should look out for.
    • Smart Glossary: Tooltipped definitions for stock market, investment, and economic terms to assist novice investors (and provide a constant refresher for myself).
    • Social-Media Integration: Automatic posting to X, highlighting key stories from the day's article.

    My philosophy for this personal project is simple: if it assists my own needs, that is a big win in itself. If someone else finds my method of digesting the day's financial news useful, that will be the icing on the cake. I decided early on that the success of Stockmantics would not be measured by visitor numbers or X followers, but by what I learnt during the development process and whether it truly works for me.

    Application Architecture

    The application architecture is based on the following Microsoft technologies:

    ASP.NET Core Razor Pages

    The website is a relatively small and simple application that consisted of the following pages:

    1. Homepage
    2. Article Listing
    3. Article
    4. Generic Content (for About/Terms/Disclaimer pages)

    A CMS wasn't needed as all content and data would be served from Azure Storage Tables. All there is from a content-management perspective is an authenticated "Article Management" area, where content generated by Gemini could be overridden when required.

    Azure Storage Tables

    I actively decided to use Azure Storage Tables over an SQL database to store all of the Stockmantics data as there was no relational element between each table. It also provided a lower cost alternative and quicker route to development.

    List of tables:

    • Article
    • MarketSnapshot
    • SocialShare
    • StockmarketGlossary
    • AppSetting

    Azure Blob

    For images that may be used in article content.

    Azure Functions

    All the grunt work getting the data is done by Timer Triggered Azure Functions that would fire shortly after the US Markets open (around midday GMT) in order to get the most up-to-date goings on in the market.

    A breakdown of the Azure Functions are as follows:

    • Generate News Article - queries stock market API's and news feeds to send to the Gemini API to construct an article tailored to my requirements. It is then stored in the Article table with related attributes and additional meta data suited to be served in a webpage.
    • Generate Social Posts - extracts 10 key facts from the generated news article to be transformed into tweets. The days generated tweets are stored until pushed to social media platforms.
    • Market Snapshot - uses the Yahoo Finance API to return the market price and percentage change for the core market indices. These values are then passed to the Gemini APIs "Grounding with Google Search" to provide sentiment and the reasons behind the change in price.
    • Post To X - publishes a tweet every 15 minutes.
    • Post To Bluesky - publishes a post every 15 minutes.

    The Chosen AI Engine

    It was always going to be a choice between Google Gemini and OpenAI. I was already familiar with both LLMs (Large Language Models), having casually thrown stock market queries at them—among other things—long before this project was even a glint in my eye. Ultimately, my decision hinged on two key factors:

    1. API: The ease of use and the reliability of the endpoints in returning structured data.
    2. Cost Factor: Being unfamiliar with the specific pricing structures of LLMs, I needed to estimate the cost per API call and project my monthly expenditure based on token usage. The OpenAI GPT API Pricing Calculator provided an excellent breakdown of costs across all major AI providers.

    I concluded that Google Gemini was the best fit for Stockmantics, primarily because the model I intended to use (gemini-2.5-flash) offered the most competitive pricing. The cost for one million input and output tokens works out to approximately $0.37, compared to OpenAI's $2.00.

    Furthermore, I felt that Gemini held a slight edge over OpenAI. They might have been late to the AI party, but they have certainly made up for lost time with impressive speed. It also had a card up its sleeve that I only discovered during development: Grounding with Google Search. This feature allows the model to access real-time information from the web, ensuring that the data returned is current rather than limited to a training cut-off date.

    Misjudging the Machine: Data is King!

    I initially was under the impression that I could simply ask the likes of OpenAI or Gemini to collate the day's stock market news, which I could then format to my liking. However, this proved to be a mistake. When dealing with fast-moving financial news, I found the results hit-and-miss. The models would frequently return information that was out of date or cite entirely incorrect market prices (even when using Grounding with Google Search).

    At this point, I realised I needed to take a step back and reassess my approach. It became clear that without a reliable, accurate data feed, this application would be of no use to man nor beast.

    The solution had to start with raw data, which the LLM could then use as its base to expand upon. For this, I found pulling financial data available through the likes of Yahoo Finance feeds to be invaluable, amongst other finance-related news feeds.

    Lengthy Vetting Period

    The transition from a proof-of-concept to the final version of Stockmantics required a lengthy vetting period, which continued weeks after releasing to live. The raw output from the LLM was rarely perfect on the first try, leading to a many iteratation of refinement. My focus was on four key areas:

    • Structure & Flow: Tweaking the system instructions to ensure the output was digestible, preventing the model from generating dense, unreadable paragraphs.
    • Sector Balance: Ensuring the article provided a holistic view of the market, rather than fixating solely on volatile tech stocks or the "Magnificent Seven".
    • Glossary Precision: Fine-tuning the tooltips to provide definitions that were accessible to novices without losing technical accuracy.
    • Geopolitical Neutrality: Ensuring that reports on world affairs, which often drive market sentiment were delivered with an objective and balanced tone.

    What I learnt from this process is that while anyone can write a basic AI prompt, getting the granular nuances right takes a significant amount of time. It is less about coding and more about the art of communication; you have to learn how to speak the model's language to get the consistent, high-quality output you need. Even now, I find myself still making ongoing tweaks for further improvement.

    If you compare the very first article published against one the more recent, I am hoping a vast difference will be noticed.

    Breakdown of Costs

    One of my main priorities was to keep the running costs on this project tight and I think things ended up being quite good on value. Here is a monthly breakdown:

    1. Website and Domain: £6.25
    2. Azure Services (Functions/Blob Storage/Tables): £1.10
    3. Google Gemini API: £4.00

    So we're looking at around £11.35 in total monthly costs. Not bad. Google Gemini costs will be the only item that I expect to fluctute based on the varied number of tokens utilised for each daily article.

    NOTE: Google Gemini and Azure services are only used weekdays for when the stock markets are open. So the costs are based on a 5 day week.

    Conclusion

    I am unsure what the long-term future holds for Stockmantics. Its lifespan ultimately depends on ongoing costs, maintenance effort, and whether I continue to find it useful for my own needs. However, for now, it serves a valuable purpose beyond just financial news: I have a robust, live application that acts as the perfect test bed for experimenting with new AI features and expanding my technical skillset.

    Fortunately, thanks to various architectural decisions and efficiency improvements, the running costs are currently sustainable, and the site itself is very low maintenance—touch wood! I foresee that further development will only be required if the external APIs change. I have already paid for a years worth of web hosting until October 2026 and will reassess things closer to that date.

    If you got this far, thank you for taking the time to read through the development process. If you are interested in seeing the final result, you can find all the links to Stockmantics below:

  • Published on
    -
    2 min read

    Learning from Algorithms Instead of People

    What happens when we remove the human from a fact or a piece of information? Does it change how we perceive it? This thought came to mind when I was questioning if community-based sites, such as Stackoverflow are still relevant and made an open-ended remark that Generative AI has now starved us of knowing the person behind the knowledge.

    Historically, we accept knowledge through some form of testimony. We will only believe in something based on what a person has told us. We evaluate their character, their knowledge and most importantly, their honesty. With AI, there is no "person" to trust. You cannot evaluate the AI's moral character or life experience because it has none.

    To demonstrate this point, let's take the following statement about the US economy:

    The stock market is the highest it's ever been. We have the greatest economy in the history of our country.

    If you heard this from Donald Trump (the above statement has been said multiple times by him), you would likely question it immediately. We are familiar with his rhetorical style in how he often bends the truth or prioritises hyperbole over precision. Our scepticism is triggered by the source.

    However, if you asked a financial analyst, you would get a more nuanced response:

    While the market did hit record numbers (which happens naturally due to inflation), the rate of growth was not actually the 'greatest in history'. At the three-year mark, the market was up roughly 45% under Trump, compared to 53% under Obama and 57% under Clinton.

    When we remove the human source, we lose this critical context. By stripping away the "who", we put the accuracy of the "what" in jeopardy. AI operates by taking the insights that required years of research and lived experience, strips them of their author, and repackages them only to regurgitate them with its own bias for our instant consumption. I rarely see the likes of ChatGPT or Gemini offer true attribution to the human behind the data for our own vetting.

    I am far too aware of this from my own experience in building one of my own projects with AI focusing on the stock market and economy, where the data can be subjective and context-dependent. An example of this is when trying to provide the reasoning behind changes in key indices and commodities. The reasoning behind a change in value often hides a dozen competing narratives. When I built my application, I realised that if the AI chooses one narrative over another without telling me why or who championed it, it isn't just summarising the truth; it is effectively editing it.

    Now, I don't want this post to come across negative towards AI, as it would pretty hypocritical after my glowing take on how I use the technology detailed in my previous post, it has just made me more conscious that even though knowledge it presents doesn't necessarily lack meaning, but it might lack soul. We get the answer, but we miss the human condition that made the answer necessary in the first place.

    We have to acknowledge that AI is an incredible tool for gathering information, but it should be the starting point, not the finish. Use it to broaden your search, but go to people to deepen your understanding.

  • The title of this post isn't just a great line from Inception; it's a directive. Eames telling Arthur to expand their constructed reality beyond mere imitation and take bigger risks has been replaying in the back of my mind lately. It felt like the only appropriate way to break the radio silence after such a long hiatus and offer a glimpse into my current mindset. While I haven't been navigating multiple levels of a subconscious dream state, this past year has been about breaking free from self-imposed limitations. I've been pushing beyond my day-to-day coding endeavors to invest time into the very thing dominating our headlines: Artificial Intelligence!

    It is a technology moving at such breakneck speed that you can't just dip a toe in; you have to dive in headfirst and swim, trusting that you'll emerge on the other side a wiser man. Failing to observe the shift in an industry like mine, in my view, is career suicide. With platforms and services releasing their own form of AI tools—some I deem more successful than others—I needed to find my own way in. As programmers, we can no longer afford the luxury of being so tunnel-visioned, clinging rigidly to our area of expertise while the landscape changes around us.

    The thought of getting any footing into the world of AI filled me with dread. This could be down to setting the bar of expectation too high. I knew I was never going to be the type of person to build some deep learning AI engine from scratch, as you really need the "street smarts" of an AI Engineer to do that. Instead, learning to use AI tools and frameworks already readily available would give me the step up I needed, such as Machine Learning and APIs provided by ChatGPT and Gemini.

    The Journey To Discovery

    My journey began not with complex neural networks, but with the fundamentals of machine learning (via ML.NET). It was a learning curve, requiring me to rethink how I approached problem-solving. But as the concepts started to click, the potential for a specific use case suddenly became undeniable. I started small, experimenting with a simple concept that could be of tangible value, where I could predict future pricing of used cars based on historical data and their individual attributes.

    Not too far along from this, I started working on my very own side-project in another area I am very passionate about: stocks and trading. I developed a website called Stockmantics that would take in the day's stock and trading news to produce daily digest in a format that was beneficial to me. My own one-stop shop for the day's trading news, without having to read many different newsletters as I had done previously. I used AI as a way to assist in my own needs that could also help others. It's a beast of a project that I am incredibly proud of, and I plan to do a write-up on it next year. But for now, suffice it to say that it taught me more about the practical pipelines of AI than any tutorial ever could.

    One of the final AI projects I worked on at the tail end of the year was a proof-of-concept that revolved around vision search. I wanted to see if I could build a system capable of scanning a client's database to find visually similar items based on nothing but an uploaded image, with the ability to detect what the image consisted of. The addition of metadata attribution working alongside the image search resulted in accurate results that surpassed my own expectations.

    If Asimov had his Three Laws to govern the behaviour of robots, I had my three specific applications, each being a critical stepping stone that would shape my understanding as to where I could integrate AI and the future possibilities—endless? Rather than just being the end user, I was building something of my own creation. I was able to see AI through a different perspective, which resulted in a newfound appreciation. It ended up being a really rewarding experience that has been far from what I am normally used to developing, and this is just the start.

    Final Thoughts

    I've come to view AI not as a competitor, or a full human replacement, but as a tireless, low-cost assistant ready to help take the smallest seed of an idea and grow it into a tangible reality, at a speed I never thought possible. It bridges the gap between theory and fruition, allowing me to truly dream a little bigger.

  • I've been using the gatsby-plugin-smoothscroll plugin in the majority of GatsbyJS builds to provide a nice smooth scrolling effect to a HTML element on a page. Unfortunately, it lacked the capability of providing an offset scroll to position, which is useful when a site has a fixed header or navigation.

    I decided to take the gatsby-plugin-smoothscroll plugin and simplify it so that it would not require a dependency on polyfilled smooth scrolling as this is native to most modern browsers. The plugin just contains a helper function that can be added to any onClick event with or without an offset parameter.

    Usage

    The plugin contains a smoothScrollTo helper function that can be imported onto the page:

    // This could be in your `pages/index.js` file.
    
    import smoothScrollTo from "gatsby-plugin-smoothscroll-offset";
    

    The smoothScrollTo function can then be used within an onClick event handler:

    <!-- Without offset -->
    <button onClick={() => smoothScrollTo("#some-id")}>My link without offset</button>
    
    <!-- With offset of 80px -->
    <button onClick={() => smoothScrollTo("#some-id", 80)}>My link with offset</button>
    

    Demo

    A demonstration of the plugin in use can be found by navigating to my Blog Archive page and clicking on any of the category links.

    Prior to this plugin, the category list header would be covered by the sticky navigation.

    Smooth Scrolling without Offset

    Now that an offset of 80px can be set, the category list header is now visible.

    Smooth Scrolling with Offset

    Links

  • I woke up yesterday morning to a serendipitous discovery that all my stock positions had successfully been transferred from Freetrade to Trading 212. There really is nothing more rewarding than seeing all investments under one stockbroker with a nice five-figure number staring back at you.

    Since I started investing in stocks at the start of 2022, the only stock broker app that was available to me was Freetrade and it made my introduction to making investments into hand-picked stocks very straight-forward. But as my portfolio grew, so did my requirements and when Trading 212 opened its doors to new sign-ups (after being on a very long waiting list), I decided to see if the grass was truly greener on the other side... and it was.

    Trading 212 had what Freetrade didn't:

    • An active community of like-minded users commenting on their views and insights against each stock.
    • 5.2% (as of today 5.17%) interest on held cash.
    • Introduction of a Cash ISA.
    • Ability to view stock graphs in detailed view with the ability to annotate specific trendlines.
    • Free use of the use of a Stocks and Shares ISA.
    • Lower FX rates.
    • Fractional shares on ETFs.

    Unfortunately for Freetrade, I just couldn't see a future where they could provide the features I needed in addition to free use of the service. I was being charged £60 per year for the privilege of a Stocks and Shares ISA - free on Trading 212.

    Even though I explored Trading 212 when it became available last year, I made a decision to only start investing at the start of the 2024 tax year to avoid any ISA-related tax implications by utilising two Stocks and Shares (S&S) ISAs. This is now a void issue as you are able to invest in two different S&S ISAs as long as you do not exceed the yearly £20k limit.

    Planning The Move

    I am currently seven months into using Trading 212 for investing but it was only until October I felt I was in a position to transfer all my stock holding from Freetrade. Why such a long wait?

    The wait was primarily due to not really understanding the correct route to transferring my portfolio without eating into my current years tax free allocation, whilst retaining the average stock price per holding. I also had concerns over the large sum of money to transfer and it's something that shouldn't be taken lightly.

    I am hoping this post will provide some clarity through my experience in transferring my portfolio to Trading 212, even if it is tailored more towards what I experienced in moving away from Freetrade.

    In-Specie Transfer

    In-specie wasn't a term I was familiar with prior to researching how I could move my stock portfolio to another platform.

    'In specie' is a Latin term meaning 'in the actual form'. Transferring an asset 'in specie' means to transfer the ownership of that asset from one person/company/entity to another person/company/entity in its current form, that is without the need to convert the asset to cash.

    Before in-specie transfers, the only way to move from one stock broker to another was to sell all your holdings as cash to then reinvest again within the new brokerage. The main disadvantages of doing this is:

    • Time out of the market creating more risk to price fluctuations.
    • Potential loss due to the difference between the sell and buy prices.
    • Additional brokerage fees when repurchasing the same assets with a new provider.
    • Loss of tax efficiency if you have a large portfolio that might wipe out or exceed the yearly tax-free allocation.
    • Missed dividend payouts.
    • Taking losses on selling stocks that haven't made a profit.

    I've noticed over the last couple of years in-specie transfers have become more universally supported amongst the smaller stock brokers (the ones you and I are more likely to use) such as Freetrade, Trading 212 and InvestEngine, which makes moving from one platform to another a much simpler process.

    Even though the process has become simpler, it is still a time-consuming process as transfer completion can take anywhere between 4-6 weeks based on the coordination between both stock platforms.

    My In-Specie Transfer Timeline

    My own in-specie transfer had taken a little longer than I hoped - around six weeks with the key milestones dated below.

    12/10/24

    Initiated the transfer process in Trading 212 by selecting the stocks I wanted to transfer. You can select specific stocks or your whole portfolio. I based my transfer on selecting all my holdings and specifying the average stock price as I want to retain my position.

    23/10/24

    Freetrade emailed to confirm a transfer request has been received and to confirm that my portfolio is in order to allow the process to move smoothly, which entailed:

    • Adding £17 fee per each US holding in my account.
    • Rounding up any fractional shares. - Shares in their fractional state cannot be transferred. For one of my stock holdings, I decided to purchase slightly more and round up the total value rather than sell down as this stock in particular is in the negative.

    12/11/24

    Three weeks had passed and I hadn't heard anything from either party. I contacted Trading 212 support to report a delay in transfer and if any reason could be provided for this. I didn't get a reply, but the next day, things started ticking along. Maybe this gave them the 'kick' they needed?

    13/11/24

    Trading 212 completed arrangements with Freetrade and they were now in a position to start the actual transfer that will be over the course of a two week period.

    21/11/24

    I woke up to find all stocks had been transferred whilst maintaining my average stock price. There is still one minor job awaiting completion: transfer of a small amount of cash. The most important job had been done and I could now rest easy.

    Next steps

    Once the small amount of cash has been transferred, I plan on cancelling my yearly Freetrade Standard plan expiring in June 2025. By the time the transfer has been completed, I will have an outstanding 6 months left on my subscription that I can get refunded (minus a £5 admin fee).

  • When developing custom forms in Umbraco using ASP.NET Core’s Tag Helpers and DataAnnotations, I noticed that display names and validation messages weren’t being rendered for any of the fields.

    [Required(ErrorMessage = "The 'First Name' field is required.")]
    [Display(Name = "First Name")]
    public string? FirstName { get; set; }
    
    [Required(ErrorMessage = "The 'Last Name' field is required.")]
    [Display(Name = "Last Name")]
    public string? LastName { get; set; }
    
    [Required(ErrorMessage = "The 'Email Address' field is required.")]
    [Display(Name = "Email Address")]
    public string? EmailAddress { get; set; }
    
    

    This was quite an odd issue that (if I'm honest!) took me quite some time to resolve as I followed my usual approach to building forms — an approach I’ve used many times in Umbraco without any issues. The only difference in this instance was that I was using an Umbraco form wrapper.

    @using (Html.BeginUmbracoForm<ContactFormController>("Submit"))
    {
        <fieldset>
            <!-- Form fields here -->
        </fieldset>
    }
    

    I must have been sitting under a rock as I have never come across this from the years working in Umbraco. It could be down to the fact that the forms I have developed in the past didn't rely so heavily on .NET's DataAnnotation attributes.

    The only solution available to remedy this problem was to install a Nuget package (currently in beta) that has kindly been created by Dryfort.com, which resolves the display name and validation attributes for in-form rendering.

    The Nuget package works in Umbraco 10 onwards. I've personally used it in version 13 without any problem. Until there is an official Umbraco fix, this does the job nicely and highly recommended if you encounter similar issues.

  • As someone who specializes in integrations, I’m hardly ever surprised when I come across yet another CRM platform I’ve never heard of. It feels like there are almost as many CRMs out there as stars in the night sky — okay, maybe that's a bit of an exaggeration, but you get the idea.

    I was introduced to another platform while working on a small integration project: Nexudus. Nexudus is a comprehensive system designed specifically for managing coworking spaces, shared workspaces and flexible offices, whilst incorporating the features you’d expect from a customer relationship management platform.

    For one part of this integration, newsletter subscribers needed to be stored in Nexudus through a statically-generated site built on Astro, hosted in Netlify. The only way to pass subscriber data to Nexudus is through their API platform, which posed an opportunity to build this integration using Netlify serverless functions.

    The Newsletter Subscriber API documentation provides a good starting point for sending through subscriber details and assigning to specific newsletter groups. However, one issue arose during integration whereby the endpoint would error if a user was already subscribed within Nexudus, even if it was a subscription for different group.

    It would seem how Nexudus deals with existing subscribers will require a separate update process, as just using the Add Newsletter API endpoint alone does not take into consideration changes to subscription groups. It would be more straight-forward if the Mailchimp API approach was taken, whereby the same user email address can be assigned to multiple mailing lists through a single API endpoint.

    When developing the Netlify serverless function, I put in additional steps to that will allow existing subscribers to be added to new subscription groups through the following process:

    1. Look up the subscriber by email address.
    2. If a subscriber is not found, a new record is created.
    3. If a subscriber is found, update the existing record by passing through any changed values by the record ID.
    4. For an updated record, the new group ID will need to be sent along with the group ID's the user is already assigned to.

    A Github repository has been created containing the aforementioned functionality that can be found here: nexudus-netlify-functions. I may add other Nexudus API endpoints that I have been working on to this repo going forward.

Support

If you've found anything on this blog useful, you can buy me a coffee. It's certainly not necessary but much appreciated!

Buy Me A Coffee