MoreRSS

site iconThe Practical DeveloperModify

A constructive and inclusive social network for software developers.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of The Practical Developer

Unified Search in Control Panel – Navigate Instantly Across Services & Docs | Hostman

2025-06-23 20:15:21

Unified Search Now Available in Hostman’s Control Panel

We're excited to introduce a unified search bar that takes you directly to your service or documentation in seconds, enabling you to streamline your workflows.

unified search bar

We are evolving our UI to reduce friction and keep developers in their flow. With our latest update, Hostman delivers a similarly streamlined experience — now, you have global search directly in your panel.

Here’s how it works

  1. Open your Control Panel and press ⌘/Ctrl + K, or click the search field.
  2. Type anything — e.g., your server name, database label, or IP address (e.g., “db‑prod‑1” or “192.168.10.5”).
  3. Instantly get a unified list:
  • matching services (with configurations),
  • network info (e.g., IPs),
  • and relevant docs (like "Manage Load Balancer").

Refine results using the Tab key — toggle between Services and Documentation. Use the arrow keys to navigate through results, and hit Enter to open.

Why this matters

It keeps you focused — no need to remember navigation paths or hunt for docs.
Mobile-ready UI — pick and jump, even on your phone.
Filters and shortcuts are simple and efficient.

Explore the search feature in your Control Panel — we’d love to hear how this fits into your routine.

Introducing @ts-migrating: The Best Way To Upgrade Your TSConfig

2025-06-23 20:13:34

🚀 TypeScript is evolving fast, and your tsconfig should keep up. But upgrading TypeScript settings like strict, noUncheckedIndexedAccess, or erasableSyntaxOnly often means dealing with hundreds of type errors across your codebase.

That’s why I built @ts-migrating, a plugin and CLI tool that helps you progressively upgrade your tsconfig.json without breaking your codebase or your team's velocity.

😩 The Pain of Upgrading tsconfig

When you switch on a stricter compiler option, you immediately see a flood of new type errors. It is overwhelming. Realistically, your team does not have the time to fix everything in one go, and trying to do so is a recipe for burnout and regressions.

So what do people do?

They either:

  • Delay the upgrade indefinitely
  • Use @ts-ignore or @ts-expect-error as a blanket patch

But both approaches are flawed. You either never improve your codebase, or you sweep problems under the rug, sometimes even hiding unrelated bugs.

🧠 A Better Way: @ts-migrating

@ts-migrating lets you enable your desired compiler options now, while allowing problematic lines to fall back to the old config. It is TypeScript migration reimagined:

  • Show type errors introduced by the new config
  • Patch only the lines that are not ready using // @ts-migrating
  • Gradually fix those lines and remove the fallbacks over time

This plugin is designed to be incremental and safe. In fact, that is why it is called @ts-migrating, emphasising the ongoing process, not a one off migration.

Unlike @ts-ignore, which silences all errors on a line and can mask unrelated problems, @ts-migrating targets only those errors introduced by the new compilerOptions. This makes the intent of the directive clear, and keeps the rest of the line type safe.

🔌 How It Works

To install, simply run:

npm install -D ts-migrating

There are two parts to the tool:

1. Language Service Plugin

Add this to your tsconfig.json and your IDE will:

  • Show new errors introduced by the upgraded options
  • Allow you to silence specific lines with // @ts-migrating
{
  "compilerOptions": {
    "plugins": [
      {
        "name": "ts-migrating",
        "compilerOptions": {
          "noUncheckedIndexedAccess": true
        }
      }
    ]
  }
}

This plugin only affects IDEs and development. It has no impact on tsc or production builds.

2. CLI Tooling

There are 2 main commands for the standalone CLI.

Type check with the plugin

Since ts plugins have no effect on tsc, you can instead use the following in your terminal / CI.

npx ts-migrating check

This runs tsc with the plugin and reports all errors introduced by your new config.

Annotate your errors

npx ts-migrating annotate

This will insert // @ts-migrating above every new error line. Be careful. Run with a clean git state and review the changes.

🧪 Real Example: noUncheckedIndexedAccess

Here is a simple function:

function first(xs: number[]): number {
  return xs[0]; // error when `noUncheckedIndexedAccess: true`
}

With @ts-migrating, we can temporarily allow this line to fall back:

function first(xs: number[]): number {
  // @ts-migrating
  return xs[0]; // error disappear as this line now fall back to `noUncheckedIndexedAccess: false`
}

✅ Why You Should Use It

  • Avoid big bang migrations
  • Prevent new violations from sneaking in
  • Let your team upgrade progressively
  • No build time impact
  • Clean, intentional code comments

🌟 Ready to Migrate?

ts-migrating helps you modernise your TypeScript setup without turning your codebase into a war zone.

You can find the project here:
👉 github.com/ycmjason/ts-migrating

If you like the idea, give the repo a star, try it in your project, and let me know how it goes.

And if you would like to support this work, consider becoming a GitHub Sponsor. Every bit helps.

Let us make tsconfig upgrades easy again.

Supercharge LLMs with LangChain(Part-1)

2025-06-23 19:45:33

Part 1: Getting Started with ChatGPT, Claude, Gemini & LangChain

Series Overview: This is the first post in a hands-on series where we’ll explore how to use powerful LLMs like ChatGPT, Claude, and Gemini with LangChain to build real-world AI applications.

Catch up on the Series

In this part, we’ll set the foundation and build our first LangChain-powered app using Gemini LLM model.

Why LangChain?

Large Language Models (LLMs) like OpenAI’s ChatGPT, Anthropic’s Claude, and Google’s Gemini are revolutionizing the way we interact with software. But building production-grade tools with LLMs means combining them with APIs, memory, search tools, databases, and more.

This is where LangChain shines.

LangChain is a framework that simplifies the process of building modular, data-aware, and agentic applications powered by LLMs.

What You’ll Learn in Part 1

  • What LangChain is and how it works
  • Which LLMs are supported
  • A working example using Gemini Model
  • How to switch models (e.g., Claude or ChatGPT)

Supported LLMs in LangChain

LangChain supports a wide range of LLMs out of the box:

  • OpenAI (ChatGPT, GPT-4, GPT-4o)
  • Anthropic (Claude 3 family)
  • Google (Gemini)
  • Others: Mistral, Cohere, Hugging Face, Ollama, and more

Installation & Setup

Make sure you’re using Python 3.8+.

Install LangChain and OpenAI

pip install langchain openai

Optional: Add Claude or Gemini support

pip install anthropic google-generativeai

Add your API keys securely using environment variables:

export OPENAI_API_KEY="your-openai-key"
export ANTHROPIC_API_KEY="your-anthropic-key"
export GOOGLE_API_KEY="your-google-key"

Now we are ready to use LLM models.

Using Google Gemini with LangChain

LangChain makes it easy to integrate Google’s Gemini models into your Python applications. Here’s a minimal example using the gemini-2.0-flash model to answer a simple question.

    from langchain_google_genai import ChatGoogleGenerativeAI  
    import os  

    llm = ChatGoogleGenerativeAI(  
      model='gemini-2.0-flash',   
      google_api_key=os.getenv("GOOGLE_API_KEY")  
    )  

    result = llm.invoke('What is the capital of India?')  
    print(result)

This snippet does the following:

  • It imports the Gemini wrapper from LangChain’s langchain_google_genai package.
  • Initializes the ChatGoogleGenerativeAI model with your API key and selected Gemini model (gemini-2.0-flash).
  • Sends a simple prompt to the model using .invoke() and prints the response.

Output:

The capital of India is New Delhi.

You can easily swap out the prompt or model to fit your use case. LangChain abstracts away the API call complexity, so you can focus on building logic and workflows.

Switching Between Models

Switching between models is very easy in LangChain just few lines need to change, and don’t need to change anything in app logic.

Want to use Claude or ChatGPT instead of Gemini? You only need to change one line.

▶️ Use Claude (Anthropic)

from langchain.chat_models import ChatAnthropic  

llm = ChatAnthropic(model="claude-3-sonnet-20240229", temperature=0.7)

▶️ Use OpenAI (ChatGPT)

from langchain.chat_models import ChatOpenAI  
llm = ChatOpenAI(model="gpt-4", temperature=0.7)

This is the way you can use LLM models with LangChain framework.

In next part we will see LLMs Embedding Models. How we can generate vectors for any given sentence and what is Embeddings and vectors.

Day 7 of Building Ultimate Gamified Notion Developer's Hub

2025-06-23 19:41:29

Hey Dev Community!

What an exciting day! After a focused period of building, the core structure of the Notion Developer's Hub template has finally been completed! It's a huge milestone in this #BuildInPublic journey, and the feeling of seeing the vision come to life is incredibly rewarding.

Today was all about making major tweaks and refinements across the template. A lot of effort went into ensuring the interconnectedness of databases and the initial logic flows smoothly. It's truly amazing to see how the project management, code snippet organization, bug tracking, and personal growth sections are now integrated.

What's Next? Preparing for Launch!
While the core build is done, there are a few crucial steps remaining to get this template ready for you:

Tomorrow's Focus: The plan for tomorrow is to meticulously double-check all automations to ensure they fire correctly and save valuable time. Also, a thorough cleaning of the databases will be performed to optimize performance and ensure a fresh start for users. Finally, adjusting the views will be key to making the information as accessible and actionable as possible.

Dashboards & Badges: Still contemplating the addition of dedicated dashboards and potentially some gamified elements like badges to enhance the user experience and motivation. This is a possibility that will be explored.

Theming - "The Pixel Forge": Once the functionality is locked down, the template will begin to be incorporated into "The Pixel Forge" theme. This means a custom aesthetic designed to appeal to developers, bringing a cohesive and appealing visual identity to the hub.

Join the Waitlist!
The anticipation is building, and if you're keen to get early access or be notified when the Notion Developer's Hub is ready, you can join the waitlist now!

Click here to join

Your feedback throughout this process has been invaluable, and the journey continues. Stay tuned for more updates as the template moves closer to release!

My friend quit after a performance review. Here's why.

2025-06-23 19:40:38

About a year ago, a dev friend of mine landed a job at a well-known product company.

He was crushing it: delivering on time, writing solid tests, picking up weekend hotfixes — even showing up to standups with a fever.

Then came the performance review.

His manager told him:
“You’re doing well, but you’re not Senior yet. You lack confidence and initiative.”

It hit hard. Especially after months of 60+ hour weeks and constant firefighting.

A month later, he quit.

He joined another company.
Three weeks in — they gave him the Senior Software Engineer title.

Now here’s the question:

💬 Who was right — the first company that didn’t see a senior, or the second that saw one immediately?

Is "seniority" something objective — or just a matter of perception?

Curious to hear your thoughts 👇

Do you need to be a 'rockstar' to get promoted?

2025-06-23 19:38:56

Some engineers work quietly and deliver solid results.
Others present, network, and promote their work.

🧠 Who gets promoted faster — the loud one or the smart one?

Is “just doing your job well” enough to grow your career as a dev?