For language, I settled on Java for a few reasons. The languages that I know the best are Java, C, C++, and Python. Java gets one point for being the language that I'm most familiar with, but it also gets extra points over Python because I like the security afforded by a competent type system, and over C because the Anti-If thing that I'm trying doesn't work so well when polymorphism is nonidiomatic. The choice between Java and C++ was largely aesthetic, although Java's ability to use reflection is useful for object-construction exercises like JSON-parsing.
From there, I chose Maven as my build system, mainly because everyone has strong opinions about it and I've never used it. I don't really anticipate learning much about it in this exercise, because one of my main goals is minimizing external dependencies, but it's always worth a shot.
And that leads me to setup. I use the command below to generate a Maven repository:
mvn archetype:generate\
-DgroupId=com.themutatedshrimp.json\
-DartifactId=json-parse\
-DarchetypeArtifactId=maven-archetype-quickstart
That creates a project with some classes called "App" and "AppTest", which don't really do anything. After running Eclipse's auto-formatting on them to remove the annoying whitespace at the ends of the lines, that comprises my first commit, at the tag INIT-1.
(Note: the tag INIT-0 is the state of the code at the beginning of this post. INIT-1 is the first actual commit, and INIT will be the merge commit back into master. I'll be following this convention in order to easily refer to individual commits on the repository in Github.)
The rest of the "INIT" commits are a few other maintenance tasks to clean up and prepare the repository for actual coding, such as:
- INIT-2: Adding a plugin to make Maven-Eclipse integration use the right version of Java
- INIT-3: Upgrading to JUnit 4.11 and reformatting the code to match my style
- INIT-4: Adding a .gitignore file.
And now we're ready to start!
No comments:
Post a Comment