Posts

Learn more about our updated Terms of Service

Image
gayan.blog@gmail.com  Every couple of years, we update our Terms of Service . We wanted to let you know ahead of time that the next update will be on July 30, 2026 . ...

my 4-Step strategy for the modern Job hunting

 I recently caught up with a former colleague of mine. Let’s call him Sama(no no , it's not real Sama)  a few weeks ago, Sama found himself on the wrong side of a "restructure." 😓😢 Between the rapid adoption of AI and a shift toward offshoring for cost-cutting, his role was made redundant. it’s a story I’m hearing more often lately.  We sat down to look at his next move. job market has changed, and the old way of "Update CV -> Hit Apply -> Wait" is no longer a winning formula. do companies even hire for real? Using AI as our research partner, we built a proactive framework to get him back in the game. I call it the Cold, Hot, Long, Short strategy. if you’re feeling the pressure of a tightening market, here is how we broke it down: 1. Cold Step (The Proactive Reach) Most people wait for a LinkedIn/Seek notification. by then, you’re competing with 500 other applicants. The Move: We used AI to identify companies that just raised funding or expanded their ...

My current readings

API Security Newsletter: weekly digest that tracks vulnerabilities in REST/GraphQL and the emerging "OWASP Top 10 for LLMs."   Unsupervised Learning (Daniel Miessler): he bridges the gap between security and AI better than anyone. i feel it is essential for understanding the security implications of agentic AI.   Also to keep up with the workflow shift from IDEs to autonomous agents, i follow AI Native Dev Newsletter

Flyway in Spring Boot and Gradle: flyway-core vs Flyway Gradle Plugin

 Have you ever wondered about the best way to integrate Flyway into your Gradle project? Let me break it down into two main approaches: using Flyway as a dependency and applying the Flyway plugin . The Dependency Approach: implementation 'org.flywaydb:flyway-core' Adding Flyway as a dependency essentially embeds it within your application. Think of it as equipping your application with a built-in toolbox to handle database changes during runtime. This approach is ideal when you want your application to take charge of migrations. When to Use It Your application needs to manage database changes while it’s running. You’re working with a Spring Boot application that integrates seamlessly with Flyway. Key Features Spring Boot Auto-Configuration: Spring Boot automatically detects the Flyway dependency and configures it. You can custo...

"BACKABLE" - book by Suneel Gupta

Image
  "Backable" by Suneel Gupta explores how to inspire belief in your ideas, combining storytelling, resilience, and practical strategies to succeed. While I recommend you to read it here are some Concepts from Backable I found interesting: The Backable Mindset : The book highlights the importance of adopting a mindset that attracts support. Gupta discusses how successful people who are often seen as "backable" tend to approach challenges, communicate their vision, and create momentum. Below is an extract from first chapter he talks about how we should convince ourselves first with an idea before even sharing it with others: " When an idea first enters your mind, it's not fully formed, and certainly not prepared to interact with the real world. But because we're excited about the possibility, we make the mistake of inviting people in when the idea isn't ready. Every time I'm fired up about a new idea, I feel an impulse to share it immediately. But...

Use of Sidecars to Microservice Communication

 Recently I attended Analysis Design Architcture conference (https://adaconf.org/) where listened to talk named "Future Proof Software Architecture: Microservices". That reminded me my experience of using sidecars as part of a microservice architecture in one of my previous projects( Australian Bank). So I decided to write down some of the key points and insights that came out of that experience.  firstly, let's start with understanding why we might want to move beyond traditional API gateways. API gateways traditionally handle everything from TLS termination to authentication, authorisation, and traffic routing. They're like the swiss army knife of API management - doing lots of things in one place. But here's the problem - as our microservices architectures grow more complex, having all these responsibilities in a central gateway becomes a bottleneck. So let's see what are sidecars - think of them as your microservice's personal assistant. Instead of rou...

Understanding LLMs in Simple Terms

 Everyone talks about ChatGPT and revolution of GenAI. Ever wondered what powers the chatbot you use or how your favourite AI assistant seems to know just the right thing to say? It’s all thanks to LLM s , or Large Language Models. Let me break it down in plain English and make it easy to grasp. Key things to know about LLMs: Think of them like super-smart text predictors! (imagine writing "Hello, how are..." and it knows to complete with "you"... but way more advanced!) They work like a magical book predictor (they read MILLIONS of books, articles, websites... if you read non-stop, it would take 2600+ years to read what GPT-3 learned from!) Don't expect them to be human-like!!! (they're like a chef who memorised recipes but never tasted food) Cool Metaphors that helped me understand: The Library Detective Has read EVERY book in existence Can find info super fast Connects different facts together (like having the world's smartest librarian at yo...

My Takeaways from 'Why We Sleep' book

Image
I recently got a recommendation to read Matthew Walker's "Why We Sleep: Unlocking the Power of Sleep and Dreams" by a colleague, and I borrowed it from the local library and read. It is a great book and it is the very very interesting book I’ve read this year. It’s completely changed the way I think about sleep and shifted it much higher on my priority list. So I couldn't stop talking about it with my friends > few of them asked me to share some things I learned, so I'm writing below points for anyone to refer. I strongly recommend you to read it.     Key Learnings: What About Memory? Sleep isn't just for rest – it's like a superhero for memory. It helps lock in new stuff you've learnt so you don't forget it the next day. What About Learning? Sleep makes you a learning machine. Rather fascinating how your brain soaks up new skills and knowledge like a proper sponge. What's REM Sleep For? Those wild dreams during REM sleep a...

Principles and Tactics for Working with Language Models (like ChatGPT)

Image
Recently I went through https://learn.deeplearning.ai/, and below is my notes I optimised using chatGPT API :) Introduction: Language models like ChatGPT have become increasingly powerful and versatile tools for various applications. To maximize their effectiveness, it's crucial to understand and implement certain principles and tactics. In this blog post, we will explore the key strategies for working with language models to achieve better results. We will also discuss their limitations and offer best practices for prompting, as well as explore exciting use cases and applications. Principle 1: Clear and Specific Instructions When interacting with a language model, clarity is paramount. To obtain accurate and relevant results, follow these guidelines: Provide longer prompts: Detailed prompts offer better context and understanding to the model. Use delimiters: Separate different sections of input...

Mocking with Spring

Hi folks, Been diving deep into Spring Testing lately, and today I'm sharing my learnings about mocking in Spring. I've noticed many developers struggle with this, so let's break it down in a simple way. What is Mocking? Mocking is our way of creating objects that simulate the behaviour of real objects during testing. Rather brilliant, eh? When testing complex systems, we don't want to call actual databases or external services - that's where mocking comes in handy. A typical Spring test setup with mocking involves two main components: Mockito - the brilliant mocking framework that Spring plays nicely with Spring Test context - Spring's testing support that lets us write integration tests Terminology: What is @Mock? @Mock creates a mock implementation for the interfaces or classes. It's like having a stunt double for you...

My learnings from remote work for 2 years

As I reflect on two years of remote work, I had many challenges and turned out it gave me many perks too. Here are the key takeaways that have shaped my perspective: Building Strong Connections: Remote work demands a deliberate effort in making one-on-one relationships. in absence of casual office interactions, I always tries to have casual chats(Slack/MSteams) with my team members Strategic Meeting Approach: We had team members from different time zones, so we had to move some of our meetings to times to suit everyone - like we had our daily standup in 2.30 PM in my local time Clear and Concise Communication: Mastering the art of concise written communication is paramount. “Communicate well, communicate often” - is a saying my CEO repeats a lot which helped me to over communicate. Over-communication becomes a guiding principle in remote work. Providing comprehensive updates, regular check-ins, and seeking clarifications foster collaboration a...

Learn more about GPT or AI

Hey everyone! Have you been hearing the whispers? The buzz? About something called "AI" or "GPT"? If you haven't, you need to pay attention, because it feels like something really, really big is happening right now with computers and writing. Just a few months ago, in late 2019, folks were talking about a new kind of computer program called "GPT-2". And wow, what it can do is kinda mind-blowing! I was reading some super cool blogs and articles, and they were all showing off how this GPT-2 could *write*! Like, real sentences, real paragraphs. It wasn't perfect, but it was so much better than anything we've seen before. One blog I saw, from Bitvore, showed how it could make up news stories. Can you imagine a computer writing news? Another amazing one was "The Illustrated GPT-2" by Jay Alammar. He showed pictures to help explain how this "Transformer" brain works. It made me feel like I could almost unde...

Deploying Spring Boot application to Google Cloud App Engine

Image
If you have worked with AWS and GCP, you should have understood that AWS' Elastic Beanstalk and Google's App Engine(GAE) enable deploying our applications without the need to understand how to build or scale the underlying infrastructure. Their promise is great, and for most use cases as there are no servers to maintain. We simply upload our applications and they are ready to go. If everything works as promised Beanstalk or the Google App engine will take care of scaling, load balancing, traffic splitting, logging, versioning, roll out and roll backs, and security scanning etc. Pretty simple , ah? Today I am going to share simple steps to deploy your first Spring boot (with Java and Maven)  application to  Google Cloud App Engine. So let's create s simple create a Spring Boot Java API on Google App Engine. I asume you have set up Google Cloud SDK in your local. (https://cloud.google.com/sdk/gcloud). Alternatively you can use Cloud Shell. $ gcloud auth list $ ...

com.google.appengine vs com.google.cloud.tools appengine-maven-plugin

I was working on a Spring boot application which I needed to deploy in Google Cloud Appengine, in the same time one of my colleague made a pull request for a similar code. Then I noticed that we two have used 2 different Maven plugins from Google appengine with same artifactId. they are: <plugin> <groupId> com.google.appengine</groupId> <artifactId> appengine-maven-plugin</artifactId> <version> 1.9.64</version> </plugin> and <plugin> <groupId> com.google.cloud.tools</groupId> <artifactId> appengine-maven-plugin</artifactId> <version> 1.3.2</version> </plugin> at the time of writing followings are the 2 articles I could find in Googledocs for 2 plugins  https://cloud.google.com/appengine/docs/standard/java/tools/maven  https://cloud.google.com/appengine/docs/standard/java/tools/using-maven  So as the name suggests they are "App Engine SDK-based" and "...

My Docker learning short notes

I had this note from long time in my Evernotes, I thought I should have post it here, so someone might find it useful. This is just Docker basics and commonly used commands that I've collected over time. Why Docker? Docker enables containerization - running applications in containers instead of virtual machines. Important notes: Containers are not VMs - they have different benefits Provides standardization across environments Enables continuous deployment from development to production Ensures consistency using the same container image throughout the deployment process Key Benefits: Self-contained environments Isolated from other applications Runs almost everywhere (especially in the Cloud) Small and lightweight Highly scalable Fast deployment Core Concepts Images An image is an executable package containing everything needed to run an application: ...

Learnings - Kong API Gateway

Image
 Hi folks, Many days I was playing with Kong in Docker, quick scaffolding for anyone interest to play with it. This summarises my basic learnings. What is Kong? Kong is an API gateway. Some of the popular features deployed through Kong include authentication, security, traffic control, serverless, analytics & monitoring, request/response transformations and logging. A typical Kong setup is made of two main components: 1)Kong’s server, based on the widely adopted NGINX HTTP server 2)Kong’s datastore, Apache Cassandra and PostgreSQL can be used. Terminology: What are Kong plugins? Kong API gateway features are provided by plugins. Authentication, rate-limiting, transformation, logging etc, are all implemented independently as plugins. Plugins can be installed and configured via the Admin API running alongside Kong. What is a Kong Service? a Service is the name Kong uses to refer to the upstream APIs and microservices it manages. What is a Route? Routes specify...

Mockito to execute or not a method

This is well known thing if you are using Mockito to mock your services. But I wanted to note it here.  Imagine you have a method call inside method you are writing the unit test (or eg:-getPayment() ) that should not be called when your test is executed.  That may be the first reason why you mocked it in the first place.  In below code, I want to mock getPayment() method without executing it. option A:     Mockito.when(subject.getPayment()).thenReturn(paymentDetail); option B:     Mockito.doReturn(paymentDetail).when(subject).getPayment(); If you tested both, option A will actually call the getPayment()- method while the second will not. Both will cause doSomeStuff() to return the desired `paymentDetail` Object. Hope this helps someone new ith Mockito!

December 2016

OMG, guys we have left few days only for 2016, isn't it? what a year for Sri Lankan cricket! we made history by completely trouncing Australia in a 3-0 whitewash in the Test series. First time ever – absolutely brilliant! We lost a true icon in SL music when the beloved Dr. Pandith W.D. Amaradeva passed away. His contributions to Sri Lankan music will never be forgotten. My Big Move to Oz 🇦🇺 Talk about a life-changing year! I landed in Australia and scored a job with Telstra – the country's top telco. Not a bad way to start a new chapter, eh? Tech Highlights  Some serious tech game-changers this year: Amazon dropped the Echo, their voice-activated speaker that's basically a robot assistant in your living room iPhone 7 launched with some seriously impressive new features What a year! Can't wait to see what 2017 brings.

IBM IIB

I just give you brief description on how we can enable basic authentications to secure access to HTTP and SOAP public endpoints that are running in our IIB on Cloud integrations. These endpoints are HTTPInput and SOAPInput message flow nodes. If basic authentication is enabled for an integration, HTTP requests to any HTTP or SOAP nodes in that integration require the correct URL, a user name, and a password. So, if basic authentication is disabled for an integration, HTTP requests can access any of your HTTP or SOAP nodes in that integration by using only the correct URL, and do not require a user name or password. Basic authentication settings are associated with an integration and apply to all HTTP and SOAP nodes in that integration. For integrations for which we have enabled basic authentication, the user name that is required to access HTTP and SOAP nodes is fixed to IIB and a corresponding password is generated automatically. In the Integration Details view, you can view the...

My Learning Angular as a Backend Engineer - first time

Recently I wanted to try hot new framework called AngularJS. As someone who's spent years writing backend APIs, I thought - hey, maybe it's time to see whateveryone is talking about (in Frontend)  So I decided to write down some key points and insights from my experience of learnig into AngularJS. Coming from a backend world where everything is neat code and database queries, my first reaction was like "Whoo, what's all this DOM manipulation stuff?!" Before AngularJS, I had used some jQuery and writing tons of JavaScript to update few webpages. But then AngularJS comes along and changes everything we did. Some cool things I found while learning: Two-way data binding is amaaazing! Just add ng-model to an input and boom - my JavaScript object updates automatically. No more manual DOM updates! When I first saw this working I was like "why didn't we have this before?!" Directives are pretty neat. At first they looked sca...