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

Make it easier for people to contribute #98

Closed
vannaka opened this issue Apr 2, 2017 · 3 comments
Closed

Make it easier for people to contribute #98

vannaka opened this issue Apr 2, 2017 · 3 comments
Labels
enhancement Minor feature or request help wanted Extra attention is needed

Comments

@vannaka
Copy link

vannaka commented Apr 2, 2017

Firstly, this is by far the best scouting app out there. As such, I would like to help contribute to the development. I am having trouble getting started.

First, I see there are .sh files. Are you developing on linux? Does this mean I need to develop on linux? Are you using android studio? Maybe you could write a wiki page on how to setup the build environment.

Second, I am having trouble following your code. I couldn't help but notice the lack of comments in the code. Comments would greatly improve the readablity.

@SUPERCILEX SUPERCILEX added enhancement Minor feature or request help wanted Extra attention is needed labels Apr 2, 2017
@SUPERCILEX
Copy link
Owner

@vannaka I'm glad you want to contribute! Since I just open-sourced RS this week and have been developing it mostly on my own, I haven't put much effort into documentation for lack of time. However, if you find parts of the code that are really hard to understand, feel free to ping me on this thread and I'll be happy to answer any questions. (Maybe you could even submit a PR adding documentation 😉)

As for instructions, I do have a teeny setup guide in the main README. However, it sounds like you are unfamiliar with Android development so I'll try to give you some extra info.

Getting started with AnDev

There's an in-depth tutorial on Android development here, but it assumes that you know nothing about prgoramming so you could probably skip some steps.

I would highly recommend going through Google great tutorials which should help you understand some of the key constucts of AnDev.

In my opinion, WPILIB does a poor job of teaching us how to program high quality Java. I'm not saying RS is the best example of high quality Java, but I feel like WPILIB is a mess when it comes to using proper abstraction. I find that WPILIB makes it difficult for newbies (me a year ago) to understand interfaces, anonymous inner classes, and composition vs inheritance, key concepts I found necessary to understand AnDev. However, with practice, I think you (or any other FRC programmer) can totally start feeling familiar with the RS codebase and how it works.

Setup

Once you go through Google's tutorials, I think you'll know where everything is more or less. However, I'll give you a TLDR. The *.sh files are used for build automation on my Travis CI server so you don't have to care about those. The *.gradle files are used to build the project by pulling in the Android Gradle Plugin dependency which does all the heavy lifting. If you're using Android Studio or Intellij, you shouldn't have to do anything and the project will build when you import it.

Brief intro to the RS codebase

Here is the package structure as it stands:

  • com/supercilex/robotscouter
    • RobotScouter.java: here is where some of the key Firebase stuff is initialized.
    • util/
      • Here you will find the Constants.java class that has some key constants used throughout the app. In addition, you'll find the DatabaseHelper, FirebaseAdapterHelper and a few other helpers.
    • data/
      • service/
        • This is where you'll find the services to fetch TBA info and index the teams for Firebase App Indexing
      • model/
        • Here are all the model classes that represent JSON objects in the Firebase real-time database (RTDB)
      • remote/
        • These classes actually perform the network calls to fetch the TBA team info
      • util/
        • In here are helpers to do stuff like add/remove teams from the RTDB, fetch data from the RTDB, or parse DataSnapshots (Firebase's equivalent of a JSON object)
    • ui/
      • Here is where all the user interaction stuff happens
      • teamlist/
        • All of the classes in here are responsible for doing stuff in the main list of teams Activity
      • scout/
        • The classes in here are responsible for doing stuff in the scouting Acitivity
        • template/
          • This is where the template editing stuff goes

If you're just transitioning from Eclipse to Android Studio/Intellij shortcuts are your friends. Ctrl + B is the main one to learn when exploring a new project; it goes the the declaration of something so you can see what it does.

@vannaka
Copy link
Author

vannaka commented Apr 2, 2017

Thank you for the great info. I really want to help with this app as I see the huge potential. I think with a little work it'll be the go to scouting app and I look forward to being apart of it. 👍

@SUPERCILEX
Copy link
Owner

@vannaka awesome!

@vannaka vannaka closed this as completed Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Minor feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants