System for indexing clone hero charts
Contributing
Currently, the system uses symlinks to make sharing code between the build and the project a bitsimpler. This may change in the future. However, if you are on a filesystem that does not supportsymlinks, 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 alternatelauncher (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'sjdk works fine, too as long as you have version 8.The spirit of Guitar Hero lives on in a bizarre community-made clone. But now people are taking the idea of custom charts and songs even further. Over the years, Jason Paradise has come to the attention of multiple musicians, with Matt Heafy, lead singer of metal band Trivium being just one big name who is a fan.
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 semi-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, checkBuildSettings.scala. If the technology stack is out of date, pleasecreate a pull request to fix it.
Design Philosophy
- No null values.
- No exceptions.
- No type casing (
isInstanceOf
). The one exception is pattern matching on ADTs. Even this is a smell. - 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 totest, 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 West2014 (video/slides),and is talked about in lihaoyi's blog
Failing to abide by any of the above guidelines is a direct violation of the officialCode of Conduct
Having some knowledge of type classes and functional programming concepts will go a long way to makeworking with this code easier. I highly recommend thedata61 fp course if you are new to fp.