ft_irc
by bhagenlo
written for version 7.1
Wow. You've come a long way. This is your final low-level project of the Core.
Time to apply all the software engineering skills you've acquired so far. Time to shine.
But that does not mean that this is the place to use every feature, hack, or technique you know about. Software engineering is about using the right tools & structure, not about using all of them.
So, what would make sense?
How could/should ft_irc be structured?
How should one work on such a big project in general?
Those are questions to ask yourself (as a team) beforehand.
The answers are distributed among the datastructures to use, which functionality belongs to which object, and how you want to communicate as a team. Take the time.
There are two areas of attack: 1. Unix Sockets 2. The IRC protocol & ecosystem#Prerequisites
poll()
/select()
work.poll()
or select()
. (You can open them up by using netcat (nc
), which you need to test your ft_irc
anyway.)
This should cost you only very little time, will clear up things, and is good practice for mini_serv
.
Well then, you're ready to go. The most important thing up front: Testing is key. So: Get to a working state (meaning: You have a server you can connect to, and that answers your requests) as soon as possible. This should be quite easy, especially since you already wrote your Echo Server, didn't you? ^^ Then, implement a good logging infrastructure. Print out every command the server receives and sends, plus everything else that might be useful. From then on, build feature by feature incrementally, always ensuring that the new feature works, and old features don't break along the way. For building those, you might want to get a log (from other teams, maybe?) of what your client actually expects.#During
We lost almost a week for 'just going with the protocol' when the client we chose (KVIrc) was expecting more than we thought it needed.
There's one thing in the subject that is easy to forget until the very end:#Cleaning Up
What a journey. And you came so far!
Only one big coding project left. I wish you the best.
And may your coworkers always write understandable code.
#Pointers