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

Coconut Tree 20 $1,760.00 53 $4,664.00 108

Cherry Tree 23 $1,932.00 56 $4,704.00 111

Peach Tree 24 $1,968.00 57 $4,674.00 112

Orange Tree 26 $1,924.00 59 $4,366.00 114

Mango Tree 21 $1,617.00 54 $4,158.00 109

Banana Tree 25 $1,725.00 58 $4,002.00 113

Pear Tree 25 $1,700.00 58 $3,944.00 113

Apple Tree 24 $1,392.00 57 $3,306.00 112


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

Categories: Games, Internet Tags:

Facebook myFarm Farming Guide

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

October 31, 2008 Leave a comment

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: ,


August 15, 2008 Leave a comment

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

July 29, 2008 Leave a comment

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.

Firefox 3.0.1 Update Broke My Add-Ons

July 24, 2008 Leave a comment

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: ,

Be Careful What You Get When CSV Exporting of Mailboxes in Exchange

July 11, 2008 Leave a comment

I learned an important lesson the other day when I went to export the list of mailboxes from my firm’s Microsoft Exchange server – Microsoft did not take into consideration the commas that are potentially found in the name of the Mailbox, Size (KB), and Total Items columns.

To find out what I am talking about open up the Exchange System Manager on your Microsoft Exchange server, then browser to Administrative Groups –> [Group Name] –> Servers –> [Server Name] –> [Storage Group Name] –> Mailbox Store –> Mailboxes. Right-click on Mailboxes and go to Export List…, at which point an Export List window appears that will ask for the File name of your export file and the format you wish to save it in. Choose Text (Comma Delimited) (*.csv) from the Save as type drop-down menu, choose a name, and click Save.

The CSV file that you now have will be a complete mess; especially if you try and open it with Microsoft Excel (I am using Excel 2007). Instead of the six columns that are found under Mailboxes (Mailbox, Last Logged on By, Size (KB), Total Items, Last Logon Time, and Last Logoff Time), you could have (as in my case, dependent on the actual sizes of the mailboxes) ten columns. In my case, the Mailbox was split into two columns (first and last name), the Size (KB) column was split into three columns, and the Total Items was split into two columns. This is because Microsoft pretends everything is text, and no commas are stripped from any of the number columns. The names are problematic simply because our system has a Last, First schema for Mailbox names.

The way around this mess would be to actually follow RFC 4180 memo, that while not an actual standard, has good practices and conventions for CSV files, one of which is to place quotes around each column to preserve the internal commas.  But as always Microsoft does not think ahead very far and their QA program is abysmal. Shame on them, and too bad for us. The only way to export your list of mailboxes (that I am aware of) is to export them as a tab delimited text file that can then be imported into Excel and formatted as it needs to be.

To my mind, Microsoft should have either placed quotes around every column entry (why not, since they are treating everything as text), or not sent the numbers as text with commas into the file (they are only numbers after all). With this second option<, the export would only fail on the Mailbox name, which is an issue only when you have a schema where there is a comma in the name (which I also believe is bad, but I did not set it up).

Either way, could Microsoft stop being so near-sighted and think ahead at what they are doing?