alexbrie . com

BlackBerry PlayBook review

Updated: I totally forgot to mention Flash capability in the browser – it’s great. Sure, I would have liked Flash to be a thing of the past, but it’s not and having it working properly on a tablet is neat. I tested it with vplay.ro (sort of a youtube/hulu pirate clone) and trilulilu.ro (also a youtube/spotify clone) and it worked fine. Now back to the story.


Last summer I had played with Android development, coding a small free quiz app. Since Google is too lazy or unwilling to let Romanian developers distribute paid apps in the Android Market, that app could only be monetized by Admob – and has brought, therefore, a total revenue of 35 US cents in over 7 months.
Back in February I learned about BlackBerry’s awesome marketing gimmick – to give a free PlayBook to each developer who submitted a PlayBook app to BlackBerry’s app store, before a deadline. It was the second take of a similar previous offer of theirs, only this time with a twist – because of the Android Player built in the new PlayBook OS 2.0, one could actually submit existing Android apps.
Porting my quiz app to PlayBook and submitting it to AppWorld took around 5 hours, including testing it in the provided PlayBook simulator, changing the UI to make it more visually appealing and creating the marketing material.
The tablet arrived a few weeks later, delivered to my door by FedEx, all expenses paid. I’ve been playing with it occasionally for the past 3 weeks, whenever my new iPad was otherwise busy. It’s now time for a review.
Read the rest of this entry »

iPad review, briefly

Because I am still working hard recoding one of my most important apps, and hoping I’ll be ready in a week or two, I won’t do a iOS development post just yet. Instead, I am going to take my turn reviewing the new iPad, in the shortest manner possible:

When did I get it?
As promised by Apple, on the 23rd of March. It was a shock for everyone that Apple really kept their word on the international release date – unlike their previous device launches, there were indeed enough iPads in stock to make sure early risers could get one.

How much did it cost?
Although there is no official Apple store in this small part of Europe, prices at authorized Apple sellers had been set up by Apple – the 16GB Wifi cost 2199 RON, which is 501 Euros, which is 668 USD. Significantly more than in the US, but a comparable price with the rest of EU prices (12euros more, probably due to VAT difference). This is the first time Apple does this, and I hope it won’t be the last – I’m sick and tired of Romanian prices for Apple products being 30-50% more than elsewhere.

Which model did I buy?
I had initially wanted to get a 4G one with a larger capacity, aiming to turn it into my main mobile device. But eventually I chickened out and went for the cheapest version I could get, justifying the purchase as an investment – I do need the latest iOS devices at hand, if I am to develop apps for them. I also hope that future versions will add better battery life on top of the extraordinary screen.
Read the rest of this entry »

Nothing much to blog about

Two weeks ago I didn’t write anything for my #idevblogaday entry. There were two non-reasons for that: for starters, it had been my birthday and I thought I deserved a “break”. For seconds, I didn’t know what to write about, as I hadn’t been doing much coding progress, nor discovered any new programming tips.

The problem is, I was just about to do it again. No birthday, this time, but still nothing much to write about.

I’ve been a bit out of shape this year. The two new apps I launched in January and beginning of February were commercial failures, although IMHO they were interesting, polished and quite reasonably priced(one was free, another was $1). Want to know their names? QuickPins and TinyJournal . Quite the demotivator to see that the app that you’ve worked for for weeks and thought is worth thousands if not more, is not even selling one coffee cup per day. It happens, nothing to feel bad about.

I’ve also been keeping busy learning more about visual representations, learning a bit more of OpenGL and toying with the Processing programming environment, which I find to be a quite interesting prototyping tool for visual apps. Sure, what I’d actually love for prototyping would be an interactive instant-result IDE such as the one that Bret Victor was displaying in his now famous CUSEC 2012 talk. Needless to say, his video changed quite a lot the way I feel about programming and made me realize that I’ve been doing it wrong  - and that I need a new tool – too bad it doesn’t exist, for me at least.

Anyways, that’s about it for my programming life lately. Like I said, nothing much happened in the last month. I very much hope things will be different in the next fortnight.

Life without an iPhone

Like everyone else, when I saw the iPhone shown by Steve Jobs on stage back in January 2007, I realized it would change everything. I just had no idea how much it would change me – I’d earn my living creating apps for it, I’d surround myself with Apple-made gadgets and services and, most importantly, I’d never leave home without it.
Read the rest of this entry »

A few recipes about dates / using NSDate

The app I’ve been working lately makes a bit more use of NSDate than my usual ones. I thought I’d share with the world a few pieces of code I’ve been using;

How to test if two NSDate dates belong to the same day:

I created a category on NSDate and added the following method to it:

-(BOOL)isSameDay:(NSDate *) otherDate
{
    unsigned unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit |  NSDayCalendarUnit;
    NSDateComponents *comps_self = [[NSCalendar currentCalendar] components:unitFlags fromDate:self];
    NSDateComponents *comps_other = [[NSCalendar currentCalendar] components:unitFlags fromDate:otherDate];

    if ([comps_self day]==[comps_other day] &&
        [comps_self month]==[comps_other month] &&
        [comps_self year]==[comps_other year]) {
        return YES;
    }
    return NO;
}

I can now call [mydate isSameDay:otherdate]

Find out the first and last days in the month that contains a given date

-(void) updateMonthIntervalForDate:(NSDate*)date{
    unsigned unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit |  NSDayCalendarUnit;
    NSDateComponents* dc = [[NSCalendar currentCalendar] components:unitFlags fromDate:date];
    dc.day=1;
    NSDate* startOfMonth = [[NSCalendar currentCalendar] dateFromComponents:dc];
    NSDateComponents *offsetComponents = [[NSDateComponents alloc] init];
    offsetComponents.month=1;
    NSDate* endOfMonth = [[NSCalendar currentCalendar] dateByAddingComponents:offsetComponents toDate:self.startVisibleDate options:0];
    // ... do whatever you want with startOfMonth and endOfMonth
}

Last but not the least, print out nicely Print out the full name of the month, or the abridged name

First of all, create a NSDateFormatter; the docs says it’s not inexpensive, so if you need it several times, try and reuse it instead of recreating it over and over again.

    dateFormatter = [[NSDateFormatter alloc] init];

Next, decide the date format you want to output

Abridged version (like 01 Jan)
    [dateFormatter setDateFormat:@"dd MMM"];
Full month name (January)
    [dateFormatter setDateFormat:@"MMMM"];

Sure, this is in the docs as well, but I did quite a bit of searches to find out the part about MMMM for the full NSDate month name. So maybe it will help someone.

Once you have the date formatter ready, you can invoke it to get the nice string from your NSDate:

     NSString* mystring = [[dateFormatter stringFromDate:crtEntry.date] uppercaseString];

This was it. I wish you happy coding.

.. And a New Year

XMas is gone, New Year’s is gone, the holidays are over and I am back to work. Same old stuff. Like Dilbert says,  there shouldn’t be anything special about a  random point in the space-time continuum.

But there is something special. Each new year is the perfect reminder that time flies and we should do something with our lives.. something more than merely living them. It’s also the perfect moment to look back, draw the line and have some accounting done – what we did this past year, how it fared compared to the previous ones and, most importantly, what we expect from the future.

For me, the past year was the year of Clean Writer. First Clean Writer for Mac, then Clean Writer Pro for Mac, and at the last minute Clean Writer for iPad 2.0 . There were also major updates to Self Help Classics and Business Inspiration Classics, and a few other minor apps (like SideTodo for Mac and some simple iOS apps  that nobody cares about). I finally started my own company – Cognitive Bits, lost months negotiating business contracts which failed at the last moment, lost some more months developing products that I couldn’t possibly sell. I started a google group for Bucharest iOS & Android devs and organized a few meetups, met some really nice iOS devs at the London Tech Talk and learned a few very important lessons that I will list below.

1. If you like what you’re doing, keep doing it.

I won’t go into much details here. Bottom line is, I love what I am doing as a job(working on my own apps and projects) and I hope I’ll be able to keep doing it. I don’t like working for clients, so I hope I won’t be forced to do it.

2. Learn from the source.

Stackoverflow is great, and so are developer forums around the web. But I should rely more on Apple’s docs, the WWDC videos and iOS development books. Don’t waste time learning from bad teachers when you have access to the best ones.

3. Motivation comes from like-minded people

Meeting other iOS devs from the UK or Bucharest and listening to their success stories was the most energizing thing that could have happened to me in the past year. I hope 2012 will harvest the results of this newly found motivation.

4. Inspiration comes from non-like-minded people

I think that good ideas come from the interaction of people with different interests (you know, Art vs Technology kind of stuff). Sure, some believe their ideas are golden – “I have a great app idea, you implement it and we split the revenue“; I learned to avoid them politely(as in “sorry, I’m a bit swamped right now, maybe we’ll do this later“). But overall, talking to others is a great thing and it gives you new insights and ideas. Use this.

5. Last, but not least: Polish your app

Great ideas with no polish have little chance of being successful. Great polish with no decent idea … that’s not great either. Bottom line: don’t throw away the effort you have put into developing your app, only because you didn’t take a bit more time to polish it. Yep, this comes from my own experience.

 

I want the above five to be my guidelines for 2012, and I hope that these insights will help this year to be significantly more successful than the previous.

Adjusting UITextView size on Keyboard show/hide events, for iOS5

The time has come to, once again, blog over here as part of #idevblogaday.

Remember the project I was telling you last time? I can reveal it now, as it’s been on the AppStore for a while now – Clean Writer for iPad, 2.0, a fully recoded, feature rich redesigned version of my quite popular iPad plain-text editor for writers.

One thing that plagued the previous version was how the keyboard would cover up the text entry textview. I had tried to fix it by automatically adjusting the text view size, but there were always problems.

I ended up with a fix based on a recipe from Pragmatic Programmer’s iPad Programming book.

Read the rest of this entry »

UITextView, Apple quirks and cutting one’s losses

I’m in the middle of a project which excites me a lot, especially because I want to have it finished in the next couple of days, so that with a bit of luck the app would go live to the appstore before December 22 (the dreaded date when iTunesConnect will shut down for an entire week). I’ve only had 3.5 hours of sleep last night, and about 5 the night before.

One of the things I was doing at 5AM in the morning was trying to find the current point location of the cursor inside a UITextView (iOS 4.3+ or even 5.0 – whichever works).

I couldn’t.

Now, it’s not unusual to not be able to do things in iOS. What is unusual is that Apple’s docs said I should have been able to.

Let me explain. See, UITextView, according to the documentation, conforms to UITextInput protocol. UITextInput protocol, according to the documentation, has a required property selectedTextRange that gives “the range of the selected text in a document” and, in particular, the caret(insertion-point). It should be straightforward.  (PS. do not mistake selectedTextRange for selectedRange which returns just the range of the selection inside the text string.

To my frustration and despair, it didn’t work. My code would crash again and again complaining that selectedTextRange is an unrecognized selector. Even more frustrating, Google doesn’t offer any clue (except for one stackoverflow question and the fact that people enjoy giving stupid answers although they don’t understand the question). Or that others don’t think it’s possible.

So I gave up implementing what I wanted, cut my losses and moved on to implementing some other features. But if you have any idea about a decent way to achieve this (and, no, I don’t really want to use a custom 3rd party uitextview clone just to be able to know the CGPoint position of the cursor), I’d greatly appreciate your input.

Until then, ain’t it weird that a required property in a required protocol doesn’t seem to be  fully implemented in Apple’s one of the most important core UI objects?

Quick introduction to Grand Central Dispatch and why you should use it

Hello idevs! Time sure flew by lately, so here I am, once more having to post one of my development adventures, forced by the unwritten agreement I took when joining the iDevBlogADay project.

As any programmer can tell you, in most (over 95%) of your programming tasks you won’t have to deal with threads or any form of asynchronous programming. Chances are you will never need to deal with this, in most programming jobs. However, in iOS world, you have to. And unless people scare you upfront by pushing big words like threads and asynchronous programming, you should totally spend 5 minutes to at least grasp the big picture.

Read the rest of this entry »

What I learned from TechTalk 2011, London

I guess it's my time again for #idevblogaday. I'll keep this post short, as I'm still struggling with a bug that prevents me from submitting Clean Writer Pro.

At the beginning of this week I was at Apple's iOS5 TechTalk in London. It was great. Apart from the rare opportunity of meeting great iOS developers from around the world(I met awesome guys from UK, Vietnam, Germany, Canada, Romania and more), the talks day also brought me a (hopefully long-lasting) inspiration and motivation. In particular, there are three most important things I came back with:

  • Try to create innovative, distruptive and industry-changing apps. Second best is to make them awesome and distinctive.
  • Don't get stuck in the past. Although it's obviously cool to support old devices/OS versions, it's most often not worth the effort. Aim to use latest tech for the latest devices, as they are the most popular (of the 250 million total iOS devices, 50% have been sold in the past year – that's one huge market)
  • Go international & localize. There are lots of non-US iOS owners.

Two less important but still interesting things I learned:

  • Always try to learn. Past WWDC videos and iOS video tutorials on iTunesU are way worth the effort to download and study.
  • There's no such thing as a small niche. It all depends on the app and your marketing plan.

3+2 ideas. That's it. But they were totally worth the trip. Talk to you later.

Hi! I'm Alex Brie - developer, blogger, digerati, micro entrepreneur. I created tens of iOS & Mac apps including: Self Help Classics, Clean Writer minimalist editor(for Mac&iPad), the TouchBooksReader ebook framework and many more. I run my own company, , a tiny passionate app studio.

If you prefer email subscription:

Enter your email address:

Delivered by FeedBurner