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!

 

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+

Jupiter Ascending: A defense

I’m going to do this review a little differently because there are so many bad reviews out there, bad reviews about a movie I thought I would hate and instead loved.  Just google “Jupiter Ascending Reviews” and the entire page will scream at you how Jupiter is a colossal mess.  This is not abnormal for good films, but what made Jupiter a little different was that I could not find any good reviews.  Not a one.  Even rottentomatoes.com, which consistently over-rates movies, gave it a 22%.  So I figure no review I write could possibly succeed without addressing all the negative reviews.

 

I first need to say that this is a space shooter.  If you don’t like action movies with guns, or sci-fi, you won’t like Jupiter.  I get that.  Completely reasonable.  What’s not reasonable is Rolling Stone calling Jupiter an ‘unholy mess’ or a ‘shambling fiasco’.  Ebert calls it ‘bland’ and ‘listless’.  NYTimes calls it ‘mildewy’ and says there were no believable human emotions.  Chicago times called it the worst movie of 2015.  More comments like ‘tired, reused visuals’ or ‘boring music’ make me think these people were not watching the same movie I did.  And so, to all those reviewers who were watching and asked themselves ‘what is happening right now?’, this is for you.

How could you not follow the plot?  Were you not listening when they explained the plot five different ways?  When she straight-up asked ‘why are they after me?’  How her genes matched, how they have an almost spiritual relationship with royalty, how she is heir to half the galaxy, how she looks just like the old queen – did you really miss ALL those explanations?   These explanations weren’t even convoluted.   They were just a few simple bits of exposition given their own brief scenes after a firefight or a rescue.  The writers went out of their way to hold your hand and if you still don’t understand anyone’s motivation, that’s your fault.

Yes, I myself don’t know what every character on the screen was doing.  There were many characters, but most were minor.  I missed the explanation for one or two while I was in the bathroom – but even having missed their introduction, I can still extrapolate.  That small ship that picked up Caine from floating around in space?  At first I was like ‘that is too convenient’ but then I realized they were his ex-space cop friends and knew Caine was in trouble and they were looking for him.  They appeared earlier and had just stuck around.  Not complicated.  And that was the only thing I didn’t understand.  Minor.

Too much was happening?  Too much not explained?  It’s a sci-fi movie.  They have unlimited technology.  They can virtually walk from planet to planet, learn anything instantly with that chip in their neck, create holographic worlds with a flick of their hand.  That little box he kicked out into space with him?  That was the spacesuit.  No, I know it didn’t look like a spacesuit.  Did it need to, for you to understand it molecularly rearranged itself around him when he pushed the button?  It was a new concept for me too, but instead of complaining how it was confusing I was awed by the genius of the simplicity and the smooth on-screen execution.  Give that a try.  And go watch a few episodes of Dr. Who.

You couldn’t follow the plot?  There were only 3 main characters:  The good girl, Jupiter, the good guy, Caine and the bad guy (and family).  Sean Penn?  Friend of good guy.  Russian people calling good girl on cell phone trying to get her to do strange things?  Family.  Creepy guy who never blinks, creepy girl always talking about immortality, charming prince who wants to marry good girl, weird talking dinosaurs?  All bad guy and family.  Blue-skinned guy and blue-haired girl shooting at Caine?  People hired by bad guy.  What more do you need?  Where was it complicated?  Was it the fifty different types of aliens?  Go watch star wars again and don’t look at the main characters.  Go watch any Sci-fi.

All the chasing and shooting and flying and backgrounds blowing up was loud and trashy and tasteless and boring?  WRONG.  It was freaking awesome.  He’s got roller-blade hover boots.  He’s got an arsenal built into his body.  He’s impossible to kill.  How would *you* demonstrate those things?  I’d have a lot of flying and chasing and shooting and blowing things up in the background.  Have you seen superman?  It’s the same as superman but with more guns.  Do you not like superman or cool sci-fi guns?  Oh, you like them?  Then don’t trash the movie because they had the brilliant idea to combine the two.

Boring music?  Unappealing visuals?  What the !@%* are you talking about?  The music was typical star wars and star trek music, you’re right, but maybe you aren’t aware that star wars and star trek music is FREAKING AWESOME.  Go watch the movie again.  Go watch the scene where our heroine Jupiter meets the sister of the royal family.  Where she explains Jupter looks like her mother.  Jupiter asks about her mother.  At that point, LISTEN.  Listen to the musical tone slowly turn minor, quieter, and the moment the sister says ‘My mother and I did not really get along’, the music at that point introduces a bell. A lone, quiet, tolling of a bell in the background.  With that single musical note from a single bell, the audience suddenly realizes that this sister knows who killed her mother, maybe even did it herself.  It’s not in the dialogue.  It’s not in the face expressions or the acting.  That information is in the music.

Unappealing visuals?  Really?  Really?!  Show me one moment of boring in the entire movie.  ONE. I dare you.  Show me a single freaking wall in the background that isn’t elaborately etched or textured.  There isn’t any.  The amount of care and detail poured into every single shot, even as they are zipping around in exploding hovercraft, ESPECIALLY as they are zipping around in exploding hovercraft, was exquisite.  It rivaled the detail put into Lord of the Rings.  It was even better, because it had the advantage of using CGI.  Did you notice that when Caine brought up his shield it had veins in it?  It was alive with electricity.  Or the little virtual console in his glove that he used to control the portals he had placed in the floors?  The buttons at his fingertips weren’t just generic glowing green buttons.  They had little virtual circuit boards leading to them.  I noticed them (and thought “Ridiculous!  Still using silicon-based technology in the billionth century?”  :))  I appreciated it because it was visually appealing and oh yeah INCREDIBLY DETAILED.  If you didn’t see anything visually appealing the entire movie then you had your eyes closed.

The ships appear to be made of gold and glass.  They are gorgeous.  They are art.  Did you notice there are no joints on any of the robots?  No wires, no hoses, nothing ‘attaching’ anything to anything else?  Yet moved and flowed as if there were real, solid, joints?  They weren’t hovering like the hover effects in Star Wars.  They were rock solid, attached as if by steel but without all the friction.  Don’t you realize that that sort of visual is a unique, original creation in the history of Sci-fi?  Every other ‘force field attached’ object has always had something to let the audience know ‘this is a force-field attached object’.  Something glowy or showy or gaudy.  Remember the hovercrafts in star wars?  They slowly bob up and down, floating.  They recoil as you jump into them.  Did you ever think how stupid that is?  Master of gravity and you can’t make something that sits still?  Star Wars is afraid of having its technology being too subtle.  Jupiter Ascending has no fear of that.  Clear, plain, subtle negative space to emphasize how much technology was taking place in those gaps.

The technology in Jupiter Ascending was beautiful.  It made me cry.  The shimmering, peaceful transport beams ascending into the night sky to an invisible ship floating above the Sears Tower.  The heavenly portals the ships create.  The personal hovercraft of kick-ass ridden by the blue-haired anime chick that turns invisible so quietly and slowly it is a character in itself.  Every ship, every robot, even the gay C3po-style personal assistant with his fat metal pistons where his ears should be that twitched in and out to show his emotions, was beautiful.

The acting and emotion was bland and stilted?  Maybe.  Since when did we expect great acting from a sci-fi movie?  It was ten times better than the acting in Star Wars or Star Trek, a hundred times better than most action movies, and a thousand times better than Twilight.  I actually liked the acting.  Let me explain.  There’s one scene with Jupiter and Caine in the alley, after days of bureaucratic legalize claiming her title.  She’s officially royalty, and Caine, Channing Tatum, addresses her as “Your Majesty.  She leans in, and then there is a moment.  Caine does this thing with his jaw.  He wants her, but knows it’s wrong, and doesn’t particularly like himself, and still controls himself.  It’s pretty darn hard to pull off boy-scout sincerity, especially while playing a hired killer, but Channing Tatum does it.  Maybe where I saw honest respect and an internal struggle, you just saw bad acting.  That’s understandable.  But realize there might be a different interpretation.  It’s all about the jaw twitch.

Comparison to the bad acting of Natalie Portman as Princess Amidala in Star Wars is uncalled for.  I love Natalie Portman and I’ll be the first to say that was some horrible acting.  She’s ruler of a nation, meaning she’s got some back story, yet only manages to show one emotion?  That’s just bad.  Whereas Milo Kunis as Jupiter doesn’t have a back story and she manages to show at least three emotions.  :)

Also keep in mind she’s nothing.  She’s a poor serving wench suddenly become princess and thrust into intergalactic intrigue.   She’s Cinderella.  Does anyone expect good acting from Cinderella?  No, and I’d be worried if there was because she’s not a complex character.

Also keep in mind that editing changes things.  I had the sense they edited a lot of the emotional bits out of the movie.  Like, the whole wedding scene happened way too fast.  One scene he’s proposing and almost immediately they are standing at the altar?  That’s editing.  It didn’t really happen like that.  I assumed that days or weeks had gone by.  The same thing applies to character reactions.  Just because they edited out the reaction shots doesn’t mean they didn’t happen.

Which brings me to the pacing.  Certain bits of the movie felt rushed, I’ll give you that.  That does *not* mean the Wachowski brothers did not know what they were doing, or that it makes the movie a sloppy mess.  If you compare it to other Hollywood movies, sure, I can see how it felt sloppy.  You don’t just rush into a wedding either in real life or in telling it.  So it’s understandable if you think the director made a mistake.  I did not.  I saw it as a deliberate choice.  The reason, in my opinion, is that they didn’t want the movie to be too long.  It easily could have been three hours long.  Five if Peter Jackson were directing it.  They didn’t want that.  So they edited.  They cut.  The other choice was to rewrite the story to make it simpler, so less happened, less action, less talking, less everything.  I felt the creators made an artistic choice to keep all the ideas, cut anything that wasn’t exciting or original and keep the movie to about two hours, and hope their viewers were intelligent enough to handle the rapid scene changes and understand there’s more going on that they didn’t see.  I’ve seen too many tedious movies, and so it’s refreshing to find a movie that is willing to err on the side of intelligence.

People who don’t like Jupiter Ascending don’t realize that the Wachowski brothers (sorry, siblings now!) are attempting to combine a lot of nerdy fanboy ideas into something legitimate.  You have to know the world of nerdy fanboy stuff to get this movie.  You have to know things like: Shooter Anime (yes it is its own genre), superheros (Caine was pretty original I thought, sorta a Wolverine with hover boots), a world of unlimited technology, the speed and techno soundtrack of first-person-shooters (Unreal Tournament!), the Protoss ships from StarCraft,  the detail of Lord of the Rings, the political machinations from fantasy books (I was reminded of the Reymond Feist books), slightly altered physics (Final Fantasy series), plus some funny characters from Star Wars and the lovable bureaucracy of the Harry Potter world, and all with a side of ‘cool’.   All these concepts in one live-action mix, and I think it’s a success.  So the Wachowskis probably never grew up.  So the movie is probably going to be a hit with fifteen-year old boys.  So what.  It doesn’t negate the beauty of the accomplishment.  And that’s just the big picture.  There were a lot of little artistic things I liked, like you never saw anyone die except those creepy spider-like ET things and the one evil talking dinosaur.  The one shot of them slowly rising up the teleporter the height of the Sears Towers took my breath away.  If you accept that Jupiter Ascending at least tried to blend all these strange, disparate elements into one original story, regardless of whether they actually did it, the mere attempt, combined with the fantastic visuals, makes this a great movie that I will be watching again in the theaters.

American Sniper

Lets get the meta-analysis out of the way. This is a war movie. Stop analyzing it. It’s a bunch of idealists with guns going to a foreign country, killing a lot of people, and then wondering why they don’t feel good. Like I said, a war movie. Lets move on.

It’s a good war movie. Undoubtedly the best one about the Iraq War. But does that make it a good movie? A movie, just like any story, is good because it tugs on your emotions. American Sniper does not tug, or snipe. It takes a machine gun and blasts them apart. There’s a lot of death, and blood splatters, and shock value, and slow-motion flag waving with a lone bugle playing in the background. You will cry. Maybe you like that. I didn’t. Crying is fine, emotional manipulation I accept, but when it’s done by killing a lot of Iraqis, there I have a problem. The mere fact this sort of movie is seen as entertainment, I find offensive. And yes, American Sniper is entertainment, or at least tried to be. It’s big budget Hollywood fluff. He doesn’t even have a cover on his scope. It’s absurd to the point of comedy.

I wanted to like it, I really did, but American Sniper is so full of shock value and horror and death it’s impossible to use critical analysis. As soon as you start thinking, any value disintegrates as into a sandstorm. There’s a scene where a Bad Guy uses a drill to kill a little kid. It’s awful. Bad Guys (capitol G) are swarming out of a van directly into enemy fire, and people in the audience started laughing. Laughing. At guys getting machine gunned down. Is this a video game? The mere fact that some people treat it as such negates any respect I might give it. Those same people cheered when the opposing enemy sniper died. Cheering. At death. They were probably thinking “America, Fuck Yeah!”. I was thinking “How do you make a 2,000 yrd shot in an approaching sandstorm?”

As for the Oscar nod, I don’t see it. The directing, that is, the technical aspects of telling a visual story, was atrocious. It was supposed to be a sniper duel. Instead its endless scenes of people running around yelling and blood spatters and soldiers with Predator comic book symbols on them. Now someone is dying in surgery. Then suddenly we are in America and she’s telling him he’s got something wrong with him. Telling. Not showing. It’s George W. Bush era propaganda, a war movie about what we want a war movie to be. Shock for subtlety. Ambushes for angles. No cleverness, or originality, or the things that an Oscar should be.

Yes, Bradley Cooper did a great job acting. But when he dramatically takes off his helmet front-and-camera-center in a war zone, or pulls out his satelite phone in the middle of a firefight and makes a tearful call to his wife, I don’t really care how good the acting is when what you’re doing is ridiculous. Yeah, there was one good scene at the end where he’s crying in a bar. It doesn’t make up for the banality of his character who honestly seems like a simpleton. To quote him when asked to explain his motivations: “God, Country, Family”. Give me a break.

Yes, the visuals were impressively realistic but A) this was Hollywood big budget meaning they just hired a thousand extras and rented out a real bombed-out city somewhere in the middle east and when you think about it that way its not so impressive and B) when you’re talking about blood spatters or a desert or a city in ruins, it doesn’t matter how realistic it is, it’s still terrible or tragic or uninteresting.

American Sniper would have been good if it hadn’t been about Chris Kyle. If it hadn’t pretended to be realistic. If it had just been about some fictional sniper having some fictional sniper duel in some fictional war, and everyone watching it took it as a blood-spattered horror movie, it would have been fine. I would have given it an A-. Instead, people confuse it with the real Chris Kyle who sounds like he was kind of psychotic. They confuse it with the immoral Iraqi War. They confuse two minutes of crying or staring blankly at the TV as Post-Traumatic Stress. And because of that, I have to hold this movie to a higher standard.

Grade: B-

Daximation official launch

Official Launch of my pet project, Daximation! (*lame noisemaker sound*). I signed up and put links to it on sports forums until I got tired. Check it out. (www.daximation.com, duh).

Consider this a beta version. I need/want beta testers and feedback. If you know any coaches feel free to spread the word to them.

Thank you from the Daximation Team (me)

Pretty dynamic webpage backgrounds

Ever since I wrote this post on dynamic backgrounds, I’ve been trying to accomplish the same thing with javascript, automatically, for a webpage.  It’s now possible thanks to a new css tag in town – blend-mode!  Firefox supports it, and Chrome does if you turn on experimental features.  Here’s pictures.

dynamicbackground2

dynamicbackground1

Here’s a fiddle: http://jsfiddle.net/bn8v5afa/1/

 

Here’s the code (I have got to find a better ‘show code in wordpress’ plugin


 
function dynamicbackground(repetitions){
 var repetitions = repetitions || 5;
 var thebody = document.getElementsByTagName("body")[0];
 var i;
 for(i=0;i<repetitions;i++){
 var randdeg = Math.round(Math.random() * 360);
 var randcolor = "#"+Math.random().toString(16).slice(2,8);
 //randcolor = "#f00";
 var randcolor2 = "#"+Math.random().toString(16).slice(2,8);
 randcolor2= "#fff"; //black
 //randcolor2= "#000"; //white
 var randstart = Math.round(Math.random()*30);
 var randend = Math.round(Math.random()*70) + 30;
 console.log(randdeg+", "+randcolor+", "+randstart+", "+randend);
 //create overlapping divs with blend mode 'difference'. looks really nice
 thebody.innerHTML += "<div class = 'generatedgradient' style='background-image:linear-gradient("+randdeg+"deg, "+randcolor2+" "+randstart+"%,"+randcolor+" "+randend+"%);'>&nbsp</div>";
 }
}

And a live page at: http://johnktejik.info/Portfolio/programming/blend3.html

Movie review time!

I’ve seen a movie most tuesdays this month.

Into The Woods:

Knowing nothing about this except weird people like it, I went into this movie with high expectations. Sadly, I was disappointed.

The acting was great, the story was interesting, the sets were beautiful, but a musical needs MUSIC. There wasn’t any. The songs were not really songs – as a friend put it, they were “sing-songy”. It was more chanting, not singing. The lyrics were more like poems full of two-word rhyming couplets. The instrumentals and melody were repetitious and darn near banal. I also felt the director didn’t have much inspiration – the songs took place on one set, the singers not moving. It had the feel of a broadway play, meaning it did not take advantage of the medium of film.

Halfway through the movie, there was a huge plot twist and most of the singing stopped and it became more like a typical movie. I’m curious to see if it is true to the broadway version. I will have to go see it when it plays at the Rhode in Kenosha in a few months.

Don’t get me wrong, none of it was bad, and if you’re a fan of musicals I recommend it, but with such big name actors and a large budget, I expected a lot better.

Grade: B

Wild

The book was in my estimation rated PG, maybe PG-13 for a brief sex scene, and was more about the Pacific Coast Trail than the character. In the movie, it’s rated ‘R’ and ‘wild’ refers to Reese Witherspoon’s life and story, which they made as crazy as possible. This is Reese Witherspoon like you’ve never seen her before. You’ll get to see Full Frontal Nudity Reese Witherspoon, Swearing-with-every-step Reese Witherspoon, Ripping-off-my-toenail Reese Witherspoon (Warning, its how the movie starts and it is graphic), Heroin-stoned Reese Witherspoon, and last but not least, Thrusting-Moaning, Back-alley-sex Reese Witherspoon. The Pacific Trail takes a back seat to the person. There’s some pretty scenery and a snake but this is a character piece, not a nature walk.

It’s worth seeing for one main reason – because its a gender piece, centered around her experiences with men, and what it’s like to be, to quote the hunter, a “pretty girl alone in the woods”. She screams and runs from caterpillars and snakes alike, but she’s never really afraid until she meets men. There’s several moments in the movie (that were not in the book FYI) that emphasize how scared she is of men. There’s nothing in the dialogue. The fear is communicated by body language and tone of voice. It’s subtly done. I appreciate the realism at the same time hating it. What’s she so scared of?

So there’s this guy with a bow stalking her, right? He’s crass, she’s terrified. But why? She’s pretty and a novelty and is his lack of manners really that scary? I appreciate that scene for showing me how making personal comments will be interpreted as a threat, but at the same time hating the guy for being so crude and the girl for being so afraid. Same with when the guy in the pickup truck gives her a ride to get some food. He comes across as bad, music cues and all – until he mentions his wife. At that point Reese Witherspoon visibly relaxes and the rest of the scene is friendly and calm. It’s accurate yet cringe-worthy. Even a less-dramatic scene where a Ranger brings her coffee and calls her pretty is laden with implications and debate, because she just ignores him! She ignores the nice guys and gives attention to the creepy ones.

Why is life like that? Why all the tension and fear and miscommunication? I tried to mention these concerns to both my sister and my friend Sarah and they didn’t seem to get where I was coming from. I felt sorry for the guys and they had no idea why.

Grade: A-

The Hobbit, Battle of the Five Armies:

Typical Peter Jackson/Lord of the Rings fare. Have you seen ‘The Two Towers’? It’s like that – one big battle – except smaller (dwarfs, you know). The atmosphere was grey and cold, and the amount of one-on-one battles were excessive. I realize they were trying to mix it up with extra characters, and supposedly some of them were based on other ‘lost tales’ written by JRR. Tolkein and published by his son, but point is, it was excessively long and violent. I want more Smaug and his silky voice, and less dwarfs!

Like the first Hobbit movie, this story could and should have been told in half the time. The Thorin going crazy bits were boring. The funny dwarfs were more or less absent. The most interesting character was the Regent’s servant, who wasn’t even part of the book. And sadly, my favorite scene in the entire book, the scene where Gandalf appears with a flash in the middle of the armies to stop the fight, was not included.

Grade: B-

Hunger Games 3, part 1, Mockingjay

Everyone’s seen this, so I’ll keep it brief. It’s okay. Jennifer Lawrence carries her weight, but unfortunately they didn’t give her much to do. It’s all wandering around battlefields and bunkers, listening. Typical Hollywood big-budget fluff. My biggest disappointment was that it did not copy the style of the book. The book was bad, but it at least tried something the movie did not – to be original.

Grade: B

Interstellar:

Already reviewed it. If you like sci-fi (or Mathew Mcconolly – he did good), its worth seeing because of some of the fantastic ideas like time warping near a black hole or a planet full of nothing but shallow water, or that totally kick-ass transforming robot – but beyond that, I don’t really recommend it.

Grade: C+