Prototype Factory
About Archive Photos Also on Micro.blog
  • I have ADHD

    For most of my life, I’ve felt like an outsider. Bullied in elementary and high school. Having trouble connecting with my peers. Having trouble with most classes in school. Dropping out of university. Pursuing entrepreneurship as a way to set my own rules, work on new projects and take back some control. When I first read about ADHD, almost ten years ago, I shrugged it off because I wasn’t especially hyperactive.

    Continue reading →

    → 12:05 PM, Feb 19
  • Nutcracker at The Four Seasons Center in Toronto

    → 6:57 PM, Dec 21
  • Actual generic parameters of a Class in runtime

    Yesterday I was working on dynamic mapping of marshallers to their marshalled type. The way I’ve done it was having an interface Marshaller with generic parameter <T>. Then I was using Reflections to get all classes that implements this interface. Then I needed to get the actual type of <T> which is a problem if there is for example an abstract class that is the base for all marshallers. So if you have the following setup, it’s not as easy as just calling ParameterizedType#getActualTypeArguments().

    interface Marshaller<T> {
    	... 
    }
    
    abstract class AbstractMarshaller<T> implements Marshaller<T> {
    	...
    }
    
    class