Filter
Exclude
Time range
-
Near
18 Oct 2025
テスト観点表のイメージがわかない方もいると思いますが、以下のようなものです。 ``` ## サンプル1:メールアドレスバリデーション ### 機能概要 メールアドレスの形式が正しいかチェックする関数 ### テスト観点表 | No | 分類 | テストするパターン | 入力例 | 期待される結果 | 備考 | |----|------|-------------------|--------|---------------|------| | 1 | 正常系 | 標準的なメールアドレス | `user@example.com` | `true` ✅ | 最も一般的なケース | | 2 | 正常系 | 短いメールアドレス | `a@b.co` | `true` ✅ | 最小構成 | | 3 | 正常系 | 長いメールアドレス | `verylongusername@verylongdomain.com` | `true` ✅ | 通常の範囲内 | | 4 | 正常系 | ドット・ハイフン含む | `user.name@ex-ample.com` | `true` ✅ | 特殊文字を含む | | 5 | 境界値 | 最大長(320文字) | `a...@b...com`(320文字) | `true` ✅ | RFC仕様の上限 | | 6 | 境界値 | 最大長 1(321文字) | `a...@b...com`(321文字) | `false` ❌ | 上限超過 | | 7 | 異常系 | 空文字列 | `""` | `false` ❌ | 入力なし | | 8 | 異常系 | @なし | `userexample.com` | `false` ❌ | 必須文字欠落 | | 9 | 異常系 | @が複数 | `user@@example.com` | `false` ❌ | 不正な形式 | | 10 | 異常系 | ドメインに.なし | `user@example` | `false` ❌ | ドメイン不完全 | | 11 | 異常系 | @の前が空 | `@example.com` | `false` ❌ | ローカル部なし | | 12 | 異常系 | @の後が空 | `user@` | `false` ❌ | ドメインなし | | 13 | 異常系 | スペース含む | `user @example.com` | `false` ❌ | 不正な文字 | | 14 | 異常系 | 全角文字 | `ユーザー@example.com` | `false` ❌ | 不正な文字 | | 15 | 異常系 | 絵文字 | `user😀@example.com` | `false` ❌ | 不正な文字 | | 16 | 型違い | null | `null` | `TypeError` ⚠️ | 型エラー | | 17 | 型違い | undefined | `undefined` | `TypeError` ⚠️ | 型エラー | | 18 | 型違い | 数値 | `123` | `TypeError` ⚠️ | 型エラー | --- ## サンプル2:商品合計金額計算 ### 機能概要 商品リストから合計金額を計算し、税込価格を返す関数 ### テスト観点表 | No | 分類 | テストするパターン | 入力例 | 期待される結果 | 備考 | |----|------|-------------------|--------|---------------|------| | 1 | 正常系 | 単品 | `[{price: 1000, qty: 1}]` | `1100` | 1000円 × 1.1 | | 2 | 正常系 | 複数商品 | `[{price: 1000, qty: 2}, {price: 500, qty: 1}]` | `2750` | (2000 500) × 1.1 | | 3 | 正常系 | 小数点以下切り捨て | `[{price: 333, qty: 1}]` | `366` | 366.3 → 366 | | 4 | 境界値 | 最小価格(1円) | `[{price: 1, qty: 1}]` | `1` | 1.1 → 1 | | 5 | 境界値 | 大量購入(数量999) | `[{price: 100, qty: 999}]` | `109890` | 境界値テスト | | 6 | 境界値 | 高額商品(100万円) | `[{price: 1000000, qty: 1}]` | `1100000` | 大きい数値 | | 7 | 異常系 | 空の配列 | `[]` | `ValidationError` ⚠️ | 商品なし | | 8 | 異常系 | 価格が0 | `[{price: 0, qty: 1}]` | `ValidationError` ⚠️ | 不正な価格 | | 9 | 異常系 | 価格が負 | `[{price: -100, qty: 1}]` | `ValidationError` ⚠️ | 不正な価格 | | 10 | 異常系 | 数量が0 | `[{price: 1000, qty: 0}]` | `ValidationError` ⚠️ | 不正な数量 | | 11 | 異常系 | 数量が負 | `[{price: 1000, qty: -1}]` | `ValidationError` ⚠️ | 不正な数量 | | 12 | 異常系 | priceフィールドなし | `[{qty: 1}]` | `ValidationError` ⚠️ | 必須項目欠落 | | 13 | 異常系 | qtyフィールドなし | `[{price: 1000}]` | `ValidationError` ⚠️ | 必須項目欠落 | | 14 | 型違い | null | `null` | `TypeError` ⚠️ | 型エラー | | 15 | 型違い | 配列でない | `{price: 1000, qty: 1}` | `TypeError` ⚠️ | 型エラー | | 16 | 型違い | 価格が文字列 | `[{price: "1000", qty: 1}]` | `TypeError` ⚠️ | 型エラー | --- ## サンプル3:ユーザー登録処理 ### 機能概要 ユーザー情報を検証してデータベースに登録する ### テスト観点表 | No | 分類 | テストするパターン | 入力例 | 期待される結果 | 備考 | |----|------|-------------------|--------|---------------|------| | 1 | 正常系 | 全項目入力 | `{email: "user@example.com", password: "Pass1234!", name: "山田太郎"}` | `User作成成功` ✅ | 標準ケース | | 2 | 正常系 | 名前省略(任意項目) | `{email: "user@example.com", password: "Pass1234!"}` | `User作成成功` ✅ | nameなし | | 3 | 正常系 | 最小パスワード(8文字) | `{email: "user@example.com", password: "Pass123!"}` | `User作成成功` ✅ | 境界値 | | 4 | 正常系 | 最大パスワード(64文字) | `{email: "user@example.com", password: "Pass...!"}` | `User作成成功` ✅ | 境界値 | | 5 | 境界値 | 名前1文字 | `{email: "user@example.com", password: "Pass1234!", name: "田"}` | `User作成成功` ✅ | 最小長 | | 6 | 境界値 | 名前100文字 | `{email: "user@example.com", password: "Pass1234!", name: "あ×100"}` | `User作成成功` ✅ | 最大長 | | 7 | 異常系 | emailなし | `{password: "Pass1234!", name: "山田太郎"}` | `ValidationError: Email is required` ⚠️ | 必須項目 | | 8 | 異常系 | passwordなし | `{email: "user@example.com", name: "山田太郎"}` | `ValidationError: Password is required` ⚠️ | 必須項目 | | 9 | 異常系 | email形式不正 | `{email: "invalid", password: "Pass1234!"}` | `ValidationError: Invalid email` ⚠️ | 形式エラー | | 10 | 異常系 | password短い(7文字) | `{email: "user@example.com", password: "Pass12!"}` | `ValidationError: Password too short` ⚠️ | 最小長-1 | | 11 | 異常系 | password長い(65文字) | `{email: "user@example.com", password: "Pass...!"}` | `ValidationError: Password too long` ⚠️ | 最大長 1 | | 12 | 異常系 | password英数字のみ | `{email: "user@example.com", password: "Pass1234"}` | `ValidationError: Password must contain symbol` ⚠️ | 記号必須 | | 13 | 異常系 | 名前101文字 | `{email: "user@example.com", password: "Pass1234!", name: "あ×101"}` | `ValidationError: Name too long` ⚠️ | 最大長 1 | | 14 | 異常系 | email重複 | `{email: "existing@example.com", password: "Pass1234!"}` | `DuplicateEmailError` ⚠️ | DB制約違反 | | 15 | 異常系 | DB接続エラー | `{email: "user@example.com", password: "Pass1234!"}` | `DatabaseError` ⚠️ | 外部依存失敗 | | 16 | 型違い | 全項目null | `null` | `TypeError` ⚠️ | 型エラー | | 17 | 型違い | emailが数値 | `{email: 123, password: "Pass1234!"}` | `TypeError` ⚠️ | 型エラー | --- ## サンプル4:日付範囲チェック ### 機能概要 予約日が予約可能期間内かをチェックする ### テスト観点表 | No | 分類 | テストするパターン | 入力例 | 期待される結果 | 備考 | |----|------|-------------------|--------|---------------|------| | 1 | 正常系 | 期間内(中間) | `2025-06-15`(今日: 2025-01-01) | `true` ✅ | 明日〜1年以内 | | 2 | 正常系 | 期間開始日(明日) | `2025-01-02`(今日: 2025-01-01) | `true` ✅ | 境界値 | | 3 | 正常系 | 期間終了日(1年後) | `2026-01-01`(今日: 2025-01-01) | `true` ✅ | 境界値 | | 4 | 境界値 | 今日 | `2025-01-01`(今日: 2025-01-01) | `false` ❌ | 期間外(早すぎ) | | 5 | 境界値 | 1年後 1日 | `2026-01-02`(今日: 2025-01-01) | `false` ❌ | 期間外(遅すぎ) | | 6 | 異常系 | 過去の日付 | `2024-12-31`(今日: 2025-01-01) | `false` ❌ | 期間外 | | 7 | 異常系 | 空文字列 | `""` | `ValidationError` ⚠️ | 入力なし | | 8 | 異常系 | 不正な形式 | `2025/01/01` | `ValidationError` ⚠️ | 形式違い | | 9 | 異常系 | 存在しない日付 | `2025-02-30` | `ValidationError` ⚠️ | 不正な日付 | | 10 | 型違い | null | `null` | `TypeError` ⚠️ | 型エラー | | 11 | 型違い | 数値 | `20250101` | `TypeError` ⚠️ | 型エラー | --- ## テスト観点表の読み方 ### 記号の意味 - ✅ **成功**:処理が正常に完了 - ❌ **失敗**:妥当な理由で失敗(想定内) - ⚠️ **例外**:エラーをスローする ### 分類の種類 - **正常系**:期待通りに動作するケース - **境界値**:最小値・最大値・境界付近の値 - **異常系**:エラーになるべきケース - **型違い**:型が違う場合のエラー ### 確認ポイント 1. すべてのパターンが網羅されているか 2. 境界値が適切にテストされているか 3. 異常系が正常系と同数以上あるか 4. エラーメッセージが明確か ```

8
1,169
Replit AI Assistant Wipes Production Database: What Happened? #AI #Replit #DatabaseError #TechNews #AIProblems #DataLoss #Coding #Software #TechFail #ArtificialIntelligence
2
151
22 Jun 2025
Replying to @dillon_mulroy
thanks for this, here everything composed together as a cursor rule: # Guidelines for Writing Effect-TS Code Below are best practices for writing clean and maintainable code using the Effect-TS library in TypeScript, derived from examples shared in an X thread by Dillon Mulroy on June 21, 2025 (<x.com/dillon_mulroy/status/1…>). These guidelines are presented in the order of the original posts, with each referencing the corresponding post for context. A decision matrix is included to guide the choice between Effect.gen and .pipe. ## Decision Matrix Use the following decision matrix to determine whether to use `Effect.gen` or `.pipe` based on the task: - **Injecting/Retrieving Dependencies** → `Effect.gen` - **Conditional Logic** → `Effect.gen` - **Sequential Operations** → `Effect.gen` - **Error Handling** → `.pipe` - **Adding Tracing** → `.pipe` - **Layer Building** → `.pipe` - **Simple Transforms** → `.pipe` This matrix, as outlined by Dillon Mulroy, helps align your coding approach with the strengths of each syntax. ## 1. Separate Business Logic and Composition **Guideline:** Use `Effect.gen` to encapsulate business logic, where sequential operations and control flow are defined. Use `.pipe` for composing effects, particularly when dealing with layers or cross-cutting concerns. **Example:** ```typescript Effect.gen(function* () { // business logic lives here }).pipe( // composition happens here ); ``` ## 2. Manage Multi-Step Operations with Generators **Guideline:** For operations involving multiple steps (e.g., validation, hashing, creation), use `Effect.gen` to sequence them clearly. **Example:** Creating a user with input validation, password hashing, and database insertion. ```typescript const createUser = (userData) => { return Effect.gen(function* () { const validated = yield* effect.validateUser(userData); const hashed = yield* hashPassword(validated.password); const user = yield* users.create({ ...validated, password: hashed }); return yield* enrichUserData(user); }); }; ``` ## 3. Implement Conditional Logic Within Generators **Guideline:** Use if statements inside `Effect.gen` to handle different logic paths based on conditions. **Example:** Processing payments differently based on the amount. ```typescript const processPayment = (payment) => { return Effect.gen(function* () { const config = yield* Config; if (payment.amount > config.largePaymentThreshold) { yield* processLargePayment(payment); } else { yield* processStandardPayment(payment); } }); }; ``` ## 4. Compose Layers Using .pipe **Guideline:** When building dependency injection layers, use `.pipe` to chain `Layer.provide` calls for proper composition. **Example:** Providing Database, Logger, Metrics, and Cache layers. ```typescript const appLayer = Layer.empty.pipe( Layer.provide(Database.layer), Layer.provide(Logger.layer), Layer.provide(Metrics.layer.pipe(Layer.provide(Cache.layer))) ); ``` ## 5. Perform Simple Transforms with .pipe and .map **Guideline:** For simple data transformations, use `.pipe` with `.map` to extract or transform data within effects. **Example:** Extracting usernames from a list of users. ```typescript const usernames = yield* getActiveUsers().pipe( Effect.map(users => users.map(u => u.username)) ); ``` ## 6. Combining it all together **Guideline:** Use `Effect.gen` for business logic like caching and data fetching, and `.pipe` for cross-cutting concerns like tracing, retries, and error handling. **Example:** Fetching user posts with caching, tracing, retry, and error handling. ```typescript const fetchUserPosts = (userId) => Effect.gen(function* () { const db = yield* Database; const cache = yield* Cache; const cached = yield* cache.get(`posts:${userId}`); if (cached) return cached; const posts = yield* db.posts.findByUser(userId); yield* cache.set(`posts:${userId}`, posts); return posts; }).pipe( Effect.withSpan("fetch_user_posts"), Effect.retry(retryPolicy), Effect.catchTag("DatabaseError", () => Effect.succeed([])) ); ``` ## 7. Avoid Long Chains of .andThen; Use Generators Instead **Guideline:** Prefer `Effect.gen` over long chains of `.andThen` for sequential logic to improve readability and maintainability. **Example:** Processing an order with multiple steps using a generator instead of `.andThen` chains. ```typescript // Don't do this: validateOrder(order) .andThen(calculateTotals) .andThen(applyDiscounts) .andThen(processPayment) .andThen(sendConfirmation); // Do this instead: Effect.gen(function* () { const validated = yield* validateOrder(order); const withTotals = yield* calculateTotals(validated); const discounted = yield* applyDiscounts(withTotals); yield* processPayment(discounted); yield* sendConfirmation(); }); ```

how i write effect (Effect.gen vs .pipe) i use Effect.gen and yield* for business logic and .pipe for composition and simple transforms
3
7
502
This is what proper error debugging looks like in #Swift: AppError └─ ProfileError └─ DatabaseError └─ FileError.notFound(path: "/Users/data.db") Learn how to achieve this error chain visibility in your apps with a simple protocol! #iOSDev fline.dev/swift-6-typed-thro…
1
6
317
fn get_from_database(key) -> Result<Option<Value>, DataBaseError> None if key is not presented in the table. Error for any internal/connection errors
you either die a hero or you live long enough to actually have a use case for Result<Option<T>>
6
655
22 Feb 2025
Facing the 'WordPress Database Error: Disk Full' issue? 🛑💾 Don't let storage limits crash your site! Learn how to fix it and keep your website running smoothly. Read now! 🚀 devdiggers.com/how-to-fix-th… #WordPress #DatabaseError #WebsiteMaintenance
3
30
Right horizontal scroll or not in Oracle? Which will boost identifier morale? Source: devhubby.com/thread/how-to-a… #CodingHelp #DatabaseError #SQL #DBError #avoid #oracle
3
8
37
Explanation of Custom Error Classes and Usage in JavaScript ⬇️ 1. CustomError Class - A base class extending `Error` for creating custom error types. - Accepts a message and a custom name. - Uses `Error.captureStackTrace` to exclude the constructor call from the stack trace for better debugging. 2. HTTPError Class - Extends `CustomError` to handle HTTP-specific errors. - Takes a `response` object, extracts `status` and `statusText`, and sets them as the error message. 3. ValidationError Class - Extends `CustomError` for validation-related issues. - Includes details about the invalid field and the corresponding validation message. 4. DatabaseError Class - Extends `CustomError` to handle database operation errors. - Includes an additional property, `operation`, to specify the failed database operation. 5. Usage Examples - HTTPError Usage: - Demonstrates how to handle HTTP request errors using `fetch`. - Checks response status and throws an `HTTPError` if the status is not OK. - ValidationError Usage: - Validates user input (e.g., email and password). - Throws `ValidationError` when validation conditions are not met. - DatabaseError Usage: - Simulates a database query with a random failure mechanism. - Throws a `DatabaseError` with the error message and operation type if an error occurs. 6. Error Handling Patterns - Catch blocks are used to handle specific error types with `instanceof`. - This ensures appropriate error handling logic for different error types.
3
13
67
1,751
16 Aug 2024
Have you ever encountered "Error Establishing a Database Connection"? What worked for you? 💬 See how to Quickly Fix this issue: ayaanmans.com/bitnami-error-… #wordpress #databaseerror #wordpressfix
1
4
5
105
15 Jul 2024
Have you tried threatening Hibernate with a resignation letter to get those failed logs? Source: devhubby.com/thread/how-to-l… #HibernateQuery #DatabaseError #SQLFail #JavaProgramming #fail #sql

3
11
WordPress giving you the infamous "Error Establishing a Database Connection"? No worries! Our infographic's got your back. Check it out and say goodbye to that pesky error! 🔧 #WordPress #WebDev #TechTroubles #FixIt #DatabaseError #Infographic
2
57
Replying to @praddy06
#DatabaseError வந்துட்டு.. Admin ன கூப்பிட்டு, சூடா ஒரு கப் இஞ்சி டீ ☕🥧 வாங்கி கொடுக்கிறேன்னு சொல்லி, மழையில கிளம்பி வரச்சொல்லுங்க..
3
I’m going to watch this!!!!
1
2
24 Sep 2022
Awesome! You conquered the most difficult challenge in this game. Quite the feat!
1
24 Sep 2022
Awesome Keoma! Glad to see you having this run under your belt! Congratulations, well-done!
1
It's finally done: 0% ULTRA-NIGHTMARE clear! The Doom community was crucial in keeping my passion for games alive, they really helped me find joy in what I do for the sake of it. Thank you @RedW4rr10r, ByteMe, @MrBMRyan @Minif1sh @DatabaseError and many others for the inspiration
6
6
78
23 Sep 2022
union MutationResult = MutationPayload | NotAuthorizedError | InvalidInputError | InsufficientPermissionError | DatabaseError | InternalError 여러분 GraphQL 하세요
1
ファー Sequel::DatabaseError: PG::DiskFull: ERROR: could not extend file "base/78933/78952.21": No space left on device (Parallel::UndumpableException) HINT: Check free disk space.
4