Don't Belittle People Or Your Users

Ever since starting 1530 Technologies back in October of 2008, I’ve been working closely with the startup community here in Chicago. Not only as a source of potential clients, but also potential partners. I’ve been fortunate to meet some amazing people and startups. However, one of the running themes I’ve encountered among startups and their employees is something I would call a disdain for people.

For example, I’m constantly surprised at the number of startups that describe their potential customers as, basically, idiots. They start by telling me that “they’ll show them how [insert business here] should be done” or “[potential customer] is currently doing X [laughs]”. Now, they can tell themselves that they’re only talking to me and not their customers, but that’s not that easy. It’s difficult, if not impossible, to get someone to believe in you or your company when you’re not being 100% honest with them. Maybe you’re a spectacular liar, but chance are, they’ll know that you’re just full of shit. You can’t truly care about solving a persons problem if you hold them or their problem in such low regard.

I also see other entrepreneurs ridicule and make fun of non-entrepreneurs for no real reason. I was in the offices of the Illinois Technology Association ( ITA ) recently and overheard some employees of a startup making some not so nice remarks about the receptionist that was currently working. They didn’t even know her name even though they see her everyday. They were treating her like she didn’t matter and, what’s worse, their CEO was joining in on the fun. I couldn’t believe that a CEO would set such an example for the other employees. Since I am a member of the ITA, I use their offices frequently. I not only know all of the receptionists names, but quite a bit about them. I don’t do it to curry favor with them, I do it because they’re people too and I like being nice to people. Just because they’re not doing the same job I am or working in the same industry as me, doesn’t make them any less of a person or not worth my time.

Being nice to people doesn’t cost you anything and it doesn’t take much of an effort to care a bit about people. If you simply listen to people, you’ll be quite surprised at how much more you will understand. You’ll become better at interacting with people and you’ll also become better at understanding them and their issues, which is a huge first step to actually solving their issues. It’s one of the best traits you can nurture in yourself and it never goes out of style, no matter what you’re doing. So the next time you’re talking with someone, ask yourself if you’re really listening to them and what they’re saying

Django Intern Wanted

We’re looking for an intern who’s looking to get their foot in the door.
We have a dynamic environment with lots of opportunity to spread your wings and get a feel
for what you like to do. You’ll be working with very experienced people and given the opportunity to grow as
the company grows. We’re in Chicago, IL, but you can be anywhere really. We’re flexible like that.
You have to:
– Be passionate about technology
– Available at least 15 hrs a week
– Have some HTML, CSS & Django skills
– Know the value of automated builds & unit tests
– Have good communication skills
We are:
– Small, bootstrapped startup based in Chicago
– Building products covering different areas, including sports & analytics
– Focused on building products for real people & solving real problems.
– Dedicated to building products with simplicity & usability
If you’re a budding developer looking for a taste of the industry or an experienced hack looking to use
some new technologies, drop us a line and we’ll talk.

iPhone Programming: Max Length Text Field

So one of the first things I needed to do in an iPhone application was limit the amount of characters that a user can enter into a UITextField. At first glance, this seems easy, but it’s actually a little less than straight forward.
First, your containing class needs to implement the UITextFieldDelegate protocol. See my previous post about what protocols and delegates are. In particular, you need to implement the shouldChangeCharactersInRange method:

- (BOOL)textField:(UITextField *)inputTextField
shouldChangeCharactersInRange:(NSRange)range
replacementString:(NSString *)string
{
}

This method gets called when the user enters new text but before the text is actually saved to the field. You return a YES or NO, depending on if you want the new text to be allowed into the field. Basically, you’re checking to see if the next text would be bigger than a given length. If it is, you reject the change. If not, you’re good to go.
Next, you need to check the text field length to see if it’s ok:

if (textField.text.length >= 5 && range.length == 0) {
return NO;
} else {
return YES;
}

Above I’m simply checking to see if the textfields text is bigger than 5. The second part of the expression, the range length checking, is for little more complex scenarios when the range of text you’re changing is more than one character. For now, just check that the range length is 0.
Now, if you have one text field on your screen, you’re done. But what if you have multiple text fields on your form and they all have different max length requirements? Well, the answer turns out to be pretty easy. Simply create a new subclass of the UITextField:

// MaxLengthTextField.h
@interface MaxLengthTextField : UITextField {
int maxLength;
}
@property (nonatomic) int maxLength;
@end
//MaxLengthTextField.m
#import "MaxLengthTextField.h"
@implementation MaxLengthTextField
@synthesize maxLength;
@end

Then, instead of creating instances of UITextField, create instances of MaxLengthTextField. Set the max length of the text field like so:

maxLengthTextFieldInstance.maxLength = 5;

Then in your shouldChangeCharactersInRange method, cast the textField parameter to a MaxLengthTextField type and then check the length using the maxLength property. You’re next method implementation will look like this:

- (BOOL)textField:(UITextField *)inputTextField
shouldChangeCharactersInRange:(NSRange)range
replacementString:(NSString *)string
{
MaxLengthTextField *maxLengthTextField = nil;
if([inputTextField isMemberOfClass:[MaxLengthTextField class]]) {
maxLengthTextField = (MaxLengthTextField *)inputTextField;
}
if ( maxLengthTextField ) {
if (maxLengthTextField.maxLength > 0 &&
maxLengthTextField.text.length >= maxLengthTextField.maxLength &&
range.length == 0)
{
return NO;
} else {
return YES;
}
} else {
return YES;
}
}

And that’s it. You’re done. Well, you could pull the maxLength comparison into the MaxLengthTextField for better encapsulation. That’s left as an exercise to the reader. Enjoy.