Archive for June, 2008

Jun 27 2008

Learning to Develop for the Mac - Historically

Published by Jonathan Wise under Articles

Going back to the beginning, and learning Project Builder, Interface Builder and ObjectiveC on NextStep. Can you believe this is the technology that NeXT had the same year Windows 3.1 came out? And its the same stuff that’s used to build Mac and iPhone apps today…

Click for a bigger picture.

In fact, the technology is so close that I used a tutorial for developing a sample Mac app, to develop a sample NextStep app. The notion of “FAT Binaries” that work on multiple hardware architectures came from NeXT as well, since it ran on any number of platforms by the end.

No responses yet

Jun 26 2008

Installing NextStep 3.3 on VMWare 6

Published by Jonathan Wise under Articles, Hacks

I’ve been hankering to learn more about the origins of OS X, so I figured the best place to start would be the OS at its core — NextStep (later named OpenStep.)

When Steve Jobs was ousted from Apple, he set out to create a new company that would deliver elite hardware, and a revolutionary operating system. NeXT was started to build powerful hardware and software that would leapfrog the Mac (and everyone else on the market.) They eventually had to kill off the hardware line (after making some very nice, uber-high-end machines) but the software they made changed the industry. It was on a NextStation computer, using the NextStep OS that Tim Berners Lee would invent the World Wide Web, and its the true Object Oriented approach of the OS that many companies have imitated or borrowed.

By the mid-90s Apple was in truly rough shape. Their archaic OS, once the greatest thing on the market, was showing its age, and Apple had tried, and failed (mostly due to mismanagement) to replace it. It was determined that they should buy an existing next-gen OS, and re-build on top of it. After flirting with IBM and BeOS, they settled on a deal with NeXT. A deal that grew until Apple acquired the company, re-acquiring Steve Jobs in the process. He became the iCEO (interim CEO) and the de-facto leader of the company. Existing ideas were rapidly brought over from the Mac onto NextStep/OpenStep, layered on top of its rock-solid BSD Mach microkernel, Object Oriented underpinnings, and a re-vamped version of its graphics layer, was a new Interface, and a Classic emulator to allow old Mac apps to run.

The end product, after many variations, pre-releases, betas, and one or two fairly ugly general releases, was what we know today as Mac OS X. Much of NextStep is still intact, including low-level OS APIs, visual and development concepts, and culture.

If you’re interested in getting NextStep up and running in VMWare (I’m using a Windows Vista 64-Bit Host OS, but these steps should work with most versions of VMWare — including Fusion) you’ll need to find an ISO of the NextStep OS somewhere, and maybe these steps will help you…

Continue Reading »

One response so far

Jun 19 2008

Using Primus and BitTorrent at the same time

Published by Jonathan Wise under Articles, Hacks

I’ve scoured the Internets and not found any best practices or recommendations for how to set-up hardware VoIP, like what’s offered by Primus in Canada, so that call quality is not affected by BitTorrent (or other bandwidth-heavy activity.) So documented here is the configuration I’ve found to work best.

But first, here’s how I originally had it set-up…

Initially I connected the Linksys VoIP gateway box that Primus sent me to my router (a Linksys WRT160N) figuring I could use its QoS to make sure that voice calls were given priority. I tried all of the QoS configuration methods available to ensure that the gateway was the highest priority device on my network: I set its MAC address and its physical port to “High” while everything else in QoS, especially the TCP ports being used by BitTorrent on both my computers were set to “Low.”

Frankly, this wasn’t enough. I constantly was connected to wrong numbers when I dialed out, and when I was able to connect, calls would be plagued by static and lag until I shut down the BitTorrent clients on both computers — and this was even when they both had significant “speed limits” enforced to ensure that neither was consuming more than 10kbps up or down.

I was more than a little frustrated. I pay $100 a month for business DSL, that promises 6mbps down (actually delivering around 5) and 800kbps up (actually delivering around 350.) Sure my DSL provider sucks, but thats another story. It should have been sufficient to download a total of 20kbps while still talking on the phone.

The problem, it turns out, was in Linksys’ QoS implementation. Its just not that good. The custom firmware available for the WRT54G series routers (plug for Tomato!) has much better QoS, and if I was willing to downgrade my hardware back to that venerable but older device, maybe I would have had better luck. But the WRT160N is a darn fast router, and I’m otherwise quite happy with it.

So here’s how I got things working — and suprisingly, it required following the advice of the Primus tech support guys… and then going just a little bit further. Who woulda thought a company’s tech support department actually knew what they were talking about?!

First of all, just do what they suggest, and put the gateway between your modem and your router. I know having another hardware device between the internet and your network probably rubs you the wrong way, but it’s OK, I promise! Connect your modem to your VoIP gateway, and your VoIP gateway to your router.

  • If you’re using DSL, you’ll need to provide your gateway with your PPPoE login info. This requires temporarily connecting my PC to the gateway’s Ethernet port, and then directing my browser to 192.168.0.1
  • If you’re using the Linksys SPA hardware gateway, when asked for authentication provide a username of “user” and a password of “primus” (for any other device, call Primus to find out the login information — don’t worry, they’ll give it to you.)
  • Now go into the WAN tab, and provide your PPPoE login info.
  • Reconnect the Ethernet port on your gateway to your router, connect your PC back to your router, and configure your router’s Internet connection for DHCP (if it isn’t already)
  • Find the Internet MAC address on your router (probably in the Status tab) and copy it.
  • Now return to the gateway config page (still 192.168.0.1) and go to “Advanced” (again, this is for the Linksys box, your settings may vary)
  • Under LAN set-up, add a DHCP reservation for your router, using the MAC address we looked up before, to make sure it always gets the same IP.
  • Now the final, most important step, is to DMZ your router. In the “Application” tab is a section where you specify the IP address of the device you want DMZed. Use the IP you reserved in the step above.

Save all your settings, and return to your router config pages. Now you can specify QoS for everything else inside your network. The VoIP gateway will make sure calls get priority over the DMZ device, but otherwise forwards everything right through to the router, which will make sure that everything else is QoSed the way you want it.

(Important side-note: If you don’t have a router, don’t DMZ your PC! This is never a good idea! The only reason DMZ is OK here, is because we have another hardware device protecting the internal network, and doing the port forwarding, etc…)

Using this configuration I can leave BitTorrent running all day, and still have great voice quality on my phone calls. I do still need to set a speed limit on my BitTorrent clients, which I have enforced during business hours (Transmission on the Mac has a “Speed Limit” option, uTorrent has a “Scheduler” — both allow you to constrain torrent activity during certain times) but not nearly as heavily as I had before.

Now that I have much less bandwidth available to me (down from 13MBPS on RoadRunner in New York) I’ve had to reverse the QoS policies I had articulated before so that Torrents are the lowest priority activity on my network. Skype is the highest priority, and HTTP/IMAP/SMTP traffic are in the middle. This keeps the web and e-mail moving quickly. Again, the VoIP Gateway, since its the first level traffic cop, makes sure than nothing is more important than voice calls.

Primus’ customer service isn’t much help, and tech support will give up on you fast if you seem to have a slow Internet connection. On the other hand, they seem to know that they have somewhat niche technology typically adopted by the more savvy, and assuming your connection is OK, they’re pretty willing to give you whatever advanced information you want to try and tweak your settings yourself…

Plus you can’t really beat their long distance prices, or that killer “Concierge” feature on the Portal page…

2 responses so far