Banana Oatmeal Bread
24 July 2009 at 21:09
I made some very good banana bread tonight:
- Cream 1 cup of sugar and a half cup of butter and a healthy tablespoon of honey.
- To that, add two eggs, a teaspoon of vanilla extract, 3 ripe bananas, a pinch of cinnamon and a pinch of nutmeg. Drop in 4 tablespoons of sour cream. Beat it silly.
- While that is mixing, in another bowl mix 1 cup of whole wheat flour, 2/3 a cup of AP flour and a cup of quick cooking oats. Mix in a teaspoon of baking powder, 1/2 teaspoon of baking soda and a pinch of salt.
- Slowly add that to the mixing wet ingredients.
- Pour into a greased 8x8 baking dish.
- Chop together about a cup of oats, about a cup of brown sugar and 1/3 cup of butter. I added about a tablespoon of flax seed to this.
- Sprinkle that mixture over the top and bake at 350f for 40 minutes or until the center sets.
It's good alone and great with a scoop of ice cream or some peach slices. I think it could also be nice with a few nuts or raisins thrown in the batter.
Salting Passwords in plain sight
24 July 2009 at 18:57
Interesting method of creating a unique salt that can only be derived from the password being encrypted. If you used a salt created by an algorithm based on something known, an attacked who had access to the DB and the salting method could devise a cracking mechanism.
But with this, even if you have both of those you would still not be able to crack the password without trying every possible password against itself - a feat that approaches impossibilty.
Forking PHP
23 July 2009 at 16:10
Filed Under: coding, php
Interesting code used to fork long running processes in php.
The first script, prefork.php, is for forking a given function from a given file and running n children that will execute that function. There can be a startup function that is run before any forking begins and a shutdown function to run when all the children have died. The second script, prefork_class.php, uses a class with defined methods instead of relying on the command line for function names. This script has the added benefit of having functions that can be run just before each fork and after each fork. This allows the parent process to farm work out to each child by changing the variables that will be present when the child starts up. This is the script we use for managing our Gearman workers. We have a class that controls how many workers are started and what functions they provide. I may release a generic class that does that soon. Right now it is tied to our code library structure pretty tightly. We have also included two examples. They are simple, but do work to show you how the scripts work.from: http://brian.moonspot.net/php-fork
The true keys to success in business...
24 June 2009 at 12:34
are a borderline personality disorder and a learning disability.
confusion
The honeymoon is over
21 June 2009 at 09:35
I don't think the dog has gotten a decent nights sleep in a week. The cat thinks it's tail is an excellent toy that moves in such an enticing manner. She's remarkably mature about it. The dog just gets up and moves with a look of tired irritation. Poor thing.
Mark All As Read
20 June 2009 at 11:48
You know you've been busy when google reader stops estimating how many unread items you have left. I think it's time to declare rss bankruptcy.
Simple Rule #2
Simple Rule #1
18 June 2009 at 21:33
Software releases do not require a blog post. Also, using an exclamation point to declare "PHP 5.2.10 Released!" is just silly.
Protip for the bilingual
13 June 2009 at 21:38
If you speak spanish, always choose the spanish language option when calling customer service lines. It's a smaller market and you're likely to face less waiting time before speaking to a CSR. If you aren't - try it anyway. The CSR probably speaks English too.
The New Kitten
13 June 2009 at 20:45
If I had to guess my dogs reaction to bringing a new kitten into the house, I would have many ideas. One I wouldn't have is that the dog would be as thrilled as a five year old on christmas. Abbie was instantly fascinated by this little creature. She didn't act aggressive or worried. She just wanted to sniff the thing all night. We put the kitten upstairs behind closed doors. The dog sat at the door sniffing and crying for an hour. That got annoying so I forced her downstairs and put a box blocking the door. In the middle of writing the above paragraph I was interrupted - having to chase her up the stairs as she had managed to climb over the box and make it halfway up. What's most odd, is that she doesn't seem to act like it's a squirrel or new toy to chase. When we do let her close she lays her head down next to the kitten and cuddles. I never knew how much my dog wanted a pet.
obfuscate()
Bing is not google (but it sure is acting like it)
02 June 2009 at 15:47
I was mildly impressed with the launch of bing.com this week. It does seem to deliver what's promised much more than WolframAlpha did. However, I think it's a dangerous road that google and now bing are following. They purport to offer more relevant content as a service to the web. For example if you search a stock symbol, or "movies" or for images and videos their search results page will deliver the content directly. They're moving away from giving you a list of places to find content and information and toward just offering the information and content directly. This does add a great deal of value for their users. Unfortunately that value is stolen from the sites they've crawled. For example, I used bing's video search and was presented with a very relevant list of videos. I clicked on one and it began playing. Right there on bing's page. It's one thing to crawl the web and find relevant content to match your users queries. It's quite another to crawl the web, find relevant content, and then just use it with token attribution on your own site. Search engines have a symbiotic relationship with the rest of the web. Sites that provide content have to either make money to support the content they create or develop a deep community of contributors. By hijacking that content, the search engines are choking off the life of the sites, the visitors. Any content producer would be livid if someone copied their content and presented on their own without permission. Why should search engines be exempt from this? The search engines do have one powerful tool in their kit - they are the primary gateway for new users to find your site. It's rather like a bully taking your lunch but leaving you a couple of your carrot sticks. You could fight back... but then you wouldn't even get your carrots. It's rather ingenious how they've set this up. You can allow them to use your content for free, or you can complain and they'll comply... by not listing your site at all. Eventually, as doubtless they've planned, there won't be room in the market for competing content sites. If you publish on the web Google will gladly index your content and give it to their users without letting them out the door. If you'd like to get at least some of your fair share, they'll be happy to host your content for you. Just submit it directly to them. What makes this situation worse is that I've been using the word "they" rather optimistically. There's isn't really room for more than one gateway. As "not horrible" as bing is, it's not a real threat to google's monopoly. Twenty years ago AOL, Prodigy and compuserve set up their networks with exactly this intention. They wanted to be the single source of internet content for their users. With enough market share, one of them could have succeeded in being, essentially, The Internet. It would be a gold mine. However, their poor management choice and the presence of healthy competition foiled that plan and the internet blossomed. Today, however, there isn't a real competitor on the scene. Google effectively owns the internet and can use their power to enact that plan. All we can really hope for is that they'll take their slogan "don't be evil" seriously.
