Better HN
topnewbestaskshowjobs
Log inSign up

thingsdoer

92 karma · joined Oct 10, 2013 (13y ago) · 17 submissions

Submissions

1.

Devops / server owners, what did you name your server(s) and why?

5 points · by thingsdoer · 10y ago · 1 comment

comment 13y ago · link · parent

Neat! Where did you get the data?

3.

Ask HN: What is the must have iOS book for the modern developer.

7 points · by thingsdoer · 13y ago · 3 comments

4.

Show HN: miyagi, a novel obj-c JSON marshaller(github.com ↗)

4 points · by thingsdoer · 13y ago · 1 comment

comment 13y ago · link · parent

That's an extreme edge case though, since if you're using a mutating method, you're using a mutating string, and you're probably aware of that.

comment 13y ago · link · parent

>> hn.txt

comment 13y ago · link · parent

The issue with the default syntax in NSString is that the mutating methods are the more concise, but are also the ones you use the least. It makes far more sense for the more used methods to be more concise than their mutating siblings.

I don't disagree with you though. I'd prefer if the interface for this was more idiomatic.

Returning void is sort of pointless. A boolean, maybe. I feel like returning self is just making better use of things, really, and probably doesn't really cause any confusion.

8.

Show HN: miyagi, an obj-c JSON marshaller that doesn't suck to use.(github.com ↗)

3 points · by thingsdoer · 13y ago · discuss

comment 13y ago · link · parent

-(NSString*)capitalizeInPlace; is the actual signature.

The reasoning for this is for consistency, while still maintaining autocomplete proximity.

comment 13y ago · link · parent

I'm not super comfortable with breaking message syntax like that. Also, very wary of using a #define with a short oft used keyword in a library that will be imported in majority of headers.

comment 13y ago · link · parent

The problem people have with the format implementation is that no matter what you do, it's either obtuse shorthand, or incredibly verbose.

The reality is, that NSString needs native formatting sugar. Anything else would really just be a hack. I'm not particularly even happy with the [@"Hello ":@"World] syntax, either.

comment 13y ago · link · parent

There are already a lot of Ruby categories out there. ObjectiveSugar covers a lot of bases. I personally wouldn't import more Ruby categories. The NSString API is a weak point of Cocoa, IMO, but in general I wouldn't like to see a large amount of unique, dependent, astonishing code.

comment 13y ago · link · parent

Unfortunately, something like "fmt()" isn't really elegant enough, or "objective-c" enough.

comment 13y ago · link · parent

Actually, I might add some protection around this specific case.

comment 13y ago · link · parent

Still don't have a clever implementation.

comment 13y ago · link · parent

I'd correct the category. Also, NSString is not going to change. If it does, it will be rewritten extensively, most probably obsoleting this category.

17.

Show HN: NSString + Ruby(github.com ↗)

87 points · by thingsdoer · 13y ago · 52 comments