Hiding Image Files in TextMate

Here’s how to hide JPG, PNG, and GIF files in your TextMate projects so bulk file operations go faster.

TextMateTextMate, perhaps the best generic programming editor that I’ve ever encountered (though I’d be willing to entertain reader suggestions), has the ability to open an entire directory at once, which is great for making bulk changes to automatically generated website files.

However, there’s one trick that I keep having to look up each time I do it, and that’s how to get that side-bar directory listing of the project files not to display image files. The reason you might want to do this is for efficient global replace options across all text-based site files.

The solution is to click the top-level directory in the project, and press the I button in the bottom right corner of the drawer.

This opens a Folder Information dialog box. In the area labeled Recursively Include Contents Matching there are two fields, one for files and one for folders. In the File Pattern field, enter this regular expression: !\.(jpg|png|gif)$

When you close the Folder Information dialog box, all files with the extensions listed will no longer be displayed.

Connecting Models and Photographers… why so hard?

There are numerous sites that proclaim to connect models and photographers, however based on the design and business models I’ve seen, I don’t think it can work in present form. Here’s why.

As a photographer that photographs models, there’s two primary goals that any website that tries to connect models and photographers should aim for:
Model: Leah M. - Image Copyrighted by Walt Stoneburner

1. Assisting a photographer in finding the right model.

2. Assisting the client in finding the right photographer.

All else is peripheral.

The idea is that if you’re a model looking for work, you post your portfolio online and photographers approach you with gigs. Conversely, if you’re a photographer, you post your portfolio and jobs start coming out of the wood work. The reality is that few sites can deliver on the promise adequately, not to a fault of the site’s objective, but due to design, business model complexities, or subtleties pertaining to the problem of brokering.

Naturally, for any such site to work you’re going to need a critical mass of both kinds of users just to have a wide enough selection to make this happen. As such, it’s important not to alienate users — something that is very easy to do with bad design or practice. It’s not enough that a site be free.

The closest site that I’ve come across that seems to have the right idea is www.ModelMayhem.com. It’s search capability is right on target. You tell it that you are looking for models in your local area that are some number of miles from your zipcode, that are between the ages of 18-24, female, 5’2″ – 5’7″, olive skin, with shoulder length black hair, green eyes, and poof — out pops a number of candidates.

This is the way it should work. You tell the criteria about what you need, and it finds people with those attributes.

The problem is the interface is klunky, the portfolio space limited, the navigation is horribly disorganized, and pretty much anything other than models is left wanting. Yet it’s still usable.

I wish it had a way to describe the kinds of services photographers offered and made them in a searchable fashion as well. Oh well, at least finding models isn’t problematic.

Such locator services are not a social network, nor are they a dating service. They’re supposed to be resources that connect professional with professional, with the added bonus of having a reasonable idea of what you’re getting. It frustrates me when a site is designed around chit-chat and messaging. Simply put let one professional find another, preview their work, and then get in contact with them by email; don’t obscure things. A site that works gets traffic, it doesn’t need fudging to get visitors.

Conversely, I just deleted my account over at www.aMuseBook.com, a web site that professes to do the same thing: connect models and photographers. I’d argue not only that it doesn’t, but that it physically can’t in my personal opinion — it’s a business model problem gone awry.

While better organized, and certainly much prettier, it’s search capabilities are downright awful. The best geographical resolution is state-level. So, if you’re looking for a model in Texas, that’s all of Texas. Additionally, providing search criteria for attributes just isn’t possible, which means locating a specific model by looks isn’t doable. And if you can’t find candidates, you aren’t going to be hiring.

Here’s another bad design choice that just seems obvious. If you want to find a model, you typically are looking for an age bracket, yes? Well, the site doesn’t let you search by age, instead you have to search by a specific birthday, which is stupid. Oh, and that’s a Day – Month – Year birthday at that. Even searching by year alone isn’t helpful, because simply year subtraction doesn’t give age.

Now while aMuseBook does give you more space to store your photos, it unlocks features using a point system. You gain points by commenting on people’s pictures and telling your friends to join. What becomes transparent very quickly is that the site is not structured to make contacts, but to get you to churn through pages so that Google Ads get thrown in your face generating an alternate revenue stream. I quickly got tired of being told in every email I have to “use” the site and it will ‘work’ for me.

Hogwash. If I can’t locate a model or post a comprehensive portfolio, then neither I, nor the models, are getting any serious value out of the site.

Adding insult to injury, the site gives you the ability to provide URLs to your own site; this sounds good at first, until you realize that many models and photographers keep their photos on Flickr. Why? Because Flickr is great for managing photos. But what does aMuseBook do for those sites? It blocks them out, showing up as www.*****.com, and when I questioned the site admin about it, I got back a response stating they didn’t want their site for depositing competitor URLs and not another portfolio site.

Wait a second. The service is there to help me find people by showing them my portfolio but they don’t want me to show them my portfolio if it’s elsewhere? Plus I can’t post my portfolio unless I leave comments that I wouldn’t have otherwise. That’s stacking the deck and gives unrealistic feedback. And when points are rewarded for clicking on ads, I’m pretty sure that’s against Google’s terms of service for AdSense.

If people are churning pages leaving “Nice smile” comments, how is one to know which comments are real (and therefore useful) versus people just trying to collect points? The information itself becomes devalued. Thus the business structure and the design alienates users in the short term, while the lack of utility alienates them in the long term. It can’t be viable.

And that’s why I deleted my account over there: It wasn’t usable or productive.

No wonder it’s so hard for models and photographers to get connected. I wish there were a simple directory that focused on doing one thing and one thing well, connecting professionals. It’s a hard problem, but the person that cracks that nut can steal a whole lot of business from all these other sites without trying too hard.

Fundamentally, the problem is that a brokering agent has to provide and organize information. Limiting it, not being able to search it, or failing to have a positive user experience drives away the very assets that are needed to make the site work. This appears to be a case where a well simple organized directory could be a winner-take-all.



UPDATE: I have found an awesome site for models, photographers, and makeup artists. It’s call Miss Online and it allows unlimited photo uploads with no point limitation schemes. It also includes discussions, groups, blogs, and email. The site is very active and quite attractive to use; advertising is at a minimum, and you aren’t coerced into clicking through tons of pages. Plus, and here’s the real proof: as a photographer I’ve had more exchanges with models with this one site than all the other sites combined. It does get you connected.

Ugh, wimp.com has video ads

Here’s a case where mini-ads just killed the experience for me, and as a result became a deterrent from visiting a once popular site for me.

I used to be a pretty big fan of wimp.com, a site that collected links to all kinds of interesting videos. Not having much time on my hands, this was the perfect aggregation of interesting content.

Now, when I go visit a link, an ad usually pops up. I have to close it. Then the video starts. And, again, another ad slides up from the bottom, and I have to that add. Then all the while the video is playing, I have a little “AD” box overlaid hoping I’ll press it.

Advertising Fail
The new face of wimp.com — why I’m done.

While I don’t begrudge wimp.com, or other sites, from having advertisements, I really dislike intrusive ads in the video stream.

As such, wimp.com, you’ve just gone from being one of my favorite sites to one of my least visited sites (which means no ad clicks, no ad views, by the way).

The simple solution would have been placing an ad elsewhere on the page, even under the video.

Want to know where the ads should have gone? To the right of the directory listing of links. That’s the page I’m always coming back to.

Another great part of the internet just died for me.

UPDATE 12-Mar-2009: While showing this horrible predicament to a friend the site acted differently; it played the video with no ugly overlays or pre-ads, but displayed an advertisement when done. That is perfectly acceptable! Fantastic compromise guys!

UPDATE 18-Mar-2009: Ugh, now it’s worse — ads pop up while you’re watching, even after you’ve dismissed them.

Safari 4 Beta – OS X Users: Wait

Installing the new Safari 4 Beta gave a great browser experience, but it stopped OS X’s Mail from working. Uninstalling it restored normality. Anyone else getting this?

Yesterday I downloaded a copy of Safari 4 Beta for Windows, and I have to say that the speed increase was obvious. Just a little playing around with the browser [especially in developer mode] tells me that Apple has something good. Real good.

However, my experience when installing the Safari4.0BetaLeo.dmg version on OS X wasn’t as hot. Well it was, but the collateral damage was unexpected.

In short, the browser worked great, just like on Windows. The speed up was there, but certainly not as dramatic as when you’ve got Internet Explorer to compare it to.

Safari 4 Beta Kills MailMy problem, however, was that when I went to open up OS X’s Mail, the Mail program crashed. Hard.

Repeated attempts did the same thing. Open Mail, it shows the cached list of old messages, it attempts to download from the IMAP servers, and clicking anywhere causes the Mail application to implode.

It was certainly repeatable.

Two things about the crash impressed me, though.

Number one, Mail was blaming it on a Growl extension. That’s nice to know that an application can tell where it’s detecting a fault.

Number two, after a few repeated failures, it was just like Apple to automatically sense my frustration and have mail automatically ask me if I’d like to reset my preferences and try launching again.

I did. And, it didn’t work.

So, after logging a few problem reports, I decided to uninstall Safari using the Safari4.0BetaUninstall.pkg.

No surprise, Mail returned to normal, and my Growl extensions were functioning just fine.

This raises the question about what the new Safari is doing that affect Mail to begin with.

But the real point here is that this software really seems to be beta. Good beta. But still beta. If OS X Mail stops working and you don’t know why, revert to your original Safari install. I bet it’ll help.

Can any other OS X users confirm or deny this is happening to them?

CONFIRMED WITH SOLUTION: Thanks to reader comments and feedback, it’s clear the problem is with current Growl extensions not being compatible; simply remove them (see comments on how) and wait for Growl to come out with an update.

Amazing Pick Up

I recently visited a family that we’re particularly fond of. I’ve known many of their children since they were but mere infants. It had been a while, perhaps too long, and the infants were now in early grade school.

One little girl, about six, ran up to me, having remembered me lifting her up and flying her around at a much younger age.

“Pick me up!” she exlaimed, hoping to relive old memories. But, I couldn’t help myself. I love ambiguity.

And, in my best lounge lizard voice complied to her request with an awful proposition, “Hey, wanna go back to my place?”

“Yeah!!!” she started jumping up and down.

I looked at her mom, “Wow, ya know, that’s my fastest time yet.” Her mom just shook her head and burried her face in her hand.

So, that, you understand?

This evening a few of us went out to eat. As we walked in the front door the hostess smiled at us, escorting us to a booth that would accommodate our party’s size.

“Excuse me,” I said to her as she was seating us, “which way to the restrooms?”

She looked at me very confused. But, being sure they had some, I deduced what we had was a language barrier.

So, I tried again with a different term. And, briefer. “Bathroom?”

Again, she shook her head indicating she had no clue what I was saying.

Never to be discouraged, and with an audience of many patrons, I said in a baby voice: “Pee pee?”

She instantly smiled, holding back a laugh, and pointed down a hallway. That, she understood.

If you’re not here, raise your hand.

Last night I was watched a very impressive and emotionally compelling seance.

It included objects moving on their own, volunteers themselves channeling spirits not a specific medium, where they’d revealing knowledge they couldn’t have, such as the contents of a sealed envelope. No stooges or actors were used in conducting the actual seance. They were very much freaked out by the experience.

Of course, it wasn’t real; it was an elaborate television special conducted by a famous magician who excels in deception, using magic and psychology, as an experiment to see if a modern day audience would be suckered by such showmanship. Disappointly, they were. And, in the end, the magician even showed the participants how he pulled it off and manipulated them, hoping they’d question their beliefs about the supernatural that made them fall for it. It’s clear that he, like many other magicians, do not have a belief in the supernatural and get very cheesed off when tricks of the trade are passed off as genuine, especially for the sake of defrauding.

It was amazing how easily smart people get suckered. For example, they were all told to look at a set of photographs and let one come to them, but not to reveal it. However, outside the context of the seance, it was no different than when, say, David Copperfield would have you put your finger on the television anywhere and tell you to follow his instructions, revealing your position at the end; this was just more sophisticated. Later on he’d make them reveal that name using a makeshift Ouija board (he also explained how that worked). Sneaky, if not genius, to apparently take himself out of the loop.

Of course, the Ouija board is more psychological trickery, especially since the dead spirit being called on happened to move the glass happened to be an actress sitting outside in a van. None the less, the glass moved, as it had to, with no stooge touching it, leaving them to invent a plausable explaination for the context they were in.

It started with the directions “Everyone ask, ‘Are you here spirit? If you’re here, move the glass to Y, for yes.”

At that point I paused the show, turned to the person next to me and stated, “If you’re not here spirit, move the glass to N, for no.” It was the spooky equivalent of “Everyone who’s not here, raise your hand.”

Never hand someone with a crush a hose.

Never, ever hand a small child with a crush on you a hose.

Elizabeth H.Elizabeth and I go way back, in fact, so far back, that in current day as a teen she has little recollection of events that took place between us, although for me, they seem like they just happened yesterday.

When Elizabeth was a little girl, I worked with her mom and like all happy co-workers, we’d socialize after hours on occasion. Quite often Elizabeth got to tag along. Her mom educated her with an impressive vocabulary and incredible set of social manners; thus it was very much a treat to see her. Although, as I’ll reveal now, even back then as a little girl she was still quite the flirt.

One summer day her mom came over with Elizabeth just as my wife had asked me if I could water the yard. Elizabeth wanted to help in order to spend time with me, so I pulled out the hose and we sat on my front steps talking while I sprayed the lawn. It wasn’t long before she asked if it was her turn, so I let go of the squeeze nozzle, shutting off the water, and handed it to her. In retrospect, that was the key mistake.

I recall Elizabeth was about 5 or 6 at the time. But, she engaged the conversation as all women do: with an entrapment.

“Walt?”

“Yes, Elizabeth?”

“Whenever I come over, Tamara is always here.”

“I suppose that’s true.”

“Does she live here?”

“Yes, she does.”

It was evident that she was not fond of this answer, as she put her little fists on her hips.

“And why is that? Are you married to her?” Her little eyebrow went up.

“Yes, she’s my wife.”

At that point, Elizabeth scolds me, “You Never Told Me That!!!” and she points the hose right in my face and unleashes gallons of cold water all over me in an instant. And doesn’t let up.

Apparently, Elizabeth’s mom caught a flurry of activity through the storm door and came running, “ELIZABETH!”

Elizabeth shut off the hose, and looked at me expectingly, “Tell her what you just told me.”

And so, I had to apologize to Elizabeth, and her mom, for my big secret.

Found: The Best iPhone Development Book So Far

Want to write your own iPhone applications but Objective-C, XCode, Interface Builder, and the steep learning curve of Cocoa getting in the way? Have I found the book for you.

Warning: long and geeky post follows — iPhone wanna-be developers, read on!

Beginning iPhone Development - Exploring the iPhone SDKI’ve found it, finally, the best iPhone development book so far! Read on to see why.

Fairly recently, I decided to turn my attention to native iPhone application development, but I found the arena a little sparse when it comes to what I’d call good documentation.

For some perspective, I’m a software developer of 20+ years with background in Unix and Windows; I’m very well versed in C, C++, C#, and Java, among a good number of other higher-level languages, having produced a number of enterprise applications.

You’d think that picking up Objective-C and the Cocoa Touch frameworks would be a fairly simple task. However, the moment you step foot into the pool, you’re get a cold shock at how much you don’t know and it can feel daunting enough to want to retract back to familiar territory.

Don’t give up. It is easy.

Looking forward into the unknown presents a much more gloomy impression than when you’ve taken a few steps and looked back to see just how far you’ve come and in such a short period of time.

Here’s what’s happening: The Apple Frameworks represent a large and mature collection of some impressive code. The closest experience I’ve felt to it, and this is admittedly a horrible analogy, is Ruby on Rails.

With Rails, there’s so much going on by convention that you have to sling very little code to get impressive things to happen. This makes it hard to understand: there is no code to trace.

Same way with the Apple Foundation classes that are based on NeXTSTEP — a lot is handled for you, and often in new ways you might not have thought about because of limitations of other platforms, so that very little code is required to do something quite impressive. The problem is figuring out what that code is you’re supposed to write, and more importantly how’d you know to go about doing that in the first place. Hint: knowing the Foundation Framework is important to understanding the Cocoa Touch Framework.

This leaves one in the lurch that the sample code appears rather sparse, and the framework documentation overwhelming, with little guidance on how all the pieces fit together into a simple, cohesive whole. The problem is all too common.

My biggest gripe with many frameworks, especially Java and it’s auto-generated documentation, is that all you’re really presented with is a list of method signatures with very little discussion about what they do, purpose and limits to the input values, discussions of side effects, the importance of call order, and so forth. With other languages, you’re lucky if you can find the header file to include or the library file to link against. It’s all just expected that you somehow know this, and that doesn’t work when you’re learning a framework, though it’s fine if you just need a reference.

Apple’s online documentation is certainly comprehensive, but the reality is you’re going to be watching videos and reading tons of documentation, picking up crumbs of useful bits as you go. The cohesive moment of comprehension will come, but it will be a long and slow ride. You want something faster.

If you’re learning Objective-C at the same time, the ride is extra bumpy, because not only are there just a few language extensions sitting on top of C, but the ObjC library is actually doing some clever work that you want to know about, and this has additional implications because there’s a lot of convention going on as well. Further obscuring things is the fact that, due to historical reasons, the terminology you are most likely already familiar with doesn’t map nicely. A nice look under the hood solves this. Objective-C isn’t just some new keywords, it’s new application behavior.

What’s Wrong With Other iPhone Books At The Moment
As of early 2009, you’re going to find few iPhone books out there. Most of what exists is for the hacked version of the iPhone, and while that may even sound useful, the tearing apart of the SDK is rough and incomplete, not to mention the implementation to call is painful. This just isn’t applicable to the real world constraints of native mode development.

Think you can get by with a slightly out of date copy of a Cocoa book? Think again. The UIKit framework is just different enough that your approach needs to be slightly different. Tight, efficient, resource management becomes very important.

Also, unless you already know and understand Interface Builder, it can be a hard time following along when your book doesn’t match your software version. Apple keeps modifying Interface Builder, making it better, but the changes can come across as so dramatic, interface-wise, that to the new comer it looks like a totally different application each revision. Once you “get it” the sweeping changes are cognitively transparent. The iPhone SDK includes, you guessed it, a new XCode and Interface Builder.

What few modern iPhone books there are out there jump straight into a technical feast of SDK details, leaving the reader with a learning curve that’s as vertical as a brick wall.

What’s needed is a book that introduces only what you need to know, when you need to know it, explaining tips and tricks along the way, delving into the philosophies of why things are the way they are, what the developers were thinking, how the frameworks are structured, what the conventions are, and when those conventions aren’t followed. And, instead of showing you the end solution all refactored into a neat package, take the long way, when needed, to introduce you to what’s going on and then evolve into the optimal solution.

I’ve Found Such A Book!
The book, by Apress, is called Beginning iPhone Development – Exploring the iPhone SDK by Dave Mark and Jeff LaMarche. This book is about the fundamental concepts you need to understand in order to make the frameworks do their magic.

Its tutorials are very well constructed, easy to follow, and are specifically designed to teach the framework in such a way as you understand what’s going on and learn to fish for yourself.

This is in stark contrast to substandard books that merely cover a framework’s capabilities with cut’n’paste examples that have little bearing to real applications. This alone gives is five out of five stars by my standards.

My only complaint is a minor nit that there are a small handful of typos, and unfortunately, they happen in the code examples. However, they’re glaring, and you won’t get tripped up by them. (For example, on page 85, the tutorial is about UIImage. And, UIImage appears four times in a six line sample. The first one, however, says “jmUIImage” and the indentation is off. It looks like a macro expansion, a note, or the mangled initials of one of the authors. The code won’t compile with it, and it’s obvious from context what it should be.) To me, this is forgivable. Especially since it’s rare.

Tagging 1430216263I want to show you something.

I have a habit of tagging my books when I find an exceptional piece of information that I haven’t found elsewhere. I give a book high marks if it earns somewhere between three to seven tags, as the majority of my collection never gets any tags. Tagging, for me, is not note taking — it’s rare event.

I think the picture speaks for itself.

For Example…
So, at this point, I present for my own edification and future reference, some of that tagged content. Who knows, maybe something you see here might just get you traction on the learning curve.

– In Objective-C, colons are a legal character of the method identifier, they are not syntactic sugar.
– Even though a number of macros translate to nothing, void, zero, or null under the hood, their presence provides important hinting for data types and method calls.
– The NIB’s File’s Owner is a place holder for the class that loaded the NIB file.
– The NIB’s First Responder is the object the user is currently interacting with.
– The application icon is a 57×57 .png file, see Info.plist’s Icon File.
– The iPhone specially optimizes .png files so this is the best format.
– Reset the iPhone Simulator by deleting its directory from ~/Library/Application Support
– You want to use @property (retain, nonatomic) as often as possible.
– Interface Builder uses your defined accessors to properties, which use retain; that means you do need to deallocate Interface Builder objects, even if you didn’t instantiate them.
– There are four control states on a control, often you want UIControlStateNormal.
– Learn to use retain/release, there is no garbage collecting on the iPhone.
– It’s better to init/release than using factory methods; factories use autorelease pools, and while this will work, it often keeps resources around longer than you intend — avoid autorelease pools.
– Hog too many resources, whether CPU or memory, and the phone will reboot.
– Everything from UIApplication on down will fire messages to Delegate objects at certain well-defined times, you need to learn what these times are and what messages are sent; it’s not just subclass avoidance.
– You can Option-Click on a class or interface name in XCode and go right to the documentation.
– You can press ESC to cause auto complete to happen immediately.
– Command-equal_sign will size a control to fit.
– When you’ve got a lot of control hierarchies going on, use the View Mode button to see them as a list.
– Scaling an image takes computational overhead, avoid if you can.
– Set the Alpha slider to 1.0 in order to optimize the drawing sequence, it skips looking at the underlying background and factoring it in — it applies to the image drawn.
– Also set the Opaque checkbox in order to optimize the drawing sequence, it skips drawing the underlying background for the parts where the image is transparent.
– The Tag control allows you to assign a numerical identifier to controls to locate them later.
– You need to handle the Did End on Exit event in order to make the keyboard go away.
– You may also need a huge, invisible, custom button as well to make the keyboard go away.
– In XCode, use Option-Command-up_arrow to toggle between a header and its source file.
– In the Interface Builder, move the cursor over a view and hold down Option to see how many pixels there are between the item and its superview.
– Option-dragging a control in Interface Builder makes a copy.
– Nifty buttons are actually stretchable images, and Apple has buried a ton of them free for your use in the UICatalog sample code on their site.
– There are three different ways to handle layouts when rotation happens: autosize, reposition, and view swapping.
– The rotation callback passes you the orientation the phone came from, you need to use other means to get the current orientation.
– If you want to use Core Graphics, for things like view transitions, you need to link the framework into your application.
– Some frameworks, like Core Graphics, have one version for the iPhone hardware and one version for the iPhone Simulator.
– If you use the correct parameters, XCode’s build process can play games with the path and always target the right framework (use Relative to Current SDK, and do not select Copy items).
– Right-click the Resources folder and use Add / Existing Frameworks… to do this process in a safe way.
– If a view isn’t shown, it’s superview is nil.

…there’s plenty more, but you get the idea. The book is jammed with all kinds of useful things to someone who is new to iPhone development. This presentation of material makes the learning curve very approachable.

And, once over that hurdle, all those other books that I said were problematic suddenly make a whole lot of sense.

This book is the best first step I’ve seen in the journey to writing iPhone applications. Period.

Walt gives “Beginning iPhone Development” two thumbs up, five stars our of five starts, and a head nod of appreciation to the authors. Well done, guys. Well done.

I’m from Hell?

So, I go out to eat this evening and as soon as I walk in the door, the Korean waitress announces to all in the place that I’m from Hell.

Yes, hell.

Not only that, but I’m the devil.

I’m trying to figure out what she’s talking about, and she explains that she had just been telling another customer, who’s also a photographer, about me, and then I just walked in.

Confused for a moment, I figure out her context — she’s starts grabbing her ear and saying it was on fire, all the while pointing at me and professing to all, “You the devil! You from Hell.”

Obviously, the customers weren’t feeling all that comfortable with the revelation.

“Oh, were my ears burning?” She nods.

“You mean ‘speak of the devil’?” I inquire.

“Yes! Yes! You the devil. You from hell!”

Well, damn.