It is currently 11 Sep 2025, 22:41
   
Text Size

Big commit, no dice / SVN hugely broken on r10194

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Sloth » 04 Sep 2011, 07:11

Doublestrike wrote:Anyway, I'll just modify quest decks to have the standard [metadata][main][sideboard] structure, and leave the hard coded extras in QuestUtil and quests.txt, then call the issue resolved.

After that, I'll look into the serialization stuff you mentioned.
I think you can leave the quest files as they are, the additional stuff should just be ignored by the program until you find a way to read it from outside the normal deck/cardpool classes.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby friarsol » 04 Sep 2011, 14:11

Max mtg wrote:It's strictly forbidden to add tokens into deck, by design of CardPool and by rules of MTG.
However challenges need that cards in play as a significant part of the quest =)
While this might be true in a classic "Card game" sense, when you have virtual cards we can be more flexible. It's clear that the "Deck" portion of the deck is doing one thing. And the "Bonus Cards" are doing something else and not part of the deck object.

You seem unnecessarily hostile about this issue. Encapsulation of the Quest Files is a good thing. It seems your biggest issue is the nomenclature of the extension. The Quest can easily have this meta-data in the same file (so multiple files don't need to be updated for one Quest to be fixed). If they need to be .qst instead of .dck then so be it. Who cares. The tokens weren't existing in the actual deck, they were existing outside of the deck, and only needed to be parsed in a particular situation.

I don't appreciate the way you've been acting on the forums regarding this topic. Not everyone has the same level of experience. This is a group project, and it seems most of your criticism here has not been constructive. Yes, it's annoying to have a broken build. But it happens.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Max mtg » 04 Sep 2011, 16:40

friarsol wrote:
Max mtg wrote:It's strictly forbidden to add tokens into deck, by design of CardPool and by rules of MTG.
However challenges need that cards in play as a significant part of the quest =)
While this might be true in a classic "Card game" sense, when you have virtual cards we can be more flexible. It's clear that the "Deck" portion of the deck is doing one thing. And the "Bonus Cards" are doing something else and not part of the deck object.

You seem unnecessarily hostile about this issue. Encapsulation of the Quest Files is a good thing. It seems your biggest issue is the nomenclature of the extension. The Quest can easily have this meta-data in the same file (so multiple files don't need to be updated for one Quest to be fixed). If they need to be .qst instead of .dck then so be it. Who cares. The tokens weren't existing in the actual deck, they were existing outside of the deck, and only needed to be parsed in a particular situation.

I don't appreciate the way you've been acting on the forums regarding this topic. Not everyone has the same level of experience. This is a group project, and it seems most of your criticism here has not been constructive. Yes, it's annoying to have a broken build. But it happens.
I am hostile to intentional commits of broken code. Doublestrike was well aware that his code would not work and commited it anyway. I don't think it's a good practice to say: "Guys, here's a broken code for you, I know you cannot fix it, but I don't care. I'm going to have some fun in RL, see you tomorrow".
Well, if he was didn't know that or rushed to fix that ASAP, or rolled back the broken revision by himself - I would understand that.

But instead or realizing he has made a mistake he goes even further: starts arguing and insisting that the deck should contain that extra lists of cards [just without understanding that cardpools are not the way to store fictional cards and the changes it would require in gameaction.newgame or maybe the cardprinted class itself]. The way how he added loading for that lists in deckmanager is disgusting (two more copy-pastes of strings regexp parsing in cycle - instead of making a method for all of them), also there was a strange commit from him deleting deck.java and deckmanager.java.
Such changes won't not make an experienced programmer happy, you know.

I admit that my reaction did not encourage doublestrike to keep trying. And it might be a pity if he would not become a developer advancing forge. But with his attitude (being irritated and intentionally commiting a broken revision) I saw no other option.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby friarsol » 04 Sep 2011, 17:18

Max mtg wrote:I am hostile to intentional commits of broken code. Doublestrike was well aware that his code would not work and commited it anyway. I don't think it's a good practice to say: "Guys, here's a broken code for you, I know you cannot fix it, but I don't care. I'm going to have some fun in RL, see you tomorrow".
Well, if he was didn't know that or rushed to fix that ASAP, or rolled back the broken revision by himself - I would understand that.

But instead or realizing he has made a mistake he goes even further: starts arguing and insisting that the deck should contain that extra lists of cards [just without understanding that cardpools are not the way to store fictional cards and the changes it would require in gameaction.newgame or maybe the cardprinted class itself]. The way how he added loading for that lists in deckmanager is disgusting (two more copy-pastes of strings regexp parsing in cycle - instead of making a method for all of them), also there was a strange commit from him deleting deck.java and deckmanager.java.
Such changes won't not make an experienced programmer happy, you know.

I admit that my reaction did not encourage doublestrike to keep trying. And it might be a pity if he would not become a developer advancing forge. But with his attitude (being irritated and intentionally commiting a broken revision) I saw no other option.
And I'm sure his level of frustration wasn't improved by you attacking him over and over again on the forums. In no way am I suggesting that a broken build is something that's desirable, but trashing someone continuously is not an effective way of handling the situation.

Once again, it seems you are arguing semantics here. The deck itself doesn't have anything but the Mainboard and the Sideboard, but Quests do need additional meta-data such as reward, starting Cards/Tokens, so they aren't hardcoded.

I doubt he was "intentionally trying to break the build" as you keep suggesting. He was frustrated that code he spent a fair amount of time on, didn't work as it did the night before. Sure he shouldn't have just committed it in that fashion, but mistakes happen. If you are going to come in here and be hostile to everyone else committing, it's not very fair to the rest of us as a group. I enjoy programming for Forge, and have enjoyed my last year here. I've never seen such outright hostility on the forums as I have in the last three days. One of the great things I like about programming with this group is everyone seems understandable and willing to communicate as adults.

It seems clear to me that Doublestrike did realize he made a mistake, and just didn't have enough experience to get it resolved. That's when he started panicking once you continued to berate him, attempting a quick fix by deleting those aforementioned files.

You know what an experience programmer would do? He would take the time to teach a valuable lesson to an inexperienced programmer. He wouldn't call the code "disgusting." The best way to keep experienced programmers happy is to actually share their knowledge with less experienced programmers, so then they wouldn't make the same mistakes later. Have specific problems in code? Point them out and say "Hey see how you did the same thing three times here? Why not pull that out into a Utility function? Code reuse makes everyone's lives easier."

By instigating the situation you made a poor situation worse, and slowed down how quickly it would have gotten resolved. Please try to by more respectful of the Project and those involved in it.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Jaedayr » 04 Sep 2011, 17:44

I have been developing software and managing software developers for over 25 years. Every developer has their own set of skills, experience, strengths and weaknesses. In a commercial environment there are usually a set of standards and practices that everybody is expected to follow all the time. If you do not want to work within that framework, then you will not be working at all.

Forge is a completely volunteer project. Everybody who is contributing to this project is doing so because they want to, not because they are forced to. All of us bring our own set of skills to this project, some of us have more experience doing things the "right" way than others do. Personally, it is amazing to me that we can produce continually enhanced software and added functionality with a minimum of fuss. Yes, there are times I have been frustrated with commits, seeing things break that were working just a few hours previously. Sometimes I have just had to be patient and wait for the fix, but do you know what? The fix was ALWAYS created and applied in a timely manner. That cannot always be said for a project, even in a commercial environment.

I do not want to get into the specifics of events discussed earlier in this thread. What I do want to do is to encourage everyone involved with this project to step back, take a deep breath, and decide what we can learn from recent events and how that can help us as we move forward. The past cannot be changed, but we all have a responsibility to learn from it.

There are so many good things happening with the code these days. Let's focus on that and move forward together.

Less drama, more FUN! :D
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Max mtg » 04 Sep 2011, 18:43

friarsol wrote:And I'm sure his level of frustration wasn't improved by you attacking him over and over again on the forums. In no way am I suggesting that a broken build is something that's desirable, but trashing someone continuously is not an effective way of handling the situation.

By instigating the situation you made a poor situation worse, and slowed down how quickly it would have gotten resolved. Please try to by more respectful of the Project and those involved in it.
Friarsol, I am friendly to most people here, ok? Each action has its reason, I've already mentioned which were mine. What else do you want here from me?

As for deck, let me commit it without metadata hashmap, just with a few fields hardcoded. If you want more fields, go make another class... maybe then you'll see my point was not just about names or extensions.

I am not anyone's tutor on programming here. Different subjects can be discussed, but when we start to argue about some obvious things, when someone even needs to be convinced to move duplicate code to a single place, then I am no longer tolerant.
I didn't actually come to teach here, but came to add new features to Forge. And so I am doing, and I do care about them and how those features work. Do you mean to say I have no right to be angry when somebody breaks them?


Note, Doublestrike was not about to collaborate. He said "I'll fix some day my things and won't care about yours"
Doublestrike wrote:
Max mtg wrote:Of course, different class is needed. And it should not inherit, but include the deck, and avoid storing metadata in hashtable, since the entries of it have different meaning.
Yep, I don't care what happens, just doing what the voices are telling me. :)

For now, I'll fix the stuff from r10194, and perhaps this input from Max mtg could be a new issue in the bug tracker.
So was I instrigating here?
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby slowe » 04 Sep 2011, 22:29

Max mtg wrote:Friarsol, I am friendly to most people here, ok? Each action has its reason, I've already mentioned which were mine. What else do you want here from me?

[...]

I am not anyone's tutor on programming here. Different subjects can be discussed, but when we start to argue about some obvious things, when someone even needs to be convinced to move duplicate code to a single place, then I am no longer tolerant.
I didn't actually come to teach here, but came to add new features to Forge. And so I am doing, and I do care about them and how those features work. Do you mean to say I have no right to be angry when somebody breaks them?
Max, I don't understand why you're still up in arms about this. While broken builds and such are obviously very frustrating -- and perhaps in a different environment than a volunteer open-source project, would warrant anger -- I think, no, you don't have the right to berate a contributor over poor/uninformed choices. In a development community like Forge's, there are no requirements about level of coding experience (whether generally or in a team setting) so sometimes contributors are going to come from a background without exposure to good coding and development practices. As such, I think you have to be willing to accept that while working on Forge you'll run into novice mistakes from people unfamiliar with revision control, or inefficient and poorly written code, or whatever. The point is, by deciding to work on a project of Forge's volunteer nature, you are going to run into frustrations and setbacks like this, and you can't decide for everyone that it's unacceptable, because you don't control Forge. If you wanted to work on a project with the same aims as Forge but with explicit expectations/requirements of developers, you'd have to start your own project.
I don't want to sound hostile or come across like I'm attacking you; I'm just trying to illustrate that developing Forge comes with baggage because of its history and openness. I appreciate what you're doing for Forge, as I'm sure everyone else does -- improving Forge's stability, maintainability, etc along with its functionality is an important and beneficial undertaking. With that goal in mind, I think you will help keep the project healthy by explaining to less experienced developers mistakes they're making.
You seem to take issue with what you consider basic, "obvious things" in coding practice, and it's understandable that you may not have the patience to hold someone's hand while he/she improves. However, you can't assume that everyone has the experience or knowledge you have. And while you certainly don't have to be anyone's tutor, I think you should at least explain when there are better ways to do things. Then you can point someone towards helpful resources, or let him improve on his own. Just don't get pissed because people don't have the right knowledge.
And hell, everyone makes mistakes.

Anyway, I hope this comes across positive, Max. These are my opinions about Forge's development community, and I hope they're helpful. Thanks for reading through (my pages of) opinions ... wordiness is one of my faults. :roll:
slowe
 
Posts: 127
Joined: 05 Jan 2010, 14:04
Has thanked: 6 times
Been thanked: 10 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Max mtg » 04 Sep 2011, 22:58

slowe wrote:Max, I don't understand why you're still up in arms about this.
It's because more and more people are coming and writing a lot of letters on an unfamiliar language. They tell I was wrong restoring a broken build, they speak about group development, that I should let newbs ruin the concepts of systems I've designed. Moreover, they accuse me of being hostile, I just don't understand it.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Doublestrike » 05 Sep 2011, 06:58

Max mtg, if it helps, I'm sorry I pushed a broken commit. Also, I apologize if I came across as argumentative, I thought we were having a discussion.

Anyway, I just went to update the bug report, and I discovered the description of the bug was as follows:

Quest AI Decks should contain metadata such as Description, Difficulty, and Icon. This way instead of having multiple difficulty files, each .dck file is self contained and can be parsed by the Quest file. This will also allow us to remove lots of hard-coded description data, and fix issues with particular decks, without changing the compiled executable.

(http://cardforge.org/bugz/view.php?id=4)

If you can put yourself in my shoes, I came along, found this bug, and did what it asked. I studied thousands of lines of undocumented code and assembled what I thought was the correct solution requested, and worked on my machine. Then I made the mistake of giving in to frustration and committed broken code (which, by the way, was rolled back, nullifying all of my work - but no worries there, I can move past that). So, I apologize again for the broken commit, and I'll do my absolute best to make sure it doesn't happen again.

Apparently, this is a sensitive issue, which now merits more discussion. I'd still like to do a good job on this bug and put it to bed (finish it). I'll be following the new thread with interest to see what consensus is reached (or not), and I hope we can move on.
Last edited by Doublestrike on 05 Sep 2011, 09:00, edited 1 time in total.
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Doublestrike » 05 Sep 2011, 07:00

BTW, is it best practice to leave this bug "assigned", or what? Development has been suspended.
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Sloth » 05 Sep 2011, 07:10

Doublestrike wrote:BTW, is it best practice to leave this bug "assigned", or what? Development has been suspended.
I started a new topic to discuss the next steps.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Rob Cashwalker » 07 Sep 2011, 04:27

After reading 5 pages of this crap, I have to side with friarsol here.

WE have recently had too many developers with their hands in the same pot. Forge needs to advance slowly, major architectural changes need to be done with care. If something a dev wants to work on depends on the work another dev has begun, then the work needs to wait until the entire change is complete, functional and tested.

If forum topics aren't working, then the issue tracker can be used to assign areas of work to yourself, so others know what not to touch until you resilve your own issue.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Rob Cashwalker » 15 Sep 2011, 02:40

So I'm opening a can of worms here...

After 3 weeks worth of chaos, I finally updated my laptop's copy of Forge, where I'm working on the new gui. I suddenly had a few dozen errors with things like GameTypes and PlayerTypes and no more deck.getMetadata()?!?! I had been making use of a metadata added to deck files that are custom pools, so that they won't show up in the deck editor.

I would have used the DeckType parameter, but since it's linked with GameType, and CustomPool isn't a terribly logical GameType, otherwise I'd just add it in....

SO, if I add an optional boolean property like "isCustomPool" to the Deck and appropriate DeckManager stuff, does anyone (looking in Max's general direction) have a problem with this?
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Max mtg » 15 Sep 2011, 09:28

Yep. deck.getMetadata turned out to be a very attactive place to sqeeze in lots of data unrelated to the deck, like opponent's starting lives - so I removed it to make such mistakes impossible.

Tell me more about custom pools. What kind of deck is that, and is that really a deck, so that you can pick it and start playing against AI?

Recently I have faced custom draft and sealed pools. They are composed of two files - being the first metadata, with data like "NumCommons:5, NumRares:5, PickBoosters:6" and other the pseudo-decks. I suggest such custom limited setups should be stored in a single file, given we add support for that to deckeditor.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Big commit, no dice / SVN hugely broken on r10194

Postby Doublestrike » 15 Sep 2011, 12:49

Max -

Was getting to the end of my work, a second time, trying to encapsulate these opponents in deck files.

Now, the deck layout has changed (again?) and I can't use the layout suggested by friarsol earlier: [quest][metadata][main][sideboard]. The decks are not allowed to load. Is there a quick fix to do this using the DeckManager?

quest18.dck | Open
[quest]
id=18
AILife=30
Repeat=false
Wins=64
Card Reward=5 random rares
Credit Reward=300
HumanExtras=Straw Soldiers|Femeref Archers|Moonglove Extract
AIExtras=Defiant Falcon|Soulcatcher|Storm Crow|Hypnotic Specter
[metadata]
Title=Crows in the Field
Difficulty=hard
Description=Crows are eating the seed planted in the local farm fields. The farmers are scared. Those crows are big, you will need some help.
Icon=Crows in the Field.jpg
Deck Type=constructed
[main]
4 Birds of Paradise
4 Knight of the Reliquary
2 Sejiri Steppe
1 Mox Emerald
4 Tropical Island
2 Elspeth, Knight-Errant
1 Mox Sapphire
2 Plains
2 Island
4 Forest
4 Sovereigns of Lost Alara
3 Jace Beleren
1 Mox Pearl
4 Dauntless Escort
4 Tundra
4 Steppe Lynx
4 Baneslayer Angel
4 Noble Hierarch
4 Savannah
2 Eldrazi Conscription
[sideboard]


Riddler 3.dck | Open
[battle]
Name=Riddler 3
[metadata]
Title=Riddler
Difficulty=hard
Description=WR deck with mass damage spells, Spitemare and Swans of Bryn Argoll
Icon=Riddler.jpg
Deck Type=constructed
[main]
4 Arid Mesa
4 Plateau
4 Windswept Heath
5 Plains
5 Mountain
1 Mox Pearl
1 Mox Ruby
4 Spitemare
4 Swans of Bryn Argoll
3 Deep-Slumber Titan
3 Stuffy Doll
4 Wall of Hope
1 Cinder Giant
1 Subterranean Spirit
2 AEther Flash
1 Caltrops
1 Powerstone Minefield
3 Pyrohemia
4 Pyroclasm
2 Volcanic Fallout
2 Tremor
1 Chain Reaction
[sideboard]
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: Bing [Bot] and 10 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 11 users online :: 1 registered, 0 hidden and 10 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: Bing [Bot] and 10 guests

Login Form