Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,173,870 members, 7,889,909 topics. Date: Monday, 15 July 2024 at 12:52 AM

Documenting My Journey So Far - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Documenting My Journey So Far (628 Views)

My Software Dev Journey So Far / My Job Hunting Experiences As A Junior Developer So Far / My Journey To The Programming World - Newbie (2) (3) (4)

(1) (Reply) (Go Down)

Documenting My Journey So Far by hardebayho(m): 9:49am On Jun 26, 2021
I'm creating this thread as some sort of documentation of my journey through learning programming and where I currently am. Think of this as a diary of some sort, but will only be relevant to programmers or aspiring programmers.

Before I started learning programming, there's not much I was doing with my life. In truth, life doesn't really mean much to me, cause I've never been able to properly wrap my head around things we humans do like religion, life and death and a bunch of other things in between... However, there's something I've always wanted: an opportunity to create something of my own. Something I can control. Games gave me that feeling when I was young. Being able to play mobile games fascinated me because I had some sort of control over decisions in the game and therefore can influence the outcome.

Later, I started wondering about who made these games and how they made them. This was still early and I very was young, so I didn't really understand much and didn't know where to look so I just dropped the whole idea.

When I grew older and started working, I had already gained understanding on how to use search engines, and so I resumed chasing my childhood dream... I was greeted with a wealth of information that was extremely confusing...

It took me lots of years to understand what a programming language is and why I needed it to make games. As I was reading articles online, I stumbled on some recommendations stating that you'd need to understand data structures and algorithms to be able to do anything related to programming.

With the already confusing concepts of programming languages that I still had no idea why i was learning them and what I was supposed to do with them once I finished learning them (coupled with the fact that they were extremely hard to learn, since I was on my own), I added data structures and algorithms to the mix and was learning them without knowing why. I just knew I had to sad

2 Likes

Re: Documenting My Journey So Far by Nobody: 10:05am On Jun 26, 2021
you go tired. looool.
Re: Documenting My Journey So Far by hardebayho(m): 11:56am On Jun 26, 2021
For a while, I was nothing but frustrated. Nothing was going the way I planned, and all the ideas I ever have, I know not how to implement...

I learnt about open source programs and discovered that reading real world code someone else wrote would help me learn much faster and see how things are done for real... Like most things however, it was extremely daunting... I didn't know why the author named some functions the way they did, what some functions do, so many jargon that required I read at least 100 pages of other jargons to figure out...

I could just ignore most things and just copy and paste code I find online, but I'm not a fan of using something I do not understand. I seriously do not like it. So I would read as many pdfs as I could, try to digest as much as I can (usually unsuccessfully) and will drop things I find too difficult to grasp...

This went on for years and one day I assessed myself and said, "exactly why are you doing this programming of a thing? You can't even do anything with the things you've learned"...

As for why I was still doing it even though it fetched me nothing, I just knew that everytime I sat in front of a computer to type code, I feel contented. Like I do not need anything else... I guess that probably comes from the fact that I think the outside world sucks, and appreciate having something that doesn't judge me when I do something wrong, takes all my bullshit without complaints and is always there when I need it.

Regardless, I wanted progress (who doesn't?). I decided to pick a department and settled for Multimedia programming. I decided to make a media player application first, then I would make a video editor, and then gradually progress towards becoming a game developer, focusing on the graphic or audio backends.

So I started the media player application. I was making the app for Android only, as iOS is very out of reach for various financial reasons.

I found Android has this API called Media Player for playing media. However, I found that it couldn't play one media file I downloaded online, so I figured it's not a viable option for me. Mx player could play everything, so I'm either making something as good as mx player or I ain't making anything at all. I found Exoplayer.

Exoplayer was good. However, it was extremely overwhelming in my opinion because there was too many pluggable components. These components I didn't understand what they did at the time... Coupled with the fact that exoplayer does not introduces any codecs of its own, so its subject to the same limitations at the media player option I first had.

I kept looking and found libVLC. This one is a little bit weird, cause the app is the most popular media player on desktop... While the API was well documented, there was very little examples on how to use it. So if you don't know how to read source code, you're pretty much toast... And it's an extremely huge library.

Anyway, that wasn't going to stop me from trying it out. I downloaded the library and the source code for the android app and I started trying to figure out how everything worked... I successfully created a media player with the library and it worked pretty well...

For some reason however, I wasn't satisfied. The app worked great, but the libvlc library was too big in my opinion. My friends encouraged me to ship the app then but I didn't. I maintained that I didn't like the app and that I had to change the libvlc backend...

To be sincere, there was nothing wrong with the app, nor was there anything wrong with the app size. The problem I had was that I had absolutely no idea what libvlc was doing in the backend and it bothered me. Making the app didn't feel as "fun" as I would've loved, since I spent time writing xml and linking views to activities and fragments. So I decided to go a little lower level and I took on ffmpeg. This was an extremely bad idea �
Re: Documenting My Journey So Far by hardebayho(m): 12:16pm On Jun 26, 2021
Ffmpeg was worse compared to libvlc when talking about documentation. However, it contains lots of codecs and is the lowest level I can go when talking about multimedia processing (unless I want to write my own codecs, which I'm not crazy enough to do. At least not yet smiley)

Ffmpeg was extremely hard, as the api is ever changing, with little to no tutorials and documentation on how to do anything... So many new terms I encountered and I faced problems with extreme difficulty... At times, I think I'm just dumb, cause I read one thing like ten times and still don't understand what it means... Even the little documentation they provided I didn't understand... So I was going to give up on it and just go back to libvlc.

Something then spoke to me. If I'm going to always give up on everything I attempt simply cause its hard, I might as well just give up on my life itself... So I decided to just dive into it, giving myself a no-way out... I started creating a library to abstract the ffmpeg functionality so I can expose the media player features I want... It didn't work out, but I learned a great deal from the project...

I made another one that also didn't work out (I think I'll have about five or six media player apps I made with my knowledge of ffmpeg that will never see the light of day. They're still on my github, and they're fairly complete in their own right. I just cannot ship something I cannot use)...

The current one I'm working on has been going great, better than the ones I've worked on in the past... Now I'm much better with architecting code, thinking about algorithm design and fixing bugs... I've also gotten better with creating bugs, as I've lots of bugs in this current app I'm making. Now it's not as hard to think about a feature and implement it as it was when I started...

Nowadays, I play with the ffmpeg source code like I wrote everything. They're seriously not hard to comprehend now that I've spent some time with them... I even fix bugs in the library nowadays...

And my fear or inability to read other people's code is gone. I don't know what happened, but I'm now able to read people's source code and understand them faster than I ever thought I could.

There's still a lot more to do, but I've got to say that I'm proud of myself. It was extremely difficult to stick with programming, especially knowing I wasn't doing it for the money... Money is usually motivation to keep going, but even that I did not have... Nor did I have anyone to cheer me on as I embarked on this awesome journey that has brought me nothing but pure delight and satisfaction.

My family never understood why I sit in front of the computer every chance I get, and I'm sincere when I tell you that even I do not know why sometimes... Its my default mode now, and its clear that whether money or not, this is what I'll be doing for the rest of my life! smiley

3 Likes

Re: Documenting My Journey So Far by hardebayho(m): 12:26pm On Jun 26, 2021
Right now, the problems I'm having have nothing to do with ffmpeg or codecs... They're more about how to properly architect the code so that I can reduce memory allocations, usage and data copying...

It's been a while since I recorded any noticeable memory leaks (read smart pointers smiley), so I've gotten better with that one.

I'm a little terrible with multithreading in c++ however and always a little concerned about performance.

Seeking took ages to implement. Looking at it now, I must say that I was extremely naive with the way I implemented these things before... It wasn't my fault though. Most of these things are extremely undocumented and you'll have to do trial and error to gain proper understanding of them...

I'm currently learning how to write a demuxer, so I won't be having any need for ffmpeg anymore as android phones now come with lots of codecs for most popular formats...

Trust me, writing your own demuxer is fun, although extremely hard (by my standards). I'm gon ship this app with ffmpeg though, as I'm almost done with it (just the video editing features and audio processing stuff remaining)... I'll just have the demuxer project as a way to learn about how these formats like mp4, mkv and others work.

3 Likes

Re: Documenting My Journey So Far by Nobody: 3:10pm On Jun 26, 2021
hardebayho:
Right now, the problems I'm having have nothing to do with ffmpeg or codecs... They're more about how to properly architect the code so that I can reduce memory allocations, usage and data copying...

It's been a while since I recorded any noticeable memory leaks (read smart pointers smiley), so I've gotten better with that one.

I'm a little terrible with multithreading in c++ however and always a little concerned about performance.

Seeking took ages to implement. Looking at it now, I must say that I was extremely naive with the way I implemented these things before... It wasn't my fault though. Most of these things are extremely undocumented and you'll have to do trial and error to gain proper understanding of them...

I'm currently learning how to write a demuxer, so I won't be having any need for ffmpeg anymore as android phones now come with lots of codecs for most popular formats...

Trust me, writing your own demuxer is fun, although extremely hard (by my standards). I'm gon ship this app with ffmpeg though, as I'm almost done with it (just the video editing features and audio processing stuff remaining)... I'll just have the demuxer project as a way to learn about how these formats like mp4, mkv and others work.
You don go far oh. Imagine using that ugly beast called C++ to program went back to the bastard sometime ago on my cousin's laptop i been wan write back end using llvm, what an ugly language a lot of people even complained that they should have used C for the tool chain.

1 Like

Re: Documenting My Journey So Far by hardebayho(m): 3:41pm On Jun 26, 2021
SegFault:

You don go far oh. Imagine using that ugly beast called C++ to program went back to the bastard sometime ago on my cousin's laptop i been wan write back end using llvm, what an ugly language a lot of people even complained that they should have used C for the tool chain.

C++ is actually not bad for a language. I prefer C to it, but for industrial strength code, I'll still use C++. It allows me to do dangerous stuff while still protecting me from memory leaks and things I forget to do. C however, is completely off the rails... If you forget to free one memory block laidis, you're probably screwed... Worst of all, if the memory leaks are in several places, then the frustrations can kill you before you finish the project. C++ is forgiving Sha, in that you just wrap whatever memory you want to deallocate in a smart pointer and you can forget about the memory issues.

I don't use all of its features, cause I don't need them... What I do not like however is the standard library. The way they name things is extremely weird, and I'm really not a fan of it... Some things too I stay away from are move semantics and std::bind and other stuff I cannot wrap my head around. Usually I stick with smart pointers plus classes and that's about it

1 Like

Re: Documenting My Journey So Far by Nobody: 3:53pm On Jun 26, 2021
hardebayho:


C++ is actually not bad for a language. I prefer C to it, but for industrial strength code, I'll still use C++. It allows me to do dangerous stuff while still protecting me from memory leaks and things I forget to do. C however, is completely off the rails... If you forget to free one memory block laidis, you're probably screwed... Worst of all, if the memory leaks are in several places, then the frustrations can kill you before you finish the project. C++ is forgiving Sha, in that you just wrap whatever memory you want to deallocate in a smart pointer and you can forget about the memory issues.

I don't use all of its features, cause I don't need them... What I do not like however is the standard library. The way they name things is extremely weird, and I'm really not a fan of it... Some things too I stay away from are move semantics and std::bind and other stuff I cannot wrap my head around. Usually I stick with smart pointers plus classes and that's about it
Weird enough I hardly fall into that memory leak shit though I realised the free function does not give the memory back to the system it simply uses it on the next memory allocation gringrin a real recipe for disaster if your data structures heavily use pointers which is why (before I lost access to my cousin's laptop) I started using arrays of data, allocate as a huge chunk when I need data and simply use pointers to access each unit, turns out this makes the program faster due to reduced flushing of caches. But one thing about C++ is that you may not want to use all its features but some other idiot from whom you might need his source code badly might use some bleeped up features like diamond inheritance or dynamic allocation which till this day just seems so useless. That diamond inheritance thing should have been removed by now.
Re: Documenting My Journey So Far by hardebayho(m): 5:56pm On Jun 26, 2021
SegFault:

Weird enough I hardly fall into that memory leak shit though I realised the free function does not give the memory back to the system it simply uses it on the next memory allocation gringrin a real recipe for disaster if your data structures heavily use pointers which is why (before I lost access to my cousin's laptop) I started using arrays of data, allocate as a huge chunk when I need data and simply use pointers to access each unit, turns out this makes the program faster due to reduced flushing of caches. But one thing about C++ is that you may not want to use all its features but some other idiot from whom you might need his source code badly might use some bleeped up features like diamond inheritance or dynamic allocation which till this day just seems so useless. That diamond inheritance thing should have been removed by now.

Well, it's there but you don't have to use it. And about C++ libraries, I don't really use them. Most of the libraries I ever work with are either written in C, or I just write my own routines (writing my own routines is just an opportunity for me to learn, which I shamelessly do all the time. Most of them are buggy however smiley)

I think the diamond inheritance thing has its uses, but like everything in programming, not using in appropriate scenarios can cause headaches.

2 Likes

Re: Documenting My Journey So Far by Nobody: 6:36pm On Jun 26, 2021
hardebayho:


Well, it's there but you don't have to use it. And about C++ libraries, I don't really use them. Most of the libraries I ever work with are either written in C, or I just write my own routines (writing my own routines is just an opportunity for me to learn, which I shamelessly do all the time. Most of them are buggy however smiley)

I think the diamond inheritance thing has its uses, but like everything in programming, not using in appropriate scenarios can cause headaches.
Well that is the norm, most people prefer writing libraries in both c and c++ as it makes it a more accessible library, the only problem c really has is that you're fully on your own unless you use all those flashy libraries and there's this tool that helps to find hanging pointers and all that.
Re: Documenting My Journey So Far by hardebayho(m): 5:45pm On Jun 27, 2021
SegFault:

Well that is the norm, most people prefer writing libraries in both c and c++ as it makes it a more accessible library, the only problem c really has is that you're fully on your own unless you use all those flashy libraries and there's this tool that helps to find hanging pointers and all that.

The only thing I know how to do when it comes to debugging native code is to either read assembly listings, or use a debugger... All those performance profilers and memory checkers I do not know how to use sad
Re: Documenting My Journey So Far by Nobody: 5:47pm On Jun 27, 2021
hardebayho:


The only thing I know how to do when it comes to debugging native code is to either read assembly listings, or use a debugger... All those performance profilers and memory checkers I do not know how to use sad
Funny enough I have never used a profiler, when I'm ready I'll learn it.

1 Like

Re: Documenting My Journey So Far by Deicide: 6:07pm On Jun 27, 2021
How are you using C++ to build Android App?
Re: Documenting My Journey So Far by hardebayho(m): 7:39am On Aug 15, 2021
Deicide:
How are you using C++ to build Android App?

Android NDK.

(1) (Reply)

Good Front..end Developer / Help!!! Can This Laptop Run Programming / I Need Help Installing Linux

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 62
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.