You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the platform rolls out to more students there are more silly mistakes made. The primary silly mistake I see with my students during their first week is typos with the keyword arguments to the motor functions. Yes, it's a silly goof on their part. I see lots of code like this... (notice the words spedd_sp and postion_sp):
motor_turns_deg = 486
left_motor.run_to_rel_pos(position_sp=motor_turns_deg, spedd_sp=400)
right_motor.run_to_rel_pos(postion_sp=-motor_turns_deg, speed_sp=400)
left_motor.wait_while("running") # Wait for the turn to finish
right_motor.wait_while("running") # Wait for the turn to finish
ev3.Sound.beep().wait()
The reason they make this mistake is because PyCharm doesn't know that spedd_sp and postion_sp are an invalid keyword arguments and they are not marked as errors. If they type the function name wrong (run_to_rel_pos) then PyCharm will mark it as an error and students will fix it instantly. However kwargs don't get marked as errors. What happens now is that no error is ever thrown, but the motor doesn't turn since a keyword argument is wrong. That is not terrible, but for new students they don't know what is happening. A descriptive error message would help them a lot. Making their program crash would probably also be good.
So it would be nice for the newbies to either:
print a warning of some sort (or throw an exception) when an invalid keyword argument is sent
figure out how to make IDE's like PyCharm help check for keyword argument typos.
Just trying to share the mistakes that students are making.
Given that this may not be feasible in a classroom environment, it's worth noting that the only thing that won't work with the new library but an old kernel is the buttons on the EV3. Although, this could be the last release of ev3dev-jessie before we call it "stable" and begin breaking things in ev3dev-stretch, so maybe it's good to get on this release now and then leave it. I can't say for sure what the roadmap looks like though.
Activity
ddemidov commentedon Feb 14, 2017
This should be covered already by #278, which was recently released as part of 0.8.1. Please update both your kernel and the library.
WasabiFan commentedon Feb 14, 2017
Given that this may not be feasible in a classroom environment, it's worth noting that the only thing that won't work with the new library but an old kernel is the buttons on the EV3. Although, this could be the last release of ev3dev-jessie before we call it "stable" and begin breaking things in ev3dev-stretch, so maybe it's good to get on this release now and then leave it. I can't say for sure what the roadmap looks like though.
For reference:
fisherds commentedon Feb 14, 2017
Awesome! We'll update in the future, so if it's in we're all set. We'll pick it up at some point. Thanks!