Codequestion interagration

Skill name: codequestion-skill

User story:
As a devoloper it would be cool to be able to ask a coding questioning and have some useful tips be read back to you.

What third party services, data sets or platforms will the Skill interact with?

https://github.com/neuml/codequestion is already a program for doing this via the command line by itterating over a parsed and local copy of stackexchange answers

Are there similar Mycroft Skills already?

See https://github.com/MycroftAI/mycroft-skills for a list. If so, how could they be combined?

What will the user Speak to trigger the Skill?

I guess it would be a question fall back system, because ideally it’s
“how do I itterate a list in python again?”
“How do I make a gui in python?”
“How do I read input as string with rust?”
etc

What phrases will Mycroft Speak?

It might read the question and ask if that works if the confidence is low:
“You want to know “How do I create a map from a list in a functional way?” is this correct?”

If the confidence is high it will just read the answer in chunks:
"Use Iterator::collect① :
[1] http://doc.rust-lang.org/std/iter/trait.Iterator.html#method.collect

| use std::collections::HashMap;
|
| fn main() {
| let tuples = vec![(“one”, 1), (“two”, 2), (“three”, 3)];
| let m: HashMap<_, _> = tuples.into_iter().collect();
| println!("{:?}", m);
| }"

Mycroft:“Would you like me to repeat or go on?”

User: “go on”

Mycroft:"collect leverages the FromIterator trait① . Any iterator can be collected into a type that implements FromIterator. In this case, HashMap implements it as:
[1] http://doc.rust-lang.org/std/iter/trait.FromIterator.html

| impl<K, V, S> FromIterator<(K, V)> for HashMap<K, V, S>
| where
| K: Eq + Hash,
| S: HashState + Default,

Said another way, any iterator of tuples where the first value can be hashed① and compared for total equality② can be converted to a HashMap. The S parameter isn’t
exciting to talk about, it just defines what the hashing method is."

reading the lines with “|” slower and pausing between each a little may also be very helpful

What Skill Settings will this Skill need to store?

You could let people set the db from here, but that isn’t implement yet in codequestion and maybe a little more advanced than needed

Maybe coding languages preference, but this is also not yet implemented in codequestion which is where it should be put first

Lastly one other obvious thing would be intergrate with the plasma applet (and I assume mark2 interface), as the actually coding bits would be nice to see I think for most people