Sunday, May 6, 2012

El Fin

I believe this will be the last post; or mandatory post for the class.

It has been a rough trail, but we endured.

I think our presentation went well, too bad cernent took a bit longer than expected, so Jeff Van Dyke couldn't ask us the "what was the hardest technical thing" question; we would have answered "THE LIST GRID"; and then when he would have asked how we fixed it, they would have said "Jan wrote something like it" and I would have felt super awesome!

Our project has a lot of potential, and Joe is right; with all the interest we've had in it, now we ACTUALLY have to maintain it.

BUT, this doesn't have to be bad... we can finally have BRIAN in the team :D :D :D :D :D, which makes me super happy, since I know the project will go from what it is now, to something super duper fantastic.

That probably means we're going to have to rewrite a whole bunch of stuff, but that is okay; that's part of growing up.

I've never had any piece of code used by more than 50 people (which weren't cs251 students); so I'm excited and nervous to have "real costumers" who will complain when something doesn't work or when something is being buggy. I guess this will make me be more careful when writing code and it will make me check and test my code.

Hopefully it will be for the best.

Wednesday, May 2, 2012

Down Time

I guess this week has been a "catch up on every class" kind of week. Joe and Stephen are preparing for the presentation. I've been designing new interface looks for when we are done presenting, so we can change the way things look without having to redo the user documentation. 

Brady had been working on this super duper cool video of the PTE. 

AND during all this time, we've all done all the other work we've ahd for all the other classes; considering I hadn't done much for any other class but this. 

But now that I think about it, I have no idea what my time has gone into. I can't recall off the top of my head all the things that I've done, but I know I have worked on a bunch of stuff. 

I really think this project has potential, and I want to include more penguins in it (if we can), considering we are making it part of our logo and who we are as a "company". 

I was thinking we should change something about the way the first page you load into looks, with a background of all the penguin icons we have, or something like that. We could also make it a "customizable image", granted that it is each user's workspace, and it is their "STUDIO" so they should be able to arrange things like they like (BUT, that reminds me of how carried away we got with all those penguins and MVC's for every single creation aspect). 

Off the top of my head though, I'd like it if we had 5 Icons

One for the GAME options:
New
Load
Save
Rename
Delete

One for the Rulebook:
(Open / Show RulebookEditor)
(Upload PDF)

One for Exporting to TGC:
EXPORT
Account Info

One for Play Testing
PLAY TEST
SHARE LINK WITH FRIENDS VIA EMAIL
Maybe even a Share link on fb

One for the HELP
Tutorial Videos:
Which would have a central panel which shows the tutorial videos.
Tutorial Documents:
A section of text / images (which we could make maybe) on how to operate each feature.

I was messing around the other day within my "Experiment" package, which is where every cool idea I have, I just mess around with stuff there as to not touch anyone's code; and I figured how we could do the video embedding without having to leave the window (HTML PANE) since it loads html code. So we could just copy the <embedded> part.


Friday, April 27, 2012

PP with SP

What was planned:
Fix the GameBoxModel so it isn't as slow adding and removing components. Now, it adds everything once the save, export, or play test buttons are clicked.
Which makes me wonder, if we should tell the user there are unsaved changes when he tries to load a new game.

What happened:
We did that.
We ALSO finished the ROLL die feature.

A window shows up, which allows the user to input a set of dies, in the fashion

Number of die: 3 Die Sides:6
Number of die: 4 Die Sides: 5
The user can also roll these individually, or roll the whole conjunction of his set together.

(Maybe we could have a checkbox for Roll Selected)... just an option

Problems:
Trying to write average or median I think, in haskell. Taylor Berger was having problems with that, and we tried to help him. Other than that, no problems!

What is next:
To comment stuff.... like cray cray

Thursday, April 26, 2012

PP with Joe

What was planned:
I don't remember, I don't think we planned anything really.

What happened:
We decided to take a look at the GameBoxModel, since adding 99 components to the gamebox would take a while. We found something within the update method, where it just recreates the whole thing, for every component ever added...

We decided to start over again, and not use Observer/Observable. Instead, I'm using a different system so only the definition that gets updated, will be notified instead of the whole thing.

Problems:
Understanding what was going on, and trying to fix it, took a whole out of our time.

What's next:
More stuff to do, and finish the new game box model thing. It seems like there is always more stuff to do.

Tuesday, April 24, 2012

Tuesday PP with Brady

What was planned:
To do some fixes to some stuff
AND to design the roll button

What happened:
we did some fixes to some stuff

What's next:
Finish the roll button, unless brady finished it already.
I was uncertain about how exactly I wanted it to look, or to work.
We settled for a text box which will bring up a list and let you insert the values for each die

Saturday, April 21, 2012

Saturday.... *sigh*

Everything is broken, apparently.

We're going to redesign the play test environment to let you add to a view, without dragging and dropping into it, but simply through a menu.

Maybe, we could do it by just dragging the component onto the Tree thing within the comm.... that wouldn't seem too bad.

However, I don't see any of the menu's we used to have before.
I tried adding a new deck to the game today.... so I could see the actions for the deck, and somehow, it did not work.

*sigh*

Maybe tomorrow when I have refreshed my energy pool, I will be able to focus better and fix stuff. one can only hope.

The pressure is coming onto us, with releasing news about "new features" coming, and what we are working on, to our beta testers; the water is getting pretty up to our necks.

People blogging about table top studio, that's crazy; people talking about it on forums, that is crazy too.

I had never had anyone give feedback and actually "like" any of the programs I had done, granted I'd never release one. I guess that's part of growing up and being a CS person.

I just need to calm down, and fix things, one bug at a time.

Friday, April 20, 2012

PP with SP

What was planned:
To fix the pte

What happened:
we realized things weren't being sanitized (user input)
and we got the drop thing to work, and place in a different view.

Problems:
There are more bugs in the code than in the move "A Bug's life", or even "AntZ".

What's next:
Clean stuff.
Make it less glitchy.
Make windows resizable.
Be able to leave views.
Be able to place components in a view, even when you haven't joined the view.

Thursday, April 19, 2012

Thursday Night / PP with Joe

What happened:
Joe left to be a wazy butt

What happened after that:
I did some deck stuff so it indicates what you're currently editing

After that, CJ and I took a nap.

And did more stuff.

What's next:
to finish more stuff.

Wednesday

I was gonna do my psyche thing, and then joe wanted me to do some stuff; so clearly, i did some stuff.


I had to fix some layouts, that was trivial. And then I worked on the deck part, making it so that you can edit a pre existing card. Things are going pretty well on that term, I added a visual aid for what is selected. I'm gonna add a label that indicates what you're currently working on, and everytime you add a card, it will give you a new untitled card instead, and have some fields where you can select which CustomImageWizards to preserve or not, by using check boxes. It makes no sense to clear things, when you're making a deck if you want to keep the back all the same. 


However... there might be problems if you want to replace your back image on a created deck already... hmmmmmmmm; i shall investigate this while cj and I nap....


but basically, that's what I did lastnight.

Tuesday, April 17, 2012

Tuesday Night / Pair Programming with Brady

What happened:


Stephen Patel, who is super duper duper duper duper awesome, fixed the Game Box Model. (+5 raccoon hugs for him)

Brady, abandoned me to hang out with some girl, most likely, so no raccoon hugs for him.

What was planned:
To clean up the hackyness of the Grid we're using now.

Cleaned it, and improved it.

People can now select which items to view and which items to hide.
People can sort (a through z) also.

I'm gonna make it so people can sort by PRICE and also by Quantity.

What's next....
sleep
and to finish these sort and show features.
THEN, on to... redesigning the play test environment


Confession:
I kinda like writing guis now.... I know... gross.

Monday Aftermath

After the somewhat disappointing occurrences of Sunday and being too tired to think of how to fix the grid issue at 2 am, I've done some things that helped us get back on track and make things look not so scary.


After getting sleep, I skipped class on monday after getting lunch to try to fix the stupid grid which is stupid and didn't let us debug in development mode.


I made something that looked almost the same, it has an image field, a name label, and some quantity stuff.


That took me like 10 minutes to do so... which makes me think that if I had been less tired, we could have fixed the grid in like 30 minutes. BUT that is in the past.


The new hacky grid (which shall be renamed later) works great and allowed joe to do whatever he needed to do so he could debug the image's not flattening. 




It seems like we have progress! YAY.


HOWEVER: there are still some problems with the game model. One that I'm trying to figure out, but haven't yet, is why I can load a game's components, but then when I try to add another component that was already in the game (to increase the count) things blow up and it says that the model never had that definition in it! :( :(


Sooooooooo that will be done and debugged today, hopefully.
and maybe I will have nap time with CJ (the raccoon)... that would be nice.

Monday, April 16, 2012

Sunday / Monday

Well, we're still here and it's almost 3 am....

we're probably going to sleep here. Mhmmmmmm.
AAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHH.

Sunday, April 15, 2012

Sat of Doom

Joe Brady SP and I got together in CEC lab so we could work on this thing.


I kept on working on the deck wizards, and we decided that we wanted a simpler scrollable wizard (from left to right) and a more intricate wizard, to be available when you clicked a button. 


Then, I had to clean my hackyness and make them both be part of a thing called DeckEditors master, which changes the deckDefinition; 


And for some reason, my posts from wednesday, thursday and friday didn't post.


Sad Sad Sad raccoon

Thursday, April 12, 2012

Da Deck

After the amazing news we heard from Joe today, we all entered in a "shit's got to get done mode".

I Worked some more on the custom part of the deck. I'm making things clean.

I will use a different window for the "edit elements" option, which will promp up the deck window. It allows for deleting components, and rearranging them based on individivual location or by row (group of components).

I will work on Dragging an element from the component selector into the deck.
This will be slightly tricky, since I use special objects called ReorderableComponets, which take a GameComponent.

However, I was researching how we were doing this in the creator, and I'm going to allow a user to drag a "GameComponentCanvasDefinition", then call the controller, requesting it add a GameComponent there.

Then the canvas will call a special method, which will take that GameComponentCanvas, and extract the GC from it, and reorganize everything.


In the future:
Joe suggested we give the user the option to undo something, like what if they, messed up by accident and want to undo the last action.

For now, I think the easy way is to store 2 lists, one with the previous contents of an action.

He suggested I make special DeckReorganizeActions, which know how to undo themselves.... this might be complicated, since I have no idea what gets called when a component gets dragged within the same HStack...
AND no one knows :(

PP with Mo Joe Joe Joe

What was planned:
To work on getting the key listeners for the deck

What happened:
I did this during 481, so we worked on what each of us had to do.

Problems:
Procrastinating 251 students who stole joe away from me and needed help.

What's next:
Get er done.

Wednesday

Worked on more deck stuff.
Got the deck to delete stuff by double clicking,
however pressing delete after selecting it would be Amazing.

Will do this next!

Tuesday, April 10, 2012

PP with brady my love

What our goal was: We set out to finish the creation of a new Game Area View.

What was done: This pretty much consisted of adding the correct handlers to the buttons on the CommView, and then debugging an error with the GameSessionModel as its observable was not being set correctly. This was because the BasicObservable() needed to be created on the constructor of a GameSessionModelImpl(). Once that was fixed, we were able to register the CommView as an observer of the GameSessionModel in addition to the CommModel. Now, when a new view is created and the observers are notified, the CommView gets the notification. 

What needs to be done: Display the created views in the Communicator of the PTE. All join of a view, removal of a view and show/hide rulebook

Saturday, April 7, 2012

Deck Customizer Wizard

Today, I spent most of my day working on something cool that I would like for the deck wizard.

I first started by making a standard 52 card deck, Ace through King, for each suit, and loading that up in the PreMadeComponents class. That was trivial, and super easy.

The next thing I wanted, was something like in the designer. I wanted a tool that allowed users to move cards around freely, to the top, middle, or bottom of the deck and that would reorder the deck for them that way.

This was a little bit more tricky than I thought.

I started with a flow layout, which did the reordering for me! That was great... except it couldn't grab multiple elements. In addition, if I tried getting the members of the flowlayout, they would print out out of order... which seemed like a drag.

I researched around SmartGWT showcase, and saw these two cool things, HStack and VStack. They had a drop option that would automagically reorder things! So, I thought... what If I just use these?

Well, the tricky thing is, I wanted every row to only have 5 elements, and HStack doesn't have a setMaxMemberSize() method. So I had to do some tricky stuff within the drop handler to avoid adding a 6th element once there were already 5.

Then, I thought, well what If I have more than 5?

So I made a VStack with a bunch of HStacks. This worked great, except that I couldn't REALLY grab more than one. So I made the HStacks dropable too!
BUt, I had to make sure not to drop an hstack within an hstack, or else things die.

I also made it so that when you drop an HStack within a VStack, that is a valid drop, but a component between two Hstacks, is wrong. I might change this so that it gets wrapped in a new Hstack row.


Everything seemed cool, except, what about the cool thing the flow layout does, where it automagically reorders everythign?


This was the tricky part, I spent a while trying to find the index of each member, just to find out that they aren't stored. I tried using a map, but that also wasn't working.


I resorted to having an "autofix" option, that fires after every move which would require a fix (something not within an hstack that isn't full). A reorder within a row that has 5 elements, wouldn't trigger it. 


The autofix, attempts to move everything upward and to the left. It just fills in every "hstack" with the 5 most recent elements. 


It is pretty hacky, but it works.


It also users a timer, with 375 ms delay, to do so. If It is anything faster, it will do some weird stuff or never get triggered properly. 

Thursday, April 5, 2012

PP with JC

What was planned:
Refactoring


What happened:
Cool stuff. 


We refactored some of the DeckActions so that they automagically change their state when they are either empty or get something added. The deck will now have only 1 state (the empty state) and everything else will be the top most element shown. 


Problems:

¯\_(ツ)_/¯ 




What's next:


More refactoring. There's tons of copy code that I should change, just like the super class (DeckAction) and it should have. 





Tuesday, April 3, 2012

PP with BK

We refactored some code and made some changes to the PTE..

Basically, we first made it so that the shift + enter combination enters a new line.
We did this buy just calling setContents(getContents()). WIthin the update, we use a replace all for "\n" and change it to the html line "<br>".

The second thing was trickier. We made it so that the scrollbar doesn't auto scroll to the bottom, unless it is all the way at the bottom. That way, users can read previous messages without being interrupted by the new incoming messages.

Monday, April 2, 2012

Refactoring Monday

We're in Refactoring / Code Clean up week.


I admit, we all have nasty code here and there... I have some comments in my files that say "//XXX hacky as f... clean". and others in spanish.


Today, I worked on refactoring the PTE part that controlled the Deck actions, focusing on the ones that should be available after a component gets dropped onto them.


The way I was doing it,was hacking a dropHandler to show a menu, with some menu items.
They would call a special PutOnTop or PutOnBottom action.


I abstracted all this. I made an interface called TriggerHandler, which basically is a way to communicate with a DeckDropMenu (which is what ultimately calls a doAction). The TriggerHandler is used to set the Trigger... that means which component caused the drop event to occur. Then, we can call the perform actions using the old version of a PutonTop and PutOnBottom actions. 


I was basically modelling of of the components automagically built context menu, by making this a custom thing just for decks. 


Today, I also added the Shuffle Action. The shuffle action should be brought up after you double click on the deck. 


What I have left to do:


Merge decks (this should be a DROP action)... this will be tricky.
Got this done today!!!!


Update the Display when a deck is empty, so it calls next state. (Will have to research on how to do this). 


Have a "Count: #" which displays the number of elements in a deck... basically, I think I'll have to call a "CountAction" everytime someone double clicks on a deck...
the CountAction will set a MenuItem count title to be the size of the deck.

Doom Weekend

I guess, I was just too busy this weekend with coding that I forgot to update whoever reads this.

So.. hello fellow raccoon lovers!

It has been a crazy weekend. We managed to get the decks into the PTE!

It required Joe and I to rewrite a whole bunch of the server... I kept a daily work log, so the details of it are command+c command+V'd here:



Friday/Saturday
Worked with stephen patel to try to get the deck into the PTE. We tried making it a game component, but realized we had to change some variables in game and gamecomponent (a boolean in display) for example, and we’d have to create different game actions as well as update the PTE to display a context menu based on the game actions each specific component had.
The good thing is, joe created some randomizer class, and explained the process of how to get a component that requries serverside data keeping . Hopefully, I can view it after I upload all the 251 test scores and understand it and start on it before our meeting.

Saturday/Sunday
Spent a bunch of time with jo from like 9pm to like 2 am, working on getting all the back end working to build the TakeTop action for a deck. The new framework seemed simple, except that we had to add a bunch of stuff for the server so it maintained a list of the decks, and it knew what deck to refer to. We used a SeverGameService interface which lets you get a deck based on a StringID for the deck.

Sunday, I worked on figuring out which listener to use for drop, within the PTE, for the deck component (embedded in a game component canvas). After playing around with dropOver, drop, and a combination of these, attached to different things, in order to determine the “source’ and “destination”. I remembered that the source was always fixed... for each different deck. So I could just use a drop for the “source” and pass in the destination as the constructor argument for a special type of Drop Handler. I think it was the not-sleeping properly and being sick, which took me so long to figure out.

Finally, I was able to do some magic, to get PutOnTop and PutOnBottom on, changing a bit of the code for both the server side and client parts. But it wasn’t too hard once I got joe’s expertise again, and a 2nd pair of eyes.

Thursday, March 29, 2012

PP with JC


What was planned: 
To get the deck and piles into the PTE. 
What happened: 
*(**/**°**□**°**)/︵┻**━**┻* 
*
* 
*Problems:* 
*We need to be able to use Game Actions to communicate to all the clients
what a user attempted to do. This requires that a game contain a Deck. We
ran into many problems involving how we must store a deck inside the game
without it being a game component.* 
*
* 
*Future work:* 
*We decided it would be best to create utility classes for organizing
components as a deck rather than actually having decks. This means we must
have a nice way to select multiple components on the screen and treat them
as a deck. This means, we will probably want to write some kind of drag /
drop bounding box to select multiple components at the same time and treat
them similar to the way Jan has been doing the piles. We started work on
this but ran into a bunch of problems... we must investigate how to do this
efficiently.* 
*
* 
*FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF....* 
*
* 
*Joe and Jan* 

Tuesday, March 27, 2012

The Deck

I finished working on the deck today, however I only consider it to be an alpha version of how things should work.

You can drop stuff into it, and a menu pops up asking you to input wether to place at top, bottom, or at a specified index (a window shows up and is modal).

You can double click to get the options for the deck (peek/take/shuffle) and a "restore" function, which for now just sets the display to PeekTop (or a blank square) if the deck is empty.

I still have to revise the code and make it cleaner, and figure out why DeckCanvas implements Deck<GameComponent> and use that, instead of calling basicDeck.METHOD.

Also, I had a vision in the shower today to make the Peek options bring up a new window, which will get rid of the "restore" option. However, this would require that I create a new canvas with the same game component, since GWT doesn't like having 2 canvases with the same child :(

But I'll work on that tonight and mess around with it for a bit, and see if that's how I like it.

I also want to abstract a bunch of stuff within DeckCanvas so the file isn't 500 lines long...

SO I gotta refactor(refactor(refactor(code)));

PP with BK

What was planned:
To get the "logout" functionality when a user closes the browser or the tab

What happened:
We created a CriticalCloseHook, which is to be added to the hooks that will be run when a user hits the X button in the Comm window. However, we forgot that we were sending stuff through the network, (and we're not allowed to send a hook like that) so everything DIED :( and complained.

We have the basic backend of what should happen when a user logs out, and the code to send a message to the room so that users get notified a user has left.

Problems:
Besides everything dying because we put it in the wrong place? Nothing else.

What's next:
Put it in the right place, so that it doesn't cause everything to die and test it!

Friday, March 23, 2012

PP & SP

What was planned:

To get the Identifiable interface integrated into ClientData

What happened:
We got it to work. And we had to change a bunch of tests which relied on
getting the ID before a ClientData service was created, which was a major pain in the ass, but it works now.

We also started working on deck canvas aswell, which hasn't been finished.

Problems:
having to fix EVERY class that used ID, which was a hazzle. but none besides that.
We also used the @BeforeClass tag, which Stephen had never seen.

What's next:
Finish deck canvas!

Thursday, March 22, 2012

PP With JC

What was planned:
Working on the Deck / Piles

What Happened:
We got rid of the Pile interface and implementation, since we figured a pile was just a deck that didn't care about the ordered part. We implemented the deck interface, which has a bunch of the List<T> methods. It also has a shuffle.

Problems:
None

Next:
To make it into a component, or component definition. We're going to use a BasicDeckComponent which will have an underlying BasicDeck and who's Actions will return another Component

Working on Designers / Wizards

During our meeting on wednesday, I agreed that I would design some
easy wizards for creating components.

I got carried away when I was first designing the Deck Wizard,

I kept on asking myself
"Wouldn't it be cool if I could just drag the cards here instead of clicking a button"

"wouldn't it be cool if I could drag the cards and move em around"

And what came out of that was a really cool Deck/Pile designer. With some areas that are customizable (where you place them).

Since I had gone down that path, I made more "wizards" like that.

So far, I've done Deck/Pile. Board, Card.

Given that I'm already in that spirit, I will do the remaining wizards, with Figures, Tokens, Randomized and the Miscellaneous ones.

They will become designers however.

I shall revamp my wizards to be more like eclipses, where you have fields
and you browse stuff. It'll be kind of like the NewClass wizard, where you can add interfaces and look at those.

Thursday, March 15, 2012

RB Controller / Model

Yesterday and Today I worked on finishing the RecycleBin controller and model,
as well as the Recyclable interface.

I tested them and they work!

I also worked on RecycleBinService (for our LocalService pattern) and tested it, and it works functionally too..

Today, I tried making TTSGrid auto-update, I'm gonna use observer and observable,
but there's something missing so I'll ask Joe about it tonight, so I can connect them once and for all.

In addition, I'll be working on the RecycleBin window, and allowing it to display in 2 forms.

I will probably have to modify the RecyclableInterface to include the Type of object that the Recyclable is, so I can cast it and extract information from it...

Should have thought of that earlier.

Tuesday, March 13, 2012

Finalizing TTSGrid

I finally finished TTSGrid

I went with my gut, and made the expandable detail field be an easy method.

I was having a bunch of struggle trying to get the detailField to draw,
and was trying to do something ugly like casting, which is what I ended doing :(

There are two
getAsExpandableListGridDetailField methods,
one sets the detailField as Text
and the other as a Canvas.

The canvas one does Casting to a canvas,
and the magic under the hood is

Canvas c = (Canvas) record.getAttributeAsObject("detailField");


So, "detailField" is a reserved special Attribute, that should only be used as
the key for D getDescription.

It was a hard battle, and it's got ugly scars,
but it draws an image automagically. For that matter, it would draw anything
that you store in a canvas.


I'm also still trying to design the Recycle bin

and I'm trying to make it work as perfectly and intuitive as possible.

But for now, I have a Recyclable interface, which is the type of object that
will live in the model in a set. I was also thinking, that to unrecycle things,
I need to know wether they are CompositeImageDefinitions or GameComponentDefinitions or game components... which means there will have to be some sort of map that knows where the objects came from... I'll have to discuss this with the crew.

Sunday, March 11, 2012

TTSGrid

Today, I worked on the TTSGrid.

They are generalized ListGrid, smart-gwt. This class is used to make building a grid easier and less nasty than having to implement all different kinds of ListGridField and ListGridRecord.

They take a TTSRecord<D>.
Param <D> is any object, so we can display an image or text,
when the grid has been made to expand as a drop down.

These TTSRecords have a map of Attributes to Values.

Attributes is a special class, with 2 strings.

the first string, is a special NO-WHITESPACE key needed for the ListGridRecord's
own internal workings. The second, is the "column name" for that Key.

TTSRecords add Attributes and map them to a value.

When it comes time to displaying the info, the underlying ListGridRecord()
is populated by

setAttribute(attributeName, TTSRecord.getAttributeValue(attributeName)).


TTSGrid has a getAsListRecord(), method
which returns a
ListGrid
with the fields and records already set.

For now, they are only expandable if we do some outside magic (requires making a new ListGrid and overriding stuff).

I might make a default getAsExpandableListRecord(),
which sets the detailField upon expansion to be the param D.

It seems only reasonable to have this feature...


Thursday, March 8, 2012

Pair Programming with Joe

What we planned:
To generalize the views, so they could be displayed in different ways.

What happened:
We played around with ListGrid for about 45 minutes. Joe had never played with them, so we took the time to make a pseudo spike and get familiarized with them. About 45 minutes in, we decided to make a set of interfaces so that people can make their own listgrid with their own desired Attributes.

Problems:
None, except that ListGrid requires a bunch of classes, like GridRecord and it is a mess, but besides that, nothing else.

What's next:
Finish the interfaces and implementations of them.


Also, Joe mentioned that neither him nor I correctly use the shift key. So now I'm all self-conscious when I try to capitalize to use the correct shift key, for the opposite side of the hand i'm going to type with. It's quite hard.

Pair Programming With BKEY

What was planned:
Resting

What happened:

We were still on rest mode, but we wanted to start on the chat. We started by looking at how the PTE worked and designed our system to also have an MVC of it's own.

Problems:

Getting the view to look the way we liked it, it was pretty hard and I guess brady still has trouble getting it to look just how we imagined it.

What's next:

Finish teh viez0rs zo it lookcs kul.


Sunday, March 4, 2012

‎(/°□°)/︵ (,,)>

<('') ︵/ (°□°/)


Flipping Penguins!


Yesterday, Brady and I worked on the PTE for a little bit. We tried abstracting it so the MVC would work correctly. Sadly, he had to leave early so I kept on working on it, because, we all know, programming is addictive. 


At the end of the night, about 1 AM, I finally got penguins to perform their action. For now, all they do is FLIP!


But, I was so happy I had to make emoticons to express my penguin flipping abilities :
‎(/°□°)/︵ (,,)>
<('') ︵/ (°□°/)


I had to write my own FlipperAction, in order to make them infinitely flip. The other FLIP action only works once,
which makes me think we're going to have to make a special StateSwitcherCircular action or something, to allow an object to go
from one state, to another, in an ordered list. Wouldn't be too hard.


What's in store for today:


Fixing all the //XXX Hacky as F parts that I placed yesterday in ordrer to 
get things working. 
Fixing the MVC structure. 
Hooking it up to the network. 
Loading a new game and having everything update correctly.




My first step is going to be adding a "Board" object to the already world renowned Penguin Flipper's game. The board shouldn't be Moveable. Which means I might have to change some code around, but that's okay, it won't be too much.


Afterwards, I'm going to make another TestGame, and test that the setGame(Game ) actually clears the canvas, or makes a  new one with the appropriate components. 


Afterwords, I'll fix the MVC structure... and Hook it up to the network. 





Saturday, March 3, 2012

Programming Alone Fri/Saturday

On the GETERDONE spirit, I decided to work a little bit on the PlayTestEnvironment. Lasnight, I wasn't sure what Brady was touching or not, so I decided to not mess too much with it.

My main focus, was to get SOMETHING showing up within the window.

I had to create a MockGame with some MockGameComponents, which all had MockCID,
which are mock composite image definitions.

It was kinda late, so I stopped at about 11 pm cuz I couldn't think and I was getting a bunch of null pointer exceptions.

This morning, I finally got it to draw the 2 penguins and to make them move! Which was a huge success.

I was unsure of how Brady was working with the controller and model, so in the spirit to not ruin that, just in case he was touching them, I decided to make the play test environment cooler.

I added an AboutDeveloper button, basically, you click it and it will pop up a new window which tells you some info about the developer. It shows what they wrote about themselves in the description.

I saw this cool withdrawable item thing within a Grid list. So, I decided to make one. Basically, all you see is the name field for each of the developer's game, and you can hit an arrow to expand and see that particular game's description. I also left it open ended, so you can later rate it based on PowerPenguins (highest 5, lowest 0. but for now, the rating for each game isn't stored anywhere.

IT took me a while to do that however, making the form was pretty different. You basically have to create something extending ListGridRecord, so you can add it to ListGrid. These records have special methods, which work in the form of associating a particular string, to that string's data. So, "name" would be associated with "Checker Penguin" for an instance in the record, yet "name" is also associated with "Risk" in another record instance. I pictured it in my mind, as a sort of mapping of sorts.

In addition, the Record requires a method getFieldAsValue(String field). Which, given "name" will return that particular record's real game.

In retrospect, GWT examples are COOl, but they are poorly commented as to how things work within each other... which would be appreciated; but based on the code, I was able to figure out how to make it work.

All in all, this guy looks pretty cool, IMO.

I also worked on a PenguinIcon for the RuleBook.

Thursday, March 1, 2012

Pair Programming With Joe!

Our goal:

To finish the CompositeImageSelector within the Designer.

What happened:
Joe had worked on most of it, I just did a small portion to make it all look nice and have a tool tip and display the information. I also offered some cool ideas, like the image knowing it's default size upon uploading, and then the resizing within the upload process to take effect as the user is selecting the dimensions of the image.

In addition, we went ahead with the Desktop looking idea, and Joe and I worked on making some new penguin icons. We made it so that now you have to double click on a penguin to launch an application.

We also made the penguins' color fade out, when the particular application is open, and go back to normal when it is closed. The penguins are also movable (like in a desktop) and can be placed anywhere.

Problems:
THE FREAKING CLOSE FUNCTION TOOK US LIKE AN HOUR TO FIGURE OUT!

(/°□°)/︵ ┻━┻
(/°□°)/︵ ┻━┻
(/°□°)/︵ ┻━┻

That's enough to describe how frustrating that was. We tried so many things, we ended up implementing ObservableWindow and overriding the hide method and show methods.





What comes next:
To make a cool dock where you can dock the penguins to any of the 4 sides (which would be way cool).


Wednesday, February 29, 2012

On My Own Programming Today

Following the intense spirit of "GETERDONE", I decided to take some initiative and start to implement some interfaces on my own, rather than wait for my pair programming sessions to occur.

So far, I've implemented two things:

BasicTemplateableString(implements TemplateableString)
I felt like this interface was lacking some setters, so I decided to add those
since it made sense to me to be able to reset a component's default string,
even after creation.

I tested for basic functionality, and that when something was null that null pointer exceptions were being thrown.

I also tested the behavior correctness when the "hasReplacement" boolean was set to false.


BasicGameSession (implements GameSession)
This class proved trickier than I thought.

For starters, the test for this class is only one test (which makes me kind of nervous). All it does it test that when the addAction(GameAction ga) method receives a null value, a NPE will be thrown.

I had no idea how to test for correct behavior, since there are no getters and setters to see what the undo and redo stack for a game session will be.

When I first looked at the interface, all it had was getGame() and getGameActions(), which returned a list.

I felt like the GameSession should handle undoing and redoing actions on it's own, rather than leaving that to some other component.

And now that I'm writing about it, I Feel like game action should have way of storing all the actions ever performed, in order to be able to retrieve them easily for the ActionEvent log which will be returned to the Designer. But anywho....

I changed the GameSession interface to have a undoAction, redoAction and addAction(GameAction) methods.

I had never done a undo/redo stack, and since I had no way of testing it, I made a scratch file in another package, in which I had an undo stack, redo stack, and add method. These took strings, and they would print after every step. Below, I'll attempt to explain how things came to be.

Initialized to empty

[U]: THE UNDOABLE STACK
[R]: THE REDOABLE STACK


Added strings (one,two,three)
[U]: one 
[R]:
[U]: one two 
[R]:
[U]: one two three 
[R]:


Undid 2 actions.
[U]: one two 
[R]:three 
[U]: one 
[R]:three two 

Redid 3 actions, the third one did not have any effect
[U]: one two 
[R]:three 
[U]: one two three 
[R]:

Undid another action
[U]: one two 
[R]:three 

ADDED AN ACTION (four) which, in my mind, should reset the redo queue
[U]: one two four 
[R]:

Undid 3 actions
[U]: one two 
[R]:four 
[U]: one 
[R]:four two 
[U]: 
[R]:four two one 

Since the correct behavior of undo/redo stacks wasn't clear to me, I played around in eclipse by typing, then undoing the typing of 3 lines, and redoing them 3 times (then I noticed the 4th call wouldn't let me redo anything). Then I undid 2 of them, and typed a new line. I noticed the REDO option wouldn't do anything after I added a new thing, which coincides with how my scratch program worked.


Pair Programming Sesh #8


GOAL:
To implement the Game interface and write tests

What Happened:
We were able to create a BasicGame. We also changed a little bit of the interface,
since we felt that Game had to also be able to set some stuff, which wasn't previously defined.

Problems
No problems at all.

What's next?
To reach our goal of having something cool to show off for monday! and not die in the process!

Thursday, February 23, 2012

Pear Brogramming Sesh SEIS

Planned:


Joe and I had planned to work on the Multiple Views / Join multiple views Spike.

Happened:



After looking at the previous spike, we decided that spike already did what we wanted. We felt like, for play testing, you could be able to look at both Public and Private views. You could select which private views you would want to look at, by just going through the tab and selecting which views to look at (just like in the old spike). We felt like the play test environment had to be an "honesty" kind of thing, so the Designer could check that the cards were being placed in public/private correctly (by looking at all the private views). So, after considering this, we decided that spike was done. 

We proceeded to work on the Ordered Decks / Searchable decks. We changed part of the RandomDeckSpike so that it allows us to do more things. We added a takeTop button, takeBottom button, take ALL (which is how we envisioned searching through the deck). We made it so that clicking on a penguin, after taking it from the deck (when taken out, it is placed outside the deck panel), will replace it in the deck, in that order. 



We also made a bunch of superhero versions of our penguins, so now the PenguinFactory will return a different version of penguin, when called to build a penguin.


Problems:


None really, we even made a cool thing that lets you see how things are getting placed and taken out. Slightly animated.


ptr.next


Nothing on the horizon. Maybe I'll have a better version of the views spike, where you can select from the list of all views, and check the ones you'd like to see on the root panel (or an individual player panel). In addition, rightclick option so that you can make the penguin move to the desired private view.

We might make the new PenguinFactory be able to deliver penguins of a single style or not.

Wednesday, February 22, 2012

Pear Brogramming sesh #5


Our Goal: To get a working copy of a chat client that users would be able to use when they are on one of the webpages. The chat client would need to allow one user to enter a string in their text box, press enter, and then show up in a common "chat box" that would hold the entire conversation. 

What Happened: We were about to start running the complete wrong way before we got a hold of Joe and he was able to show us the correct way to do this using GWT. Since Joe had worked previously on a spike that allowed multiple users a connection to the same penguin on a webpage, he knew how to correctly communicate with a created servlet and what "black magic" was needed to achieve this. Originally, we thought that we would be able to use some sort of socket solution to achieve this communication between the client and the server; however, even though this was the only way we had done it in the past, we were looking at hitting a dead end when trying to do this while working with GWT.

Here's what we learned with Joe on how the client must talk to the server and vice-versa:

According to Brady "
First, we must realize that every type of communication with the server as the client must be done through a service interface. Since we were working on a chat spike, we needed to create an interface called a ChatService, which extends a RemoteService (the built in service interface that GWT provides), that would have the method stubs in which we needed to have the client and server talk. In this case, these methods included a sendMessage(String) and a getUpdates(). The sendMessage() would be called when a string needed to be sent by the client to the server, and the getUpdates() method would be called when the client would ask the server if it has a response to send back to the client. Now, here's where the magic comes in - in order to make the client asynchronous and not stall when waiting for a response from the server, we need to create another interface with the same name as the ChatService except it must have Async appended to it. This ChatServiceAsync interface would also contain the method stubs but would take a new parameter for each - an AsyncCallback<oforiginalreturntype> callback. This AsyncCallback is the interface that must be implemented to receive a response from the remote procedure call (RPC). The AsyncCallback essentially gives the server a means to contact the client that contact itself, a response. I will talk a bit more about the implemented methods in just a bit.

There is one last class we must create for all of this to work and that's the implementation of the ChatService interface, which we call ChatServiceImpl. This class implements ChatService and extends RemotServiceServlet and is the actual server that the client communicates with. Both sendMessage(String) and getUpdates() would be implemented here. Their bodies would just contain what we wanted the server to do when each method is called. For example, the sendMessage(String) could take the passed in String and place it in a queue of some sort. Then, when the getUpdates() method is called, it could return whatever is waiting in the queue. The main thing to notice here is the ChatServiceImpl is the server side; the method's would do what the server should do when the client calls each method.

Now, after all this is setup we have to learn how to use it all correctly. Joe also made this very clear and explained it wonderfully. In our entry point, we need to make 3 objects: 
  1. A ChatServiceAsync chatService - this would be the service that the client would call when we want to send something to the server. The magic is when the chatService = GWT.create(ChatService.class); This declaration links up all of the setup we did and allows the asynchronous service to connect the client to the server. Quite awesome
  2. An AsyncCallback<returntypeoforiginalmethod> sendMessageCallback - this is just a callback object that is an instance of a private class GetMessageCallback which implements AsyncCallback. The point of this is to override the two methods that an AsyncCallback object must implement: onFailure() and onSuccess(). These methods are what is called when an asynchronous call fails to complete or completes successfully, respectively. In other words, they receive what the server sends back to the client.
  3. An  AsyncCallback<returntypeoforiginalmethod> getUpdatesCallback - same as #2, but for the other method in the ChatService interface.
We now have the ability to send a message from the client to a server using a ChatServiceAsync, have the server decide what to do with the message in the ChatServiceImpl methods, and receive the the response of the server through the AsyncCallback onFailure() and onSuccess() methods.

WOW! Pretty dang cool if you ask me."

Problems: No problems so far, considering we haven't dealt with actually getting text to and from. We are also going to want a list of all the updates, and we have to keep track of the current version of the chat for each user, and then forward the strings that user is missing. 

What Still Needs To Be Done: Have the chat client actually do something useful! Since all of the time programming today was learning how the client connects to a server, we didn't get a chance to actually implement some sort of "chat" window that would allow two users to talk on a webpage. However, this should be trivial because it's basic GWT panel work.

All in all, We learned a whole bunch today. 

PS: +5 Raccoon Hugs for MoJoeJoeJoeJoe
PSS: You can change the font size Brady.

Sunday, February 19, 2012

Pear Brogramming Sesh 4

I did some pair brogramming with Stephen L

Here's what happened:


Our Goals:
Were to create something that could show the different views of each player.

What Happened:
We were able to create something which reflected the different views, it is located at

Basically, you can click the penguins (left or right click) and they will go to different views!

We settled for a system in which the user can see the public view and private view, the public view is on top, and the private view is on the bottom. It's the only way we could figure out how to display both things, without duplicating penguins. 

Problems:
The hardest part was doing what we wanted. We had to compromise, since we found out that you can only have 1 instance of a widget on a panel, if we wanted to have copies, we would have had to copy stuff over, and that gets pretty messy.

We also got stuck using SimplePanel, I changed everything to a FlowPanel, which lets you stack things onto each other in a nice way!

Future Work:
More spikes.

Improvement on views. Hopefully I'll figure out a way to have player unique views, without having to do the trick we did where we display both public view and private view, under a tab for each user. 

In retrospect though, that doesn't seem that bad.


PS: I guess in regard to the designer



ã…œ━ã…œ︵/ (°□°/)

I'm all chill now.

GWT Designer

Is Stupid so far.

It's hard to use, and it won't show up on the browser page...

In short:


(/°□°)/︵ ┻━┻

Yup. 

Thursday, February 16, 2012

Peer Brogramming Sesh 2



Our Goals:
Our first goal was to get the presentation stuff sorted out, we did some practice runs through our presentation as well, and we'll be ready to talk about stuff tomorrow

Joe had a bunch of experience with GWT, I did not. We decided to work on a simple aspect of the designer, which was to be able to click on a component and be able to get some info shown about that component on one of the sides. This is our spke!

What Happened:
We changed a few things about the original presentation, and changed our name... SURPRISE. 

It came out really good actually! We hard coded it so we could only change between two components, but I guess that's the point of hard coding stuff. 

Problems:
The hardest part was figuring out how to make a new entry point again, there's like 8 things that all have to be changed which require the new class name... and we forgot to change the classname/classname.cache.nsense or something like that, which didn't allow us to launch the thing for a little bit. Another problem we encountered, was that the workspace panel was being jealous and pushing the info panel below it, so we had to change the way those aligned. 

Future Work:
Make more spikes and get all of us familiarized with GWT and how stuff is done through it. 


Overall, great evening!

Wednesday, February 15, 2012

Pair Brogramming Session 1

I did some pair programming alongside my valentine, Brady Key. 


We messed around with Jigloo, in order to figure out how it works and what we could do with it.


We discovered that creating GUIS with it is very simple and easy, however the code for the gui gets long pretty quick and is uncommented. Therefore, when we're using this in a real thing, instead of a spike, we're going to have to comment a bunch of what we did. 


We worked on making a Jframe have a menu bar, and have an icon button on one half of the screen, while containing a jpanel with 2 anchored buttons on the other. After that, we worked on adding a mouse listener and a key listener to the whole thing. 


We discovered that Jigloo adds AbstractAction to components, and declares them anonymously. 


Today, we did a bunch of proof of concepts and feel more comfortable with how jigloo works. We talked a bit about how we would like the designer to look, but we didn't come to a consensus. 

Tuesday, February 14, 2012

Post Doom Day

After spending tons of time hugging and talking to my raccoon (CJ in the picture), and letting the shock of what happened yesterday settle in, I feel like I can talk about it here. 


For the first part, it sucked. My friend Brian is not in our team, which we were all so eager and yearning to have. However, it's a part of living, and like an old ex-gf, the best thing to do is to have a week full of liquor and bar-strange and just move on. We don't even have a week, we have 2 days. Since we must start strong and heavy, and holding a grudge against some member in our team isn't professional nor will it help us accomplish anything. I guess this is my outlet. 


I know Brian is a great addition to the other team, so in part, I feel like we're missing a crucial piece of our puzzle. Knowing his experience and having worked prior with him, I'm sure he is one of the most fantastic programmers. During our time in 351, whenever I had no idea how to do something, I knew I could count on Brian to help me out. He would not only help me, but he would teach me and be patient and explain what he did when I didn't understand it. I know both him and Joe are great programmers, and they are also great leaders. When the 3 of us worked in our individual Java Tower Defense game, they were the ones who had most of the creative process as well as experience to know what had to be done. I know he would have been a great complement to our team, sadly, he is not. From my experience with him in SC2, I know he's not going to give up and let the other team collide just because he's not with us. So that doesn't worry me at all, I know he'll be a great addition to the other team and he'll gain great amounts of XP points. 


Looking at the positive, I'm in a group with 3 of my friends. I may not know Stephen L personally, and he may not be my bro (yet), so I'll have to be slightly professional with him; which will be interesting since I was getting used to the idea of being able to joke around with everyone in the group. Humor is pretty important to me, and someone who can't take a joke when everyone is being goofy, is a person that I clash against. 


I do not know of his experience, but I know that if I give it my best, the 5 of us can create the baby that joe had designed and it will be as beautiful as he pictured it in his mind. I know that after the 12 weeks, if we have a successful project, Brian Kraus will come back and join us for the more serious part of development and will get to jump in our ship and help us row again. 


If I've learned something from playing SC2 sooooo much, is to never give up or let things affect the way I play (in this sense, interact with my teammates). Whenever I used to let my personal life get in the way of my thoughts, everything came down and I would end up 0-10 for the day, which is a really crappy streak. So, I must take that knowledge, and do what I've struggled with so hardly in regards to my romantic self, which is to move on and quick.


While watching Harry Potter 1, a quote came up which reminds me of this moment.


"It does not do well to dwell on dreams and forget to live"


So, it's time to put it all in the past, and like in StarCraft, make a GG out of this instead of ragequitting. 


Friday, February 10, 2012

Sales Pitch

I decided to throw a slide together about my sales pitch. Something funny, and to which people can relate. Maybe they can tell my motivation by the two pictures that I put.

I'll talk about what MOBS is, and describe some of the features of the Pit-Boss.

Maybe throw in :

"Only the chosen ones, the few, the special, will make this idea come true. The team will be gosu due to its composition"



That's probably everything I can say in 90 seconds.

It'll be more of a tease, to make people interested and read my proposal first, than to actually recruit team members today.


PS: I'm kinda nervous.

Tuesday, February 7, 2012

Sunday, February 5, 2012

Proposal Revisions Notes

Dear future and non lazy me:


Here's some things you need to revise:


Timeline (make it more realistic)


Stakeholders
Besides Committed Player and Developer
Server runner could place ads on the page and such for revenue


Redesign things so that server list is STATIC so people can see what games are going on.


Game should be able to be played with 2 players or up to 10.


Don't assume users magically exist and they have public ip addresses and permission to run servers.


Don't make dumb assumptions.

Design Patterns

Dear Raccoon Lovers!


I just read the software design patterns wiki!


Wikipedia defines a design pattern as just that, a pattern and not a step by step guide of how to solve a problem. It is simply a template to solve a specific problem, with a specific pattern. 


Design patterns are helpful for cleaner code, and they are easier to read for those who have architectural experience. In addition, they help deal with problems that may have not been considered before the implementation by the programmer, but the pattern's designer came up with this pattern after many considerations and through his own experience. 


Patterns are just a micro-architecture design that a programmer should take and adapt to their current work. 


One of my favorite patterns, would be the Builder. 


The Builder pattern is used to separate a complex building into simpler steps. 


The pattern requires 4 things:
A builder (constructs the object step by step)
A concrete builder (builds objects),
A director (someone who guides the way things are built)
A product (something that is returned)




Basically, the builder sets all the paramaters required for construction. 


In java, the Product takes a reference to the ProductBuilder.
Then, the product sets its parameters by calling the ProductBuilder's get parameters. 


The ProductBuilder also has a method Product build(). Which returns a Product object. The build method simply returns Product(this). Where this is a reference to itself, which is how the Product acquires all the parameters. 


PS: I hope this Super Bowl is full of cheddar, potatoes and bacon soup!