Skip to content

Twitter enable your app with XAuth!

Community enabling an application can be a pain – far harder than it needs to be. One of the biggest reasons for this problem is OAuth. Requiring a mobile application to open an 800×500 html window is unrealistic, exacerbated by graphic designers who think that a web page is the answer to every problem (remember the saying about how “to a man with a hammer, a screw looks like a nail”?). The sensible solution can be secure http connections with REST/JSON APIs, but it isn’t opening a web page! Continue reading ›

Tagged ,

Adding iAd to Your Projects

I noticed that there is no official sample code for including iAd banners in your projects. Knowing Apple “version zero” demoware, I thought it might be a good idea to build a small project to evaluate iAd. Continue reading ›

Tagged , ,

File Well for MacOS X Cocoa

I needed a control for an application I am writing, very similar to one that was a common idiom in the NeXT world – a drag well for files. Drag a file icon to the well and drop it in, and the application receives the full path of the file; drag from the well, and the recipient gets the file path; drop to a Finder window, or the desktop, and you can create an alias, copy or move the original file.
Continue reading ›

Tagged ,

tinyMCE html editor for Cocoa

One thing that’s been missing in MacOS X Cocoa is an easy way to add html editing features. A long time ago, in an operating system far away (NeXTSTEP, of course), it was simple enough to use Terminal Services to add almost anything you want, and I had a very useful set built for html markup for my own use. But with the advent of MacOS X, and loss of the ability to have tear off menus, this all went away, even though Terminal Services remained, to a certain extent. In the mean time, MacOS X gained WebKit, and the web got grown up javascript – in this case, tinyMCE. Continue reading ›

Tagged , , ,

iOS 4 Impact

I’ve just finished the first stage of one app port to iOS 4. I have to say that it has been a very rocky road, with the first announcement and beta some months back, followed by the very late announcement of iPhone 4 at WWDC. Let’s look at the timings and implications… and I’m going to use the expression “paradigm shift”, for which my apologies…
Continue reading ›

Tagged ,

iPad impact – for developers

I did a review last week of the iPad release, based on the Programming Guide and Human Interface Guidelines, for a customer. The aim was to find out what changes I would have to make to their iPhone application; this post is to give my impressions, on that very brief survey, of what changes developers will have to look out for. I am sure that further announcements will reveal many more. Continue reading ›

Tagged ,

Eclipse/WOLips tips

I have been running a WebObjects introduction course this week, using Eclipse (as I have been for the past several years). As I don’t always use Eclipse for development, this has served to remind me of a lot of basic functionality that I otherwise will forget between courses. If anyone is interested, I have a lot of projects that I continue to maintain using Xcode on MacOS X 10.4, as there is no reason to port them. Continue reading ›

Tagged ,

Objective C Unit Tests

A few notes here: I don’t use Unit Tests as much as I should (probably true of most of us, I guess).  I had built a good, functioning example for a Cocoa class a year or two back, and wanted to make use of that in a new project.

There’s a reasonable guide on the ADC site, at ADC—Automated Unit Testing with Xcode 3 and Objective-C.  There’s also a lot of out dated guides, which sort of get in the way.

I hit a problem with my build: "<SenTestingKit/SenTestingKit.h> no such file".  After a certain amount of thrashing around, finding several mailing list posts from people with the same problem, and no help from careful reading of the ADC guide, I found the solution: make sure that your test classes are in the Unit Tests target, and not the main project target (look at the check boxes under each target).

Another useful link is: Chris Hanson’s Xcode unit testing articles updated.

Tagged ,

Including Twitter on a web page

This is easy.  I did some Googling, and found several Javascript solutions:

http://tweet.seaofclouds.com/ (jquery)
JavaScript: Simple Twitter Feed
Add Twitter to your blog (step-by-step)
Adding Twitter to Your Web Site with JavaScript (this is a summary of several).

We went with Remy Sharp’s solution (number 3 in my list).

Example usage:

<!– PV Tweet Demo  –>

<link href=”/PressVaultDemo/pvtweet.css” rel=”stylesheet” type=”text/css”></link>

<div id=”heading”>

<p><h4>Our four most recent tweets for the games industry<img src=”/PressVaultDemo/images/spacer.gif” /></h4></p>

</div>

<div id=”tweet”>

<p><h3>Loading now… </h3>

</div>

<script

src=”http://twitterjs.googlecode.com/svn/trunk/src/twitter.min.js”

type=”text/javascript”>

</script>

<script type=”text/javascript” charset=”utf-8″>

getTwitters(‘tweet’, {

id: ‘indigopearluk’,

count: 4,

enableLinks: true,

ignoreReplies: true,

clearContents: true,

template: ‘”%text%” <a href=”http://twitter.com/%user_screen_name%/statuses/%id%/”>%time%</a><p>

});

</script>

<!– End PV Tweet demo –>

Next…

You might also want to have a “Follow me” link.  First, I want an image, and there are a lot of free ones, including the official Twitter badges, and  Twitter goodies/buttons.

181 Free Twitter Buttons, Badges, Widget and Counters to Help You …
Free Twitter Buttons | Siah Design
35 Follow me on Twitter badges / logos / buttons
Free Twitter Graphics | Randa Clay Design
50 Free and Exclusive Twitter Icons
mysocialbuttons

A lot of these are the same, and it’s not clear where they started from.

The Twitter link itself is almost trivial, see How to post a link to your Twitter account from your website.  Just use http://www.twitter.com/username, where username is the id of the twit you want to follow.

my bread, Jim Lahey

There’s been a lot of buzz about Jim Lahey’s techniques over the last couple of years.  There’s no doubt that he’s a dedicated baker, and that his approach is worth considering; not least because it’s a set of simple rules that will give more consistent results, and good results, than a novice baker can hope to achieve without a lot of effort, practice, and guidance.
The book itself breaks down into three parts: the first section is the usual discussion of ingredients and inspirations, backed with the core no-knead recipe, with plenty of photographs of the stages to follow.  The second part is a series of chapters with different bread recipes, largely based around a loose connection with Italian bread baking, but as applied to the New York market – lots of sandwich breads, for instance, and “white pizza”.  The final part is a series of non-bread recipes to make Anerican-style deli sandwiches.  In some ways, this is the part of the book I like the best, although it’s not what you’d expect to find in here from the title or cover.
The central matter is the famous no knead recipe.  This turns out to be a combination of several well known “tricks”.  The first is that, as Dan Leppard has espoused for years, a well mixed dough will develop its gluten given time, without kneading, although Leppard prefers to give short kneads over an extended rising period.  Lahey goes for a very highly hydrated dough; most of his recipes are 75% (baker’s percentage), whereas most domestic bread recipes are 60 – 65%.  High hydration is desirable, as it gives a well textured end result, but a very wet dough is extremely hard to handle.  Given that handling of the dough is kept to an absolute minimum, this shouldn’t be a problem for the novice.
The next trick is an extended rising time, between 18 and 24 hours for most recipes.  This allows more flavour to develop.  Instead of giving a vague test like watching for doubling of the dough, or the time taken for a thumb dent to refill, Lahey’s test is to watch for bubble on the surface and a slight change of colouration of the dough: much easier to use to stop at the ideal time.  The next stage is tricky, shaping the loaf, as the dough is very loose and wet, but it works.
The final trick is to bake in a pre-heated cast iron pot – a dutch oven, in American terms, but a casserole works fine.  In fact, a ceramic casserole works just as well, but cast iron  is easier to handle.  The effect is to control humidity to give a better quality finish to the crust, something that is very hard to achieve without using a commercial bread oven (or hand built brick oven).  If your casserole has a plastic knob on the lid, it WILL burn at Lahey’s baking temperatures, and the smell isn’t pleasant (and is somewhat dangerous).  I would strongly advise using a pot with a metal knob/handle if at all possible, or simply removing your plastic knob.
All in all, this book is a good buy for bread bakers, novice and experienced alike.  The basic technique is the closest to fool-proof that I have ever come across, and the chapters of recipes are good – I particularly enjoyed the Pan co’Santi (walnut bread), and the sandwich recipes are excellent.  But these are well known techniques, just used in an entirely novel way.

There’s been a lot of buzz about Jim Lahey’s techniques over the last couple of years.  There’s no doubt that he’s a dedicated baker, and that his approach is worth considering; not least because it’s a set of simple rules that will give more consistent results, and good results, than a novice baker can hope to achieve without a lot of effort, practice, and guidance.

The book itself breaks down into three parts: the first section is the usual discussion of ingredients and inspirations, backed with the core no-knead recipe, with plenty of photographs of the stages to follow.  The second part is a series of chapters with different bread recipes, largely based around a loose connection with Italian bread baking, but as applied to the New York market – lots of sandwich breads, for instance, and “white pizza”.  The final part is a series of non-bread recipes to make Anerican-style deli sandwiches.  In some ways, this is the part of the book I like the best, although it’s not what you’d expect to find in here from the title or cover.

The central matter is the famous no knead recipe.  This turns out to be a combination of several well known “tricks”.  The first is that, as Dan Leppard has espoused for years, a well mixed dough will develop its gluten given time, without kneading, although Leppard prefers to give short kneads over an extended rising period.  Lahey goes for a very highly hydrated dough; most of his recipes are 75% (baker’s percentage), whereas most domestic bread recipes are 60 – 65%.  High hydration is desirable, as it gives a well textured end result, but a very wet dough is extremely hard to handle.  Given that handling of the dough is kept to an absolute minimum, this shouldn’t be a problem for the novice.

The next trick is an extended rising time, between 18 and 24 hours for most recipes.  This allows more flavour to develop.  Instead of giving a vague test like watching for doubling of the dough, or the time taken for a thumb dent to refill, Lahey’s test is to watch for bubble on the surface and a slight change of colouration of the dough: much easier to use to stop at the ideal time.  The next stage is tricky, shaping the loaf, as the dough is very loose and wet, but it works.

The final trick is to bake in a pre-heated cast iron pot – a dutch oven, in American terms, but a casserole works fine.  In fact, a ceramic casserole works just as well, but cast iron  is easier to handle.  The effect is to control humidity to give a better quality finish to the crust, something that is very hard to achieve without using a commercial bread oven (or hand built brick oven).  If your casserole has a plastic knob on the lid, it WILL burn at Lahey’s baking temperatures, and the smell isn’t pleasant (and is somewhat dangerous).  I would strongly advise using a pot with a metal knob/handle if at all possible, or simply removing your plastic knob.

All in all, this book is a good buy for bread bakers, novice and experienced alike.  The basic technique is the closest to fool-proof that I have ever come across, and the chapters of recipes are good – I particularly enjoyed the Pan co’Santi (walnut bread), and the sandwich recipes are excellent.  But these are well known techniques, just used in an entirely novel way.

Tagged , ,