create account

Competition Time by ajayyy

View this thread on: hive.blogpeakd.comecency.com
· @ajayyy · (edited)
$53.09
Competition Time
#### Repository
https://github.com/LakeEffectRobotics/LakeEffectScoutingApp
https://github.com/LakeEffectRobotics/LakeEffectScoutingServerApp

> ### What is this
> This is a scouting app developed for FIRST Robotics Team 2708. It is used to scout other robots at the competition. The data is sent from 6 client apps to the server over bluetooth throughout the course of the events. The server must manage and put everything together. Scouting is nessesary to be able to change your team's strategy and know what teams to pick to join your alliance.
 >### About this year's game
> In this years game, teams must score "cargo" into holes in rockets. If the cargo is put in without a hatch panel, then it will fall out. The hatch panels must be fastened on to the rockets and cargo ship to prevent the cargo from falling out.
> ![image.png](https://files.steempeak.com/file/steempeak/ajayyy/Kfvwvueh-image.png)

# Verification

Before, the app would only tell a user they forgot something when there was a default option available that was not possible to be true. This would not let the user submit until they set it to a valid option.

Now, the app also does verification. For example, robots are allowed to start with a game piece, either a cargo or a hatch. They are allowed to start with nothing though, it just does not happen that often. If the user selects that the robot started with nothing, the app now double checks the user meant what they wrote by showing a dialog box.

# Fixed crash on tablets

The app was crashing on tablets due to the tablet layout not having variables named correctly. This has been fixed.

# Editing scout name

The server now allows scout names to be edited in the user list. This makes it much easier to swap people out for new people, instead of adding a whole new user and deleting the old one.

# Buttons to move a name up and down

The name order affects which shift each scout is on, the order is now easily changeable with an up and down button on each name.

# Constant Bluetooth listening

This is a very important feature that probably should have been implemented far before now.

Before the user gets to the scouting page, they are on a start page. Now, the bluetooth listeners (used to sync data) start up on this page as well, making it possible to pull data from this page instead of requiring users to open up the full scouting app.

This will simplify the data pulling a lot.

# Schedule viewer for the user

The user can now see their schedule in the start screen. This makes it much easier to plan around when they must be scouting versus not scouting.

This works by getting the time off and time on of each user and showing when that happens. This makes the user know when they can leave and take a break from their work.

This was accomplished by caching some of the data from the actual app, so that it can be ready to be sent. This is because some of the data (specifically the labels), are dynamically generated in the app by going through all the open views and finding what buttons, checkboxes, etc. are there.

This is cached on the first app open for each version of the app. A check is put in place to make sure not to use a cache from a different version of the app.

### Last update time

Above the schedule, it also shows the last update time to make sure the user knows if the schedule might be out of date (as they can't be synced constantly since it is synced over bluetooth only when the server device is nearby).

![image.png](https://files.steempeak.com/file/steempeak/ajayyy/rJc4obkc-image.png)

# Questions

Many people were confused when the list of names was empty and just said "choose one", so it now informs the user to ask the person running the server to send them a copy of the schedule and names list. This should make people less confused about the situation and ask less questions. This can be seen in the screenshot above.

#### Pull Requests
https://github.com/LakeEffectRobotics/LakeEffectScoutingServerApp/pull/30
https://github.com/LakeEffectRobotics/LakeEffectScoutingApp/pull/238
https://github.com/LakeEffectRobotics/LakeEffectScoutingApp/pull/262

#### GitHub Account
https://github.com/ajayyy
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 164 others
properties (23)
authorajayyy
permlinkcompetition-time
categoryutopian-io
json_metadata{"community":"busy","app":"busy/2.5.6","format":"markdown","tags":["utopian-io","development","programming","android","opensource"],"links":["https://github.com/LakeEffectRobotics/LakeEffectScoutingApp","https://github.com/LakeEffectRobotics/LakeEffectScoutingServerApp","https://github.com/LakeEffectRobotics/LakeEffectScoutingServerApp/pull/30","https://github.com/LakeEffectRobotics/LakeEffectScoutingApp/pull/238","https://github.com/LakeEffectRobotics/LakeEffectScoutingApp/pull/262","https://github.com/ajayyy"],"image":["https://files.steempeak.com/file/steempeak/ajayyy/Kfvwvueh-image.png","https://files.steempeak.com/file/steempeak/ajayyy/rJc4obkc-image.png"],"users":[]}
created2019-03-16 20:37:57
last_update2019-06-05 01:09:54
depth0
children5
last_payout2019-03-23 20:37:57
cashout_time1969-12-31 23:59:59
total_payout_value39.698 HBD
curator_payout_value13.390 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,190
author_reputation29,025,741,762,621
root_title"Competition Time"
beneficiaries
0.
accountutopian.pay
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,424,840
net_rshares81,295,255,237,359
author_curate_reward""
vote details (228)
@justyy ·
$10.46
Thank you for your contribution.

1. Could [currentScoutIndex ](https://github.com/LakeEffectRobotics/LakeEffectScoutingServerApp/pull/30/files#diff-ea2d5adbf35a5ace9cdadc2286e94672R937) return -1?
2. I sense the `onClick()` is a code duplication e.g. [here](https://github.com/LakeEffectRobotics/LakeEffectScoutingServerApp/pull/30/files#diff-ea2d5adbf35a5ace9cdadc2286e94672R906) and [here](https://github.com/LakeEffectRobotics/LakeEffectScoutingServerApp/pull/30/files#diff-ea2d5adbf35a5ace9cdadc2286e94672R932)
3. [This function](https://github.com/LakeEffectRobotics/LakeEffectScoutingApp/pull/262/files#diff-8f6b6d12d24473079c05eafc135c8696R237) doesn't look what it does as its name says, stop the thread?
4. [here](https://github.com/LakeEffectRobotics/LakeEffectScoutingApp/pull/262/files#diff-8f6b6d12d24473079c05eafc135c8696R121) looks a bit inaccurate. You might improve this by reducing the level of nests e.g. compute the minutes difference between two dates and do some math.
5. [getNextMatchOn](https://github.com/LakeEffectRobotics/LakeEffectScoutingApp/pull/262/files#diff-cdbb55328c9acea28819b612928bc13eR91) could be improved by putting the values in a HashMap for O(1) lookup.

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/2-2-2-2-2-2-1-).

---- 
Need help? Chat with us on [Discord](https://discord.gg/uTyJkNm).

[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorjustyy
permlinkre-ajayyy-competition-time-20190316t210516115z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://github.com/LakeEffectRobotics/LakeEffectScoutingServerApp/pull/30/files#diff-ea2d5adbf35a5ace9cdadc2286e94672R937","https://github.com/LakeEffectRobotics/LakeEffectScoutingServerApp/pull/30/files#diff-ea2d5adbf35a5ace9cdadc2286e94672R906","https://github.com/LakeEffectRobotics/LakeEffectScoutingServerApp/pull/30/files#diff-ea2d5adbf35a5ace9cdadc2286e94672R932","https://github.com/LakeEffectRobotics/LakeEffectScoutingApp/pull/262/files#diff-8f6b6d12d24473079c05eafc135c8696R237","https://github.com/LakeEffectRobotics/LakeEffectScoutingApp/pull/262/files#diff-8f6b6d12d24473079c05eafc135c8696R121","https://github.com/LakeEffectRobotics/LakeEffectScoutingApp/pull/262/files#diff-cdbb55328c9acea28819b612928bc13eR91","https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2-2-2-2-2-2-1-","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2019-03-16 21:05:18
last_update2019-03-16 21:05:18
depth1
children2
last_payout2019-03-23 21:05:18
cashout_time1969-12-31 23:59:59
total_payout_value7.940 HBD
curator_payout_value2.516 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,648
author_reputation280,616,224,641,976
root_title"Competition Time"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,426,020
net_rshares15,445,758,018,457
author_curate_reward""
vote details (24)
@ajayyy ·
1. No it cannot, as the scout options are created from the allScouts list.

2. You are right, they are slightly different, but there is probably a way to make them one function, I will look into it.

3. Yes, in Java the `join()` function closes the thread (merges the thread and interrupts.

4. I was thinking of doing that, but felt it would be too complicated for the user to see an exact time, as only a general time is necessary. I'll look into improving that.

5. Thanks for the suggestion!

Thanks a lot for the review, very detailed and useful constructive feedback!
properties (22)
authorajayyy
permlinkre-justyy-re-ajayyy-competition-time-20190316t211722460z
categoryutopian-io
json_metadata{"community":"busy","app":"busy/2.5.6","format":"markdown","tags":["utopian-io"],"users":[],"links":[],"image":[]}
created2019-03-16 21:17:39
last_update2019-03-16 21:17:39
depth2
children0
last_payout2019-03-23 21:17:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length573
author_reputation29,025,741,762,621
root_title"Competition Time"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,426,540
net_rshares0
@utopian-io ·
Thank you for your review, @justyy! Keep up the good work!
properties (22)
authorutopian-io
permlinkre-re-ajayyy-competition-time-20190316t210516115z-20190319t044321z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-03-19 04:43:21
last_update2019-03-19 04:43:21
depth2
children0
last_payout2019-03-26 04:43:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation152,955,367,999,756
root_title"Competition Time"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,552,209
net_rshares0
@steem-ua ·
#### Hi @ajayyy!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (22)
authorsteem-ua
permlinkre-competition-time-20190316t215355z
categoryutopian-io
json_metadata"{"app": "beem/0.20.18"}"
created2019-03-16 21:53:57
last_update2019-03-16 21:53:57
depth1
children0
last_payout2019-03-23 21:53:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length285
author_reputation23,214,230,978,060
root_title"Competition Time"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,427,848
net_rshares0
@utopian-io ·
Hey, @ajayyy!

**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Get higher incentives and support Utopian.io!**
 Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-competition-time-20190319t105710z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-03-19 10:57:12
last_update2019-03-19 10:57:12
depth1
children0
last_payout2019-03-26 10:57:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length588
author_reputation152,955,367,999,756
root_title"Competition Time"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,565,833
net_rshares0