Skip to content

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added benchmarking! The for-loop was a bit slower, but not suuuper slow! Cool!

danielle-pinto and others added 4 commits February 6, 2026 12:18
Co-authored-by: Kevin Bonham <kevbonham@gmail.com>
Co-authored-by: Kevin Bonham <kevbonham@gmail.com>
@danielle-pinto
Copy link
Collaborator Author

Semantic line breaks have been added, as well as some benchmarking. I did a last minute check for typos. Hopefully this tutorial will be ready for deployment after a final review!

@danielle-pinto
Copy link
Collaborator Author

I'm going to try pinning a different version of Documenter Vitepress due to an error with MathJax (related to the update that they made in v3.0.

I'm happy to use a different solution, but thought this would be most straightforward for now.

Deployment error here: https://github.com/BioJulia/BioTutorials/actions/runs/21789778782/job/62867068788

@danielle-pinto danielle-pinto merged commit bfc070e into main Feb 8, 2026
1 check passed
@danielle-pinto danielle-pinto deleted the 2026-01-27-hamming-distance branch February 8, 2026 01:41
@danielle-pinto danielle-pinto restored the 2026-01-27-hamming-distance branch February 8, 2026 02:00
@danielle-pinto
Copy link
Collaborator Author

The deployment seems to have worked on Github Actions. However, I'm now getting a 404 error on the site!

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