loading...
Cover image for Why I FAILED at live-coding!! ๐Ÿค”๐Ÿ’ปโŒ

Why I FAILED at live-coding!! ๐Ÿค”๐Ÿ’ปโŒ

lukegarrigan profile image Luke Garrigan ใƒปUpdated on ใƒป6 min read

Live-coding

Live-coding is still in its infancy but definitely gaining popularity with more and more talented streamers cropping up daily. It'll likely never be as popular as video game streaming but that's just because there isn't quite the demand. That isn't to say it's not a viable channel, there are many full-time programming streamers out there who are pulling in big numbers!

My story

It was July 2018, after months and months of watching live-coders almost daily I decided to do it. Decided to grow a pair and try it myself, why not?

My first stream I had no real plan, I didn't even bother telling friends or family about it I just jumped in and awaited the flurry of ยฃ1000 donations๐Ÿคฃ.

I was working on a Java backend at the time for a friend so I thought why not just stream this whilst I code, 2 birds with one stone and all that. I wasn't pulling in many viewers but was having a laugh with the few who turned up to say hello.

Making sh*t move

One stream I decided to do something a little different. I'd heard of this open-source graphical library called Processing and thought I'd give it a stab on stream with absolutely zero knowledge of it. I did, however, know Java so I picked it up reasonably quickly and ended the stream with a randomised game that integrated everyone watching the stream into the game.

The game was super, super simple but it attracted a reasonable number of views relative to my other streams. I had just discovered, people like to see sh*t move on the screen. There are only a certain amount of passing tests a viewer can watch and still be interested.

The following stream I worked on the same game just adding little features to it, such as power-ups, dynamically adding/removing people from the game as they left the stream, etc. It pulled in a few viewers but not as many as last time.

There was a really important lesson to learn here, but I missed it. A lesson I'd only figure out months after stopping.

Picking up P5.js

I wanted to create a game that I could play with the viewers. I'd now done a little dev with Processing so the logical switch was to p5 which is essentially Processing but in the browser (JavaScript rather than Java).

The game I decided to make was an Asteroids replica but a multiplayer version:
Gif of asteroids game

I was completely inexperienced with any game dev so in the stream I was learning on the job. Multiplayer game dev introduced me to Node and Socket.io which I also had to figure out as I went. The first two streams working on this game were my favourite and also probably my most successful. I had a AWS Lightsail server set up and every time I committed some new code I'd redeploy, allowing everyone to play and test with me.

Because I was so inexperienced, unsure which parts of the game the client or server should handle it wasn't long before people were hacking the game and teleporting across the screen, shooting 1000 bullets at once. This is the best thing about live-coding, people that are watching are very likely programmers themselves so they will no doubt pick you up on anything stupid you do (Even when you wish they wouldn't ๐Ÿคฃ).

People apparently enjoyed doing this and I eventually changed the title of the stream to "Come hack my multiplayer game".

But eventually, my code got better, I became to understand what the server should be doing and what the client should be doing, so the number of possible hacks dropped dramatically and with that, so did my number of views.

Clinging on to the game

I was having so much fun developing the game I just kept on adding features to it, it ended up making a bit of a transition from the asteroids game to my own game called Spaceheir!

I don't have a live version of the game running at the moment, but here's my latest gif of it. (It looks a lot different now, with a leveling system and powerups, but you get the idea)

Spaceheir

Every stream ended up being pretty similar to the previous, gathering ideas and implementing them into the game, or sometimes fixing bugs people had found playing it. I think, looking back, this became monotonous for viewers and was one of the reasons for the dip in viewership. I was just stuck in the loop and didn't know how to transition.

Looking at big live-coding streamers such as Daniel Shiffman, he is always doing something different, never working on one mammoth program. Daniel's streams are littered with a number of short coding challenges allowing people to watch the creation of something from beginning to end, I think this is so important and is one of the reasons I love his stream (Aswell as his unrivaled teaching ability and character).

I love to watch streamers tackle problems and compare it with my mental model of the route I'd take to tackle it, if they're working on a large program as I did, it's very rare that I could find a relatable point where an implementation requires no prior knowledge of the existing system. Meaning, if they were to start from scratch I could immediately make a comparison as I don't need to worry about some existing code they've written. Daniel Shiffman has this down perfectly.

Inconsistency

Another major problem I had was with my consistency, I'd specify the days I would stream, Wednesdays, Fridays, and Sundays. I only managed to stick to my schedule maybe twice at a push. Google any top tips to be a good streamer and all of them will have "BE CONSISTENT" somewhere. I just wasn't, I have a long commute to work and some nights I'd get back and I just, uhm, couldn't be arsed.

Organisation

Because I was just working on the same thing pretty much every stream I didn't bother doing any planning, I'd boot it up say hello to anyone watching and then figure out what I'd do for the stream. I know now that this is the wrong way to go about things, I should have planned out what I wanted to do on that particular stream, even if the plans did involve the same game at least I'd have a clear vision of what I wanted to get done.

Conclusion

I had a tonne of fun in the 6 months-ish I did live coding, I met loads of brilliant people and had a laugh on the way. Eventually, though, it became a bit of a chore and I think that showed in the quality of the stream itself.

I do think I'll get back to it at some point and potentially apply the lessons I've learned. Unfortunately, so much of what I've learned about live-coding was done in retrospect rather than on the job, maybe I'd be bigger than Ninja if I learned whilst doing๐Ÿ˜‚.

Tell me your stories!

I'd love to hear your experience with live-coding, whether it be you're looking to get into live-coding, or you've been doing it for years, or you're a bit of a newbie at it, I want to hear all your stories and lessons you've learned on the way.

Also if anyone is interested, my twitch is twitch.tv/codeheir!

Follow me on twitter if you don't want to miss out on absolutely brilliant programming insight: ๐Ÿคฃ @luke_garrigan

Thank you, if you like my rambling check out my personal blogging site at https://codeheir.com/

This blog is sponsored by Code Canvases

Make your room come alive with the coolest programming/coding canvases on the market. codecanvases.com is the number 1 seller for programming prints with 100% exclusively designed canvases. Get them now whilst they're 20% off!!
[https://codecanvases.com/](https://codecanvases.com/)

Discussion

pic
Editor guide
Collapse
camerenisonfire profile image
Cameren Dolecheck

Live stream coding is hard. What time I've spent live streaming has been building a music visualizer, as what you said about needing animation for the viewers is key.

The only coding streamer I've ever been able to watch consistently was a game dev. His stream was especially neat as he built his stream UI to be a game. Viewers were ships and every so often a game with those ships would happen; sometimes with chat input sometimes machine controlled.

Overall, coding streams is very hard to watch as the viewer has to invest time to build up the mental model of what the streaming is building. Games make that a little easier as it's a bit clearer what the immediate outcome of the code change is.

Collapse
lukegarrigan profile image
Luke Garrigan Author

Yeah it is very hard, it's even harder when you're trying to learn something, trying your damned best not to look like an idiot ๐Ÿคฃ

Yeah, it's got to be interactive and visual in some way or another. Something I tried to do was create spaceships for subs and they would gain XP which multipled if they were currently watching the stream, I should have spent a little more time on this!

You can kind of see it in this, on the left: (And also me spilling my tea ๐Ÿ˜‚)

Collapse
xenialdan profile image
Dan

Hey ๐Ÿ‘‹
First post i read here and i am quite satified i must say ๐Ÿ‘
I have been into live streaming code for some time, but eventually stopped as my viewer count and motivation stopped (also, some day my wifi contract was cancelled), but i would actually start again.
That viewers like things on screen to move is a great tip, and probably true, i cought myself watching and enjoying videos with moving content alot more recently.

I think i also focussed on big projects too much - many "umm"s, "ohh.."s and long breaks before anything happened in the stream were like acid to the view count.

This post actually gave me motivation to give streaming a try again, but this time - prepared, more interactive and shorter. _^

Collapse
lukegarrigan profile image
Luke Garrigan Author

Hey ๐Ÿ˜Š

Thank you, I'm glad I was your first ๐Ÿ˜

I'm happy it's given you some motivation to get back to it!

Collapse
ericadamski profile image
Eric

I just did my first stream yesterday! Would love any opinions youtu.be/q4Cp-dqTXDE! I am going to try the consistency thing, every Friday! It was a ton of fun even though I only had 1 viewer ๐Ÿ˜„

Collapse
remibruguier profile image
Rรฉmi BRUGUIER

@eric Dunno if that's only me but the sound on your video is extremely low?
edit: nevermind, it was me, my headset just broke... switched it and the sound is just fine.

Collapse
ericadamski profile image
Eric

That's great to know! It was probably me โ˜บ๏ธ

Collapse
ericadamski profile image
Eric

Hope it is a useful video for you! I'd like to get your thoughts on how I can improve!

Collapse
lukegarrigan profile image
Luke Garrigan Author

Awesome mate, keep at it!

Collapse
hellokyyt profile image
Kyle Harrison

I streamed webdev to an audience for 0 for a few months. Turns out you cant just hit "Go Live" and expect passers by to give a shit unless you give them something to look at. I didn't even have a cam, that's how visually uninteresting my stream was.

This year, January 2nd in fact, my new years resolution was to do some game dev and crack out at least a couple game jams this year. I thought it'd be interesting to let people see what it's like for someone to be learning Unity on the fly.

Turns out I was wrong there too. My stream for my first game jam resulted in a Max of 2 concurrent viewers for 5 solid minutes and that's as good as it got.

BUT here's the thing that I found out: when I sling code just for me, I tend to piss around a lot with other stuff. Be it youtube or Netflix, chatting with friends, etc. When I was on stream? Even with 0 viewership, I treated it as if I had an audience of several. And so therefore I got the same feeling as pair programming: someone's watching over your shoulders. For me, this helped me keep focus.

So i continued doing it. I'd pop up with my "Watch me Fail at Unity" streams a couple times a week, and I got me a nice high powered webcam.

That last piece, turns out, was super important. Once I got webcam, I started pulling in consistent viewership. Still low numbers, 1-3, but the interaction I received made a huge difference in my attitude.

One day, while I was fixing a particularly hairy problem with syncing a countdown timer over a networked connection, I received my first raid which popped my viewership over 15 if im remembering right.

Man, the endorphins. I immediately felt addicted to the feeling I got from that.

But retention wasn't amazing. Turns out nobody is super into watching a dude read documentation lol

Recently Ive been in a rut volley of switching out libraries and technology and even engines now and it's just been hours upon hours of RTFM'ing and incremental experimentation so I've pumped the breaks on streaming overall.

But it was a fun experience while it latest. I'll probably do it again once I feel moderately proficient in it.

Collapse
lukegarrigan profile image
Luke Garrigan Author

Ahhhhh I forgot to mention this.

I treated it as if I had an audience of several. And so therefore I got the same feeling as pair programming: someone's watching over your shoulders. For me, this helped me keep focus.

this is so true, you hit the nail on the head. This was one of my biggest motivations for streaming, I knew that I would be getting shit done. Rather than: playing games, watching youtube videos, scrolling twitter, etc.

Collapse
afsharm profile image
Afshar Mohebi

It was useful to read your story. Indeed, I am interested in live coding, and I am searching for an opportunity to jump in. Personally, I am afraid I am not technically as ready as needed. Another concern is to find a perfect schedule to appear in front of the camera. By the way, I appreciate your braveness to dig into the twitch and share your experience with the community.

Collapse
lukegarrigan profile image
Luke Garrigan Author

I don't think there is a right time to jump in, just do it. Don't be worried about not knowing enough, most of us are riddled with imposters syndrome. I had pretty much no idea what I was doing 90% of my streams, I just winged it, googled it, and hacked away!

Collapse
foodbeez profile image
Sai Krishna

Reminds me of the old PC game called "Swarm". Anybody old enough here to remember that game?