Forgot your password?
typodupeerror

Comment: Re:Stay away from Objective-C (Score 1) 314

by GrahamCox (#48007799) Attached to: Ask Slashdot: Swift Or Objective-C As New iOS Developer's 1st Language?
You don't need to use "all the retain and release calls". In fact, by default, they are not enabled. They're only required in legacy code, or if you really prefer to work that way (and believe it or not some do - it's actually not really very hard if you take the trouble to understand it properly - most people who get into trouble with manual retain/release/autorelease often haven't spent the half hour reading the relevant documentation, or the even-better explanation found in 3rd party books, e.g. Hillegasse).

If you do get into trouble, and we've all done it, no denying that, there are plenty of "obvious" ways to see the problem - such as the Instruments 'Leaks' tool or NSZombie. If you haven't come across these you should be shamed of yourself as an iOS developer.

And so, having missed all the advantages of Obj-C due to misunderstanding memory management, wilful ignorance or straightforward incompetence, you're moving to C++. The irony is, you have no mechanism for tracking memory allocations over time there, and you have to do everything yourself - there is nothing in the C++ runtime to help you. Some programmers do prefer writing their own solutions to perennial problems, because they can't understand others' solutions to those same problems. It sounds a little like what you're saying here - your company's programmers don't really 'get' Obj-C's memory management rules, find them "a bear" and so are moving to C++ where they'll get no help on that score at all, but hey, at least they can reinvent their own wheel and so understand how it works, square corners and all.

Comment: Right now, Obj-C (Score 5, Informative) 314

by GrahamCox (#48006851) Attached to: Ask Slashdot: Swift Or Objective-C As New iOS Developer's 1st Language?
A lot of comments here saying how Obj-C is "ugly", and so forth. I wonder how many commenters are actually using it to any great extent, on a day-to-day basis, rather than have just looked at it out of curiosity for five minutes?

If you want to write an app now, Obj-C is the only sensible choice. Swift looks promising, but it's not ready. It's changing almost weekly and at the moment it's actually introducing bugs into the frameworks where none exist in Obj-C. If you want to live on the bleeding edge, go for Swift, but if you want to write an app, get it working and ship it out of the door, Obj-C is the only game in town today.

Once you get into Obj-C, it's a much more elegant language than it's usually given credit for anyway. Sure, it's old, but the runtime and compiler work put in in recent years makes up for many of its older roots. Manual memory management is not required, there is a dot syntax for properties and so on, so square brackets are not the only way to call getter/setter methods. As a pure superset of C99, it's easy for a C programmer to learn. It's also a small language. The real power lies in the frameworks, and that will take you far longer to learn than the language. Don't be put off by the superficial "ugliness" of Obj-C code, it isn't relevant. It's expressive and straightforward, and as a former C++ programmer, I also found it dramatically more productive when I first adopted it over a decade ago. It is possible to become fond of it, believe it or not. Whether the same eventually becomes true of Swift, only time will tell. Ignore the nay-sayers who have probably never actually used Obj-C in anger in their lives.

Comment: Missing the wood for the trees, BBC (Score 1) 363

by GrahamCox (#47860627) Attached to: BBC: ISPs Should Assume VPN Users Are Pirates
When the BBC opened 4 digital channels here in Oz on FoxTel, my assumption was that this is an intermediate move to establish the brand and also debug the distribution channels ahead of a time a few years away where everything is an "app" on whatever STB you choose, with a paid subscription model. Foxtel is only being used for now (I supposed) because that's where the technology is at and not everyone yet has an open-ish STB that can support arbitrary channel apps.

This latest shows that the BBC isn't doing this after all, which is a great shame, as it's surely the way TV is going to go (as long as governments have the balls to tell Murdoch to stuff his 80s distribution model up his arse). If there were a BBC "app" with a simple subscription model (in the manner of say, Apple TV) then the BBC would not give a shit who runs a VPN or how the content is accessed. They only have to ensure that the client has paid for the service. I'd go for that, it's a no brainer. Everyone wins - the BBC, the consumer, the box makers. Oh, Rupert doesn't, oh well, boo hoo hoo.

I just don't get it. The BBC is generally quite forward-looking and surely can see the way this is all going? If they truly can't, as this stupid comment seems to imply, then I really hope somebody gets their brain into gear over there soon.

Comment: Re:Broadcom don't deal with little guys (Score 3, Interesting) 165

by GrahamCox (#47797279) Attached to: Update: Raspberry Pi-Compatible Development Board Cancelled
I started out as a hardware designer, specialising in RF. I worked for a medium-sized company at first, but one that was quite important in the UK in its particular market, and I had no trouble getting free samples out of any supplier when I mentioned their name. Later, when I wanted to build stuff for myself without the clout of a larger company, I still found getting free samples was easy enough. The trick was, call them up and ask them to give you a quote to supply the chip with price breaks at 10, 100, 10,000 pieces. Then after they'd gone through that process, throw in a "by the way, any chance of a couple of free samples?" (I wouldn't bother with this charade for basic components, free samples were no problem, but for more expensive items they needed to think you were serious). This was in the 80s so cutting edge at that time meant chips such as the 68HC11 SoC - I even got a couple of free development boards out of Motorola for that one.

A company called CML used to produce codec chips for handling the digital modulation of a baseband signal using GPSK, etc. Getting samples out of them was sometimes tricky because these were highly specialised custom fabrications. But I still got a tube full of free samples out of them which I used in a university project - very much a one-off - using the same BS.

Comment: Re:Too much good content is deleted at Wikipedia. (Score 4, Insightful) 239

by GrahamCox (#47726729) Attached to: Latest Wikipedia Uproar Over 'Superprotection'
Exactly. Originally Wikipedia had a statement that "wikipedia isn't paper", so anything and everything was fair game for inclusion. That was one of its great attractions. I have no idea if that still stands, but if so it seems at odds with the whole notability thing. What they *should* do, if notability is an issue, is to have a little +/- thing on each article that rates the article for notability. Over time that will end up indicating the relative 'notabilty score' of the article, without having to have it actually deleted. Brainless fucks the lot of 'em, it's been years since I've contributed to WP, the attitude was just not worth battling over.

Programmers do it bit by bit.

Working...