The Unix command line tools are a great metaphor for good software engineering and they follow the Unix Philosophies of: Writing simple parts connected by clean interfaces - each tool does just one thing and provides a simple CLI that handles text input from either files or file streams.
For calculating the number of bytes, should we assume a specific encoding of the characters into bytes? If not, is there a way to determine this encoding in case of reading from the standard input? I am using c++ for reference.
Coding Challenge #1 - Build your own wc!
I am a begginner , I tried this in golang , any experienced golang engineers can leave me a review and I will correct my code . It can be found here
https://github.com/UnplugCharger/coding-challenge/blob/master/01_wc/main.go
Here is my solution using good old C 😊 70-80% done ✔️
https://github.com/clovisphere/wc
(I just came across these challenges. Let's see how far I will go)
For calculating the number of bytes, should we assume a specific encoding of the characters into bytes? If not, is there a way to determine this encoding in case of reading from the standard input? I am using c++ for reference.
Here is my solution in Scala: https://github.com/Ghurtchu/wc
I'm planning to add more unit tests and property based tests later.