Read on for part 3.
Technology
Snow Leopard’s file system changes
Mac OS X 10.6 “Snow Leopard” brought a slew of under the hood changes. There are two distinct but related changes that Apple made that most users will probably never notice and many developers probably never will either. But if you happen to be someone who works with the file system, these changes may affect you. These changes are:
1. KB vs. KiB. That is, is a kilobyte 1000 bytes or 1024 bytes.
2. file-system-level compression of files
Since I recently went around with these, I felt it’d be worthwhile to share what I discovered, since there isn’t much information out there on the topic. The only thing I found that remotely discussed the matter was this page of Ars Technica’s Snow Leopard review.
Continue reading
But what if you need more when installing?
As a developer of Mac OS X software, how to deliver that software is an issue of constant battle.
Long long ago, everything was shipped as either an installer or just in a StuffIt archive. Typically applications came in installers and the only thing in StuffIt archives would be non-applications (documents, pictures, other data).
Mac OS X tries to change this by simplifying things using drag-installs. It’s actually a very simple process of download, drag the application icon to the Applications folder, and off you go. But, even something as simple as that can prove too confusing for the lay person, or at least it allows for a host of problems. Installers still exist as well, and there are many other modes of delivery and installation out there.
Various bloggers have been discussing the issue. It starts with FireFox distribution issues, where they ultimately conclude that you should just ship an installer and piggy back off other mechanisms (e.g. automounting of .dmg’s). John Gruber counters that we should just use .zip files, and makes rather compelling arguments for that approach. Chris Clark also agrees with using zip archives. Andy Kim takes it a bit further and actually starts to touch on what I’m going to hit at.
All of these solutions are nice, but they all seem to target one thing:
Very simple applications.
If all your application is is itself, then I guess that’s fine. But what if your application has more than just the application itself? What if it needs to install drivers or other kernel extensions? What if it had launch agents or daemons? How about other plugins that need to be installed? Maybe something that requires a restart of the machine? What if you need to run scripts to deal with housekeeping (e.g. to help upgrading past users to the new version of the software)? All of these simplistic approaches just do not cut it.
Some would argue this should be a part of the application itself. That is, self-healing applications. I see merit in that approach and it could be a solution that solves this and the initial download-and-install problem. But it is not a panacea.
The ultimate problem is there is no one-size-fits-all solution, which seems to be what people are proposing… or at least, they’re not considering the wider scope that some developers may need in the install process. Apple seems to have the tools in place, but isn’t quite there. What ought to come would be:
- A new installer format. It could be an archive holding all the parts to be deployed, but it should allow for logic to be applied during the install (e.g. use of shell scripts, etc.).
- This format is understood by the OS, so when applications such as Safari download them, they can start the install process. Of course, we have to be mindful that some people could use this for nefarious purposes, so being fully automatic is not ideal… asking the user would be helpful. Using code signing and other forms of trusted computing may help here.
- The notion of installing then isn’t just some file format, but is also considered an end-to-end process, from either downloading the software or inserting the removable media that has the software on it, to getting the software installed, configured, registered, and cleaned up after (optionally removing older versions of the software and its support files, removing any archives, trying to leave the machine in a cleaner state than before it started). Get the users going the whole way through. It should “just work”; Gruber’s mention of how the iPhone works is apt.
- To publish a set of tools AND guidelines on installer creation. Apple goes through a lot of trouble to establish human interface guidelines on how applications should work. Apple can and should do the same with installers so that the experience of getting software to users can be as simple and pain free as possible, but also as consistent as possible.
The big problem we have today is too many approaches to installing software. Everyone has different needs and different thoughts on how best to approach it. I’ve had debates at my office about how we should deliver our software, and it’s difficult to achieve consensus because all approaches have strengths and weaknesses. This only serves to hurt the user because there isn’t one way that “just works” for them to get to know and be comfortable with. Every install process is different and unique, and for the non-geeky types, just frustrating and confusing.
I hate to say it but the movement to improve this will ultimately have to come from Apple. It’s their platform, it’s their user experience that they wish to control and dictate. Ultimately Apple must be the one to improve this.
Can we 3rd party developers do something about it? Sure. We could work to tackle the problem, publish our own guidelines, create tools to help out. But I’m not sure how far it would get. Efforts like Growl, Sparkle, solve some great problems and didn’t come from Apple and have gained a tremendous amount of traction in the developer world. Still, some venture to do it themselves. Code solutions are good, but guidelines are better so if you have to do it yourself, at least some guiding principles can be followed with the hope of still making things good for the user.
Where to start?
Bulletproof Carbon
Check this. Carbon nanotubes being used to make bulletproof material.
Nanocomp Technologies, is the first in the world to make sheets of carbon nanotubes — microscopic tubes stronger than steel but lighter than plastic. The Pentagon has financed much of the Concord, N.H., firm’s work; stakes include the $500 million U.S. market for body and vehicle armor, which is currently dominated by DuPont’s Kevlar.
In April, [Nanocomp’s owner, David] Lashmore had a mechanical multicaliber gun shoot bullets at different versions of his sheet, each less than a fifth of an inch thick, at a speed of 1,400 feet per second. Four sheets were breached, but three showed no damage. Lashmore and his 35 employees were ecstatic.
[…]
Army tests show the material works as well as Kevlar. The military also hopes to replace copper wiring in planes and satellites with highly conductive nanotubes, saving millions of dollars in fuel costs.
It’s interesting. Lashmore was able to grow nanotubes large enough to make into yarn and sheets, and from there they can do whatever. Gotta wait to see where this is going to go.
Mac OS X x86 debugging
It’s been ages since I’ve had to do anything dealing with assembly language. And while I may not have to do much programming in it, it’s still a useful thing to know when it comes to debugging.
Today I’ve been trapped in debugging hell. We’ve got some code that works fine on Mac OS X versions prior to Snow Leopard (10.6) but seems to hang under 10.6. The code flat out executes differently. I watch how our code is invoked and things just don’t happen in the same order across the OS versions. Apple must have done some major under-the-hood changes to NSBrowser and NSTreeController. And since we’re using Cocoa Bindings, it’s a bitch to debug. Everything that’s happening is happening because of Key-Value Observing (KVO). I get somewhere into the bowels of NSBrowserBinder and it appears to be looping… looping… and never exiting the loop for some reason.
Now that we’re in the new x86-based world order of Macs, I went looking for some tips to help me work with debugging the x86 assembly so I could see what the OS was doing. I found a few useful resources.
Greg Parker at the Hamster Emporium has a great article about crashing in objc_msgSend and how to decipher the crash. I wasn’t crashing, but still there are some nice gdb commands and interpretation of the registers.
Then over at the Google Mac Blog, a 2 part article on spelunking. Part 1 and Part 2. These aren’t debugging articles (more like trying to hack around and discover how undocumented functions work), but they still explain a bit about how the x86 ABI works, AT&T syntax, and how Mac all mesh together. Note that Avi Drissman previously published the same article in his own personal blog, but edited it a bit for republishing in the Google blog.
Clark Cox provides a handy table on how to inspect Objective-C parameters in gdb.
And you thought the only thing I knew how to blog about was guns. 😉
How to manage geeks
An article from Computerworld on how to manage geeks.
Speaking as a geek, I can say that article is sound. Old school management practices will not work. Once you understand the geek, you’ll see that typically the best thing to do is let them do their job… get out of their way, shield them from crap, do things to enable them to get their work done.
And then we shall… and it shall be productive and glorious. 🙂
Why did Apple do this?
No sorry… nothing about today’s Apple fan-boy event. More as to why I didn’t post much today.
Apple’s new OS version is 10.6, named “Snow Leopard.” Snow Leopard brought about a lot of under the hood changes to the OS. One of them is fairly well covered on this page of the Ars Technica review.
Basically, Apple did some stuff very very low level to help with reclaiming some disk space but also taking advantage of the volume format layout of HFS+ and how they can use that to their advantage to speed things up… RAM and CPU’s are wicked fast these days, and disk drives are still abysmally slow by comparison (physics can only go so far). So Apple did some neat things to improve speed and access times, and for the most part it works out great. Most people will never notice.
But in the line of work I do… I’m not most people.
The software I develop in my day job does a lot of working with the file system. So all of these changes that Apple made are actually wreaking havoc and hell on me right now. Long held maxims like a file’s logical size will never be larger than its physical size…. out the door. That calculating sizes is now base-10 instead of base-2 (i.e. 1 kilobyte is now being calculated as 1000 bytes instead of 1024 bytes)… changes a lot of things.
I’ve been reevaluating our entire codebase (which is huge) and this just doesn’t play well with us. All I can do at this point is formulate a lengthy email to Apple’s Developer Technical Support and ask for some help and guidance.
It’s been a trying couple of days.
I’m glad I have Kali class tonight. That should relieve a little stress. 🙂
Real metalheads…
Search term grab bag
Let’s delve into the search terms and see what people are searching for now that wind them up here at my blog.
apple os x “snow leopard” gcc version
Technically, 4.2. However, there’s new stuff coming from Apple in terms of complier technology. Check out LLVM and Clang. This Ars Technica article on Snow Leopard has a good discussion of the compiler situation. Heck, the whole article is a good read regarding the real nuts and bolts of Snow Leopard.
contrast sights vs 3 dot sights
I believe contrast is good. Good shooting technique has you focusing on the front sight. Thus, things to help your eyes pick up the front sight are good. Furthermore eliminating things that can distract your eyes are also good. Thus, increasing the contrast between your front sight and the rear sight, between your front sight and your surroundings, IMHO these things are good.
That’s one reason I don’t like 3-dot sights. When you’re trying to quickly get a sight picture, now you have 3 dots to choose from, which is the front sight? If you’re moving fast it doesn’t take much to have the gun pointed slightly askew and actually having the front sight appear to the right or left. Or maybe the front sight doesn’t appear at all and you mentally ask yourself “is that the front sight?” You don’t need to waste time trying to determine “is that the front sight.” It should be definitive.
My current setup is using a set of Dawson Precision sights. The rear is just flat black, but very crisp, sharp, and no-glare. The front is a simple post, but has a red fiber optic insert to help draw my eye. The fiber isn’t used for aiming, just to make the front sight stand out so your eyes come to it. Otherwise, the sights act like any other notch-and-post type sights in terms of aiming.
a 9mm round is equal to what caliber
A 9mm Parabellum bullet is about a .36 caliber. Or maybe .35, depending how you round (.355″).
what does lswchp mean
Lead Semi Wad Cutter Hollow Point. A type of bullet.
is prvi partizan ammo safe in m1a?
I’ve used their .308 Winchester 168 grain match ammo in mine, and it’s been fine.
There’s nothing on the list that seems to say otherwise. My experiences with Prvi ammo have been good, and the reviews and comments I’ve read online have been generally positive about Prvi ammo in general. IMHO it’s not the best ammo in the world, but it’s good stuff and I have no aversion to shooting it in my guns.
where to store pistol home defense
I would say, where it’s handy to serve it’s purpose. I keep the dishwasher near the kitchen sink, because that’s where it’s most handy for its purpose. I keep the TV remote control by my La-Z-Boy recliner because that’s where it’s most handy for its purpose. I keep the toilet paper next to the toilet because that’s where it’s most handy for its purpose. Think about these examples. If the useful tool was not where you wanted it when you wanted it, what good would that be? Why do people store their remote controls up by the TV? If I wanted to get off my butt to change the channel, I wouldn’t have a remote control in the first place. 😉
But of course, you may have additional issues to consider, such as children in the home. I always liked Kathy Jackson’s take on things. Go read her stuff. No point in me duplicating it here.
Another possible issue is appearances. Depending who you are and/or where you live, to have a rack of guns openly about in the house may be no big deal, or it may be impermissible. You may have to consider other options.
When I think about where to store, my main concerns are access and safety. To ensure those who should get to it can get to it promptly when needed, and those you shouldn’t get to it can’t. And to be safe about it to ensure no one, save the one deserving it, gets hurt. But I am not a lawyer, and this is not legal advice.
will a 9mm stop a person
A 9mm what? Oh, I’m sure they mean bullet.
If it’s placed correctly, yes it can.
.45 vs 9mm handgun difference
One shoots a .45 caliber bullet, the other a 9mm caliber bullet. Duh! 😉
3 dots on my nuts
I don’t want to know what that’s all about.
fingers hurts when typing
“Doctor, it hurts when I do this.”
“Don’t do that.”
best offensive gun
Now I admit, that’s a search term twist. Most people are always searching for the best defensive gun or other defense-related terms.
I would say that it doesn’t really matter. To be offensive or defensive depends more upon your mental state, your skills, your situation; that is, you. The gun, it’s just a lump of steel. It’s not the gun, it’s what you do with it.
Or maybe they don’t mean offensive as in “going on the attack.” Maybe they mean the best gun to offend someone with. I guess again it would depend. Paul Helmke, any gun. Carolyn McCarthy, any gun with a shoulder thing that goes up. For Xavier, he’s got a whole collection of ugly guns and shows them off every Sunday. For Charlton Heston, the one taken from his cold dead hands. For Ted Nugent, the one that caused him to miss that white-tailed deer. 🙂
Snow Leopard’s hidden features
Snow Leopard is out.
Macworld has a video showing off some of the nifty features… some hidden, some not so hidden, and all quite welcome.