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.
Ah the good old days Pascal and Modula 2 now completely eliminated from ICT courses as it is ‘too difficult’ I miss my procedures and sub-routines…. how the IT industry is going to cope now we have removed programming from courses is beyond me. We train users now, not developers – real shame. Raise a glass to Modula-2
I met two students recently. Best friends.
One said “I love computers. I want to learn how to make them work. I have looked up programming on the internet and tried it a little but I want to learn more”
The other said, “I love computers. I love FaceBook, Bebo and MSN. I like talking to my friends on them.”
Based on that exchange, not all is lost, David, it just means the programming priesthood will always have a job. No bad thing.
Syntax highlighting really spoils developers these days, giving different colours to keywords, constants, variables and so on. I was surprised that syntax highlighting in Xcode was so limited when I started using it.
‘Intellisense’ is even worse for that spoiling coders – you get developers who can’t work without it because they can’t remember method or property names (“I can’t remember its name, but it’s the first in the list if I hit ‘.n’…”)
Sometimes I think we’re breeding worse and worse developers, who don’t understand what they’re doing or why they’re doing it. Then I realise I’m just being a grumpy old man because we didn’t have things like that when I started.
As a noon I want spoiled a little. Intellisense and Google both spoil coders.
And frameworks these days are immense- we need hints. When I first did C I never needed anything more than stdio.h – due to extreme noobness.
Training users is fine. Developers need users. For the money thing.
I’m not against Intellisense and Google, I’m just against reliance on them.
When you’re comfortable with a language, you don’t need syntax highlighting really because a kind of syntax highlighting happens in your head when you’re reading it. You don’t need to think about syntax when you’re typing, either – your intent magically appears typed up as proper code.
You’re just not comfortable with Objective C yet. (Nor am I. I can read and understand it, and I can write it without referring to the help docs, but I haven’t got the level of comfort there that I have with other languages.)
When you have that level of comfort, Intellisense/autocompletion makes you /fast/. It’s great. Really, really great.
But it’s no substitute for actually knowing what’s going on.
I worry that things like VB are creating a generation of draggy-droppy people who’d be incapable of coding in vi/emacs/notepad because they just don’t know the language, they only know how to set properties in a designer. That, naturally, limits them to coding things that the designer allows.
That’s the situation I currently find myself in with iPhone development. Although Interface Builder is pretty slick, I don’t yet have a good understanding of what it’s doing. I haven’t figured out, for instance, how ‘IBOutlet’ is implemented. Is it a macro? A new keyword? As an old C programmer, that bothers me. Lines like:
IBOutlet NSPanel *container;
don’t work in C, so it hasn’t settled properly in my brain yet. When I figure out how it’s working behind the scenes, I’ll get a little more comfortable.
I think the point that I was trying to make (which I’ve successfully avoided doing so far, I think you’ll agree) is that it’s when you end up in situations like your tableView/taskList problem, getting through them as you’ve done is what makes you comfortable with the language. It’s always the obstacles that help.
Then, when you’re talking to some noob and explaining it to them and they say “How do you /know/ this stuff?” you can either:
* say “I’ve already made all the mistakes your going to make”, or
* smile and walk away.
I absolutely agree. I don’t have the ‘how does this work’ problem yet because I’m a noob but also because I think if I spent too much time Id’ end up coding everything in assembly and hating humans.
At what point is ‘too low’.
One of the debates yesterday when we were sitting in the OpenCoffeeMorning was why Apple hasn’t produced a sufficiently high level language for software development. That seems counter to this and I think that ObjC and Cocoa are a medium level of development. Trivial UI stuff is easy and should be easy. Leaving you time to work on the logic of your app.
I don’t think I was part of that conversation, but I can see what whoever it was was getting at.
Memory management is still a big problem for developers. Objective C has some really nice stuff for this (I still remember malloc() in C), but the automatic garbage collection in .NET and Java is an order of magnitude ahead. And you’re right – stuff like that does free you to work on your app instead of ‘plumbing’. And that’s a great thing.
(The pain from an automated garbage collector is that memory problems are also an order of magnitude harder.)
So someone coming from that background would have a hard time looking at Objective C (or worse – C or C++) because they’d be thinking “I have to do /what/?” Even though what they have to do is fairly minimal I can see a lot of folks turning their noses up at it. Instead, they should be (rightly!) impressed with the quality of software that has been written using it.
I think Stuart was right on the money there – the memory management in C# or Java is going to be better.
I find the ‘retain count’ method of memory management to be relatively understandable compared to the memory allocation in straight C. And it is somewhat cruel that GC is available on the Mac but not the iPhone.
I’m ambivalent about where to go. On one hand I want something I can learn, something that aids my understanding. At the same time I do want it to have a bit of crunch so I’m not just juggling checkboxes.
I think the only answer – in as much as there’s any answer at all – is to try to be as language agnostic as you are platform agnostic. There just is no ‘language to rule them all’ (yet?)
You’ll always end up facing a situation analogous to the “Why does Windows-C not Copy the way Apple-C does?”, no matter what languages you know.
I think you’ll always do better if you enjoy what the language enables you to do, rather than if it’s something you’re forcing. If Macs are your thing (and I know they are), what would any other language/platform allow you to do that would be as much fun for you?
Well, I agree. I have passion however for one platform (or two really) which use a very specific language and framework. I figure as long as the ‘content’ side of things is platform agnostic, then if something needs ported, it should be trivial to find some smart bugger to do it.
Yep. It was a minor worry I had too when I thought I had a neat iPhone idea – it would need to be completely rewritten for Android. I couldn’t share source code between the two platforms. (Someone’ll come up with a solution to this soon, but there’s none I could use at the minute. Unity3D looks interesting though…)
As it happens, I’m not allowed to implement that app, and my other idea would never make it on to the AppStore. Google say they won’t have any restrictions though, so it might make it to Android.
Well, Android is “Java” so finding someone with a bit of experience shouldn’t be hard. 🙂 There’s a lot more work involved of course with the need to provide the same experience and there’s a lot of stuff you get ‘free’ on one platform and not on others.
Google will have restrictions. You just need to read between the lines. End of the day it’s an advertising platform 🙂