Browsing Posts published by Duke

About an hour ago I came across a question on StackOverflow about a nice way of getting the variables from a URL like “http://domain.com/action.php?var1=100&variable2=true“. I don’t really need that feature but I always wanted to investigate the NSScanner Class and even though the hour is quite late, I saw this was my opportunity to do so. So I went on to create a class that, using the NSScanner would perform the task.

The usage is simple:

URLParser *parser = [[[URLParser alloc] initWithURLString:@"http://domain.com/action.php?var1=100&variable2=true"] autorelease];
NSString *var1 = [parser valueForVariable:@"var1"];
NSLog(@"%@", var);   //100
NSString *var2 = [parser valueForVariable:@"var2"];
NSLog(@"%@", var2);   //(null)
NSString *variable2 = [parser valueForVariable:@"variable2"];
NSLog(@"%@", variable2);   //true

You have a look at the class and how the NSScanner is used in the source files below.
URLParser.m URLParser.h

It’s been almost a week since the iPad has been announced and the internet has flooded with posts about it. Who are we to stay silent on such an event. So here’s what I think of the revolutionary tablet.

Not the best internet browsing device

for a number of reasons. Well the main one has to be it’s lack of support for Flash. Packing a 1GHz processor, it now gives Apple no excuse. The iPad could run the Flash player easily but it doesn’t for many reasons which have been mentioned by many others. And if the reasons should not concern the end users, the result must! How can they promote it as the best web experience when it can’t render millions of websites (including some very interesting ones), many great online games and of course most of the video on the web. According to Adobe’s CTO, Kevin Lynch, “75 percent of video on the Web currently is shown in a Flash player” [link]. And that is actually the first Flash Player penetration statistic I’ve heard that I believe. I actually believe it is an understatement. I would say more than 90% of useful video (think what kind of video you watch every day) on the web is shown in Flash Player. Even if we exclude YouTube from this, since it’s supported on Apple devices, that’s still almost all the video on the web that you can’t watch in the “best internet browsing device”.

Second is the lack of camera – for now. Well that certainly adds to the whole “web experience”. Video conferencing in Skype, is part of my every day computer life and I would need it on the iPad, especially since the device does not encourage a lot of typing.

Last but not least, is its inability to multitask. It made me sad and maybe angry during the presentation when I realized that the device everyone had been talking about is not a computer. Its just a 10” iPod Touch with all of its limitations except for processing power. How can I convince myself to buy something that has the power to be a computer but for some dark reasons chooses not to? For me personally, this is the second most serious drawback for the iPad, along with the fact that, like the iPhone, it’s a closed and controlled platform. More on that last part later.

Apple – iPad – The best way to experience the web, email, and photos” – At least I agree with the “photos” part.

It is amazing

overall. Tablets are not a new concept, but they where never something different. With the iPad, the whole tablet category finally makes sense. A tablet that is useful and different than any other computer. You can have it in portrait mode to read the news online, then you can flip it to landscape to watch a movie and do that for 10 hours according to Steve Jobs. You can interact with it in ways that we can’t imagine yet. The multi-touch interface on such a large screen will possibly bring a completely new way of human-computer interaction (even more than what the iPhone did). Not to mention the possibilities for new types of games or entertainment apps in general.

Moreover, I really believe this is the best device to show photos to others. The display looks amazing and the interface is so natural. Enjoying my photo collection and sharing it with others is probably one of the main reasons for me to buy an iPad.

Even though this first incarnation of the iPad might not seem too appealing to most people, I believe that its next generations (possibly with a larger screen) will redefine how most people use their computers.

But it is quite scary

to be honest. I really left the iPad’s greatest disadvantage for last – the fact that it is a closed platform. You buy a device that has the capabilities of a regular computer, but you are not allowed to use it as a computer. You are not given access to the file system, you can’t install apps without Apple’s approval, you can’t even plug a USB stick in it and transfer a file! You can only do things that are in Apple’s best interest.

Looking at this as an experienced user, I find it annoying and of course scary. At some level, I can’t understand how Apple can actually get away with doing something like this. On the iPhone it made sense. It’s a mobile device with limited capabilities and had to make best use of its limited resources. But how can Apple justify rejecting, say a Firefox app for the iPad? I just don’t think they will be allowed to do it. This is a computer with a 1GHz CPU we are talking about here and Apple should not be allowed to impose such limitations to the platform, as much as Microsoft is not allowed to prohibit its users from installing Firefox or Safari in their Windows computers.

Now, from a developer’s point of view, I just can’t see how people will want to develop for a platform where Apple alone gets to decide what is approved and what not. Where you have to conform to their rules and change your business strategy and your software itself just because it conflicts with their interests. The truth is, the iPhone and iPad platform is very interesting to develop for – they are amazing, evolving, location-aware devices with cool features like multi-touch and accelerometer. In many cases, it is also very rewarding too. But as a developer, how much do I want to invest in something the future of which depends completely on the policies of a single company?

The verdict

is that in my eyes, this version of the iPad is just and oversized iPod Touch. The limitations are unjustifiable and I only hope they will be lifted in the future generations of the device. I see great potential in such a device, so I hope that some other company will invest what it takes to create a product based on an open platform (Chrome for a multi-touch tablet?) that can provide me with an experience that, so far, only Apple products provide. With the help of some healthy competition, I hope the iPad will evolve to what it’s really made for – change the way we use PCs.

In your face, stupid!

No comments

TUAW had a post today about the new iTunes update. The biggest new feature of the update is that you can now save your password and purchase stuff with only one click. And the people over at TUAW rush to advise us fools to enable that feature asap and grace Apple with more downloads. I have highlighted these 2 sentences of amazing journalism below.

TUAW-ad

You are stupid. Thank you for reading.

It’s amazing when a big site like this shows its readers what it really thinks of them and what purposes it actually serves.

Τί πληρώνουμε για το internet και τι πληρώνουν οι πιο πολιτισμένοι:

τί πληρώνουμε

τί πληρώνουμε

So, the only (so to speak) button of my old iPhone doesn’t work. It has happened to many as it seems. And it happened to me too. To my iPhone 2G. The most common cause seems to be humidity, even though my phone was never directly exposed to large amounts (i.e never submerged :P ) the warranty seems not to cover it! Getting past this (quite outrageous) fact, I needed to find a way to bypass this problem of not having a home button. So I jailbroke my iPhone and installed SBSettings, a very handy utility that can be found on Icy and Cydia. It is something like a replacement to BossPrefs, for those familiar with that. What makes this utility really handy is the fact that you can launch it just by swiping your finger across the status bar of your phone!

SBSettings
continue reading…

After trying to submit the new version of Stop for a whole day (and night), I finally managed to do so yesterday. iTunesConnect was very unresponsive and every attempt to change any content resulted to a timeout.
In any case, now Stop 1.1 is waiting for approval even thought it will be hard to get it. The new version adds the option to have Stop automatically shutdown after the music is paused. This way you save even more battery and you don’t have to quit it yourself when you unlock your iPhone/iPod.

Here’s a little screenshot of the updated interface:

notice the switch on the top

notice the switch on the top

Icon

If you are an iPhone user and one of those people that enjoy listening to some music when going to bed, I know you’ll be glad to hear about Stop.
Stop is an iPhone/iPod utility app that gives us the ability to schedule the music to stop/pause whenever we want. So you won’t be wasting any battery nor will you hear the music in the morning when you wake up!

Stop is now on the AppStore and a new version will be submitted soon that will allow the user to choose to have Stop quit automatically when the music is stopped! Let’s just hope Apple will approve of such a feature :)

Have a look and download it here!

This is what Apple didn’t like in Stop’s first submission.
Icon
This icon was rejected by Apple because it contains a trademark of theirs (kind of)… I actually saw that coming but I thought i’d give it a chance :P

Lego iPhone Docks

No comments

A lovely day at the office… Kanish’s and Sergio’s hard work finally paid off. We managed to make Engadget look like noobs
:)


If your iPhone/iPod touch app should play short sounds, the quickest way to do this is to play them as SystemSounds.

AudioServicesPlaySystemSound(someSoundID);

However, if you try to try to change the volume of the app on the device you will notice that the device does not have it’s own volume, but rather it’s using the device’s ringer volume. So when the users try to change the volume of the app, they actually change the volume of their ringer…

If you just figured that out after you built most of your app and don’t want to redesign the way you are playing sounds, you can use the following fix/hack to give your app it’s own volume.

You have to import the AVFoundation framework and in an object that stays loaded the whole time your app runs (or view, or the app delegate) you have initialize an AVAudioPlayer, give it a file to play and set it to “prepareToPlay” it… While this player is prepared to play the file (which should be the whole time your application is running) you have your very own volume for the app!

If you want the specifics, in the header file:

#import 

@interface MainViewController : UIViewController {
    AVAudioPlayer *volumeOverridePlayer;
}

@property (nonatomic, retain) AVAudioPlayer *volumeOverridePlayer;

In the implementation file:

    @synthesize volumeOverridePlayer;

- (void)viewDidLoad
{
    [super viewDidLoad];

    volumeOverridePlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL URLWithString:[[NSBundle mainBundle] pathForResource:@"something" ofType:@"caf"]] error:nil];
    [volumeOverridePlayer prepareToPlay];
//...
}

Just keep in mind that if you run another AV player instance (even a MoviePlayer) then after it’s done you have to reset the player to “prepareToPlay” to keep the volume override.

Today I woke up to a very short but nice email. I paste the contents below:

http://www.webbyawards.com/webbys/current.php?season=13#webby_entry_netart

… which, in short, means that we got a Webby Award for dreamgrove.org in the category of NetArt!
We didn’t get the People’s Voice Award but thanks to all who voted for us!

Webby Awards logo

Dreamgrove was also given another award earlier this month, an EBGE (or EVGE – Greek: ΕΒΓΕ: Ελληνικά Βραβεία Γραφιστικής και Εικονογράφησης – English: Greek Awards for Graphics and Illustration) Award in the General category of Interactive Applications.