March 2013
1 post
February 2013
1 post
I had the honour of moderating a panel on eBook DRM technology for the W3C earlier this week, and I’ve taken the liberty of expanding upon my presentation and providing some more talking points.
The main thrust of the argument: there are good and useful end-user features that we can build using the same technology normally used for restrictions. As long as we’re using this tech, let’s do the good things too.
Click through the link for the full post on my new blog.
January 2013
3 posts
December 2012
5 posts
Turns out, developing iOS apps is different from developing web apps. Like, hella different. For any server-side readers out there, I thought I’d hit you with a few big ones: There is no CSS. Every part of a design has to be coded in Objective-C.
- There is no flow layout (like HTML). Everything is
position: absolute;.- Small “cosmetic changes” can mean hours or days for developers to complete.
- No one unit tests in Cocoa. Like, no one.
- Likewise, unit testing is a bitch.
- No one does automated UI testing. There are some open source projects, but it’s far from the mainstream.
Truth from Mr. Furrow there. As someone who went the other way, I can absolutely say that folks using some of these new server-side frameworks have a ridiculously easy time of it.
Things are starting to change on our side, of course: starting back in the late 80’s with Interface Builder and the Application Kit, and more recently with Cocoa Autolayout. There’s still a world of difference between tweaking a CSS file to change a button’s composition and doing that in Cocoa however.
People of both sexes and all ages play video games and watch movies in every country in the world.
Only in America do we have an epidemic of gun violence and repeated mass murder.
The problem isn’t video games and movies, guys.
We love Rails, object-oriented programming, and refactoring. We use a process to develop applications to work faster, introduce fewer bugs, and enjoy what we’re doing. We blog, Tweet, and talk at conferences on these subjects.
After every post and discussion, there are topics left…
Hot. Shit.
Go get it.
November 2012
2 posts
Summary: Just released RAProjectTools, a collection of Ruby and Bash scripts that make your life easier.
sync-resources/sync-resources.rbThe script in
sync-resources.rblooks at your Xcode project, and finds a group named Resources. If it finds one, and the group itself is associated with a directory in your project — for example,Project/Resources— it will attempt to reconcile the contents of the directory with the contents of the group. Files added to the directory will be added to the Xcode group, and files no longer found will have their references removed.It works well against projects with one single target. It’s possible to extend the script so it is more robust. The script uses the Xcodeproj gem from CocoaPods, and the appropriate Bundler magic is already set up for you.
Invoke
sync-resourcesfrom the root-level directory containing your project.next-versionThe script in
next-versionbumps the version number by one. It works with Git Flow, the awesome branching model for software development, and AGVTool, Apple’s solution for software versioning.It works pretty well if you are already using these tools. Remember to start this script from the
developbranch, and it’ll make a new Git Flow release with the next version number.Invoke
next-versionfrom the root-level directory containing your project.
That’s a fairly sizeable amount of awesome right there.
Summary: Just released RATilingBackgroundView which implements a very simple
UIViewsubclass that takes several background tiles, generates more if necessary, and scrolls them with the containingUIScrollView.You’ll find
RATilingBackgroundViewin this project. It needs a delegate to work. Do these things to start using it:
Drop the project into your app as a static library dependency.
Implement
<RATilingBackgroundViewDelegate>:- (CGSize) sizeForTilesInTilingBackgroundView:(RATilingBackgroundView *)tilingBackgroundView; - (UIView *) newTileForTilingBackgroundView:(RATilingBackgroundView *)tilingBackgroundView;It’ll ask about the default size for tiles, and will also ask for new tiles whenever the bounds of its containing view has changed and it has no dequeued tiles to cover the area.
Optionally, set the stretching flags so you can use stretchable images for tiles.
@property (nonatomic, readwrite, assign) BOOL horizontalStretchingEnabled; // YES @property (nonatomic, readwrite, assign) BOOL verticalStretchingEnabled; // NOIf you don’t set any stretching flags, the tiles will be stretched horizontally to the same width of the containing view by default.
For example, if you have a square or rectangular image you’d like to repeat, set both flags to
NO.
Very useful as a counterpart to AQGridView.
October 2012
1 post
Summary: Just released RAReactionKit, which lets you do blocks-based KVO and key-path binding between objects, and handles premature deallocation cases gracefully without swizzling
-dealloc. It is spliced from IRFoundations, which has grown too large to be instantly useful in any case.There are three major parts of the Reaction Kit: Bindings, Observings, and Deallocation Monitors. The entire project is built upon ARC and mandates support for weak references. It does not swizzle your
Bindings-deallocmethods, and work nicely withNSManagedObjectinstances.In
NSObject+RABindings.hyou’ll find these methods added toNSObject:- (void) ra_bind:(NSString *)aKeyPath toObject:(id)anObservedObject keyPath:(NSString *)remoteKeyPath options:(NSDictionary *)options; - (void) ra_unbind:(NSString *)aKeyPath;For now, the binding is strictly one-way. Two-way bindings are very interesting to have, though. :)
You use the binding mechanism like this:
[cell ra_bind:@"someView.elements" toObject:modelObject keyPath:@"someOtherElements" options:@{ RABindingsMainQueueGravityOption: @YES }];There are currently two options keys:
Observings
RABindingsMainQueueGravityOption: If it is set to
@YES,RABindingswill take care to asynchronously set the value on the receiver from the main queue. If you have an non-atomic object that gets hit from all the places (mediated with a serial dispatch queue), this can be handy.RABindingsValueTransformerOption: You can pass a
RABindingsValueTransformerblock:typedef id (^RABindingsValueTransformer) (id inOldValue, id inNewValue, NSString *changeKind);This allows you to do some very cheap value transforming, for example between
NSDateandNSString.In
NSObject+RAObservings.hyou’ll find a bunch of methods added toNSObject:- (id) ra_observe:(NSString *)keyPath options:(NSKeyValueObservingOptions)options context:(void *)context withBlock:(RAObservingsCallback)block; - (void) ra_removeObservingsHelper:(id)aHelper; - (void) ra_removeObserverBlocksForKeyPath:(NSString *)keyPath; - (void) ra_removeObserverBlocksForKeyPath:(NSString *)keyPath context:(void *)context; - (NSMutableArray *) ra_observingsHelperBlocksForKeyPath:(NSString *)aKeyPath; - (void) ra_observeObject:(id)target keyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options context:(void *)context withBlock:(RAObservingsCallback)block;The main reason for exposure are two-fold:
- The code was written by a more naïve version of myself
- Observings are assumed to be frequently made and broken.
You use the Observing mechanism by invoking
Deallocation Monitorsra_observe:options:context:withBlock:. It spins up a temporary, private KVO listener which forwards incoming communication from the Key-Value Binding mechanism to your handler block.The Deallocation Monitor is provided in
NSObject+RALifetimeHelper.h:- (void) ra_performOnDeallocation:(void(^)(void))aBlock;If you pass a block to
-ra_performOnDeallocation:, the block will be called when the object is deallocated.Please note that for static NSString instances (the
@""string literals you specified in code), or special cases like@YESand@NO, they will never be deallocated.If you have zombies on, nothing will be deallocated — as well.
Looks very interesting indeed.
September 2012
2 posts
Via Marco— squashed : Mitt Romney thinks you need to take responsibility for your life:
Generally, there’s nothing wrong with asking people to take responsibility for their actions to avoid social ills. Stop littering. Spay or neuter your pets. Vaccinate your children. Get up early enough to eat breakfast so you’re not so grouchy at work. If your diet is making you sick, change it….
Apparently anyone earning less than 3x the minimum wage is an underachiever, and thus not worthy of the Republican candidate’s attention…
Some of the briefs again reminded Mr. Bush that the attack timing was flexible, and that, despite any perceived delay, the planned assault was on track.
Yet, the White House failed to take significant action. Officials at the Counterterrorism Center of the C.I.A. grew apoplectic. On July 9, at a meeting of the counterterrorism group, one official suggested that the staff put in for a transfer so that somebody else would be responsible when the attack took place, two people who were there told me in interviews. The suggestion was batted down, they said, because there would be no time to train anyone else.
That same day in Chechnya, according to intelligence I reviewed, Ibn Al-Khattab, an extremist who was known for his brutality and his links to Al Qaeda, told his followers that there would soon be very big news. Within 48 hours, an intelligence official told me, that information was conveyed to the White House, providing more data supporting the C.I.A.’s warnings. Still, the alarm bells didn’t sound.
” —Kurt Eichenwald (via soupsoup)August 2012
4 posts
I’ve been playing Catan for years and it was nice to see it featured on Tabletop. Being the father of a rapidly evolving, small humanoid, I of course want to start impressing upon him my love of board games.
This past week, at GenCon, I got the opportunity to try out Catan…
My daughter is four right now… I therefore need this game. Like, *medically need* it.
You see, what I said was, “If it’s a legitimate rape, the female body has ways to try to shut that whole thing down.” But what I meant to say was, “I am a worthless, moronic sack of shit and an utterly irredeemable human being who needs to shut up and go away forever.”
It is clear to me now that I did not choose my words with care and did not get across the point I was trying to convey. In hindsight, I guess instead of using the words “legitimate rape,” I should have used the words “I am an unforgivable, unrepentant, and unconscionable subhuman dickhead.” Or better yet, “I am an evil, fucked-up man who should never have been elected to the United States Congress, and anyone who would vote for me is probably a pretty big fucking dumbshit, too.” See how much more sense that makes? It’s amazing how a few key word changes can totally alter the meaning of a statement.
Because, of course, it’s all about context. And yes, when you take what I said out of context, I can see how it might sound like I’m denying that women can be impregnated via rape. This is, I assure you, not what I was trying to express at all. Such is the age we live in that one little sentence excerpted in a news report can come back to haunt a person in a pretty big hurry. But if you actually go back and look at the remarks closely, you’ll see that what I was actually trying to convey in my statement was that
(1) I am a big fucking idiot,
(2) I am a nauseating slug of a human being who doesn’t deserve to live, and
(3) I am essentially everything that’s wrong with this country and with humanity in general.
Honestly, that’s all I was trying to get across there. It was a simple misunderstanding, really.
” —I Misspoke—What I Meant To Say Is ‘I Am Dumb As Dog Shit And I Am A Terrible Human Being’ (via wilwheaton)
Gor’ bless the Onion, sir.
This is great. A guy shares five reasons he wants his children to play D&D.
Reblogging in the hope that my wife will see it & be convinced… ;o)
July 2012
7 posts
Marco gets in a quick jab.
Given the topic is a new Big Cat release, I guess the most suitable commentary on it would be: “mrrowwwwr!” 😏
IRAQPhotoPickerControlleris essentially a photo picker that does multiple selection withAQGridViewdriving its photo grid. It’s reasonably fast and the header is tiny.The controller has exactly one public method, which is also its initializer. What it’s doing isn’t exactly new. However it is designed to be friendly with Interface Builder based photo cell customisation.
Here’s a sample app which is still being worked on. Push the Add button, and pick something.
Astonishingly proud & happy to see this 😊
The Macalope Weekly: Climb every mole hill | Macworld
There’s a part of me that thinks that would make an awesome movie though…
Limbaugh: New Batman Film Is an Anti-Romney Conspiracy (via wilwheaton)
Reblogged because this is even crazier than the inside of my head…
June 2012
1 post
Kobo, Tumblr, and Readmill Discuss Social Reading at BEA - The Digital Reader
Holy crap— I had literally no idea. Probably because I’ve yet to buy any of the Hunger Games books, aside from previews.
The next step I’d like to see? Making this data available beyond the Kobo apps themselves somehow.
April 2012
4 posts
The study also reveals that as eReaders grow in popularity, the brand landscape is showing a runaway brand winner: the Kobo. Twelve months earlier, the Sony eReader, the Kobo, and Amazon’s Kindle were virtually tied for market penetration at 28%, 27% and 25% respectively. The January 2012 wave of the Mobil-ology Study shows the Kobo far out in front with 46% penetration and the Kindle slipping one point to 24%.
Le w00t.
Dear DoJ: You Need To Sue Apple Again | Mike Cane’s xBlog
That’s a damned good point…
One million British travellers planning to fly to Canada, the Caribbean and Mexico this year face the risk of being turned away at the airport – at the insistence of the US Department of Homeland Security.
Er, so after I visit my parents in the UK, the United States of America gets to decide if I can return to my home, job, and all worldly possessions in Canada, simply because I’m based in Toronto rather than Vancouver…?
Why the fuck is this being accepted? I mean, airlines are already complying with this. Where’s the outcry? As the linked article points out:
Neil Taylor, a tour operator who pioneered tourism to Cuba, said: “Imagine if the Chinese were to ask for such data on all passengers to Taiwan, and similarly if the Saudis were to ask about flights to Israel – would the US government understand?
“One also has to wonder how an American traveller in Europe would react if he were denied boarding on a flight from London to Rome because the German government had not received sufficient data from him.”
It’s literally that simple: if anyone else were to try and pull this sort of stunt, the retaliation would be swift and uncompromising. But it’s the US asking, and they’ve got enough political clout (read: ability to spread propaganda) around the western world that this is tolerated. If the US does it, it’s for safety; if anyone else does it, it’s oppression, and that country goes straight onto the ‘Axis of Evil’ list.
Having written this, the chances of my being able to return to Canada this September have probably been reduced by at least a couple of percentage points 😏
March 2012
5 posts
Having finished Mass Effect 3 via my ME2 save last night, I’m now trying it while starting afresh. The thing that’s surprised me so far is the list of people on the memorial wall in the Normandy: it’s not only much longer, but it includes some folks who had significant, even major roles in the play-through I just finished, such as:
- Jack Zero
- Donnelly & Daniels
- Thane Krios
- Urdnot Wrex (?!!)
I have a feeling this will be a very different experience this time around…
Apple’s lawyers:
[I]f Amazon was a “threat” that needed to be squelched by means of an illegal conspiracy, why would Apple offer Amazon’s Kindle app on the iPad? Why would Apple conclude that conspiring to force Amazon to no longer lose money on eBooks would cripple Amazon’s competitive fortunes? And why would Apple perceive the need for an illegal solution to the “Kindle threat” when it had an obvious and lawful one which it implemented – namely, introducing a multipurpose device (the iPad) whose marketing and sales success was not centered on eBook sales?
This sounds quite fair— until you consider the restrictions placed upon competing eReader apps on this multipurpose device:
- No sales except through Apple IAP @ ~110% of revenue.
- No sign-up for accounts.
- No links to store websites via Safari.
- No links to company website (even for displaying corporate privacy policy, etc.).
- No static text giving the address of company/store website.
- No static text saying ‘our website’ or similar.
- No introduction or mention of non-free content availability.
- No use of the words ‘trial’ or ‘preview’ to refer to content.
- No means to acquire new content aside from 100% free content within the application.
- No text suggesting that non-free content is available for purchase (even without discussion of where one might do so).
For the record, all of the above were cause for the Kobo app to be pulled from the store if we did not submit a hotfix immediately. I find it hard to believe that they wouldn’t be doing the same to Amazon.
- Husband: Do you need any help with that?
- Wife: No, I'm fine.
- Husband: Anything else you'd like done?
- Wife: No, thanks.
- Husband: Okay, no problem. [Starts doing something of his own]
- Wife: [Immediately] Can you go and do $TASK, it's really urgent.
- Husband: …
Interesting thing. I’m told that, in the all-time top 25 free iPad apps in Canada, Kobo made the top 10 and iBooks didn’t even place. And yet if you look at the current top 10 apps in the Books section of the store, you’ll see that iBooks is ahead of Kobo, just beating is to the number one spot. And that’s pretty much how it’s been ever since iBooks launched (along with the iPad), with the exception of a week or two.
So, depending on the source, Kobo is either constantly trailing behind iBooks or totally eclipsing it. Which is it then? I didn’t pay a lot of attention in statistics class (or “lies, damned lies, and statistics” class), but I’m fairly sure it can’t be both…
February 2012
9 posts
A great article on a disturbing subject. And today, one of my favourite authors, China Miéville, posts a perfect rebuttal to such thinking:
It is depressing to have to point out, yet again, that there is a distinction between having the legal right to say something & having the moral right not to be held accountable for what you say. Being asked to apologise for saying something unconscionable is not the same as being stripped of the legal right to say it. It’s really not very fucking complicated. Cry Free Speech in such contexts, you are demanding the right to speak any bilge you wish without apology or fear of comeback.
A few weeks ago I had the great honor of being interviewed for Objective-See about my development setup and processes. That interview was posted today— go check it out!
A nice little tutorial here on the use of AQGridView on iOS 5.0.
So here’s the Big News to which I’d earlier alluded. The IDPF has got together a who’s-who of people and companies in the eBook world to work on an open-source implementation of a reference ePub3 reading system and container library. And of course Kobo is putting a ton of weight behind it. Also, me: I’m going to be working on this project full-time here very shortly.
Looking through the project’s goals, you’ll see a good amount of overlap with the goals I’d previously stated for the ePub Author project. The core aims are all there:
- A browser of ‘ePub3-flavoured HTML’ content.
- A library encapsulating the correct parsing and generation of all forms of structured content described in the ePub3 standard.
- Best-in-class support for non-Roman scripts, particularly vertically-flowing ones.
- No limits on its use as the core of a larger project, even commercial ones.
- Lots of industry know-how being funnelled into a single output.
So yeah: I’m rather excited about this one. Expect to hear more from me as it all progresses.
Now I’ll just go back to writing ePub3 structured content handling code…
So the astute Mr. Gemmell earlier today made note of a rather elitist-sounding article over at paidContent:UK. The author of that piece rather laments the fact that eBook consumption is led by ‘genre fiction’. You know— everything that most people read; something — *shudder* — classifiable. Science fiction. Romance. Crime. Horror. Fantasy. Historical.
…
So, is it just me, or does that sound an awful lot like regular books? What else could we call them……… Ah yes— stories.
This all smacks of the same sort of book-snobbery we see in some literary awards’ shortlists, or in programmes about books on the BBC. This has prompted a number of authors to call out the organizers and producers of such fare for their low view of so-called ‘genre fiction’. In March 2011, author Stephen Hunt wrote on his blog:
In my world there is only one genre permitted access to the oxygen of publicity in the mainstream media, and that genre is contemporary fiction. It is also called literary fiction by its supporters, just to underscore the point that anything that isn’t written in their genre can never be classed as literature or improving or worthy.
The end result of all this snobbery, he points out, is the loss of the joy of reading in the youth of today. In amidst the many other ways of finding entertainment, the elevation of ‘contemporary fiction’ as the only thing worth reading has turned off many of our youth from reading altogether:
And that conflict, dear reader, between what we read and what is actually covered by the media has sadly begot a much greater one. People, especially younger readers, have given up on fiction on dead trees. They were happy to play the ‘literary fiction’ game in a gentler age, when it was the only game in town. Hell, some crazy old dudes even read short fiction in the pulps back in the day. But it’s a more packed playlist now: MMOGs, IM, BitTorrents, RSS feeds, happy slapping, texting, DS, Xbox, Twitter, FaceBook, iPods, iPads, YouTube, blogging, Tumblr, Angry Birds – you know the drill, right?
I suppose I was lucky in high school that my English teacher didn’t hold to such things— we were specifically encouraged to read fantasy and science fiction; I remember reading Howard Fast’s The First Men there, and many people’s marks took a good boost when writing up that one (we were tasked with writing a newspaper editorial about the experiment in the story).
When reading the article which provoked today’s discussion, I initially thought that perhaps the inflammatory title (downmarket genre fiction) was an addition by the editor, and that perhaps the writer herself had a more nuanced view. However, down towards the bottom were a couple of gems which rather cut short that hope:
The reading public in private is lazy and smutty. E-readers hide the material. Erotica sells well.
Romance and suchlike sells well primarily to a certain demographic, which happens to also be the prime eBook-purchasing demographic (by a long margin) right now: women aged 35-60.
I’m not so sure it is wise to underestimate the boundless idiocy of the unobserved reading public. They may intend to go to the Economist website to read the latest in the euro crisis, but oops! they’ve ended up on Mail Online reading about the Kardashians.
…ok. That’s one way of putting it. Another might be: we read for entertainment, not self-betterment. Most people spend long days working, then most of their evenings working in another fashion: food, cleaning, caring for family. If we choose to spend our leisure time reading, we are more likely to read something entertaining than improving; simple fatigue will dictate that as the norm, if nothing else. Don’t think that it’s all slush, though. Of everything I’ve read in my life, no book has made me reach for the (conveniently built-in) dictionary than Gregory Macguire’s Wicked series. Damn that guy has some vocabulary. And how many other ‘genre fiction’ books — and genre fiction in a fantasy setting, based upon a line of children’s books, no less — would come with study notes included?
The establishment might choose to look down its nose at writing for the sake of story, but its nature does not make it automatically sub-standard.
So there are Great Things afoot for ePub implementors. I have things being planned out nicely, and I should be able to make an official announcement & call for contributors in about a week, I think. Specifically anything about the frame layout model of WebKit/WebCore would be very useful to have in about a week’s time.
I have a meeting tomorrow with a big-name company about helping to set up this ePub Author thing, following which I should be in a position to start getting a community process together and bringing people into the fold.
…so there’s that.
January 2012
6 posts
In the few days since I suggested it there has been a lot of interest in pursuing the initiative. I’ve had contacts from a few companies looking to invest money, expertise, or people, and I’ve heard from a great many people who would love to see just such an application in the wild.
So a few minutes ago I wrote:
I think there’s enough know-how in the industry outside of Apple to make a competitor to iBooks Author, by which desktop publishing in the eBook age can be as limitless in possibility as we can make it, yet not be restricted to a single target platform. I want to hear from experienced OS X software engineers who are interested in tackling such a project on a commercial (or possibly open-source, or both) scale, and from people companies who can contribute expertise or code to the effort.
I’m already getting a few good ping backs on this, which is fantastic. However, I’d like to enumerate a little more of what I have on my mind:
EngineersWe need engineers who can crank out top-notch OS X code. While I’d normally want to include anyone who’d like to cut their teeth on such an app, this time I think getting something of the highest quality out of the gate takes priority.
Software Development CompaniesApple has a head-start on us. Even if we started coding at the same time they did, they would still have a head-start. This is because iBooks Author is built on the same components used in the iWorks suite of apps, and those components go back to the mid-90s I believe (they were based upon apps originally written for NeXTStep). In order to avoid the ramp-up time in recreating those components, we would be interested in anyone who could either donate or license similar components to us. I’m visualizing the Omni Group’s apps here, for example.
Publishers, Retailers, Distributors, Oh My!Anyone with an interest in eBooks and a budget to throw around. Particularly those who need to produce, validate, or tweak ePub3 content. How would you like to assist in funding such an effort? What would you like to see? What sort of terms would you like/accept— i.e. open-source free app only, n number of free copies, volume discounts, etc.
For the record: I’ve made overtures to my employer about the above. Although the guy who would likely be able to make anything happen is away in the UK next week, so don’t expect any announcements.
As before:
Contact me via the links above.
![]()
OS X Programmers/Companies: Read This
So, yesterday Apple launched the new iBooks Author application for the Mac. It looks great, produces fantastic dynamic content, and more than one person assumed that it was outputting ePub3 files. However, that was not the case, as is extensively documented by Daniel Glazman (co-chairman of the WC3 CSS working group) on his blog:
A wysiwyg EPUB3 editor will not be able to edit correctly an IBA document because of the different mimetype and the proprietary CSS extensions. iBooks Author is not able to reopen a iBook it exported in their pseudo-EPUB3 format because there is no Import mechanism! That means that on one hand EPUB3 readers cannot reuse a document created by iBooks Author because of its HTML/CSS/Namespaces extensions, and on the other iBooks Author cannot create an iBook from an existing EPUB3 document because it cannot import it.
In actuality, it even goes a little further than this.
nikf:
Consider me signed up.
…and what’s more, there’s courses on Cryptography, Natural Language Processing, and Machine Learning. I’ve just signed up the to NLP and Machine Learning, as they’re astonishingly useful in a project I’m working on right now. Not sure if I’ll be doing the coursework or just the read-along version, but dammit I want that stuff in my head right now.
