Experimental Lex

Playing with words.

Mailstrom as the new Unsubscribe

I’ve been using Mailstrom for a few months now and think it’s just brilliant.  And I love the name. It provides convenient tools for managing your email inbox on major services like GMail and others. Through their website, I can quickly browse through the deluge of email and quickly find and delete all emails from a particular sender, for a specific subject, or ranges of time. The idea is to get to “inbox zero”.

Well, I’m pretty far from inbox zero and I don’t think I could ever get there. Does that mean deleting all of my email? I’m pretty sure I need to keep a lot of that email for historical and often legal purposes.

When I signed up, the service was a free beta, which means I wasn’t paying anything. Now, I see that the website has paid plans starting at $4.95 a month. I suppose it is worth something to me, but I generally avoid monthly recurring charges that tend to hit me at unexpected times.

I find the real value of Mailstrom is the ability to subscribe to all of the “junk mail” that I would prefer to see than not see (such as UrbanDaddy and other local recommendations content) and know that I can easily purge these at a later date. While the subscription model is a valid business plan, I was hoping to see Mailstrom provide premium features that help email marketers with longer-term relationships with recipients.

Imagine a service that operates like a loyalty program. Users who allow emails from different merchants and marketers earn credit or other achievements. Email “opens” and “clicks” will identify the high-value users and provides further opportunities for rewards.

From the user perspective, I would like features that allow me to schedule deletion of matching emails after a specified number of days.  Killer features that benefit the end-user will help grow the user base.

what do you think?

 

 

Autonumbered Content in TextMate

Today, I had another reminder why TextMate 1.5.x is still my favorite text editor. I really needed a convenient way to duplicate a line of HTML over a hundred times while auto-numbering specific places in the code.

It took me a while since I’ve never attempted this level of TextMate hacking, though it was totally worth it.  Here’s the code that you can create as a Command.

export line=`echo $TM_SELECTED_TEXT`

res=$(ruby -rui -e"print TextMate::UI.request_string(:title => 'Setup', :prompt => 'Enter autonumber max value:', :button1 => 'Go', :button2 => 'Cancel').to_s")
[[ -z "$res" ]] && exit_discard
export maxval=$res
"${TM_PYTHON:-python}" -c '
import sys, os
template=os.environ["line"]
for i in range(int(os.environ["maxval"])):
 line=template.replace("###", str(i))
 sys.stdout.write("{0}\n".format(line))
'

Here’s how you use it. Setup the line(s) of code you want to duplicate using “###” as placeholders where you want it to insert the current line index (zero-based).

<div class="bb-item" id="item###"><div class="content"><img src="ebook/page_###.jpg"/></div></div>

Select the line(s) in TextMate and run the command. And you just saved yourself a bunch of time.

The Speed of Thought

Through some chain of events, I find myself enrolled in another online class.  Last year in 2011, I signed up for Andrew Ng’s excellent Machine Learning class offered through Stanford University. This fall, I signed up my 10-year old kid in a Coursera class called “Learn to Program: The Fundamentals” and helped another friend in Bulgaria sign up for a class.

It is contagious. You cannot browse the course listings without getting caught up in the education revolution. World-class universities and world-class professors are now offering their lectures, homework, and exams online through Coursera. For free. To paraphrase Salman Khan… “Let’s dwell on that for a moment”. Imagine what happens when you democratize education on a global scale. The economics of education have been disrupted. The process of education has been disrupted.

Back to the story… I chose a class called “Writing in the Sciences”. It reflects my desire to expand my career and creative world. I was always a good writer. After all, I have a degree in Rhetoric from U.C. Berkeley, and I have spent a lifetime continuing to improve my writing skills.  And yet, I immediately learned some incredible techniques in the first couple lectures.

As I resumed my online education, I discovered again one of the things I love about it… the ability to play back lectures at higher speeds. In my college training in the field of Rhetoric, we were told that the human ear hears speech at a certain number of words per second.  I forget the number that was quoted, but that doesn’t matter exactly. What matters is the reality that some people digest words faster than others.

Through online video lectures on Coursera and elsewhere, I found out that I prefer to hear lectures at 1.25x or 1.5x speed. It feels perfectly natural.  In fact, when I watch and listen to the video at 1.0x speed, I find that my mind wanders throughout. Even between words, there is enough time for your mind to think about something else.  Now I find that education finally works for me. I understand things because they are being conveyed at the speed my mind wants to hear them. If I miss something, I can always rewind.

This is another area where online education completely blows traditional classroom education out of the water.

The Social Media Hammer

I have to share a fun story about some old friends. A small group of us still reside in NYC. A few in Los Angeles. And a few overseas. We were having an online group-hug via e-mail and it was noted that the California contingent had disappeared… for weeks, maybe months.

I was getting tired of waiting, so I hatched a plan to force them out of hiding. I replied all to one of my NYC friends with this message:

Kirk,

We need you to photoshop some milk cartons with the photos of our lost friends in california.

And 5 minutes later, he responded with this:
And I responded to all with this message (apologies for the grammer):

Perfect.

Jimmy, Eric. You have til end of day to send your status update.
Otherwise, this is going on your facebook wall!  social media. BAM!

Quite spontaneously and by accident, I had committed the equivalent of social media blackmail. And it worked. Jimmy and Eric were suddenly engaged in our discussion.

This concludes our lesson of the day.

Soft skills vs. Hard skills

This is a topic I have been hoping to crack for a long time. It’s an elusive area for me, since I come from the technology world, where hard skills are valued most. It is important for a software engineer to have real skillz and not the fake kind. In fact, you get grilled during interviews to prove you have the right hard skills.

However, my feeling (which has been repeated by others I know and respect) is that software engineers are the next generation of factory workers. Technology and programming are a commodity and these are being offshored to the lowest bidder in the global economy. Not much different from any kind of manual labor.

That’s a bit harsh and I apologize to anyone offended. I can argue the other side as well, since I still believe in creative technology as a profession, technology as an art, and the programmer as an artist. My point, really, is to point out the 4th quadrant in the career of a technology professional.  If you want to elevate to another level within your company and your industry in general, you have to learn some of the basic things that make companies tick. Things that programmers disdain and have spent a lifetime disavowing. Office politics, meetings, protocol, email etiquette, management, etcetera.

The soft skills. These are the inexplicable things that defy comprehension for people who lived a lifetime focusing on the hard skills… the things that really *matter*.  Soft skills. It sounds like the prostitute’s domain. Well… this is the part where you decide whether you are with me or against me. Read on if you wish.

This is not limited to programmers and technology people.  Other areas like project management and content production are also constrained to the world of hard skills and hard proof. If the work was completed within a specified time period, according to specified requirements, then it is mostly focused on “hard skills”.

In the soft skills universe, there are people who continue to defy gravity and excel, even though it seems inconceivable. However, you may need to look closer and find a way to believe the inconceivable. In my particular world, I watch how some folk have a knack for getting what they want without making enemies. Is that possible in the world of hard skills?  If you visit a message board or other online discussion where one group is trying to proclaim their rightness, you may determine that it is not. For the hard-nosed tech people, it’s black-and-white, night-and-day, us-or-them.

My favorite example of this is an event I witnessed the other day.  A certain hard-nosed technical project manager had a dubious recommendation about an art-related decision. The Creative Director, simply said “Nice try, [insert name here]”. It was a wondrous moment to behold, and I learned so much from that moment.

The lesson is to make your point from the high ground without getting involved in a battle. If they don’t get it, they don’t get it. In this particular case, the project manager was taken aback and could not formulate an answer.

That’s not the only great example of soft skills I have witnessed. I’ll tell you more another time.

Content is King. Long Live the King.

I suppose that’s not a terribly original title. I’m sure a Google search will yield a dozen articles with this title. Oh well whatever. It still means something to me. Starting in 2012 and beyond, my mantra is to create and own content.

I started this year with this mantra in mind. I started a series of interactive math digital books and apps with the belief that this would be a rich area for content. The theory is good, the execution was not as good. Still, I am proud to have completed that project and learned something from that effort and failure.

Today, I continue to push forward in other content areas. As a lifelong programmer, my specific area of content is software. As technology evolves towards mobile devices, my content focus as a software developer should naturally be mobile apps. Of course, the skills to create apps is far distant from having good ideas for mobile apps. The best compromise is to stay focused on apps that are content-driven, which is perfectly acceptable to me. I intend to stay close to the digital publishing sector and any digital publishing tools that I create in this area will have educational and/or technological value to me.

Earlier this afternoon, I re-read an article that I have always found fascinating. It is the story of Byron Reese of Demand Media, who has made a career out of creating content based on audience interests.

In my current side project, I am working on a content production engine that delivers topical content to mobile devices. By “topical content”, I mean content within a specific interest area; content that has an audience.  Perhaps it’s the equivalent of Flipboard for X, where X is something that people are interested in. The content can be a mix of curated news and videos, as well as reference guides.  A good example would be content focused on a specific video game where the audience is very passionate about the content and wants a custom experience with social integration.

That’s where things stand right now. I plan to post more on this blog mainly for my own mental benefit. To get focused and stay sharp…

 

 

Passion, Precision and Performance

For the last decade or so, I have said that the most important quality that I expect from myself and others I work with is precision.  It is that inate drive to build and deliver things that have been carefully engineered to resist and gracefully handle failures. The best engineers will expect flaws and unexpected fail points in anything they create.  Only through precision can you mitigate the risks of errors that occur at runtime.

Looking to the future, I am entering a new level of my career in technology and advertising. And I am setting new targets for myself and for the company I am excited to join. My new mantra is “performance”. No just performing well or awesome (which is my baseline goal).  I mean the ability to measure and demonstrate performance on a number of key performance indicators (KPIs). In my mind, I am looking to establish processes to catalog and track the execution of major tasks and deliverables.  Ideally, this would result in a weekly set of charts that one could use to immediately gauge performance and risk.

Looking back, I can point to the quality that matters the most throughout one’s career.  Conveniently, it is another word that starts with “P”.  Passion. That’s what I look for when hiring anyone, especially if they are just getting started and perhaps are still growing in terms of skills. And it’s the key ingredient that you need for yourself and your entire team. If it’s not there, it is painfully obvious.

Saying it again, you need these things: passion, precision, and performance. 

Page flip events in iBooks Webkit. No dice.

Still working on my iBooks interactive ebook (still top secret) and I wanted to reset the page to it’s original state after flipping to the next page.  I tried the pageshow and pagehide events.  These are tied to the Page Cache in webkit.  These are like the page load and unload events and I think these are designed more for navigating forward and backward in your browse history.

Didn’t work.  I suppose they work in some use cases, but not in iBooks which is admittedly not the main scenario that it was designed for.

Next I learned about the Page Visibility API which tracks the visibilitychange event. For example, if you switch to another tab in your browser, the visibilty state changes from “visible” to “hidden”.  I added code like this:

document.addEventListener("webkitvisibilitychange", function() {
   var state = document["webkitVisibilityState"];
   if (state == "hidden") {
   LEX.removeClass(card, 'flip');
   }
 }, false);

I thought for sure that this would solve my need. Again, no dice. Deep down, I know that iBooks has separate webview controls and the page that I just flipped over is still open and does not consider itself hidden. That’s not the same as switching tabs, but I wish it were.

Oh well, another fail.  The good news is that iBooks unloads a page after you have flipped two pages forward.  When you flip back 2 pages, you see that the page has reloaded.

Little Known Facts … about iBooks, iPhone, and iPad

I’ve spent many days struggling with iBooks.  The weirdness of retina displays is giving me trouble.  I am creating a reflowable EPUB for iBooks with some tricky image sizing issues. In order to have the same ebook work on both iPad and iPhone 4+ without change, I need to determine the internal screen dimensions on page load.  For your benefit and mine, here is what I found out for portrait display iBooks.

iPad: 557 x 800

 

iPhone/iPod with retina display: 274×376

It’s also shocking that the true resolution of the retina display (640×960) is ignored.  All pixel dimensions are automatically doubled.

Yes, so annoying and confusing… I decided to work with scalable vector graphics (SVG).  It actually works well.  (more later)

Note to Self

Some time ago, I stopped blogging because it was too much work.  I treated each post like a masterpiece and upon reflection (and hindsight), many of the posts look pretty foolish.  Some weren’t too bad…

Anyway, I am trying something new with the blog.  In my recent ebook work, I have been uncovering all kinds of useful (and sometimes “-less”) technical facts about EPUB development.  So, my plan is to occasionally post my findings and share.  Kind of like taking notes. (Ergo the title “Note to Self”) Perhaps someday I will google for an answer and find my own post to answer my own question.

Coming soon, some posts on my hard-fought battles with EPUB and iBooks on the following:

  • Proper viewport settings for fixed layout
  • Event propagation
  • Raw/vintage Javascript
  • Twitter Bootstrap in EPUB