Comments (5)
I'll give the @since
a look. In general I use them when developing in the future will be easier for me. Rather than look through old commit logs, it's easier to read when something happened inline.
As a sidenote, I think there's way too much inline documentation.
I've addressed this in the code. :)
* A note to plugin developers and theme makers: you may be wondering why I've taken
* the time to document code that to seasoned vets seems obvious, for example explaining
* that functions inside of classes are called methods. The reason I've done this is primarily
* because there was a time when looking at the following code would have made absolutely no
* sense to me. At that time, I would have loved for there to have been robust inline documentation
* explaining to me what was happening. Consider the following documentation a gift to newbies and
* also a gift to my future self, who will undoubtedly look back on some of what I've written here
* with confusion and chagrin.
That documentation is for me more than anyone else. Happy to take the "more documentation because I'm selfish and need reminders of why I did something" route over the "way too much information" route.
from subtitles.
That documentation is for me more than anyone else. Happy to take the "more documentation because I'm selfish and need reminders of why I did something" route over the "way too much information" route.
The existing documentation actually makes this unusable for me, as I can't tell what's happening in the code - it's hard at times to even find what code's executing. For example:
/**
* Put together the final title and subtitle set
*
* @since 1.0.0
*/
$title = $title . ' ' . $subtitle;
It's immediately obvious to those reading the code that you're combining title and subtitle with a space, the documentation here is completely superfluous.
I'm not against inline documentation, but there's certainly the ability to go overboard here.
Rather than look through old commit logs, it's easier to read when something happened inline.
That's exactly what git blame
(and svn blame
, etc) is designed for, and it gives you a much richer history.
from subtitles.
This is as much for beginners as it is for advanced developers, like you. I totally get what you're saying but I doubt I'll remove those notes. They're more helpful to me than they are harmful.
from subtitles.
FWIW, here's what the main class looks like stripped down to 391 lines. IMO, it still has liberal amounts of documentation, but is much more readable.
I understand if you don't want to remove the documentation, but keep in mind that inline docs are much like whitespace in designs: the right amount is great, but too much will make it unreadable.
from subtitles.
Cheers.
from subtitles.
Related Issues (20)
- Subtitle not shared on Facebook and co. HOT 3
- wp_seo_get_bc_title is deprecated HOT 13
- Maybe don't load CSS when 'subtitle_view_supported' filter is set to false HOT 1
- Gutenberg Support HOT 7
- Confirm bbPress Compatibility
- USER question re MarsEdit HOT 2
- Astra theme and comment title HOT 1
- Subtitles in custom page not showing HOT 6
- Not Showing Any More HOT 3
- Can't see subtitle box in Gutenberg HOT 1
- the_title echos both title and subtitle
- Option to keep HTML tags in subtitle fields
- Subtitle field not displaying on Page/Post add/edit form.
- Show subtitles in post loops HOT 2
- Examples
- the_subtitle logic check HOT 2
- Subtitles on Portfolio HOT 4
- multiple subtitles HOT 1
- Feature Request: above OR below HOT 5
- Changing Font Size HOT 3
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 subtitles.