clone-hero-chart-db
System for indexing clone hero charts
Contributing
Currently, the system uses symlinks to make sharing code between the build and the project a bit simpler. This may change in the future. However, if you are on a filesystem that does not support symlinks, you're going to have a bad time trying to help.
The project is built via sbt
. You can get sbt
from Lightbend, or you can use an alternate
launcher (which i recommend): paulp/sbt-extras.
Once you have sbt
, you'll need the jdk. For now, the project is built using openjdk-8
. Oracle's
jdk works fine, too as long as you have version 8.
Todo: database setup instructions
Technology stack
- PostgreSQL: Because it's the best relational database out there.
- Scala: Because I don't know haskell very well yet.
- http4s: To serve http requests and provide an http client.
- scalaz: To provide robust functional programming abstractions.
- doobie: To provide database access in a sane manner.
- argonaut: For functional json (de)serialization.
- tsec: For cryptography.
- pureconfig: To provide functional config file parsing.
- scalacheck: For property based testing.
- flywaydb: For convenient database migrations.
- enumeratum: For sane scala enums.
- shims: For compatibility between the fp libs.
If the above ever seems incorrect or out of date, check BuildSettings.scala. If the technology stack is out of date, please create a pull request to fix it.
Design Philosophy
- No null values.
- No exceptions.
- No type casing. (
isInstanceOf
) - No type casting. (
asInstanceOf
) - No side-effects. "but..." No. Not even then.
- No using methods defined on
Any
. (equals
,toString
,hashCode
) - No calls to
notify
orwait
. In fact, avoid most ofPredef
. - No calls to
classOf
orgetClass
.
This leads to the use of a subset of the scala language, which some call scalazzi
.
Doing this, we will create an application made up of more composable components which are easier to test, easier to debug, and easier to expand upon. This means more features faster in the long run, with fewer bugs.
This design philosophy is expanded upon in Tony Morris' (dibblego) talk about parametricity at YOW West 2014 (video/slides), and is talked about in lihaoyi's blog
Violating any of the above guidelines is a direct violation of the official Code of Conduct
Having some knowledge of type classes and functional programming concepts will go a long way to make working with this code easier. I highly recommend the data61 fp course if you are new to fp.