Compare commits

...

4 commits

Author SHA1 Message Date
27424cc7dd feat: Add blog article on programming principles in the AI era
- New article reviewing 'The Principles of Programming' by Isao Ueda
- Covers 101 fundamental principles for year-3 developers
- Discusses applying these principles when working with AI-generated code
- Includes practical example of effective prompting based on programming principles
- Collaboration with Claude Sonnet 4.6 acknowledged in the article

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 20:37:17 +09:00
d149cb6c45 fix(layout): adjust BaseLayout responsive layout
- Adjust spacing and header structure to improve responsive display

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 19:28:50 +09:00
1647dbf300 Add .agent-shell/ to .gitignore
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 19:17:51 +09:00
04fdb63b18 Merge pull request 'Implement date-based blog post naming convention and add new content' (#12) from develop into main
Reviewed-on: #12
2026-02-16 12:53:47 +00:00
4 changed files with 66 additions and 6 deletions

1
.gitignore vendored
View file

@ -30,3 +30,4 @@ pnpm-debug.log*
# jetbrains setting folder # jetbrains setting folder
.idea/ .idea/
.agent-shell/

View file

@ -0,0 +1,46 @@
---
title: 'Returning to Programming Principles in the Age of AI'
pubDate: 2026-02-23
author: 'Nakahara Daisuke'
tags: ["Book", "programming"]
---
In this article, I will organize and reflect on the key insights from ["The Principles of Programming: 101 Timeless Principles Every Developer Should Master by Year 3"](https://www.shuwasystem.co.jp/book/9784798046143.html) by Isao Ueda.
As I approach my third year as a developer in April, and with the growing responsibility of reviewing code generated by AI models, I felt it was the right time to revisit and deepen my understanding of fundamental programming principles. This book proved to be an excellent resource for that purpose.
In this review, I will organize my findings from three perspectives: "principles the author emphasized as important," "areas I need to be careful about," and "new knowledge I gained," while introducing some key points from each category.
## Principles the Author Emphasized as Important
- The most critical aspect is making code readable with the understanding that change is inevitable.
## Areas I Need to Be Careful About
- Never write code simply because you want to use a newly learned technology. Code is not a place to demonstrate your intelligence.
- Keep code to only what is necessary right now. Prioritize simplicity over generality.
- Minimize output messages to only the most important information. Messages like "Application is starting" or "Application is terminating" are meaningless.
- Use shell scripts as a glue language to increase leverage and portability. Resist the temptation to use compiled languages you regularly work with as a glue language.
## New Knowledge I Gained
- Place "logic" and "the data that logic manipulates" close together in your code structure.
- Start prototyping as early as possible.
- Aim for modules with high independence by ensuring all instructions within a module are related to executing a single role or function (functionally cohesive modules).
- Write "defensive" code that protects other parts of the system even when invalid data is passed to a function, regardless of where the problem originated.
Recently, thanks to generative AI, I have far fewer opportunities to write code myself. In this context, mastering the principles presented in this book and using them to guide AI models toward generating the code I expect has become one of the critical skills for modern developers.
As I was writing this article, Claude Sonnet 4.6 suggested to me an example of an effective prompt based on programming principles. The following structure proved particularly valuable:
"Implement a user authentication feature. Follow these principles:
- Single Responsibility: Separate authentication logic from input validation
- Defensive Code: Include appropriate error handling for invalid or unexpected data
- Simplicity First: Prioritize minimal necessary implementation
- Logging: Only log errors and critical results; exclude verbose status messages"
By constructing instructions around these principles, the essence of prompt engineering becomes clear. As I enter my third year as a developer, I am grateful to have read this book and gained these insights.
---
> **Note**: The review and translation were assisted by an AI generative model. The author is responsible for the final content.

View file

@ -35,7 +35,7 @@ const { pageTitle } = Astro.props;
{pageTitle} {pageTitle}
</h1> </h1>
<slot /> <slot />
<Footer> <Footer />
<script> <script>
import "../scripts/menu.js"; import "../scripts/menu.js";
</script> </script>
@ -44,6 +44,6 @@ const { pageTitle } = Astro.props;
<style> <style>
.page-title { .page-title {
font-size: 2.8rem; font-size: 2.2rem;
} }
</style> </style>

View file

@ -1,3 +1,16 @@
document.querySelector('.hamburger').addEventListener('click', () => { const setupHamburgerMenu = () => {
document.querySelector('.nav-links').classList.toggle('expanded'); const hamburger = document.querySelector('.hamburger');
}); const navLinks = document.querySelector('.nav-links');
if (!hamburger || !navLinks) return;
hamburger.addEventListener('click', () => {
navLinks.classList.toggle('expanded');
});
};
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', setupHamburgerMenu);
} else {
setupHamburgerMenu();
}