Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify intent of the "projects" page #224

Closed
wants to merge 1 commit into from

Conversation

WasabiFan
Copy link
Member

These changes rename the page to "Project showcase" and adds some clearer language to the intro paragraph. It now reads:

This is where we keep a collection of some of the most interesting projects that people are working on using ev3dev. We invite you to click through the links below to see what cool stuff ev3dev can do!

I'm not sure if there needs to be added wording which explicitly says that these projects might not be easy to replicate. @dlech @ndward thoughts?

Fixes ev3dev/ev3dev#732

title: Projects
excerpt: "This is where we keep a collection of some of the projects that people are working on using ev3dev. We invite you to click through the links below to see what cool stuff ev3dev can do!"
title: Project Showcase
excerpt: "This is where we keep a collection of some of the most interesting projects that people are working on using ev3dev. We invite you to click through the links below to see what cool stuff ev3dev can do!"
Copy link
Member

@dlech dlech Sep 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling that saying "most interesting" would make some (most) people shy way from submitting projects to be included because they feel they are not interesting enough.

Maybe we can just call these "user-submitted projects"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... I see your point. I'm trying to come up with language that makes it clear that it's just a set of projects that people have shown us and isn't examples. How do you think the sentence can be changed to include that? "this is where we keep a collection of user-submitted projects..."?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a project or two that could be reproduced by a beginner (like demos from one of the libraries), and also introduce classification of the projects by level (beginner, intermediate, advanced)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another idea: I like how on lego mindstorms page they have several 'official' robots that may be easily reproduced by a newcomer, and then they have a gallery of community projects. We could even provide programs for those stock robots (and build instructions are already available on lego.com).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a project or two that could be reproduced by a beginner (like demos from one of the libraries), and also introduce classification of the projects by level (beginner, intermediate, advanced)?

I've been debating with myself over how this could be done best. On one hand, the existing projects page could make sense to be used for this; we just mark all (or most of) the existing projects as "Advanced" and our problem is solved. On the other hand, it could make sense to have a separate"examples" page and specify that the projects are a showcase while the examples are things you can try at home. I think I'm leaning in the direction of the former.

I like how on lego mindstorms page they have several 'official' robots that may be easily reproduced by a newcomer, and then they have a gallery of community projects. We could even provide programs for those stock robots (and build instructions are already available on lego.com).

Assuming that they license those models in a way that we could use them (with attribution of course), I think that would be great. We could also include the simplest ones like the demo bot that Laurens created. That would, of course, mean that one of us has to build and test the elephant 😆! But yes, I think that it would be great to provide source code for these things. And doing it in multiple languages would be very cool! We currently lack good end-to-end examples like that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I bought the mindstorms set (for my kids, of course), I've created all of the stock robots from that page, and programmed those in python. I still have the sources, so I could update those to the latest kernel version if we decide to do this.

@dlech
Copy link
Member

dlech commented Sep 24, 2016

I would still like to change "most interesting"

@WasabiFan
Copy link
Member Author

Yeah I have left this one alone so far because I want to investigate the discussed broader changes, so I haven't bothered to make that localized fix until I figure out the rest of it. Would you rather I make that change and then figure out the rest of it later?

@dlech
Copy link
Member

dlech commented Sep 24, 2016

Doesn't matter to me either way. I just wanted to make sure you weren't waiting on me.

@WasabiFan
Copy link
Member Author

@ddemidov Could you look into updating the source code for those demo robots to the current library/kernel version? I think I have a reasonable idea of what I want to do here with the projects page, so I wanted to give you some notice that I was planning to design something around them. This probably won't happen for at least a couple days, though.

@ddemidov
Copy link
Member

Could you look into updating the source code for those demo robots to the current library/kernel version?

I will look into this. I think a pull request to the ev3dev-lang-python repo would be a good way to do this?

@WasabiFan
Copy link
Member Author

WasabiFan commented Sep 24, 2016

Hmmmm... I think that makes sense in general, but I'm wondering how I would then link to it; do I link to the master branch, so that we are dependent on a release of that repo to update the examples? Or do I link to develop and risk bringing people to unfinished code? That issue is making me think we might want it in its own repo, but then the python library doesn't get the benefit of those extra samples (maybe as a submodule?). What do you think?

There's also a chance that I might decide I want to embed the code on the page, in which case we will have to get creative with where we put it (because it's difficult to embed from a repo). Let's figure that out if/when we get there.

Can you give me a list of the demo scripts that you expect to have?

@ddemidov
Copy link
Member

I am starting with EV3RSTORM, and @dwalton76 already has TRACK3R in the demos. I also had scripts for bobb3e, gripp3r, kraz3, and rac3_track. I guess these will come one at a weekend or slower, since I need to actually build the robots to test the functionality.

@WasabiFan
Copy link
Member Author

Ok, sounds good; thanks for doing this! I posted here now because I expected it to take a while, so there's no rush. Once you get the scripts done, can you send them to me (maybe as you complete them) so that I can translate them to JavaScript? I won't need to test them with the actual build models, I can just plug in some motors and sensors to make sure it seems right; I'll assume that the core numbers and such work based on your versions. That way, we'll have them for multiple languages.

@ddemidov
Copy link
Member

How are you intending to publish those? Just as code samples on the website? Or do we create a standalone repo with subdirectories for languages/models (or a repo per model per language)?

@dwalton76
Copy link

@ddemidov any chance I can talk you into creating a RemoteControlledTank child class for those builds? bobb3e, EV3RSTORM, kraz3, gripp3r and rac3_track could all expand on that Tank class, the child classes would just need the logic for the medium motor and the sensors.

@ddemidov
Copy link
Member

any chance I can talk you into creating a RemoteControlledTank child class for those builds?

That's a good idea, although I am not sure how suitable would that be as demo for beginners. @WasabiFan, @ndward, what do you think?

@dwalton76
Copy link

or even better you could do

class EV3RSTORM(object):

    def __init__(self)  
        # medium motor and sensor code here

class EV3RSTORMRemoteControlled(EV3RSTORM, RemoteControlledTank):
    pass

class EV3RSTORMWebControlled(EV3RSTORM, WebControlledTank):
    pass

And then you can drive it via the IR remote or via a web interface

@WasabiFan
Copy link
Member Author

How are you intending to publish those? Just as code samples on the website? Or do we create a standalone repo with subdirectories for languages/models (or a repo per model per language)?

I'll do it by mirroring however we decide to do it on the Python side. As I mentioned earlier, I have some concerns over putting it in a repo which is tied to the library, so I will have to think about that. If we decide to put the Python ones in the demo directory of the Python library repo, I'll put the JS ones in the equivalent on the JS repo. If we want to make a separate repository, we can either give each language a folder in the same repository or create individual repos.

That's a good idea, although I am not sure how suitable would that be as demo for beginners. @WasabiFan, @ ndward, what do you think?

If this were a demo of good programming practices for a coherent project, I would say "go for it" without hesitation. However, since these demos are more like individual projects and are targeted at beginners, I would vote for keeping each one self-contained even if it means duplicating code.

@dwalton76
Copy link

Just my 2c here....we should be both encouraging beginners to use good programming practices and making it easy for them to get started with coding their own projects. Teaching them to use the Tank base classes (maybe just the IR remote base class to simplify things a little) takes a step towards doing both of those things. It would also be much easier for us to help users with their programs if they are building on the base classes and not duplicating or writing so much code on their own.

@WasabiFan
Copy link
Member Author

Oh, are you suggesting using a class included in the library? If so, I think that's fine; I was imagining defining a class externally for these demos, which I would rather not do. If the idea is that it would be included with the core lib, I'd be fine with that.

@dwalton76
Copy link

yep RemoteControlledTank and WebControlledTank are both in ev3dev/helper.py

@ddemidov
Copy link
Member

Here is my take on ev3rstorm: https://gist.github.com/fc6987229e8f846dbf157f6f063aac26

This does not do much, just allows to move the robot and shoot the ball with the remote control. Oh, and it also recites depressing quotes from Marvin the Paranoid Android when something that should be connected is not :).

@ddemidov
Copy link
Member

I still think that to be able to see the whole code is important for beginner to understand whats going on and to move forward. {Remote,Web}ControlledTank hide a lot of functionality behind the scene (especially since those are part of the library), so I am afraid they would be indistinguishable from magic for a learner.

@WasabiFan
Copy link
Member Author

@ddemidov I'll leave it up to your judgement as to which way you want to go; you're the one working with the code, so you have the best POV to see the complexity of it. If you think it would be best to roll it into the demo code, go for it.

@ddemidov
Copy link
Member

ddemidov commented Sep 25, 2016

I've also added c++ version there. Still thinking where to put these examples. May be we could put them somewhere around 'Libraries' page, similar to how lego mindstorms has 'build a robot' button; then we could provide an example in each language (in tabs?).

@WasabiFan
Copy link
Member Author

You mean where we put them on the site? I'm imagining either a section on the "projects" page or a separate "example robots" page. There would be an index of the robots we have, and then on the page for an individual robot the sidebar would have links to the build instructions and source code in various languages. Thoughts?

@ddemidov
Copy link
Member

There would be an index of the robots we have, and then on the page for an individual robot the sidebar would have links to the build instructions and source code in various languages. Thoughts?

I like this. We could turn those into language-specific tutorials. The ev3rstorm demo covers most of the available functionality (motors, sensors, remote-control, sound), so it can be sort of overview of the programming possibilities.

@WasabiFan
Copy link
Member Author

Good point; these could be very nice demos of core functionality.

@ndward
Copy link

ndward commented Oct 5, 2016

On the projects page, I think this information should be included for each project as a minimum: language and level (Beginner / Intermediate / Advanced).

Currently, when one clicks a project link, one can find the language (though no distinction is made between Python 2 and 3, which would be helpful) and perhaps a link to source code and the build instructions. I think that all the following info should be given:

  • Level: Beginner / Intermediate / Advanced (Note that 'beginner' is probably only meaningful for Python since I don't think beginners would be using any other EV3dev language)
  • Language (making a distinction between Python 2 and 3)
  • Link to source code and build instructions
  • Has code been checked to work with latest image?
  • Can the model be built with a standard home EV3 kit?
  • Can the model be built with the standard educational EV3 kit?
  • If the model cannot be built with standard kit, what extra hardware is needed?

I'd actually be in favour of a separate page for 'Beginner Python Projects', even though that would overlap with the purpose of www.ev3python.com. Alternatively, perhaps you could include a link to www.ev3python.com from the Projects page, for Python beginners?

It's frustrating to me that you are happy to link to many projects for which the code is not ready to run (often outdated) but still won't link to my site where there are dozens of code samples that ARE all ready to run.

I like how on lego mindstorms page they have several 'official' robots that may be easily reproduced by a newcomer, and then they have a gallery of community projects. We could even provide programs for those stock robots (and build instructions are already available on lego.com).

I think the best official Lego model, the one that we should promote as a standard, is the one that is used for all the exercises in the educational version of the EV3 software: the 'driving base' model, also known as the 'robot educator' model. It's designed to accept the gyro sensor, touch sensor, US or IR sensor, light sensor and a gripper attachment SIMULTANEOUSLY and is compatible with both home and educational editions (edu edition would use US sensor, home edition would use IR sensor and would need a wheel assembly in place of the castor wheel). Build instructions are at http://robotsquare.com/wp-content/uploads/2013/10/45544_educator.pdf The other official Lego models are all designed to be made with the home kit and would be difficult or impossible to make with the education kit. Furthermore, the other models have an emphasis on 'cool looks' rather than versatility whereas the focus at ev3dev.org is on programming rather than looks.

@WasabiFan
Copy link
Member Author

On the projects page, I think this information should be included for each project as a minimum: language and level (Beginner / Intermediate / Advanced).

Yes, that is one of my primary goals with this round of example additions / modifications. I plan to introduce this information. Thanks for the suggestion!

Has code been checked to work with latest image?

We can't guarantee compatibility for all the community projects. We will for the ones which are "official" as discussed above, but the community ones aren't necessarily well-maintained. This is something I will make clear when we add this separate section.

It's frustrating to me that you are happy to link to many projects for which the code is not ready to run (often outdated) but still won't link to my site where there are dozens of code samples that ARE all ready to run.

We have discussed this already: I have every expectation of linking to your site in multiple places, it's just a matter of me getting time to review your content and get our site updated. We have a large backlog of other improvements we're trying to make to the site (mostly to make it easier to use for beginners) so this is something that's on the list, but we can't guarantee when it will be.

I'd actually be in favour of a separate page for 'Beginner Python Projects', even though that would overlap with the purpose of www.ev3python.com. Alternatively, perhaps you could include a link to www.ev3python.com from the Projects page, for Python beginners?

ev3dev.org isn't specific to Python, so we need to make sure we are supportive of al users and not just focusing on Python. That said, we do treat Python as a first-class language and will be sure to provide working Python code for all of our official projects. I'm not going to say anything definitive about the projects that you have until I get some time to look at the situation more closely, but I assure you that we will make sure that Python is well-supported and that your site is shown off.

I think the best official Lego model, the one that we should promote as a standard, is the one that is used for all the exercises in the educational version of the EV3 software: the 'driving base' model, also known as the 'robot educator' model

We expect to provide information on all of LEGO's main demo robots, including this one I believe. We'll put the most beginner-friendly and versatile ones first, and community ones at the bottom. I'll pay special attention to this one now that you mentioned it.

@dlech
Copy link
Member

dlech commented Oct 5, 2016

It's frustrating to me that you are happy to link to many projects for which the code is not ready to run (often outdated) but still won't link to my site where there are dozens of code samples that ARE all ready to run.

The difference is that the other people have gone through the trouble of sending us a pull request to include their content and you have not. If you do the work of making a pull request, we will be very happy to link to your site. If you expect someone else to do the work for you, then complaining about it only makes me less sympathetic.

@ndward
Copy link

ndward commented Oct 6, 2016

Thanks for the tip. It's the first time, I think, that anyone has suggested to me that I should make a 'pull request'. Being a Github newbie, I have no idea what that is, but I will try to find out.

@WasabiFan
Copy link
Member Author

We recognize that you're unfamiliar with these tools, which is why I have generally been working with you to make these changes. If you were someone who clearly knew what they were doing on GitHub and were simply not willing to do the work, it would be different. But one of the results of us making these changes for you is that we do it on our schedule, and the work is often queued behind other tasks and done at our discretion. If you'd like to do some learning and make the changes yourself, you can expedite the process and take more control over the outcome.

If you are trying to submit a project, we have a tutorial for that -- it walks you through the whole process using the GitHub web interface in your browser.

@ndward
Copy link

ndward commented Oct 6, 2016

I've found the official Github help on 'pull requests' at https://help.github.com/articles/about-pull-requests/ which says that 'Pull requests let you tell others about changes you've pushed to a repository on GitHub.' As far as I know, I haven't 'pushed any changes to a repository' so I'm confused about why I would need to submit a 'pull request'. Nor do I consider that I am 'trying to submit a project'. Please understand that I am simply impatient to help beginner programmers discover the joys of EV3 Python as soon as possible, having spent so long working on my site. Adding a link to my Google site takes me about 20 seconds but I understand now that making a change to ev3dev.org is a less spontaneous and more complex affair. I won't make a pull request because it seems too complicated - I'll just continue to hope that you will at some point include a link to my site.

@rhempel
Copy link
Member

rhempel commented Oct 6, 2016

We just as anxious as you to get people using Python on EV3 - but as @WasabiFan has already pointed out it's something we do when we have time.
I used to maintain my own projects separately from the "root" site of other open source projects because I thought my work was better or faster or I wanted to maintain control.
I now just follow the process of the root site because that is where my contributions will have the most benefit.
Please try to use github again to add one of your projects to our project. We will help you get started as a contributor to our site and your models and knowledge will get first class representation.
There has been a lot of effort spent to help get your understanding of basic concepts such as speed and power level sorted, and you have very good insight and feedback on first time user experience.
Let's work together to make one site as the standard for getting Python on the EV3 instead of working on two sites

@dlech
Copy link
Member

dlech commented Oct 6, 2016

FYI, most pages on our website have an "Edit on Github" button...

screen shot 2016-10-06 at 12 23 59 pm

It does most of the work for you. You can edit the the page in your web browser. When you have committed your changes (big green button at the bottom of the edit page), GitHub will ask you if you want to create a pull request.

@rhempel
Copy link
Member

rhempel commented Oct 6, 2016

We just as anxious as you to get people using Python on EV3 - but as @WasabiFan has already pointed out it's something we do when we have time.
I used to maintain my own projects separately from the "root" site of other open source projects because I thought my work was better or faster or I wanted to maintain control.
I now just follow the process of the root site because that is where my contributions will have the most benefit.
Please try to use github again to add one of your projects to our project. We will help you get started as a contributor to our site and your models and knowledge will get first class representation.
There has been a lot of effort spent to help get your understanding of basic concepts such as speed and power level sorted, and you have very good insight and feedback on first time user experience.
Let's work together to make one site as the standard for getting Python on the EV3 instead of working on two sites

@ddemidov
Copy link
Member

ddemidov commented Oct 7, 2016

@WasabiFan, @ndward, I've pushed the EV3RSTORM demo here: https://github.com/rhempel/ev3dev-lang-python/tree/develop/demo/EV3RSTORM.

Next in line is R3PTAR. I'll port the tail-waggling and hand-biting official example: it will give us an opportunity to demonstrate python threads in action.

@WasabiFan
Copy link
Member Author

Great! I'll take a look when I get a chance. Thanks for doing this.

@dwalton76
Copy link

Very cool thank you @ddemidov

@ddemidov
Copy link
Member

ddemidov commented Oct 7, 2016

R3PTAR turned out to be easy to program: https://github.com/rhempel/ev3dev-lang-python/tree/develop/demo/R3PTAR

@dwalton76
Copy link

For R3PTAR isn't there a motor that will let you drive it back and forth?

@dwalton76
Copy link

Also if you ctrl-C R3PTAR do both threads shutdown?

@ddemidov
Copy link
Member

ddemidov commented Oct 7, 2016

@dwalton76, yes to both questions. The R3PTAR model does have another motor, but it is not used in this example. Both threads will terminate on keyboard interrupt (tested on ev3 with the actual model), but now that you asked it, and after some googling, I am not sure I understand why they do this.

@ddemidov
Copy link
Member

ddemidov commented Oct 7, 2016

May be that's something that changed in python3. I am able to stop the following script when run with python3, but not with python2:

import time
import threading

def worker():
    while True:
        print('working')
        time.sleep(1.1)

def idler():
    while True:
        print('idling')
        time.sleep(1.3)

threading.Thread(target=worker).start()
threading.Thread(target=idler).start()

EDIT1: may be we should move this discussion elsewhere.

EDIT2: It looks like the canonical way to do this example interruptable would be to

threading.Thread(target=worker, daemon=True).start()
idler()

in python3 or

t = threading.Thread(target=worker)
t.daemon=True
t.start()
idler()

in python2.

@WasabiFan
Copy link
Member Author

@dwalton76
Copy link

I've always had to use a signal handler for SIGTERM and SIGINT where the handler sets some shutdown boolean to True that each thread is watching for as a signal to exit. All of my experience is with python2 though so if they have made this easier in python3 that is good news.

@WasabiFan
Copy link
Member Author

Let's continue this discussion in #269. I might use the commits from this PR for that one, but they won't be in their current form with the plan as it stands right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants