Monthly Archives: July 2010

How to find the soil composition of your garden

Knowing your soil composition is very important if you are attempting to amend your existing soil to get your premium soil for growing.  You soil is made up of four components; sand, silt, clay, and organic material.

Sand has the largest particle size of all these components and creates large gaps between them which is excellent for water to flow through and roots to grow in.  On the contrast it is terrible for retaining water and will dry out quickly.

Silt has medium size particles and if you had to choose a single component for effective growing this would be it.  Its particles are large enough to allow healthy root growth and also retains water.  Though some plants like their roots to be a little more on the drier side so in isolation this may not work for all plants

Clay has the smallest particles thus making it very difficult for water to flow through it.  Not really much positive to say about this stuff though if your goal is to hold water this property can be great when used as a substructure out of your plants normal growing area 1-2 feet down, think of it as a natural earth box.

Organic Material is the good stuff (leaves, compost, grass clipping) the stuff that makes your “dirt” alive and becoming living soil.  This feed beneficial bacteria and worms to provide rich vermicompost to add natural nutrients to your garden.

Now we know what we are looking for, lets find out what we have in our back yard.  All of my vegetable gardens are raised which consist of soil I have brought in myself so I know they will be very loamy and high in organic matter to makes things more interesting.

1. Get Dirt: I dug a small hole (about 6 inches deep in a dead part of my lawn.  I filled an apple juice container about 2/3 full.  Any container can work for this as long as it is clear and uniform in shape/volume (width/depth) at the bottom.


2. Add Water and Shake: Fill with water about 1-2 inches from the top and shake for at least one minute to ensure particles are well mixed


3. Let Soil Components Rest: Set on a flat surface until water on top is clear or 24 hours (whichever comes first)





4. Do the Math: After the dust particles have settled you should see 3 distinct lines and possibly some stuff floating in the water.  The sediments will settle according to their particle size (sand, silt, clay) and organic material should float above the water. 

Given the knowledge mentioned above we can now calculate the percentage of each soil component to determine our soil type take a couple simple measurements. 

Total Soil Height = Measure from the bottom of the container to top of sand/silt/clay

Sand Height = Measure from bottom of container to top of sand

Silt Height = Measure from top of sand to top of silt

Clay Height = Measure from top of silt to top of clay

% Sand = Sand Height / Total Soil Height X 100

% Silt = Silt Height / Total Soil Height X 100

% Clay = Clay Height / Total Soil Height X 100

Example of math using my Data

69.47% Sand  = 66mm / 95mm X 100%

29.47% Silt     = 28mm / 95mm X 100%

1.05% Clay     = 1mm / 95mm X 100%

Tip: You can measure with cm/mm/inches and the formulas will still work out as long as you use the same units for all measurements

Now using your Sand/Silt/Clay percentages you can now use the triangle diagram below to determine your soil type.  Though it can vary depending on the types of plants you are growing (i.e. succulents like the sand) but in general a nice “Silty loam” is what you want to shoot for, so if you are lacking adding some organic matter is the best way to get moving in that direction


Image from

Using my data I have “Sandy Loam” soil, though if I would have dug a few inches deeper I would have had a much higher percentage of clay.  Even if you are sure you know what your soil type I recommend trying this out you might end up surprised.

Add to
Add to digg
Add to Facebook
Add to reddit
Add to Stumble Upon
Add to Technorati
Add to Twitter

Freemake Is a Remarkably Simple, Yet Feature-Filled Video Converter and Editor [Downloads]

Windows only: With all video converting apps out there, it can get a bit overwhelming. Freemake combines almost everything you need into a clean, simple, one-stop-shop for all your video converting, editing, and burning needs. More »

Repair Your iPhone Screen on the Cheap [Repair]

Don’t shell out a pile of cash to get your iPhone screen repaired. Make’s detailed guide will help you replace the screen on your iPhone 3G on the cheap and with little fuss. More »

Get Free Priority Mail Boxes Delivered to Your Door [Free]

The US Postal Service is so familiar, so seemingly old school, it’s easy to overlook some of the neat things they do. Things like let customers order Priority Mail boxes online, have them delivered, then pick them up for mailing. More »

Yet Another Google Bookmarks Extension Is a Highly Customizable Bookmarks Manager [Downloads]

Chrome: Yet Another Google Bookmarks Extension (YAGBE) is an easy to customize Google Bookmarks manager for Google Chrome. If you use both Google Chrome and Bookmarks, YAGBE lets you customize everything from shortcut keys to default labels. More »

iPhone Programming Tutorial – Local Notifications

Way back when, when everyone was still complaining about Apple’s lack of support for (3rd party) multitasking, there was a simple solution put in place. This solution was known as push notifications.

Push notifications solved many of the issues associated with background processing.  For example, when quitting the AIM application, the server could keep you logged in and send you a push notification when a new message arrived.  You could then tap on a View button that would launch the app.

This solution is great and all, but it still requires that you have an active internet connection.  As of iOS4, Apple has introduced a new type of notification that can be scheduled to fire within the device itself.  It requires no complicated server programming, or additional configuration with iTunes.  I am talking about Local Notifications.

Local notifications can be scheduled on the user’s iDevice to fire at any given time; you can even set them to be recurring.  Today, we will explore these notifications and I will provide you with a simple example of how to schedule, view, and handle local notifications.  Here is a quick screenshot of the project that we are going to create (note I am using the iPhone 4  simulator).

The project will allow a user to schedule a location notification to fire off at a given date.  Using the text field, they are also able to specify some text for the notification.  The table view below displays a list of all of the currently scheduled location notifications within the application.

So, by now (if you are an avid iCodeBlog reader), you are already a killer iPhone dev and I can rush through the stuff that is not related to the notifications.  I will try to provide links to tutorials about sections that I rush through as well.

1. Create a View-Based Application

We will be using this as our starting point.  Check out this tutorial if you are unfamiliar with doing this.  Name the project Notifier.

2. Create All Properties and Dummy IBActions

This is usually a good first step when tackling an application like this.  Let’s get everything set up in the .h and .m files so we only have to visit Interface Builder Once.  Here is what our NotifierViewController.h file looks like.

@interface NotifierViewController : UIViewController<UITableViewDelegate,UITableViewDataSource> { 	IBOutlet UITableView *tableview; 	IBOutlet UIDatePicker *datePicker; 	IBOutlet UITextField *eventText; }   @property (nonatomic, retain) IBOutlet UITableView *tableview; @property (nonatomic, retain) IBOutlet UIDatePicker *datePicker; @property (nonatomic, retain) IBOutlet UITextField *eventText;   - (IBAction) scheduleAlarm:(id) sender;   @end

Seems clear enough.  We have 3 UI elements that we care about and one action.  One thing to note is, your class should implement the UITableViewDelegate and UITableViewDataSource protocols.  This is because we will be displaying a tableview containing all of the scheduled alarms.

Now, do all of the necessary steps in your .m file.  This includes memory management for the IBOutlets and creating a dummy method for the scheduleAlarm IBAction.  Your .m file should look something like this. Note: I have omitted import statements because my syntax highlighter wasn’t digging them.

@implementation NotifierViewController   @synthesize datePicker,tableview, eventText;   - (IBAction) scheduleAlarm:(id) sender {   }   - (void)didReceiveMemoryWarning {     [super didReceiveMemoryWarning]; }   - (void)viewDidUnload { 	datePicker = nil; 	tableview = nil; 	eventText = nil; }   - (void)dealloc {     [super dealloc]; }   @end

Now it’s time to build our interface.  Open Interface builder and construct an interface like this.

If you want my super sweet green button image, here it is:

After creating the interface, make sure you hook up all of the UI components to their corresponding IBOutlets and hook up the touchUpInside: method of the button the your scheduleAlarm: IBAction.  For more info on hooking up IBOutlets, check out this tutorial.

3. Implement UITableViewDelegate and UITableViewDataSource Delegate methods to List Currently Scheduled Local Notifications

It may seem weird to implement the code to display the notifications before the code that creates them, however I like this approach better.  This way, once we schedule the notifications, they automagically appear in our table.  Add the following code to your .m file.

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {     // We only have one section     return 1; }   - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {     // Return the number of notifications     return [[[UIApplication sharedApplication] scheduledLocalNotifications] count]; }   - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {       static NSString *CellIdentifier = @"Cell";       UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];     if (cell == nil) {         cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];     }       // Get list of local notifications     NSArray *notificationArray = [[UIApplication sharedApplication] scheduledLocalNotifications];     UILocalNotification *notif = [notificationArray objectAtIndex:indexPath.row];       // Display notification info     [cell.textLabel setText:notif.alertBody];     [cell.detailTextLabel setText:[notif.fireDate description]];       return cell; }

OK, finally some “real” code.  Most of this code should seem pretty straight forward.  If not, check out this tutorial on UITableViews.

So, the new code here is dealing with retrieving a list of scheduled notifications.  Calling the scheduledLocalNotifications method of UIApplication will return an NSArray of all notifications scheduled by the current app.  We just index into this array and grab each notification.

Finally, we are displaying the alertBody (text that displays when the notification fires) and the fireDate (date and time when the notification will display) in the tableview cell.

4. Scheduling Notifications

And now for the moment you’ve been waiting for… OK, probably not, but definitely the most exciting (least boring) part of this tutorial.  Let’s implement that scheduleAlarm: IBAction that you framed out earlier.  Update your .m file to contain the following code.

- (IBAction) scheduleAlarm:(id) sender {     [eventText resignFirstResponder];       NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar];       // Get the current date     NSDate *pickerDate = [self.datePicker date];       // Break the date up into components     NSDateComponents *dateComponents = [calendar components:( NSYearCalendarUnit | NSMonthCalendarUnit |  NSDayCalendarUnit ) 												   fromDate:pickerDate];     NSDateComponents *timeComponents = [calendar components:( NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit ) 												   fromDate:pickerDate];     // Set up the fire time     NSDateComponents *dateComps = [[NSDateComponents alloc] init];     [dateComps setDay:[dateComponents day]];     [dateComps setMonth:[dateComponents month]];     [dateComps setYear:[dateComponents year]];     [dateComps setHour:[timeComponents hour]]; 	// Notification will fire in one minute     [dateComps setMinute:[timeComponents minute]]; 	[dateComps setSecond:[timeComponents second]];     NSDate *itemDate = [calendar dateFromComponents:dateComps];     [dateComps release];       UILocalNotification *localNotif = [[UILocalNotification alloc] init];     if (localNotif == nil)         return;     localNotif.fireDate = itemDate;     localNotif.timeZone = [NSTimeZone defaultTimeZone];   	// Notification details     localNotif.alertBody = [eventText text]; 	// Set the action button     localNotif.alertAction = @"View";       localNotif.soundName = UILocalNotificationDefaultSoundName;     localNotif.applicationIconBadgeNumber = 1;   	// Specify custom data for the notification     NSDictionary *infoDict = [NSDictionary dictionaryWithObject:@"someValue" forKey:@"someKey"];     localNotif.userInfo = infoDict;   	// Schedule the notification     [[UIApplication sharedApplication] scheduleLocalNotification:localNotif];     [localNotif release];   	[self.tableview reloadData]; }

So, most of the explanation is in the comments.  I’ll talk you through some of the less obvious stuff.  The first tricky area is dealing with the NSCalendar.  We just use the NSCalendar object to break up the date into components.  Note: This demo does not require that we break the date up into components.  You could have just as easily fed the date from the date picker into the notification fireDate.  The reason that I’m showing you how to break it down is, you may have some sort of custom date logic to work with and this makes things much easier in the future.

Another important bit of code is where we set the alertBody or the notification.  In this example we set it to the text that the user entered into the text field.  You can set this to whatever you like.

The other thing I want to mention is the infoDict in the code.  This dictionary is your chance to associate some additional information with the alert.  For example, if you are using this alert in a game like We Rule to notify you when a crop is ready.  You might want to set a key and value that contains the id of the crop that has completed.  For now, we just set some arbitrary values and you can ignore them if you like.

After actually scheduling the notification, we just reload the tableview to get it to display immediately.

5. Handling Notifications After They Fire

The last piece of this puzzle is determining what to do when a notification fires.  Fortunately, this step is very easy and handled inside of the appDelegate.  When a notification fires, there are one of two situations. 1. The app is running and 2. The app is not running (or running in the “background”) .

Open up your app delegate .m file and add the following code.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {           // Override point for customization after application launch.       // Add the view controller's view to the window and display.     [window addSubview:viewController.view];     [window makeKeyAndVisible];       application.applicationIconBadgeNumber = 0;       // Handle launching from a notification     UILocalNotification *localNotif =     [launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey];     if (localNotif) {         NSLog(@"Recieved Notification %@",localNotif);     }       return YES; }   - (void)application:(UIApplication *)app didReceiveLocalNotification:(UILocalNotification *)notif {     // Handle the notificaton when the app is running     NSLog(@"Recieved Notification %@",notif); }

The first thing we see here is the application badge number is getting set to 0.  Whenever a notification fires, it will increase the badge count on the application.  Next, we handle the case when the application launches from a notification.   This happens when the user presses the view button on the notification.  For now, we just NSLog the data, but you should handle the notification how you see fit for your app.

Finally, we implement the didReceiveLocalNotification method.  This method is required if you want to handle notifications at all in your app.  You will see this method fire when the app is running and you receive a local notification.  When the app is running, you will not see the UIAlertView show up with the notification data.

And there you have it!  The complete lifecycle of a local notification.  You may download the source for this tutorial below.  If you have any questions, feel free to post them in the comments section or write them to me on Twitter.

Notifier Source Code

Clever Overhead Storage Hack Bolts Containers to Your Garage’s Ceiling [DIY]

Smart DIYer Tluweyen details how to mount storage containers to the ceiling of your garage—a perfect project for households desperate for more storage space that don’t have a lot of extra room in the garage. More »

Resume Interrupted Downloads with BitTorrent [Shortcuts]

While lots of us are pretty big BitTorrent users, we still use our browser to manage most of our downloads. If your download gets interrupted, though, reader KayDat shows us how you can continue downloading it with BitTorrent. More »

Clever overhead garage storage hack


Great storage idea from user tluwelyn of survivalist community Alpha Disaster Contingencies. Dimensional lumber is bolted together to make Ts and Ls that, in turn, are bolted to the ceiling joists. Heavy-duty storage totes are then slid in and suspended by their molded-in rims. Looks like there’s still plenty of room to park cars underneath.

Read more | Permalink | Comments |

Read more articles in DIY Projects |

Digg this!

Start! Is a Polished Start Page Alternative for Google Chrome [Downloads]

Chrome: If you’re not enamored with the default Chrome start page, Start! offers a polished and customizable alternative. More »

WP Like Button Plugin by Free WordPress Templates