US Soccer bans punting

US Soccer, in a document titled ‘player development initiative’, has banned punting at the younger levels. A new line 1/3rd of the way up the field will be created, and opposing players have to move behind that line every time the goalie gets the ball. The goalie is then expected to throw or roll the ball to a teammate in an un-pressured situation. This is supposedly to help younger players ‘develop’.

In other words, US Soccer has banned one of the most fun moments of the game in order to someday, hopefully, win the World Cup.

If we had a youth athlete who was neglecting anything in his current life in order to win the World Cup, we would tell him that he was being ridiculous. There’s currently less than a thousand american players that play at the international level compared to what, 10 million youth soccer players? The odds of a youth player playing internationally are something like one in a billion. The odds are much smaller if we are talking the World Cup. We would tell that kid to go watch Coach Carter starring Samuel Jackson and stay in school. Colloquially speaking, “don’t quit your day job”. Yet when the official soccer organizing body of the United States of America tells kids to ‘quit their day game’, somehow it’s ok.

US Soccer states player development is the most important thing at the youth level. False. The most important thing is fun.

I currently have a U10 team. The only reason anyone wants to play goalie is to punt the ball. Every kid loves punting the ball and the urge to do it is, for whatever reason, highest at this level. It’s the only thing they can do well as a goalie. Can they dive? No. Proper positioning? No. Coming out on a breakaway? More likely they will keep backing up into their own net. But one thing they all can do is punt. It’s fun to do and it’s fun to watch.

Parents love a good punt. The ball sailing majestically the entire length of the field… They ooh and ahh and say ‘what a great punt!’ (They never go ‘what a great throw!’) It’s an exciting moment of the game where everyone on the field starts running in anticipation of that booming kick.

Instead, US Soccer wants to take away that excitement. Why not just ban goals? If you want to change the rules of the game to force kids to get better at passing, it’s the logical choice. Just mandate a game of keepaway for an hour straight. Don’t even have points, because that is too similar to keeping score, which is focusing on winning, and therefore bad.

Or why not ban goalies? Players have to score from within the goal box. Right now, goalies don’t do much with their feet. Is learning to throw the ball a valuable skill? No. It’s not even fun. So why not just eliminate goalies entirely? At least that player will get some field time, run around, use their feet and gain ball skills.

If the goal is really to force players to do short-distance passing, it’s the logical choice. Ban throw-ins, goals, long-range shots, and goalies. Make it like some indoor soccer fields, where they paint lines on the field, and if the ball travels too many lines at once, it’s a foul. Just like the Icing Rule in hockey. Most soccer fields in america already have American Football markings on them – why not use those? If the ball travels more than twenty yards without being touched, its a foul.

Why don’t we do that? Oh, right, because that would be bloody stupid! Long passes are an integral part of the game, and so is punting. There is quite literally no other way to send the ball seventy yards up-field. It’s a valuable tactic to deliberately create a loose ball and gamble on your team recovering it, if it gains you field space. It’s why the pros do it, else they would just send the ball short every punt or goal kick. And as a tactic it is even more valuable at the younger levels.

U10 players literally don’t have the strength to do accurate passing. Forcing a team to do something they are not capable of doing well, at the inevitable cost of more goals scored against them, is a recipe for getting kids and parents to quit. This is US Soccer forcing little kids to use a tactic because they feel that’s how the game should be played.

Make no mistake. This type of short passing game is how the pros do it, not the average youth team and parent, who is perfectly content to yell ‘send it!’ and chase it to the corner. ‘Development’ is US Soccer trying to get American to compete at the international level. It’s sacrificing millions of kid’s fun to create that one superstar.

If they had disguised this ‘no fun’ initiative in the guise of protecting kids heads, that I would understand. Heading has been recently banned as dangerous, and most headers at the youth level come from punts (there’s no other moment in the game where the ball spends enough time in the air for kids to deliberately get underneath it). So I could understand banning punts because they were dangerous. But banning punts in order to force short passing?

The rule also states they want to create a ‘low pressure’ situation for passing. The rule as written will not accomplish that. Currently the rule says ‘as soon as the ball is put into play’ the other team can attack. So what this means is the other team will line up on this 1/3rd line, and as soon as the goalie releases the ball, they will charge. That’s not ‘low pressure’. That’s a free kick, or a kick-off.

If US Soccer really wanted to create a low pressure situation, they would force the other team to stay behind the 1/3rd line until the ball crosses it. That would give the team unlimited time to learn to pass. Currently it gives a player what, three seconds? That’s how long it takes a kid to sprint twenty yards.

And why draw an extra line? The 1/3rd line is just formalizing the distance the other team has to move away, which was never a problem. No little kid ever hung around the goalie hoping to intercept his punt. Why not just say they have to get back 20 yards? I like the 1/3rd idea, but what I don’t like is taking away the choice of a punt. By forcing the play to the ground, it’s like turning every punt into a goal kick.

If you’re going to change rules, why not just allow players to receive their own goal kicks within the penalty box? Goal kicks happen more often than punt situations. Teammates are already allowed to stand in the box. Why force leagues to go through the hassle of drawing new lines on the field? At the U10 level, the goal kicks are so weak they sometimes can’t clear the ball out of the box, and the referee has to stop play and tell them to take it again. It’s a stupid rule, has an easy fix, and would accomplish the same thing as this ‘player development initiative’.

Or why not just allow youth goalies unlimited time to release the ball? Often the ‘high pressure’ we see deployed by the opponents comes because the goalie rushes the release.

The rule also states the goalie can pass the ball. A pass is defined as a deliberate strike with the foot. A punt is defined as dropping the ball and kicking it before it hits the ground. I see a simple loophole here – just drop the ball, let it bounce, then kick it. It’s a pass, not a punt. Or you can be really fancy and teach kids to do the half-volley kick, where goalies drop the ball and strike it a millisecond after it touches the ground. (It gives it backspin which lets it stay aloft a little longer)

All these loopholes, discussion of ‘development’ and adding, not simplifying, rules, tells me the ‘no punting’ initiative is poorly thought through and misguided. I beg US Soccer changes their mind before making the rule mandatory in August of 2017.

Review of Best Served Cold by Joe Abercrombie

Best Served Cold is Joe Abercrombie’s best, and worst, book.

In case you don’t know Abercrombie, the best part of his books are his characters. Best Served Cold has some of the best characters he’s ever written, like Friendly, the cleaver-wielding cook who gets along with everyone, unless they insult his dice. There’s my personal favorite, the depressed poisoner, obsessed with poisons and getting people to like him. And of course there’s the strong female main character, Monza, the Butcher, the Snake of Talins. Favorites from previous books also make an appearance.

Abercrombie forces his seven characters together with wildly different motivations. Sex, money, revenge, the antidote.. Then he makes them hate each other, revealed through murderously philosophical dialogue. I hung on to every unrealistic word. He ratchets up the tension to unbearable heights (or lows), and at times I had to put down the book and remind myself not too get too attached because you know someone is going to die (which doesn’t happen how you think it will).

And oh, the fight scenes! Abercrombie does some amazing fight scenes, and the plot of Best Served Cold – revenge on seven powerful men – gives him a chance to write not one, not two, but seven action packed fights to the death.

Now for the bad. This is Abercrombie’s first book after his hugely successful First Law trilogy. He’s experimenting, and he makes everything extreme. It works with the characters and dialogue, but other parts are borderline unreadable. I admire Abercrombie’s clinical precision in describing fights and injuries. No unimaginative screaming from his characters. But in Best Served Cold, he goes on for pages and pages of this stuff, how ‘the silky smooth sword penetrates the flesh’, bones, blood, yada yada. Pages of the stuff.

There’s torture scenes. They do have a purpose, to provide motivation or show the evilness of a character, but to spend several pages on them, while you the reader wince at every detail, it’s just too much. You wonder if he enjoys writing this. In the dedication to Best Served Cold, Abercrombie warns us that we will read this book and worry about him.

And then there is the mandatory sex scene. He doesn’t do just one, but three or four. Again, he goes too far, and pushes it from borderline rated-R to blatantly X-rated. I don’t want to read about a guy’s cock. (Does anyone??)

Abercrombie also throws in some weird supernatural elements, supposedly foreshadowing events of future books, but it just comes across as forced, out-of-place. Best Served Cold lacks the polish and precision of all his other books.

My advice? Read the prologue, the first ten pages or so. It’s the best scene in the book, second only to when Friendly avenges his dice. If you are hooked, then keep reading. If you find yourself wincing once too often, then skip Best Served Cold.

Review of Otherland by Tad Williams

Most science fiction/fantasy books are simple. One or two main characters, an evil villain, and stuff happens. But every now and then comes along a work of fantasy or science fiction that approaches something resembling literature. Otherland by Tad Williams is such a book. It features not one, not two, but five main characters, each with their sidekicks, backgrounds, families, motivations and environment. An African professor and her zulu ‘bushman’ sidekick. An online barbarian, invincible in virtual combat but is suffering from progeria and about to die in the real world. A serial killer with the power to disrupt electronics. A wheelchair-bound hacker whose story is told through the eyes of a five-year old girl. And the character who dominates the book, Jonah, who is permanently lost in the belly of a virtual reality based on literary classics.

Each chapter of the book jumps between these characters. Each character has their own plot, and as a reader you feel like you are reading five different books where nothing happens. Eventually things start happening to each of them. One’s brother falls into a strange coma. Another experiences online visions. Another finds out about this mysterious virtual reality called ‘Otherland’, the hacker seduces a little girl, and Jonas, the lost one with amnesia, well, I just started skipping all his chapters once I figured out the author was just using those chapters to recreate literary classics such as Through the Looking Glass, The Odyssey, Peter Pan, Wizard of Oz, Aesops Fables, and more surreal adventure-type books.

By the end of the book the characters come together and you manage to piece together the plot: A bunch of bad guys have discovered a way to trap people in virtual reality while their real body falls into a coma. They plan to build their own virtual reality, called Otherland, one where they can alter reality. They plan to trap humanity in Otherland and become gods. The only one who can stop them is the guy with amnesia, Jonas. We’re not sure how yet.

So the main characters and their sidekicks – a British vampire; a kid who only talks in annoying techno-babble; a faithful archer; an almost-sentient robot – nine in total, just like The Fellowship of the Ring – set out to traverse the depths of this crazy virtual Otherland, find Jonas, and save the world. Oh, and one of them – you don’t know which – is hacked by the serial killer, who is planning to kill them all and seize the god-like powers for himself, waiting to strike at any moment.

The book is an epic setup of a thousand pages. It’s complicated, requires patience, and is not for the casual reader. I’m looking forward to book two.

Grumpy at the grade 7 advanced recertification.

I took my USSF Grade 7 referee certification this morning. First, an explanation of what that is. Almost every soccer referee starts at Grade 8 (under age 13 starts at grade 9). It’s just an arbitrary number. Theoretically you can get to Grade 1.

You have to get re-certified every year. It’s just a multiple-choice test. It costs money, something like $45. But for $25 more, twice a year somewhere in the state you can take the ‘advanced re-certification’. You take the same written test, just get an 80% instead of the usual 70%, and you have to take a fitness test.

I could not find consistent information on what the fitness test consisted of. I found other states guidelines and used those as a basis for my expectations. You have to do some 40m sprints, a 150m dash – “no problem” I thought.. Turns out Wisconsin is a lot tougher than Nebraska.

Instructions were to be on the starting line, ready to sprint at 8am, at Waukesha High School. This meant a 5:30am wake-up time for me. ūüôĀ I managed to survive getting out of bed and actually made it there on time and was proud of myself. Then they announced what we would be doing. It was to be SIX 40m sprints, with a timed break inbetween, and then SIXTEEN 150m sprints. SIXTEEN. Not Six. You had to do each in 35 seconds, then walk 50m in 40 seconds, and then do it again. If you missed one, just one, you failed. No second attempt, no extra lap, just. Done. Only 8 of 13 passed. This one poor old guy kept going even after he failed… This test discriminates against experience.

I passed (The sprints were easy for me, but the last 2 dashes were brutal – My stamina is horrible if I’m not chasing a ball). Then it was on to the classroom part of the test. Once again another classroom environment that does not appreciate questions Or alternative points of view. It probably did not help that I brought in Jello Shots (true – they were leftovers I had made for Halloween trick-or-treating, that didn’t get eaten because it rained and few trick-or-treaters came to my door. I brought the Jello Shots in, announced they were for anyone who wanted one, and was told “That’s not appropriate.” and to take them back out to the car.)

Let me give you a taste of what this class was like.

In soccer, the definition of a foul has, for as long as I can remember, required one of three things: careless, reckless, or excessive force. The definition has always been up to the referees to decide. Good judgement and all that. I’ve always taken them to be three different words for the same thing. After all, the consequences for the same are the same, they all fall into the same category of fouls, and the dictionary definitions of them are complementary.

A similar rule exists for yellow and red cards. Each has a specific criteria. For example, unsporting conduct (whatever that is) is a yellow card. Serious foul play is a Red card. These rules exist independently of each other. You can have a yellow card but no foul, or a foul with no card. Each is evaluated separately.

But in this class we were introduced to a new publication from USSF, one that turns this relatively simple rule into a muddy, sticky mess. We were introduced to this new publication with the clarification that this is NOT the “advice to referees”. That one is wrong and should be ignored. This one is the “Guidelines for referees”. Guidelines, not Advice. Don’t get them confused.

The publication is larger than the rules book. These ‘guidelines’ now clarify things by introducing a lot more new rules (sorry, not rules, just guidelines). They talk about ‘tactical purpose’ and what constitutes an ‘obvious opportunity’. But back to the careless, reckless or excessive criteria, the heart and soul of what constitutes a foul.

Now, with these new ‘clarifications’, careless means ‘not being careful’ and reckless means ‘complete disregard for an opponents safety’. Excessive force means force placing the opponent in a dangerous situation. In addition, BY DEFINITION, careless means no yellow card. Reckless now, by definition, means you MUST give a yellow card. Excessive force now requires a red card.

Definitions are all good and well, but the problems with these definitions are numerous.

First off, they contradict the existing rules for yellow and red cards. The list of offenses leading to a yellow (or red) card are well defined. ‘Being reckless’ is not one of them.

A similar problem exists for the definition of ‘excessive force’, saying that it is dangerous and therefore deserving a red card. The problem there is, the rules for direct vs indirect kicks also say that ‘dangerous play’ is an indirect (and by implication a less serious) foul. So which is it? A minor indirect kick? Or the most serious punishment possible, a red card?

Second, this secondary publication is called ‘guidelines’. Are those rules or not? Anyone getting a yellow card for a reckless play can simply put out the argument ‘where is that in the rules?’ It’s not. It’s in the secondary publication for referees. It may be official – but then why not put it in the rules? Why a secondary publication?

Third, the definitions defy common sense understanding of the words. Careless means reckless. Reckless means careless. Look it up in the dictionary. Excessive force could mean several things – any larger, or more coordinated player colliding with a smaller or off-balance player, thus resulting in the smaller player falling down, could be accused of ‘excessive force’. I’ve used excessive force myself, and I know it is something different than being ‘dangerous’. Using more force than necessary, and sending an opponent flying a little farther than you should have, does not mean its dangerous.

Fourth, the definitions include a tautology or self-defining logic. If I give someone a yellow card, then BY DEFINITION it must be reckless. So I can punish a similar foul two separate ways (And there are many reasons why I might punish one team or player more stringently than other), and when questioned why I gave player One a red card but player Two no card, all I have to say is “Oh that was excessive force.” or “Oh that was careless.” And what made it careless and not reckless? “Oh, because I didn’t give a card.” It’s a convenient dodge for referees to help them avoid explaining their decision. It’s circular logic, begging the question, and provides no real explanation.

And lastly is the simple observation I posed to the class: “Every five-year ever does not consider the opponents safety. They’re not capable of it. You’re saying I should be giving every kid a yellow card?”

I point these things out to the instructors and they get grumpy. One of the guys was on the USSF national advisory committee and could not give me a satisfactory answer for why these two publications are separate, or how to resolve the discrepancies. He claimed he saw no issues. The guy running the clinic and who is the head assignor for all referees in Wisconsin became visibly upset when I pointed out the flaws in logic. His assistant stepped in a gave a lecture how we as referees are required to “enforce the rules, regardless of our personal opinion”. He kept looking at me. I asked “Why do you keep looking at me?” His response: “because you’re driving me crazy!”

I may be a bad ref, but I’m an expert at not knowing when to quit. Seeing the distress of these poor instructors, I suggested an alternative definition, one that I was taught years ago, a definition they used to teach, and a definition that both makes sense and is compatible with the existing rules.

My alternative definition, which I tried to offer as politely as possible, was the concept of intention. A foul that was merely clumsy, where the defender was genuinely trying to play the ball and not contact the opponent, and either misjudged his own skill or the skill of his opponent, and instead UNINTENTIONALLY kicked the other player, should be merely a foul; no yellow card.

If instead the challenge was an intentional foul, then it should be a yellow card. This falls under the category of unsporting conduct. Any intentional foul, regardless of its severity, should be considered unsporting. Makes sense to me. (And of course a red card is something extreme, not just excessive but downright unconscionable. You’ll know it the instant you see it. I don’t like that definition but it seems to be true, and was the guideline given by the instructor. It’s so rare its not an issue. The argument here is between yellow cards and no cards.)

The instructor, again, didn’t seem to appreciate me. He stepped forward and asked “How do you know what their intention is? Can you read their mind?” I don’t know if he was serious or being a smart-ass, but this is a question I’ve thought about and although the question surprised me, I had the answer ready.

“Yes”, I said. “I can. I can look at their eyes, I can read their body language. Yes I can tell what’s going through their mind. That’s my job. Every call I make I’m judging their intention.”

Nervous laughter rippled through the class. My answer might have been funny but I wasn’t joking. It’s true – I do read their minds, to the best of my ability anyways. I tried to clarify this. I explained that the concept of intention is already used in the wording of the rules. The word “careless” has the word “Care” in it. It implies their intention, or lack thereof. The handling rule explicitly uses the word ‘intentional’. Another rule about yellow cards says if someone fouls ‘deliberately’. Yet another guideline uses the phrase “With the tactical purpose of breaking up a promising attack”. Purpose, deliberate, care – all different ways of referring to someone’s mental thought process, or intentions.

And yet the instructor scoffed at me! He pulled out the rule book and read a rule aloud. “There’s no mention of intention” he stated. “Purpose!” I countered. “Purpose means the same thing!”. He shook his head, make a derogatory sound, and turned away. Scoffing!

I was miffed. I don’t know what’s so controversial about what I said, or why the lack of acceptance.

Then we got to the actual test. It was a group test, which means we could help each other (in groups of 3 or 4). You’d think that would make the test easier, but it did not. Everyone asked everyone else what they thought, and it was rarely unanimous, and that led to debates, which lead to wording and interpretation. Sadly, I opened my mouth in these crucial moments to suggest alternative interpretations. (I’m really good at multiple interpretations of words.) All were suggestions and questions, and I totally expected to be vetoed down (I just wanted to be thorough or careful), but that led to me being rejected outright when we came to a question I was certain of the answer.

Question: “Someone kicks a direct free kick directly into their own goal. What’s the call?”
Answer: “Corner kick”.
I was certain of this one. The correct call is a corner kick for the other team. You cannot score on yourself from a dead ball/free kick. I stated as such, and to my dismay, my partners went “mmmm, I think it’s a goal.”
“No, I am certain about this one. its a corner kick.”
“Mmm. It’s a goal.”
“No, I’m not guessing here. I’m 100% certain.”
“Mmm, that doesn’t make sense.”
“I know, but that’s why I remember this rule. The correct answer is C. I’m positive.”
“I think I’m putting down A” (Chorus of agreements)
“No, I’m POSITIVE its C”
“Well you can put down what you want.”

I used the strongest language I could, expressed the most emphatic opinion I was capable, and was dismissed. Well then, screw you guys too. You just keep listening to the pretty girl and putting down what she says – I’m gonna put down the correct answer.
So from that moment on I just ignored my partners.

It was the third hardest test I’ve ever taken. The first was in my “Advanced algorithms” class (I got a 58%, the third-highest(!) grade) and the second was Organic Chemistry II, Where I got a D (64% if I recall). This test I got a 72%. Passing required an 80% or better. I failed.

Turns out, it didn’t matter! After the instructor read the correct answers, he announced everyone passed! He then took the questions and our answers back, without going over what we got wrong or why we got it wrong. It was bullshit. I only remember a few questions I got wrong; whatever I managed to remember in the two minutes I had to review the correct answers. And what I know I got wrong I’m not certain what the correct answer was, or why.

Here’s the online form we used for the pre-test. As you can see, it doesn’t show the correct answers and is, ergo, useless. https://docs.google.com/forms/d/17HDgXlTWFfIfqmD9-j_MKUUvvrgmultz3BESVi20118/viewanalytics?usp=form_confirm

I think they did this to cover their own incompetence. Ok, not incompetence – their mistakes. They made a lot of mistakes. Here’s what I remember in those initial minutes.

After the test they handed out copies of the 2016 Rules of the Games (Yippee, I can replace my battered 2012 copy) and I immediately looked up the answers to what I could. They got several answers on the test wrong. For example, the question “Which of the following is a requirement for penalty kicks?” Answer A) read “The keeper must have both feet on the goal line”. I stopped right there and wrote “A” because I know that is a requirement. The correct answer was supposedly C), “all players except the kicker and goalkeeper must be behind the penalty mark.” That is also true, but then that makes the answer to the multiple choice both A) and C). I asked my partners what they had, and they all said they had C). It was supposedly not A) because keepers can, so they said, stand on OR BEHIND the goal line. Wrong. I looked up the rule, it says they must be on the goal line. (I remembered this because last year they modified the rule (For high school rules) to add the phrase ‘facing forward’. The idea of a goalie sticking his butt out towards the kicker intrigued me so I made a special study of the rule).

Another answer the test got wrong is the answer to ‘what happens if someone other than the designated kicker steps up and kicks the ball into the goal’. They said it was an indirect kick for the other team. False, because the rule specifically says if there is an infraction and the ball goes into the goal, the kick is retaken. Emphasis on “into the goal”, which was specifically stated in the question. The instructors seemed to have added that phrase unthinkingly.

There was another one saying a player who steps into the goal (beyond the goal line) is “leaving the field without permission” and is considered an “outside agent”. Interfering with the play then falls into the ‘outside agent’ catchall, meaning its a drop-ball. I disagree, because players constantly leave the field in the normal course of play, whether running after the ball or just absentmindedly stepping off. Technically it’s leaving the field without permission, but hence the concept of “implied consent”. It’s not a phrase anywhere in the rules, but that’s what it is: implied permission. He’s not an ‘outside agent’!

There were several more ‘iffy’ questions like this, like should you card a player who is about to leave the field with the referee’s permission but then jumps into play and plays the ball. They said yes, its a card; its unsporting conduct. I argued ‘no, it is not a substitution until he actually leaves – before then, it doesn’t matter what happens.’ Their counter-argument was the question says nothing about ‘substitutions’ or that play had stopped. I asked “When else does a player get permission to leave the field??” but did not get an answer. Iffy.

Still, I was disappointing in my performance. Hostile classroom non-withstanding, I should have done better. I’m grateful to the instructors for passing everybody. I would have preferred an explanation, and a chance to see what I got wrong (I hate being wrong!) but it didn’t seem to bother most everybody else so… go with the flow.

I’m a grade 7 referee! Yey! (Which means nothing other than bragging rights)

cubieboards part 2

It turns out cubieboards are unstable at higher CPU load. Cubian desktop from my prior post kept crashing on me. When I tried fancier stunts like auto-login and auto-execute programs, it would crash beyond repair. After several re-installs, I determined I had to go with a different operating system.

Not wanting a completely bare-bones version of Linux, nor a fancy Desktop X with all the bells and whistles, I went with something called cubieez. Written for cubieboards, it is lightweight, stable, and has a graphical user interface.

The steps required to get the hardware pins (GPIOS) to work were slightly different than my previous post, so I’m going to document them here.

My steps:

  • Install cubeez (SD version)
  • Buy an SD card and a way to attach it to your Windows PC
    Download Cubieez
    Download Win32DiskImager
    Using Win32DiskImager, write the cubieez image to the SD card. Put SD card in cubieboard and turn it on.

  • Set load to desktop: no
  • Right click anywhere or use the main menu and open a terminal.
    Type in Cubie-config and find the settings to turn off the desktop. From here.

  • Set up auto-login
  • This is just changing one line in /etc/inittab. Read here.

  • Install sunxi-tools
  • Sudo apt-get install sunxi-tools (for bin2fex and fex2bin programs)

  • Edit FEX file
  • follow the steps here
    To decide what to add to the file, read here and here.

  • install gcc
  • sudo apt-get install gcc build-essential

  • Write, compile and test c code
  • sudo nano test.c
    compile and test c code
    Read here and here. You’ll need the necessary wires and diodes.

  • Auto-execute your c program
  • in /etc/profile, add 2 lines at the bottom:
    modprobe gpio-sunxi
    ./test

    (where test is the name of your c program)
    reboot (sudo reboot) and your c program should automatically execute

Saving your work

I was sick of re-installing and losing all my code, so if you want to save your code in case of a crash or wipe, you can save everything online in a GIT repository.

Go to github.com and make an account. Login and create a repository (choose to automatically use the default readme). Get the link to your new repository (for example, mine was this: https://github.com/paj006/cubieboard.git)
On your cubieboard install git if not installed (Sudo apt-get install git), then type these commands:
git config --global user.name "YOUR NAME" (use account name)
git config --global user.email "YOUR EMAIL" (use account email)
(From here)
mkdir git-repo
cd git-repo
git clone
“LINK TO REPOSITORY”
Copy your code to the repository folder with
cp /root/test.c .
cp /root/test .

(where test is the name of your file)
Add it to your project, commit it, and push it online
git add .
git commit -m "a message"
git push origin master

(From here and here).
Your code is now saved online and can by copied back to your computer by doing
git clone "LINK TO REPOSITORY"
You can view all my code here

A complete beginners guide to Cubieboard 2

I just got my hands on a cubieboard, and all the potential that it comes with.  Like making your own portable play-any-video-game system!

mamebox

 

Holy cow!  Write a program, plug it in, and BOOM amazing awesome stuff happens!

Well, not quite.

I had a hard time getting going with my cubieboard, so here is a quick guide on cubieboard programming.

First off, what is a cubieboard?  I had never heard of it before, and could have used a brief explanation.  Basically it is the computer that drives tables and smartphones.  Its a tiny programmable computer with hardware pins you can hook up to anything.  Maybe you have heard of its smaller cousin, the Raspberry Pi.  There is a google book on the topic, well written for complete beginners.  Check it out here.

So a cubieboard is a computer, right? ¬†So I did what you do with any new computer: I eagerly plugged it in¬†and looked for the power switch. ¬†Or tried to. ¬†Let me tell you right now, it doesn’t come with a power cord and there isn’t a power switch. ¬†It goes on when you connect a power source. ¬†Fortunately my laptop power supply worked (if you don’t have one, try here). ¬†Unfortunately, my cubieboard did not come with any operating system.

It’s supposed to come with android pre-installed. ¬†Mine didn’t, for whatever reason. ¬†Turns out it didn’t matter, because you are supposed to install a different operating system no matter what (apparently android sucks?).

Install an operating system?? ¬†Don’t panic! ¬†It wasn’t that hard.

Back in the old days, you had to load a CD with an operating system, fiddle with BIOS settings to load the CD on boot, reset your computer, and go through a several-hour long process.  A cubieboard is simpler and faster.

First you need a “MicroSD” card and a way to connect the MicroSD card to your regular computer. ¬†I didn’t have one. ¬†I had to run to walmart and picked up both for a total of $12.96. ¬†Plug in the MicroSD card to your computer and follow these instructions to copy Cubian to it. ¬†Cubian is an operating system specifically for cubieboards. ¬†It is a modified version of Linux. ¬†If you plan on doing any programming on a cubieboard you WANT Cubian. ¬†Do not follow other tutorials saying you should install Debian, or Ubuntu, or BootBerry. ¬†I tried those. ¬†Debian produced a devious flicker, and Ubuntu, while it looked very pretty and was easy to use, kept crashing after an hour. ¬†BootBerry, while written for Raspberry Pis, worked well, but did not provide an option to install Cubian. ¬†Cubian has everything preconfigured. ¬†You won’t need to muck around with FEX files or kernels (more on this later).

This guide assumes you are going to use the pins on the cubieboard, to hook them up to buttons or sensors or whatever (thats where the true power of a cubieboard lies).  There are a few things you need to know about the pins on the cubieboard, things that took me a while to figure out.

First, pins are NOT GPIOs.  Pins are the physical bits of metal sticking out of the board.  GPIOs are abstract things that must be created.  They CAN be pins, but for the cubieboard you have to assign a pin to a GPIO.  (Click here for info on GPIOS).

Second, there are 96 pins (count em) but you can only use¬†60-some of them. ¬†Why? ¬†I’m not sure. ¬†Some pins carry pure voltage, or connect to ground, which is why they cannot be used as inputs/outputs, but that only explains about 5 pins. ¬†The other 25+ I have no idea about.

Third, pins and GPIOs have a different numbering system.  Pin 1 is NOT the same as GPIO 1.  In fact, Pin 1 on the cubieboard is a direct connection to the power supply, so you cannot use it as a GPIO no matter what.

Fourth, you must assign pins to GPIOs, by something called a “Fex” file, sometimes referred to as “script.fex” or “script.bin”. ¬†This is done automatically if you installed Cubian.

Fifth, the pins (and by proxy, the GPIOS) have weird messed-up names. ¬†Pins, while numbered, have names like “CSI1”, “DEF”, “VCC-1”, etc. ¬†Usable pins, pins you can assign to GPIOs, have names like “PG3”, “PD5”, “PE9” (they all start with P).gpio_defination_large[1]

Sixth, you need to know all the previous 5 steps. ¬†Sorry, it’s true. ¬†You need to know the names of the pin, the pin numbers, and what pin corresponds to which GPIO. ¬†Fortunately, there is a handy chart found here.

 

 

The bottom line is, Cubieboards are DUMB. ¬†They cannot detect their own pins. ¬†They don’t know which pins are inputs or outputs. ¬†They know nothing. ¬†You need to install an operating system just to get a cubieboard to do anything, and the only free operating systems (Linux, Android) are not meant to work with physical pins. ¬†If you don’t use Cubian, you would have to install special software (called a Kernel) to get the Operating System to access the pins, then you need to install special software to access the files that access the pins, then you need to edit the files – its a pain. ¬†If you really want to know more, click here¬†and here.

All this was backround information to the big secret: pins on a cubieboard are accessed via files.  Edit the file on the operating system, and the voltage on the cubieboard changes.  Or, if its an input, change the voltage and the file changes.

This took me a day to realize, so I’m going to repeat it. ¬†All those tutorials on programming GPIOS and code snippets are about one thing, and one thing only – someone has invented a way to access each GPIO on a cubieboard by modifying a regular file.

Try it yourself, right now.  Assuming you have cubian installed, type in
echo timer > /sys/class/leds/blue:ph21:led2/trigger
and your cubieboard should start blinking (the blue light). ¬†Here is the full article. ¬†If you don’t have cubian you will have to install a package called sunxi-leds.

What’s going on here? ¬†Well, if you know Linux, you know that “echo” just outputs¬†some text – “timer” is a special code word – and the “>” symbol just means ‘write (or “pipe”) to this file’. ¬†The file is called “trigger” and is in the /sys/class/leds/blue:ph21:led2 directory. ¬†Yes, that is a valid directory name in Linux. ¬†So we are putting the word “timer” in the file called “trigger” and the cubieboard automatically starts blinking! ¬†It’s brilliant, and works for every GPIO on the cubieboard.

Unfortunately, these special files do not automatically exist.  They do for the above example, the blue blinking light, and the green light, but for everything else you must create them for each pin or GPIO.  So here are the steps to enable a hypothetical GPIO #1:

In your linux command prompt, type:

echo 1 > /sys/class/gpio/export

(Note that echo 1 corresponds to the number of the GPIO you want to use. ¬†If you want to create, say, GPIO #21 you would type ‘echo 21’ instead).

This is the command that creates the magic files that connect to the pins. ¬† If you type ‘ls’ in the command prompt, you will see a new directory created. ¬†Unfortunately, the new directory is named after¬†both the GPIO you created¬†and the name of the physical pin. ¬†So the new directory will be called something like “gpio1_pg3” where the first part is the name of the GPIO (which you created) and the second part is the name of the pin (which you have to memorize from the chart). ¬†It’s stupid, but what can you do.

Now decide if this GPIO is going to be an input or output.  That is, do you want the voltage going to this pin changing based on what a computer program is telling it what to do (output), or is the pin going to receive voltage from some external source and a computer program detects it (input)?

If it is input, type
echo “in” > /sys/class/newdirectory/direction
or for output,
echo “out” > /sys/class/newdirectory/direction

Now you can either set the value of the pin/GPIO directly (if it is output) or detect it using the cat command (if it is input).

To test this you will need an LED/diode and a small jumper cable. ¬†Connect pin #1, which is a direct connection to the power supply, with your now GPIO pin#1 (named ‘pg3’, fourth from the top, right-most row. ¬†See diagram.) ¬†Connect the short end of the LED/diode to pin 1 (the direct voltage) and the long end to pin ‘pg3′(again, 4th from the top right)

.  2015-09-01 23.19.52

Then in the command prompt, type
cd /sys/class/gpio/gpio1_pg3
echo 1 > value
and the LED/diode should light up.  (Picture)2015-09-01 23.23.27

Amazing, right?  By now you should realize that
echo 0 > value
will turn it off.

If you’ve made it this far, and understood everything up to this point, all you need to do is understand how to do everything programmatically. ¬†I’m trained in the C language, so I’ll do my examples in C. ¬†Most examples out there are in Python. ¬†Use whatever programming language you prefer.

You’ll need to know how to create and compile a program in C. ¬†So install the C compiler, then using your preferred text editor (I prefer the simple nano) create your C program ( called it ‘test.c’), then compile with the command gcc test.c, then run it by typing ./a.out. ¬†Here is my complete program to turn on the LED:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main(){

FILE * fp;

if((fp = fopen("/sys/class/gpio/gpio1_pg3/value", "w")) == NULL){
printf("File not found");
exit(1);
}

fprintf(fp,"1");
fclose(fp);

return 0;
}

The key is using the fprintf() command.

To detect if a pin voltage has changed (meaning the pin is an input) you do a similar process РOpen the file, and check if the value is 0 or 1.  You can do this in linux by going to the directory/file and typing in cat value  (See video).  1 is the default, and when you hook up the pin to ground (which is something like pin #20) the value will change to 0. (note this is different for output Рoutput you attach the pin to VCC (pin #1), not ground).

In C, use the fgetc() command:

   
     int ch;
     fd = open(filename, O_RDONLY);
 
	ch = fgetc(fd);

	if (ch != '0') {
		//stuff
	} else {
		//stuff
	}
 
	close(fd);

Hope that helps beginners with cubieboard.  Good luck!

 

EDIT: turns out there are stability problems with cubieboard2 and cubian. Read about my adventures here in part 2.

Review of ‘The City’ by Dean Koontz

The City starts with an intriguing proposition: The soul of a city has decided to take human form and go around trying to help people. Specifically, its trying to stop a serial killer by showing prescient dreams to a little boy. You, the reader, don’t know this at first. You only know what our young protagonist, Jonah, in the form of a first-person memoir, chooses to tell you.

It’s a typical Dean Koontz novel, in that it has all his trademarks: dreamlike out-of-body moments by its main character, an evil serial-killer villain with seemingly supernatural powers, a shocking death of a beloved character, and of course, an heroic dog. What makes this book stand out from all his others is the secondary characters. A typical book has its main character, its bad guys, and then any secondary or ancillary characters are there merely to further the plot – to provide information or emotional context in which the main characters develop. In The City, the more interesting characters are the secondary characters, the cast around which our young hero and the serial killer revolve.

None of this is obvious at first. You think you’re just getting a story with our hero being a little kid. You might even think its a badly written book, boring, as there’s a lot of scenes that seem pointless. Why these moments at the community center, playing piano? Nothing is happening, geez, get with the story. The significance only becomes clear much later, even as late as the last few page of the book, when Mr. Yoshioka reveals he was secretly following and had a spiritual awakening while furtively listening.

Perhaps a comparison to another book will help: Remember Boo Radley in To Kill A Mockingbird? He’s the one you remember, not the young hero. I think Dean Koontz has stole a page out of Harper Lee’s book, so to speak, by telling a story that is really about the secondary characters – the regular, ordinary lives of a city and their day-to-day struggles. Hence the title, The City.

It’s not a new idea – Les Miserables did it long ago – but Dean Koontz manages to strike the right balance between tawdry and romantic. It’s not the actions, or even the people, but the person. The single mom singing at a nightclub, the taxi driver dreaming of a better life, even the paranoid janitor who teams up with the serial killer, they come alive.

This is another thing I found unique in The City, at least for a Dean Koontz book, is the bad guys are not wholly evil. Dean Koontz typically writes about evil like no other, and as part of his craft, his bad guys are truly despicable people. They bring a chill to you just being around them. In The City, there is the one serial killer, but he’s not the one Koontz writes about. You don’t get to hear his story directly. Instead you get the story of his ‘minions’ – the two or three other lowlifes that have taken up the same cause as the serial killer. The crafty girl who is just angry at the world. The deadbeat dad who at the end turns out to be just a confused man who thought he was doing the right thing.

This character portrayal turns The City into a sort of mystery novel. It’s backwards from the typical mystery. Usually mystery starts with a crime and you have to figure out who is the bad guy. Here they start with a bad guy and an apocryphal dream, and you have to figure out what the crime is.

In The City, something has changed in Dean Koontz’s writing. There is a message of hope. Its still got the trademark horror touch with the shocking killing, but on the whole this is a cheerful novel, a novel about good triumphing evil, not just one good guy winning the day.

It’s also literary. There are layers to it, and I’m actually going to go back and re-read it, something I rarely do, because there were scenes I didn’t understand the significance of until the end of the book.

What shoes should I buy?

Here were the 3 shoes I was looking at buying. The reviews are confusing and do not match what I experienced when I tried them on. They all 3 are very different.

The sketchers has a ‘rocking chair’ style bottom which makes moving forward seem very effortless.
http://www.amazon.com/Skechers-Mens-Run-Black-Running/dp/B00E4DJ4EC/ref=sr_1_1?s=apparel&ie=UTF8&qid=1432340803&sr=1-1&keywords=go+run

The Nike have a nice arch that takes the pressure away from the balls of my feet but I worry I might then have the opposite problem – hurting arches
http://www.amazon.com/Nike-Training-Running-Black-Athletic/dp/B0098G8F5E/ref=sr_1_2?s=apparel&ie=UTF8&qid=1432340909&sr=1-2&keywords=nike+free+5

And these are soooo comfy and have lots of padding at the balls of the feet and lets me wiggle my toes all the way down, but they are walking shoes, and I want to run with them!
http://www.amazon.com/Rockport-Mens-Walk360-Black-Oxford/dp/B00UNVM6RG/ref=sr_1_8?s=apparel&ie=UTF8&qid=1432341000&sr=1-8&keywords=rockport+walk

the end of an era

Well friends, that’s it. ¬†I’m finished. ¬†Kaput, fini, the end, whatever tired cliche you want – I’m through with soccer. ¬†I just got fired from my job coaching at St. Joes. ¬†This now makes three hard-core fails: The D license, Wilmot, and now St. Joes. ¬†I don’t even know why I failed, why people didn’t like me, why they didn’t approve of me or invite me back.

This brings about a crisis: is it time to quit? ¬†I think so. ¬†I’m failing at a fairly low level. ¬†My goal is to coach at least at college level. ¬†It’s extremely unlikely this will happen, meanwhile the heartbreak… its just not worth it. ¬†I ache in pain getting these cold emails from administrators. ¬†No response from Mr. Witthun, and I wasn’t even sarcastic or whiney this time. ¬†Success at soccer coaching seems to be more about who you know, not ability. ¬†I’ve never been good at managing people, only kids. ¬†Coaching in the real world doesn’t seem to be a good fit. ¬†And did I mention the pain?

I was really looking forward to coaching at St. Joes. ¬†It’s a challenge. ¬†I’ve never had a soccer team I had to work so much for. ¬†I know I whine about not winning more, but that’s minor compared to the ability to change kids lives for the better.

What kills me is never knowing why. ¬†Why why why why! ¬†Am I really that bad? ¬†I’ll never know, and striving pointlessly isn’t really my style. ¬†Did someone complain about me? ¬†That’s all I can think of. ¬†That or Mr. Whithun didn’t like my disciplining Neko. ¬†The kid can clean up really well and puts on quite a dignified appearance, seems well-mannered and respectful – perhaps Mr. Whithun just doesn’t believe, just can’t believe that he’s a foul-mouthed bully. ¬†Seems far-fetched but I’m grasping at straws here.

I’m so depressed. ¬†I was on vacation when I got the email, and it ruined my week. ¬†I know I’ll eventually recover but right now I’m in mourning. ¬†Soccer was my life, you know? ¬†It was the only thing I was ever good at. ¬†I was making a difference, helping kids and all that. ¬†Sigh. ¬†But it’s a competitive world, and coaches are a dime a dozen, and no one cares that I’ve been doing it for 20 seasons now… sigh. ¬†That’s all I can do now, just sigh. ¬†Sigh.

Now the good side:

I’ve been using soccer as an excuse for not applying to jobs. ¬†Now I don’t have that excuse any more. ¬†I can’t tell myself ‘oh no what If I get hired for this job, I am committed to coaching next fall, I can’t just bail on them, can I?’ ¬†So no more excuses. ¬†I’ll still look for coaching jobs, maybe even try for the D license again, but I won’t care anymore.

It’s a pity about my soccer book. ¬†That was my best chance to write a book. ¬†Can I really continue if I’m not actually coaching? ¬†Does this destroy my credibility? ¬†I was counting on the experience from this fall. ¬†Now I can’t. ¬†This question is undecided yet. ¬†I’ll leave the book on hold. ¬†Again. ¬†ūüôĀ

I can focus on going back to school. ¬†I was using soccer here as a reason to not leave town. ¬†Now I have nothing keeping me here. ¬†I’m free. ¬†No career in soccer means I’ll have to go get a new career. ¬†This programming thing isn’t working out. ¬†That’s all I had – soccer and programming. ¬†Both failures. ¬†Time to go back to college. ¬†I don’t see another answer. ¬†I’m so sick of school. ¬†Can sheer willpower get me through another two years? ¬†Gulp. ¬†We will find out. ¬†I think its too late for application deadlines for this year. ¬†That leaves next year. ¬†Maybe things will change between now and then but I doubt it. ¬†More time to build up enthusiasm. ¬†Go, rah rah rah, you can college, yeah, rah.. rah.. sigh.

Jupiter Ascending – final review

I saw Jupiter Ascending again in theaters, this time up close on the ULTRA screen.  Sitting up close makes it a bad movie.  You lose the big picture.  I sort of got to experience the movie how others might see it: a big blurry mess.

On second viewing, I see how the movie made a big mistake, and how the confusion I talked about in my previous post was created. A movie is a story, and this story lacked something called a “narrative imperative”, meaning the core of the story lacks a means from moving naturally from one scene to the next. Normally this is accomplished by the imperatives and motivations of the main character and her story, but in the case of Jupiter Ascending, she has no story. She has no ambitions. She’s Cinderella without a ball to go to. This is normal for a character piece, where the story *is* the character, and doesn’t need to go anywhere. But in an action movie, that’s bad. You need a story that moves.

The writers realize this and so invent a three ancillary characters to push the story along. In Jupiter’s case, there is the bounty hunters, the space cops (Aegis), and the Mercenary, Stinger. These three characters function to get Jupiter to meet all three Abrasax family members. So far so good. The problem starts when the writers made these ancillary characters more interesting than the main character, Jupiter. Jupiter doesn’t have a backstory. She doesn’t look interesting. All these ancillary characters looked phenomenal, blue-haired Anime girl, personal invisible hovercrafts, blue-skinned guys, cool sonic guns, the Aegis with its aliens and chain of command, and Stinger, ex-marshal who lost his wings. So right away you get the sense they are important when they’re really not.

Still not a deal-breaker. Every character is explainable, you just need an introduction. The more interesting or complex the character, the longer the introduction. They introduced Stinger the proper way, name, emotions or motivation, even a title. Stinger was the retired ex-commanding officer. Audiences got that.

But the other two characters, the blue-skinned bounty hunters and the Aegis, the writers completely failed in their introduction. There were no names, no sense of backstory, and no motivations. They tried, but it was in exposition and way earlier in the movie. There was no easy way to link what they were talking about with the actual characters once you see them. Even if you did, there was no emotional reason to care. The introduction failed.

So when the characters started affecting the plot, you get confused. Something feels wrong. They all tried to kidnap Jupiter, and they all first appeared at the same time. So we’ve got several very detailed, interesting characters who were not properly introduced, all manipulating the action and the plot all at the same time. To further complicate things, they all were betraying the person who originally hired them. It was minor, but to audiences who were desperately trying to figure out what these characters’ motivations were, the added complication was just too much. It was unnecessary. It was too ambitious.

I see more clearly that the movie was more of a character piece, not a story. The character, however, was NOT the main character, Jupiter. The character was the world. The fantastic, futuristic, gorgeous world, and the people who ran it, mainly the Abrasax family. I thought at first maybe the movie was about the three members of the Abrasax family, since each one was very unique, but upon thought I see that they were all the same. They all wanted the same thing. They all wanted Earth, they all wanted Jupiter, and they all wanted to screw up each other. So I think they were all just three parts of one single character.

Jupiter was just the vessel from which the characters were displayed. The writers couldn’t just *show* you the world. So they invented a character, Jupiter, to go from place to place and have things happen to her and by doing so show you the world. To get Jupiter from place to place they invented the 3 ancillary characters, one for each member of the Abrasax family, namely Stinger, The Aegis, and the unnamed bounty hunters. And then they made those ancillary characters too interesting and botched their introductions.

It would have been such an easy fix, too. All they needed was for Jupiter to ask “Who are these people giving us a ride?” while they were first on board the ship and *then* Caine should have explained that they were Aegis, basically space cops, upholding the laws and protecting the royalty. Not while they were walking around on Earth.

Same with the bounty hunters. All they needed was Jupiter (or Caine, asking Stinger, or vice versa) to say “Who are these people with guns surrounding the house?”
“Oh they seem to be bounty hunters, trying to kidnap you and sell or trade you off for profit. I ran into them earlier outside the fertility clinic. Somehow they found out there was untitled royalty on Earth and are after you. Or maybe someone hired them. Stay away from them.”

That’s all it took to do a proper introduction. Instead they neglected it, because they thought they were unimportant. Sorry writers, its not whether *you* think they are important, its whether the *audience* thinks they are important. You made them look cool and had all these cool gadgets and details so the audience thought they were important.

In the final estimation, a movie is just a story. Jupiter Ascending did not have much of a story. Aliens coming to conquer the earth, blah blah, it’s that movie Independence Day all over again. Stories have been built on less. It still could have been good. But then the rest of the story should have been how to save earth. It needed to hint how that was going to happen, foreshadows and conflict, how the characters motivations change and adapt to the exigencies created by this imperative. Instead the story strayed. It became just a vessel for the Wachowskis to show off this fantabulous world they created with its wacky elephant pilots and tri-sexual (men, women, robots) bureaucracy and reptile-humans that descended from the dinosaurs of earth and amazing technology and oh yeah its insane royalty.

Only at the very very end did they move the focus away from Milo Kunis and all the visuals to the heart of the matter – The Story. Saving her family, saving earth. She throws down and shatters the document signing away her claim to the earth, and only at *that* moment, only then did the story really begin. They should have done that scene, that showdown between her and the bad guy, earlier. They could have done it again at the end if they wanted. But until that choice, that struggle, that motivation, and the imperative that runs a story, becomes clear, there is no story.

Final Grade: B+