Nook vs Kindle.

I got a Kindle! They are really nice! I also have a nook from the library.

My two cents: The nook feels more like a book. It is squarer and has more heft. The kindle is so light I’m afraid of breaking it, and so flat that I cannot one-hand it without getting cramps from pinching it. The nook is slightly more user friendly menu button, with its single (if awkward to press) button at the front bottom, while the kindle has no menu button. I am constantly accidentally tapping too close to the top of the page which brings up the menu. I have long fingers!
The kindle also has a super tiny charging port, making it impossible to plug it in in the middle of the night whilst reading. You have to get up and turn on the lights.

So the nook wins the “less-annoying-to-use” category, but ultimately I’m going to have to say the kindle is better. There are three reasons for this:

1. The kindle has a built-in dictionary. Click and hold on any word and the definition pops up. No internet required. I LOVE this feature. I am constantly writing down new words that I mean to look up later but then forget. No more with the kindle.

2. The zero-power screensaver. When one first opens the Kindle box, you think there’s a film over the screen, because there’s a beautiful sepia-toned picture. Then the picture changes and you’re like ‘Holy crap, this thing is on! Do they ship them all powered on? Does the battery really last months and months?’ But no, its a zero-power screen saver. I don’t know how a screen saver can consume zero battery power. It seems like a defiance of physics. Yet that’s what the Kindle claims to use.

3. The screen feels like paper. Yup, thats right, they made a touch-screen that feels like paper. I close my eyes and cannot tell the difference. When the virtual pages turn with a tiny hiss of sound, I close my eyes and imagine I smell fresh ink on new paper. Or maybe I’m just smelling my new Kindle. Yeah! Kindle rocks! I already bought a couple books (They are all half price what you would find on the shelves.) and, to any soccer player, I recommend the book ‘Soccer IQ’.

Easy and cool backgrounds for webpages

You have a webpage that needs a background.  A basic gradient does the trick – but that’s so, well, basic.  Try this:

Open photoshop, click gradients, then – and this is the key – set the mode to “difference”.  Its a little dropdown at the top.  Now make a few random gradients.  After two or three clicks you should see something cool appear.  Pick a color (just one works fine – something light and muted) and experiment away!

cool-gradient

cool-gradient1

 

My first Android App

This is a step-by-step guide that you can copy to get a working app.

Getting started:

You will need:

  • A computer with internet
  • An android phone.
  • A way to connect it to your computer (USB cable or I hear there is another app you can use to have your phone talk to your computer).

Get Set Up

1.  Download and install the Android Software development kit

It will take a while.  While waiting:

2.  In your phone, find and turn on the ‘debug mode’ setting.  Different versions of android have it in different places.  The latest version of android (4.2+ I believe) requires you to tap 7 times at the bottom of the settings screen!  The point is to get your phone to allow downloads from your usb cable without warnings or needing anything signed.

3.  Connect your phone to your computer.  If you get a warning saying ‘drivers not installed’ then you will need to look up the model number of your phone and find the driver online and install it.  For example, my phone was a Kyocera Rise Model c5155 so I just googled that and it took me to the kyocera-wireless.com/support/drivers page.

The code

4. You can find your own code online somewhere or you can just create an empty file called index.html and put an image it using word or whatever.  If you want to use my code, go http://johnktejik.info/hellophaser/ and do File->Save Web Page and save it as index.html.

5. Zip it up.  This means selecting the files we made/saved and right-clicking them and “add to zip file”.  If you don’t have winzip, go download it.  You can also use winRar (free).

6.  Submit your zip file to PhoneGap (click here for link).  You will need to make an account.  Submit your zip file and wait a bit and it will show you it building.  When the Android build is done (It also will build windows phones, iOS, blackberry versions of your app), click on the .apk button for the app and it will download to your computer.  In my case the file was called crApp-debug.apk.  Now you need to get it on your phone.

Getting it on your phone

7.  Run the Android Debug Bridge.  In your Android SDK you downloaded and installed (You do remember where you installed it, right?), find the platform tools folder.  Somewhere In there is a small executable file called adb.exe and a couple .dll files.  You will probably have to look a bit to find it.  We need to run that adb executable with the command “INSTALL” and the name and full path of your app.

Command line way:

Copy the .exe and .dll files over to where you downloaded the .apk file.  Now in the windows command prompt (Windows->run->’cmd’) navigate to the directory you copied the files.  (or add the directory to your PATH environmental variable)  In my case it was my downloads directory c:/users/J/Downloads.  So I type ‘cd C:/users/J/Downloads‘.    Now type:  “adb install -r crApp-debug.apk” where crApp-debug is the name of your file.  The -r stands for ‘overwrite’.

Windows shortcut way:

Make a shortcut to adb.exe (right-click->send to desktop) and edit the command line properties (right-click->properties->target).  In my case it looked like this:  “E:\Program Files (x86)\Google\ADT\sdk\platform-tools\adb.exe” install -r e:\users\j\downloads\crApp-debug.apk

8.  Done!  After running the ADB.exe it should be on your phone.  Scroll through your icons till you find it.  Click on it.  Whatever files you submitted to the site will now execute.  In my case I have a crappy bird app where I have to tap the screen to guide my block through a bunch of other blocks.

 

Getting started building apps for an absolute beginner.

Codename One turned out to be a bust.  It’s been two days since I submitted my simple ‘hello world’ app to them and its status still says ‘building’.

So I’ve been looking around at other alternatives.  There’s nothing free – nothing, that is, except PhoneGap.  Everyone talks about phonegap on all these app-building sites, and they always say ‘poor performance’ so I dismissed it out-of-hand.

But what is phonegap?  I thought it was a developing environment, but really its a service that turns web-based code into something that can run on Iphones or Android phones.  Any phone, really.  It is a compiler.

There’s a fundamental problem with any app-building endeavor: you need a computer.  You cannot code or (easily) test your code on your phone.   It’s too hard to get the app onto your phone.  Especially Iphones.  Apple has made it so a Mac is required to compile any app for Iphone.  Why?  Because they are greedy.  They have made it so you have to use a certain program, and only that program, to compile Iphone apps.  And this requires you to buy a developer license for $99 – even for a simple hello world app.

Google phones are sightly more developer-friendly, but it still a pain to get an app on the phone, and you still need a computer ie. something with a keyboard.  This creates a new problem:  Finding a way to make and test an app on your computer.  Computers are different operating systems.  Even a Apple Mac computer uses a different operating system (OS X) than its Iphone (iOS).  So to make any app on your computer, you have to basically have some kind of phone emulator.  And this is not an easy thing to ask for.  Hence, anyone who made one also wants you to pay.

Codename one promised to be free, and it is, until you need to get it to the phone.  You have to compile it.  And only they can compile projects created with Codename one.  Gotcha!  They have a free service where you submit it online, but its limited to 100 uses, and as I have just reported, it takes too long for a simple compile.

So there must be a new solution, something to run and test code on a computer, and a way to compile it and get it to your phone.

But wait – why should someone have to use a completely new developing environment to run code, when such a thing exists already, on almost any computer?  What am I talking about?  Web browsers can run javascript, which requires no compiler!  Just a text editor and a web browser is needed to start writing and testing code.

Phonegap realized this and made a way to turn javascript code into phone code.  I didn’t need to learn a new environment – I could just use javascript.  So that’s what I did.  I made a simple app using javascript and submitted it to phonegap’s build site.  I had to register, but it was free and took less than a minute to get my app compiled.  Really.  Yes, you heard that right, its already done.  One day.  That’s how long it took me to write a game and get it compiled for my phone.

There’s a nice javascript wrapper made especially for games, called Phaser.  It took less than an hour to copy the examples into my own app.  Here is my app.  You may play it.  Since it is javascript it runs on any browser.  Aren’t I awesome?!  Ok, well, I cheated a little by copying the code from here, but it was a great way to learn and I think even people who have never coded could understand it.  It almost reads like english.

I zipped up the code and uploaded it on the phonegap site, and voila, it automatically compiled it for every phone operating system it could (meaning everything except Apples IPhone).  WOOHOO!

Problem is, I don’t have a phone to run it on!  I will try to get ahold of a cheap android phone and see if it works.

As for performance issues, from what I understand, it makes an app that runs through the webbrowser.  Basically an emulation.  But I see no problem with that.  All the mobile apps ive seen are low-intensity.  I’m not making a first-person shooter.  I’m trying to make a chess app.  What do I need optimized speed for?  yes, I want it to be fast, but I can easily rewrite my code if need be.  And there are now services out there that take your javascript code and turn it into native, optimized code for iphone or whatever.  This one is called CocoonJS and looks very exciting.

 

Codename one: My first five minutes.

So I’m trying to make an app for my Iphone.  Why?  Why not.

I researched all the various methods, and decided, based on reviews and comparisons from other sites, to go with Codename One.  Great looking site, active forums, it seems like the real deal.  I’m going to have to deal with crashes or buggy features or something that just plain doesn’t work.  It even has a tutorial for beginners.  So here’s my first five minutes.  May others find it informative.

You have to use a supported code editor.   It doesn’t come with its own, so you have to download netbeans or eclipse as well.  I already had netbeans, so I just had to download codeone and install it as a netbeans plugin.  It worked, until I tried to create a new project.   Nothing.  It say its successful, but nothing happens.
Solution: reinstall netbeans.  My existing plugins caused codename one to not work.

Now I have a new project, annnddd… now what?  Codename one creates a bunch of files, and they show in a list at the side, but what are you supposed to do?  Turns out you are supposed to find the file named “theme.res” and double click on that.

This brings up the GUI editor in a separate process.  This looked all right.  A big ‘add a new GUI element’ seems to create a form, which you can see on the left of your screen, and a separate panel lets you drag and drop components (buttons, checkboxes) onto it.  There is a default form called main.  Good.  I add a button that does nothing, go back to the main screen, and tried to run the program.  A simulator pops up but my changes did not appear.  Ok….. I try again.  This time click save.  There we go.  My new button appears as expected.  So far so good.

Now how to get at the code for the button?  I’m looking, I’m clicking, I’m looking – finally I find it at the bottom of the file statemachine.java.  But oh great, there is a warning at the top of the file saying “Do not modify”.  So what do I do now?  I click around, searching, searching – I find a properties tab headed ‘events’.  I click on “Action Event”, a ‘choose file’ dialogue pops up, I assume its asking for the file with the code, I click the statemachine.java, aaaaannnddd… Error.  Not a valid application. Crap.  I’m stuck.  Time to read the documentation.
The in-application help files are useless, but that’s normal.  I try online.  “Hey look, a hello world tutorial!”  Right there on the codebase one site.  How thoughtful.  So I’m reading, I’m reading, events, events, looking for events, and I read:
Binding Events To The Source Is Trivial And You Can Invoke The Codename One API To Do Anything
But they don’t tell you how to do it!  The closest thing I can find is Picture Now we can edit the generated GUI and makes changes to the screens within the GUI builder. We can bind an action event to the button and go to the code to show a dialog.

More lies.

“Screw it” I say, I’m going to edit the codenamebase file, the one that told me not to edit it.  I stick in a basic dialogue Dialog.show(“Hello”, “Hi There”, “OK”, null);, save, click run, aaaannnddd…. YES!  It works!  A dialogue pops up when I click the button in the simulator.

And thats my first five, or maybe fifteen, minutes with codename one.

I shall continue to use codename one.

Inverting the Pyramid, Kick the Balls, The Beckham Experiment, Why Everything you think you know about soccer is wrong

Inverting the Pyramid:  A classic history of soccer.

The title subtitle says it is a history of soccer tactics, but a better title would be ‘a history of the great teams of soccer’.

I’ve heard this called a ‘must read’ for anyone who studies soccer, but after reading it, I cannot agree.  It’s a history book.  This means a lot of names, dates, and places.  The first few chapters were interesting as it talks about pre-1900 soccer, how there were no set rules, how everyone played forward, how the Scottish dominated.  But after that the format of the book is as follows:

  • Pick a good team from each decade.
  • Go back thirty years in that teams history.
  • Catalog all their coaches, managers, wins, losses, major trades, tournaments.  Describe their style in vague words like ‘flowing’ or ‘physical’.  Put in lots of quotes from others about how great the team was.
  • Repeat.

    It is informative, and as far as history books go rather easy to read, but its still a history book.  It attempts to make a story out of each team and their changes, but the fact is coaches change, are hired and fired, all the time.  I’m not sure why the author talks so much about coaches and players that, by all accounts, failed to win.
    There was the occasional paragraph about why the tactics that team used worked, and maybe even a diagram, but I could have used far less names and dates far more whys and hows.

The Beckham Experiment.

This is a book chronicling David Beckham’s move to the LA Galaxy from 2005 to 2008.  Sadly, the book isn’t about David Beckham.  It’s about the engineers of David Beckham’s move, and relegates Beckham to a sort of dunce, or stooge, ignorant and naive to the damage he and his friends are inflicting upon his team.

There is a lot of Alexi Lalas.  Which I like, because I like Alexi as a player and a commentator.  The book could easily be called ‘What Alexi thinks about everything’ but I doubt that would sell many copies.  There is also a lot of talk about finances, and how expensive players are, and how the MLS is struggling to stay afloat.  I liked those bits.  But the rest of the book reads like a magazine article that someone tried to turn into a book.  5% punchlines and 95% tedious background facts.

Kick the balls

This is an autobiography of an alcoholic Scottish bartender coaching a bunch of 10-year-olds in America.  It accurately depicts little kid’s dialogue.  It also thoroughly depicts how much of a loser this Scottish guy is.  It’s more about him ripping on how awful he is and how awful he treats the kids, and less about soccer.  Every other chapter is an irrelevant, if humorous, letter to a TV evangelist he watches when he cannot sleep (He cannot sleep a lot).  He also talks to his Ben & Jerry ice cream.  The only interesting parts were about his Scottish childhood, and how barbaric kids are.

What I want to know is:  How did he get this published??  What was his selling pitch?  “Its about a Scottish loser abusing kids”?  It is well written, but who would publish a perverted, kid-centered, foul mouthed horror story interspersed with making fun of religion?  In a way I am inspired.  If a book this bad can get published, than anything I can write should have a chance too.

Why everything you think you know about soccer is wrong

The eye-catching title hints at the chicanery inside.  This is a book about statistics, written by some guy with a PhD who has never played soccer.  Each chapter he takes a ‘well-known’ soccer adage, like ‘you are more likely to be scored upon immediately after you score’, and refutes it with statistics.  There’s charts and graphs and quotes from people you don’t know.  Its specious and banal and I hope no one will be fooled by anything.  Like the old saying goes, “There’s 3 types of lies: white lies, damning lies, and statistics.”  And I think The Author knows it.  In the introduction he even says some of his conclusions are ‘simple parlor tricks’.

Let me elaborate.  Lets take the example I already used, “You are more likely to be scored upon immediately after you score.”  According to all his computer-generated match analysis, this is not true.  ‘All second goals are, statistically, evenly distributed across all minutes of the game’, he claims.  So why do people say this?  His answer is because everyone just attaches a greater emotional weight to equalizing goals.  ‘We are just imagining it’, basically.  But that’s not true.

I have personally seen how immediately after a team scores, the next five minutes of play are different than the previous five minutes.  The celebrating team either visibly relaxes or gets more excited.  The other team seems to give up or produce a surge of effort.  I’m not imagining that.  I don’t know if these surges lead to more goals, but that is the theoretical basis for ‘goals tend to come in pairs’.  I understand that the statistics do not show that, but until you adequately explain the discrepancy, I’m going to believe my own eyes over your statistics.  For all I know, he hand-picked the games to prove his own hypothesis.

Some statistics of his are interesting.  I liked the one about “Leading 1-0” only gives you a 50% chance to win.  It makes no sense.  Leading the game doesn’t help you??  Bullshit.  But the idea is interesting, and worded a different way, kinda makes sense.  Reworded it says ‘After you score, the other team is more likely to score than you are’.  That makes sense.  Teams tend to get more defensive when they lead.  The losing side tries harder to score.  This explains why draws are so common in soccer and 1-1 is the most common score.  I don’t think its 50 percent of the time – I think the author is cherry picking his numbers – but it is interesting food for thought.

Only one conclusion of his did I really have a problem with.  “More corners do not lead to more goals”, and he mocks teams that get excited about corners.  Statistically speaking, he is right.  Teams with more corner kicks do not have more goals.  But then he goes on to say that corner kicks are better played short, and should not be used as an attempt on goal.  I have heard this argument from other coaches and I strongly disagree, and am upset that someone who claims to be an authority on soccer would use perfectly good statistics to support this inaccurate claim to the detriment of teams, the people watching games looking for a little action, and soccer in general.

A corner kick, almost by definition, is because the defending team is doing a good job of preventing goals.  A defender blocked a shot and the ball went out of bounds.  If you put it in those terms, more corner kicks mean the defenders are doing a better job than the attackers.  Corner kicks should then be correlated with less goals.  And this would be true if the team did not take the corner kick.  But they do.  They take the corner kick, it results in more shots on goals, and therefore more goals.  Any loss of goals from being blocked is gained back because they had a corner and went for a shot on goal!

Saying ‘The same amount of corners leads to the same amount of goals’, does not say anything about their relationship.  Correlation is not causation.  Flip it around: More goals lead to more corner kicks!  Maybe.  Maybe not.  But it uses the same statistic and the same logic.  This could be a statement about possessing the ball in the opponents half.  It’s all about how you word the question

Lets use another statistic to prove my point.  What are the chances that a possession leads to a shot on goal?  Think about it.  How many shots on goal does a typical professional team have?  Around 10.  Yet how many possessions do they have?  Hundreds.  The ball changes sides at least three hundred times during a game.  This is a game of turnovers.  1 in 9 shots go in, that’s a well established fact.  The odds of any one possession leading to a goal is less than 1%.  99% of all possessions result in losing the ball.

Now lets look at corner kicks.  What are the odds of a corner kick leading to a goal.  Statistics show it is 1 in 40.  2.5%  Already that is better than 1%.  But John, you say, there’s not a lot of difference between 1% and 2%.  You might have rounding error or something.

Ok, fine, lets go into a little more detail.  What are the odds that a corner kick leads to a shot on goal?  1 in 5.  20%.  That is better than the average possession, and it makes sense intuitively.  If you drop the ball in front of the goal, any shot is more likely to be on target.  You’re super close to the goal – there’s no way to miss.  The only way to be stopped is by the other team blocking it.  More evidence that a corner kick is better than possession.

And the last little statistic I want to throw out is that, out of all goals scored, 1 in 10 come from corner kicks.  What other strategy or set play can you say leads to such a high percentage, other than penalty kicks?  Can you say ‘dribble the ball down the sideline, and there’s a 10% chance it will eventually lead to a goal?’  ‘Cross the ball, it will result in one of our 10 goals?’  No.  You cannot make any such firm declaration.  But ‘1 in 10 of our goals will come from corner kicks?’  That’s a pretty strong statement, and a rather exciting one.  I know its not the same as saying ‘1 in 10 corner kicks will lead to goals’, but it nevertheless creates a definitive moment to anticipate, something easy to recognize, something easy to plan for and execute, with defined and above-average results.  Fans should definitely cheer.

What someone really needs to do is compile statistics between corner kicks played long and corner kicks played short (And to define long and short – playing a 1-yard short pass to someone who crosses it long is the same as doing a long corner kick).  From my observations, it is much more profitable to do a long corner kick where the ball is dropped in the goal box, than a short pass outside the penalty box.

 

 

Bastion and Games for iPhone

Video games for the IOS.  The IOS is Iphone’s operating system, in case you didn’t know.  I”ve been downloading a lot of games for it, trying them out.
First off, there is an INSANE amount of games.  I venture to say there are more games for phones than there are games made for All console systems combined.  I don’t know about PC games.  I’d guess PC games and phone games exist in similar quantities.  The reason for so many games is money.  Puzzles and Dragons makes 3 million dollars A DAY.  Yes, you read that right.  A DAY.

So everyone is jumping on the app train.  I myself have downloaded Xamarin and will be making an app soon.  A chess app.  I downloaded every single chess app on the apple app store, and none of them do suicide chess.  So I’ll make it myself.  (BTW the best chess app i’ve found so far is smallfish).  Unfortunately you have to pay $100 to put an app on the app store so who knows if I’ll ever get it published.

Anyways.  Games.

If you like art mixed in with your games and a rocking soundtrack, get Bastion.  I cannot believe I used to waste time playing crappy facebook games when things like Bastion exist and I can play lying down in bed.  Here’s how the game starts:
https://www.youtube.com/watch?v=JICE5exO0uA
I was hooked in the first 20 seconds and am downloading the soundtrack as I speak.

I’m also playing Mystic Knight, an old school RPG that so far is good, and Rune Raiders, made by the same guys that do Clash of Clans.  Its a turn based strategy game.  I like it but I’ve just hit level 15 and its impossible to beat the boss.  Every round he nukes every single member of your party no matter where on the screen they are.  I can’t figure it out.  So I think the balance is out of wack.

I also think I will delete Puzzles and Dragons.  I just got my 60 day consecutive log in bonus and used all my magic stones on the new ‘Evangelion Egg Machine’ and got nothing but crappy Rei and Kauru.  The game has also gotten too hard.  The gap between the expert dungeons and the master dungeons, which is supposed to be one step removed in difficultly, is light-years apart.  I get annihilated the first round.  I survive two rounds, max.  It doesn’t matter which dungeon.  It’s just too hard.  I have all my starting characters leveled to max.  It seems the only way to progress is get some super-overpowered God characters, which costs real money or a lot of luck.  So bye bye Puzzles and Dragons.

There is also GBA4iOS, an emulator which allows you to play any game boy advanced game on your iPhone.  There is also one for Nintendo DS, but my iPhone 4s lags too much to be usable.  Maybe ipHone 5 has a better processor.

Ruzzle is also very fun.  You find words hidden in a grid, and compete 1 v 1 against facebook friends or anyone with the app.  My ID is Dax006.  Someone play against me!

One Dot Enemies – bugs appear on a blank screen and you click on them to kill them.  Thats it.  no levels.  It goes on indefinately.  The only challenge is the bugs are 1 pixel big (Very very small) so you do a lot of peering into the screen.  Boring after about 10 seconds.

Consciousness and the Brain

Consciousness and the Brain – Deciphering how the brain codes our thoughts.

Loved this book.  The entire book is a result of a simple fact: A message or picture flashed less than 30ms before the eyes is not perceived by the consciousness, yet will influence a persons decisions.  Aka a subliminal message.  Normally these psychology books are full of wanna-be scientists.  I fully expected this book to ramble on and on about how ‘OMG seeing a picture creates brain waves!’ and nothing more.  But it delves into some really state-of-the art technology like microscopic electrodes where people can measure the electrical potential of INDIVIDUAL neurons, and by putting these probes into peoples brains, they can cause people to think about or even see certain objects.  They found a ‘Bill Clinton’ neuron, that only activates when shown a picture of OR SEES THE WORDS ‘Bill Clinton’.  Matrix-like virtual reality is a real possibility.

Then the book got even better by getting all theoretical – and better yet, the authors invent experiments to validate their theories.  Some attempts failed, but I was fascinated just reading about them.  They worked with people in comas, and did a lot of mapping of the brain.  They talked about computer neural-networks and even Lucretius’ “swerve atom” (Which is weird because I just read this 3000 year old book last month).

I was a little disappointed they didn’t talk about Google’s recent billion-node neural network experiment.  A lot of their theories were already put to the test in their experiment and shown to be valid.  If you haven’t heard about Google’s little experiment, Google harnessed the processing power of computers they store their data on (some 16,000 cores) and created a open-ended neural network simulation and found that certain features created stronger responses than others, like faces.  Although this was still something like 1/600,000th of the brains processing power, I see no idea why this concept could not be extended to infinity to explain how our brain works.  Memory, visual recognition, even consciousness could be explained (if you create a neural network that links to itself as its inputs).

The other small disappointment was not referencing Eric Kandel’s work.  With so much talk about neurons the book could have benefited from a discussion of how neurons work and remember things.

How to survive a kidney stone

I used to scoff at posts like this.  Geriatric wimps, reminding everyone of their own mortality!  Spoiling what precious little time we have left on this life, all those embarrassing biological details – have they no shame?  Well, I am now one of those geriatric losers sharing embarrassing biological details.  Get over it.

For those of you with no interest in kidney stones, and don’t care that your time will come, here is the executive summary of what you need to know:

  • The pain will be in your back, on one side.
  • Hot Tub, Ice Pack, and Drugs.
  • Don’t drink until you know you are able to pee.

There you go.  You are now prepared for the worst physical pain in existence.

For the rest of you who bother reading this far, here’s where I’m going to write about my recent experience with kidney stones.  It’s intended to help others, but will probably just end up being long and boring.  Really, you should probably stop reading now.

Still here?   Ok, here goes.

Kidney Stones

The basics: kidney stones are when stones appear in your kidney and block passage of urine, and it really really hurts.  The pain it causes is worse than childbirth.

Why do these stones appear?  No one is quite sure.  The key seems to involve having excess minerals in the blood/urine, minerals being any pure substance that is solid at room temperature with an ordered molecular structure (a crystal).  For some reason these crystals nucleate and become solids and plug up the tube from your kidneys to your bladder.  It seems to happen more in men, and more when they get older (due to higher levels of iron in the blood?).  Dehydration is a factor.  We know when liquid evaporates, any solids dissolved in the liquid will stay behind – if your body becomes dehydrated, the minerals dissolved in your body are more likely to crystallize.  So don’t get dehydrated – that’s the only advice anyone can agree on.  More on that later.

The key point about kidney stones is the pain.  Oh, the pain.  For men, its like getting kicked in the balls, repeatedly.  It’s someone grabbing your groin, or an elephant standing on them, and slowly grinding them back and forth.  Women, substitute whatever extreme pain you’d like.  Crucifixion is not an inappropriate analogy.  You can’t breath.  You want to die.  I had thoughts of using my shaving razor blade on my wrists.  Thoughts of guns, and heroin, and stabbing myself.  I was punching myself.  Taking a dagger and plunging it into my kidneys would be less painful.

If you haven’t experienced this pain, you never want to.

No one is sure why the pain is so intense.  Some say swollen kidneys, others say blocked urine, others have propounded a ‘stretched urethra’ (the tube that connects the kidney to the bladder).  For me, since the pain is so similar, it is obviously linked to being kicked in the balls.  So something, somehow, is triggering the same nerve.  The only explanation that makes sense to me is the kidneys are so swollen they are pinching the nerve as it runs from your groin up your back.  The kidneys sit along the spine, so it’s making direct contact with that ultra-sensitive nerve, squeezing an area that is normally impossible to squeeze.

For me the pain started slowly, as a mild discomfort, growing and growing over the next ten hours until I thought I was going to die.  This fits with the swelling theory, as opposed to ‘something breaking’ inside where the pain would occur more rapidly.

It’s amazing how little literature there is on a subject that will affect more than one in ten Americans (around 1419% of men and 5-9% of women.  That’s a lot.)  What literature there is, is full of ‘may’ and ‘maybes’ and contradicts itself.  For example, this Harvard study says to take citric acid.  But wikipedia says that increasing acidity is what causes stones.

The most common ingredient in kidney stones is Calcium Oxalate.  So don’t take calcium, or oxalate, or whatever that stuff is, right?  This seems obvious, so obvious that someone tried it and documented the results.  Turns out avoiding calcium did not help kidney stones.  The guys who avoided salt did better.  None of the studies mention Oxalate, which is found almost everywhere, mainly in nuts and chocolate.  And no one seems to have tried avoiding beer, which is the main source of Calcium Oxalate!  One study even says drinking a lot of beer every day helps!  Calcium Oxalate is sometimes called the ‘beerstone’, as it forms naturally inside beer breweries.

So there’s really no solid research on this area which, again, I find perplexing.  This seems to be the most definite study on kidney stones.  I plan on reading more of it later.

I am not alone in my confusion.  Although they won’t admit it, the medical industry doesn’t know what they are doing either.  The first time I went to the hospital for kidney stones (about a year ago) I went to the Emergency Room.  They gave me a drug called Flomax, which I thought helped.  This time I went to the general doctor, Dr. Miso Milosovic at Kenosha Memorial Hospital, who refused to prescribe me Flomax.  He said it ‘wasnt proceedure’, ‘not a good idea’, ‘Im too young for it’, the ER ‘shouldnt have done that’, it was ‘off label’ and insurance companies wont pay for it.

Go to any forum about kidney stones and you will find someone talking about how Flomax helped them.  So why wouldn’t a doctor prescribe it??  It’s got to be the stupid insurance companies telling doctors how to treat people.  Maybe.  This site says that diuretics, which is basically what Flomax is – it increases urine flow – are bad and will increase your risk for kidney stones.  I don’t know why it says this, but the point is that even the ‘authoritative’ sites contradict each other.

As I got up, just now, to go to the bathroom to pee, my urine came out near solid red.  Blood.  My blockage is gone, but now my kidneys, or at least a kidney, is damaged and bleeding.  Great.  Just great.

Time to talk about my kidney stone.

My Kidney Stone

It started Saturday night, after a long evening of drinking.  I had a very strong and nasty Long Island (really, what was up with that, every Long Island is delicious, then out of nowhere comes the worst Long Island I’ve ever had?), and then a strong craft beer, both of which caused the dehydration and excess oxalate and triggered a kidney stone.  I felt a little uncomfortable that night, but it was more of a mild irritation, a sort of itch inside my groin.  It was equivalent to pulling my groin muscle, or food poisoning.  It felt a little funny when I moved or walked, and peeing ‘didn’t feel right’.  Now that I think about it, I was not peeing nearly as much as I should have been for all the liquid I had been consuming.  Anyway, I thought nothing of it.

I went to sleep and then woke with extreme back pain.  It kept getting worse to the point where I was writhing in bed.  Last time I called 911 and an ambulance picked me up in my undies at my door.  This time I knew the ER couldn’t do anything except give me pain medicine and treat me like a drug addict, so I opted to stay home.

First I tried the ice pack.  If you go this route, dispense with the recommended ‘protection’, the covering surrounding the ice pack, and just smack that puppy straight on your back.  Frostbite be damned.  Yeah, it will sting a little but the sting hurts less than the kidney pain, and after about five minutes you won’t feel the ice pack at all.  Move it around a little, up, down a bit, maybe on your spine for a little, maybe on your butt, I even slapped it on my balls once or twice – the end result is a general lessening of pain.  Not a lot – it will go down from a 10 to maybe a 9.5 – but it is enough to let you breathe and think.

I felt the urge to go to the bathroom several times, but each time I tried nothing came out.  This was not normal.  According to the doctors, if there is pain on one side only, therefore kidney stones on one side only, therefore your second kidney should be fully functional.  The only exception is during the very last stage of having a kidney stone, the kidney stone moves into the bladder and then out the final urethra at which point it is blocking both kidneys.  This stage does not last very long, not long enough for both kidneys to be backed-up to the point of pain, and usually is accompanied by a relief of pain as the one blocked kidney is now free to empty into the bladder.

This is not what was happening to me.  I felt no relief.  Only one kidney felt blocked, and yet I still couldn’t pee more than a few drops.  I conclude my left kidney does not work.  But that’s a story for another day.

There was also, in addition to the need to urinate, a need to empty my bowels.  The body, recognizing there is a foreign presence, goes into purge mode.  You feel nauseated, feverish, and have the urge to go.  Standard food poisoning.  The problem is you are in so much pain every muscle in your bowel region is locked up.  You’re just that tense.  Your whole body is straining to relax enough to breathe, and every breath is a new stab of agony – it’s tough to sit on a toilet and relax.

So after a few hours of chills and sweats and fever and straining, I tried a hot shower.  The pain got worse until I tried kneeling.  The sudden change in heat plus the relaxed body position loosened my bowels enough to go.  I recommend it.

From there I discovered that a stream hot water directed at my lower back reduced the pain from a 10 to a 9.  I spent several hours in that position until the hot water ran out.  When the hot water ran out I was in bit of a pickle and spent a lot of time solving the problem.

First, I just used cold water.  Vibration should be all one needs, right?  Nope.  Still hurt.  Sitting in water?  No effect.  I tried a heater in the room with cold water.  Bad idea, because when the hot water comes back, you get overheated.  I contemplated a hair dryer but worried about electrocution problems.  I had a silly mental image of hanging the room heater in front of the shower nozzle and running the water over it to heat it up.  Maybe a mild electrocution would help?  But nothing worked – it had to be hot, and it had to be a stream.

So I went back to bed with a hot pack and beat my back, expecting to achieve the same results as the hot shower.  Strangely it did not help.  I hit harder.  I rubbed.  I vibrated.  I rocked.  I writhed.  It only seemed to make things worse.  Was I imagining the benefits of the hot shower?  I went back to the shower which now had hot water.  Sure enough, it helped reduce the pain.

Here is how to make the hot water last longer:

First, if you have a hot water heater in the basement, go turn up the heat to max.  Plug the shower (so you will get a layer of hot water in the bottom).  Run the shower on you until you feel the reduction in pain.  Turn off the water to give it time to get hot again.  Just kneel in hot water for a while, five to ten minutes.  When your back starts getting cold, roll over and put your back in the hot water.  The fetal position on your side also works.  Do this until the pain starts returning.  Then turn the water back on.  In this way you can make the hot water last indefinitely.

I founding that kneeling with a straight back worked best (doggy position), but it was hardest on the knees.  Putting head down (Muslim position) didn’t matter.  Leaning back on my haunches and arching my head backwards (uh.. howling wolf position?) helped only briefly.  Head touching my knees (fetal position) worked well.  It provided decent pain relief with not much energy needed to maintain the position.  Fetal position on the side was not quite as effective.  It did not seem to matter which side I laid on.  Same for laying on back – not as effective.  My theory for why this is so is you need to use gravity to help the stone along.  If the stone has to fight gravity, it will hurt more.

At this point my mother got sick of my groaning and suggested I use her tub which has a whirlpool-like feature.  This was a lifesaver.  Thoughts of razor blades and suicide went away.  I highly suggest a hot-tub with directed-jets-of-water to everyone with a kidney stone.  If you’re in Europe you can use one of those sweet detatchable-nozzle thingys every shower has.  If you don’t have one, get out to the local sports club or pool and just force your way in.  Get someone to drive you if you must.  Call all your friends to find out if anyone has a tub that shoots jets of water.  It’s worth it.  I know you won’t because you’re in too much pain, but I still recommend trying.

I spent the next three days in the tub.  Here’s a few silly things you can do to pass the time:

  • Waterproof your phone.  Ok, so this requires planning ahead, but it would let you use your phone in the shower, which is perfect for kidney stone sufferers.  Also great for the guy whose got everything.
  • Ice pack on head.  Now turn up the heat in the tub.  How hot can you go?
  • Practice staying very very still.
  • Scrub the tub.  Mr. Clean magic erasers work miracles.
  • Rearrange towels under you.  Your knees and butt will get sore.  Putting a towel under you helps, but you need to rearrange it every now and then – even the fluffiest towel gets creases that will dig into you.  You can try folding them into triangles, or hexagons, whatever.
  • Stick your thumb in your ear and listen to your heartbeat.
  • Put your ear against the side of the tub and listen to the vibrations.  You can eventually distinguish which vibrations are coming from which pipes!
  • Try to figure out how the water is draining from the tub.  Newer tubs seem to have a metal cap thingy implanted in the side of the tub that leaks around its edges.  What happened to the good ol spider-hole style of drains?

My mother also filled me full of tea, since every piece of advice about kidney stones says to drink lots of water to ‘flush it out’.  A piece of advice – if you are going to sip from tea someone hands you in a thermos, do not do it while lying back.  You won’t be able to spit it out in time and will burn your entire mouth.

But back to drinking lots of fluids.

On Drinking Lots of Fluids

Here I disagree with the doctors.

I do not ‘need flushing’.  Do I look like a toilet to you?  If I am in excruciating pain due to kidneys with too much fluid, does it make sense to push more fluids into me?  If you have constipation, do they tell you to eat more?  No.  Obviously not.  I say let vibrations and the fluid that’s already there do the work, and leave the poor kidneys alone.

If you are going to drink, make sure you can pee first!  I could not, hence I made the pain worse.  By worse I mean it spread to my stomach, since the pain in my kidneys could not get any more severe.  I drank so much liquids, about eight tall glasses, four or five liters, I could feel my stomach distending and the liquid pushing its way up my esophagus into the gorge of my throat.  I think I permanently damaged something with all that liquid.  I mean, five liters going into the body, and nothing coming out (except through sweat)?!  Not good.

After a day or two of this stomach pain I couldn’t take it and tried to force myself to throw up.  I was not successful, but the attempt helped, and I think the change in pressure helped move the stone because shortly after that I let out a massive fart, was able to pee, and the pain subsided.

The night of the third day, after trying to throw up, the stone passed, and the pain lessened from a 10 to about an 8, meaning I now felt like I had been kicked by a horse.  My stomach slowly stopped hurting as well.

However the pain was still there, and still fairly strong, and the whirlpool and ice packs and drugs did not help as much, and so after a day of this, this now being the fourth day, I decided to go to the hospital.

The Hospital

I didn’t want to go to the emergency room (see above note about being treated like a drug addict) so I called my doctor, Dr. Milosovic and told them to take me now or I am going to the emergency room.  They said they would call me back.  I told myself I would give them ten minutes then I’d leave.

They called right as I was about to head out the door.   The nurse said they scheduled some tests – an x-ray and a urine sample – and it was up to me if I wanted to take them.  I don’t really know what that means.  I wish they had just told me what to do, not left it up to me.  But I felt obligated that since they had ordered tests for me I should take them.

So I went to the X-Ray department instead of the emergency room.  I had x-rays, I gave some urine samples, then I went back to the doctor’s office.  They told me to wait.  So I waited.  And waited.  A receptionist came out and I explained my story again, she said she would talk to the doctor.  I waited some more and then a nurse came out and asked my story again and again said someone would talk to the doctor, and I should continue to wait.  No definite ‘he will see me’ or ‘he wont see me’, not one way or another.  Just wait.

Waiting, waiting, waiting.  While waiting my mom called around and pulled some strings (She works at the laboratory) and got the tests processed extra-fast, else I might have been waiting a day or more.

They finally called me in.  Not sure how long it took.  Next time I will insist on a time limit, say, one hour, and if I’m not called in by then I will go to the Emergency Room downstairs.

The doc looked over the tests (X-rays showed nothing, there was blood in the urine, no sign of an infection) and then ordered a CT scan for me, which is what he should have done in the first place.  The CT scan was done very fast, within ten minutes, and the doctor got the results over his lunch break.  An upset patient (“You Lied To Me!”) walked out while I was waiting, leaving his appointment time available.

The CT said I had two more kidney stones, one entering the urethra, the other still in the kidney.

Here the doctor told me I was not about to die, there was nothing to do except take pain killers, drink lots of water, and go home.  He did not prescribe me Flomax even though I asked.  So I went home, I took pain killers, drank lots of tea, and sat in the hot tub.

Later that night the level-10 pain started up again, the pain that makes you want to die, the ‘renal colic’.  That was the second kidney stone the CT scan told me about.  By now I was an expert at pain management.  More on that later.  I also had a new prescription of Vicoden and anti-nausea pills from the doctor, and taking them along with some old Oxycodone I had from my knee surgery, I was floating on the clouds and able to eat for the first time in four days.

Drugs

By the way, the maximum recommended dose for the Oxycodone was 2 pills every 6 hours, and I was pushing that to the max.  For kidney stone pain, don’t hesitate (like I did) to take the drugs.  Don’t try to find ‘the right dose’ or be afraid of overdosing.  Just immediately take the maximum dosage.  Don’t be afraid to mix the Vicoden with the Ibuprophen with the Oxycodone and Acetemetophin and Aspirin.  Just do it.  It will stop the pain.  So what if it causes liver damage?  You already have kidney damage, and the longer you wait the worse its going to get.  Livers can heal from almost any kind of damage.  Don’t be afraid.  Overdosing on pain meds is not that bad.  You feel a sort of pressure on your chest, maybe like a hand is squeezing your heart, but its not painful, you’re already struggling to breathe, and its nothing compared to what you’re going through with the kidney stones.  Don’t tell me you like pain!?  Take.  The.  Drugs.

At the most extreme moments of pain, if someone had offered me a shot of heroin, I would have accepted.  Well, maybe not a shot.  Maybe a pill.  Fun fact:  did you know Heroin was originally and legally sold in pill form?  It was invented by Bayer and marketed as a “non-addictive Morphine alternative”.

Levels of Pain

At some point the pain dropped to a level-8 style pain which lasted a few hours before dropping to a level 3.  I conclude that the level-10 style pain is when the kidney stone is in the upper part of the urethra and only blocking the one kidney, and the level-8 style pain is when the stone has passed through the bladder and is in the lower urethra.

For the level 8 pain, the bladder is taking the swelling now, not the kidneys, which is something the bladder is designed to do.  So the pain is less, and lasts less as the lower part of the urethra is shorter, more flexible, and can take more pressure.  And then the stone passes, the pain subsides, and you merely feel like you got kicked by a goat.

The pain doesn’t instantly vanish.  We are talking about draining fluids here so it happens gradually and it is almost a surprise as you realize you haven’t groaned or it didn’t hurt to breathe that time and you check your pain and suddenly its not there.  You had been avoiding deep breaths, avoiding thinking about the pain, pretending it wasn’t there, that it is now difficult to cast your thoughts in its direction.

When do you know the stone passed?

The only sign to say ‘now is the moment of the passing of the stone’ is that you had to pee.  It won’t be a huge pee.  Maybe just a trickle.  And there won’t be a stone, nothing you can see anyways.   The size of the stone is just a few millimeters, and it slowly wears away as it grinds its way through your tubes, and when it actually comes out its maybe the size of a grain of sand.  It dissolves in your urine too.  At best you will probably see little ‘flakes’, which might be the pieces of the kidney stone or it might just congealed blood from your kidneys.

But the important thing is, the pain is gone.  All that’s left is a low level pain, the residual aftereffects of a distended kidney which needs time to heal.

That brings my story to today, late Thursday / early Friday night.  I am able to pee profusely, not just in little trickles, but great streams of it.  It’s coming out bloody.  This alarms me greatly, and is nauseating to see, but its normal to have a damaged kidney, and blood is normal when something is damaged, and I am assuming it will heal.  There are little flakes of red that I assume is dried blood, meaning the damage is old.  Some are disturbingly large.  I think that must be skin.  Or kidney pieces?  I have one stone left in my kidney.  It doesn’t block anything, and doesn’t cause much pain, but it’s still slowly damaging the kidney.  Maybe that’s what’s happening here.  If I see fresh blood or it doesn’t seem to be improving I will go to the Emergency Room.

 

What I learned about pain management:

There’s several different types of pain management.  They can be combined, or separate.

  1. Stay very very still. The body can adapt to anything.  Even constant pain, as long as it is consistent.  Eventually the body will tune it out.  The problem here is, you have to breathe.  You are so sensitive, even the smallest breath agony.  I was never able to fully just ‘ignore’ the pain, but it did help to take small breaths and breathe in and out through the nose.  And of course, not move.
  2. Distraction.  This is what it says – you distract yourself with as much stimuli as possible.  This was pretty tough with such severe pain.  Watching TV just gave me a headache.  Texting and the like took too much concentration.  The only thing that worked was extreme changes in heat and cold.  I would turn the water to max hot, then after a while to maximum cold.  Repeat.  During those moments of ‘brr thats cold!’ I wasn’t thinking about the pain.  In bed, writhing was the best distraction.  You try to limit it to your arms or head, not the whole body.  There’s a lot to be said for good writhing technique.
  3. Displacement.  This is moving the pain somewhere else.  It is the old joke where someone says they can cure your headache then punches you in the stomach and says ‘I bet you’re not thinking about your head any more!’  As sadistic as it sounds, it is a valid form of pain management.  You just punch yourself in other parts of the body.  When Jim Carrey was filming The Grinch, the suit he was in was so painful they brought in a Marine trainer and taught him to punch himself in the thigh.  I also had to use this technique while watching The Grinch.
  4. Pressure.  When you get a cramp, you naturally stick a fist into that part of the body and push.  This cuts off the blood flow to the pain cells.  Acupuncture attempts to cut off signals from nerves to reduce pain.  It may be just distraction but it seems to help.
    When I was laying in bed, I found that putting the ice pack into a hard little ball and pushing my back into it helped if I did it in a very specific spot.  It was almost right on the spine, between the spot of the pain and the spine, right where I imagine the kidney to touch the spine.  There’s no actual pain in that spot, but applying sharp pressure there seemed to cut off much of the pain.
  5. Ice Packs.  The simplest and most effective means to reduce the pain of a kidney stone is to slap an ice pack on that kidney.  Why no one else seems to mention this, I don’t know.  Maybe it works for only me.  Ice is a tried-and-true pain reliever, so maybe its so obvious no one feels the need to mention it?  ‘Duh of course I used an ice pack while I had my kidney stone’?  I don’t know.  Doctors don’t mention it, the internet doesn’t mention it…. anyways, use an ice pack.
  6. Drugs.  Oxycodone and Ibuprofen all the way.  Any sort of pain killer.  Start taking them right away and don’t be afraid to take the max dosage.  You’re not going anywhere, you don’t need to drive, you’re just going to be lying in bed anyway, and nothing could be worse than how you already feel.  It can only make things better.  Vicoden made my hairs stand on its edge and ultra-sensitive to light and sound and my own body odor (Or maybe it actually made me smellier?), so I prefer Oxycodone.  Caffeine also is great.  It’s not a pain reducer per se, but it makes you feel better.  So while the pain will be the same, you just won’t mind as much.
  7. Mental focus.  This is a little trick of long-distance runners where they mentally focus on the pain and try to think of it as an external phenomena, something to be analyzed and categorized outside and separate from the rest of the body.  It takes a while, but it does work.  You become extra sensitive to each little spasm and eventually you will find yourself thinking things like ‘oh, that was a super strong wave of pain there!’  Sounds corny but it works.  Just it doesn’t work very well for kidney stones.  It takes a lot of concentration and the pain is just too much.  I found it more effective to lie very very still (#1) and take drugs (#6).
  8. Placebo effect.  Meaning anything you read on some website or advice from your friends how they ‘know someone’ who had a kidney stone and they say ‘such and such’ works great.  Do it.  Eat it.  Whatever.  It will help.  Even if it contradicts common sense or something else, the power of belief can work wonders.  In clinically controlled trials of painkillers vs. placebo, the placebo worked to reduce approximately 3% of pain.

For my kidney stone, I used every one of these techniques together.  Combined with the hot tub, there were rare moments where I didn’t feel any pain at all.  It was almost pleasant.  I’m sure the drugs had a lot to do with it, but lying very very still as a hot jet of water pummeled my back, pushing the pressure point at my spine, an ice pack on my neck while I massaged my temple, all while focusing on the pain and trying to analyze it, worked wonders.  As I write this, I still have a fourth kidney stone that has not blocked anything inside my body.  Its floating around in my kidney and will start moving down the urethra any time now, but I’m not dreading it.  I think I can control the pain.

 

Follow up:

Doctor said I needed to see a specialist, an urologist.  The urologist wouldn’t see me since I didn’t have the right insurance.  Everyone I called said they didn’t take my insurance either.  Apparently it’s straight Medicaid, the poorest persons insurance, and those hoity-toity specialists don’t usually take it.  I just went on my insurance’s website, just now, and searched for Urologists within a 100 mile radius of my zip code.  None was found.  So now I don’t know what to do.  I guess I will just wing it.  If the blood doesn’t stop in a day, I go to the Emergency Room.  Again.

 

Sitebuilder to Dreamweaver

We’ve made a lot of sites using Yahoo Sitebuilder.  It is free and actually what you see is actually what you get.

But its time to change.  We’re going all wordpress.  But its tough because sitebuilder code is not compatible with anything else.  If you try to open it in dreamweaver you get a jumbled mess.

So I wrote this script in php to convert sitebuilder files into something dreamweaver can read.  Just Upload the sitebuilder2dreamweaver.php file into the directory you want to change, and then browse to it and follow the instructions.

Here is a link to the file:

http://www.johnktejik.info/sitebuilder2dreamweaver.zipx

(You may have to right click -> save as)

sitebuilder2dreamweaver