GithubHelp home page GithubHelp logo

csclub's Introduction

Computer Science Club

I run a computer science club at school for younger students.

I have found that CS syllabi usually restrict themselves to problems which can be solved by a single machine. That is why I am striving to teach members of the club about HTTP and other protocols which allow computers to interact with eachother over the Internet, even if they are not in geographical proximity.

Having taught the fundementals of requests, I think my students will need more practice using them in order to gain confidence and fluency with HTTP practices. At the same time, I would like to develop their problem solving skills by teaching them about algorithms and their uses.

It is with these two goals in mind that I have created a web server in Go which acts as a system by which algorithmic challenges can be hosted at certain endpoints, delivering problems and receiving solutions using simple requests. It will be possible for me to add new endpoints as I develop new problems for particular topics.

It is my hope that my successor will be able to create challenges in this way.

Structure

  • main.go contains the basic code to start the server on localhost port 8080.
  • db/ implements an in-memory database to store active problems in a map system. In order to prevent data race conflicts where possible, mutexes have been used to ensure concurrent goroutines do not cause errors.
  • handler/ contains the paths and implements HTTP handlers for the challenges. It utilises a subrouter system to allow the challenges to be split into topics. Generally, problem generating endpoints will be of the format "give..." and receiving endpoints will be named "receive..." . The general convention for this project is to use the same HTTP endpoint for the same problem but to use GET and POST requests to differentiate between problem generation and submission.
  • challenge/ contains some general code for challenges. notify.go is code that will be run on every submission - just for visual feedback.

csclub's People

Contributors

rhobro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.