Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Komag
Roku Guru

Re: How long is your code?

Did a count, up to 22,616, hopefully done in a year or so, maybe around 30k?
0 Kudos
Komag
Roku Guru

Re: How long is your code?

I seem to be bad at estimating the future, because now I'm up to 37,883, and I'm certainly not done yet, but hopefully in another year or so 😉
0 Kudos
squirreltown
Roku Guru

Re: How long is your code?

"Komag" wrote:
I seem to be bad at estimating the future, because now I'm up to 37,883, and I'm certainly not done yet, but hopefully in another year or so 😉

Wow. I just counted the thing I'm doing which is 4 different 30 minute loops of animation and got 15,000. But! no comments. Aren't you doing a kind of retro-ish game? It should be back in style just in time for your finishing. 😄
Kinetics Screensavers
0 Kudos
Komag
Roku Guru

Re: How long is your code?

Yeah, no kidding!
0 Kudos
georgejecook
Streaming Star

Re: How long is your code?

3 line function if appropriate. Not longer than a screen if possible. But the bottom line is - it should only do One thing, and be well named.

Not that I mind the _write a function as long as is necessary and put comments in; it's okay you can hold it in your head_ philosophy. at least 300k of work over the last 20 years was fixing the abysmal mess that results from that. Knock yourselves out and keep piling those functions up! 🙂

For anyone looking for a sophisticated approach: https://medium.com/coding-skills/clean-code-101-meaningful-names-and-functions-bf450456d90c 
George Cook
https://georgejecook.github.io/
https://linkedin.com/in/georgejecook/
Roku developers slack group (https://join.slack.com/t/rokudevelopers/shared_invite/zt-4vw7rg6v-NH46oY7hTktpRIBM_zGvwA) : georgejecook

Contact me on roku developer slack group, or via pm to discuss consultancy/work opportunities/rooibos unit testing framework
0 Kudos
squirreltown
Roku Guru

Re: How long is your code?

"georgejecook" wrote:
3 line function if appropriate. 

Good luck animating something with that approach. 
Kinetics Screensavers
0 Kudos
renojim
Community Streaming Expert

Re: How long is your code?

Hear, hear!
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
Komag
Roku Guru

Re: How long is your code?

I have about 1200 Functions, so I guess that's about an average of 30 lines each. But really the normal Function is smaller (like around 10-15 lines most commonly), it's just that some are very long such as having big lists.
0 Kudos
georgejecook
Streaming Star

Re: How long is your code?

"Komag" wrote:
I have about 1200 Functions, so I guess that's about an average of 30 lines each. But really the normal Function is smaller (like around 10-15 lines most commonly), it's just that some are very long such as having big lists.

I suspect I'd enjoy working with you then! It'd take well named functions I can read, understand, reason about and easily re-orchestrate over a whopping multi-screen-couple-mess any day of the week
George Cook
https://georgejecook.github.io/
https://linkedin.com/in/georgejecook/
Roku developers slack group (https://join.slack.com/t/rokudevelopers/shared_invite/zt-4vw7rg6v-NH46oY7hTktpRIBM_zGvwA) : georgejecook

Contact me on roku developer slack group, or via pm to discuss consultancy/work opportunities/rooibos unit testing framework
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.