Skip to content

Hamming distance#15

Open
danielle-pinto wants to merge 5 commits intomainfrom
2026-01-27-hamming-distance
Open

Hamming distance#15
danielle-pinto wants to merge 5 commits intomainfrom
2026-01-27-hamming-distance

Conversation

@danielle-pinto
Copy link
Collaborator

@danielle-pinto danielle-pinto commented Jan 27, 2026

Tutorial for Hamming Distance problem

I added two different ways to solve the problem: with a function I wrote, as well as a function in the BioAlignments package. Please let me know if there's anything else that would be good to add to this tutorial!

@github-actions
Copy link

Once the build has completed, you can preview your PR at this URL: https://biojulia.dev/BiojuliaDocs/previews/PR15/

@danielle-pinto
Copy link
Collaborator Author

@kescobo Please let me know if the changes I implemented look good and if I can merge in!

Copy link
Member

@kescobo kescobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this still needs semantic line breaks (sembr.org). You can ask an LLM to suggest if you're not sure, but it's not a hard-and fast rule, just shooting for shorter lines that are more-or-less complete clauses. It makes the diffs much nicer if future edits are made


### For Loop

Another way we can approach this would be to use the for-loop. This method will be a bit slower.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily slower - actually this one might be a good candidate for a benchmarking run at the end.

Julia can often optimize for-loops like this, which is one of the things that makes it so powerful. You get SIMD from the count version, but you can also potentially make the for-loop parallel.

Comment on lines +58 to +59


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Some excessive line breaks here

hamming(ex_seq_a, ex_seq_b)

```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants