Friday, January 9, 2009

Seven Things Meme...

Thanks to Jason Sweat, I was tagged with the "Seven Things" meme.
  1. My first computer was a Commodore Vic 20.
  2. I learned basic with my brother. We miss-typed the commands needed to load a program we had typed in and the error message was not consistent. Eventually, we started to figure out the key commands through trial an error. We were as far as peek and poke when we went out and purchased a book. Yes, we randomly tried words and actually found peek and poke. Really.
  3. My first paid programming job was when I was 13 or 14. It was with a partner that was facilitating the hardware needed to build and deploy the system.
  4. My first online ID was Wishmaker. I was put on the spot and the owner of the site asked me what I liked to do. I like making people's wishes come true, hence "wishmaker". I am still known as wishmaker or TheWishmaker on many sites.
  5. I cringe whenever scenes in movies mention torture, pliers, and finger or toenails, from personal experience.
  6. Finding more people to tag is actually possibly going to be harder than coming up with the facts to share. (and no, I am not counting this fact)
  7. An off duty police officer in the US can get from his house all the way to squealing his tires in pursuit in about 30ish seconds. One of my friends, named Jason, but not related to the tagger above, thought it would be a good idea to "salute" said officer with both of his middle fingers. One a positive note, while he and his friends pursued us for over 30 minutes, they did not catch us.
  8. Sun described my architecture as having "near linear scalability". Their tests actually showed what the architecture was designed for, linear scalability.

I would like to tag:

Oh, and the rules: Mention the person who tagged you, post seven things people might not know about you, then tag seven more people and let them know via post to their blog or mention on twitter.

Jacob

Kindle Takes a Dive and Publishing Quality Books

I have been surprised at how much I use the Kindle, and the kinds of issues that I find. Some of the issues are good, some are bad. First, let me start out on a positive note. The other day, I was paying for something and managed to drop what I had in my hands and in a reflex action, drop my Kindle as well. I quickly picked it up and looked at it. It looked fine at first glance and was showing what I had been looking at. I finished up at the register and sat down to take a closer look. It turned out that when hitting the tile from about 4 feet up it had popped part of the case open. A slight bit of pressure snapped the case closed again. If you look really closely, you can see a small bend in the seam. I was quite happy and figured that the Kindle took the fall quite well. Then, I tried to turn the page. To my horror, the UI did not change. At this point, I remembered that the Kindle did not require any power to keep the UI looking the same. I was now worried that it was completely dead. I tried the lock/unlock keys. That did not work. At one point, it occurred to me that I might be able to hold down the lock/unlock keys. When I tried this, nothing seemed to happen. Then I noticed that the menu slider was growing up the side. I let go of the keys and it went back down. This time, I pushed the keys down and waited until the line made it to the top. A few tense seconds later, and my Kindle was perfectly happy and working normally. I do not, in any way, fault Amazon for those tense moments. I am quite happy that my device managed to make it unscathed through the drop. Modern product engineering for tech toys seems very good compared to the older products I remember.

As I have previously discussed, some of the books available on Kindle are well formatted and some of them are not. I have looked a little further in a few books that I have read. I have also looked a little bit online. It appears that the Kindle eats source code when processing contents. I think it is the Kindle's built in support for HTML at play. Anything that looks like an open tag is suspect. In one of the two books I have just completed: Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin Series) I noticed that many sections of code would not compile. I started to pick up the pattern pretty quickly. In source code, you have to be very careful to tell the Kindle to not apply formatting to it. If you don't, you will get odd results.

In section G33 at the end of the book, there is a piece of code:
if(nextLevel tags.length)
I believe this should have a '<' but it was stripped out:
if(nextLevel < tags.length)
This is not a big thing, but when you start to encounter tables and images that you cannot zoom, hyphens where they should not be, and missing pieces of code in a book about clean code, it starts to get a little frustrating.

Since I am working on a book that I would like to publish and have available soon, I started to look into what it would take to get the book formatted correctly on the Kindle. I did find this quick overview of Kindle Formatting. I guess this answers one of the questions that I had earlier. Why aren't all books available for Kindle? It is probably really easy for most companies to publish their books to Kindle. Making the book look good on the Kindle might require some effort.

I have also just finished reading "Aiming at Amazon", which is a self publishing guide for publishing books for the Amazon market. This was a really good book. I look forward to finding out if the tips and techniques still apply today. Did you know, that if you are updating a print-on-demand book, it will show up as "out of stock" while you are proofing? Has anybody out there setup a self-publishing operation?

Jacob

Wednesday, December 31, 2008

How To Set Your Baby Down Without Waking Them Up?

I have found an interesting technique that allows me to set my baby down into a crib or bed without waking him up. Typically, if I get my baby to sleep in my arms, he will wake up when I lay him down. All new parents know how frustrating this can be. It can be particularly daunting when they are teething and being awake means discomfort and crying.

I started thinking about what might be happening to wake them up. My first thought was that changing the angle they were on, from vertical to horizontal, was the issue. With my first child, I would carefully sit down in bed up against some pillows and slowly lower down until they were horizontal. This would take a long time and would still frequently wake the baby up.

Recently, I wondered if it might be the change in pressure when setting the child down. Here they are, in a nice comforting hug basically with pressure on their stomachs, chest, legs, ... and when they are set down, they are on a harder surface, and that comforting presence is removed.

Now what I do, is carefully set the baby down. I do not worry about them waking a bit and opening their eyes. That is sadly bound to happen. I then put both of my hands on their chest with fingers splayed and press about the same amount that they were getting when over my shoulder. Please make sure that you do not press too hard. This should basically be a reassurance that you are there and love them. I then keep pressing for a few seconds. The moment the baby relaxes again, I put a blanket on and walk off leaving a peacefully sleeping baby behind. No crying, no fuss, just a happy content baby.

Please let me know if this works for you, or what you do to get your baby down to sleep.

Happy New Year!
Jacob

Tuesday, December 30, 2008

How to Zoom on Amazon Kindle

As many of you know, I am a fan and user of the Amazon Kindle. I have been reading lots of books on it recently (roughly 2-5 per week). When reading books with tables and images, I frequently find that they are too blurry to read. For some reason the font does not make solid lines. I am assuming there is not enough supported shades of gray to be able to draw the appropriate shape. Recently, I was trying to transfer a table off of the kindle by "Save Page as Clipping" or "Add Highlight". I found the context sensitive menu on the right had a "Zoom" option. When you "Zoom" an image or table, it frequently rotates to be in landscape mode and makes the image or table larger. Images and tables that have been "Zoom"ed on the Kindle are much easier to read. Here is a quick example of how to "Zoom" an image from Professional Search Engine Optimization with PHP: A Developer's Guide to SEO I have been enjoying this book. It is a great combination of SEO (Search Engine Optimization) advice, introductory material, and an explanation of how to actually implement solutions with code samples. Thank you: Jaimie Sirovich and Cristian Darie.

I start on a page that has an image that I would like a clearer look at:
Move the scroll wheel up to the position of the image:

Push the scroll wheel and select "Zoom" from the menu:


And then enjoy the "Zoom"ed image:
When looking for an example to snap pictures of, I found out that not all images or tables work this way. For the books purchased on Amazon, the ones that I have tried have worked. For the documents that I have sent myself using their email conversion, I have yet to see one work.

Hope this helps people enjoy their readers more. Lack of definition of images and tables was one of the few things that I did not like about my Kindle. I am very glad that they have this feature in the Kindle today. For what it is worth, I am running the latest version of the Kindle software as well. To upgrade, connect to wireless and put the thing to sleep using "ALT+aA".

**update** Sadly, one of the books that I purchased for the Kindle does not have zoom support. It looks like this might only work if people do some special formatting.

Jacob

Monday, November 24, 2008

Is it a good thing for science to try to re-create the brain's power?

This blog post was inspired by something that was shared with me by TimesToCome.

IBM gets DARPA cognitive computing contract (The blog subject came from this article)

The world is trying to recreate the brain. Is this a good thing? I think it is a good thing. I don't know where it will end up. I may, in the end, feel like working on this kind of research was a mistake. If things end up in a Terminator kind of world, that would be bad.

I would like to understand why human brains take so little power and yet can dwarf my laptop in terms of flexible processing capabilities when my laptop heats the entire room when taxed. I think there are other models for processing that will yield very efficient results. Many of the biggest advances in industry are the result of someone taking the processes or procedures from one industry and adapting them to another. Can we take some of the manufacturing floor processes and procedures and port them over to help us understand and manage our email flow? Seems like a good idea to me.

If humans can create a brain that is simple and yet able to learn and efficiently carry out some tasks, that should give us more insight into the workings of our brains. More insight will lead to better understanding and improved ability to repair. I believe it will also give us some new computing models. Massively parallel influence based models. I think people will be surprised by a few things. 1. The brain's inputs and outputs are simpler than we currently expect. 2. The processing model is massively parallel. 3. The brain and input devices (eyes, ears, ...) are not as all seeing and all computing as we think they are. One example that I created during a discussion with someone near and dear, was that of peripheral vision and analyzing objects. People think that they constantly understand and can see everything around them. You know that there is a white van over there and think you know just what it looks like. It even feels sharp in your vision while you are looking somewhere else. Stop. Pay keep your vision firmly focused on one spot. Pay attention to the van. Can you really see it? Are the lines sharp? I think we are excellent parallel processing and filtering machines. We glance around quickly, stop on the van for a millisecond or two. Determine that it is a white van and move on. This object is now tagged. We have not really looked at it for a while. There are tons of details that we could have seen if we spent serious time looking at it. In the background, we are scanning objects that we are tracking. Have they changed? Try having a conversation in a parking lot. Pay attention to where your eyes go. I found that mine keep hopping from object to object making sure that they are still there, have not changed, and trying to decide if there is more to look at.

Evolving the entire human brain would be interesting. I think we would gain valuable insights. These days, I think I would just take small improvements. There are many logical actions, based on the context, that computers can safely take for us. Why aren't they? So much of our lives goes through the computers and it feels like we have to baby them through step by step. There has to be a better way. If computers were not just gophers that were sent to do specific tasks manually, and instead actually took appropriate actions based upon your wishes, I think world productivity would increase.

Jacob

Saturday, November 22, 2008

Building Life Part 1 (Withdrawal...)

I think I am experiencing withdrawal from PHP|Works and Py|Works. I had a great time in Atlanta. I was able to see lots of great people, spend time looking at at thinking about things I love, give a talk on AI and Artificial Life, and spend time working on my Artificial Life project.

A few months ago, I decided, on suggestion of Travis Swicegood, to revive my Artificial Life project of evolving group hunting and group defense among artificial life forms. This project was an excellent learning opportunity and I achieved most of the results that I set out to do. It started out very simply. I created a world with plants and added prey. I hand coded the prey so that they would be able to use antenna (a smell based system where smell decreased proportionally with the distance squared) to get to the plants near them and eat. This worked relatively well. Now to bring on the competition.

I started with simple predators that were the same model as the prey, but were following the "prey" antenna instead of the plant antenna. In my model, each pair of antenna would give information on only one scent. In order to handle multiple scents, the system would have multiple sets of antenna. Now I had predators hunting prey that were hunting plants. My world was charging creatures for each time slice, how far they moved, and how much they turned. The predators were able to keep alive for only a little while before they ran out of juice.

Now was time to add evolution into my "evolving group hunting and defense" project. I created a simple neural network, gave it nice high-level inputs and had it output neurons for speed (high, medium, stop) and turning (left, center, right). Remember that the predators were not living too long at this point. The very first time that I ran the evolving predators from a random start, the second generation did not die. One of the predators lived so long and ate so many prey that it actually wrapped the health counter to a negative number while the debugger was attached. Ouch. So much for my hand coded algorithm. At this point, the game was really on. I quickly modified the creatures to have a maximum lifetime and health count. No more infinite life or infinite energy. It also ensured that a trial would run for a maximum of around 37,500 clock ticks. Prey and predators were switched to evolving neural networks and physiology and were never switched back.

I have had several questions from people about how I managed plant populations and generations of predators and prey. Plants are replaced as needed to keep the population steady after every move cycle. Plants are centered on one of the four quadrants randomly chosen with a random distance (there is a multiplier that can be adjusted to make them more or less clustered). Prey and Predators have a similar methodology for being replaced. Once an entire generation of prey or predators are dead, a lottery is held. Each creature starts out with one lottery ticket, just for being alive. For each point of health that they have consumed in their lifetime, they get an extra ticket. This means that even completely ineffective creatures may have the ability to breed. It also means that you have to finish an entire generation before you can get more food. A single prey off in the corner can make it pretty hard for the predators to eat.

Jacob

Thursday, November 13, 2008

All Things Amazon

I have been using and thinking about Amazon products for a while now. I have even started to use more of them. One odd thing hindering me is that most of my account usage recently managed to be under my wife's account. I think I was trying to track a package that she had ordered, but the net effect was that my browser remembered the settings and started automatically logging in as her. This has had a few interesting complications.

I have been wanting an Amazon Kindle for a while now. I actually liked the idea so much that I borrowed one from my aunt. I loved it. It still seemed like too much money, and the screen refresh rate was a little too slow for my reading speed. I was at my birthday party recently and was telling my aunt, from across the room what I had been hearing about the new version of the Kindle. I had already decided to purchase the new one the moment it came out. Note to self, "Never talk about the new version of something before opening the gifts." You will never guess what I received for my birthday. Yes, an Amazon Kindle. I love it. I use it constantly. It allows me to take multiple books with me without having to actually haul multiple books. I still am not terribly happy with the speed at which it swaps out pages, but I find that I am getting used to it. As one other kindle user mentioned, it is faster than manually flipping pages. Me, I think I flip pages faster than her, but to each their own.

Now, you are probably wondering what my wife's Amazon account and the Kindle have to do with each other at this point. I was at the party and registered the Kindle with the account that I have been using (my wife's). I then purchased a Guy Kawasaki's book Reality Check and started reading. Later, I found one of the top sellers, the Warren Buffet biography, at 60% off and purchased it too. Now I am in an interesting position where a couple of the books I have purchased will go away if I start using my account again. I want to register it to my account, but do I need to purchase the books again? I have finished and loved Reality Check. I don't want to do without it. Guy is going to send me a copy, but I might just buy it on the Kindle again. I want it handy. I have had several times where I wanted to club an entrepreneur over the head with one of his blog entries or a chapter in his book. I am thinking about starting to buy copies and have them shipped to the entrepreneurs. Transferring documents to your Kindle is as easy as sending the document to an email address and paying $0.10. Quite worth the price. I will likely be translating online documents into the Kindle for reading offline. I prefer the paper like look and feel and I find it is far less stressful on my eyes than looking at even a great computer monitor.

Another Amazon service that I have signed up for was Amazon Prime. I love the service. I pay a bit, but I get two day shipping free. I typically paid more for the shipping since I usually want books right away. Now, I can purchase more often, in smaller increments, and get the books faster. This too was signed up for under my wife's account. I have heard that I can share the Amazon prime account with my other user, so this one should not be too bad.

Amazon SaaS offerings sound really interesting. I know lots of people that are using them. I have spent some time with their chief evangelist. With their recent round of new offerings (block based storage and load balancing) I think they have a very complete offering. I have been using Amazon products and services for a while now. I have enjoyed them and plan on enjoying more soon.

I am also working on a book with several colleagues, "Technology Leadership in Silicon Valley". We are currently looking for a good publisher. Let me know if you are interested in providing feedback, quotes, or know of a good publisher.

Are you using the cloud? Amazon Prime? Kindle?

What do you think of them?

Have you read Guy Kawasaki's Reality Check yet?

Jacob