<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Prashant Basnet </title>
    <description>The latest articles on DEV Community by Prashant Basnet  (@pbasnet1909).</description>
    <link>https://dev.to/pbasnet1909</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4267120%2F6ae246fa-4430-4cd3-a691-d3cca81da4c0.png</url>
      <title>DEV Community: Prashant Basnet </title>
      <link>https://dev.to/pbasnet1909</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pbasnet1909"/>
    <language>en</language>
    <item>
      <title>6 Free Tools I'm Using in 2027 to Stop Losing Marks in MCQ Exams (All on One Site)</title>
      <dc:creator>Prashant Basnet </dc:creator>
      <pubDate>Fri, 04 Dec 2026 01:07:55 +0000</pubDate>
      <link>https://dev.to/pbasnet1909/6-free-tools-im-using-in-2027-to-stop-losing-marks-in-mcq-exams-all-on-one-site-opp</link>
      <guid>https://dev.to/pbasnet1909/6-free-tools-im-using-in-2027-to-stop-losing-marks-in-mcq-exams-all-on-one-site-opp</guid>
      <description>&lt;p&gt;For a long time my mock test routine was the same: finish the paper, count the correct answers, feel good or bad, and move on. The problem is that when an exam has negative marking, the number of correct answers isn't your score. Two students with the same correct count can end up with very different results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://negativemarkingcalc.com/" rel="noopener noreferrer"&gt;NegativeMarkingCalc&lt;/a&gt; has changed how I review practice tests. What makes it useful is that it's a full toolkit, not one calculator. Here are the parts I'm taking into 2027, with direct links.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The main calculator, with custom penalties&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Enter total questions, marks per correct answer, correct answers and wrong answers, then pick the penalty: none, 1/4, 1/3 or 1/2. Skipped questions are counted automatically, and you get your score, marks deducted and accuracy as you type. The full version also supports custom penalties and unattempted marks.&lt;/p&gt;

&lt;p&gt;The formula behind it is simple: Score = (correct × marks) − (wrong × marks × penalty ratio). With 100 questions at +4 and a 1/4 penalty, 60 correct and 20 wrong gives 240 − 20 = 220 out of 400.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://negativemarkingcalc.com/negative-marking-calculator/" rel="noopener noreferrer"&gt;Full negative marks calculator&lt;/a&gt;&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/1-4-negative-marking-calculator/" rel="noopener noreferrer"&gt;1/4 negative marking calculator&lt;/a&gt;&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/1-3-negative-marking-calculator/" rel="noopener noreferrer"&gt;1/3 negative marking calculator&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Exam-specific calculators with honest labels&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There are separate calculators for several major exams, and each one states whether its marking scheme is verified against an official notice or just an editable, unverified example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://negativemarkingcalc.com/upsc-negative-marking-calculator/" rel="noopener noreferrer"&gt;UPSC&lt;/a&gt;: Prelims GS Paper I with the one-third penalty (verified)&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/neet-negative-marking-calculator/" rel="noopener noreferrer"&gt;NEET&lt;/a&gt;: +4 / −1, 720 marks across three subjects (verified)&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/ssc-marks-calculator/" rel="noopener noreferrer"&gt;SSC&lt;/a&gt;: CGL Tier-I and Tier-II, section by section (verified)&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/mpsc-negative-marking-calculator/" rel="noopener noreferrer"&gt;MPSC&lt;/a&gt;: editable one-fourth penalty (unverified example)&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/rrb-negative-marking-calculator/" rel="noopener noreferrer"&gt;RRB&lt;/a&gt;: NTPC and ALP patterns, editable one-third penalty (unverified example)&lt;/p&gt;

&lt;p&gt;I like that it doesn't pretend. For an unverified scheme, you're told to check the official notification yourself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://negativemarkingcalc.com/exam-calculators/" rel="noopener noreferrer"&gt;See all exam calculators&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The guessing probability calculator&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This answers the question every MCQ student faces: should I guess? It shows the expected marks from a guess, including when you've eliminated some options, and compares across penalties. The break-even rule is penalty ÷ (marks + penalty), which is 20% for a 1/4 penalty and 25% for 1/3. Above that accuracy, guessing helps. Below it, you lose marks on average.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://negativemarkingcalc.com/guessing-probability-calculator/" rel="noopener noreferrer"&gt;Guessing probability calculator&lt;/a&gt;&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/guides/when-should-you-guess-an-answer/" rel="noopener noreferrer"&gt;Guide: When should you guess an answer?&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The accuracy calculator&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Accuracy shows how reliable your attempted questions were, but the tool also explains why accuracy alone doesn't set your score. A high-accuracy student who attempts too few questions can still lose to someone who attempts more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://negativemarkingcalc.com/accuracy-calculator/" rel="noopener noreferrer"&gt;Accuracy calculator&lt;/a&gt;&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/guides/how-to-calculate-exam-accuracy/" rel="noopener noreferrer"&gt;Guide: How to calculate exam accuracy&lt;/a&gt;&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/guides/how-to-improve-exam-accuracy/" rel="noopener noreferrer"&gt;Guide: How to improve exam accuracy&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The target score calculator and attempt strategy simulator&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These two turned my practice into a plan:&lt;/p&gt;

&lt;p&gt;The target score calculator works out the attempts and correct answers needed to reach a specific score, so "I want to score well" becomes a number.&lt;br&gt;
The attempt strategy simulator compares several scenarios, like attempting 70 versus 85 questions, and shows which scores highest under any marking scheme.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://negativemarkingcalc.com/target-score-calculator/" rel="noopener noreferrer"&gt;Target score calculator&lt;/a&gt;&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/attempt-strategy-calculator/" rel="noopener noreferrer"&gt;Attempt strategy simulator&lt;/a&gt;&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/guides/how-many-questions-should-you-attempt/" rel="noopener noreferrer"&gt;Guide: How many questions should you attempt?&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The SAT tools&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The digital SAT has no negative marking, but its score isn't a simple count either. There are three tools for it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://negativemarkingcalc.com/sat-score-calculator/" rel="noopener noreferrer"&gt;SAT score calculator: estimate your score range&lt;/a&gt;&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/sat-practice-test-score-calculator/" rel="noopener noreferrer"&gt;Practice test scorer: score an official practice test using College Board's tables&lt;/a&gt;&lt;br&gt;
&lt;a href="https://negativemarkingcalc.com/sat-superscore-calculator/&lt;br&gt;%0A![%20](https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/1pp3ame1rczz48drxgip.PNG)" rel="noopener noreferrer"&gt;Superscore calculator: combine your best section scores&lt;br&gt;
Guides worth reading first&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If negative marking is new to you, start here:&lt;/p&gt;

&lt;p&gt;What is negative marking in competitive exams?&lt;br&gt;
How does negative marking work?&lt;br&gt;
How to calculate negative marking&lt;br&gt;
How to avoid losing marks due to negative marking&lt;br&gt;
All guides&lt;br&gt;
Why I trust it&lt;br&gt;
Free, with no registration&lt;br&gt;
Results update instantly on any phone or computer&lt;br&gt;
Calculations run in your browser, and saved history stays on your device&lt;br&gt;
Your score can go negative, because the tool doesn't clamp it to zero unless you choose to&lt;br&gt;
It says plainly that these are independent estimates, not official results, and tells you to check the official notification&lt;br&gt;
My 2027 routine&lt;br&gt;
After every mock test, enter the results instead of just counting correct answers.&lt;br&gt;
Check accuracy to see whether my wrong answers come from guessing or from gaps in knowledge.&lt;br&gt;
Use the break-even rule before guessing.&lt;br&gt;
Set a monthly target score and work backwards with the target calculator.&lt;br&gt;
Test two attempt strategies before the real exam.&lt;/p&gt;

&lt;p&gt;Do you attempt everything or only what you're sure of? I'd like to hear your approach in the comments.&lt;/p&gt;

&lt;h1&gt;
  
  
  ExamPreparation #NegativeMarking #MCQ #StudyTips #MockTest #NEET #UPSC #SAT #Students #2027Goals
&lt;/h1&gt;

</description>
      <category>tools</category>
    </item>
    <item>
      <title>Browsers don't know how big your screen is: building an on-screen ring sizer</title>
      <dc:creator>Prashant Basnet </dc:creator>
      <pubDate>Thu, 26 Nov 2026 14:29:25 +0000</pubDate>
      <link>https://dev.to/pbasnet1909/browsers-dont-know-how-big-your-screen-is-building-an-on-screen-ring-sizer-44i</link>
      <guid>https://dev.to/pbasnet1909/browsers-dont-know-how-big-your-screen-is-building-an-on-screen-ring-sizer-44i</guid>
      <description>&lt;p&gt;I built &lt;a href="http://checkmyringsize.com/" rel="noopener noreferrer"&gt;Check My Ring Size&lt;/a&gt;, a free tool where you hold a ring up to your screen and match it to a circle. It sounds like a weekend project. The hard part is one sentence: a web page has no way to ask how big a millimeter is.&lt;/p&gt;

&lt;p&gt;If a circle is drawn 104 pixels wide, nothing in the browser tells you whether that is 17 mm on someone's phone or 30 mm on an old monitor. A ring that is 17.3 mm across (a US size 7) has to be drawn at exactly the right size, or the whole tool is worthless. This post is about how I solved that, and the bug that made my first version wrong by a factor of two to three.&lt;/p&gt;

&lt;p&gt;Why CSS units don't help&lt;/p&gt;

&lt;p&gt;CSS has mm and in, so it is tempting to write width: 17.3mm and move on. Don't. By definition, a CSS inch is 96 CSS pixels, and that is a reference value, not a measurement of your actual screen. On a real display, 17.3mm renders at whatever size the OS and panel happen to produce. It is only correct by accident.&lt;/p&gt;

&lt;p&gt;So the real problem is to find CSS pixels per millimeter (I call it pxPerMM) for this specific screen. Everything else is just drawing a circle at diameterMM * pxPerMM. I ended up supporting three ways to get that number, because every one of them fails for some people.&lt;/p&gt;

&lt;p&gt;Method 1: fingerprint the device&lt;/p&gt;

&lt;p&gt;The browser does tell you a few things: screen.width, screen.height and devicePixelRatio. Together they are a rough fingerprint. An iPhone 13 reports 390 x 844 CSS pixels at a ratio of 3. I keep a table of devices with those values and their published pixels per inch:&lt;/p&gt;

&lt;p&gt;ts&lt;br&gt;
export function matchDevice(cssWidth: number, cssHeight: number, dpr: number) {&lt;br&gt;
  const dprRounded = Math.round(dpr * 100) / 100;&lt;br&gt;
  for (const d of DEVICE_DB) {&lt;br&gt;
    const dprClose = Math.abs(d.dpr - dprRounded) &amp;lt; 0.15;&lt;br&gt;
    const straight = d.cssWidth === cssWidth &amp;amp;&amp;amp; d.cssHeight === cssHeight;&lt;br&gt;
    const rotated = d.cssWidth === cssHeight &amp;amp;&amp;amp; d.cssHeight === cssWidth;&lt;br&gt;
    if (dprClose &amp;amp;&amp;amp; (straight || rotated)) return d;&lt;br&gt;
  }&lt;br&gt;
  return null;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Two details matter. Portrait and landscape both have to match (rotated), and the ratio needs a tolerance, because browsers report values like 2.625 or 2.75 that don't equal the number on the spec sheet exactly.&lt;/p&gt;

&lt;p&gt;The bug&lt;/p&gt;

&lt;p&gt;The matched device gives me a published PPI, for example 460 for most recent iPhones. My first version did this:&lt;/p&gt;

&lt;p&gt;ts&lt;br&gt;
pxPerMM = match.ppi / 25.4; // wrong&lt;/p&gt;

&lt;p&gt;That gives 18.1 px per mm. It looks reasonable and it is badly wrong. Published PPI describes physical pixels. A CSS pixel on that iPhone is 3 physical pixels wide. The correct calculation divides by the device pixel ratio first:&lt;/p&gt;

&lt;p&gt;ts&lt;br&gt;
pxPerMM = match.ppi / dpr / 25.4; // 460 / 3 / 25.4 = about 6.04&lt;/p&gt;

&lt;p&gt;At 18.1 px/mm, a 17.3 mm ring was drawn about 313 CSS pixels wide. At 6.04 px/mm it is about 104. Every circle on a high-density screen was exactly dpr times too large, so everyone would have been told to buy a ring that was far too small. It is the kind of bug that survives review, because every number looks plausible. I left a comment in the code explaining why the division exists, since it looks unnecessary until you know.&lt;/p&gt;

&lt;p&gt;The fingerprint approach has a weakness: it is a table I maintain, and different panels can share the same CSS size and ratio. That is why it is not the only method.&lt;/p&gt;

&lt;p&gt;Method 2: screen diagonal&lt;/p&gt;

&lt;p&gt;Most people know their screen size in inches ("a 24 inch monitor", "a 6.1 inch phone"). That is enough to calculate density without any device table. With the diagonal and the CSS resolution, the physical width follows from the aspect ratio:&lt;/p&gt;

&lt;p&gt;ts&lt;br&gt;
const w = window.screen.width;&lt;br&gt;
const h = window.screen.height;&lt;br&gt;
const diagonalPx = Math.sqrt(w * w + h * h);&lt;br&gt;
const physicalWidthIn = diagonalIn * (w / diagonalPx);&lt;br&gt;
const cssPxPerInch = w / physicalWidthIn;&lt;br&gt;
const pxPerMM = cssPxPerInch / 25.4;&lt;/p&gt;

&lt;p&gt;For a 1920 x 1080 monitor at 24 inches that works out to about 92 CSS pixels per inch. The method assumes square pixels and that the page isn't zoomed, so the UI tells people to reset browser zoom to 100 percent first. I also added a device search that fills the diagonal in automatically, because many people don't know it offhand.&lt;/p&gt;

&lt;p&gt;Method 3: hold a card or a coin to the screen&lt;/p&gt;

&lt;p&gt;The last method needs no database and no assumptions about the display. The user places a real object on the screen, a bank card (ISO ID-1, 85.6 x 53.98 mm) or a coin, and drags a slider until the on-screen shape matches its edges. Then:&lt;/p&gt;

&lt;p&gt;ts&lt;br&gt;
pxPerMM = sliderPx / objectWidthMM;&lt;/p&gt;

&lt;p&gt;This is the most trustworthy method, and the clunkiest, which is why it is the fallback.&lt;/p&gt;

&lt;p&gt;It also had its own bug. My slider originally ran from 80 to 500 pixels. A bank card fits that range on most screens, but a coin (around 23 mm) on a low-density screen needs only about 35 to 90 pixels, so the right answer was literally off the end of the slider. The fix is to scale the slider to the object, assuming screens fall somewhere between roughly 1.5 and 8 pixels per mm:&lt;/p&gt;

&lt;p&gt;ts&lt;br&gt;
const min = Math.max(20, Math.round(objectWidthMM * 1.5));&lt;br&gt;
const max = Math.round(objectWidthMM * 8);&lt;br&gt;
const start = Math.round(objectWidthMM * 3.8); // roughly 96 DPI&lt;br&gt;
After calibration&lt;/p&gt;

&lt;p&gt;Once pxPerMM is known, the rest is simple. The ring-size slider's pixel range is rebuilt from it so it always covers about 8 to 28 mm. The measured diameter is px / pxPerMM, and a lookup table maps that diameter to US, UK, EU, India, Japan and China sizes. Wide bands get a size bump, since a wide band fits tighter than a thin one at the same diameter.&lt;/p&gt;

&lt;p&gt;Lessons&lt;br&gt;
Never trust a number you can't connect to a physical object. Published PPI, CSS inches and the screen diagonal all looked plausible while being wrong or fragile. The only ground truth is something with a known real-world size.&lt;br&gt;
Test against a physical object. A unit test can happily confirm a wrong formula. Holding a real ring or card up to the screen is the check that catches it.&lt;br&gt;
Offer more than one route to the same value. Each method fails for somebody: unknown devices, unknown diagonals, no card to hand. Three paths to pxPerMM cover far more people than one clever path.&lt;br&gt;
Be honest about accuracy. An on-screen tool is good, not perfect. The guides on the site recommend measuring on two different days and comparing the result with a ring you already own that fits.&lt;br&gt;
The rest of the stack&lt;/p&gt;

&lt;p&gt;The site is Astro, static, on Cloudflare Pages, with six languages. Mobile Lighthouse performance went from 63 to 99, helped by not letting third-party scripts compete with first paint: ads and analytics load on the first user interaction (or after ten seconds as a fallback), and only the two most-used font files are preloaded.&lt;/p&gt;

&lt;p&gt;If you want to try the calibration yourself, the tool is free at checkmyringsize.com. I'd especially like to hear if auto-detect picks the wrong device on yours, since that is the part that depends on my device table.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1dts9g88pri3oq3zopqj.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1dts9g88pri3oq3zopqj.PNG" alt=" " width="799" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>astro</category>
      <category>css</category>
    </item>
  </channel>
</rss>
