Page 3 of 3

Integrating Devices & Services for Better Success in Achieving Personal Goals

A lot of people make new year’s resolutions that involve a better version of themselves. In fact, this doesn’t stop with new year’s resolutions. We’re always looking for ways to better ourselves. Either through reading, exercising, learning new skills, or even exploring the world. This constant strive for improvement is a good thing, but are we giving ourselves the best chance for success?

Read more →

Fixed Cost Used Vehicle Sales Model

I’ve been thinking if there is any room for a fixed cost service model around used vehicle sales. The model would exist online where customers could work with dedicated advisors to purchase vehicles right from auction. The fixed cost would allow for benefits on both sides of the transaction. For example, unprecedented low-overhead for the service vs. traditional models and up-front fixed cost for the customer which doesn’t currently exist.

Here are some quick thoughts I’ve put together…

Read more →

My Experience with Used Vehicle Sales

I recently sold my 2004 Audi A4 Quattro in less that 2 hours on KSL. KSL allows individuals and dealerships to post auto classifieds free of charge. When I posted my vehicle in preparation of purchasing a newer, more roomier used vehicle, I had no idea it would sell so quickly.

The process of selling my vehicle was so simple. The interested buyer contacted me, told me they were en route, test drove the vehicle, and within an hour we were signing the forms at my dining room table. I was able to print the necessary forms online and completing them without any prior knowledge or experience was a breeze. The buyer paid cash which was deposited immediately into my bank account shortly after.

Selling my vehicle was an easy task that I actually enjoyed. It was painless, straightforward, and completely fulfilling.

Read more →

How to Build a Minimum Viable Product

A minimum viable product is a version of a new product which allows a team to collect the maximum amount of validated learning about customers with the least effort.

MVP

Sorting Date Keys in PHP Object Arrays

I had a interesting problem today where I needed to sort an API response that included a list of dates for keys and integers for values. The trick was that the response was an array object, which I couldn’t sort on.

I ended up having to change the array object to a standard array, cycle through the key/value pairs, put them into a new array, and finally sort on that new array.

// Change object to array
$sortedArray = (array) $arrayObject;
// Create a new array to store the new key values
$array = array();
// Cycle through the array and push
// the new keys into the new array
foreach($sortedArray AS $key => $value){
    $key = date('Y-m-d',strtotime($key));
    $array[$key] = $value;
}
// sort the new array on keys in reverse
ksort($array);

Here is the code in action: http://www.tehplayground.com/#g6pelg6ft

Catching Server Errors in jQuery Ajax Requests

When running jQuery Ajax requests, you can catch server related code errors by using the statusCode object:

$.ajax({
  url: 'script.php',
  type: 'GET',
  dataType: 'json',
  statusCode: {
    404: function() {
      $("#response").html('Could not contact server.');
    },
    500: function() {
      $("#response").html('A server-side error has occurred.');
    }
  },
  error: function() {
    $("#response").html('A problem has occurred.');
  },
  success: function() {
    $("#response").html('Success!');
  },
});

Retrieve Selected Checkboxes with jQuery

When you have multiple HMTL checkboxes with the same name, you can cycle through each of them to get the selected values into an array with jQuery.

var selectedArray = [];

$("input[name='checkboxName[]']:checked").each( function () {
    selectedArray.push($(this).val());
});
Check out https://zapier.com to learn more.