977 reputation
1917
bio website
location Germany
age 25
visits member for 4 years, 3 months
seen 9 hours ago

Passionate Programmer.

Favored Languages: Kotlin, CoffeeScript, F#

Frameworks of Choice: Dropwizard, LoomSDK


Dec
4
comment Unit Testing a stateful framework such as Phaser?
I'm sorry for the confusion! I've added my Tilemap code as an example of a unit of functionality I'm trying to test. Tilemap is an extension (or optionally has-a) Phaser.Tilemap that lets me render the tilemap with a bunch of extra functionality that I'd like to use. The last paragraph highlights why I can't test it in isolation. Even as a component, the moment I just new Tilemap(...) Phaser starts digging in its cache. I'd have to defer that, but that means my Tilemap is in two states, one that can't render itself properly, and the fully constructed one.
Dec
4
revised Unit Testing a stateful framework such as Phaser?
added 3488 characters in body
Dec
4
comment Unit Testing a stateful framework such as Phaser?
No, I'm testing my own functionality. I'm sorry if the tests don't look like that, but there is a bit going under the covers. Essentially, I'm looking through the tilemap and discovering special tiles that I convert into game entities such as Items, Creatures, and so forth. This logic is all mine and must certainly be tested.
Dec
4
asked Unit Testing a stateful framework such as Phaser?
Oct
28
awarded  Self-Learner
Oct
27
awarded  Revival
Sep
24
awarded  Autobiographer
Sep
1
awarded  Yearling
Aug
12
answered What is the name of λx.λf.fx (like reverse apply) in lambda calculus? Does the corresponding function have a standard name in programming?
Jul
17
awarded  Notable Question
Jul
2
awarded  Curious
Jun
17
answered How to minimize typos when you code?
Jun
2
comment How to Detect Sprites in a SpriteSheet?
@ForkandBeard thanks for the update! I've added my own solution as an answer below. Why not do the same so I can give you the upvote you deserve?
Jun
2
answered How to Detect Sprites in a SpriteSheet?
Apr
16
awarded  Mortarboard
Apr
13
comment Types of unit tests based on usefulness
@Craig: Precisely! This is what I meant with not knowing how to write proper tests. As a college student, the tax collector was one large class written without proper understanding of SOLID. You are absolutely correct thinking that this is more of an integration test than anything else, but that was an unknown term for us. We were only exposed to "unit" tests by our professor.
Apr
13
awarded  Nice Answer
Apr
13
awarded  Yearling
Apr
7
comment MVC in a desktop application - can the View ever hold a reference to the Model?
@Prog: Yes, the View can query the Model in MVC, but it is up to the implementer whether or not they would like to allow it. You can just as easily disallow or it abstract it as I did with my AS3 application. Your other points are pretty spot on for my understanding, but I'm hoping that another soul will answer so you have something to compare my answer to :)
Apr
7
comment MVC in a desktop application - can the View ever hold a reference to the Model?
@Prog: MVC and MVP are two types of software-patterns, but there are more out there. Andy already mentioned that MVVM exists, which is a generalization of MVP, and there are others depending on the context. Check out RMR (Resource Method Representation) for the web and I believe Rails uses an even different architectural style.