Posts

Showing posts with the label tips

Tips for Using LLMs in Software Development

Background Context is everything when working with LLMs. Here are five practical levers that determine whether your agent session succeeds or wastes a lot of tokens. This article explores the minimum amount of context you need to provide to an LLM in order to perform a given software development task. When answering a user's prompt, an agent harness (like Claude Code or Cursor) can perform additional work such as reading files, exploring trial solutions, and updating existing source code. We want the LLM — together with its harness — to succeed at whatever task we provide, but we need to be thoughtful about the context we give it. Context 1: Project Folder For the LLM to efficiently reach application source code, database schemas, table structures, and markdown documents, it is best to start the agent harness inside the project folder, or just by specifying the project folder for the conversation. The harness will allow the LLM to list directories, search for keywords within the pr...

MySQL Corrupt Tables and How to Avoid it

Once in a while MySQL's tables became corrupted. This post is not interested in repair process (you should see other posts, but the most general advice is to do a REPAIR TABLE table ; ) In my humble opinion, a real life production database must not have any corruption, it must have sufficient failsafe mechanisms to avoid such corruption. Causes of Corruption MyISAM tables could became corrupted by  (refer http://dev.mysql.com/doc/refman/5.1/en/corrupted-myisam-tables.html) : mysqld is being killed in the middle of write unexpected computer shutdown occured hardware failures running an external program (example: myisamchk) while mysqld is running software bug in Mysql/myISAM code Tips to mitigate data corruption Do not use MyISAM for long lasting data. Use InnoDB. InnoDB is less corruption prone than MyISAM.  Use file per table option for InnoDB. Check your disk space and database availability periodically. On one occasion, my mysql data partition is full...