Apache Cassandra Project – processing “Big Data”

Being an old-school OSS’er, MySql has been my go-to DB for data storage since the turn of the century. It’s great, I love it (mostly) but it does have it’s drawbacks. Largest of which is it’s now owned by Oracle which does a HORRIBLE JOB of supporting it. I have personal experience with this, as the results of a recent issue with InnoDB and MySQL.

In the mean time, some of the hot-shot up-and-commers in another department have been facing their own data processing challenges (with MySql and other DB’s), and have started to look at some highly scalable alternatives. One of the front-runners right now is Apache’s Cassandra database project.

The synopsis from the page is (as would be most marketing verbiage) very encouraging!

The Apache Cassandra database is the right choice when you need scalability and high availability without compromising performance. Linear scalability and proven fault-tolerance on commodity hardware or cloud infrastructure make it the perfect platform for mission-critical data. Cassandra’s support for replicating across multiple datacenters is best-in-class, providing lower latency for your users and the peace of mind of knowing that you can survive regional outages.

This sounds too good to be true. Finally a solution that we might be able to implement and grow, and one that doe not have the incredibly frustrating drawback of InnoDB and MySql’s fragile replication architecture. I’ve found out exactly how fragile it is, despite have a cluster of high-speed specially designed DB servers, the amount of down time we had was NOT ACCEPTABLE!).

With a charter to handle ever growing amounts of data and the need for ultimate availability and reliability, an alternative to MySQL is almost certainly required.

Of the items discussed on the main page, this one really hits home and stands out to me:

Fault Tolerant

Data is automatically replicated to multiple nodes for fault-tolerance. Replication across multiple data centers is supported. Failed nodes can be replaced with no downtime.

I recently watched a video from the 2011 Cassandra Conference in San Francisco. A lot of good information shared. This video is available on the Cassandra home page. I recommend muscling through the marketing BS as the beginning and take in what they cover.

Job graph for ‘Big Data’ is skyrocketing.

Demand for Cassandra experts is also skyrocketing.

Big data players are using Cassandra.

It’s a known issue that RDBM’s (ex. MySql) have serious limitations (no kidding).

RDBM’s generally have an 8GB cache limit (this is interesting, and would explain some issues we’ve had with scalability in our DB severs, which have 64GB of memory).

The notion that Cassandra does not have good read speed, is a fallacy. Version 0.8 read speed is at parity of the already considered fast 0.6 write speed. Fast!?

No global or even low-level write locks. The column swap architecture alleviates the need for these locks, this allows high-speed writes.

Quorum reads and writes are consistent across the distribution.

New feature of local LOCAL_QUORUM allows quorums to be established from only the local nodes, alleviating latency waiting for a quorum including remote nodes in other geographic locations.

Cassandra uses XML files for schema modifications. In version 0.7 provides new features to allow on-line schema updates.

CLI for Cassandra is now very powerful.

Has a SQL language capability (yes!).

Latest version provides much easier to implement secondary indexing (indexes other than the primary).

Version 0.8 supports bulk loading. This is very interesting for my current project

There is wide support for Cassandra in both interpreted and compiled OSS languages, including the ones I most frequently use.

CQL Cassandra Query Language.

Replication architecture is vastly superior to MySQLs transaction and log replay strategy. Cassandra uses an rsync style replication where hash comparisons are exchanged to find which parts of the data tree a given replication node (that is responsible for that tree of data) might need updating, then then transferring just that data. Not only does this reduce bandwidth, but this implies asynchronous replication! Finally! Now this makes sense to me!!

Hadoop support exists for Cassandra, BUT, it’s not a great fit for Cassandra. Look into Brisk if Hadoop implementation is desired or required.

Division of Real-Time and Analytics nodes.

Nodes can be configured to communicate with each other in an encrypted fashion, but in general inter-node communication across public-private networks should be established using VPN tunnels.

This needs further research, but it’s very, VERY promising!

Updated main website with Feed Dividers

Released enhancement today to display daily dividers in those RSS Feed aggregators that show data more than 1 day old. The most obivous of these are my Blog Updates and the USGS data feed.

This update works best in the USGS feed. The posting to my blogs is infrequent enough that the dividers are just as prevelant as the posts themselves.

Here is a screen shot showing this first implementation worked out. Loving it in the USGS Quakes parsers/agreegators but NOT loving it in my own Blog Roll.

New daily dividers

More changes coming, I’m fairly certain of that.

Philippines Earth Quakes, follows similar activity in Vanuatu and Papua New Guinea

In what looks like sympathetic seismic activity, there has been a burst of quakes in the Philippines, just days after a string of large quakes not all that far south off of Vanuatu.

M 5.2 — Negros – Cebu region, Philippines
M 5.8 — Negros – Cebu region, Philippines
M 6.0 — Negros – Cebu region, Philippines
M 5.6 — Negros – Cebu region, Philippines
M 6.7 — Negros – Cebu region, Philippines

One has to wonder what in the world is going on there. Is this the precursor to more activity world wide? Does it mean anything at all?

USGS PAGER Data

USGS - PAGER map of quake cluster

Other recent strings of activity:

Complete string of Moderate Quakes Worldwide

M 5.2 — Negros – Cebu region, Philippines
M 5.8 — Negros – Cebu region, Philippines
M 6.0 — Negros – Cebu region, Philippines
M 5.6 — Negros – Cebu region, Philippines
M 6.7 — Negros – Cebu region, Philippines
M 5.1 — Fiji region
M 5.2 — Mindanao, Philippines
M 6.0 — Vanuatu
M 5.2 — Kyrgyzstan
M 5.0 — southern Iran
M 5.0 — Vanuatu
M 6.1 — Vanuatu
M 5.2 — Kepulauan Kai, Indonesia
M 5.3 — Owen Fracture Zone region
M 5.7 — Vancouver Island, Canada region
M 5.4 — Samar, Philippines
M 5.1 — central Mid-Atlantic Ridge
M 5.2 — Vanuatu
M 5.6 — Samar, Philippines
M 5.8 — Tonga
M 5.4 — central Mongolia
M 5.1 — Taiwan region
M 5.1 — New Britain region, Papua New Guinea
M 5.7 — Vanuatu
M 5.4 — Vanuatu
M 6.0 — Vanuatu
M 5.1 — Vanuatu
M 5.1 — Vanuatu
M 5.2 — Vanuatu
M 5.5 — Vanuatu
M 5.0 — Vanuatu
M 5.3 — Vanuatu
M 7.1 — Vanuatu
M 5.5 — New Britain region, Papua New Guinea
M 5.0 — New Ireland region, Papua New Guinea
M 5.4 — New Britain region, Papua New Guinea
M 5.0 — near the coast of southern Peru
M 5.0 — west of Macquarie Island
M 5.3 — Easter Island region
M 5.6 — southern Sumatra, Indonesia
M 5.2 — Samar, Philippines
M 5.1 — Vanuatu

Massive Earth Quake Activity in Vanuatu this week

A series of large quakes has hit the area near Vanuatu.

Here is a snapshot of the activity tracked on my homepage [ LINK ]. There have been big quakes near there for some time, but this is cluster of very large events:

M 5.0 — Vanuatu
M 6.1 — Vanuatu
M 5.2 — Vanuatu
M 5.7 — Vanuatu
M 5.4 — Vanuatu
M 6.0 — Vanuatu
M 5.1 — Vanuatu
M 5.1 — Vanuatu
M 5.2 — Vanuatu
M 5.5 — Vanuatu
M 5.0 — Vanuatu
M 5.3 — Vanuatu
M 7.1 — Vanuatu
M 5.1 — Vanuatu

It would appear that there is a some significant seismic activity in that region. Other areas like New Zealand and the seemingly always active Papua New Guinea are also seeing events.

M 5.0 — Kermadec Islands, New Zealand
M 5.4 — Kermadec Islands, New Zealand
M 5.4 — Kermadec Islands, New Zealand
M 5.2 — Kermadec Islands, New Zealand

M 5.5 — New Britain region, Papua New Guinea
M 5.0 — New Ireland region, Papua New Guinea
M 5.4 — New Britain region, Papua New Guinea
M 5.1 — New Britain region, Papua New Guinea
M 5.3 — Papua, Indonesia

The largest of the recent events [ LINK ] happened Thursday, February 02, 2012 at 13:34:40 UTC.

As illustrated in this clipping from the USGS Map for the event, there has been a lot of large quake activity in the last 7 days.

Fortunately, despite the area having structures vulnerable to shaking damage, the estimated threat to population due to distance is virtually nil [ LINK ]. It’s estimated less that there was a 30% chance of any fatality, and a 4% chance of more than 30.

Epicenter for the quakes appears to be on a submarine ridge between two island chains. A very nice nursery for a tsunami, should there be significant under sea land movement from a large event.

As always, I continue to watch worldwide seismic events on my home page: [ LINK ].

UPDATE: – 4-FEB-2012 21:20

More activity near the epicenter of that large quake of Vanuatu… these in just the last few hours:

M 5.0 — Vanuatu
M 6.1 — Vanuatu
M 5.2 — Vanuatu

CIDR Calculator App picked up by Softpedia

This just in…. (seems like a good thing). Notice that my new App CIDR Calculator for the MAC (in the wide for barely 24 hours now), was found by Softpedia, and linked in their site.

Congratulations,

CIDR Calculator, one of your products, has been added to Softpedia’s
database of software programs for Mac OS. It is featured with a description
text, screenshots, download links and technical details on this page:
http://mac.softpedia.com/get/Utilities/DeMartini-CIDR-Calculator.shtml

The description text was created by our editors, using sources such as text
from your product’s homepage, information from its help system, the PAD
file (if available) and the editor’s own opinions on the program itself.

Nothing wrong with a little free exposure. No ratings so far, but I hope to get some good feedback. It’s already sold several units so I know someone is out there giving it a test.

If you want to learn more about this entry in Softpedia, [ HERE IS THE LINK ].

If you want to check out the App itself at the Apple MAC App Store.. just click on the button below!

Buy at the Mac App Store

Digging through the past – my early programming.

I have been on a mission this year to simplify my life. Part of that includes disposing of once ‘possibly useful’ stuff. One such pile of ‘possibly useful’ included over 200 3.25″ floppy discs, circa 1995.

Not wanting to throw away anything that might be useful, I had to see what was on those disks. The original plan was to use an old PC that I used for LINUX development (and has a 3.25″ drive) to mount the disks and read the contents. That plan slowly devolved into a realization that things would be not be that simple. After trying to mount several disks, only to have the mount time out and fail, I came the the realization that I’d have to find a USB floppy disk drive to plug into my MAC, or (gak.. gag.. snarl) I’d have to construct a Windoze box to read those disks. As much as I found the entire concept utterly revolting, it was my only sane solution. If anyone could possibly consider intentionally installing any Micro$oft operating system as ‘sane’. So be it, that was the goal for a Friday night.

Having access to a Dell Optiplex mini-case Pentium III machine (that I bought at a computer store across town for $25 about 2 years ago), with a 3.25″ disk I decided to give it a try. Sadly, the 10GB disk drive inside was dead… so, I needed to find another old ISA drive. Such antiques are not so easy to find, EXCEPT, in my collection of stuff that would be ‘possibly useful’. This consisted of a stack of 8 drives in size from 8GB to 500GB in size.

Next hurdle was the OS. What was I going to install? Clearly a Pentium III is NOT going to run Win7, or XP for that matter. I’d have to find an OLD OS. So, that’s what I did. Being the pack rat I am, I found my old MSDN (yes, you read that right, back in the 90′s I was a registered Windows developer.. more on that below). I no longer had the full 30 DC catalog of stuff, but I did, for some reason, retain my Windoze NT MSDN install image with developer license. This… was going to be my conduit to the archive of my programming history.

I’ll save you the 1 day odyssey of dealing with the ancient and inexplicable Windoze limitations on hard drive size. Even with the cylinders and heads and a translation formula.. I ended up with only one drive that would work. And to top it off, despite Windoze complains that the max Partition size would be about 8 GB (my iPhone has more storage!), that MAXIMUM partition size the NT would install on was a 2048MB section of disk. This discovery through trial and error cost me several hours and I’m guess at least 1 year off my life.

Finally, I was able to start going through the disks. This is when I came to the realization that my LINUX box just *might* have been able to read the disks all along. Out of the 200 or so disks, only a handful were usable. Most were either un-formatted, or so badly degraded that the CRC errors (you remember CRC errors… I do, except now I’ve suddenly developed a slight tick.. the costs of Windoze can’t be measured in dollars alone.. oh now.. oh no indeed.). Odds are, ever disk I tried to use was junk anyway. This is something I need to follow up on later this week.

In the end, the Dell Optiplex Pentium III was brought to live running Windoze NT. I nightmare of an OS if ever there was one. In fact, I recall in my 1st stint at Hewlett-Packard (mid 90′s) we were forbidden to even mention Windoze NT in our workgroup. The fear of NT vs. HP-UX 9.0 in the market place was great. In retrospect, the comparision is laughable. HP-UX was a real UNIX system, with a real UI, Windoze was.. well.. garbage. The really sad part was that NT won the market share war. There is no accounting for intelligence within IT management.. this is an axiom proven again and again. Digressing….

Most of the stuff I found on the floppies that I could read was worthless. I did have some old 90′s website content that some day I might pull off and do a way-back machine sort of look at my very early web development work when Netscape 1.0 was king and there was no such animal as Internet Exploder. Really, and sadly, I suspect many people cannot even image that… tsk tsk.. sorry for you, I truly feel).

I did manage to find one good working bit of code, and I’m including a screen shot of it here.

This is a bit of code that I wrote using Borland (10,000 points if you remember Borland and know where their headquarters were… 1,000,000 points if you have a photo of it, that you took!) Borland C++. Having had the choice of using the MS Frameworks or buy my own compiler, I bought my own (and it was not cheap I can assure you) full blown compiler. I was even part of their developer and Beta tester network. I had some early releases of BladRunner (a DB precursor to Paradox) in floppy, but I tossed those out during the purge. Shoot.. digressing again….

When I was working at HP, we had a set of very crude batch scripts that performed the very critical task of monitoring our telemarketing PC’s located across town in Santa Clara (the data center where I worked was in Sunnyvale). The batch script ran on a dedicated PC in our data center. It was a fragile concern at best. While working grave yard baby-sitting multi-million dollar equipment, I took it upon myself to take some C and C++ programming classes at the local college, and use my time in the data center to get my homework done. While writing code, it was quite clear to me that this fragile batch file system would be released with a proper Windows program, that would be more robust, provide more information and not require the PC to site there running a single program that would crash if anyone touched the keyboard (it would interrupt the batch file.. whom ever came up with the idea should have been fired on the spot!)

I took a couple of nights to re-write the entire thing in C++, as a Windows application. Here is a picture of the screen with the ‘About’ dialog. Since the constellation of PC’s it monitored were of course not on my home network (there were tossed in the trash at HP around 1997), there was not much else to show.

Telos Vision - Download Monitor

It sure did bring back some memories and let me to think back about the extensive amount of programming experience I have on a wide variety of platforms and languages… sometimes I get so focused on my current objectives, I forget how much programming experience I bring to the table, well over 20 years worth.

I also found a couple of command line and basic text windowing programs that I actually sold for $6.00 a copy back in the late 80′s. Yes, I’ve been writing and selling software for nearly 30 years. Yes, you read that right 30 years. It’s even hard for me to think about that.

Thinking back, to my first experience with a computer, it was at UC Berkley back in 1976. At that time, the computers were all timeshare machines, and time on them was not cheap. There were no monitors, or terminals. Interaction with the computers was via binary status boards (recall all those blinky lights on computers in old movies.. yeah.. that’s what I’m talking about) and the rare interaction with teletype style printer terminals. People allowed to directly interact with computers were highly trained individuals, no mere mortal was allowed to come in contact with a computer. Quite the contrast to today, where even those with the least of ability are allowed to not only touch them, but they can OWN then! And worse yet they are allowed to connect them to world wide networks. The concept of this so foreign and frightening to those early computer scientists.. the thought of it every happening was simply an impossibility. Who would be so stupid to allow that sort of thing to happen? Well, I think that history on that is documented well enough I need not even attempt to cover it here.

Now, I wonder if I can fix those disks with the CRC errors? Where is the old dial-up BBS that kept that fixdisk.exe. program I loved so much?

Create a Self-Signed wildcard SSL Certificate

Justification

Are you a developer that commonly uses SSL / HTTPS communications on your websites? Do you have multiple development environments hosted on the same domain (such as separate client demo/eval/testing VirtualHosts?), then a wildcarded SSL cert might be for you.

Generating one is very simple process. You will need to have the OpenSSL libraries installed on your computer. All but the worst of Operating systems is likely to have this already installed. If not, you can always go here and get a package: [OpenSSL.org]

Enough reasoning and rationalization, time to get down toe business.

Overview

First you must have a private key generated and installed. Second that key is then used to generate a simultaneous signing request and cert signing operation.

Once you have your files created, reference them in the Webserver of your choice (such as nginX or Apach2, if you are using IIS… my heart aches for your plight), using the documentation for that webserver. I’m not going to go into there here, because I’m just taking the time to share this simple process fore generating the CERT.

Step 1 – Generate your private key

If you do not have a private key generated, I’m going to show you have to do it. If you have one that you want to use already, and you know where it is, move onto the next step.

Open a termnal window and execute the following openssl command to generate a private key. For my own installations I never use a key shorter than 2048. Most of the time, I use one that is quite a bit longer. That said, 2048 should provide a sufficiently long key for any practical SSL purposes. Yes, SSL has security issues and a motivated hacker can likely piggy-back it, regardless of your key size… but for the sake of argument and getting through this post, we’ll pretend the Interwebs are a safe place.

Move to the location where you will store your private key (this is a typical location, you can use whatever you want):

cd /etc/ssl/private

Run the command to generate the key:

openssl genrsa 2048 > my.super-awesome.hostname.key

Generating RSA private key, 2048 bit long modulus
......................................+++
.........+++
e is 65537 (0x10001)

So, now we have a key:

ls -l
-rw-r--r-- 1 root wheel 1679 Jan 9 09:41 my.super-awesome.hostname.key

Step 2 – Generate your CERT

This is the fun part, and the 2nd of the super easy steps. To complete this you’ll want to know up front, some important pieces of data, such as the hostname for your site (I’m going to use super-awesome.net for this example). You want to have the address you want to use handy, including the country. Also want to have an e-mail address that will be published in the SSL cert to contact you, and a department and company name if so inclined. Below the actual command and responses will be in bold:


openssl req -new -x509 -nodes -sha1 -days 3650 -key my.super-awesome.hostname.key > my.super-awesome.hostname.cert

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]: US
State or Province Name (full name) [Some-State]: Kellyfornia
Locality Name (eg, city) []: Sac-of-Tomatoes
Organization Name (eg, company) [Internet Widgits Pty Ltd]: Crazy Assembly House
Organizational Unit Name (eg, section) []: Committee on wasting tax payer money
Common Name (eg, YOUR name) []: *.super-awesome.net
Email Address []: admin@super-awesome.net

Verify that you have the file:

ls -l
-rw-r--r-- 1 root wheel 1927 Jan 9 09:50 my.super-awesome.hostname.cert

That’s all there is to it! You’re done. Now you have a Self-Signed SSL wildcard sert for super-awesome.net. This would allow you to secure (and I always use the word secure with a certain degree of sarcasm) any sub-domain / hostname under super-awesome.net. Examples of what it would handle:

  https://www.super-awesome.net
  https://qa-server.super-awesome.net
  https://some-client.super-awesome.net
  https://another-client.super-awesome.net
  https://ya-client.super-awesome.net

Now, it’s important to note that this DOES NOT secure anything beyond that first level.. here are a couple more examples:

  https://www.super-awesome.net --  OK
  https://qa-server.super-awesome.net -- OK
  https://some.client.super-awesome.net -- FAILS
  https://another-client.super-awesome.net -- OK
  https://test.ya-client.super-awesome.net -- FAILS
Extra Credit – viewing the contents of your CERT

It’s all well and good to generate the cert, but what if you want to verify it’s properly setup? What if you find a cert on your system and you want to know what it covers, when it expires, whom might own it, etc. Well, that’s possible too. Running a simple command we’ll examine the SSL Cert just created. The important info is in the ‘Issuer’ and ‘Subject’ blocks.

  openssl x509 -noout -text -in my.super-awesome.hostname.cert

Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            c4:3d:66:b4:e3:cc:61:86
        Signature Algorithm: sha1WithRSAEncryption
        Issuer: C=US, ST=Kellyfornia, L=Sac-of-Tomatoes, O=Crazy Assembly House, OU=Committe on wasting tax payer money, CN=*.super-awesome.net/emailAddress=admin@super-awesome.net
        Validity
            Not Before: Jan  9 17:50:56 2012 GMT
            Not After : Jan  6 17:50:56 2022 GMT
        Subject: C=US, ST=Kellyfornia, L=Sac-of-Tomatoes, O=Crazy Assembly House, OU=Committe on wasting tax payer money, CN=*.super-awesome.net/emailAddress=admin@super-awesome.net
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (2048 bit)
                Modulus (2048 bit):
[...]  /*  removed the modulus to keep the post short */
               Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Subject Key Identifier:
                9D:72:0C:A0:E6:EB:77:2C:77:EF:E8:9E:B7:BC:9F:53:81:1A:40:9D
            X509v3 Authority Key Identifier:
                keyid:9D:72:0C:A0:E6:EB:77:2C:77:EF:E8:9E:B7:BC:9F:53:81:1A:40:9D
                DirName:/C=US/ST=Kellyfornia/L=Sac-of-Tomatoes/O=Crazy Assembly House/OU=Committe on wasting tax payer money/CN=*.super-awesome.net/emailAddress=admin@super-awesome.net
                serial:C4:3D:66:B4:E3:CC:61:86

            X509v3 Basic Constraints:
                CA:TRUE
    Signature Algorithm: sha1WithRSAEncryption
[...]  /*  removed the signature to keep the post short */


Looking at the Subject breaks downs as follows:
  Subject: C=US, ST=Kellyfornia, L=Sac-of-Tomatoes, O=Crazy Assembly House, OU=Committe on wasting tax payer money, CN=*.super-awesome.net/emailAddress=admin@super-awesome.net

  C=US - Country code  'US'
  ST=Kellyfornia  -  State or Provence.
  Sac-of-Tomatoes   -  City/Location
  O=Crazy Assembly House  -  Company or Organization name
  OU=Committe on wasting tax payer money Organizational Unit (department, etc.)
  CN=*.super-awesome.net  -  Canonical Name (hostname / domain) that
 the CERT services.  In this case it's a wildcard, signfied by the '*'

That's all there is to it. Now, secure those website communications!

Xcode 4 – very simple way to open a website from App

This is going to be a VERY quit little missive. Basically, it’s about knowledge retention. The more I write about something, the better chance I have remembering some detail months or years hence. Today, I’m recording, for posterity (sounds pretty snooty, I know), the Objective-C command for opening a URL.

I won’t pretend to know all the details of this, and why it requires so many messages to be passed. In this case I’m admitting I was a cut-and-paste code monkey, standing on the shoulders of others. So, enough babbling, here is the meat of it. This ASSUMES you have a way to call this, such as a class method, or something. To clarity, this is writting into your implementation (.m) file.


- (IBAction)visitAuthorWebsite {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://apps.daviddemartini.com/icidr"]];
}

The above does NOT maintain context within your app. This tosses the user out into Safari to view the page. Had I added a URL View page to the application, it would have appeared there. Perhaps in version 2.1, but for now, for today, this works. I’ve tested it, verified it, and trust it.

Here it is again, broken out into chunks


- (IBAction)visitAuthorWebsite {
[
[
UIApplication sharedApplication
]
openURL:[
NSURL URLWithString:@"http://apps.daviddemartini.com/icidr"
]
];
}

I was thrilled when the example turned out to be so simple. I hope someone finds this useful.

XCode 4 – Dismissing a Keyboard after UITextField input

I originally ran into this issue back in November of 2010, while writing the original version of my iCIDR tool (hey network admins, you should buy this awesome tool now, before the price goes up!).

It’s trivial to enable a keyboard and to change the button, BUT to make it go away, and then actually wire that event into your code to do something use is not as simple as I had originally hoped!

Strategy entails using the keyboards ‘Return’ key to signal that one is done. Seems useful, but only if you have a single line text input. In my case, that’s what I’m looking at, single line input, so that’s the solution I’m going to try.

First order of business is to highlight your text area (I’m only going to be addressing the text input object), and shift to the properties tab (icon looks like this: ). Change the dropdown to the ‘Return Button’ text you wish to use. I like to use ‘DONE’, so, that’s what this image shows. Oh.. and yeah, you are also getting a little sneak peak at the newest generation of iCIDR.

The tricky part is understanding that you need to make sure your ViewController’s header file is modified to implement UITextFieldDelegate.

This is how that might look:

@interface iPhoneCalculatorViewController : UIViewController {
UITextField* seeTextField;
}
@end

Now, when the view loads, the Text box in the view needs to be addressed and wired up to the Keyboard action. Even though I defined a nice fancy label name for my object, so far I’ve only found this method to address the object ID by it’s ID. I think this is pretty funky but, cest la vie. Here is where I set the tag, also in the same view organizer dialogs:

Following that I enabled viewDidLoad (boilerplate code normally commented out), created a local variable pointer to the View’s input text box, and then set a delegator to that pointer in the main ViewContoller.

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
UITextField *iPhoneInputText = (UITextField *) [self.view viewWithTag:1001]; // try to locate the object with the tag
iPhoneInputText.delegate = self; // assign a delegation.
[super viewDidLoad];
}

Moving along, I had to implement the The textFieldShouldReturn method in my ViewController class. This had to be defined to execute on the abandonment of the first responder:


// Should trap all Keyboard Return Events
- (BOOL) textFieldShouldReturn:(UITextField*)textField {
[textField resignFirstResponder];
//[self calculateOperation]; // ENTRY POINT
return NO; // default return value is YES, this is changed to NO to.... (sorry, now I've forgotten!)
}

Here is the keyboard that pops up, with the highlighted ‘Done’ button.

iCIDR 2.0 - keyboard in action (still photo)

The method (BOOL) textFieldShouldReturn is now registered to get the text input object the keyboard was typing into.

Now it’s your job (and mine…) do make it do something useful!!


Support the author, buy the App!

iCIDR - David DeMartini

Stanford Entrepreneurial Thought Leaders series – Jessica Mah

Aired 30-November-2011
Interview with inDinero‘s Co-Founder and Architect Jessica Mah. Jessica discusses business accelerators, Angel investors, common start-up mistakes and why she feels it’s not good to “Fake it until you make it.”

inDinero was founded by two people. Jessica said that having a co-founder was really important. Having a trusted person that can confirm or refute ideas is very useful. Thinking about what your company culture should be up front, it’s OK to have a fun working environment (she likened inDinero to more like a club), but it still needs to be run as a business. A party culture is not likely to succeed. One thing they do to maintain a cohesive workforce and to exchange ideas, is to get out of the office once per week and all have dinner together.

Jessica related that they got a great jump start on the company, but applying to and becoming part of Y-Combinator, which provides a small amount funding for start-ups. She had very high praise for Y-Combinator, and said she she sometimes wishes they were still in that environment. At the end of Y-Combinator they had the opportunity to pitch their company to a variety of potential investors, and as a result of that they raised over $1,000,000 in start-up funding.

inDinero decided to go strictly with Angel investors, and not Venture Capitalists. Going with the Angel investors had a number of advantages. Along with having more direct control over the organization, as opposed to going with VC’s, she felt they had a larger group of advisers with which to consult. That said, she also cautioned against raising money too early.

But even with million dollars plus in funding, things were still not easy. This added significant stress and pressure to perform. She wished that they had taken as much funding as they possible could up front. They had under-estimated the costs of mistakes, such as leasing a fancy office, or making bad hiring decisions.

One of the toughest lessons they learned, was that money goes fast. Keeping control of costs, despite what seemed to be ample funding, is critical to remaining both operational and emotionally strong. One costly mistake they made was the leasing of a nice fancy office. It presented a nice face for visiting clients, but internally Jessica said she felt more like a con artist, knowing the reality of their success. They have disposed of the fancy office (that included a hot tub), and are now operating out of an apartment. She felt that it made them feel more scrappy, as opposed to content.

Staffing the company also turned out to be more challenging than she anticipated. The practice of hiring on intelligence alone, turned out to be a mistake. Employees need to be rounded, able to work well with others, and also with customers. They found that the best way to get the A-Players that every start-up needs, is to give the a test drive first. It’s the fastest path to finding the gold. You only want to keep A-Players. Having under performers in a seat is far more costly than having that seat empty (this is painful lesson I’ve learned as well, and one I’m still trying to address). Bottom line, It’s better to leave that seat empty.

Being a technology company that delivers it’s product over the web, product design and testing is a critical part of remaining useful and relevant. Useability testing was the smartest thing they did. Usability testing has to be done IN PERSON. It’s the only way to do this (Steve Krug, a well known author on UI design covers this in his book Rocket Surgey Made Easy ). They met with dozens and dozens customers to find out what what the product really should be. It’s not unexpected that the product will need to adapt to the reality of customer desires. However, that does not mean that the product needs to change to meet every customers every need. For example, some features desired would have turned their product into a full blown accounting system, and they had to point out to those customers that they signed up with inDinero because they wanted something simple, not a big full-blown accounting system, and they were not planning to move in that direction.

Several lessons were learned along the way. Customers do not care about elegant or prefect code. The product evolution was iterative. One simply can’t figure out everything customers wanted up front, and simply pumping the product up with tons of features is not a good road map to success.

Long term product release planning was also a hindrance. They found that planning product released 3-6 months out was far too long. Customers couldn’t really wait that long for the features they needed, so they shifted to a 2-3 week product plan cycle. In contract to that less though was the imperative to NOT release too early! She said that start-ups must resist the urge of investors to release a product too early. Instead they bowed to the pressure and initially released the product too early, squandering a lot of useful PR with and immature product.

One tool they used to gain access to customers that would provide useful feedback on the product was placement of a “Would you recommend” link. That link asked them if they would recommend the product, if they felt the product had promise, or they simply didn’t like the product. Jessica focused on those that thought the product had promise, but would not recommend it. She found they to have the most useful feedback. Those that indicated that they simply didn’t like the product were customers that they really didn’t need their product anyway.

Finally, there were a few other important observations and tips.

  • Don’t get yourself hung up on vanity metrics, like followers, hits, etc. Stick to the metrics that matter like adoption and revenue.
  • College didn’t teach them how to build real world useful products.

  • A business plans seldom survive first contact with customers.
  • Recommenced book: 4 Steps to Epiphany

  • When you start hating your customers, you are OUT OF BUSINESS.