<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[EduShaale Learning Lab]]></title><description><![CDATA[Build practical test prep tools with EduShaale. Follow hands-on tutorials on Google Sheets, Digital SAT mistake tracking, and mock test review.]]></description><link>https://edushaale.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6af95e3f1cfabc9b159b1900/d1249b20-ba2c-4084-8743-0b7f22f31f3a.png</url><title>EduShaale Learning Lab</title><link>https://edushaale.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Thu, 19 Nov 2026 05:12:48 GMT</lastBuildDate><atom:link href="https://edushaale.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How Do You Find and Fix Java Array Off-by-One Errors?]]></title><description><![CDATA[Find and fix Java array off-by-one errors with five runnable boundary tests. Catch invalid indices, skipped last values, and threshold bugs.]]></description><link>https://edushaale.hashnode.dev/java-array-off-by-one-errors</link><guid isPermaLink="true">https://edushaale.hashnode.dev/java-array-off-by-one-errors</guid><category><![CDATA[Java]]></category><category><![CDATA[debugging]]></category><category><![CDATA[Testing]]></category><category><![CDATA[Tutorial]]></category><dc:creator><![CDATA[Aneesh Kashyap]]></dc:creator><pubDate>Wed, 18 Nov 2026 15:22:01 GMT</pubDate><content:encoded><![CDATA[<p>Fix Java array off-by-one errors by looping while <code>i &lt; array.length</code>, then test an empty array, a one-element array, and an array where only the last value matters. Java starts indexing at zero, so the last valid index of a nonempty array is <code>array.length - 1</code>.</p>
<blockquote>
<p><strong>Quick summary:</strong> To test a method that counts scores of 70 or higher, try <code>[]</code>, <code>[70]</code>, and <code>[55, 60, 90]</code>. The expected counts are <code>0</code>, <code>1</code>, and <code>1</code>. These small cases expose bugs that a longer input can make harder to diagnose.</p>
</blockquote>
<h2>Why does <code>i &lt;= array.length</code> cause an error?</h2>
<p><code>i &lt;= array.length</code> lets the loop reach an index equal to the array’s length, which is outside the array. For <code>[55, 60, 90]</code>, the length is <code>3</code>, but the valid indices are <code>0</code>, <code>1</code>, and <code>2</code>. Trying to read index <code>3</code> throws an <code>ArrayIndexOutOfBoundsException</code>.</p>
<p>There’s a quieter bug in the other direction. If you use <code>i &lt; array.length - 1</code>, the loop stops before reading the last value. It doesn’t throw an exception. It just gives you the wrong answer when that last value matters. That’s why testing only for crashes can miss an off-by-one error. <a href="https://apcentral.collegeboard.org/media/pdf/ap-computer-science-a-course-and-exam-description.pdf">College Board’s AP Computer Science A course and exam description</a></p>
<h2>How do you test array bounds without JUnit?</h2>
<p>Write a small method with a clear rule, then call it with inputs whose correct answers you can work out by hand. Here, <code>countAtLeast</code> returns how many scores meet or exceed a threshold.</p>
<p>There are two comparisons to test. The loop uses <code>&lt;</code> to stay within the array. The score check uses <code>&gt;=</code> to include a score equal to the threshold. A mistake in either comparison can give you the wrong result, but for different reasons.</p>
<p>Save this as <code>ArrayBoundaryTest.java</code>.</p>
<pre><code class="language-java">public class ArrayBoundaryTest {
    static int countAtLeast(int[] values, int threshold) {
        int count = 0;

        for (int i = 0; i &lt; values.length; i++) {
            if (values[i] &gt;= threshold) {
                count++;
            }
        }

        return count;
    }

    static void check(String name, int expected, int actual) {
        if (expected != actual) {
            throw new AssertionError(
                name + ": expected " + expected + ", got " + actual
            );
        }
        System.out.println("PASS: " + name);
    }

    public static void main(String[] args) {
        check("empty array", 0, countAtLeast(new int[]{}, 70));
        check("one value meets threshold", 1, countAtLeast(new int[]{70}, 70));
        check("one value below threshold", 0, countAtLeast(new int[]{69}, 70));
        check("only the last value qualifies", 1, countAtLeast(new int[]{55, 60, 90}, 70));
        check("all values qualify", 3, countAtLeast(new int[]{70, 75, 90}, 70));
    }
}
</code></pre>
<p>Run the file from your terminal. I tested it on Java 21.</p>
<pre><code class="language-bash">java ArrayBoundaryTest.java
</code></pre>
<p>You should see five passing checks.</p>
<pre><code class="language-text">PASS: empty array
PASS: one value meets threshold
PASS: one value below threshold
PASS: only the last value qualifies
PASS: all values qualify
</code></pre>
<h2>Which test catches each mistake?</h2>
<p>The empty array catches a loop that tries to run when there’s nothing to read. The one-element array catches a loop that skips its only value. A score of exactly 70 catches a different mistake, using <code>&gt;</code> when the requirement says “at least.”</p>
<p>Change one line at a time and rerun the file. The program stops at the first failure, so restore the correct version before trying the next change.</p>
<table>
<thead>
<tr>
<th>Change to try</th>
<th>Expected first failure</th>
<th>What it tells you</th>
</tr>
</thead>
<tbody><tr>
<td><code>i &lt;= values.length</code></td>
<td>The empty array throws <code>ArrayIndexOutOfBoundsException</code>.</td>
<td>The loop tries to read index <code>0</code> even though there are no elements.</td>
</tr>
<tr>
<td><code>i &lt; values.length - 1</code></td>
<td>The one-element array returns <code>0</code> instead of <code>1</code>.</td>
<td>The loop stops before reading the final element.</td>
</tr>
<tr>
<td><code>values[i] &gt; threshold</code></td>
<td>The score of <code>70</code> returns <code>0</code> instead of <code>1</code>.</td>
<td>The loop may be fine. The score comparison wrongly excludes equality.</td>
</tr>
</tbody></table>
<p>If a test fails without an exception from the loop itself, trace what the code actually visits. With <code>i &lt; values.length - 1</code> and the array <code>[55, 60, 90]</code>, it reads <code>55</code> and <code>60</code>, then stops. Since <code>90</code> is the only qualifying score, the method returns <code>0</code> instead of <code>1</code>. That input isolates the bug better than an array where several earlier values also qualify.</p>
<h2>When should you use an enhanced <code>for</code> loop instead?</h2>
<p>Use an enhanced <code>for</code> loop when you need each value but not its index. This method could use <code>for (int value : values)</code> and compare <code>value</code> to the threshold. You’d avoid writing the index bound yourself.</p>
<p>Keep an indexed loop when the task asks for a position, compares neighbours, or updates an element at a specific index. For your next array exercise, write the empty, one-element, and last-element test cases before you write the loop. If a test fails, you’ll have a clearer idea of where to look.</p>
<h2>Frequently asked questions</h2>
<h3>Does an empty Java array have an index <code>0</code>?</h3>
<p>No. An empty array has length <code>0</code> and no valid indices. A loop starting at <code>0</code> with the condition <code>i &lt; array.length</code> correctly runs zero times.</p>
<h3>Does Java use <code>.length</code> or <code>.length()</code> for arrays?</h3>
<p>Arrays use the field <code>.length</code>, without parentheses. A <code>String</code> uses <code>.length()</code>. An <code>ArrayList</code> uses <code>.size()</code>.</p>
<h3>Do these tests need JUnit or the <code>-ea</code> flag?</h3>
<p>No. The <code>check</code> method throws <code>AssertionError</code> directly when a result is wrong. It doesn’t use Java’s <code>assert</code> statement, so the <code>-ea</code> flag isn’t needed.</p>
<p>I run EduShaale. If you’re learning to trace Java loops and test your solutions under exam conditions, you can explore <a href="https://www.edushaale.com/ap-computer-science-a">EduShaale’s AP Computer Science A course</a>.</p>
]]></content:encoded></item><item><title><![CDATA[How to Build a Digital SAT Pacing Calculator in Python]]></title><description><![CDATA[Build a Digital SAT pacing calculator in Python. Use time remaining, unanswered questions, and a review buffer to plan your practice pace.]]></description><link>https://edushaale.hashnode.dev/digital-sat-pacing-calculator-python</link><guid isPermaLink="true">https://edushaale.hashnode.dev/digital-sat-pacing-calculator-python</guid><category><![CDATA[Python]]></category><category><![CDATA[command line]]></category><category><![CDATA[Tutorial]]></category><category><![CDATA[edtech]]></category><dc:creator><![CDATA[Aneesh Kashyap]]></dc:creator><pubDate>Wed, 18 Nov 2026 15:09:18 GMT</pubDate><content:encoded><![CDATA[<p>Build a Digital SAT pacing calculator in Python by converting the time on the clock to seconds, subtracting the time you want to save for review, and dividing what’s left by your unanswered questions. If you have 13 minutes left for eight questions and want three minutes to review, your working pace is <strong>1 minute and 15 seconds per question</strong>. This tutorial turns that calculation into a command-line tool you can use to review your pacing after a practice module.</p>
<h2>Why the starting average can be misleading</h2>
<p>At the start of a standard Digital SAT Math module, you have 35 minutes for 22 questions. That works out to about 95 seconds per question. But halfway through, that average no longer tells you how much time you can spend. Your pace depends on how many questions you’ve answered, how much time remains, and whether you want a few minutes to revisit flagged questions. <a href="https://satsuite.collegeboard.org/sat/whats-on-the-test/structure">College Board’s guide to the SAT structure</a></p>
<p>The calculator uses your actual checkpoint instead of the starting average. It also treats review time as part of the budget. Without that buffer, 13 minutes for eight questions works out to about 97 seconds each. If you use all that time on your first pass, you won’t have the three minutes you planned to spend reviewing.</p>
<h2>1. Save the Python script</h2>
<p>Create a file called <code>sat_pace.py</code>. It uses Python’s standard library, so there’s nothing to install with <code>pip</code>.</p>
<pre><code class="language-python">import argparse
import re

MODULES = {
    "math": (35 * 60, 22),
    "rw": (32 * 60, 27),
}


def parse_time(value):
    if not re.fullmatch(r"[0-9]+:[0-5][0-9]", value):
        raise argparse.ArgumentTypeError("enter time as MM:SS, for example 13:00")
    minutes, seconds = map(int, value.split(":"))
    return minutes * 60 + seconds


def clock(seconds):
    minutes, seconds = divmod(seconds, 60)
    return f"{minutes}:{seconds:02d}"


def main():
    parser = argparse.ArgumentParser(
        description="Calculate a practice pace for one Digital SAT module."
    )
    parser.add_argument("section", choices=MODULES)
    parser.add_argument("--time", required=True, type=parse_time,
                        help="time remaining in MM:SS")
    parser.add_argument("--left", required=True, type=int,
                        help="number of unanswered questions")
    parser.add_argument("--review", type=parse_time, default="03:00",
                        help="time to save for review in MM:SS")
    args = parser.parse_args()

    module_time, question_limit = MODULES[args.section]

    if args.time &gt; module_time:
        parser.error(f"--time cannot exceed {clock(module_time)} for this module")
    if not 0 &lt;= args.left &lt;= question_limit:
        parser.error(f"--left must be between 0 and {question_limit}")
    if args.time == 0:
        print("No time remaining.")
        return
    if args.left == 0:
        print(f"No unanswered questions. Use {clock(args.time)} to review.")
        return
    if args.review &gt;= args.time:
        parser.error("--review must be shorter than --time while questions remain")

    first_pass = args.time - args.review
    pace, spare = divmod(first_pass, args.left)

    print(f"First-pass time: {clock(first_pass)}")
    print(f"Pace per unanswered question: {clock(pace)}")
    print(f"Review buffer: {clock(args.review)}")
    if spare:
        print(f"Extra time after rounding: {spare} seconds")


if __name__ == "__main__":
    main()
</code></pre>
<p>The script converts <code>13:00</code> to <code>780</code> seconds before doing any arithmetic. It uses <code>divmod()</code> to return both the whole-second pace and any seconds left over. That keeps it from rounding up and quietly assigning more time than you have.</p>
<p>The presets use standard module timing. If you practise with extended time or a custom question set, update the time and question limits in <code>MODULES</code> to match your setup.</p>
<h2>2. Run it with two practice checkpoints</h2>
<p>For a Math module with 13 minutes and eight unanswered questions, run this command. The review buffer defaults to three minutes.</p>
<pre><code class="language-bash">python sat_pace.py math --time 13:00 --left 8
</code></pre>
<p>You should see:</p>
<pre><code class="language-text">First-pass time: 10:00
Pace per unanswered question: 1:15
Review buffer: 3:00
</code></pre>
<p>Now try a Reading and Writing checkpoint with 7 minutes and 20 seconds left, seven unanswered questions, and a one-minute review buffer.</p>
<pre><code class="language-bash">python sat_pace.py rw --time 07:20 --left 7 --review 01:00
</code></pre>
<p>You should see:</p>
<pre><code class="language-text">First-pass time: 6:20
Pace per unanswered question: 0:54
Review buffer: 1:00
Extra time after rounding: 2 seconds
</code></pre>
<p>Here, six minutes and 20 seconds is 380 seconds. Seven questions at 54 seconds each use 378 seconds, leaving two seconds. That’s a quick way to check that the first-pass budget adds up.</p>
<h2>3. Use the result as a checkpoint, not a deadline</h2>
<p>A pace of 54 seconds doesn’t mean every question deserves exactly 54 seconds. A punctuation question might take 20 seconds, leaving more time for a dense passage. What the number gives you is a way to spot an expensive decision. If you spent two minutes on a question without getting closer to an answer, what would you do differently next time?</p>
<p>Try this after your next timed practice set. Take one checkpoint you remember, run it through the calculator, and look at the questions you still had left. Pick one adjustment to test on the next set. You might flag a question when you’ve reread it twice without making progress, or try a shorter review buffer to give yourself more room on the first pass.</p>
<p>I run EduShaale. If you want to see how we review pacing alongside accuracy after timed mocks, I’ve shared more about the <a href="https://www.edushaale.com/post/the-edushaale-digital-sat-practice-platform">EduShaale Digital SAT Practice Platform</a>.</p>
]]></content:encoded></item><item><title><![CDATA[How to Build a Digital SAT Mistake Tracker in Google Sheets]]></title><description><![CDATA[Build a Digital SAT mistake tracker in Google Sheets with sample data and a pivot table that shows which skills to practise next.]]></description><link>https://edushaale.hashnode.dev/digital-sat-mistake-tracker-google-sheets</link><guid isPermaLink="true">https://edushaale.hashnode.dev/digital-sat-mistake-tracker-google-sheets</guid><category><![CDATA[google sheets]]></category><category><![CDATA[spreadsheets]]></category><category><![CDATA[Tutorial]]></category><category><![CDATA[edtech]]></category><dc:creator><![CDATA[Aneesh Kashyap]]></dc:creator><pubDate>Wed, 18 Nov 2026 14:46:09 GMT</pubDate><content:encoded><![CDATA[<p>To build a Digital SAT mistake tracker in Google Sheets, log the questions you missed or guessed correctly, then use a pivot table to count them by skill. That gives you a practical answer to the question you’re left with after every mock. What should I practise next? You can build the tracker with two tabs, a few rows of sample data, and no scripts.</p>
<h2>1. Create a log with one row per question</h2>
<p>Open a blank Google Sheet and rename the first tab <code>Log</code>. The idea is to record enough information to find the question again and remember what went wrong. You don’t need to copy the whole question into the sheet.</p>
<p>The two fields that make the tracker useful are <strong>Result</strong> and <strong>Next time</strong>. Result separates a wrong answer from a lucky guess. Next time records the action you’ll take on a similar question. “I got confused” won’t help much next week. “Check whether the second sentence contrasts with the first” gives you something specific to try.</p>
<p>Paste the sample below into cell <code>A1</code>. If it lands in one column, select the pasted cells and choose <strong>Data → Split text to columns</strong>, then choose <strong>Comma</strong> as the separator.</p>
<pre><code class="language-csv">Test,Section,Skill,Question,Result,Next time
Mock 1,Reading and Writing,Transitions,M1-Q12,Missed,Name the relationship before reading the options
Mock 1,Reading and Writing,Transitions,M2-Q09,Guessed correctly,Check whether the second idea contrasts with the first
Mock 1,Reading and Writing,Boundaries,M2-Q17,Missed,Check whether both parts can stand alone
Mock 1,Math,Linear equations,M2-Q05,Missed,Distribute the negative sign first
Mock 2,Reading and Writing,Transitions,M1-Q14,Missed,Separate contrast from cause and effect
Mock 2,Reading and Writing,Transitions,M2-Q08,Missed,Read both sentences before picking a transition
Mock 2,Reading and Writing,Boundaries,M2-Q18,Guessed correctly,Identify the two clauses before choosing punctuation
Mock 2,Math,Linear equations,M2-Q07,Missed,Substitute the solution back into the original equation
</code></pre>
<p>These are fictional examples. <code>M2-Q09</code> means Module 2, Question 9. When you add your own rows, use the same name for a skill every time. If you enter <code>Transition</code> on one row and <code>Transitions</code> on another, the pivot table will treat them as two separate skills.</p>
<p>To keep the <strong>Result</strong> labels consistent, select <code>E2:E</code>, choose <strong>Insert → Dropdown</strong>, and add <code>Missed</code> and <code>Guessed correctly</code> as the two options.</p>
<h2>2. Build a summary with a pivot table</h2>
<p>From the <code>Log</code> tab, choose <strong>Insert → Pivot table</strong>. Set your data range to <code>Log!A1:F</code>, create the pivot in a new sheet, and rename that tab <code>Summary</code>. The range has no fixed last row, so you can add entries after future mocks without editing it each time.</p>
<p>In the pivot table editor, set up these fields.</p>
<table>
<thead>
<tr>
<th>Pivot setting</th>
<th>What to add</th>
</tr>
</thead>
<tbody><tr>
<td><strong>Rows</strong></td>
<td><code>Skill</code></td>
</tr>
<tr>
<td><strong>Columns</strong></td>
<td><code>Result</code></td>
</tr>
<tr>
<td><strong>Values</strong></td>
<td><code>Question</code>, summarized by <code>COUNTA</code></td>
</tr>
<tr>
<td><strong>Filters</strong></td>
<td><code>Result</code>, excluding blanks if a blank group appears</td>
</tr>
</tbody></table>
<p><code>COUNTA</code> counts the nonempty question IDs. That’s why each logged question needs an ID, even if it’s just the module and question number.</p>
<p>With the sample data, your summary should show the following. Google Sheets may display an empty cell where the example shows zero.</p>
<table>
<thead>
<tr>
<th>Skill</th>
<th align="right">Missed</th>
<th align="right">Guessed correctly</th>
<th align="right">Total to review</th>
</tr>
</thead>
<tbody><tr>
<td>Transitions</td>
<td align="right">3</td>
<td align="right">1</td>
<td align="right">4</td>
</tr>
<tr>
<td>Boundaries</td>
<td align="right">1</td>
<td align="right">1</td>
<td align="right">2</td>
</tr>
<tr>
<td>Linear equations</td>
<td align="right">2</td>
<td align="right">0</td>
<td align="right">2</td>
</tr>
</tbody></table>
<p>If a count looks wrong, check it in an empty cell outside the pivot table. This formula counts rows where the skill is <code>Transitions</code> and the result is <code>Missed</code>. With the sample data, it should return <code>3</code>.</p>
<pre><code class="language-text">=COUNTIFS(Log!C2:C,"Transitions",Log!E2:E,"Missed")
</code></pre>
<p>If your formula and pivot disagree, start by checking that the pivot counts <code>Question</code> with <code>COUNTA</code> and that every row you want counted has a question ID.</p>
<h2>3. Use the notes to decide what to practise</h2>
<p>In the example, transitions come up four times across two mocks. That’s a reasonable place to start. But the notes tell you <em>how</em> to practise. Several point to the same habit. The student is looking for a word that sounds right before deciding how the two ideas connect.</p>
<p>Try this with a short set of fresh transition questions. Before reading the choices, describe what the second idea does. Does it add information, show a contrast, or follow as a result? For example, “The experiment worked in the lab. It failed outdoors.” The ideas contrast, so <em>however</em> fits. Picking <em>therefore</em> would imply the first result caused the second.</p>
<p>For your next practice session, try eight questions on the same skill. Review any misses, then check whether you’re still making the same kind of mistake. If not, move on to a different skill. If you are, change what you do before choosing an answer instead of starting another identical set.</p>
<h2>What the tracker can and can’t tell you</h2>
<p>Four transition entries don’t prove transitions are your lowest-accuracy skill. The sheet tracks questions you want to review, not every question you answered. To calculate accuracy by skill, you’d also need to log your confident correct answers. This simpler version answers a more immediate question. <strong>Which mistakes keep showing up, and what should I do about them?</strong></p>
<p>Once the sample works, clear the example rows, keep the headers, and add five questions from your latest mock. Before you close the sheet, pick one skill for your next session. A tracker is only useful if it changes what you do after the test.</p>
<p>I run EduShaale. If you’ve reviewed a few mocks and still can’t tell whether the problem is timing, a gap in the concept, or how you’re reading the question, you can bring your tracker to a tutoring session and work through the pattern. Learn more about <a href="https://www.edushaale.com/sat-coaching-bangalore">EduShaale’s SAT coaching in Bangalore</a>.</p>
]]></content:encoded></item></channel></rss>