Subversion on Leopard Server
I should probably have a category for this stuff for those that don't care...
As I blogged a couple of days ago I finally got my new mini out the door and setup. I waited to turn on the firewall because I wanted to make sure I could remotely administer the box before turning on the firewall to minimize the moving parts. So once it got connected on Monday I spent some time messing with it and was sure I had everything running and turned on the firewall.
What I did not remember though is that I messed with the subversion auth module while I was tweaking the security settings. Everything worked fine (or seemed to) with the firewall engaged so I forgot about it. Yesterday we were trying to get the games reconnected to our subversion server and bang I totally lost access to dudney.net. After much banging my head against a brick wall and such and some great support from my provider I found the following log message.
/usr/sbin/PasswordService: client response doesn't match what we generated
...
Host at ...my ip address... will be blocked for at least 15.00 minutes
Ah something in the firewall is blocking access. Turns out I had set my subversion auth mode to digest (must be basic) and that was causing the auth failure, which made the firewall block everything for 15 minutes.
Permalink Add A CommentInstead of writing...
On Tuesday of last week I checked in the final chapter, there is still plenty to do (like roll in all the great feedback I've gotten from the tech reviewers) but I figured a little R&R was in order today. So this morning I hoped on the bus with my lovely wife and we skied from 8:30 (first tracks :) till around 11:00. It was a great day! Here is a photo of one of the runs with the valley our house is in in the background. I highly recommend Breck if you can make it out you should.
Permalink 1 Comment - Add YoursNew Mini Online...
Finally, my new mini is online and serving pages. Here is hoping that I get as much out of this new mini as I did from the old.
If you notice anything missing please don't hesitate to ping me and let me know so I can fix it asap.
Permalink Add A CommentGrokking the Default Core Animation Transitions
In the tradition of my last grokking post (but hopefully without the memory mgt problems :) I have another example that just did not fit into the flow of the book but I think it makes a great app to experiment with.
This app will let you choose from the four different default transition types and then add and remove an image layer so you can see how each of the transition types behaves. It uses bindings to get the content for the pull downs and to know if the subtypes should be hidden or not. Its not the best example in the world though for grokking bindings, if you want/need to know more about bindings go check out Scott's tutorial.
Interesting stuff about the example;
- some transitions only work on the change from hidden == NO to hidden == YES
- some only work when hidden changes from YES to NO
- the snowman is a pic we shot at last years snow carving competition in Breckenridge.
There are of course a hundred ways to make this kind of thing happen. In this example the transitions are invoked when the 'hidden' property is changed. You could achieve the same effect via delegation and providing an animation for kCAOnOrderIn or kCAOnOrderOut. But hidden makes the code smaller if less flexible.
You might notice on the 'fade' transition when you hit remove that the rounded corners dissapear. I'm not sure if that is a bug or something wrong in my code. I have submitted a bug to Apple.
Here is a screen shot of the app.
And here is the code.
Permalink Add A CommentNew Beta Available
We pushed a new beta today. Most of the existing errata was addressed as well as adding a new chapter 'Core Animation' in which you will learn all about layer hosting views and building UI's with CA.
Permalink Add A CommentGrokking the CAMediaTiming protocol - Updated
On of the topics in the chapter I just finished was on the media timing protocol. While the class doc's and the guide have a lot of good info in them I found them lacking in detail. So I decided to write myself an application that would allow me to twist all the knobs and flip all the switches so that I could make sure that my assumptions about how all that stuff worked was really how it worked.
I found a few surprises and spent quite a bit of time digging into stuff to make sure I really understood it before writing about it. And this sample app was really helpful in that regard. However it is way to big to put into the book and rather than keep if to myself I figured I'd share it. You can grab the code here and follow along with the rest of the discussion.
Here is a screen shot of the app in action.
By default the mode is set to 'Forwards', makes sure you play with the other modes. A quick note on 'backwards', it is not obvious what the 'backwards' mode means in any of the examples I could come up with in this app. The best example I know of when 'backwards' is useful is when you have timeOffset happening on a fade in (i.e. when you set hidden=NO), you don't want the layer to appear until the timeOffset says so, if you set the fill mode to backwards then it will 'backfill' from when the animation starts back to the 'beginning' of time for that animation so the layer won't appear, disappear and then animate.
The 'Move' checkbox specifies that the layer should actually be moved instead of just having an animation applied. The 'Recenter' button places layer back in the center. The rest of the buttons are hopefully self explanatory.
The app is garbage collected I switched at the end so there might be some stray retain/release's in there.
Hope you find this helpful. It really helped me get my head wrapped around all the details of how this stuff fits together. The stuff I put in the book is more focused and has much smaller examples. So if you would learn better that way feel free to buy a copy of the book :)
Update:So if you have already downloaded the project (before 2:30 PM MST) you should grab it again, there is are a couple of missing retains (and a lack of xcode-fu on my part WRT GC settings) that was crashing (thanks Scott for letting me know). I've uploaded a new copy with the retain and I turned off GC.
Permalink Add A CommentOnly one more chapter to go...
I just checked in the last changes on Chapter 8, Chapter 9 has been done for a while so now I'm on to Chapter 10 and then I'll be wrapped up.
After Chap 10 is in the bag its off to fix all the stuff the tech reviewers are finding. I can't say enough how thankful I am to this group of folks for doing such a great job in giving me feedback.
Permalink Add A CommentIntermittent Blog Failures...
My blog is dying every 1 to 5 hrs and I'm not sure what is happening (it suddenly started to run out of db connections about a week ago). I'm looking into it and hopefully will get that fixed shortly. Sorry for the lack of responsiveness.
Update:
It appears that the success of my lovely wife's iPhone games are to blame. This site has been hosted on a mac-mini since June of 2005. The box never had any problems serving up quite a bit of content from my java blog even when I was near the center of a tempest in a teapot about JBoss and was getting thousands of hits a day for about a week my mini never complained. The average hit count per day was between seven and ten thousand hits a day. Then...
A friend of mine wrote two very cool iPhone apps, Connect4 Touch and Tic Tac Toe. While my wife and I were in the theatre waiting for National Treasure 2 to start a couple in front of us way playing Connect 4. Two days later I start getting AIM hits from my wife asking how to do this or that with Javascript.
The result has been a bit of an increase in the traffic on dudney.net and the little mini that could. December's daily average hit count was 7,700, Janurary was 55,000 and so far in February the daily average is 130,000. And all that from a mac mini. The culprits are iKala (mancala), Ball Blast (which is currently in the top 10 games on Apple.com, way to go!) and the latest Alien Defeat. If you are so inclined go check them out.
One of the coolest things about getting into this is that it's been a family affair. My 12 year old son wrote about half the code for Alien Defeat and came up with the idea. He also made the icon (which is one of the coolest icons ever for an iPhone app IMO ;). And my 10 year old made the background images for both Alien Defeat and iKala with Blender. The Dudney software factory is in full swing :)
Back to the tech: from what I can tell Apache was consuming all the memory (because of my config, fixed now I hope) and causing mysql and java to swap out. Then every hit on my blog was causing a massive bit of swap activity, and causing mysql hits to timeout, and boom my blog would croak.
I think I have apache limited now so that my blog has enough breathing room. Lets hope so anyway, my wife is about to release a fourth game in the next week or so, might be in the market soon for an XServe :)
Update 2:
Ordered a new intel mac mini to replace the G4 mini. its just not able to keep up...
Permalink 2 Comments - Add YoursA Bit of History...
For those interested in a bit of history (hi mom!) I've posted on my java blog a summary of how I ended up here writing a book on Core Animation.
Permalink 1 Comment - Add YoursBeta here we are!
I am totally stoked to report that Core Animation for OS X: Creating Dynamic Compelling User Interfaces is finally in beta!
If you buy a copy of the beta you can get the content now and then a full version when the book ships.
You can read all about it here. Permalink Add A Comment



