Comments (9)
[deleted comment]
from markdownsharp.
[deleted comment]
from markdownsharp.
Markdown.cs has always been a single file by design; not sure why arbitrarily
breaking it into other files would help.
However, if you're referring to the test project, I am open to whatever changes
make
sense there.. I am not very experienced with unit tests.
Original comment by [email protected]
on 26 Dec 2009 at 10:12
from markdownsharp.
Well, I find that maintaining code files of more than ~300 lines to be
difficult. If I find a good way to split it up
and post a patch for it, would you at least have a look at it? I'd be happy to
help with unit testing as well, which
would be much easier to split up into smaller parts if the code it tests is
split up as well.
The unit tests should, by namespace, class file and method name, precisely
describe exactly what they test. If all
the code they test is lumped together in one file, it's harder to separate the
tests into logical parts.
Original comment by asbjornu
on 26 Dec 2009 at 10:43
from markdownsharp.
While I agree that code files should be as short as they can be, I think
markdown
makes the most sense as one file. I have no preference on the unit tests.
What specifically is so difficult about maintaining a file with more than 300
lines?
Can you provide some examples of where this is a problem? I guess I just don't
get
it. I don't have any problems working with it; I typically navigate using
incremental
search.
http://www.codinghorror.com/blog/archives/000432.html
Original comment by [email protected]
on 30 Dec 2009 at 7:28
from markdownsharp.
The problem isn't the search. It's requiring search itself to being able to
navigate the code. While incremental
search is fantastic, I find a shorter, narrower entrance to any code to be much
more intuitive than a 1.000 mile
wide gate with little direction. If the code is segmented into logical groups,
I find that it's easier to follow and
understand. It's not a big issue. I can provide patches for it and you can
decline them if you want to. I'll have a
look on unit testing as well when I dive into it.
Original comment by asbjornu
on 1 Jan 2010 at 5:41
from markdownsharp.
One problem with large classes is that if all code is in one class, sometimes
private
method access just isn't good enough. If you have a private method in a large
class,
it isn't instantly obvious to the reader whether it's used one time or one
hundred
times.
Here is a patch that demonstrates that to some extent.
If I had a copy of Clean
Code(http://www.amazon.com/Clean-Code-Handbook-Software-
Craftsmanship/dp/0132350882/ref=sr_1_1?ie=UTF8&s=books&qid=1262375524&sr=8-1)
handy I
think I could dig up some more well-worded justifications for this.
Original comment by [email protected]
on 1 Jan 2010 at 7:52
Attachments:
from markdownsharp.
I appreciate the contribution, but I just don't agree that we need a whole
*class*
called "Detabber" just to hold a single detab() routine.. and another called
"Outdenter" to hold a single outdent() routine.
Original comment by [email protected]
on 4 Jan 2010 at 12:30
from markdownsharp.
Fair enough. In my mind "a whole class" is not very much. Classes are
lightweight
things that can be used to limit scope. A class should be something small and
easy to
understand.
But, I recognize that not everything thinks that way.
I will see if I can find another way to help.
Original comment by [email protected]
on 4 Jan 2010 at 12:40
from markdownsharp.
Related Issues (20)
- title element not escaped
- Problem with auto email links
- Add link to Pagedown on the project home page. HOT 1
- Allow to set base url for relative url
- URL detection bug for URLs that contain parentheses
- f3973492a27c breaks ConfigTest.TestEncodeProblemUrlCharacters
- Enable EmailEncoding as an option HOT 1
- <code> tags are rendered inside of <pre> for code blocks
- Add option to avoid Paragraph around single element
- Support Pandoc Extensions to Markdown
- Add Strikethrough
- Have the option to add a prettify class name to the <pre> tags
- URL: Support protcol-relative URLs
- Auto-URLs are breaking with any url that has an underscore HOT 1
- Strange <p> tag placement
- Unit test error: MarkdownSharpTests.ConfigTest.TestEncodeProblemUrlCharacters HOT 1
- AutoNewlines set through MarkdownOptions replaces EOL with <br instead of <br />
- Add SkipCodeBlocks Option HOT 1
- Migrate to GitHub! HOT 1
- Sponsor an official nuget package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdownsharp.