DEV Community

atharv shukla
atharv shukla

Posted on

Day 63: Turn Your Counter Program Into a Post That Lands 🚀

"Code in a private folder counts for nothing to anyone except you. Today, turn private progress into a public artifact that recruiters, teammates, and collaborators can find."


🎯 Overview & Objective

Over Days 57 through 62, you built an Anchor counter program, enforced wallet authorization via has_one = authority, wrote happy & failure path tests with LiteSVM, performed mutation testing, and published a long-form technical article on DEV.to.

Day 63 is about public proof of work. We convert that deep technical progress into high-impact social media posts (X/Twitter, LinkedIn, Farcaster, Bluesky) designed to showcase real engineering competence to the Solana ecosystem.


📸 1. The Two Non-Negotiable Screenshots

To make your post stand out on social media feeds, prepare two tightly cropped visual assets:

Image 1: The Proof (Passing Test Run)

Run cargo test --test counter inside day-60 to capture all 3 tests passing:

running 3 tests
test initialize_fails_when_counter_already_exists ... ok
test initialize_then_increment ... ok
test increment_fails_when_wrong_authority_signs ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.19s
Enter fullscreen mode Exit fullscreen mode

Image 2: The Mutation Test (Intentionally Breaking the Program)

Your terminal run in day-61 showing the test catching the removed has_one = authority constraint:

running 3 tests
test initialize_fails_when_counter_already_exists ... ok
test initialize_then_increment ... ok
test increment_fails_when_wrong_authority_signs ... FAILED

failures:

---- increment_fails_when_wrong_authority_signs stdout ----
thread 'increment_fails_when_wrong_authority_signs' panicked at programs\day-60\tests\counter.rs:123:5:
increment should fail when signed by the wrong authority

failures:
    increment_fails_when_wrong_authority_signs

test result: FAILED. 2 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.17s
Enter fullscreen mode Exit fullscreen mode

📱 2. Social Media Templates

🐦 Option A: X (Twitter) / Bluesky / Farcaster Post

Day 63 of #100DaysOfSolana ⚓

Built my first Anchor program this week: a counter that only the wallet that created it can increment.

The interesting bit isn't just that it works. It's that I wrote tests expecting it to refuse unauthorized signers, then broke the program on purpose to prove the test suite catches real bugs.

Full write-up on DEV: [PASTE YOUR DEV.TO POST URL FROM DAY 62]

#solana #anchor #rust #testing
Enter fullscreen mode Exit fullscreen mode

💼 Option B: LinkedIn Post

Day 63 of #100DaysOfSolana 🦀⚓

Over the past week, I built my first Solana program using the Anchor framework and LiteSVM.

Rather than just writing a simple counter handler, I focused heavily on security constraints and test design:

1. Account Constraints over Imperative Logic: In Anchor, authority validation lives in the Accounts struct using `has_one = authority`. If an unauthorized wallet attempts to sign, Anchor rejects it before the handler runs.
2. In-Process SVM Testing: Using LiteSVM, I wrote both happy-path and failure-path tests running in milliseconds without needing a full local validator.
3. Mutation Testing: I deliberately broke my own code (removing security constraints and altering arithmetic logic) to confirm my test suite turned red for the right reasons.

Building on Solana requires thinking differently about state and security invariants. Writing down how account constraints work forced me to clarify gaps I didn't realize I had.

Full article detailing the program architecture, tests, and mutation experiments:
👉 [PASTE YOUR DEV.TO POST URL FROM DAY 62]

#Solana #Rust #Web3Development #SoftwareTesting #Anchor #Blockchain
Enter fullscreen mode Exit fullscreen mode

🤝 3. Algorithmic & Networking Checklist

  • [x] Attach Screenshots: Image 1 (Terminal Test Output) first, Image 2 (Carbon code snippet) second.
  • [x] Hashtag: Include #100DaysOfSolana.
  • [x] Link: Include your Day 62 DEV.to post link.
  • [x] Repo Link: Add your GitHub repository link in your bio or post comments.
  • [x] Community Reply: Find another post under #100DaysOfSolana and leave a thoughtful question or observation.

Artifact created for Day 63 of 100 Days of Solana.

Top comments (0)