subscribe via RSS
Ten seconds. That’s how much time your app has to make a first impression. I just made this number up, but I don’t believe that it’s any less or much more – certainly not 30 seconds or even a minute.
Write ugly code. Use two-char variable names like
xy, ignore retain cycles, block the main thread.
This blog is managed using Jekyll, an awesome, ruby-based static site generator. I like ruby and the idea of not having to manage a database for some static content, so the choice was easy to make. One thing that’s missing though was support for retina images. So I built a tiny plugin that gets the job done. Turns out that plugins for Jekyll are something very, very simple. My plugin just converts (using ImageMagick) a source image into two resolutions, one for retina with the
@2x-qualifier and a regular one. It looks like this:
```ruby Jekyll::Hooks.register :site, :post_render do |post| Dir[”./img/original/”].each do |x| file = File.new(x) name = File.basename(x, “.”) ext = File.extname(x)
When I was talking about behavioral patterns yesterday, I was just getting started. While the strategy pattern is great in some situations, the state pattern is useful in almost all situations where there is state.
I recently had a short twitter conversation with Peter Steinberger about design patterns in the iOS world. My stance was that most real world apps suffer from too little software design rather than too much. I have seen a lot of projects from big and small companies – and while structural and creational design patterns are used implicitly and often unknowingly by the developers – such as adapters to encapsulate network transactions or the infamous singleton to create a globally shared instance of an object. Behavioral patterns are rarely, if at all, used in the mobile world. I think that’s sad because they provide a simple, readable and testable way to encapsulate functionality.