Bonto.ch

JB

Wundercast - a Web App Powered by a Raspberry PI

Can a Raspberry PI handle a basic web app?

This is a good question, at the moment I don’t really know, but I hope so, because I’ve a project in mind that would be good if made over a Raspberry PI.

I have to prove that a Raspberry can handle a mid-high amount of requests and, for this purpose I decided to build a small web app (that will come as soon as possible on iOS, Android and the newcomer Firefox OS) called Wundercast.

List of Useful Libraries for iOS Projects

Since the beginning, I used to surf the web looking for iOS libraries to help me when starting a new project.

In almost 5 years, I found out that a list of useful libraries sometimes saves me a lot of time.

Here you can find the current list of the libraries that I use to include when needed, divided by categories:

A Simple APN Server With Sinatra

In the last few days, I played a lot with APN servers to deal with push notifications for thirdy party apps and MDM. After a couple of days, during my spare time, I built a quick and basic APN server, based on Sinatra and Grocer gem… of course I’m talking about Ruby.

Log All Messages in Objective-C

Sometimes we really need to log all messages that are sent in our applications, for iOS or Mac OS. Unfortunately this is not really simply to do and Apple disabled some cool stuff in iOS to prevent a reverse engineer of their frameworks.

Why Windows 8 Could Fail and Apple Could Take Advantage

I’m using Windows Phone 7.5 since a couple of weeks and I feel like something is not clear to Microsoft. The system is good, not great, just good, but Android and iOS are in another dimension, mainly the second one that with Exchange works great, in opposition to Windows Phone, that has some problems with it (this is funny it would be like GMail not working on Android).

I have to say it, in first instance I was generally happy with Windows Phone, now I’m not anymore. There a lot of things that could be done better and even if I like the Metro style, I think it’s going to make things worse for common users.

The Goal Is Make Money, Not Innovate

I spent the 2011 in London, I really beautiful place to live, actually, I think it’s the place to be if you’re young, with high expectations and a valid worker (in any category). After this fantastic year I came back to Switzerland, a place where young guys are just “youngs”.

I tried to start a very interesting and innovative project for doctors and I faced some people working in the regional finance, of course, you always have to face them, soon or later. I just spoke for 5 minutes and then my mouth was shut down by a simple, but clear sentence: “The goal is not to innovate, but it’s make money”.

Well, I disagree.

Matias One - I Love It!

The first thing I thought when I saw the video about Matias One Slim for the first time was: this is a great idea!

So, after a couple of months I decided to order the Matias One Slim, for Mac, of course. The keyboard was sold out since months and new shipments were expected for late February. I ordered it from U.S.A. less than 10 days ago and my keyboard is now here (thanks to Swiss customs that slowed the shipment process, of course).

Generally, I’m a big fan of Apple keyboard, even the slim makes me feel really comfortable. Matias also produce a copy of the old Apple keyboard, the Matias Tactile Pro that I tested a couple of years ago and was simply amazing. One of the greatest mechanical keyboards I’ve ever tried, but this post is about the One Slim.

Windows Phone 7 First Impressions

I recently bought a Nokia Lumia 710 with Windows Phone 7.5 already installed on it and I have to say I’m happily impressed by the work done in Microsoft.

I use mainly Android and iOS in the last 3 years, so I can do a quick comparison with all these systems, but I’ll keep this post when I’ll have more complete point of view on Windows Phone. What I can do is a quick “first impression” article.

Core Data Auto Increment

Core Data is a very powerful entity framework, it’s something very useful that saves a lot of time while working with complex data schemas and persistence. Sadly there are still features that are missing, like and auto-increment option for a property of an entity.
Sometimes is very useful having an auto-increment property and one solution to do it is subclassing the method awakeFromInsert that is called each time a new entity is created and inserted.

So this is the code for the magic (using an order field and MagicalRecord):

- (void)awakeFromInsert
{
    NSInteger tempID = ([[[MyObject MR_findAllSortedBy:@"order" ascending:YES] lastObject] order])?[[[[MyObject MR_findAllSortedBy:@"order" ascending:YES] lastObject] order] intValue]+1:0;
    [self setOrder:[NSNumber numberWithInt:tempID++]];
    [super awakeFromInsert];
}

Quick explanation:
It’s mandatory retriving the highest value of order inside the database, once this has been done, we can increment this value by one and then set it to our new entity manually.
This process of course works even without MagicalRecord and needs a couple of more steps with NSFetchRequest, but nothing too complicate.

Import Contacts From iPhone to Simulator

I really hate the fact that the simulator comes without the auto-import of the address book library.

If you have a project that access the contact library is really a huge problem creating a decent fake library, it takes too much time. I found out a really nice solution to import the current data from the iPhone (or iPad) to the Simulator that I want to share. This solution works even if you’ve not a jailbroken phone. It’s quick and with zero risks.