About a hundred years ago in 1995 I was being taught Modula-2. And I loathed it.
One thing I took home from it was to somewhat intelligently name your variables.
This is why the Hillegass Cocoa bible is causing some upset for me. They use terms like ‘tableView’ and I’m never sure if these are reserved keywords or if they’re variables. This means you’re groping around in the dark a lot of the time in the hope that you can figure things out. i.e.
-(NSInteger)numberOfRowsInTableView:(NSTableView *)taskList
{
return [taskStore count];
}-(id)tableView:(NSTableView *)taskList \
objectValueForTableColumn:(NSTableColumn *)tableColumn \
row:(NSInteger)row
{
return [taskStore objectAtIndex:row];
}
took me an hour to figure out that where I have ‘taskList’ the book used ‘tableView’ which makes it just harder to understand. The code above still uses one ‘tableView’ but it works. If I replace that with something else, it breaks.
Yes, I am stupid. And a n00b. Sue me.