Coder Social home page Coder Social logo

nerddeck's Introduction

NerdDeck

Build Status Build Status Build Status

Welcome to NerdDeck, a project initiated during the first semester of my Master's program at TH Rosenheim in the course Concepts of Programming Languages. In this project, I will be comparing two programming languages, Go and F#, within the context of functional programming.

Project Overview

This repository is dedicated to exploring the paradigms of functional programming in the context of two distinct programming languages: Go and F#.

ScreenshotNerdDeck

Table of Contents

Paper

I wrote a paper for this project, it contains an introduction for functional programming, for Go and F# and also for the coding project NerdDeck. This paper was written in LaTeX and can be found here here.

Getting Started

This section is about how you can execute the code by yourself. Note that NerdDeck is only a command line program!

Go

  • Verify that you have installed everything which is necessary for Go on your system (info can be found here)
  • I used go version go1.21.2 darwin/arm64 on my system
  • If you have Go installed successfully clone the repository: git clone https://github.com/maex0/nerddeck.git
  • Navigate to the project directory: cd nerddeck
  • Navigate to the go project directory: cd go
  • Build the project with go build
  • Execute with ./nerddeck and enjoy NerdDeck

F#

  • Verify that you have installed everything which is necessary F# on your system. I used .NET 7 on my system
  • Clone the repository: git clone https://github.com/maex0/nerddeck.git
  • Navigate to the go project directory: cd fsharp
  • Execute dotnet build and verify there are no build errors
  • Execute dotnet publish -c Release -r osx-x64 --output ./Release ./src/App/App.fsproj and enjoy NerdDeck (I used osx-x64 because I use a mac. For Windows or Linux users look for dotnet publish documentation and different runtimes)
  • Go into the folder with ./Release, execute with ./NerdDeck and enjoy NerdDeck

Database

Disclaimer: For the purpose of this project, a single json file is used as a simple and lightweight database to store flashcards. While this approach is suitable for educational and illustrative purposes, it may not be suitable for production usage due to limitations in scalability and concurrent access.

In a production environment, a more robust database solution should be considered, such as a relational database (e.g., PostgreSQL, MySQL) or a NoSQL database (e.g., MongoDB). The choice of the database will depend on the specific requirements of the application.

Database Schema

The flashcard data is stored in a JSON file with the following structure:

[
  {
    "ID": "37268335dd6931045bdcdf926",
    "Question": "What algebraic data types does F# use?",
    "Answer": "Record types and discriminated unions",
    "Repetitions": 1,
    "EasinessFactor": 1.3,
    "NextReview": "2023-12-18T18:17:22.438077+01:00"
  }
]

Model

In order to meet the requirements, a flashcard model is necessary. It is crucial that users are able to create multiple flashcards and validate that there are no duplicates of the question-answer combination. The ID is generated from the question and answer of the flashcard, serving as a primary key for the model. This model should be used in both languages.

Nerddeck model

Contributing

Contributions are welcome! If you have insights, suggestions, or additional examples to contribute, feel free to contact me.

License

This project is open-source and available under the MIT License. See the License file for more details.

nerddeck's People

Contributors

maex0 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.