Friday, December 21, 2007

It's never easy...

How often are you in this position: You are all in preflop against a dominated hand, say AQ vs AJ. You figure him for 3 outs. The flop comes 89T. No jacks, but now he is open ended. Then the turn comes and doesn't hit, but gives him a four card flush.

It just seems that more often than not, if the flop doesn't hit them perfect to beat you, they end up with more and more outs. Very seldom is the flop, turn and river dead for them. Doyle says "It's never easy..." and boy is he right.

Wednesday, December 12, 2007

What is beyond our Universe?

This is always a fascinating question to think about. What is beyond the universe as we know it? If we perceive our universe to be constantly expanding, what is it expanding into? Nothing? How do you describe nothing?

Is there life beyond our planet? If the universe is infinitely big, it would seem impossible that we are the only living thing in the vastness of space.

Interesting things to think about. Here are links to three things that are fun to take a look at:

From the Milkyway to Quarks. Zoom in from the largest to the smallest of things.
http://micro.magnet.fsu.edu/primer/java/scienceopticsu/powersof10/index.html

Imagining the 10th dimension. It's hard to grasp.
http://video.google.com/videoplay?docid=-97057222894136590

They're made out of meat, by Terry Bison. This gives you one man's hilarious imagination regarding how aliens may perceive us.
http://www.terrybisson.com/meat.html

TinyMVC

I had started on a PHP MVC framework many months ago. I got it working but never released it to the public. I think it is finished enough to let some people try it out.

TinyMVC is quite possibly the smallest, fastest and featureless ;) MVC framework for PHP. It's a perfect starting point for your application if you are starting from scratch, and want to adhere to the MVC design principle. It uses PDO as the model by default. It requires PHP5.

TinyMVC does not require a template engine, it uses PHP as it's view layer. However, you are free to bolt on any template engine of your liking, and there is an example for Smarty in the docs.

To try out TinyMVC, go to http://www.tinymvc.com/ (passwords have been removed.)

Read through all the documentation before you begin, it doesn't take but a few minutes. Let me know what you think. Feel free to report bugs. The framework is tiny (16k download), so they should be easy to find.

Sunday, December 2, 2007

Build your own $200 PC

I saw the $199 gPC at Wal-Mart, and wondered if I could build a better system for the same cost. So, here goes my attempt. This PC was designed for typical use: email, internet, word processing, etc. This is NOT meant for hard core gaming. I looked for the best bargain for the buck. No junk, just acceptable hardware for the extreme budget in mind.

Everything was put together from Newegg.com. For $203.93 (yes, I went over by a mere 3.93), I ended up with:

2.0GHz AMD Athlon CPU / Motherboard combo ($69.99)
Nvidia GForce 6100 (built into Motherboard)
512MB DDR RAM (2x256) ($29.99)
Black tower case with 430W power supply ($19.99)
160GB IDE hard disk ($45.99)
black keyboard/mouse ($6.99)
20x DVD +/- burner ($27.99)
black speakers (2.99)

All that for $203.93. Not bad!

Here is the parts list:

LITE-ON 20X DVD±R DVD Burner
Linkworld 3230-02C2222U Black Steel ATX Case 430W PS
EXCELSTOR 160GB 7200 RPM SATA Hard Drive
SpecResearch SP-250 2.0 Speakers
SpecResearch PS/2 Standard Multi-Media Keyboard/Mouse
Kingston 512MB (2 x 256MB) 184-Pin DDR SDRAM
ECS C51G-M754 A 3200+ AMD Athlon 3200+ 754 NVIDIA GeForce 6100

I could have saved even more by excluding some luxuries such as DVD burning, less hard disk space and less RAM. I did put myself on a budget of $200, so I gave myself the most I could get.

Now lets compare this to the$199 Green PC available at Wal-Mart:

1.5GHz CPU
80GB hard disk
DVD ROM (no DVD burning)
VIA UniChrome Pro
Linux/OpenOffice (you can download for free)
Fax-Modem (who needs that? add $5.99 to my cost if you need it.)

So, it seems my home-build system is faster, has double the hard disk capacity, a DVD burner, and better video capability. Not to mention the Linkworld case looks better, and better built IMHO.

So there you go, build it yourself (or have your kid do it, it's not hard), and you can get a lot more computer for the same cost.

Tuesday, November 13, 2007

poker programs steal window focus

One very annoying "feature" of most poker clients (such as PokerStars) is that they constantly steal the focus of your currently active window. How often have you accidentally typed a password or a private conversation to everyone at the table? Fortunately, there is an easy way to fix this for Windows (I'm using XP, I haven't tried Vista.) The instructions are here.

Wednesday, October 17, 2007

How to not go broke playing on-line poker

You consider yourself a good poker player, better than most. But, it seems like you relentlessly go broke. Bad beats seem to consume you. You can't overcome the inevitable sucks-outs that eventually deplete your bankroll. How do you survive?

Typically the problem is bankroll management, and this is coupled with self discipline. Even if you are the best player, you will get bad beats, and gambling too much of your bankroll is a big mistake. What is even worse, many players will gamble an even bigger chunk of their bankroll to recover, play on tilt, and lose the whole thing. That is self discipline that needs corrected. So instead of just preaching about it, I'm going to give you three discreet rules to follow.

Rule 1. Never gamble more than 5% of your entire bankroll. Don't sit down at any table, any game for more than 5%. One exception is if you only have $10 or less. You could stick to penny poker, or just gamble a bit more (10%) until you are lucky enough to reach at least $50. Once you hit $50, lock in this rule.

Rule 2. If you decide to play a no-limit or pot-limit cash game for 5%, leave as soon as you double up your stake. Why is that you say? If you are gambling 5% and you double that to 10% or more, you don't want to open yourself to the opportunity of getting busted for 10% of your bankroll. Leave and start over. If you like playing a monster stack, just play lower limits so that stack is 5% or less of your entire bankroll.

Rule 3. If you enter a large tournament, don't gamble more than 3% of your bankroll. Large tournaments are going to be more difficult to cash, and the payback may not be so much unless you get really deep. If you are entering a rebuy tournament, estimate your rebuy/add-on total into that 3%.

Now, about self discipline. If you end up on a losing streak (and you WILL), you must drop down to lower stakes until you recover. Sometimes that means dropping down two, or even three levels of stakes if the going gets tough. What you have to overcome is the frustration of moving down, and this is just a part of playing poker. You will get bad runs, and temporarily moving down to lower limits is just part of the journey. It is also possible that you are playing limits that you are not yet profitable at. Even so, moving down, then back up when you regain your bankroll is going to keep you alive while you learn those higher limits.

That's it. If you try these three rules, let me know how it goes!

Oh and by the way, these rules apply to live poker too. Keep yourself a bankroll set aside just for poker. The vast majority of poker players just take whatever money they have. Sometimes they win, sometimes they lose. They really have no concept of how much they win or lose overall. But with a bankroll set aside, all of a sudden you are faced with the realization of whether or not you actually win or lose playing poker. Good for you! If you can't keep that bankroll alive without a constant feed from the paycheck, you might want to try these rules :)

Thursday, September 27, 2007

first iPhone app

I wrote my first web-based iPhone app. It's ridiculously simple yet useful, a car lease calculator. Now when you're haggling for that payment price, you can look it up yourself :) It works in normal browsers too, have a look.

[edit: moved to motortopia.com]

http://www.motortopia.com/mobile/lease

Sunday, September 23, 2007

The iphone drama

Yes, the iphone. It has been the talk of the town since June. Although I had not seen one in person, I wanted one. I never bought a PDA. I wanted to wait until the day I could easily do everything on one device, most notably:

* talk on the phone
* surf the web
* read email
* listen to music

I stress the word easily. The iphone is the first thing I've seen that lives up to this dream. I tried a few of the Smart phones such as the 8525 and 3125 from Cingular. They were, to say the least, difficult to work with. The 8525 sucked as a phone, and pretty bulky. The 3125 just wasn't too usable except as a phone, and it was sluggish.

Now that the price came down considerably, I ordered my iphone. It will be arriving next week. Also, I got a hold of a friend's iphone a few days ago and played with it. Although you could nitpick about a few things (3G, GPS, replaceable battery), even as a version 1.0 product it is MILES ahead of the pack. This has to be, by far, the most profound gadget in history.

I gave it the girlfriend test. She uses a Mac for Safari, Mail, and Microsoft Word. By no means is she a gadget user. I handed her the iphone and said, "Go to catster, look up your cat." She did it on her own, and quite easily. No coaching, no prior use or guidance of the iphone. Then I gave her my 3125 and said do the same thing. It took her at least a couple minutes to figure out how to use the soft-keys. Then she found the web browser, I had to help her a bit to get the URL prompt up. She did know how to punch in letters, she must have SMS'd before. But she couldn't figure out how to type a period "." without some help. Now as far as viewing the page in mobile IE, well let's just stop there.

No, I'm not a mac geek. I've used Macs, and I like them. I have a Mac at home. But I still use Ubuntu and Windows primarily. Why? A few reasons, but mostly because the poker clients I use are not available on a Mac. Poker Stars, are you listening?

Thursday, April 19, 2007

Getting weather in PHP

Just a quick tip how to get weather from weather.gov using their SOAP WSDL weather service. You will need to know the latitude and longitude of the place you are getting weather for.

First, make sure you have the --enable-soap extension installed.

Then it is just two lines of code:

$client = new SoapClient('http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#NDFDgen');

$result = $client->NDFDgen(40.7893,-96.6938,'glance','2007-04-20T00:00','2007-04-21T00:00',NULL);

More information here:

http://www.nws.noaa.gov/forecasts/xml/

Monday, March 26, 2007

controlling tilt

I went up to the Horseshoe casino Saturday evening and played some 2-5 No Limit. I bought in for $300 and walked out with $800 about six hours later. It was a pretty successful night of poker. I thought I'd mention one interesting hand regarding tilt.

There was a guy at the table talking a lot most of the night. It seemed he wanted everyone to know he's quite the seasoned player. Good for him. At one point during the night he decided he was buying the blinds from the small blind, and raised a pot-size raise with four limpers. One caller from the button, the flop came 89J, rainbow. The small blind makes a comment "Well, if you out-flopped me, you got me." (weakness?), and moved all in for about the size of the pot. The button called and turned up TJs. The small-blind scoffed and turned up K9o. He didn't catch up, and started ridiculing the button's play. "Interesting play. You'll go broke playing like that. Just keep it up." Then someone at the table shook their head, and then he decided to get in their face about it.

The guy is shaking his head because Mr. brilliant raised out of position with K9 and lost his bankroll. Obviously he picked the wrong hand and the wrong time, and it was unsuccessful. But my question, why ridicule the winner?

To be honest, I can't think of a good reason to ridicule another player. If he outplayed you, you make yourself look even worse. If the other guy make a horrible play and got lucky, so what? You want those players at the table! A nice hand sir! is in order! Make him feel good about his chase, he'll give up his money sooner or later. Are you trying to teach something? What for?

OK, we know the most probable reason: tilt. You have to learn to control your emotions. Getting a bad beat can be a tough thing to deal with. The other players know what happened, you don't need to explain anything to them. But the better they see you control yourself, the more respect you'll gain from them. And, it makes you feel better about yourself, and thats a little something that goes a long way to making you a stronger player.

Monday, February 26, 2007

The hottest hot sauces

You like hot sauce? This is a comprehensive list of hot sauces and their "scoville" ratings. I personally own a Dave's ultimate insanity (90,000 scoville) and Mad Dog 357 special edition (600,000 scoville), both too hot to take straight on. I couldn't imagine 16 million scoville. Use at your own risk.

Sauces and their scoville ratings

Friday, February 23, 2007

Poker Odds Calculator

This is a project I worked on last year. It is pretty useful for a lot of odds calculations such as poker, keno, etc. It has a very raw interface, but at the same time very flexible. You can also do simple Binomial Coefficient calculations, which is what the poker calculator is based on.

Monte's Poker Odds Calculator

Thursday, February 22, 2007

Joost: The future of TV?

I just got myself a beta invite to joost.com. Its an IPTV startup, created by the makers of Skype. So far, I'm very impressed with it. Think streaming TV, full screen. Think TV shows, without the need to torrent.

Currently it seems to be on-demand content only. Fifth Gear, Worlds strongest man competition, cooking shows, etc. I'm sure this will only get better as they make more deals with large broadcasting companies. This should quickly become a good alternative to cable or satellite TV!

Friday, February 16, 2007

The truth about KENO

Over the years, I hear people talk about playing KENO now and then. Many claim to make money at the game, know someone who is a professional KENO player, or have some sort of number choosing system to help them win. There aren't too many sites that lay out the plain truth about this gambling game. Hopefully I will be able to change that, and make this crystal clear :)

So, lets start out by getting right to the point. KENO is a lottery game. That is, it is a game of chance. A game of luck. Much like BINGO, there isn't any specific strategy or number picking "system" that is going to enable you to beat the odds. KENO may give the illusion of your control by picking numbers, but the odds are always going to be against you no matter how you place your bets. The ONLY way you are going to win at this game is with luck. On any one given night, you may be lucky and win. That's why it is played. But over the course of time, the odds will almost inevitably catch up to you. I say almost because you could strike a big payout, like in the tens of thousands. But not likely. You have a better chance of being struck by lightning!

On average, playing KENO will pay back about .69 cents for every $1 you gamble. That means, if you gamble $1000.00, say, over the course of a year, your expected return will be somewhere around $690.00, or you lose $310.00 total. Those are some grim numbers. The house has a 31% advantage! You are much better off playing slots, where the house may have a 1% or 2% advantage. Blackjack and Craps, the house has around a 1% advantage assuming you play "by the book", no mistakes. Even Roulette is somewhat better, with the house having a 5% advantage. So if you have a choice, play something else!

So why do we play this game with such a terrible odds against us? Probably because of the allure of making one dollar into thousands with one ticket. These chances are extreme, but they are there. Unlike a game such as Blackjack, where the wins and losses are pretty linear with your bets.

Now for a couple of analogies to clear up exactly why number picking systems do not work.

Lets say we have a bowl of marbles, 7 black and 3 white. If we pull a random marble out, we have a 70% of getting a black one, and a 30% of getting a white one. Let say we bet a dollar, and we win a dollar when we draw a white marble, and lose it when we draw a black one. After 1000 games, you are very likely going to lose about 70% of them, therefore losing a lot of money. I suppose it is possible to come out ahead, but the odds are pretty astronomical.

Now we can compare that analogy to KENO. At any one night of playing we can win, just as we can draw a white marble from the bowl now and then. But if you keep playing, keep putting your money in, you will see in the long run that the odds of coming out ahead are pretty slim.

But KENO lets me pick which numbers to play! OK, lets play out this analogy. Lets say instead of 7 black balls and 3 white, we have 10 balls, numbered 1 through 10. Each time you play, you get to pick 3 numbers out of 10. If you draw one of your numbers, you win a dollar. If not, you lose. It should be fairly clear that whether you pick 3 numbers, or just color them black and white, the odds of drawing 1 of the 3 balls out of 10 are always the same, about 30%. So although it may seem to help by picking numbers, the odds don't change at all.

Well, I can play the same numbers until they don't come in four times in a row, then choose different ones. Or, I can keep track of the numbers that are hot or cold, and base my choices on this information! Alright, lets try another analogy. Lets say we flip a coin. 50/50 shot of getting heads or tails. One day, we flip head 10 times in a row. Amazing! Now tell me, what are the chances of flipping heads again on the 11th toss? If you said 50/50, you are exactly right. The last 10 flips have no influence on what is coming next. Taking this knowledge to the KENO game, whether you stay with the same numbers all night, pick different numbers every ticket, or some other sort of number picking system, it really isn't going to matter one bit. The odds are the same, you are just as likely to win with anything you pick.

Now, I'm not going to say you can't make any influence on your chances to win. You can, but not much. The pick-3 is the best game to play for the player, whereas the pick-10 is about the worst. But, the difference between these two are negligible, less than 1% to be honest. So, it really doesn't matter what you play, just keep in mind that you are only playing to have fun and expect to lose your money.