## The Profitability of myFarm Plants/Trees

February 20, 2009 1 comment

I have been doing a lot of thinking as to the value of purchasing plants/trees on my own for my farm instead of waiting for friends to give them to me as gifts. This led, inevitability, to wondering how profitable each type of plant/tree really was, so I decided to do a little calculating to find out.

I started with the basic knowledge of how much a plant/tree costs, how much a harvest is worth, and the fact that an initial harvest is six days after planting followed by a potential harvest every three days thereafter. The formula for calculating the break-even days for any given plant/tree is fairly simple – take the cost to buy and subtract the harvest price to give you a starting point six days out, and then divide this by the harvest price to get the number of harvests to break even. This number should be multiplied by three (the days per harvest) to give you the number of days (plus our initial value of six) needed to break even on the plant. Simple enough, right? To see this in action:

Apple trees cost \$500 to buy, and have a harvest price of \$58, so 6 + (((500 – 58) / 74) * 3) = 28.9 – basically 29 days to break even with the purchase of an apple tree. It becomes profitably at the next harvest (one day later), so round up to the next multiple of three to get the days to profitability. In this case, the days to profitability of an apple tree are 30 (given that you cannot harvest a tree early.)

Since I like tables and graphs, here is a table with the calculated days to profit for each of the available plant/tree types in myFarm. Note that Christmas trees become profitable on their first harvest (after six days) simply because you cannot purchase them as they are always gifts.

Plant Cost to Buy Harvest Price Days to Profit Calculation
Christmas Tree n/a \$220.00 6 * profit at first harvest
Orange Tree \$500.00 \$74.00 23.3 (24) (((500 – 74) / 74) * 3) + 6
Pear Tree \$500.00 \$68.00 25.1 (27) (((500 – 68) / 68) * 3) + 6
Plum Tree \$650.00 \$86.00 25.7 (27) (((650 – 86) / 86) * 3) + 6
Banana Tree \$550.00 \$69.00 26.9 (27) (((550 – 69) / 69) * 3) + 6
Apple Tree \$500.00 \$58.00 28.9 (30) (((500 – 58) / 58) * 3) + 6
Peach Tree \$700.00 \$82.00 28.9 (30) (((700 – 82) / 82) * 3) + 6
Cherry Tree \$800.00 \$84.00 31.6 (33) (((800 – 84) / 84) * 3) + 6
Mango Tree \$900.00 \$77.00 38.1 (39) (((900 – 77) / 77) * 3) + 6
Coconut Tree \$1,100.00 \$88.00 40.5 (42) (((1100 – 88) / 88) * 3) + 6

This is a good table of data, but what is more important to long-term growth of your myFarm income is what plants are good to invest in. Remember, this is strictly speaking in terms of purchasing the plants/trees yourself; if the tree is a gift, refer to my plant/tree table in my previous post on myFarm. Ironically enough, after one year of harvesting from planting, the value of the plants/trees almost follows my original table of worth. For one year, in order from greatest value to least, are Plum, Coconut, Cherry, Peach, Orange, Mango, Banana, Pear, and Apple. The differences are the Plum and Coconut tree is reversed as is the Orange and Mango. If you kept the plants/trees for longer periods of time, this sorts itself out.

This final table shows the worth of trees at different intervals to the first year. This should help you determine the profitability of a plant/tree for shorter-term interests.

Plant First 100 Days Harvest Net First 200 Days Harvest Net 1 Year Harvest Net
Plum Tree 25 \$2,150.00 58 \$4,988.00 113

\$9,718.00
Coconut Tree 20 \$1,760.00 53 \$4,664.00 108

\$9,504.00
Cherry Tree 23 \$1,932.00 56 \$4,704.00 111

\$9,324.00
Peach Tree 24 \$1,968.00 57 \$4,674.00 112

\$9,184.00
Orange Tree 26 \$1,924.00 59 \$4,366.00 114

\$8,436.00
Mango Tree 21 \$1,617.00 54 \$4,158.00 109

\$8,393.00
Banana Tree 25 \$1,725.00 58 \$4,002.00 113

\$7,797.00
Pear Tree 25 \$1,700.00 58 \$3,944.00 113

\$7,684.00
Apple Tree 24 \$1,392.00 57 \$3,306.00 112

\$6,496.00

After all this, I think I will stick with hoping my friends send me plants/trees as gifts.

Categories: Games, Internet Tags:

February 7, 2009 1 comment

I know this information has been posted in other places, but it is not necessarily easy to find all of this information in one place with a Google search.  The myFarm application on Facebook is an addictive little app, and this little guide should help others who are looking to make the most of their farming experience.

First, I want to discuss crops, which is a hot debate topic amongst the players of myFarm.  The following tables shows the available crops, and the prices associated with them.

Crop Seed Cost Prod. Sell Price Per Plow Cost Harvest Days Gross Sell Price Net Sell Price Net Price For 1 Harvest Day
Strawberries \$33.00 190 \$0.52 \$20.00 1 \$98.80 \$98.00 \$98.00
Tomatoes \$133.00 165 \$1.23 \$20.00 1 \$202.95 \$201.00 \$201.00
Rice \$37.00 290 \$0.45 \$20.00 2 \$130.50 \$129.00 \$64.50
Corn \$127.00 185 \$1.27 \$20.00 2 \$234.95 \$233.00 \$116.50
Wheat \$81.00 240 \$0.84 \$20.00 3 \$201.60 \$200.00 \$66.67
Potatoes \$144.00 220 \$1.31 \$20.00 3 \$288.20 \$285.00 \$95.00

The table indicates that for single day harvest investment potential, tomatoes are the way to go.  I like to plant as many tomatoes as possible, with strawberries for the remainder, if I know I will be able to check my crops daily.  In the event (such as a weekend) that I cannot check my crops each day, I plant based on harvest time according to Net price.  Simple as that.

Crops are not the real money makers of myFarm, however.  Making money is best accomplished by getting gifts of trees and animals from friends.  This way, there is no upfront costs for your potential harvest/sale.

You will not make money from buying and selling animals on your own; there is no profit in it.  There will be potential down the road for what animals can produce, but for now, sell only what you are given as a gift, or hold on to your animals for future myFarm game developments.  The same goes for cutting down trees — it is much better to harvest trees than cut them down, especially since there is no indication that trees will die any time soon.

The following table lists the costs associated with plants, which should give you an idea of what profits you can make from them. Remember, it takes a planted tree six days to grow to fruit, and then the tree will fruit every three days after this.

Plant Cost to Buy Harvest Price Cutting Price
Apple Tree \$500.00 \$58.00 \$175.00
Banana Tree \$550.00 \$69.00 \$206.00
Cherry Tree \$800.00 \$84.00 \$253.00
Christmas Tree* n/a \$220.00 \$660.00
Coconut Tree \$1,100.00 \$88.00 \$263.00
Mango Tree \$900.00 \$77.00 \$232.00
Orange Tree \$500.00 \$74.00 \$223.00
Peach Tree \$700.00 \$82.00 \$246.00
Pear Tree \$500.00 \$68.00 \$203.00
Plum Tree \$650.00 \$86.00 \$258.00

* Christmas trees are only obtained through gifts from The King

This final table lists the costs associated with animals, which also should give you an idea of what profits you can make from them.

Animal Cost to Buy Prod. Price Selling Price
Chicken, White \$1,200.00 none \$29.00
Chicken, Barred Rock \$1,400.00 none \$143.00
Chicken, Rhode Island \$1,300.00 none \$143.00
Cow \$550.00 none \$114.00
Goat \$600.00 none \$64.00
Horse, Black \$1,000.00 none \$100.00
Horse, Brown \$500.00 none \$71.00
Horse, Gray \$500.00 none \$71.00

You can imagine the potential for some of the livestock (chickens lay eggs, cows and goats produce milk), so it might be a good idea to hold onto your animals at this time. After all, we’ve been told selling eggs through the chicken coop is around the corner.

Enjoy myFarm…I know I do.

Categories: Games, Internet Tags:

## Creating a random password with PHP

I have been working on getting my domain back up and running, when I ran into the need for new functionality to automatically create a random password for a user should he or she have forgotten theirs.

The following is a partial solution to what I came up with, along with commentary on what the rest of the functionality entailed.

First confirm that the user is indeed who he or she claims to be.  Good ways of doing this are getting a full name, email address, maybe even a birthday.  Next, for my site I give the ability for a user to create their own secret question and answer to go along with it.  This affords a little more security than having canned secret questions — not much, but a little.  The secret question is presented, and when a correct answer is given, I create an email that sends the random password to their account.

Simple enough, so here is the code for the random password part of this solution:

````\$chars = 'abcdefghijkmnopqrstuvwxyz023456789!@#\$';`

`srand((double)microtime() * 1000000);`

`\$passwd = '';`
`for (\$i = 0; \$i < 10; \$i++)`
`\$passwd .= substr(\$chars, (rand() % 37), 1);````

You will notice that in the `\$chars` string I omitted the characters `l` and `1`. I did this because these two characters could be confused with one another, which is something you do not want when sending a random string to a user.

Simple enough. Enjoy.

Categories: Programming Tags: ,

## Harumph!

I am at a loss for words to describe my feelings towards this announcement.  Stupid money-grubbing executives…

Categories: General Rants Tags:

## Harry Potter and the Half-Blood Prince Movie Trailer

I admit that I am a pretty big Harry Potter fan – I watch all of the movies with my kids whenever I can (and even without them), I have read all of the books multiple times, and I listen to the audio version of the books (the Jim Dale version) once a year to prepare for the then new book releases and the new movie releases. I’ve even found myself caught up in a fanfic or two and had a ship preference. That being said, it should be no small wonder that I have been eagerly awaiting the next installment of the Harry Potter movie franchise, especially after Order of the Phoenix, which I thought was cinematically far superior to its predecessors.

When I found out that the trailer for Half-Blood Prince was to be released on AOL at 9 PM EST, I of course had to download and view it like a proper Potter-maniac. My standards has fallen somewhat, though, as I did not view the trailer until an hour and a half after it was released – having four year old twins may have something to do with that, to be sure.

What did I think?

It left me yearning for more, and thinking that 114 days is still a long, long way away. I even jokingly told my wife that we better start arranging for a sitter so we could see the midnight showing. She laughed at me, but whole-heartedly agreed that we would be going to the midnight showing. The trailer focuses mainly on Dumbledore’s first meeting with the boy Tom Riddle, and seems to follow closely what I remember reading more than once. From what I saw, the only complaint I have is that the actor who plays the young Voldemort, Hero Fiennes-Tiffin, does not come off quite haughty enough – the way I read HBP, Tom as a boy was haughty, mean, and eager to learn everything once it was confirmed he could do magic. I did not get that from Hero, but of course, it was a brief clip in a trailer.

Other than that, I cannot wait until more trailers are released, and of course, the movie itself, which I will assuredly be in line for the first showing.

Categories: Movies

## Firefox 3.0.1 Update Broke My Add-Ons

I received the notice this morning that Firefox 3.0.1 was available for download, so I went ahead and installed the update, knowing that it had some security fixes in it. What I did not realize was that it would break all of my add-ons in the process of updating so that I was left with a vanilla 3.0.1 browser, no add-ons, no themes, nothing else when I restarted.

I quickly hit Basil’s Blog looking for answers, but could not quite believe what he was saying. He was telling me that the reason ALL of my add-ons and themes were not working was because of authors not declaring their compatibility range correctly? I was not buying that, as I use quite a few add-ons for web development and other aesthetics, and I could not fathom how every single one of them would have incorrectly stated their compatibility range “2.0 to 3.0” instead of “2.0 to 3.0.*”.

There was, of course, a quick way of confirming whether or not this was indeed the problem with my add-ons – disabling the add-on compatibility check. For those of you who are not familiar with this trick, type “about:config” in Firefox’s address bar, and hit enter. Accept the warning that will appear by clicking on the “I’ll be careful, I promise!” button, and a page will display with all of Firefox’s configuration settings. Right-click anywhere on this page, and go to New –> Boolean; a “New boolean value” window will pop-up requesting a preference name. Type “extensions.checkCompatibility” and click “OK”. The box will then display the option to set this to false or true, click false and then click “OK”. A new entry should be visible in the long list of names for your new value, but this will not take effect until you restart Firefox.

Having done this, I quickly confirmed that the problem with my add-ons had nothing to do with incorrect compatibility ranges, as none of my add-ons loaded, and I still had no themes. Thinking I had a problem with my profile, I browsed to the profile directory to check things out. It did not take me long to discover I did have a problem. The extensions.ini file in my profile directory was empty (0KB in size)! It was starting to look like this was the culprit of my problem. For thoroughness, I backed up all of my extensions files and then deleted them (extensions.cache, extensions.ini, and extensions.rdf). Then I restarted Firefox again.

When Firefox loaded up this time, my theme was back and so were all of my add-ons! A quick look in the profile directory verified that all of the extensions files had been recreated. Somehow, the Firefox 3.0.1 update had messed up the extensions files in my profile, but it turns out that it is easy to remedy once you know what the problem is – delete your extensions files and restart the browser.

Problem solved.

Categories: Internet Tags: ,