ALL

  My AI Learning Journey: Exploring the Future of Technology

As someone working in software development, primarily focused on building web products, I’ve always been curious about emerging technologies. The explosion of interest in AI, particularly after the release of ChatGPT, sparked my desire to dive deeper into this fascinating field. Here’s how my journey unfolded.I started with a YouTube video (Wolfram’s explanation) that breaks down how ChatGPT predicts the next word in a sentence (if you don't want to watch the video, you can read the transcript in the article). This introduction was an eye-opener—it revealed just how adv...

  609      1       AI LLM CURSOR WINDSURF


  Power Grid Simulation System 02 : FDI Power Outage Attack Case Study

We are excited to share that the Power Grid Simulation System we developed was used as part of one red team's targeted critical infrastructure system the international cyber exercise Crossed Swords 2024 which conducted in December 2024. In this article, we will introduce one power outage attack case study which use the Power Grid Simulation System as the demo platform for OT cyber security workshop.Project Design Purpose: This case study demonstrates using the Power Grid Simulation System as a target critical infrastructure to showcase the implementation of a False Data Injection (FDI) attack ...

  128      1   


  Be Careful When Using Cursor to Help Build Application

Below are some tips or tricks when building application with Cursor. These lessons are based on my recent experience while building a Sudoku game (just wanna test Cursor's capability).Do commit frequently. Recommend doing commit for every big change (a new feature such as a new button added for some function, some big UI change like added some new component changing the UI layout a bit)Test everything (regression testing) after doing big change. It may affect existing functions when adding new features, you think the change should not impact other parts, but it may not be the case.Using Compos...

  4,671      0       TIPS AI GUIDE CURSOR DRAWBACKS


  Some Thoughts About Microservice Adoption

Nowadays microservice is very popular among companies with the increasing complexity of systems. The goal is to make each microservice to handle one specific job and handle it well. This normally would provide the benefit of maintaining the service easily and isolating errors and making the service more reliable and scalable.The benefits of adopting microservice are obvious.Maintainability. Decouple functions so that each function can be maintained separately which reduces the risk of issue caused by bug in other code which is not related to this function at all. It can be easily maintained by...

  2,573      0       ADVANTAGE DISADVANTAGE MICRO SERVICE


  Calculating Token Count for Claude API Using Go: A Step-by-Step Guide

When working with large language models like Claude from Anthropic, understanding how many tokens your input consumes is essential for managing costs and optimizing performance. In this blog, we’ll explore how to calculate token counts for a given input using Go. We’ll use Anthropic’s count_tokens API endpoint, which provides a straightforward way to determine token usage.PrerequisitesBefore diving in, ensure you have:A working Go environment (installation guide).An Anthropic API key. Set it as an environment variable (ANTHROPIC_API_KEY).Basic knowledge of Go HTTP requests an...

  544      0       EXAMPLE GO GUIDE GOLANG CLAUDE TOKEN CALCULATION


  Understanding Cursor and WindSurf's Code Indexing Logic

Background: The Importance of Context in AI ProgrammingIf the “intelligence” of large models, such as Claude 3.5 Sonnet, is the key factor driving a stepwise leap in AI programming capabilities, the other critical factor is the context length.Currently, Claude 3.5 Sonnet offers a maximum context length of 200k tokens. While this is more than sufficient for conversational models—capable of handling a 50,000 or even 100,000-word book with ease—it still falls far short for programming projects involving tens or hundreds of code files, each spanning hundreds or thousands of...

  5,348      0       COMPARISON CURSOR WINDSURF INDEXING


  Do Not Be Misled by ‘Build an App in 5 Minutes’: In-Depth Practice with Cursor

In August this year, I tried out Cursor and was thoroughly impressed, prompting me to write an introductory article about it. Soon after, I transitioned my daily work environment entirely from GitHub Copilot + JetBrains to the paid version of Cursor. After several months of use, it has felt incredibly smooth.While using it myself, I’ve often recommended Cursor to colleagues and friends. However, many of them still have questions, such as:What advantages does it have over native ChatGPT or Claude? Is Cursor’s power mainly because of Claude Sonnet 3.5?How does it differ from GitHub C...

  18,772      0       ARTIFICIAL INTELLIGENCE GUIDE CURSOR CODE EDITING WINDSURF DISCUSSION


  Gemini Example with Go

To connect and use Gemini with Go, Google's LLM, one can use their official Go SDK for doing this. In this post, we will just show a simple chat example to demonstrate how to make it work with Go.The example is just to ask the model to translate some English to Chinese and get its output. The code actually looks like:var client *genai.Client// geminiOnce.Do(func() {client, err = genai.NewClient(ctx, option.WithAPIKey(string(apiKey)))if err != nil { log.Fatal(err)}model := client.GenerativeModel("gemini-1.5-flash-latest")model.SetTemperature(0.1)resp, err := model.GenerateContent(ctx, genai.Tex...

  951      2       EXAMPLE GO TRANSLATION GOLANG GEMINI