Archive for March 2009
Tuesday, March 31, 2009
Changes 1.5 is much more useful than previous versions thanks to a new “SCM HUD” window that lets you, from your editor, select two revisions of the current file to compare. It currently works with Git and Subversion.
Overall, I prefer the Find Differences feature in BBEdit (and TextWrangler) for processing differences one at a time, and I prefer viewing git diff patches color-coded in TextMate to get the big picture of what’s changed. Changes seems suited to an in-between case, where you want to see what’s changed and also make a few edits. All these tools are better than FileMerge, of course.
I found the default color scheme confusing, as I’m used to red meaning deleted, not changed. A gray background with blue text seemed to work better.
Likes:
- The option to show only the lines that are different is very useful, as it eliminates needless scrolling.
- The SCM HUD is easily invoked via AppleScript, so although it doesn’t integrate with Xcode out of the box, it was easy to write an integration script, which I hooked up via FastScripts.
- It’s extensible to other version control systems by writing short adapter scripts. This is a great use of PyObjC.
Dislikes:
- The SCM HUD does not track files that were renamed, even though Git can do this.
- The SCM HUD’s display is cluttered with all the fields on one line, separated by spaces. It would be nice if it used columns instead.
- There’s no support for syntax coloring, so files aren’t as easy to read as in your editor.
- There’s no way to change the background color of the text.
- There’s no soft-wrapping for long lines.
- The AppleScript support is limited. You cannot access the list of windows or see which files are being compared. (I wanted to be able to send the files to BBEdit.)
- I rarely complain about software prices, and I’m all for supporting good Mac developers, but the $50 price seems out of line for the current feature set.
Jason Fried:
We shouldn’t be forced to scour the internet finding sites that claim they are doing support for us when they’re not. It’s not fair to us and it’s not fair to customers to make something look like an official support site when it’s not. This should be entirely opt-in for a company and it’s not. In fact, it’s worse than that because if you don’t opt-in, they make negative claims about your company’s commitment to customers.
Update: Responses from Get Satisfaction and Fried.
Dan Benjamin:
It might take you an extra moment or two throughout the day, but if you keep up with the practice, you can eliminate the need for bigger, more time consuming purges like Spring cleanings.
This sounds a lot like continuous refactoring.
Refactoring
Thursday, March 26, 2009
Gus Mueller:
You write your scripts in JavaScript, and application communication is handled via Cocoa’s distributed objects. Like PyObjc and RubyCocoa, JSTalk uses a bridge to talk to Cocoa (JSCocoa + WebKit’s JavaScriptCore), so you get all the power and speed that comes with it. JSTalk comes with a little editor, a command line tool, and an automator action. If an application you want to script isn’t exposed via JSTalk, you can still tell it what to do via the Cocoa Script Bridge (which is new to 10.5).
First of all, this is very cool. However, I think defining the object model, e.g. using XML, is a feature. Otherwise there’s no separation between the scripting interface and the application’s unstable internal interfaces. Secondly, most of my scripts need to run on other Macs, which don’t have anything special installed. Hopefully, Apple will take a look at JSTalk along with Appscript and JavaScript OSA, come up with something modern and cool, and build it into the OS.
Unladen Swallow is a branch of Python 2.6.1 that aims to be 5x faster than CPython (via Jesse Noller):
The majority of our work will focus on speeding the execution of Python code, while spending comparatively little time on the Python runtime library. Our long-term proposal is to replace CPython’s custom virtual machine with a JIT built on top of LLVM, while leaving the rest of the Python runtime relatively intact. We have observed that Python applications spend a large portion of their time in the main eval loop. In particular, even relatively minor changes to VM components such as opcode dispatch have a significant effect on Python application performance. We believe that compiling Python to machine code via LLVM’s JIT engine will deliver large performance benefits.
Great name.
Lukas Mathis:
Rather than arguing about whether MacHeist is good for the participating developers, or whether it’s good for the MacHeist customers, or whether it’s a nice experience, or whether the participating developers are getting great marketing, I would be interested in knowing how it affects the Mac shareware market as a whole.
What influence does Espresso being in the bundle have on Coda? Does the fact that a hundred thousand people will effectively get a free copy of Espresso hurt Coda? Does it negatively impact the amount of money people are willing to pay for an app like Coda or Espresso or BBEdit or TextMate?
It’s not an easy question to answer, but I think it’s what matters in the end. MacHeist could either be growing the market for Mac software or creating a tragedy of the commons.
Wednesday, March 25, 2009
OmniGraphSketcher looks pretty neat, although I wonder why the inspector uses the recessed bezel style for pop-up menus and segmented buttons. That’s supposed to be for toolbars and scope bars.
John Carmack:
It turns out that there were a couple issues that required work even at 30hz. For a game like Wolf, any PC that is in use today is essentially infinitely fast, and the Wolf3D Redux code did some things that were convenient but wasteful. That is often exactly the right thing to do, but the iPhone isn’t quite as infinitely fast as a desktop PC.
Tuesday, March 24, 2009
TechRadar discusses some interface changes that Microsoft experimented with but that didn’t make it into Windows 7 (via Lukas Mathis).
Monday, March 16, 2009
Fossil is a “distributed software version control system that includes an integrated distributed wiki and an integrated distributed bug-tracking system all in a single, easy-to-use, stand-alone executable” (via Eric Sink). It’s from D. Richard Hipp, the developer of SQLite and CVSTrac. It uses SQLite for transactional storage, and like CVSTrac it runs its own Web server. I don’t believe Fossil solves any problems that I have, but it’s interesting nonetheless.
Fossil SQLite Version Control
I’ve long used LaunchBar to quickly open Mac OS X header files. The built-in “Development Resources” indexing rule can be configured to scan headers. However, this has two problems:
- The headers are commingled with the HTML reference files. I do want access to the reference files, but sometimes I know I want to open the header.
- It opens headers from the 10.4u SDK even though I’m running Leopard.
Here’s a LaunchBar AppleScript that will only open headers, and it will open all the matching headers:
on handle_string(_string)
do shell script "echo '1' | open -h " & _string's quoted form
end handle_string
The “1” is because if there are multiple matches, open will ask you what it should do:
open -h NSAttr
NSAttr?
[0] cancel
[1] all
[2] /System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h
[3] /System/Library/Frameworks/CoreData.framework/Headers/NSAttributeDescription.h
[4] /System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h
And I want to pick “all.”
Friday, March 13, 2009
Google:
When people think of an auction, they often think of a prize being sold for the highest bid. But the AdWords auction works a little differently, where the winner only pays the minimum amount necessary to maintain their position on the page. That means you’ll only pay the minimum necessary to beat the person below you. In fact, our quality-based pricing system ensures that you’ll often pay less than your maximum bid.
On the other hand, one problem with AdWords “auctions” is that the nebulous Quality Score can force you to pay obscenely high rates for words that no one else is bidding on.
Advertising AdWords Web
Monday, March 9, 2009
Glenn Fleishman:
In a briefing, Apple explained that you can give the 2.4 GHz and 5 GHz networks the same name, and Apple hardware that supports 802.11n can choose which network to join based on quality of the signal and the speed that’s available. This feature is unique to Apple gear; Windows and other platforms select somewhat randomly from available networks with the same name.
You can also name the two bands’ networks separately, and manually force 802.11n clients to join the 5 GHz network.
I wonder how many people are, like me, already doing the latter using a base station plus an AirPort Express.
Saturday, March 7, 2009
Alan Forkosh:
Unfortunately, since Top Sites accesses the frequently seen
websites between my own viewings, if I am logged in, the forum
software updates local cookies to reset the update point threads
before I manually get to them, so that the only newly updated threads
are those that have been updated since the last ‘Top Sites’ access.
Friday, March 6, 2009
I’ve been enormously pleased with my 15-inch MacBook Pro in nearly all respects. The unibody, the screen, the graphics, the processor and RAM, the keyboard, the trackpad, the accessibility of the hard drive—all are big improvements over the 2006 model that I had been using.
The support for external displays, however, has been abysmal. Apple’s Mini DisplayPort to Dual-Link DVI Adapter costs $99, it was delayed for months, and it doesn’t work properly. Periodically, the display becomes distorted or snowy. The store reviews and discussion boards (1, 2, 3, 4) show that lots of people are seeing these problems, with both Apple and third-party displays.
In my case, with a Dell 3007WPF, the distortion occurs most often within 10 minutes of coming out of the screensaver. Sometimes it happens several times within a span of 5 minutes. Other times it happens only once a day. The average is about twice a day. Sometimes the display temporarily forgets its ColorSync profile until I open the Displays pane in System Preferences. Sometimes the display flickers. None of this happened when using the same display with the older MacBook Pro.
Apple’s support page recommends resetting the adapter by unplugging and replugging it. This temporarily fixes the major distortions, but lesser distortions (such as a vertical line pattern in areas of solid color) remain until the computer is rebooted. Of course, unplugging the external display causes Mac OS X to move all the windows to the internal display. After reconnecting the external display, I run an AppleScript to restore the windows to their proper positions.
The problem seems to be related to USB. It occurs less frequently when the adapter is the only device plugged into the Mac. Currently, I’m leaving the USB port next to the Mini DisplayPort vacant, I plug a USB hub into the far port, and I plug the adapter and all my USB devices into the hub. This has reduced the occurrences to the frequency described above. With both the adapter and the hub plugged into the Mac, the problem occurred much more frequently, making the computer almost unusable.
Apple shipped the adapter in December, and negative reports surfaced almost right away. I figured it wouldn’t be long before Apple found and addressed the problem, and I bought the MacBook Pro in January. For me, the problem first occurred on January 20. I called Apple, and the specialist had not heard of the problem before. He wouldn’t send me a replacement adapter, instead suggesting that I send both the MacBook Pro and the adapter to Apple for testing.
On January 26, Apple released an NVIDIA Graphics Update that “improves cursor movement when using the Apple Mini DisplayPort to Dual-Link DVI adapter with the Mini DisplayPort enabled MacBook Air, MacBook and MacBook Pro.” As the Mac was not in my possession at that time, I did not install the update. Apple later pulled it.
On February 5, I received the MacBook Pro back, unchanged. Apple said that both the computer and the adapter checked out and that they had not been able to reproduce the problem. I called Apple to find out what the next step was. Because all the tests had passed, they would not send me a replacement adapter. The representative I spoke with seemed to have never heard of DisplayPort. A higher-up product specialist said he would get in touch with engineering and get back to me.
On February 12, the specialist called back with some suggestions: reset the SMC and the PRAM, and delete various com.apple.windowserver plist files. This didn’t help.
On February 17, he called and sent some test programs I could run in order to gather information about my system. I did this and sent the log files to the Apple engineers.
On February 23, he called to say that engineering was now well aware of this issue and had been hearing other reports of it. They believe there is no hardware problem and that they’ll be able to fix it with a software update.
The current state of affairs is that:
- The software update is not yet available, and Apple has no estimate of when it will be.
- Nobody sells a 30-inch display that can directly connect to a Mini DisplayPort.
- Dell makes a 30-inch display with a full-size DisplayPort, but (as far as I know) there is no adapter to connect it to a Mini DisplayPort.
Thus, the new MacBook Pros have been available since October, and there is still no reliable way to use them with a 30-inch display.
Update (2009-04-20): I’ve found that putting the display to sleep (by pressing Control-Shift-Eject) sometimes fixes the distortions. As this does not affect the window positions, I recommend trying it before unplugging the adapter.
Update (2009-10-03): Updating to firmware version 1.0.2 of the adapter has helped a lot.
Wednesday, March 4, 2009
Bob Martin:
Suppose you wanted to set a bit somewhere that caused a low resolution image to be displayed rather than a high resolution image. How would you use TDD to get that to work? Would you write a test that scraped the screen to show that the image was in low res?
Of course not. You already know that the JPEG library works. You already know that if you call it with the right arguments it will display in low resolution. What you need to test is that the bit you set gets translated into the appropriate calls to the JPEG library.
Compression JPEG Programming Testing
Monday, March 2, 2009
In September I reviewed Thermaltake’s BlacX and WiebeTech’s RTX100 enclosures, all of which let you use bare SATA hard drives like floppy disks. Dan Benjamin has now reviewed NewerTech’s Voyager Q. It’s like the BlacX, but it’s nicer-looking, it has a quad-interface, it’s $99 rather than $43, and it doesn’t require pressing the power button before the ejecting the drive. I have not yet had a chance to do comparative benchmarking, but the Voyager certainly feels faster.
Update (2009-03-09): Fraser Speirs reports that he’s unable to use two Voyagers at the same time via FireWire because they have the same GUID: 0x30E002E0454647. My Voyager also has this GUID, so this would seem to be a bug in the Voyager hardware.
Update (2009-03-16): There is a firmware update (requires Windows) that can be used to change the Voyager’s GUID.
Sunday, March 1, 2009
Shawn Blanc:
The trouble happens if you do want to answer the call. Now you’re dealing with the fact that iPhone offers two different locations to touch in order to answer an incoming call. If answering from a locked-screen state, you touch the bottom-left corner and slide to the right; if answering from a non-locked-screen state you touch the bottom-right corner.