It's On

I have a wager for $5 with Dan Rubin of the Philadelphia Inquirer that the sun will not set tomorrow. It's pretty much giving him $5. I also threw in there other conditions like if I drop a brick, it will go up instead of down, and also that I will be struck by lightning within the next 10 minutes.

Ok, not really, but close to it. I bet him that the Phillies will make the playoffs! In my short 26 years, I have seen stranger things. I'm just hoping that I will see another strange thing. $5 is not chump change, that's like my morning coffee and smokes (i.e. everything you need).

There is also a side bet on the Red Sox not making it. I bet that they won't make it, even though it's not how I really feel, it's just for fun. Dan's from Boston, so he knows what it's like for your baseball team to not win for way more than 12 years or 25 years. Hopefully Boston loses this time or I'll owe 10 bucks.

The Cubs won last night so the Phillies have a chance. The chance may be minuscule, like winning the lottery, but if everyone thought they can't win the lottery, then no one would play.

Optimism

This happens to be another Phillies post. They aren't out, yet. They won last night, and are now 2.5 games behind the Astros. The Phillies are off tonight, and the Astros play the Cubs. The Cubbies are going into Houston with a 2 game losing streak, are 10 games behind (are out), and have no motivation to win any games against the Astros, other than to help the Phillies (and possibly maintain some dignity). Our E# (defined as "the Elimination Number, which is the combined number of wins (by the first place team) and losses (by the trailing team) that will eliminate the trailing team from winning the division") is 2. It's like in golf match play. If the winner is 3 up on the 15th hole, if he wins that hole, it's over. He wins "4 and 3". At 3 up on the 15th hole, the golfer who is behind will have an E# of 1. It gets more difficult when the teams aren't playing each other, then golf is no longer a valid analogy.

It's this in baseball: if Houston wins every game they have left, and the Phillies win every game, the season is over when there's 2 games left. Or the Phillies can just make it easy for them and lose 2 to the Nationals. Hand them the Wild Card.

But how about those Phillies?!!? 16-6 last night over the Mets. Chase Utley, I swear, doesn't even swing the bat and he hits homers half way up the foul pole. I'm not sure of the distance, but let's do some educated estimation and call it a mile. Another analogy with golf. You don't have to look like you're killing the ball to kill it. You take a nice easy backswing, follow through and down, generating massive clubhead speed, hitting the ball with the sweetspot of the club, killing the F@#%!@#$!@# out of the ball. It's what Chase has realized. You can look all calm up in the box, take a nice easy swing with a short follow through, and f@#%@#$!@ing smash the F%!#^!!ing thing 40 feet up on the f@#%#$!#!ing foul pole. Hit the sweet spot.

The Phillies had too many bogies this season, they need a hole in one on the last hole, a Par 4.

More Lemonade Tycoon

So, I've realized this after 3 days (Lemonade Tycoon days, which is like a minute of game time) of selling in the "Mall". The beach and the mall are capable of making the same amount of sales if the weather dictates it. If it's 80 - 100+ degrees out, I'm selling at the beach. If it's 50 and raining, it's the Mall or bust. I can keep the price the same, if it's 50 and raining, the mall people still pay $1.10 for a cup of lemonade, just like the beach people will if it's 100 and sunny. Obviously. You just have to learn the rules before you can assume that a program realistically simulates human tendencies. Especially one written for a cell phone.

Here, check out GameSpot's story on it... Lemonade Tycoon. I'm addicted, but soon, when my popularity in the mall gets to 100%, I consider that game over. I just want to be famous :)

From GameSpot:
Start small, and focus on the fundamentals. Lemonade Tycoon is a business simulation for our uncertain times. Beginning with just a tiny stand on a suburban street corner, you buy supplies, mix up a batch of lemonade, and hustle your drinks on the street. If your price is too high, the line is too long, or your recipe stinks, you'll be stuck with melted ice and spoiled lemons. With finely honed marketing skills, a canny grasp of what customers want, and a double-squeezing of luck, you can work your way into bigger stands, better equipment, and big-time venues, like the beach or a mall.

and...

The sim is deep and complex, with hours of gameplay for the dedicated sidewalk lemonade hustler.

one more:
As mobile games go, this sim is quite deep. Not only must you set the right price and buy appropriate supplies, but you've also got issues of weather, market awareness, demographics, and advertising. Stripped to the essentials, the dynamic and interconnected nature of business is represented here in a fun and clever manner.

They just make it seem harder than I do :) I have to admit, I am quite awesome at the game.. you might even call me a Tycoon.

Phillies MUST Win Tonight

Mathematically, here is the situation. Phillies are 2.5 games behind the Houston Astros with 4 games left to play in the National League Wild Card Race. Here are the possible outcomes for tonight's games, both Houston's and the Phillies'.

Outcome 1: Phillies Win, Astros Lose
Result: Phillies 1.5 back with 3 left

Outcome 2: Phillies Win, Astros Win
Result: Phillies 2.5 back with 3 left

Outcome 3: Phillies Lose, Astros Lose
Result: Phillies 2.5 back with 3 left

Outcome 4 (AKA The Doomsday Outcome): Phillies Lose, Astros Win
Result: Season Over, Phillies 3.5 back with 3 games to play.

Essentially, the Phillies have to win every game and HOPE that the Astros lose at least 3. The Astros have 5 games left, and they play the Cubs for 4 of those. We have to assume that they are going to win all of those games, effectively stabbing a knife through the hearts of every Phillies phan, twisting it over and over again and laughing in our faces so hard that little bits of saliva spit out of their mouths, driving us insane as well.

The last reason that the Phillies have to win every game is because of the fans. Do you want to be hated, Phillies?! Wouldn't you rather win the last 4 games of the season and not get into the playoffs, than lose 1 or 2 of them and not get in? We are harsh (registration required). We'll rip you a new one. We chant E-A-G-L-E-S EAGLES!! at the games, and yesterday I heard a distinctive Flyers chant (Here we go Flyers, Here we go!!) I'm getting "flyered up" for that. Point: win every game.

Captivating Game

Over the past week or so I've been playing a game on my cell phone on the bus and train ride into work. It's incredible. It's called "Lemonade Tycoon". Don't laugh. Obviously, all you do is sell lemonade, but, there's lots of twists.

First, you invest $40 of fake money into your venture. You get a stand and apparently the tools to make lemonade. You have 4 things to buy: lemons, ice, sugar, and cups. There are multiple places you can set up shop. The suburbs are free, so that's where you start. The places that cost money are guaranteed to be more populated. Before setting out on your first day of sales, you have to decide a few things. The recipe is first. You pick how many lemons, sugar and ice to add to each pitcher of lemonade. People will not buy bad lemonade. The next thing to consider is your price. This is based off of numerous things like how popular your brand is in a particular location, and of course the weather. Don't charge $1.00 per cup on a 50 degree day! Lower your prices, you'll sell the same amount of cups as a 100 degree day, but you won't make as much, but you'll still cover your costs for that day. People will pay $1.50 for a cup on a hot day.

Repeat this as desired. You'll notice that it takes a long time to make a pitcher, and also a long time to serve someone. Lemons go bad after a few days, and you're always buying ice, always. There are upgrades. To make the time between pitchers go down, buy a "Lemon Juicer 9000". It's now instantaneous. Customers will complain of long waits if they are in a line with too many people in front of them (which I've found you can't control), if they are in line when you have to make a new pitcher, or they are in line and you don't have this upgrade: the cash register. Processing a sale is instant with this thing. You go up from maybe 25 sales at a location to easily breaking 60. They have an ice machine, but I noticed that it only gives you 100 ice cubes (which is nothing, I'm now buying 500 on top of the 100 given with the ice machine), and it will slowly regenerate them during the course of a day. It's useless when you start making 100+ sales in a day. Another thing is a fridge, so you can stock up on lemons and they won't go bad. The last upgrades in the game are pretty convenient. You have all this new technology for speeding up sales, capable of making hundreds of sales in a day, but you might not be able to hold enough supplies to support those kinds of sales. You can buy 2 different types of lemonade stands, which will hold all your stuff and increase your capacity. I now buy hundreds of lemons at a time, and up to 800 cups at a time, along with my 600 ice cubes and 100+ sugar kept in stock at all times, I'm pretty much set. I am using the second most expensive location, the beach, rented at $40 a day (the mall is $50 a day), and selling different amounts of cups a day (sometimes 160, sometimes 50), charging an arm and a leg when the temperature spikes over 80... like $1.20-$1.50. I have all the upgrades. The most expensive one is the Lemon Stand (a stand shaped as a lemon), and it goes for $999.99. The cheapest upgrade, the lemon juicer, is $149.99. This price, $149.99, seemed insurmountable when I was selling 10 cups a day, making $.36 profit on each cup. Now, my cash on hand is $1,500 with plenty of stock, and the market is ripe for the picking.

It makes me want to make a game like it.

This game will have it all

Check out F.E.A.R. First Encounter Assault Recon is what it stands for, but really, it's more about being scared out of the room and hiding under a blanket with a baseball bat, calling friends over and sucking your thumb. I've written on this before, but it's very close to being released, and it looks unbelievable. The demo was a short 10-15 minutes the first time through. I got chills each of the three times I played it. The graphics are unbelievable, the particle system and effects also, the sounds, the lighting, and now the Artificial Intelligence.

AI has always been an interesting subject to me. It's incredibly complex, but that hasn't stopped me from reading books on genetic algorithms, path finding routines, and other broad subjects. The AI that this game uses is called Goal Oriented Action Planning, or (GOAP). You can read about it here under the header "Designer Diaries". It doesn't get deep into technical details, but it is just a fascinating read, and I can't wait to play it.

AI is the next thing in games. You have these games that look outstanding but have the dumbest enemies ever. They pop their heads up in rhythm, it's like that groundhog game where you use the big padded hammer, only easier, since those are more random. Games even realistically portray interactions between objects pretty well. If there are a few wooden boxes stacked, and you shoot the bottom one, it might not get that far from underneath the other ones, but the resulting effect is that the tower of boxes will probably fall towards you, if the bullet doesn't just go right through. They haven't done that in games yet, realistic surfaces, at least not really well. A great effect in this game is watching its particle system. Bullets spark metal, blow concrete off walls, creating huge chunks in the wall, shatter glass, and grenades. Cool game huh?

Now, add SLOW MOTION!! Slow down time in the game and watch all this stuff happen. I tell you it's a thing of beauty.

The Philosophy of Computer Science, Part I

Todd and I recently had a discussion where I described to him everything that I was working on currently, and my "dumb" system mentioned in the "Your Site Rules!" section. I had brought up my Philosophy of Computer Science. I couldn't explain it in such a good way though, so I will attempt to now.

I am a learner. When I'm done learning something, I go and learn more. I am not exceptionally brilliant, but apparently (or seemingly) I'm capable of absorbing huge amounts of data though. I take as long as the next person to learn something, but it sticks. My brain tends to tie things together logically, instead of memorizing something outright. So that I can remember small amounts of facts and deduce the outcome using them. I'm sure a lot of people do this. There are some that will memorize everything, but us lucky ones who can remember less but seem to memorize more, make more room in our brains for other small tidbits of information, making us seem exceptionally brilliant.

However, calculating an outcome each time you have to recall it is somewhat inefficient. It's very inefficient. When someone asks you how old you are, you don't calculate "well, I was born in 1979 and it's 2005, that makes me 26" every time... You just know that you're 26 or whatever age you happen to be. Or you lie to get into a bar or because you look younger than you are :)

Someone recently asked me "Why do you learn so many technologies, when you can be an absolute expert at one?" To me, this is an invalid perception of what I do. I don't learn any specific language. I spend a lot of time using Java instead of what I use for work, C# and .NET. When I was in college, the classes that I had made me realize the answer to this question. Not the "Programming Language Paradigms" class, or the "Organization of Programming Languages" class... these were Computer Science classes. I learned the answer to this question in my Philosophy classes. I took quite a few. My favorite one was "Logic". It made everything clear to me.

Computer science isn't "using computers to achieve a task". It's a connection of objects. Either different computers, different technologies, different objects in an Object Oriented Programming Language... different ideas with their own logic, connected together in a way that they all work as one beautiful system. Why I don't learn one specific language or technology is because you are then stuck in that technology. I happened to take jobs in only .NET in the past, so now I'm only able to get .NET jobs, which is part of why I don't learn one technology, but not the only or even most significant one. It's pretty insignificant, actually.

With many technologies in Computer Science, and by technology I mean anything in Computer Science, I find it more important to know what they do, rather than how they do it. Ok, here's an analogy. You learn how to use chainsaws, you don't learn how to use one specific chainsaw. By learning how to use chainsaws, as opposed to one specific chainsaw, you can use any chainsaw. Why should technologies be any different. Writing a website, or using sockets to connect to the internet, or zipping up files, or using a printer, or writing graphics libraries, or using rule engines, or a scripting language, etc. Knowing what something does is much more important than knowing how to use one of those things. Memorizing one language is bad, unlike my "I'm 26" analogy. Being able to deduct this information, based off of that little fact that you store (it's a programming language), is huge. So, when someone says "This is a programming language", I immediately know that it will contain features like input and output (I/O), ways to connect to the internet, something for printing, ways to create objects and inherit from them, interfaces, basic objects like ints, longs, floats, Strings, etc, a mechanism for threading and synchronizing data access, etc. It's a programming language, it's gotta have this stuff, and logically, I can deduce that. So, now all I have to do is sit down with a reference and a text editor, and I can write a program using that language that was introduced to me 3 minutes ago. As I said though, this isn't only to do with programming languages. Tell me what a technology does, I'll show you how to use it in a programming language. I will need a reference, but it just makes sense to me that you call certain functions in a certain order with certain parameters, and it works. Nothing more, nothing less.

So, this is my philosophy of Computer Science, Part I. I'll have more soon.

The Way of Google's Future

I came across an article in my favorite tech news site, ZDNet, that said Microsoft had predicted 10 years ago that the Internet is the next platform. But, Microsoft still spent bazillions of dollars making Windows XP and the new Windows Vista. Meanwhile, under Microsoft's radar, 2 Stanford students develop something in their dorm room, a search engine, and in 2005, they are big. HUGE. Google. With Google's way of innovation, and their ideas and having the top minds in the field (except they don't have me yet :p ), they are developing a lot of things, and they are not platform specific, but they are for the internet. Gmail, Maps, etc. They have more, and you'll see them by visiting their beta section. So, now Microsoft is feeling the heat. Without having a specific operating system, you can use any of Google's Internet products. Microsoft just wants to take over the world, so they will fight this, and start doing their own, or they just don't want Google to get too big, because then they can go stealing all their smart employees, paying them the big bucks, giving them the Presidential Suites, etc, and using them to develop products specifically targeting Microsoft products, instead of Microsoft doing it to them. The playing field is leveled a bit.

It's an interesting concept, the Internet as a platform. How I picture it, the possibilities are endless. Before I had that vision though, and before I read that article, I had pictured something a little different, something like Google's platform, the latest desktop search. Plug in components into a base platform, and the base provides a lot of the functionality that the components need, providing quicker development. Think of Mac's Widgets. There's a widget container that can provide lots of functionality to the widgets, and then there are widgets that you can plug in. I always imagined something like an application container. I could have small apps that plug in, and you can open any of them from this container. I had thought of this before Mac's widgets, but instead turned towards internet applications. My main reason for this thought process was because of how Java works. I didn't know if you could make a Java program automatically run by double clicking it, you always have to open them with another program. Of course, have everything run under one program. (I later found out about JNLP, Java Network Launch Protocol, which launches 'JAR' files containing a Java program)

Sometimes solutions are so obvious for one problem and they aren't even considered for another problem.

What wasn't obvious to me is that this idea had already been done! In fact, everyone is doing it! When you visit a website, you are typically using an application written for the web. An application. Written for the web. My container application, the platform for running every program I write, is in fact your web browser. This seems like a great platform. Some obvious aspects that you have to watch out for are backing up data, security, limitations of certain web browsers, certain web browsers not following web standards, downtime, scalability, application flow, user experience, and users. Some great benefits to web applications are deploying, updating everyone's version instantaneously, data stored in a central location, and if you secure the server, it's virtually unhackable... if you develop it to be that way. Having a client application obviously has its benefits. You can access local resources (disk drives) and do stuff that you can't do in a web application, like video games and accessing hardware, and stuff that would kill the resources on a web server if too many people did it at once... intense applications. Basically, it depends on the application, whether you should make it a client application or a web application, and whether you can make it a web application.

There aren't too many downsides to writing a web application, but they are pretty big downsides. There is another one. HTTP. HTTP is pretty primordial. HTTP is the protocol in which web servers communicate with the world. It consists of numbered codes and data separated by line breaks. It was developed before XML. However, XML has its obvious downsides. It's heavy, lots of text. Depending on your data, XML can double the size. It's mainly used for text, so you wouldn't normally go storing your images in there. I only bring this up because of client/server applications, or server to server communication, which still falls under client/server. This is why SOAP was invented. SOAP is an XML format that was developed for multiple applications, infinite applications, to send XML data over HTTP. A standardized format is a good start. HTTP can stay as it is, as long as everyone uses SOAP. This was the advent of web services; small applications written to run on the server and communicate with the client. Usually just a function or two. There's a huge history there (search the internet for RPC or "Remote Procedure Call", you'll see what I mean), and the idea was to make a standard way, rather than hundreds of developers fending for themselves, all writing a different way to call functions over the internet.

One of the important downsides I mentioned with writing web applications is user experience. This isn't about making users laugh or showing help or different messages. This is about "perceived speed" of an application. Who wants to watch a progress bar at the bottom of the screen? Or watch as the whole website goes white and takes a few seconds for something to pop up. In client side programming, you typically develop a multithreaded application to improve user experience. Things appear to happen simultaneously. However, these applications run on a web server, and the only protocol for speaking between the web browser and the server is HTTP, which makes requests only at the user's request (hence the name) and provides responses, how in the world do you expect to make an HTML web page seem "multithreaded"?!? AJAX. You may have heard of it. It's "asynchronous" using JavaScript and XML. That's pretty much what the acronym stands for. This way, I can have JavaScript make requests back to the server without the user's interaction, typically on a schedule (every 5 seconds, every minute, etc), and get that ever-so-desired perception of multi-threading in a web application, significantly improving a user's experience.

Google has realized this. Maps and Gmail use AJAX extensively. It is the way of the future, and it is important enough that soon every browser will have it. But this isn't just about writing a web application that appears friendly to the user. It's about writing many applications that are all friendly with each other, and that all appear friendly to the user.

Imagine an internet portal, a website that you go to as the first page you visit on the web. It has everything. News, stocks, your email, messages sent to your IM client that you missed, emails from other accounts you have, voice mails from work and from your cell phone, reminders about events in your calendar, and anything else you can think of. This is Google's vision... probably. Imagine having all this personal data on one website, collected from many different web applications, each using SOAP to communicate with each other, sending XML to the user's browser on each AJAX request, and reading all this personal data on the fly, determining which advertisements to show that user. Advertising is Google's main source of income still, besides selling stock.

"But Google's also buying up loads and loads of dark fiber and buying wireless internet technologies and WAPs" you say... Yes, they have invested in a company that can triangulate exactly where you are when you connect to a wireless network. So you can search for the closest guitar shop to the exact point on which you are standing. This on a portal full of all of that other information I mentioned would just be showing off.

This is where I think Google is heading. As with its search technology, I think the Internet can do better. I must emphasize this. I've mentioned this before, here. I think all of Google's web applications will supply their data this way. I quote myself:

"Imagine, if Google, instead of just reading all of the HTML through a website url, can just ask a website "Yo, what's your deal?!" and the website can respond back "Dude, I am a guitar shop, here are my wares.""

RDF is this for news. Somehow Google is able to extract prices of goods on websites as well, and build a shopping cart around them. But instead of Google just being able to search these results for items you may be looking for, what if there was no website that actually sold this stuff, but Google just read data from a server, through another protocol, and did everything: shopping cart, credit card processing, etc. Google would be the only online shop. Or, what if someone else did this. Like me! No, there's an "end of the world" scenario in there somewhere. No more online shops, just Google, and less jobs, and less money, and more Google. It could be bad, let's hope that they're only doing the portal mentioned above :)

This is what cool people do

My college buddy, Zatko, and I play video games. We played through the first Serious Sam (Serious Sam: The First Encounter) and maybe also what I thought at the time was Serious Sam 2 (Serious Sam: The Second Encounter). It later became widely known that this was, in fact, not Serious Sam 2. I became confused when GameSpot (not the store, that's GameStop) started putting up screenshots and articles about Serious Sam 2. I'm like, I already have it, beat it, it rocked, etc. But then I clicked one. "What the F@#%#@@ is this?!!?" I thought. Well, this is the real sequel. New graphics engine, physics, new monsters, real time shadows, lighting, and everything else that makes today's games beautiful and immersive. So Zatko and I made a pact: To only EVER play the game cooperatively when it comes out. See, another beautiful thing about the Serious Sam games is that they're $20 and that they ALWAYS have cooperative mode. NO games today have coop. It's stupid. Every game would make a killing if they let you play through the missions with a friend or family member. They don't do this, citing "technical difficulties" or some crap. Anyway, today, I hop onto GameSpot, and lo and behold, there's a Serious Sam 2 DEMO. Knowing my pact with Zatko, and knowing that he'll b@#%@# and moan at me for YEARS if I break it, I went to him:

Jason Connell: serious sam 2 demo
Zatko: you better not play it
Jason Connell: can i play?!?!?
Jason Connell: DOH!!!
Zatko: hell no!
Zatko: don't even look at it
Zatko: tear your eyes out
Jason Connell: can i download it?
Zatko: :)
Jason Connell: at least?!!
Zatko: you can pretend downloading it
Zatko: but thats about it
Jason Connell: alright, i'll write a program that says it's downloading the serious sam 2 demo, but it's really not
Zatko: yea, thats ok
Jason Connell: sweet! you want a copy?
Zatko: i might have to take you up on that
Jason Connell: alright
Jason Connell: oh wait, there's a brothers in arms 2 demo out too, i'll play that instead

So, I can't play :( I will hold to the pact though...

Even Bush is on Our Side

Ok, maybe I sort of drew that after I edited someone's image after that someone deleted Bush's original bathroom message and put a funny message, and then a journalist got a hold of it and maybe kinda started a contest. I won't win, surely I don't deserve to, that thing took me about 3 minutes to do.