699 reputation
28
bio website
location Vienna, Austria
age
visits member for 2 years, 2 months
seen Dec 10 at 13:43

Oct
2
awarded  Yearling
Sep
1
answered How 'child proof' should i write code as a solo programmer?
Jul
25
comment How much data should exceptions hold?
There are some kinds of errors/exceptions I can react on by following an alternate route. In my example the caller may adjust the timeout by 10% and tries again. Or it tries another server instance. Or it wants to write to a database, that a specific server is not available.
Jul
25
comment How much data should exceptions hold?
you didn't say The exceptions should be self explaining by their type. I agree with that (although not completely). However... let's assume a timeout-exception, which should indicate the server to be reached, and the timeout-period. In your proposal you create a string with that values, and later you are not able to access them programmatically, only by parsing the string.
Jul
24
answered How much data should exceptions hold?
Jul
24
comment How much data should exceptions hold?
-1 for "don't store this values inside the exception but just use them to create the exception message in the constructor." a string is good for textual output, but what about translation or checking out a specific value (e.g. an error code)? Are you then going to parse the string?
Jul
14
awarded  Organizer
Jul
13
comment Is testability and mockability really that important in web development?
@MightyPork Well, not for everything. And it is up to you (or your lead developer, or your architect) to decide whether it's worth it. You basically do that by defining quality goals and maybe come to the conclusion testability is a top 5 criteria (or you do not test at all, because you implement a static webpage). BTW: when writing unit-tests you often unveil caveats in your code like bad model-structure, so maybe your model wasn't that good after all.
Jul
1
comment How bad is it calling println() often than concatenating strings together and calling it once?
I have to say that I don't see the point here. When interacting with a user via terminal, I can't imagine any performance issues because usually there is not that much to print. And applications with an GUI or an webapp should write to a log-file (usually using a framework).
Jun
11
comment Continuing to code on large projects
I'd like to amend: 2) there are several types of automated tests (unit-, behaviour-driven, GUI-tests). Think/read about which one makes sense to your projects. 3) document the main aspects of the architecture, e.g. arc42 is a very slim template.
May
16
comment Benefits of Java in education?
@Jasper probably you want to take a look at JVM based languages like groovy or scala.
May
16
comment pattern to share objects between API and application
To me it is not clear what architecture you implemented (maybe it is the .net wording that puzzles me) - is it a 3 tier architecture: client, server, db?
Apr
29
answered Exception when logging exception: is it correct to ignore them?
Mar
17
comment Using words instead of numbers for versioning?
An answer would strongly depend on what you want to achieve with that versioning pattern. What is the downside of numbers in your context?
Feb
6
comment Git Repository Setup
Are the products distinct? If yes, why not create one git-repo per product?
Jan
1
answered When is it okay to reassign the model for a view in MVC?
Nov
13
comment What's the difference between overloading a method and overriding it in Java?
+1 for simplicity
Nov
5
comment How can a collection class instantiate many objects with one database call?
@ButtleButkus for persistence, you probably should take a look at the DAO pattern. I often use a simplified version of it (without interfaces), because almost every time you are not going to change that.
Nov
3
comment How to know how much detailed requirements should be?
Does everybody understand "the system must allow the user to manage employees" the same way?
Nov
3
comment How can a collection class instantiate many objects with one database call?
I personally avoid static methods for two reasons: 1) they are harder to test in unit tests and 2) they often indicate that encapsulation is not correct. Think of those two: static: Book.loadFromDB() and non-static: new BookDAO().loadFromDB(). The latter is definitely the better option and there is no need to make it static.