惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
B
Blog RSS Feed
H
Help Net Security
Blog — PlanetScale
Blog — PlanetScale
Vercel News
Vercel News
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
L
LangChain Blog
IT之家
IT之家
F
Fortinet All Blogs
V
V2EX
C
Check Point Blog
The Cloudflare Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Never stop learning
Karen Payne · 2026-05-03 · via DEV Community

Introduction

It’s a wonderful time to be a developer with rich tools, documentation, and artificial intelligence. Still, at least for now and the foreseeable future, developers must learn to write code, as artificial intelligence tools are not perfect and may produce code that is difficult to integrate into an existing code base.

For developers just starting out, they need to learn the basics, then OOP and database work.

For experienced developers, the next step is to hone their skills to get and keep a full-time job. For instance, C# .NET Core has a new feature; take time to learn it, even if there is no immediate use for it. Another path is to check out questions in developer forums, analyze all aspects of a question, and what can be learned or avoided.

The following applies to developers using Microsoft Visual Studio, C#, and .NET 8 or higher.

Visual Studio solution for learning

Create a Visual Studio solution for learning and use solution folders to categorize topics.

When code appears useful across multiple projects, place it in a class project (note the folder for class projects in the screenshot below).

Sample solution

Starter learning ideas

Request for a login for a console project

First, check out the following thread in its entirety, which is what AI might form a response from. Now let's explore a better way using Spectre.Console NuGet package.

Spectre.Console TextPrompt prompts users to enter text input with validation, default values, and secret input masking.

  • Will be used to ensure a non-empty string is returned
  • The password text is masked
  • Both username and password use the same colors
  • Has sufficient validation for testing purposes, hard-coded

Sample login

using Spectre.Console;
using SpectreLoginSample.Classes.Core;

namespace SpectreLoginSample.Classes;
internal class Prompts
{
    public static string PromptStyleColor { get; set; } = "cyan";
    public static string PromptColor { get; set; } = "bold";

    public static bool TryLogin(int maxAttempts = 3)
    {
        for (int attempt = 1; attempt <= maxAttempts; attempt++)
        {
            var username = GetUserName(allowEmpty: false);
            var password = GetPassword();

            if (ValidateCredentials(username, password))
            {
                AnsiConsole.MarkupLine("[green]Login successful[/]");
                return true;
            }

            /*================================================================
             * The text displays remaining attempts which is optional.
             * Showing remaining attempts can be a helpful for testing.
             ================================================================*/

            if (attempt < maxAttempts)
            {
                AnsiConsole.MarkupLine($"[red]Invalid credentials[/] - Attempts remaining: {maxAttempts - attempt} press [bold]ENTER[/] to retry");
                SpectreConsoleHelpers.ContinuePrompt();
            }
            else
            {
                AnsiConsole.MarkupLine("[red]Maximum attempts reached. Access denied.[/] press [bold]ENTER[/] to exit");
                SpectreConsoleHelpers.ContinuePrompt();
            }


        }

        return false;
    }

    public static bool ValidateCredentials(string username, string password)
    {
        return username == "admin" && password == "password";
    }

     public static string GetUserName(bool allowEmpty)
    {
        return allowEmpty
            ? AnsiConsole.Prompt(
                new TextPrompt<string>($"[{PromptColor}]User name[/]")
                    .PromptStyle(PromptStyleColor)
                    .AllowEmpty())
            : AnsiConsole.Prompt(
                new TextPrompt<string>($"[{PromptColor}]User name[/]:")
                    .PromptStyle(PromptStyleColor));
    }


    public static string GetPassword() =>
        AnsiConsole.Prompt(
            new TextPrompt<string>($"[{PromptColor}]Password[/]:")
                .PromptStyle("grey50")
                .Secret()
                .DefaultValueStyle(new Style(Color.Aqua)));
}

Enter fullscreen mode Exit fullscreen mode

Source code

This is considered a good learning experience, as once the login code is finished, there is more to explore in this library. Where this library is good for: dotnet tools and console project utilities.

File Globbing to the rescue

File globbing is a topic every developer needs to learn. A glob is a term used to define patterns for matching file and directory names based on wildcards. Globbing is the act of defining one or more glob patterns and yielding files from either inclusive or exclusive matches.

Imagine a developer uses OneDrive for backups, and once the backup completes, all files are removed from the local drive. So the developer reverts the backup and learns that some files have copies. Rather than manually deleting the copies (in this case, 5,000+ copies), after learning about file globbing, the developer can write code to remove them in a simple console project.

Code to create a list of copies.

💡 AddExcludePatterns excludes folders that may need special permissions to read.

public static async Task<List<FileMatchItem>> GetDuplicatesTask(string parentFolder )
{
    List<FileMatchItem> list = [];
    Matcher matcher = new();
    matcher.AddIncludePatterns([
        "**/* - Copy .*", 
        "**/* - Copy (*.*"
    ]);
    matcher.AddExcludePatterns([
        "**/My Music/**",
        "**/My Pictures/**",
        "**/My Videos/**"
    ]);

    await Task.Run(() =>
    {
        foreach (string file in matcher.GetResultsInFullPath(parentFolder))
        {
            list.Add(new FileMatchItem(file));
        }
    });

    await File.WriteAllLinesAsync($"Duplicates.txt", 
        list.Select(item => item.ToString()));

    return list;
}

Enter fullscreen mode Exit fullscreen mode

Code to remove files

public static async Task ProcessOneDriveDuplicates()
{
    var folder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
    var list = await Globbing.GetDuplicatesTask(folder);

    if (list.Count >0)
    {
        AnsiConsole.MarkupLine($"[bold green]Found {list.Count} duplicate files.[/]");

    }else
    {
        AnsiConsole.MarkupLine($"[bold green]No duplicate files found in {folder}.[/]");
        return;
    }

    foreach (var (index, item) in list.Index())
    {
        try
        {
            if (File.Exists(item.FullName))
            {
                File.Delete(item.FullName);
            }
            else
            {
                AnsiConsole.MarkupLine($"[yellow bold]{item.FullName}[/]");
            }
        }
        catch (Exception e)
        {
            AnsiConsole.MarkupLine($"[red bold]Failed to delete " +
                                    $"{index} {item.FullName}[/]");
        }
    }


}

Enter fullscreen mode Exit fullscreen mode

Source code

Summary

No matter if a developer vibes codes, uses artificial intelligence for what they get stuck on or doesn’t use AI try and learn something new at least once a week. Karen tries to learn something new several times a week.