Tag Archives: macosx

How to setup a pretty good dev environment on the mac

(This was a quick write up for a coworker, but others might find it useful)

This assumes you have XCode. I mean, really now.

First thing to do is install mac homebrew. It’s a package manager of useful open source software. You install it by pasting into the terminal:

/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

then just to make sure it’s working, run:

brew install -v git

Next we want to install the node package manager.

It’s a simple

curl http://npmjs.org/install.sh | sh

Lastly, I like to setup rvm, for managing multiple ruby installations and keeping my base machine clean of stray gems.

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

RVM is a little more complicated since you also have to add a little something to your shell file so that the paths are loaded correctly

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

That's *about* it. I'm still looking into how to setup the RVM equivalent for python, but it seems that community is still figuring out their tools and a clear solution hasn't emerged yet.

goodbye Carbon and good riddence

From the documentation for GetProcessInformation()

You need to specify values for the processInfoLength, processName, and processAppSpec fields of the process information structure. Specify the length of the process information structure in the processInfoLength field. If you do not want information returned in the processName and processAppSpec fields, specify NULL for these fields. Otherwise, allocate at least 32 bytes of storage for the string pointed to by the processName field and, in the processAppSpec field, specify a pointer to an FSSpec structure.

no joke

Rollover Carbon, rock on OOP.

Red Sweater Blog – It Should Be Free

Red Sweater Blog – It Should Be Free

I don’t care if someone charges for an app or not. But one thing that has always puzzled me is why there are so many free (as in beer) applications for the mac that aren’t also open source. If you’re giving your application away for free, why not show the source too?

My only guess is that the default-to-open-source attitude isn’t as in-grained in the mac world as is it elsewhere.

whoa guys

In Vacuous Virtuoso’s CTGradient code bloat article, he showed how easy it was to trim a 1300 line 3rd party piece of code down to 30 lines by trimming the unneeded code.

Super. We should all look at what code we use and whether it is inefficient or not.

The problem is he didn’t include any numbers beyond the LOCs. It would have been nice to have had some before and after numbers on execution speed, binary size, and memory usage.

No big deal though. It’s still a decent article.

It’s turned into a bit of a flame war though, or as close to a flame war as the usually polite Mac developer community gets.

I started it with what I like to think of was an innocuous comment.

It went back and forth a little bit with Daniel Jalkut joining in too.

Then this guy, Rick, joined in and immediately went personal.

Rick also posted a fun little timecube style rant on his blog where he referred to developers as the Landed Gentry of Mac Development and as snakes. He also put the word “people” in scare quotes.

It’s also amazing how far these ‘people’ will go to defend what essentially is a defenceless position.

Not quite sure what he thinks we are instead.

Sean was totally unnecessary with his

Do us a favor, think of this as being a thanksgiving dinner. The adults are busy discussing things at the dinner table. Take your slice of turkey, and go back to the childr- Oops, I mean, “indy” developer table.

style comments.

I just think that the personal attacks are pretty lame in a discussion by a bunch of developers about the relative merits of a code cleanup.

thinking outside the box

Gruber isn’t very good at imagining other people’s computing needs.

No important software for the Mac depends on Java.

I think he meant “I don’t have any important software that depends on Java”. There. Fixed that for you.

What I like about the most about his subsequent backpedaling is that it avoids the original issue people were complaining about.

  1. Gruber says Java isn’t supported in the new MacOS X 10.5 and no one cares except Java developers.
  2. People who do care write him and complain.
  3. Instead of saying, “oh, hey, some people clearly have different computing needs than me,” Gruber gives them a condescending lecture on prioritizing development issues, which wasn’t the point at all and as if developers don’t already know about needing to delay low priority tasks.

Somewhere in there he also found the time to talk about a new feature to AppleScript, a language that no one cares about, except AppleScript developers.

PS. I’m not a Java developer.  I don’t even care for Java.

AppleEvents: Apple’s worst documented API?

If you are trying to register a callback on getting a URL passed to your program through AppleEvents, don’t use the documented kAEInternetSuite and kAEISGetURL enums. They are defined as ‘gurl’, but the actual value passed to your program is ‘GURL’. From what I can tell, everyone defines their own enums because this is well known.

Apple can’t fix it though, because it would break everyone’s software. So they keep documenting it as ‘gurl’, and we keep redefining it to the actual value.


re: re: leopard delay

This is old news, in blog time, but Gruber’s response to Jalkut’s comment on the Leopard delay misses a couple points.

Gruber says:

That’s right in the middle of the most productive stretch in Mac OS X history – 10.0.0 was released in March 2001, 10.1.0 was released in September, and 10.2.0 was released less than a year after that in August 2002.

It only looks productive if you’re going by the numbering scheme. The features introduced in the increments from 10.0->10.1->10.2 were nowhere near as large as what was introduced in 10.3 and 10.4.

10.0 was unusable. That’s why 10.1 was given away for free six months after 10.0 was released. 10.2 came soon after because 10.1 still wasn’t very good.

If the release version numbers weren’t determined by marketing, 10.1 should have been 10.0.1 and 10.2 should have been 10.1.

As far as I can tell, 10.4 was the first release of OS X where it felt slower.