
Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2015
08:34 AM
How long is your code?
I know the same program written crapily can take double the code length, but assuming we're all being at least somewhat efficient and reasonable, how long is your code?
Currently my game is about 7600 lines long, and weighs 440k of code, about HALF of which is comments! So probably about 200k+ of real code.
I "think" I'm about half done, but it's really hard to say.
So I'm curious how that compares to what's out there. I assume regular channels would usually be smaller than a game, but I guess I don't really know. This is my first real programming, so it still might be pretty bloated, though I've tried to kill off any repeated code if possible with good use of loops or functions.
Currently my game is about 7600 lines long, and weighs 440k of code, about HALF of which is comments! So probably about 200k+ of real code.
I "think" I'm about half done, but it's really hard to say.
So I'm curious how that compares to what's out there. I assume regular channels would usually be smaller than a game, but I guess I don't really know. This is my first real programming, so it still might be pretty bloated, though I've tried to kill off any repeated code if possible with good use of loops or functions.
28 REPLIES 28
sjb64
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2015
08:52 AM
Re: How long is your code?
Our FlixRaider channel is right about 3,000 lines, with various text file contents (about us, announcements, etc.) stored externally, so the 3,000 lines is pretty much just code. But a third of that is probably deserialization routines in the data access layer, so maybe 2,000 lines of actual operations code.

Romans_I_XVI
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015
09:50 AM
Re: How long is your code?
If you're wanting to compare you can view Retaliate here. https://github.com/Romans-I-XVI/Roku-Retaliate-Channel-Open-Source
Although I haven't updated that since all the recent changes.
Although I haven't updated that since all the recent changes.

Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015
11:29 AM
Re: How long is your code?
That's got about 2000 lines all together, and it's nice to see the code, thanks! 🙂
destruk
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015
11:41 AM
Re: How long is your code?
For a complete roku channel which loads a single live stream for playback, 50 lines.
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015
02:32 PM
Re: How long is your code?
"destruk" wrote:
For a complete roku channel which loads a single live stream for playback, 50 lines.
Can you make it a 1-liner? #CodeGolf FTW!

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015
03:00 PM
Re: How long is your code?
u=CreateObject("roUrlTransfer") : u.SetUrl("http://where/my/code/is") : Eval(u.GetToString())
--Mark
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015
03:30 PM
Re: How long is your code?
"RokuMarkn" wrote:u=CreateObject("roUrlTransfer") : u.SetUrl("http://where/my/code/is") : Eval(u.GetToString())
LOL #NoFair
That's like saying "10 LIST" is a legal quine (self-printing program).
A legit one-liner can be done though, right? Just have to avoid loops and IFs.

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015
09:38 PM
Re: How long is your code?
"EnTerr" wrote:
A legit one-liner can be done though, right? Just have to avoid loops and IFs.
Does this count?
Sub Main():screen=CreateObject("roVideoScreen"):screen.SetContent({StreamFormat:"hls", Stream:{Url:"http://media.heywatch.com.s3.amazonaws.com/hls/big_buck_bunny/big_buck_bunny.m3u8"}}):screen.Show():While True:End While:End Sub
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2015
10:41 PM
Re: How long is your code?
"TheEndless" wrote:"EnTerr" wrote:
A legit one-liner can be done though, right? Just have to avoid loops and IFs.
Does this count?Sub Main():screen=CreateObject("roVideoScreen"):screen.SetContent({StreamFormat:"hls", Stream:{Url:"http://media.heywatch.com.s3.amazonaws.com/hls/big_buck_bunny/big_buck_bunny.m3u8"}}):screen.Show():While True:End While:End Sub
Abso-censored-lutely, provided it runs. My bad, i thought the loops have the IF statement problem.
Can lose the Sub Main(): ... :End Sub brackets btw (courtesy of SquirrelTown and RokuMarkn)