« first day (387 days earlier)      last day (3928 days later) » 

11:00
@SimonAndréForsberg department of defence don't like virusses on there network ^^
and don't like we are playing games ^^
But little viruses are so cute.
then we gotta download the source and play like that :D
I'm with stupid, I misread something.
@chillworld Unfortunately, downloading the source won't give you the same GUI. I don't have the GWT project on GitHub
I'm going to upload a new version of the game now btw
My netbeans is being a bit crazy...
11:04
@skiwi Anything I can do to help with that? (Other than suggesting Eclipse, of course?)
Rebooting helped
New game version uploaded
To github or online?
Online, the compiled playable thingy
@SimonAndréForsberg I see that it is also not a netbeans project :(
11:06
@chillworld No, I'm using Eclipse.
btw, you are in luck for automated build process
@SimonAndréForsberg maybe suggesting intelligi?
As you can specify github dependencies :)
@chillworld My cousin is using IntelliJ these days (not sure if he'll switch back to Eclipse or not). I'm not sure how using IntelliJ would help cloning the repository easier though?
@skiwi Sounds quite neat. I was thinking about something there, does it have to be integrated with GitHub or can I also use automated build process for local projects not on github?
@SimonAndréForsberg Package android.content.Context does not exist
11:08
0
Q: Optimize foreach loops

user2843047By any means, if any can tell me if this code can be more optimized than it already is.. Please say so :) public function select($table, $where = array(), $Innerjoin = array(), $group = array(), $selects = array()) { $vowels = array("a", "e", "i", "o", "u", "y", "A", "E", "I", "O...

@SimonAndréForsberg Not quite sure what you mean there
@Morwenn Time to grab a bite to eat
@SimonAndréForsberg no idea but it was a different suggestion, I prefer netbeans to, but miss some things that eclipse has.
the maven graph in netbeans is really good
to see your dependencies and collitions
@skiwi Oops, you're right. The Commons repository, as it also provides me some functionality for Android, have a dependency on an Android.jar and on Log4j 1.2.17.
@SimonAndréForsberg Where can I find those?
Perhaps include them inside the project? (not sure if that's correct approach)
11:11
@skiwi Soon on GitHub
It's maybe not the correct approach, but it's the easiest for now :)
Cool, because I should be able to pull directly there
0
Q: Penney Game - mapping macros to strings

user43115Here's my code for http://www.spoj.com/problems/NY10A/. My solution got accepted, but I am not really happy with what I have done here. As you can see, there is a lot of redundant code I could not remove. For instance, if string "TTT" could be directly mapped to the macro TTT, somehow, and so on,...

@SimonAndréForsberg can I download the war somewhere?
@skiwi The Android jar is 19 MB, but I'm adding it for now... I can always remove it later. But yeah, it does not feel like an optimal solution.
sooo... Anyone knowledgeable in JSF / Primefaces??
and why the heck are there no new questions??
0
Q: Loaded Records not showing in view

Vogel612So to make it relatively simple: I have some Primefaces-Page, which is supposed to represent database records in a table-structure. I keep these records in a List<Customer> which resides in a @ConversationScoped backing bean. I have verified via debugging, that the List gets correctly filled wit...

11:22
@chillworld I'm making a special zip just for you
@Vogel612 There is a project I'm helping a bit with that is using JSF, unfortunately I haven't completely gotten started with the project (it's one heck of a mess to set up!) but I'll take a look
@chillworld nice answer on that piano thing...
@Vogel612 Sorry, I don't think I can help you there :( I'd recommend adding some **bold text** to your question though to highlight the important parts (such as the problems), just to clarify what your question is
but standards are written with d, even though the German (and probably also the Dutch word) are written with t ;)
@chillworld zomis.net/war.zip <--- Get it while it's hot, just unzip and open the HTML. It's all HTML, CSS and (highly obfuscated) JS.
@skiwi Dependencies for commons is in github.com/Zomis/Commons/tree/master/Custommap/lib
@SimonAndréForsberg thanks for the tip ;)
11:29
@SimonAndréForsberg Alright, I'll check in a bit
@SimonAndréForsberg link is blocked, you have google drive?
@Vogel612 thx
loool
@chillworld I think I have somewhere, but I also have dropbox, try this: dropbox.com/s/kpkbyaeexozl04q/war.zip
@SimonAndréForsberg your going to laugh, dropbox blocked google drive not ^^
@chillworld I got one ;)
11:33
@Vogel612 I have also dropbox of 50Gb
@chillworld What kind of job is it that you have!?
@Vogel612 only not accesible from work ^^
sheeeesh that's overkill..
and that is sh*t
@SimonAndréForsberg belgium army.
Hmm what's difference between pull and fetch?
11:34
oh... army
@skiwi no clue...
they have idiotic rules
"In the simplest terms, git pull does a git fetch followed by a git merge."
Ok so always pull pretty much
but I know that you can pull the whole repo, and then can "track remote branches" by just checking the branch out.
git pull origin
git checkout someBranch
this works if the someBranch exists in "origin"...
11:36
@skiwi Always clean. Always pull.
but if you instant git checkout someBranch you will get "could not find branch"
So close...
@SimonAndréForsberg that works :)
@SimonAndréForsberg import net.zomis.others.AStar; cannot be resolved in Commons
@chillworld Finally!
@skiwi What file depends on that one?
11:37
@SimonAndréForsberg Commons/Custommap/src/net/zomis/mazes/AStarPath2.java
@skiwi I've moved that file to another place now. Github updated
As long as it doesn't break somethign else :p
The net.zomis.others.AStar is technically not my code originally so awaiting my own A* implementation, it's outside the git repository for now
I don't think it should break anything
aaand it's gone
@SimonAndréForsberg now trying to add it to local server ^^
11:44
And now we have an error inside a file
Of course we have....
what error?
ZonesAndCards/net/zomis/cards/test/whereveritmaybe/SimpleGameTest.java
game.d.extractBottomCards(2).moveToTopOf(game.d);
Something with the type inference
using Java 8 btw
I'm also using Java 8 there
@SimonAndréForsberg
What is the exact error?
11:48
incompatible types: CardZone<Card<CardModel>> cannot be converted to CardZone<CAP#1>, where CAP#1 extends Card<?> from capture of ?
@skiwi Ah, I think I've found it. CardZone.java:143 should be public CardZone<E> extractBottomCards(int number) { (and the line below should be modified as well)
CAP#1?
Would that remove the Netbeans error? If so, I'll make a commit
@SimonAndréForsberg Yeah
@Morwenn Those are captured types, ones that the compiler infer during compilation
Oh, for lambdas?
11:50
@Morwenn No, for generics.
No, it's been there since forever :)
@skiwi Github updated
@chillworld Any luck with the local server?
@SimonAndréForsberg I just feel dump. put your zip unzipped in the webapps directory
started server
INFO: Deploying web application directory cardgame
26-mei-2014 13:52:56 org.apache.catalina.startup.HostConfig deployDirectory
@chillworld Unzip the zip. Actually, you don't even need the local server, you can just play it on your machine. It's all HTML, CSS and JS.
11:55
and when I go to url I get Card Fighting on the IE and that's it
@SimonAndréForsberg More fun:
C:\Users\Frank\Dropbox\NetbeansProjects\Zomis\Commons\Custommap\android\net\zomis\android\TwoDScrollView.java:916: error: unmappable character for encoding UTF-8
	private boolean scrollToChildRect(Rect rect, boolean immediate) { // TODO testa med scrollToChildRect som public och anv?nd f?r att scrolla till plats efter zoomning
oke FF is working
@skiwi I translated the comment to Swedish. :)
Github updated
Having other people use your work is good, I don't think I've ever made so many commits as I've done so far today :)
Next attempt
There's more!
@skiwi Doesn't Netbeans give you a list of all the errors, so that you can see more than just one at a time?
11:59
TurnEightGame.java:54: error: unmappable character for encoding UTF-8
\TurnEightPlayAction.java:65: error: unmappable character for encoding UTF-8
\MDJQGame.java:258: error: unmappable character for encoding UTF-8
\ManaTwoCards.java:65: error: unmappable character for encoding UTF-8
\WarlockCards.java:40: error: unmappable character for encoding UTF-8
That is what it's giving me now
you may also check the surrounding lines of those btw
@skiwi Github updated
@SimonAndréForsberg It built!
2
Hallelujah!
I really don't understand what your Netbeans have against ÅÄÖ. Don't you also have 'funny' characters like that in Dutch?
12:10
probably its the first ones
Dutch is all normal though mostly, except ë and ï pretty much
[2014-05-26 14:11:08,209]  INFO Cards [AWT-EventQueue-0] net.zomis.custommap.CustomFacade.<init>(CustomFacade.java:50) CustomFacade initialized
java.lang.NullPointerException: No Event Factory set
[2014-05-26 14:11:08,211]  INFO Cards [AWT-EventQueue-0] net.zomis.cards.swing.CardFrame.<init>(CardFrame.java:91) Creating game
	at net.zomis.custommap.CustomFacade.createEvents(CustomFacade.java:39)
we're not done yet though :p
of course not
ah, you're running the CardFrame... it's been a while since I tried that out.
I'll check
@SimonAndréForsberg I don't get it completly, builders I can raise but the number is going down to
Ah it's just waht Netbeans suggested me as main class though
It didn't offer me any choic efor a main class
Wich one do you usually run?
@skiwi There is no other main classes at the moment. Normally I just run one of the tests or the GWT project.
@chillworld When you play a card, you're using resources that it costs to play that card. There are different cards to add different kind of workers. "Recruit" to add Recruits, "Builder" to add Builders, and some other card to add a Wizard.
For some reason it doesn't execute tests
huh Exception in thread "main" java.lang.RuntimeException: Stub!
12:17
For now I'd recommend not using the CardFrame, it needs a bit of a re-design
Then running the code is still useless? :p
@skiwi I recognize that error! I've also encountered it. I think it's because it's trying to use the wrong JUnit code. Check the build path to make sure that the correct JUnit is on it
@SimonAndréForsberg I get that, but why do mine builders keep getting to 2 if I add builders? and when you have to discard you get other cards to choose from then you have in your hand, is that also correct?
@SimonAndréForsberg Define correct
Hmm I have both JUnit 3.8.2 and JUnit 4.10 on classpath... What are you using?
@skiwi JUnit 4
@chillworld When you discard cards, you get new cards that replaces the old ones. As for the builder problem, I'm not sure I understand exactly what happens
@chillworld Can you take some screenshots or something that can describe the problem?
12:25
0
Q: comparing if-else and case condition

user3331975I have a script used for installing few rpms depending on operating system type. Here in this example, the script will install packages on two system "centos" and "suse". The system names are listed in nodes.txt and read as an input while executing the script. i.e ~]# cat systems.txt centos su...

@SimonAndréForsberg Any specific version?
@skiwi See the top answer here: stackoverflow.com/questions/10067605/… . The Android.jar should not be needed to use in the Cards-project. So if you added that jar to that build-path, remove it.
okay
It still complains... but
And I removed andorid.jar
@skiwi If you have an ordering tab, put JUnit 4 before the others, like the above
order?!
Do I have that :p
12:32
Project -> Properties -> Build Path -> Order and Export in Eclipse :)
Ah it's implicit in the libraries here
I can move those up and down
It's doing something now
Hi @kleinfreund
@skiwi what is that 'something'?
Heya @Simon, hey all
@SimonAndréForsberg 149 tests passed, 1 test failed, 3 tests caused an error, 3 tests skipped (5,909 s)
hey @kleinfreund
12:35
net.zomis.cards.CardsTest and net.zomis.cards.CardsUntypedTest: no runnable methods
@skiwi I more or less expected some tests to fail / cause errors actually. Which were the failures?
Same for net.zomis.cards.mdjq.MDJQTest
And WSReplayTest failed with a todo message :p
Where do I start analyzing the source?
@skiwi You could start in net.zomis.cards.model.CardGame, that's the superclass for all the card games. Then you could check the type hierarchy of that class to see the subclasses, and then pick a subclass and start exploring :)
It's a loooooooot of code overall :)
@SimonAndréForsberg What if I don't have that package? :p
@skiwi You should have, it's in the src folder of ZonesAndCards
If you wouldn't have it, you'd have a loooooooot of compiler errors
	@Test
	public void noTestForSillyNetbeans() {
		assertTrue(true);
	}
@skiwi Would that ^^ be recommended to use for Netbeans?
12:40
yeah
To make it stop complaining about empty tests?
@SimonAndréForsberg Ah that explains, I was looking under source, but I needed to look under src
All kinds of weird foreign looking code!
@SimonAndréForsberg ah no, its only when you do reward builders you get a temp builder * 2. with add builder it stays now.
Btw, do you need to make it also Java 6 compatible somehow? With diamond operators
@chillworld Yeah, that's a little dirty trick I'm using to make the reward workers card work. It gives you *2 income next turn.
@skiwi I used to have that requirement before, when I didn't know about the retrolambda stuff. Now I don't have that requirement anymore. I can use Java 8, but not Streams. I can also not use any of the existing Java 8 interfaces such as Function, Consumer and stuff - which is why I have the HSAction interface and similars.
The only Java 8 features I can use is lambdas - but not in static methods (because of GWT), and default methods.
@skiwi It's Java, not Swedish :)
Where's @Mat'sMug?
12:49
@SimonAndréForsberg Are you planning to convert things to lambda expressiosn then wherever possible? And to use diamond operators
@SimonAndréForsberg I think I get it now, without a explication was hard to understand in the beginning
Time to continue on my own version :p
@skiwi More or less yes. It's not a high priority though. I'm mainly trying to make new code use the Java 8 features that I can use. There are some spots that can't use lambdas properly because of some possible bugs in the GWT compiler. So I'm really looking forward to when GWT fully supports Java 8 (prefarably with streams!)
And I still cannot find a satisfactory way to link the game and players
@chillworld Yeah, sorry about that. Documentation is not my best skill :)
12:52
Would there even possibly be a good reason to be able to assign a player to a different game?
With a setGame
@skiwi CardGame.addPlayer is what I use. And as you can see, that code sets a field in the player. So it is a circular relationship
I don't think a setGame would be good. Wouldn't make sense to switch that once it's initialized.
I do kind of want to get Game out of the player constructor
Don't you have waht I just described though?
protected void addPlayer(P player) {
this.players.add(player);
player.game = this;
}
@SimonAndréForsberg no problem, we are intelligent enough to figure it out
Though you are sneaky and made it package-private :p
I bought a greenhouse. If the manual was even simple as your game it would be already finished setting it up
2
12:57
@skiwi That's not a (public) setGame, note that the player.game field is default-visibility (or "package private" as it's called).
I can't do that :(
Because mine are in different packages
Well I'll just do it like this
public void setGame(final Game game) {
    States.requireNull(game, IllegalStateException::new, "A game has already been assigned to this player");
    this.game = Objects.requireNonNull(game);
}
13:01
@skiwi Shouldn't that be States.requireNull(this.game, ....) ?
Yes... that should be!
Good catch
I was about to update my Player tests... Until I noticed there are none
This explains my confusion
Which is a reallllly old version
And I didn't create unit tests yet because I wasn't finished... everything falls together
@SimonAndréForsberg I can help with general Travis CI settings, though getting everything working will still be a challenge
Getting everything working is always a challenge
@SimonAndréForsberg btw. I "solved" that JSF-Problem..
public List<Customer> getCustomerList() {
    if (customerList.size() == 0) {
        fillCustomerList();
    }
    return customerList;
}
bring the hate ;)
@Vogel612 s/customerList.size() == 0/customerList.isEmpty()/ :)
13:08
oh well..
that's not really making it better, is it?
Why use .size() == 0 when you can use .isEmpty()?
@SimonAndréForsberg that's somewhat beside the point don't you think???
after all a getter should contain nothing more than a return-statement......
@Vogel612 What about checking it in the constructor or setter? or private helper-setter
@Vogel612 Absolutely, I just couldn't resist simplifying what I saw could be simplified :) Indeed it's not a clean solution you got there, but if it works, it works.
1
Q: Loaded Records not showing in view

Vogel612So to make it relatively simple: I have some Primefaces-Page, which is supposed to represent database records in a table-structure. I keep these records in a List<Customer> which resides in a @ConversationScoped backing bean. I have verified via debugging, that the List gets correctly filled wit...

@skiwi the @PostConstruct annotated method should do have done the trick,.....
13:14
I try to stay away from JSF
I need to decouple logic in my Player class though...
@SimonAndréForsberg and others: pastebin.com/7ygd0UJm How would you decouple the playTurn() logic here?
first and foremost... why the heck does your player have a graveyard?
and next why are you reading from console in a logic-class?
@Vogel612 That was a quick hack hence this code is not github ready
And the player has a graveyard for when his cards are gone
prepend an interface to that and have it parse the console-input to a enum-like command that you can pass to the player..
@skiwi There are some significant changes I would do. First of all, a nextTurn method - either in game or in player to inform when the turn is over, do the DrawCard logic there.
@SimonAndréForsberg it may be that you have to draw cards for other reasons than a new turn...
13:21
@Vogel612 Player.drawCard method. Drawing a card should not be an action in itself IMO. It's not something you choose, it's something you have to do.
Your classes should be able to read data from any stream, not only from a specific stream :p
Then, I would probably have a PlayerController class to hold the Scanner logic, and this should also be interchangable with some AI.
Then I would have Player.performAction(Action) -- which gets called by your PlayerController / AI
That's some thoughts surely
I'm trying to understand what exactly I'm doing here
I also somehow want to encapsulate the "game rules", being as simple as that at the start of the turn you need to draw a card
but it's hard to reason about with those "optional" actions
@skiwi I'm considering doing a major rewrite/branch of my code that would make that a lot separated.
Keep talking about it and I might actually start that work today...
well for starters the Deck and the Graveyard IMO belong to the field...
13:28
And this is how you get a headache.
then your player should either be responsible for parsing user input, or for handling it....
Note to parents.....
IMO the deck and graveyard belong to the player. I would do I have done the same thing there. (almost)
If you have a headache, grab a bottle of headache pills and read the instructions:
right now it's more of a handler...
13:29
> take 2, and keep away from children.
2
Sometimes, I think that I know what the posters have in mind when they ask questions on Anime & Manga SE...
5
Q: What is the name of the Anime this girl from?

user5020I saw this picture on facebook and i would like to know what anime she is from

^^^^ valuable advice.
@rolfl How many did you end up taking then?
also inputting "end" gives "Unrecognized Command" error...
@skiwi two ;-)
13:30
furthermore your input is case-sensitive...
@Vogel612 Hence this is nowhere production ready hence it was only about the logic :P
@Vogel612 It does not ;)
But I'm trying to figure out why indeed
@skiwi it does, but it won't show...
@rolfl We need a SEDE to help people get that badge :p
as you probably already "redraw" in the next step..
13:33
@Vogel612 True, I didn't notice :p
@Morwenn Possibly ... I wonder......
That's funny.
monking!
@rolfl congrats ;)
annoying A vs B vs C question.. close-voting is itching...
0
Q: Return Task or result in Task.ContinueWith()

annemartijnI have to execute a method in a finally block after an async operation is completed. There are three ways to do this. I would like to know the preferred form in terms of readability and performance. Return Task.Result in ContinueWith() method. return task.ContinueWith(delegate { ...

13:48
@Mat'sMug If you won't then I'll go ahead....
@Mat'sMug I just looked at it like 30 seconds before you posted it... had the same idea.
TTGTH
see you alll
Which one is your code? Please post the code you have, ideally the complete method (including the contents of the finally block); "which is best" highly depends on how that code is consumed, so including some of the client code would help too. This is code review, we review your code - asking "which is best" is off-topic for this site. — Mat's Mug 5 secs ago
VTC / Opinion-based ...for now
I'd like you to read a little through this meta-post where a vs b questions are discussed. The second answer there states something very important: provide context for the best possible answer. As you have just posted 3 different pseudocode-snippets I will Vote to close this question, as your actual implementation is missing. — Vogel612 22 secs ago
VTC stub-code / hypothetical code
0
Q: Return Task or result in Task.ContinueWith()

annemartijnI have to execute a method in a finally block after an async operation is completed. There are three ways to do this. I would like to know the preferred form in terms of readability and performance. Return Task.Result in ContinueWith() method. return task.ContinueWith(delegate { ...

13:53
also for now ;)
@Vogel612 good job with the meta link
But but... he is Dutch
@CaptainObvious how timely.
gotta love chrome omnibox.
Oh wait, he programs in .NET, nevermind
13:53
i was like: meta.co <kbd>tab</kbd> a vs b questions and I got the link ;)
> Let's focus more on helping, and less on whether the question was phrased in a way that suits our tastes.
^^ from the linked meta-post.
> provide context for the best possible answer
right. but I messed up with saying "which is best" is off-topic.. right?
in my reading of the on-topic section it is.....
> Best practices in general (that is, it's okay to ask "Does this code follow common best practices?", but not "What is the best practice regarding X?")
13:57
Is it just me or this question looks like asking why the code is not fast enough ?
0
Q: comparing if-else and case condition

user3331975I have a script used for installing few rpms depending on operating system type. Here in this example, the script will install packages on two system "centos" and "suse". The system names are listed in nodes.txt and read as an input while executing the script. i.e ~]# cat systems.txt centos su...

@Marc-Andre probably missing a tag
@Mat'sMug A vs B are on-topic for the part A vs B. If it's off-topic it's for another reason
I'll delete my comment
@Mat'sMug There you are! (Monking!)
I just don't get why people give themselves the trouble of coming up with 2-3 implementations, when they could just post their darn code and get it reviewed. I suspect the what have you tried SO syndrome.
4
@SimonAndréForsberg yup! :)
@SimonAndréForsberg ah, now I understand that random upvote - nice answer, +1 :)
14:01
@Mat'sMug Wasn't so random after all, was it? :)
Could framework code be considered good enough once it works with two sufficiently distinct implementations without code duplication?
@skiwi Personally I'd say yes to that question without thinking too much about it. Although when thinking a bit more about it, it depends on how much extensibility the framework provides.
@Mat'sMug You might have seen it from the long discussions earlier today, but here is my code on GitHub: github.com/Zomis/ZonesAndCards
@SimonAndréForsberg saw that ;)
@SimonAndréForsberg Well I could go on hours improving frameworks and making my head explode, but I suppose it might be good to be able to stop that from happening
@skiwi Yes, head explosions is not something we want here. What specific framework code are we talking about btw?
14:07
I don't understand this comment:
Well, my reasoning was that a Chunk is a special kind of Grid, hence the overlap. At least, the classes will vary more than the interface, I suppose. The part with Mesh<T> : Grid<T>, IMesh<T> is referred to the base implementation of Grid (not provided), not the interface. Thus, it's not exactly redundant (or is it?). Are operators not guaranteed to be async? I might offload it to a method in that case. — Kyle Baran May 22 at 3:31
"Are operators not guaranteed to be async" ...WTF?
like, return 2+2; would be asynchronous??? how would that work with operator precedence??
@Mat'sMug Very soon you'll be on second row (technically you should be shown there already)
@SimonAndréForsberg nice! (I am!)
am I the only one that saw the term "shim" for the first time last week?
Thanks a bunch. That makes my life easier! In my original test for this function, I wasn't shimming anything and I was testing for the changed state as you mentioned in "Interpreting results". I tend to over complicate things ... need to learn to stick with my gut more :) — Cosmosis 2 days ago
14:12
@SimonAndréForsberg Still the refactoring of Player class
I really can't wait until GRID: Autosport gets released!
@Mat'sMug For me the thirst time is just now.
I understand it's a mock, "shimming" sounds like putting a piece of cardboard under your code to make it level.
(or maybe that's only in Quebec)
From a English -> Swedish online dictionary it says the definition of 'shim' is: "a thin wedge of material (wood or metal or stone) for driving into crevices"
matches my mental definition then
I'm not quite sure what he means by shimming... Is it like "hiding"?
14:16
more like mocking
THEN WHY DOESN'T HE SAY SO!?
Greatest feature of that game I believe will be that tyre conditions change gradually throughout the race and take a big hit if you lock up your brakes, etc.
Y U NO MOCK!?
Also I start to notice on the very hardest difficulty in GRID 2 that it really does hurrt your car's performance if you bang to many walls.
I hate not having English as a primary language sometimes...
@Mat'sMug ARE YOU MOCKING WITH ME!?
3
14:17
@SimonAndréForsberg I don't. I think "shimming" has to do with the mocking framework the OP is using
lol
3
(please see the pun ^^)
@Mat'sMug OK, that'd explain it
Injecting ISimon as a dependency enables testing code with any Java developer
^^ then one can mock a Simon
3
Oh eayh forgot to mention that you can also finally qualify for a race, instead of starting one in a random freaking position.
^^ ienc ypto
14:21
@skiwi Context for that statement?
@SimonAndréForsberg About GRID: Autosport
This needs one more vote to be a good answer:
24
A: Beehive numbers - using goto in C++

200_successYour use of goto is wholly unjustified, not just because goto is taboo, but because your code has flow-of-control that is hard to follow. Furthermore, the use of goto is not even an effective way to achieve your goal of compactness. Before addressing the core concern about goto, I'd like to p...

@Morwenn 0
Good :)
-1
and napalm'd ;)
14:31
@SimonAndréForsberg, better?
PlayerConfiguration playerConfiguration = new PlayerConfigurationBuilder()
        .turnAction(new ConsoleTurnAction())
        .handCapacity(5)
        .fieldSize(5)
        .deckCards(cards)
        .build();
Player playerSelf = Player.createFromConfiguration(playerConfiguration, "Self");
Player playerOpponent = Player.createFromConfiguration(playerConfiguration, "Opponent");

Game game = new Game();
game.setSelf(playerSelf);
game.setOpponent(playerOpponent);
@skiwi A bit better I think, yes. But I'm not sure how you plan on making the Player interchangable with an AI
That would be by using an AITurnAction
Ah, of course.
I need to train my "team" on Model-View-Presenter and Model-View-ViewModel. The only code they can write is SmartUI, it's fucking ridiculous. I just opened up a project that is under continuous maintenance, and notice there's ONE class in the entire project - a class that defines a combobox item......... the entire app is coded... in forms.
3
thinking in "layers" and "responsibilities" is being heretic over here.
@Mat'sMug What kind of monkeys do you have in your team?
14:43
the kind that's been copy+pasting code for the last 10 years and couldn't care less about how it's done, as long as it "works" - and then they don't even have a definition for what "works"
@Mat'sMug Sounds fun
@Mat'sMug Just a thought here, would you rather have them write this kind of "MVC" code?
10
Q: Markup calculator application using MVC

fscoreI want to make sure that the code is correct in terms of its design, code correctness, best practices & Junit testing. The complete description is given below: Functioning of the app quickly estimates the Final Cost depending on different markups. The following are the markups: Flat Markup o...

Hmmm the put 0 0 command takes the first card from my hand, and then makes it disappear...
Nevermind, I forgot how my game worked
4
It doesn't have events yet for putting cards on the field, silly me
Does anyone know if it's possible to use Annotations like @NonNull together with JUnit tests?
14:59
0
Q: Need some feedback on simple RDBMS design

AndyMy first major project requires me to create an RDBMS. Need some feedback before I create it.


« first day (387 days earlier)      last day (3928 days later) »