Monday, August 24, 2015

TournamentCompare v0.002 - Enumerated Types in data first MVC

After tinkering with the controllers and views, I decided to look into a way to display the enumerated types used to set where the players were previously before this match. Ideally I wanted a radio control (as I had in Clarion), but the formatting eluded me for a super clean and simple implementation without losing data first design. In the end it turned out to be easier as a byte-stored enumerated type that can then be edited as a droplist.

Tournament Templates

One of the main parts of the program is to be able to put together any tournament format and then be able to run through thousands of tests to see the inherent bias of the tournament type. The tournament templates to be tested would then need to be anything from single elim, round robin, double elim, swiss, world cup rounds into single elim, etc. To achieve this, each tournament template would be a combination of TournamentTemplateMatches where each match accepts the 2 entering players from either the original player pool at the start of the tournament, another match previously held (Eg: single elim final match accepts the winners from the semifinals matches), a round robin subtournament, or an aggregator of previous scores to create a subtournament pool of ranked players.

Because each match could be pointing back to another match or another round (I'm assuming that subtournament aggregators can be handled by the round template with no rounds), I needed a concrete way of storing which type it was. Setting the PreviousType to "Match"would also mean that the PreviousMatchID is now valid, whereas if "Round"was the previous type then the PreviousRoundID would be valid.

Enumerated Types in data first MVC

Ideally I'd like to see in the database the type listed so that the data is a bit more human readable, but after investigation it seems that C# prefers integers or Bytes as the underlying enumerator value. I'd debated changing them to integers, but decided to use bytes instead (Tinyint in SQL) so that they appear as a different type in not to be confused with an ID. Changing the database wasn't too hard after manually changing the data to conform, then updating the field type in the designer.

Because I want to continually bring in database changes, I was keen to find a way that left the enumeration types already bound. I'd initially added the types in as another model, but found out later that you can add them directly into the model designer of the database with a right click > add >  enum  or by adding it to the enum types in the model browser. You can then change the fields to the new enumerated type. Doing this way it maintains the enum inside the database design (and scope) and also doesn't drop the assignment of the enum when the database is reloaded.



The display fields handled the enum perfectly, but the editing fields treated it like a string. There was some additional code to manually change the @html.EditorFor() to a @Html.EnumDropDownFor(), but I really wanted to be able to regenerate the controllers and views for any data first changes, so eventually settled on adding a html helper to overload the EditorFor() when an enum is detected.



Friday, August 21, 2015

TournamentCompare 0.001

I've been weighing up what programming project to work on for a while. I had Factor Friends as the front runner, but the move to a facebook friends variant didn't pan out as facebook now only allows access to friends of friends to only those who have installed / run your application. In some ways it is sad that the original concept cannot be done, but at least it wasn't made completely redundant if I had finished it before the changed the API.

On to TournamentCompare. I have been meaning to return to the Designing a Tournament series of articles for a while and it's really at the stage where I need some actual stats to pull together some comparisons. I had written a tournament analysis program back in 2006 to do some of the bias analysis, but since then I'd lost the Clarion development environment and couldn't continue modifying it for non-perfect play. So, a total rewrite is in order and hopefully make it web based and accessible for others to vet and build their own tournament types.

After a bit of digging it seems that another MVC application should be pretty easy, but use bootstrap to help with the presentation and graphs. Even though code first EF design seems to be more prevalent these days, I'm still a stickler for getting the data right so I've stuck with data first design.

Starting off the app in Visual Studio 2013 was pretty easy following this data first tutorial, although I'd created the MVC app first before creating the database. VS 2013 now has the ability to immediately add a SQL database right into the MVC project and create / modify tables and data right from within Visual Studio. I'm impressed! Within 1/2 hr I had the first TournamentTemplate tables done and looked like getting the others completed was just a matter of time. Went back to the tutorial to build up the entity framework for the starting tables, but unfortunately a VS crash took out the project connectors. Since it was so early I dumped and recreated the project with only the database making its way into the new project. EF done. Checked a quick update of the DB to make sure the EF would also update, and it looks pretty good so far.


Tuesday, August 18, 2015

Burnett Heads

Wednesday 12th August (1h) Northerly 20-30 Kn Nielson's
Wednesday looked good a couple of days out and it kept up to expectations. Wit the low tide at midday keeping Burnett Heads off the table, I went down to Neilson's to see what it was like. From the headland it was blowing LOTS. Scary lots. Talked it over with Wardy before deciding to give it a go anyway. As I was setting up there were a couple of windsurfers prepping to go out too, so that made me a little more confident. It was mostly over 20Kn (probably 25 average) and the extra wind made a world of difference to the fun that Neilson's had to offer. Boosted big off the first wave I hit and knew it was going to be a good session. 

2nd big boost I reached for the wave a little and went up into a backroll. I'd caught myself starting to loop the kite, but since I'd been watching some kiteloop transitions the night before I wasn't as afraid as before. I let the kite go and managed to come with a double backroll by the time I hit the water. Didn't ride away, but was fairly well controlled. So much wind that it still felt risky, so I left that one out for the rest of the session. 

The waves were bigger than yesterday as well as holding a better line from out the back to surf the swell line. Coming out from the shoreline pocket behind the rock wall was much easier to get up to speed and could pretty much hit most waves on the way out. I didn't want to be super fast anyway as the wind was still cranking. Big boosts everywhere. 

Finished the session with a mislanded boost that took the board under me and twisted my ankle a little. I could still walk when back on shore, but thought it was going to be bruised by the time the cold & adrenaline wore off. I had also hurt my hand from hitting a submerged rock and only found a big slice in my left pinkie after the end of the Burnett Heads session.    

Wednesday 12th August (1.5h) Northerly 20-30 Kn Burnett Heads. 
Met up with Wardy after 3pm down at Burnett heads to see if there were alternative launching points for low tide. Eventually decided to go back to the normal launching spot as the tide had come in enough to cover the mud. 

Really gusty on the tacks out to the wall. I'd trimmed right in for the walk to the water and had heaps of power on the water, but the lulls were almost dropping me in the water before the gust wrenched me up again. The kite was jellyfishing a little too so it might have needed a little more air. Eventually trimmed out to leave it 1/2 way and, although the gusts would pull me off track, the lulls were far more manageable and I didn't have to maneuver the kite as much. 

Approaching the wall and the flat water wasn't much more compensation for the gustiness, but the angle was good for boosting left. Wardy had mentioned that the wall provides an updraft, but my first boost still caught me by surprise. It was an average takeoff, but still went as high as I'd ever been! once you get about 2-3 metres off the water, the updraft catches the kite and just rockets you up. Most of my boosts were plugged landings as I struggled to work out what to do with the kite when you have so much time on the way down.

Most of the session was pure boosting and loved it. Still couldn't go all out and could easily get another couple of metres higher, but was high enough to scare me again. Landed a couple of backrolls, but one toward the end turned into a kiteloop with 1 & 1/2 rotations to have me landing on my back and being dragged downwind at 40Km/h. It was the biggest fall and almost ripped my helmet off. 

I was spent about 1/2 way through the session, but there really wasn't the right conditions for cruising so I mainly finished with casual boosts. After coming back in I realised that the camera wasn't on the helmet anymore. Wardy and I checked the beach in case it had floated in, but no luck. I went back in the morning to check the high tide line but it hadn't come in. Went down again at low tide to see if it visible on the mud flats where I had the stack. The mud was knee deep, but manageable with water over it, but I couldn't see a way to get closer to the location without bogging myself. Eventually called the loss and went home disappointed that I lost the footage of an epic day ....
    

Wednesday, August 12, 2015

Neilson's

Tuesday 11th August (1.5h) NNW 15-20Kn Neilson's Park.
Wednesday looked to be a good Northerly day, but the wind built up enough on Tuesday to have a go at Neilson's. It was blowing straight down the beach at Archie's with little to no waves, and possibly too low a tide for Burnett Heads. Turned out to be a nice little session and I'm glad I tried it so I know what to expect next time.

I thought the rock wall was a little bigger than it was, and it didn't really provide much clean water from the wind. Even though the beach was quite shallow there, I still couldn't quite turn and blast away out through the incoming surf. Most runs left me a little disappointed. I tried the bay to the north of the rock wall and, although it had a rocky bottom, it gave a lot better run up to the breaking waves.  


Wednesday, July 29, 2015

Mattias & Ben

Friday 3rd July (15m / 2h) SE 13-16Kn Elliott Heads. Another day with wind for Mattias. Setup the 10m and did a couple of tacks early with a few minor boosts. Pretty light though and had to pump the kite to get going. Swapped over to Mattias and he spent the time in the bottom bend at 1/2 tide going back and forth. He is getting upwind on the final part of the tack but loses a lot on the turn and restarts. Just about there though. Unfortunately the bottom bend was also the most downwind of everyone and other beginner kiters ended up down there eventually to make it a little congested. Mattias got tangled up in another kiter and somehow the kites went between the lines. at least both came down without incident and we were able to get Mattias going pretty quick. Wind died off so that after Mattias had finished there wan't much out there for me. Took the board and kite back to the heads by barely cutting upwind.

Monday 13th July (1h)  SW 10-14Kn Elliott Heads. Met a Spaniard traveller down at Elliott. He'd already been out but the tide was running low and there wasn't much water left. Launched and went over to the channel, but was pretty blustery. Right at the mouth looked the best but covered pretty heavily be a wind shadow.  Tried between some sand banks in the river but hard to make headway on the run-out tide. Popped back into the pond on the way back in and it was Ok, but super shallow.

Sunday 19th July (1.5h) ESE 15-18Kn Archie's. I'd thought Ben would be here by the Sunday afternoon and the wind looked good for a session down the beach. He'd missed the connecting flight to Bundy, so I went down at about 2pm for a kite. Wind started pretty SE but swung slowly around to ESE. Some nice boosts on the 14m into the breakers, then runs down the line with the wind change. Fun little session.

Monday 20th July (2h / 15m) SE 15-18Kn Elliott Heads. Started the day with a session down at archies with the trainer kite, but the wind was coming more south over the trees to be a bit of a nuisance. Took a quick go of the 14m to see how strong it was and felt good enough for a few jumps. Came in ad took Ben through flying the big kite from behind me, but he occasionally got the direction wrong to steer the kite, enough for both him and me to decide not to strap him in solo. Went back out for another quick spurt, then another session as they went for lunch. Good runs up to the middle sandbar going out the front with turns around the rocky stick. Good boosts out into the channel.

Tuesday 28th July (5h) SSE 15-20Kn Elliott Heads. Day looked good on the weather maps for a while and I'd been keen to get down for a big session. Forgot about the tides and was a little disappointed in the lack of water, so I took all my gear over to the south channel and set up over there. The wind angle made an awesome smooth run on the steep southern banks leading to the fallen tree, and I spent most of the first hour cruising with a couple of boost attempts over the channel buoy.
Wardy joined my after the tide had turned and spent another 1/2 hr or so with a bit more courage to try some tricks.

Wardy headed back for some food through the north channel, and I thought it must have meant that the northern mouth was opening up too. I walked the kite and gear back, but was disappointed that it still hadn't filled in. Went out in the shallow northern channel, but it was too shallow to do anything meaningful so I kept going out into the ocean. There was a nice little pocket out the front of the rock bar that wasn't sweeping down the beach as far that made a nice little wave run. I'd built up a bit more confidence in boosting going right, so using that on the waves with a building 18-20Kn wind was pretty fun.

Parked the 14m and contemplated lunch, but since it was 2:45pm I decided to hang around until Ben got there. Took my time putting up the 10m and packing down the 14m aa the wind was get a constant 20Kn. I'd launched Ian and had talked about his ocean rodeo board, so I joined him over at Coonarr for another little session. After he had a break on the beach, I tacked up over the top of the island to work the little pocket I'd found earlier to see the difference in kites. Fell off again going around the point as I was heading downwind. It seems that going downwind in open water has little holes that I'm digging into so I tried riding more on my back foot to slow down and make it safer. Still not a fan of going downwind. Kite performed better on the waves, but not as much as I'd imagined. Happy that I did that test.

I met Ian back at the Heads and had a go on the ocean rodeo board. Super smooth through the chop and really comfy on my ankles that had been getting sorer as the day progressed. Out on the waves it felt a bit hard to lift over incoming waves, but had super soft landings on the other side. Quite impressed. Boosts were achievable but I could notice the weight in the board. Once again landings were really easy. Would be an excellent cruising board.

Finished with another hour boosting and backrolling with Ben in the before calling it a day at about 5pm.


Wednesday 29th July (1h) SE 15-18Kn Kelly's Beach. Another strong day, but an afternoon meeting meant I'd need to be brief. Decided to go down the front (since it was pretty much low tide) and kite down near the basin rocks. Set up at money's creek and worked my way downwind looking for a good spot to catch the swell lines into shore. The pick was off the exposed rocks / reef just down from the basin rocks and blasting into the shallows near the moon rocks. Hit a couple of nice kickers on the way out going right to go even higher than yesterday. The swell didn't really form up into surfable waves, but was an Ok angle. Would have been nice to see a GPS plot of that session. Hopefully watch arrives back soon ...






Thursday, July 02, 2015

Kiting in the Channel

Since my watch is down I'll have to revert back to writing up kiting reports again.

Sunday (15m). 14-16 SE Elliott Heads. Spent most of the time teaching Mattias on the 10m. Took a quick run and managed to barely tack upwind. Some good glides into the new section opening up downstream of the pond, but didn't really do much.

Monday (30m). 13-16 SSE Elliott heads. Another teaching day and Mattias is getting up both directions, although still favoring going left. Fisherman everywhere in the main channel so we spent most of the time over in the pond bounded in by another fisherman on the point blocking off access to the new flat section heading down the river. Even less upwind and called it pretty early to swap over with Mattias. Scott came down also and tried out the new harness with the 14m and surfboard. He got a couple of tacks going in the pond, but kept bottoming out, so he went over to the channel with Wardy and Rob. I also had a go in the channel with the surfboard. Got up and going on the first run, but struggled going right wit the wind dying off. It seems that getting up and going with a surfboard in lighter winds than the twin tip is not so easy. Still hopeful it's just technique and possibly board choice that's holding us back.

Thursday (30m, 10m) 12-20 Kn SW Elliott heads. Unexpectedly windy so we headed down at about 10:30 to check it out. I tried it out first and got upwind quite well on the 10m with a couple of boosts. Changed over and the gusty conditions with more wind didn't really suit Mattias and he possibly performed worse than on Monday. After 1/2 hr we swapped back over and he was too cold to continue. I took the kite to the pond where Rob was travelling pretty well on his 12m. Managed a couple of powered boosts and backrolls to make a pretty decent 1/2 hour session. Went back concerned that Mattias hadn't showed up out at the pond and packed down for lunch.

Went down again in the afternoon with Scott and although we took the 14 & 10 out of the car, it felt like it was going to drop so eventually just took the 14m & twintip over to the channel. Managed to do a couple of runs when the wind was up, but the lulls were down to 10Kn and made the session a bit of a wash. Swapped over to Scott but he couldn't get more than a couple of metres. Went back pretty despondent that the wind was on the way out.

The channel was also quite shallow on both sides. I was expecting a steep dropoff on the southern side, but I was able to stand waist deep ~5m off the bank after a crash. The northern side is fairly gentle and gives quite a nice shallow area for practicing if the tide is pushing the right way. The whole inlet to the north of the island had been sealed, so I'm not sure where all the water is escaping. Maybe we need a big downpour for the river to carve out some sand?



 

Wednesday, June 10, 2015

Heroes Charge Hard Crusades 02

After over 3 weeks out of the game, I decided to put together the second recorded hard crusade from Heroes Charge and upload it. Pretty happy with starting this game as the first Let's Play format as there were a couple of times I could remove "Üm"s, "äh"s and long pauses because the screen wasn't changing that much.



Tuesday, June 09, 2015

How (not) to do backrolls


I've been landing backrolls for about a month, but there's still stuff going wrong with them that I'd like to get cleaned up before moving on to more serious tricks. Managed to film 2 interesting failures on Sunday:
1. Popped pretty high and just finished up the rotation way too early. I've done this before, but it's hard to predict exactly how high I'm going to go. It's really dialling in the pop that's the problem, but I could also work on estimating how high I've gone and whether I need to speed up or slow down the rotation.
2. I caught myself moving the bar pretty aggressively after takeoff and tried to correct. Honestly thought I'd looped it, but it turns out I had corrected fine; the kite just happened to head to 12 in a tight send. Not much I could do but keep rotating and eventually landed pretty easily. The kite was too far above to ride away from it, but I was happy to be on back on (in) the water.

 This was the first video I'd seen of my own backrolls and I was hoping they were more of a vertical rotation than other I'd seen. Turns out the pop is quite good and I'm getting enough height to look at more rotations or more twists. I've also been studying Caleb's goto trick and it's really a backroll with tailgrab and landing switch. The height is what makes it look awesome, so I think I'm pretty close.

Sunday, May 31, 2015

Heroes Charge - Hard Crusades

I'm playing more and more mobile games. Heroes Charge is one with a fair bit of busy work but enclosed within is a great little tactical challenge: Crusades. Here's a 3 part series on the strategies used to conquer Hard Crusade at a lower team level.






Sunset Medina


Boosting practice in ~20Kn winds. We played Funky Cold Medina in a random tangent at work (as you do), so it seemed to fit in some quirky, mixed up memory of that day.