August 20, 2014

The Podside Project: Introduction

Background:

     Most podcasters record their podcasts at home or in a studio and maybe use some VOIP (voice over IP) like Skype, Mumble, or TeamSpeak to have multiple people join in from different parts of the country/world and then upload their episode to their website and link it to iTunes. 
     Podside is a podcast (Podside.net) about a game (EVE Online) but what makes them special is how they deliver their content to their listeners. What makes Podside different is the fact they broadcast their episodes live. This of course is unusual and therefore the way they push out their live stream is convoluted involving a desktop with two sound cards (one with the audio output routed to the other card's audio input) to record not only the hosts microphone audio but the PC audio output containing the audio of the other hosts and guests. This recorded audio is then taken and pushed out to a dedicated broadcast server where the listeners can go to (Podside.net) and use the built in player to listen to the live broadcast.

The Basic Idea

Goals:

Generalized - To design and code a program with the purpose of recording 2 inputs, combining these audio inputs, convert them to mp3 format, and save the result while also sending it to a broadcast server for a live audience. Therefore, simplifying the process in general while also reducing the number of sound cards from 2 to 1, thus allowing laptops to be used to broadcast the live stream as well.

Technical - To design and code (in Java) a program with the purpose of recording 2 streaming inputs (microphone and PC audio output), combining these audio stream, convert (compress) the combined stream to mp3 format, and save the result to the hard drive (continuous writing to a file, possibly implemented as a separate thread) while also sending it (as an audio stream with no finite audio length, implemented as a separate thread) to a broadcast server for a live audience. Therefore, simplifying the process in general while also reducing the number of sound cards from 2 to 1, thus allowing laptops to be used to broadcast the live stream as well.

     I fully intend for this to be a open source project at this time, however, I see potential for this to one day become a 'full blown product' and thus I will say when I release the code (when there is something functional and worthy of being released) it will be 'open source' as in free to use by anyone for non-profit and/or educational purposes. 

Lessons Learned: Modular coding is great coding.

     Even though I was writing (what I thought to be) modular code I was shown a drastically better way of writing modular code, BUT EVEN MORE IMPORTANTLY this new method allows for coding in such a way that the code can be read as if it were almost 'complete' English sentences. This not only makes the code extremely readable but also makes updating code (more specifically updating someone else's code) much easier because if one thing breaks it is much more obvious where the logic error/error is coming from in the code. (More on this later, The Podside Project: The Design)

August 15, 2014

Layers of Complexity On Top of Exponentially Increasing Complexity:

Everything sounds or at least seems simple in the planning stages and then you break it down...and down...and down, at which point the design looks good and easy to implement. But then you realize it. It can be broken down even further, again and again.

Be ready to throw out your code if you start coding too soon, I have... several times.

Iteration, Iteration, Iteration:

Iteration is everything. 

Writing the same code over and over through iteration encourages learning through what you have done and/or done wrong. It always seems (at the time) that I am doing everything in a great or at least reasonable way, however, once I come back to it later I often end up asking, “Why did I do that?” or “What was I thinking?” even though I know what is going on in the code, it's just I know now there is a better/easier way of going about it.



Throw Away Your Code:

I have always found I tend to start writing code way too soon and so I continually find myself with lots of pieces of code in a file (code which might be functional but it is not connected to each other yet and therefore not compatible and thus useless). 
This always leads me to taking only a portion of this code, moving it to a new file/project and abandoning the old code to focus on a specific thing and build upon it as I am able to complete goals/design aspects. 

To some extent this is caused by poor planning and/or over enthusiasm and trying to write multiple parts of the code at once.

August 5, 2014

What's Your Motivation?

What's your motivation?

     My intentions for this blog is for me learn from and share my programming experiences, but mostly for myself to reflect on what I did, why I did it, and how I did it so that I can overcome obstacles, bad habits, and think of alternate ways of implementing a design.

Ben: You know, Thomas Edison tried and failed nearly 2,000 times to develop the carbonized
         cotton-thread filament for the incandescent light bulb.
Riley: Edison?
Ben: And when asked about it, he said "I didn't fail; I found out 2,000 ways how not to make a 
         light bulb." 
                                                                                                     - National Treasure, 00:29:58

     The following entries will be mostly brief (I hope) and mostly focusing on general programming concepts, object oriented programming, multi-threading, real-time applications, and breaking done a project in order to come up with a simple and straight forward design.

Disclaimer:
     I will do my best to check my spelling and grammar but remember I am doing this mostly for my benefit, but if you can also benefit...I'll gladly take credit for it. :)