Introducing Daximation

With the end of soccer season, I have found myself with a lot of free time.  Well, I always had a lot of free time, but I occupied my mind with next practice, or game, or upcoming refereeing.  Physically I would just read (Demanding, I know  :)
But reading isn’t cutting it any more. So I decided to start a new project.  The goal was to animate my website (the one you are reading).   Researching various animation techniques led to javascripts built-in animation, and the canvas element.  So I decided to create an animation program.  Something simple.

Turns out canvas is great for drawing, but not so much for animation, as there is no ‘state’ of a canvas.  It cannot contain or keep track of what you’ve already drawn.  The only way to animate is laboriously erasing the screen and redrawing it each frame (yes I know thats what animation is but canvas did not have that functionality built in).

This led to reading about SVG.   SVG = Scalable Vector Graphic.  The standard has been implemented for at least ten years, and I remember reading about when it was introduced.  Even as a kid on my old windows 95 machine I tried loading a SVG on my website and it didn’t work.  But as of 2013, SVG is working on today’s browsers.  If you had firefox during that year (with automatic updates turned on), you saw the version numbers jump from 5 to 20.  Why all the major releases?  Some of them were for SVG.

Bottom line is, the new <svg> tag in HTML provides for a rich and flexible way to draw and animate (with the <animate> tag) right on a website.  It uses the inbuilt graphics chip on the motherboard (Finally) to provide smooth and interactive animations, something that was never possible before without the use of Flash.  But now, anything that you could make as a regular program can now be written in javascript and used online.  Google has realized this for a while now.  :)

And so, I created an SVG on a website.  I had code from my <canvas> attempt that let me draw shapes, and the logic was the same, so it was easy to copy that over to SVG.  A day or two of poking around with the <animate> and <animateTransform> tags (Another guide here) and I had some animation going.

The idea then occurred to use this to draw tactical diagrams for my soccer team.  I had looked for diagrams for doing Goal Kicks but they were scarce.  I downloaded a program that made tactical diagrams and thought “I can do better than this!”

Two weeks later I had something that might possibly pass as a sports-animation program.  My task was done.  Time to quit.  But… I still had heaps and heaps of free time.  So I kept going, now with the idea of creating a professional-looking piece of software that I could maybe possibly sell.  I wanted it online, but no one pays for software online.  So it would have to be free, and run by donations.  First step: get a domain name.

I was puzzling over possible names, each one more boring than the last, when for whatever reason my soccer team’s pre-game cheer sprung into my head:  “Dax em!”.  They came up with that on their own.  It sounds a little bit like ‘imagination’ or ‘animation’, and so my new title was born.  Daximation.

Ladies and gentlemen, I present to you: www.daximation.com

Right now its still in beta.  I don’t know how to make it look good.  I also just spent the last week trying to get it to work on Internet Explorer, eventually to abandon the attempt when I realized the most basic of basic javascript commands, innerHTML, was not implemented.  After hours of puzzling it through (using innerHTML is at the core of my code), I didn’t see an easy way around it so I just said ‘screw it’ and now if you access the site using internet explorer it will redirect you to download google chrome.  :)

I will be working on Daximation on and off as the mood strikes me.  I need to go back to pen and paper and draw something that looks good.  Right now it seems too crowded, too amateurish.

To Be Continued…..

End of soccer season musings

It’s the end of the season at St. Joes.  I have bittersweet thoughts.  Bitter because it was the worst season of my career as a coach, with a 2-5-5 record and a dearth of goals.  I also spent too much time yelling for my comfort (Thanks Nico), and the sweetness of having my own team did not materialize.  Previous teams seemed very animated.  St. Joes just didn’t.

Then I realized I’m not very animated. The excitement wore off years ago.  Why was I doing this?  To score some goals?  Seeing some kids blossom?  It seems that can’t happen if I’m not super-excited.  If I’m treating this like a job, the kids are apathetic,

At this point my thought process breaks down.  Asking ‘Whats the point’ means facing the inevitable conclusion that there is no point to anything.  And this way lies madness.  So coaching becomes a routine.  ‘something to do’.  Getting outside, running around a little, maybe a sense of importance from bossing kids around.  That’s something, right?

Sadly, I can’t stop my thoughts.  They get petulant.  I start feeling sorry for myself – my team isn’t athletic, the mores of the school inhibit ambition, or it’s the other coach’s fault.  I think “If only I had been able to coach them from the start” (I only had four complete practice sessions of my own – what can anyone do during four practices?), or if I had been given more authority, or if Coach Berman hadn’t done all those lines and laps, my team would have run harder.

But aren’t those just excuses?  The bottom line is, if I were a good coach, I would have made those four sessions count, I could motivate them, I should have won dammit!  In all my years coaching KASL I only had 2 losing seasons, and both were very close to winning seasons – a difference of one goal.  Yes, one game, one goal.  Both years.  And now I get a ‘real’ team (a high school team) and I seemingly fail.  What happened?  What went wrong?  Are the kids just that bad?  Did I overestimate my abilities?  Am I not cut out for ‘the big leagues’?  Or is it my or Dave Berman’s coaching?

These questions keep me up all night.  I thought about it every day during the season, at every game, every practice where I had a moment free for introspection, and I’m still thinking about it.  I can’t figure it out, and it’s driving me nuts.  Maybe this isn’t healthy.  Maybe I should stick to basic drills, technique, stop pushing, stop trying so hard.

At this point in this post I’m just recording my thoughts.

Now a new chain of thoughts – Am I arrogant for thinking I can turn any team into a winning one?  Am I crazy for thinking about this so much?  Am I stupid for thinking there is an answer?  How do other people deal with these questions?  Do they even deal with them?  Other coaches I observe don’t seem to beat themselves up.  If anything they seem more arrogant.  Just today I had a coach give me a hard time about “How was that push a foul but the other one was not?”  Don’t they realize how human I am, how human they are, how human everyone is?  Where’s the introspection?  How can they ever learn?  Am I that way, failing to see obvious answers to simple soccer problems?  Am I just the oblivious coach yelling at the referee in my head?  Excetera, excetera, excetera.  An endless loop of endless thoughts ad nauseum.

I shove it away.  Maybe shoving these deep thoughts away are causing me to avoid simple questions!  For example, the problem of swinging at the ball and missing.  (It happened last game – the other team got an easy goal because our sweeper swung and missed at what should have been an easy kick).  The obvious answer is “Get your body behind the ball.”  Obvious, right?  So obvious something is wrong.  Kicking the ball, almost by definition, requires leaning to one side.  Do I really expect someone to throw their body into the ball when they can just as easily kick it at their side?  When its easier to kick a ball at your side?  I think of all the times I haven’t ‘got my body behind the ball’.  I think of the times I did and still missed – the ball bounced under my foot.  Does the simple saying “Get your body behind the ball” lead to people not controlling the ball?  To them not kicking the ball?  To the other team stealing the ball?  Is this why my team sucks!?  Omg have I been teaching it wrong all these years?!  Am I teaching everything wrong??  Arrrrggg stop stop thinking so much!

There’s much more, so much more about formations and enthusiasm and the role of tactics vs hustle in a team; is there such a thing as a sucky team, is their speed a fixed thing, are they always going to be slow; is motivation the only thing a coach can bring to the team, is that related to enthusiasm; and more.  But the catharsis that is writing shall sate the thought demons, at least for now, and so I bid you, dear blog, adieu and good night.

Drawing on SVG element

I could not find any tutorials on how to do this, or examples, and the only thing I could find that did the same was a huge program with tons of code to wade through (SVGedit). It’s very easy to draw on an SVG element, right in your browser.

You will need:

JQuery
An SVG element in your HTML

The basic idea is:

Get the SVG element.
Get the Mouse Coordinates.
Create a PATH element dynamically in the SVG.
Then use getAttribute() and setAttribute() on the path.

Here’s the code:


var isdrawing = false;
var currentpath;

function getlocalmousecoord(svg, evt){

  //calculate mouse coordinates
    var pt = svg.createSVGPoint();
    pt.x = evt.clientX;
    pt.y = evt.clientY;
    var localPoint = pt.matrixTransform(svg.getScreenCTM().inverse());
    localPoint.x = Math.round(localPoint.x);
    localPoint.y = Math.round(localPoint.y);
    console.log("mouse at " + pt.x + "," + pt.y  + " (global)  "+ localPoint.x + "," + localPoint.y+" (local)");

    return localPoint;
}

var svg = document.getElementsByTagName('svg')[0];
$( document ).ready(function() {
    console.log( "Jquery ready!" );

//grab the first SVG element on the page
var svg = document.getElementsByTagName('svg')[0];  /*http://stackoverflow.com/questions/4850821/svg-coordinates-with-transform-matrix  */

//Mousedown event handler
$('svg').mousedown(function(evt){
   isdrawing = true;
    var localPoint = getlocalmousecoord(svg,evt);
    var newElement = document.createElementNS("http://www.w3.org/2000/svg", 'path'); //Create a path in SVG's namespace
    currentpath = newElement;
    newElement.setAttribute("d", " M " + localPoint.x + " " + localPoint.y ); 
    newElement.setAttribute("fill", "transparent"); 
    
    newElement.style.stroke = "#f00"; //Set stroke colour
    newElement.style.strokeWidth = "5px"; //Set stroke width
    svg.appendChild(newElement);



  });
$('svg').mouseup(function(evt){
   isdrawing = false;
  });
$('svg').mousemove(function(evt){
   
  if(isdrawing == true){
  //calculate mouse coordinates
      var localPoint = getlocalmousecoord(svg,evt);

      var pathstring = currentpath.getAttribute("d");
      pathstring = pathstring + " L " + localPoint.x + " " + localPoint.y ;
      currentpath.setAttribute("d",pathstring);
  }
  });
});  //end of .ready

(Someday I will figure out how to preserve line breaks yet not wrap in wordpress)

 

Here is the working example:

http://johnktejik.info/Portfolio/programming/drawonsvg.html

 

USSoccer D license feedback

As for your main points, I thought I did them, but I guess I did them wrong. Do you think you could be more specific?
Specifically:

By soccer gear I assume you mean shinguards and socks? I didn’t know I needed to wear them, sorry, I will wear them next time. You wore khacki cargo shorts. Wear soccer gear as a coach. You don’t need shinguards but you do need look like a coach and not a parent
What wasn’t specific enough? How I can get more specific than escorting a player to the correct spot and demonstrating what they should do? You moved players and said cover, balance, support. You never showed them the angle to defend, discussed the amount of pressure, where the cover was or angle to move them and why based on the attacking players. You just repeated 1st defender, cover, and balance through the session and asked them who they are without any technical points.
The final freeze – I know that was on the attacking half, but the other team never got control of the ball near the back four. I kept waiting and it never happened so I worked with what I had. What should I have done differently? Keep waiting? (If I did that I picture you saying something like ‘find the freeze quicker’ or ‘everyone plays defense, even the forwards’ :( ) You need to be patient and stay on topic. Your topic was defending zonally so it needed to be in the defensive third with the defensive line.
Could you explain what you mean by ‘what angle to defend’, please? It could mean several things and I’m not sure how it applies to keeping players in a line/shape. Yes, this is why we asked you to attend the E license course so you would understand the basic concepts that are in the coaching buzz words with a better technical understanding. Angle to defend means which way you are pushing the attacker to go. Are you pushing them to the inside or the outside, right/left, is it a bent run so your teammates know where to cover and balance, is the cover player giving the first defender communication to angle the defense to certain side based on team shape or where the help is. The amount of pressure is it to contain or win the ball, compact as a team. Angle of coverage as the defensive line in the zone, moving as a unit
Same for ‘which way to defend as a unit’. Is this different than teaching pressure, cover, balance, or trying to get them to stay in a line? There is spacing between the line based on the amount of pressure on the ball and where the ball is for the defensive line. If the ball is in the middle, who applies pressure to the ball and what does the rest of the line do to keep shape and be compact. Who steps to the ball on the outside and what angle are they pressuring the player? How does everyone else on the line move to cover and support. Who do they cover? It depends on the position of the attacking team and the situation in the game. You never adjusted based on the attacking team just said “pressure, cover, balance” and moved players to spots but did not discuss where to cover with the attacking player, how close, how to see the ball and the attacker for balance.
5 W’s I’m pretty sure my coaching points answered most ‘W’ questions. Did I need more? Did I do it the wrong way? Was I supposed to be more explicit somehow, maybe ask the question myself, or quiz them?

I’m not trying to give you a hard time. Really, I don’t know what you’re looking for and any specifics you can give me is appreciated else I will end up making the same mistakes. Yes, we recognized this when you attended the D with Rick Ceh and myself. We have asked you to attend the E course because we believed you did not receive the information or did not completely understand it.

Rick Flores will attend the next session with you. Please choose another topic and send the lesson plan to him prior to the coaching session.

Misquoting Jesus and other books (Pat Tillman, World Cup, Writing, The Janus Report)

Completed several books this week:  Misquoting Jesus, Boots on the Ground by Dusk and Where men win glory (War and Pat Tillman), Eight World Cups and The World is a Ball (Soccer), Several Short Sentences About Writing and Bookmark Now, Coaching Youth Football, and something called the Janus report which was not what I thought it would be (it is just a collection of anonymous yes/no surveys about sexual behavior).

Misquoting Jesus is a worthwhile read for anyone who has ever read The Bible.  Not only is it a personal account of one mans spiritual journey that is shared by many Christians today (including myself), it thoroughly yet succinctly details various mistranslations of the Bible and how they happened.  The quality of writing shines.  Highly recommended.  Grade: A+

Where Men Win Glory and Boots on the Ground were about Pat Tillman and ‘friendly fire’ in the Iraq/Afghanistan war.  Boots on the Ground by Dusk was by Pat Tillman’s mother and had an amazingly evocative first chapter or two.  Where Men Win Glory (A line from the Illiad) was by the author of Into Thin Air, the book that took away my desire to ascend the heights of Mt. Everest.  Grades: B+

Pat Tillman.  I had heard about the name way back when but never knew any details.  The authors make some damning revelations – General McCrystal’s memo to Rumsfeld saying “If the story gets out”, Rumsfeld denying getting it; the commander in Afghanistan flying to Iraq for one day, the day of Tillman’s death, and then saying he wasn’t there.  Commanders denying giving orders that their subordinates insisted they did.  Testimony changing after a commander asks the interviewer to ‘step out of the room for a minute’.  The guy who first opened fire on Tillman (Thus causing the rest of his team to follow his lead) getting a field promotion.  The initial investigation disappearing.  The lull in fire where Tillman came out behind the rock (He was screaming how he was on their side), where his own squad resumed firing, killing him.

The craziness that they document is almost beyond belief.  The commander in question assigning himself to lead the investigation.  Another commander calling Tillman “Worm Food” and not investigating because Tillman wasn’t Christian.  Yet another commander surveying the canyon where they got ambushed one day earlier, then ordering Tillman’s squad to travel in daylight and separate the squad, both which were against regulations.  The team leader ultimately got blamed – except he was retired!  Tillman’s diary was burned.  His armor stripped and destroyed despite orders to keep the armor.  Hospital records saying they ‘attempted CPR’ when Tillman was missing most of his head.  Dates changed, memos redacted, reports lost – It’s a mass of incompetence.  Those who say it’s a conspiracy are wrong – conspiracies are organized.

The books also have some non-Pat Tillman stuff.  Did you know the first US Soldier’s deaths of the Afghanistan war were self-inflicted?  Someone called in an air strike, but instead of dictating the enemy coordinates, he instead misread his instruments and reported his own GPS location.  It also injured the Afghani we were planning to put in charge of Afghanistan.  Oops.

Oh and Jessica Lynch, supposedly captured by the enemy, turns out the ‘enemy’ was actually trying to save her.  Her injuries were from a car crash, not from enemy fire.  She wasn’t in prison, she was in a hospital.  The Iraqis tried to drive her to an American base but were fired on at the gate.  A thousand troops were assembled to ‘save’ Lynch, instead they just marched into the hospital, took her out easily, and ignored the four other American ‘captives’ because they weren’t cute 19-year-old blond females.
I didn’t know any of that.  I thought she really was captured.  Now I know better.  It’s depressing how badly the media screws things up, reporting the first thing they hear from someone who couldn’t know the facts.

The other books were meh.  The soccer related ones were okay – well written, occasionally humorous, but mostly describing soccer games that happened long ago, which just doesn’t work well on paper.  I miss the World Cup.  Bookmark Now was a bunch of clever short stories about writing by writers.  Several Short Sentences About Writing I had already read years ago and forgotten I had read it.  It’s kind of a stream-of-consciousness thing about the mystery of self-expression.  It reminds me of Pascal’s PensesTeaching youth football was about American football and was full of jargon and code words I didn’t understand (I was hoping to study other sports’ tactics for my book).  And the Janus Report, well, the only thing I remember that stands out was that over 20% of men say they have ‘had a homosexual experience’, whatever that means (it was never defined).  I find that hard to believe, which is why I remember it.
Grade: Four Sandwiches.

Fail, USSoccer, Fail.

Right away let me say “Go team USA!”  They just played a superior game against Portugal to tie 2-2.

A few hours ago I got back from the “D” license course for soccer coaches in Arlington Heights.  I had a horrible experience last time, failed, and vowed to not return but supposedly “everything changed” in 2013, that it was now more professional and standardized, and so I decided to give it another try.  The actual test is next month but I figured I could use a refresher so I showed up, unannounced, at an earlier session (which was today – the US Soccer website says players who sign up for the test are encouraged to attend the instruction session).

Once again, I asked ‘what activity should I coach for my topic’, once again I was was told it’s not important, they don’t care, that “It’s not what you coach – we judge you on ‘how’ you coach”, once again I copied the activity the instructor used on a previous day, once again it was my lesson plan they criticized (as opposed to how I coached it) and told me it was not an appropriate choice of activity, and once again I failed.  They even told me not to show up for the next session, that I needed to start over with the E license.

I sort of saw it coming.  I’m getting used to recognizing the lack of smiles/nods, blank stares, and not answering my questions as asked.  So this time I corralled the instructors (both of them!) after the course and made a point of asking “why?”
The conversation went like this:

Me:  “So what is wrong with my lesson plan?”
Instructor:  “This activity is not a good choice to use.”
“Ok….  Why?”
“It’s not a realistic situation.”
(Pause as I reflect on the irony.)
“Do you agree?  This is not what happens in the game?”
“Yeah, but then neither is any of the drills anyone did.”
“It’s not active enough.  Too much standing around.”  (No its not, and even if it is I just make the field or groups smaller.)
“It does everything you said I needed!  Exactly!”  (Yesterday he gave me a list after I kept pushing on the ‘how do I know what an activity needs.’  Answer: Provides a way to score, to win, goals, pressure, direction, and includes the topic.)”
“I just don’t think you get the philosophy US Soccer is trying to teach.”
“What!?  Are there specific criteria or not?”
“You should take the ‘E’ course again.  We have one in a month -”
“Wait, that’s a ‘technical’ course, like how to kick a ball and stuff.”
“Yes, but that’s where we introduce lesson plans.”
“I can understand you not liking this choice of activity here on this page, but now you’re making it sound like I don’t know how to do a lesson plan.”
“You need to keep an open mind here.”
“I’m trying!  But what is wrong with this activity?”
“These are just suggestions.  We’re just saying this is what you need to succeed.  We want you to succeed too.”
(Recognizing a cop-out when I see one) “You’re the boss.”
(Other instructor visibly bites tongue.  She recognized the insinuation of personal bias and is thinking “It is not us, its USSoccer.”  Both say nothing.)
(Sigh)  “Thank you for your feedback.”

And I vowed not to argue this time!  ARG!  Next try I’m going to be completely silent.  Not a peep.  Complete mute until they say its my turn.  Nothing.  Zip.  Of course, that means I will have to try not to listen, since this time my first argument came after the statement “Attackers are usually numbers-up in a real game.”  I couldn’t help it – a “What?!” burst out of my mouth.  I swear I won’t ask a single question next time.

I already signed up and paid for the official test in a month.  But they advised me to not even attend since they “know I will fail”.  What does that mean, I “Don’t get the philosophy??”  They make it sound like a religion or something!  Since when is belief required to pass a test?  So frustrated here.

You fail, US Soccer.  Fail.

I need an agent!

I need to find an agent!  This book writing thing keeps getting more and more complicated.

http://www.sfwa.org/real/

 

Here’s my query letter.  What do you think?

 

My proposed book is a non-fiction, self-help or reference book intended for the average soccer player or coach. It will consist of short, easily digestible lessons written in second person with the occasional light-hearted anecdote, which is the style of the book Soccer IQ. Soccer IQ was, according to the author, the number five best-selling book on Amazon.com (I don’t know how to verify book sales numbers). But whereas Soccer IQ was short and unorganized, my book will be more comprehensive and organized by topic. My working title is Winning Soccer.I’m aiming for 70,000 words.

My book is aimed at the average player or coach, meaning the non-professional adult player or youth coach. Apart from Soccer IQ, I cannot find any other books that fall into this category. Most soccer books seem to be either for the complete beginner, or are fan-based, meaning they focus on a particular team or professional athlete. I’m hoping to fill a much-needed gap.

My book might also serve as a textbook for soccer camps or soccer licensing clinics. It would need diagrams and references, but the material is there. Currently the book used in U.S. Youth Soccer federation licensing/certification courses (which everyone is forced to buy) is a Dutch-written book titled coaching soccer, which for whatever reason is so disorganized, inane and at times just plain wrong as to be unreadable and at times incomprehensible. I’m certain my book will be better than Coaching Soccer.

In America, the sport of soccer is growing rapidly and will someday reach the level of enthusiasm and professionalism as the rest of the world. Right now it’s in its infancy. This may be over-ambitious, but I see no reason why my book couldn’t be “the” definitive book for coaching and learning soccer in America.

 

Thank you for your consideration,

John Dax Ktejik

Review of Les Miserables, the movie

Happy mothers day.

I finished reading Les Miserables the other day, and just finished watching the movie.  I had not seen it before.  I was pretty disappointed.  It was modeled after the musical, not the book.  Meaning little dialogue, and song after song after song.  What dialogue there was, they sung!  It was pretty painful to watch.  Couldn’t they have tweaked the dialogue to make it rhyme?  They tried, I think, a little, but it didn’t work.  They really needed to just speak the dialogue without trying to sing it.

The only actor that made the sung dialogue work was Sacha Baren Cohen.  He rocked. That sort of crazy mischievous character is perfect for him.  His wife, Helena Carter, also did a fine job playing off each other.  The song “Master of the house” was as good as, if not better, than the actual broadway musical.  Every other actor and song was meh.

Anne Hathaway did not do the weak damsel very well, imho.  Her teeth were too white.  Her last role was Catwoman and she kicked ass there and it was tough to not see her as a superhero.  After I realized the main character, jean valjean was played by Hugh Jackman aka The Wolverine, I had a hard time concentrating when he sung.  I just kept waiting for titanium blades to shoot out of his body.  Russell crowe with his sympathetic eyebrows made a pretty poor Inspector Javier.  His suicide at the end of the movie didn’t work, not after they had him standing on top of the city singing to the stars.  I think he should have played the main role of Valjean.   Marius and Cosette were also poorly cast.  I thought for ten minutes the blond companion of Marius, I forget his name, was Marius.  That is how he looked in the book, and his character as a determined, slightly tragic lawyer, fit the blond guy’s character.  Instead we had this young freckled-faced smiley guy.  I didn’t like him.  And amanda seyfried as Cosette, while not a bad choice, didn’t quite work.  She is supposed to be playing a 15 year old!  Instead she looked older than Marius.

The directing was pretty bad.  Besides making Jean Valjean actually look younger as the movie went on, the camera work was boring.  Just a closeup of the actors face as they sung.  I heard this was one of the very few television musicals where they did not dub over their voices – what you saw was what you heard.  Consequently, the director didn’t want to miss a word that came out of their mouth.  No cutting, no camera pans or zooms – Sound of Music this wasn’t.  Also the actors just stood there as they sung.  Give them some props or something, jeez.  it was almost boring.

And for my last complaint, the magic that made the musical what it was, the big death scene on the barracade, was all wrong.  They were supposed to die singing, waving flags, no cannons, no blood, no explosions, no special effects.  Instead they sung their song, then they all ran inside the building and hatcheted up the stairway and got hunted down in groups.  No singing, no flag waving, just background music and cuts to Valjean getting into the sewers.

On the upside, I thought the sewers were very realistic.  In the book they came across as kind of clean, and I never could picture what a quagmire looked like.  But the movie made that clear.  It was also the only point in the movie where I thought they weren’t trying to make the actors look ‘pretty’, which was good.

Grade:  C+

Animated Social Media Icons Powered by Acurax Wordpress Development Company
Visit Us On Google PlusVisit Us On YoutubeVisit Us On Linkedin