Skip to content

Instantly share code, notes, and snippets.

View Ellzord's full-sized avatar

Elliot Ford Ellzord

View GitHub Profile
@Ellzord
Ellzord / PrimitiveWrappers.java
Created June 25, 2015 09:56
A utility for handling primitive type wrappers.
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.Optional;
/**
* A utility for wrapping and unwrapping primitive types.<br>
* <br>
* The default primitive value for a wrapper can be obtained using {@link #defaultValue(Class)}.
@Ellzord
Ellzord / LearnProgrammingRedditPost.md
Last active August 29, 2015 14:21
Doing open source right in 2015

I designed and prototyped an artificial life framework for simulation (or games) in Java 8. When I was happy with what I had made and how it could be used the first thing I thought about was making it open source. Actually getting to the point where anyone can use or contribute to it was a right nightmare (had no doc at all)!

I think my open source framework would be really useful to students or to anyone going open source. Here is why:

  • JALSE is on GitHub: this means you really have to learn git (I'd like to know why any new project wouldn't use git). Source control systems seem like a unnecessary thing when you're working solo but as a team its 101. GitHub makes it easy by having everything visually available to you (and it's pretty). JALSE GitHub
  • JALSE is built by gradle: It really doesn't matter what you use to build as long as it makes your life easier (and for me that's gradle). It's clean and easy to read what's happening and it's the best parts of Ant,
@Ellzord
Ellzord / States.java
Last active August 29, 2015 14:14
Utility for creating constants to be used as states (bitwise).
import java.util.Arrays;
public class States {
public static final int EMPTY = 0;
public static int create(int ref) {
return 1 << ref;
}
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;
/**
* Braille is a writing system based on a series of raised / lowered bumps on a
* material, for the purpose of being read through touch rather than sight. It's
* an incredibly powerful reading and writing system for those who are blind /
* visually impaired. Though the letter system has up to 64 unique glyph, 26 are