Burning the Ships

Burning the Ships

Cortez, during the Spanish Conquest of the Americas, was said to have burned his ships, so that there was no returning to the Old World – and ensured that his men were 100% invested in the success of their endeavor.

Daily, we read about the latest out-of-this-world valuation on some startup, from someone who isn’t a programmer, or has no formal business training, or has only a partial working brain in their head. Rarely do you hear of the level of commitment that those people have invested in to obtain their “overnight” successes.

Being an entrepreneur isn’t about going to cool parties, or hanging out to make a connection that will make or break you, or getting that killer round of Series A funding.

It’s about creating value where none existed before – and giving 100% of yourself toward reaching that goal.

When I started my company in 1996, my wife and I both quit our “day jobs” in the same week. I triple-booked business to ramp up. And worked my ass off 6 or 7 days a week until the checks started coming in. It wasn’t glamorous – but it was sustainable, and most importantly, profitable.

I wouldn’t have had the level of commitment to my enterprise if I hadn’t metaphorically “burned my ships” (i.e., quit my fallback, my day job).

If you think you’re ready to strike out and create the next Facebook, the next Instagram, the next Twitter, you have to be ready to scuttle the ties that are keeping you close the the shore, and head into the jungle.

Cause that’s where the gold is. Not on the beach.

Advertisements
Ghosts in the Machine

Ghosts in the Machine

Ozymandias

As our lives are being lived ever increasingly digitally, I often think about the electronic footprint I’m leaving behind for posterity.

In times past, loved ones passed on years of correspondence – old love letters, journal entries, notes in the margins of calendars – from which those left behind could construct the simulacrum of a life lived.

What are we leaving behind today? Arguably, a richer set of media in the form photos posted to Facebook or Instagram, high definition videos of every waking moment, blog posts strewn across the interwebs.

It is a paradoxically ephemeral – and yet, everlasting – legacy we are leaving behind.

Ephemeral in the sense that – should there be a catastrophe where everything electronically was wiped away in an eye blink – there would be nothing for future historians to decipher who we were as a people and as a race; and everlasting, in that as we share our digital periscopes, they are innumerably replicated across the world in countless nooks and crannies of the web, to the extent that anything we throw into the ether cannot be retrieved and re-bottled, even if we desired with all our hearts to do so.

We are living lives with fragmented attention spans, conflicting and constant demands on our time – but little time for reflection and “soak.”

All the while, we’re leaving millions of digital footprints, all with the potential to last forever, but the very real possibility of being swept away like sandcastles in the surf.

Here, at the beginning, we are only starting to come to grips with the ghosts we are leaving behind.

‘Look on my works, ye Mighty, and despair!’

Nothing beside remains. Round the decay

Of that colossal wreck, boundless and bare,

The lone and level sands stretch far away.

 

– “Ozymandias”, Percy Bysshe Shelley

Creating Calendar Events – Using WebView – in Android

Creating Calendar Events – Using WebView – in Android

Hey – it’s been a while.

No time like the present to write a post about Android coding.

Specifically: “how do I create a calendar event from within a WebView in Android?”

First, let’s talk game plan. I am going to construct an url “scheme” that will indicate to a handler that I want to create a calendar event, and not navigate to a web page; then, I need to call an Intent that will allow the event to be created.

Easy Peasy.

So, for my dates that I wish to portray on a web view, I do something like the following:

<a href='date:beginmonth, beginday, beginyear, 
endmonth, endday, endyear, My Event Description'>
My event link</a>

Then, I construct a shouldOverrideUrlLoading handler that will detect that a date: is being clicked, and handle it specially (see the code below):

final WebView crimeView = (WebView) findViewById(R.id.webview_crime);

crimeView.setWebViewClient(new WebViewClient() {

@Override

public boolean shouldOverrideUrlLoading (WebView view, String url)

{

if (url.startsWith("date:")) {

Log.d(this.getClass().getCanonicalName(),url);

Calendar beginCal = Calendar.getInstance();

Calendar endCal = Calendar.getInstance();

Date beginDate = new Date(0, 0, 0);

Date endDate = new Date(0, 0, 0);

String parsed = url.substring(5);

String[] components = parsed.split(",");

beginDate.setMonth(Integer.parseInt(components[0]));

beginDate.setDate(Integer.parseInt(components[1]));

beginDate.setYear(Integer.parseInt(components[2]));

beginCal.setTime(beginDate);

endDate.setMonth(Integer.parseInt(components[3]));

endDate.setDate(Integer.parseInt(components[4]));

endDate.setYear(Integer.parseInt(components[5]));

endCal.setTime(endDate);

calendarevent(beginCal, endCal, components[6]);

return true;

}

return false;

}

});

Finally, we need code to invoke the Calendar intent. It looks like the following:

 // Create a calendar event
    public void calendarevent(Calendar begintime, Calendar endtime, 
                              String eventName) 
    {
        Intent intent = new Intent(Intent.ACTION_EDIT);
        intent.setType("vnd.android.cursor.item/event");
        intent.putExtra("beginTime", begintime.getTimeInMillis());
        intent.putExtra("allDay", false);
        intent.putExtra("rrule", "FREQ=YEARLY");
        intent.putExtra("endTime", endtime.getTimeInMillis()+60*60*1000);
        intent.putExtra("title", eventName);
        startActivity(intent);
    }

And that, as they say, is that.