Unit Testing Cocoa with MacRuby

Posted by: on Sep 29, 2011 in Blog | Tags: , , , , , , | No Comments

I spend most of my development time split between Rails and iOS. Each offers a rich API that makes building projects much more productive and enjoyable. There is one place, however, that Ruby clobbers Objective-C: testing.

Read More

Slides from Cocoa Networking Talk

Posted by: on Aug 15, 2011 in Blog | Tags: , , | No Comments

I have posted the slides from my talk on networking with Cocoa at CocoaConf. For those that attended: thank you! It was great meeting so many new people and having the opportunity to present.

One common suggestion for improvement from attendees was for demos. These are always tricky with networking topics, because you never know how good the Wi-Fi will be at a conference. When I give this talk in the future, I think I will split it into two, build some demos, and bring a second laptop with a cross-over cable.

Your Own Private WWDC 2011

Posted by: on Jul 1, 2011 in Blog | Tags: , , , , | No Comments

Now that Apple has released the complete set of WWDC 2011 videos to registered developers, those of us who couldn’t make it to the conference have the opportunity to hear about all the new, shiny stuff coming in Mac OS X 10.7 and iOS 5.

Read More

CocoaConf

Posted by: on Jun 3, 2011 in Blog, News | Tags: , , | No Comments

CocoaConf is a new developer-focused conference for Mac OS X and iOS being held August 12-13 in Columbus, OH. I am presenting a session on networking with Cocoa. It will cover the various APIs available to Mac OS X and iOS developers from Apple and third-parties, as well as touch on issues unique to using the network on a mobile platform.

Early registration opened today and you can get a conference pass for 50% off.

MySQL 5.5 on Mac OS X

Posted by: on Feb 25, 2011 in Blog | Tags: , , | 25 Comments

If you’re (re)building a development workstation on Mac OS X, you may have decided to use the latest MySQL 5.5 packages from mysql.com. Unfortunately, that means you probably have seen (or will soon see) two problems.

Read More

Apple Isn’t Earning Their 30%

Posted by: on Jan 31, 2011 in Blog | Tags: , , , | 4 Comments

Much has been said over the last 2½ years about the App Store and places where Apple is failing third-party developers. Many things have been fixed, but unfortunately, many more have been neglected or only partially addressed. On January 22, 2011, the App Store surpassed 10 billion downloads. Let’s assume 1% of those are paid and Apple only takes the minimum 29¢ for each one. That’s still $29 million. Apple needs to do a lot more to earn their 30% cut.

Read More

Automatic Git Revision Stamping for App Store Projects

Posted by: on Nov 2, 2010 in Blog | Tags: , , , , , | No Comments

Following up on my post about automatic Subversion revision stamping, here is a modified script for use with Git-based projects.

Read More

Option-Click to Reposition Cursor in Terminal

Posted by: on Oct 7, 2010 in Blog | Tags: , | 3 Comments

I found this on SuperUser today and just have to share it.

In Terminal, you can reposition the cursor on a line by option-clicking where you want it to go. Credit where due.

It doesn’t happen every day, but certainly a few times a week: I end up with a monster command, spanning two full 100 character wide lines or more. Inevitably, there’s an error in there in the middle, and I sit waiting, holding down left-arrow to fix it and try again.

Adding “contrib” Extensions to MacPorts PostgreSQL

Posted by: on Aug 5, 2010 in Blog | Tags: , | 8 Comments

PostgreSQL is my database of choice. The main reason is that a standard distribution comes with just about everything one could ask for in a free RDBMS, and if what you want isn’t already installed, it’s often in the “contrib” directory. In particular, now that I’m doing a lot of iOS development, and location awareness is a big part of mobile apps, it’s useful to be able to work with coordinates. PostgreSQL does this using the cube data type and earthdistance functions, both in “contrib”.

Read More

How to Set Up Internet Sharing on Mac OS X

Posted by: on Jun 10, 2010 in Blog | Tags: , | No Comments

These days, it’s not uncommon to be faced with the situation of having two or more Wi-Fi devices you might wish to use in a hotel room when the hotel does not provide free in-room Wi-Fi. The hotel doesn’t know that those devices are all yours and in one room, so using them means paying per device, which is crazy.

This explains how to easily set up Internet connection sharing in Mac OS X 10.6 so you can pay once, and piggyback the rest of your devices off that one laptop. These instructions assume that you have a wired Ethernet connection available in the room.

  1. Plug in your laptop to the Ethernet, pay and get it working.
  2. Go to System Preferences -> Network. Take note of the IP address, router and one DNS server.
  3. Ethernet connection settings

  4. There are three IP address ranges reserved for private use: 10.x.x.x, 172.{16-31}.x.x and 192.168.x.x. Looking at the IP address, router and DNS address from the previous step, pick one of those ranges that is unused. You’ll use this for the wireless network you create shortly. For example, the router is in 10.1.x.x and the DNS server is in 172.16.x.x, so I’ll use 192.168.x.x.
  5. You may find it easiest if you’re moving between locations to create a new network location for this Internet sharing configuration. You can do that in the Location drop-down at the top of the System Preferences window.
  6. Still in the Network part of System Preferences, choose AirPort, then click Advanced. Go to the TCP/IP tab.
  7. Pick any IP address in your chosen range, with a matching subnet mask. 10.x.x.x should use 255.0.0.0, 172.16.x.x should use 255.255.0.0, and 192.168.x.x should use 255.255.0.0. Enter the same router address you copied down from the Ethernet configuration. For this post, I’ll use 192.168.1.1.
  8. Wireless connection TCP/IP settings window

  9. Go to the System Preferences -> Sharing. Click the Internet Sharing item, but not the checkbox next to it. This should show “share your connection from” is Ethernet, and “to computers using” has AirPort checked. Click AirPort Options.
  10. Internet Sharing options dialog

  11. Pick a network name. I also recommend turning on 128-bit WEP. It’s not great, but it’s better than nothing. You need to pick a password, which unfortunately must be exactly 13 characters.
  12. Click the checkbox next to Internet Sharing and Start in the scary warning dialog that follows.
  13. From one of your other devices, you can now connect to your new wireless network. You will have to configure its IP address manually, since your Mac is not running a DHCP server to supply it.
  14. Use another, different address for your wireless device, but in the same network as the AirPort you just set up. Since it’s using 192.168.1.1, I’ll use 192.168.1.2. Use the same subnet mask, but use the AirPort’s IP (192.168.1.1) as the router. Use the DNS IP you copied down in step #2.
  15. an example of wireless network settings on an iPhone

That’s it: you should now be able to use the Internet from your wireless device, via your laptop plugged into the Ethernet.