work

Separation of Church & State / Workday and Personal

Separation of Work and Personal

I posted a tweet today where I comment on how I try my hardest to separate my work from my personal life.

I don’t talk about my place of employment, the work that I do (beyond sharing some code questions from time to time), and try my best not to rant about a specific industry.

From time to time, even with my best efforts, I have pissed off a few people by what I’ve written or said in public, off work hours, away from my buildings.

In my tweet, I said that I feel I do a better job of separating the workday from personal life than our government does in separating church from State. I hope my efforts are enough, as I certainly don’t intend to piss anyone off by my technical reviews, code sharing (never trade secrets), or other rants.

I am extremely passionate about the work I do – more than that, the industry for which I’ve made my career focus. Some shifts in how business is done or public misinformation about my industry breaks my heart, but I carry on. I do my best to educate without mixing the paycheck-generating business with my own opinions.

I hope you all enjoy reading my posts; I hope some are valuable in educating my audience, entertaining some and purposefully annoying my detractors.

At the end of the day, I simply want to remain productive and proactive in the industry that feeds my brain and my family.

photo 2

Flipboard: Potentially NSFW


Flipboard, my new favorite time-waster on my iPad finally added my credentials for Facebook and Twitter, thus bringing in news and shared content from my contact lists.

The addition of Twitter and Facebook streams looks beautiful – I can browse (in a newspaper-style layout) the tweets, links, photos, and messages from both services quickly.

While I do love the layout (I’m a print guy, after all), I did find one problem with two areas of worry: The content from your Twitter and Facebook stream is presented in Flipboard’s own choice of layout. Meaning, some photos or links from your friends might show up as small boxes, or nearly fullscreen.

In the section view, this means any NSFW content uploaded by your friends (and we all have friends that post non-work safe images, or is that just me?) could be nearly fullscreen.
In the photo-slideshow view (which is displayed on-launch), that same content could appear fullscreen.

I use the slideshow view while my iPad is docked in my homemade cardboard dock at work, that way I can quickly glance at any given photo as it comes across and tap to read more. It’s a nice feature 99% of the time. That is, until a friend’s photo of a night out drinking or another’s link to a punk show (displaying an angry panda) might take some explaining to a hovering boss (as just happened to me).

Flipboard in the dock - showing the angry panda

Flipboard in the dock - showing the angry panda


Flipboard in my hand - showing a photographer-friend on a night out

Flipboard in my hand - showing a photographer-friend on a night out

Twitter stream - yes, that says 'warm weather humping' with a nude photo

Twitter stream - yes, that says 'warm weather humping' with a nude photo

As much as I’m enjoying Flipboard, I can’t recommend one using it as a work-safe slideshow or browsing app if anyone could be hovering in your work area.

That said, totally worth the wait for my custom access. I’m looking forward to the ability to add in news feeds in the future (hint at a request there, guys and gals), video and more.

Screen shot 2010-07-26 at 1.59.28 PM

Substringing a preg_replace (PHP) – Solved!

I’m working with a string, via PHP that I’d like to do a little cleanup on.

I’ve written a plugin (for CodeIgniter) that handles the string as input, checks for empty lines (excessive \r\n’s), cleans e-mail addresses (pretty), and converts URL’s to their full ‘a href’ layout.

The problem I’d like to solve: many of the URL’s I’m finding are “long” – meaning, they are over 100 characters long. I’d like to shorten them to, say, the first 20-30 characters, followed by ellipsis (eg: “http://www.chadedge.com…”).

Using substr() inside a preg_replace() will not work (substr chokes or preg_replace chokes – neither like being wrapped up that way).

Any ideas?

Here’s a before:

its hard to find a good one and most of us are not to thrilled with some of the local repair shops. i have found a really great guy in north seattle. he does beautiful full restores, maintenance, rebuilds and great work all around. have been using him for a while (including correcting some of TL's work). He also sells NOS and repro parts for a better price then anyone local. the is the best i have found and really a great guy to work with. feel free to email me and i can tell you why i like NCVH better then TL. 

http://northcityvintagehonda.wordpress.com/

http://www.northcityvintagehonda.com/servlet/StoreFront

And the after:

its hard to find a good one and most of us are not to thrilled with some of the local repair shops. i have found a really great guy in north seattle. he does beautiful full restores, maintenance, rebuilds and great work all around. have been using him for a while (including correcting some of TL's work). He also sells NOS and repro parts for a better price then anyone local. the is the best i have found and really a great guy to work with. feel free to email me and i can tell you why i like NCVH better then TL. 

http://northcityvintage...
http://northcityvintage...

Update (2010-07-26): I have written a solution by editing (a bad idea, of course) the url helper (system/helpers/url_helper.php) in the function auto_link.
I highly recommend you do NOT repeat my process; however, as this is a one-time hack for a special circumstance, here’s what I did:

In url_helper.php – at the function_auto_link: There is a section of code that parses any found URL in to it’s “bits” (stripping http:// etc). I checked for the length of the url, and if it’s +20 characters, I substring it down to 20 and add an ellipsis to the string before returning the full linked-url chunk.

The code:

Again, I don’t recommend you follow my example – it’d be better to subclass the helper, but in my situation this works just jim-dandy.