Closed BethanyG closed 6 years ago
Attached is a snippet of our "test" or "mocked up" file. More fields could be added - this was just for POC (PLEASE NOTE: the BEG/INT/ADV are only there for TESTING!! This is mocked up data)
resources:
-name: "JSBeg1"
sidebar-color: "#FFE633"
level: "Beginner"
language: "JavaScript"
language-icon: ":heart: :javascript:"
language-desc: "BEG Here\'s some resources to help you learn about the language!"
video-link: "BEG :cinema: <https://watchandcode.com/|Watch and Code>"
video-desc: "BEG Place to _watch_ coding & _practice_ coding."
tutorial-link: "BEG :books: <https://laracasts.com/series/es6-cliffsnotes|Laracasts ES2015 Crash Course>"
tutorial-desc: "BEG _This is the tutorial description._"
book-link: "BEG :books: <https://github.com/getify/You-Dont-Know-JS|You Don\'t Know JS>"
book-desc: "BEG _This is the book description._"
class-link: "BEG :male-teacher::skin-tone-5: <https://javascript30.com/|Wes Bos JavaScript30>"
class-desc: "BEG _This is the class description._"
help_link: "BEG :star: `If you get stuck` ---> :white_check_mark: out the <https://developer.mozilla.org/en-US/|Mozilla Developer Network> (Free). _JavaScript developers of all levels swear by it._"
more-questions: "BEG If you have any further :question: ---> you can always ask in <https://codebuddies.slack.com/archives/C04CA2079|#javascript>. :slightly_smiling_face:"
maintainer: "BEG _This is the *@maintainer* for this JavaScript resource. Bother them with feedback._"
-name: "JSInter1"
sidebar-color: "#B2FF33"
level: "Intermediate"
language: "JavaScript"
language-icon: ":heart: :javascript:"
language-desc: "INT Here\'s some resources to help you learn about the language!"
video-link: "INT :cinema: <https://watchandcode.com/|Watch and Code>"
video-desc: "INT Place to _watch_ coding & _practice_ coding."
tutorial-link: "INT :books: <https://laracasts.com/series/es6-cliffsnotes|Laracasts ES2015 Crash Course>"
tutorial-desc: "INT _This is the tutorial description._"
book-link: "INT :books: <https://github.com/getify/You-Dont-Know-JS|You Don\'t Know JS>"
book-desc: "INT _This is the book description._"
class-link: "INT :male-teacher::skin-tone-5: <https://javascript30.com/|Wes Bos JavaScript30>"
class-desc: "INT _This is the class description._"
help_link: "INT :star: `If you get stuck` ---> :white_check_mark: out the <https://developer.mozilla.org/en-US/|Mozilla Developer Network> (Free). _JavaScript developers of all levels swear by it._"
more-questions: "INT If you have any further :question: ---> you can always ask in <https://codebuddies.slack.com/archives/C04CA2079|#javascript>. :slightly_smiling_face:"
maintainer: "INT _This is the *@maintainer* for this JavaScript resource. Bother them with feedback._"
-name: "JSAdv1"
sidebar-color: "#4CFF33"
level: "Advanced"
language: "JavaScript"
language-icon: :heart: :javascript:"
language-desc: "ADV Here\'s some resources to help you learn about the language!"
video-link: "ADV :cinema: <https://watchandcode.com/|Watch and Code>"
video-desc: "ADV Place to _watch_ coding & _practice_ coding."
tutorial-link: "ADV :books: <https://laracasts.com/series/es6-cliffsnotes|Laracasts ES2015 Crash Course>"
tutorial-desc: "ADV _This is the tutorial description._"
book-link: "ADV :books: <https://github.com/getify/You-Dont-Know-JS|You Don\'t Know JS>"
book-desc: "ADV _This is the book description._"
class-link: "ADV :male-teacher::skin-tone-5: <https://javascript30.com/|Wes Bos JavaScript30>"
class-desc: "ADV _This is the class description._"
help_link: "ADV :star: `If you get stuck` ---> :white_check_mark: out the <https://developer.mozilla.org/en-US/|Mozilla Developer Network> (Free). _JavaScript developers of all levels swear by it._"
more-questions: "ADV If you have any further :question: ---> you can always ask in <https://codebuddies.slack.com/archives/C04CA2079|#javascript>. :slightly_smiling_face:"
maintainer: "ADV _This is the *@maintainer* for this JavaScript resource. Bother them with feedback._"
-name: "PyBeg1"
sidebar-color: "#335EFF"
level: "Beginner"
language: "Python"
language-icon: ":heart: :python:"
language-desc: "BEG Here\'s some resources to help you learn about the language!"
video-link: "BEG :cinema: <https://www.youtube.com/watch?v=lyDLAutA88s|David Beazley: Built In Superheros>"
video-desc: "BEG Beazley\'s simply the BEST."
tutorial-link: "BEG :books: <https://developers.google.com/edu/python/|Googles Python Course>"
tutorial-desc: "BEG _This is the tutorial description._"
book-link: "BEG :books: <https://automatetheboringstuff.com/|Automate the Boring Stuff with Python>"
book-desc: "BEG _This is the book description._"
class-link: "BEG :male-teacher::skin-tone-5: <https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-11|MIT Intro to CS Using Python>"
class-desc: "BEG _This is the class description._"
help_link: "BEG :star: `If you get stuck` ---> :white_check_mark: out the <https://docs.python.org/3/|Python3 Documentation> (Free). _Developers of all levels swear by them._"
more-questions: "BEG If you have any further :question: ---> you can always ask in <https://codebuddies.slack.com/archives/C04CA208R|#python>. :slightly_smiling_face:"
maintainer: "BEG _This is the *@maintainer* for this Python resource. Bother them with feedback._"
-name: "PyInter1"
sidebar-color: "#6E33FF"
level: "Intermediate"
language: "Python"
language-icon: ":heart: :python:"
language-desc: "INT Here\'s some resources to help you learn about the language!"
video-link: "INT :cinema: <https://www.youtube.com/watch?v=lyDLAutA88s|David Beazley: Built In Superheros>"
video-desc: "INT Beazley\'s simply the BEST."
tutorial-link: "INT :books: <https://developers.google.com/edu/python/|Googles Python Course>"
tutorial-desc: "INT _This is the tutorial description._"
book-link: "INT :books: <https://automatetheboringstuff.com/|Automate the Boring Stuff with Python>"
book-desc: "INT _This is the book description._"
class-link: "INT :male-teacher::skin-tone-5: <https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-11|MIT Intro to CS Using Python>"
class-desc: "INT _This is the class description._"
help_link: "INT :star: `If you get stuck` ---> :white_check_mark: out the <https://docs.python.org/3/|Python3 Documentation> (Free). _Developers of all levels swear by them._"
more-questions: "INT If you have any further :question: ---> you can always ask in <https://codebuddies.slack.com/archives/C04CA208R|#python>. :slightly_smiling_face:"
maintainer: "INT _This is the *@maintainer* for this Python resource. Bother them with feedback._"
-name: "PyAdv1"
sidebar-color: "#D433FF"
level: "Advanced"
language: "Python"
language-icon: ":heart: :python:"
language-desc: "ADV Here\'s some resources to help you learn about the language!"
video-link: "ADV :cinema: <https://www.youtube.com/watch?v=lyDLAutA88s|David Beazley: Built In Superheros>"
video-desc: "ADV Beazley\'s simply the BEST."
tutorial-link: "ADV :books: <https://developers.google.com/edu/python/|Googles Python Course>"
tutorial-desc: "ADV _This is the tutorial description._"
book-link: "ADV :books: <https://automatetheboringstuff.com/|Automate the Boring Stuff with Python>"
book-desc: "ADV _This is the book description._"
class-link: "ADV :male-teacher::skin-tone-5: <https://www.edx.org/course/introduction-computer-science-mitx-6-00-1x-11|MIT Intro to CS Using Python>"
class-desc: "ADV _This is the class description._"
help_link: "ADV :star: `If you get stuck` ---> :white_check_mark: out the <https://docs.python.org/3/|Python3 Documentation> (Free). _Developers of all levels swear by them._"
more-questions: "ADV If you have any further :question: ---> you can always ask in <https://codebuddies.slack.com/archives/C04CA208R|#python>. :slightly_smiling_face:"
maintainer: "ADV _This is the *@maintainer* for this Python resource. Bother them with feedback._"
Was pretty far away from the /resources
convo, so apologies if this has already been discussed!
// resources/python/advanced_resources/david_beazley_built_in_super_heroes.json
{
name: "David Bezley - Built In Super Heroes",
link: "https://www.youtube.com/watch?v=lyDLAutA88s",
type: "video",
description: "Beazley's simply the BEST."
}
// resources/python/advanced_resources/automate_the_boring_stuff_with_python.json
{
name: "Automate The Boring Stuff With Python",
link: "https://automatetheboringstuff.com/",
type: "book",
description: "Book description for the Python book"
}
Lastly, we can use a build system (I think Webpack has a plugin for this) that concats all of these JSON files together into a single JSON file (so should output something like resources/python/advanced_resources.json
) then that can be referenced accordingly.
Goals there are to be able to add singular resource easily in an organized manner; following a simple template - just need name
, link
, type
and description
.
If we look at this from a DB perspective, this also simplifies the table column tremendously as book
, video
, class
, tutorial
can be simplified down to type
and can also open us up for other kinds of resource types down the line (articles
, for example).
Thoughts??
cc: @stain88 (IIRC, I think the YAML was your suggestion, so would love your perspective here as well)
Easier to read is a personal choice, but I think yes. I think the main reason though is yml
is easier to dump into a DB than json
, but I may be wrong there too.
Concatenation would be possible, in much the same way as building up a json object, so I don't think there's any issue there. The multiple files then just comes back to Big File Tree, until the DB is set up.
Bear in mind this was just example data - there's still a lot that can be done with this, but depends if we want to release before the DB, or not. It could come down to high workload in this setup, but a simple WHERE call to the DB. Currently, the /resources
filter only works by language or level, but the idea under projects would be to also offer free|paid, book|video|class etc filters, so the attachment template would probably be smaller - name, description, link could be enough.
I am going to go ahead and fill out the single YAML file with the information we have. But I am edging closer to a DB for all of this.
The more I think about this, the more I'm leaning towards the one-file-per-resource idea (again, until the DB gets put in place). Globbing them all would be trivial, and it'll be easier to add other resources in.
Agreed. Per our run-through and our discussion. Going to close this issue, and open a new one around implementing the discussed tree structure, and porting our two examples to it, so that the templates and filters can be changed accordingly. I think we're quickly headed in the direction of a DB however. Wrangling all the files (good naming and organization non-withstanding) is quickly becoming a large job in of itself, and it would be lovely to have more hands on it. I think a DB with a simple set of entry fields as an interface is (further down the road) the way to accomplish that.
Linking #53, #54, #55, and #56 to this issue to reflect our change in organization/strategy.
This is also a sub-task of #4 - and is still in the proof of concept/WIP phase. In lieu (or parallel to) of putting all the info into a DB, we need some way to organize all the
/resources
and other/slash
command data for the bot messages. Current strategy we're blocking out is a YAML file with subject/link/string fields for various topics and resources. We know this won't solve all cases...and we may need several files, or a different strategy. But for now, we also would like to build out a file and see it in use.