Specification for VLQ should be explicit on 7-bit bytes starting from the right

Open
#1,566 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Domain
documentation

Research direction

Read exercises/variable-length-quantity/description.md, the specification file named in the issue, and compare its VLQ byte-order wording with the examples in the issue. Done means the specification explicitly says to build 7-bit bytes from the right, using the least significant bits first, without changing the intended behavior.

Written by the indexing model from the issue text.

Description

I think the VLQ specification should be more explicit about building 7-bit bytes starting from the right (least significant bits):

Correct order: start from the right (least significant bits):
32 bit input = (4-bits) (7-bits) (7-bits) (7-bits) (7-bits)

Wrong order: start from the left (most significant bits):
32 bit input = (7-bits) (7-bits) (7-bits) (7-bits) (4-bits)

Problem specification:
https://github.com/exercism/problem-specifications/blob/master/exercises/variable-length-quantity/description.md

Of course the student can find the correct order by looking at the test cases, but is there a reason to not being more explicit?

Dominant language
Ruby
Stars
362
Forks
566
Avg merge
15h 13m
Merged PRs (30d)
8

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from exercism/problem-specifications

All issues in exercism/problem-specifications

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.