To what extent is using the standard library considered cheating?

I’ve been taking the http challenge a few times in different languages like Go and Python. I’ve been enjoying myself so far, but I always have a voice in the back of my head asking if the way I implement things is the way it’s “intended” to be. To an extent the way I have been approaching every challenge has been something like “the standard library is free game, other dependencies (except for things like linters) aren’t.” But even this feels a bit… sketchy? An obvious example being the grep challenge, where using in built regex is probably considered cheating, right? Which gets me back to the http challenge. Different languages have different level of support for “common” tasks, the Go stdlib is famously robust, while node tends to be a bit more barebones.

Ultimately I am just getting at the question in the title, is the idea to basically only use “bare” syntax to do things like string parsing? Concurrency? Python’s stblib has the urllib package which would handle the target field of the request line trivially, go would probably able to build a production ready http server using only the stdlib pretty easily compared to most of the other languages available. Up to this point my answer has been a sort of “I am here to learn, so if it is too easy then it’s not allowed” but like I said, there is a voice in my head that is saying things like “an important skill to learn as a developer is delegation to other dependencies when needed”, cryptography being the go to example.

Don’t over think it too much. You are open to using as much or a as little of the standard libraries as you like. You are free to repeat challenges. You could do a first pass at a challenge using whatever the language offers to better focus on what the challenge is teaching. Other passes you can try to dig deeper and not rely on the standard library as much.

1 Like

There was a similar discussion for grep a while back, and they eventually did add some banned packages. For your case (Python), I definitely wouldn’t be using the http.server module, but the rest is really up to you.

Update: as noted here, there is already anti-cheat, which works by checking for HTTP headers commonly set by off-the-shelf HTTP server libraries but are not expected to be set by our own custom implementations.

1 Like