View on GitHub

Kenneth V.

Personal Website for CSE 15L

back to main page

Lab Report 5 - Week 10

More Debugging w/ Large Code Bases

Yoooooo, this is the fifth and final lab report for CSE 15L! There isn’t nothing special this time around about debugging, but it’s more about the specifics of debugging and making it more versatile.

Within debugging, there’s a lot more useful things to make testing your code more convenient. In this case, we could use scripts and using vim to have more control to our code & tests.

 

Using vimdiff

If we have two separate programs which do the same function, how do we compare the results when we are dealing with a huuuuge amount of tests & files? Surely you aren’t going to look at each file one by one…? That’s going to take forever, so to compare how two programs’ results of the same function, we can use a vim command!

The command I used to find the different results of two MarkdownParse programs (mine & lab 9’s) is vimdiff, where I compared two text files with one and another to see if the results match or are different!

The specific command I used for vimdiff is:

vimdiff my-markdown-parser/results.txt markdown-parser-lab9/results.txt

 

Test 421

For the test case #421, using vimdiff, here are the results:

Image

The test file for #421 is:

**foo [bar](/url)**

So what was wrong with my implementation?

Image

 

Test 194

For test case #194, using vimdiff, the results are:

Image

The test file for #194 is:

[Foo*bar\]]:my_(url) 'title (with parens)'

[Foo*bar\]]

So what went wrong compared to my markdown and lab 9’s markdown implementation?

Image

Conclusion

To sum it up, there is no perfect MarkdownParse, where each one has its advantages than others (includes weaknesses & flaws). For the most part, my MarkdownParse had a huge difference than lab 9’s MarkdownParse due to my code checking if it is an actual & real valid link, while lab 9 does not check for syntax issues. Either way, if it works, it works.

Shoutout to the amazing TAs & the Prof himself for making the course interesting and neat! While sometimes I felt that some weeks were a hassle, I overall enjoyed the course. Until next time folks!

back to main page