Cocoapods is a dependency manager for Mac and iOS projects built on Ruby and based on the Ruby community’s “rubygem bundler”. Each “pod” has a “spec” that is utilized in order to know how to integrate a given component with your project and resolve any dependencies your project may have with other libraries. An introduction [...]
Cocoapods is a dependency manager for Mac and iOS projects built on Ruby and based on the Ruby community’s “rubygem bundler”. Each “pod” has a “spec” that is utilized in order to know how to integrate a given component with your project and resolve any dependencies your project may have with other libraries.
An introduction to cocoapods can be found here
http://nsscreencast.com/episodes/5-cocoapods
http://nsscreencast.com/episodes/28-creating-a-cocoapod
Also check the blog of Ray Wenderlich
http://www.raywenderlich.com/12139/introduction-to-cocoapods
What is a Spec?
The basis behind how cocoapods is able to function is on a project’s “podspec”. Podspecs are created by maintainers of a project (or sometimes just other developers who want to use a component as a pod) and submitted to a public repository of specs in an organized git repository on github.
Specs identify everything about a library or component that needs to be performed before you can properly use it in your project. This includes everything from supported platform, ARC-readiness and required frameworks to other C flags that might need to be switched on.
Semantic Versioning
Cocoapods highly suggests using semantic versioning to version your cocoapods. Without semantic versioning, it becomes much more difficult if not impossible to resolve some cross-dependencies between similar pod dependencies in your project, if any exist. All that was very complicated to say – use semantic versioning (e.g. “v1.1.0”). Tag your code in your repository with a tag corresponding to the version number of your component (for v3.0.0 of your component, tag your code 3.0.0).
In addition to unit testing the individual components that make up your Android application (such as activities, services, and content providers), it is also important that you test the behavior of your application’s user interface (UI) when it is running on a device. UI testing ensures that your application returns the correct UI output in [...]
In addition to unit testing the individual components that make up your Android application (such as activities, services, and content providers), it is also important that you test the behavior of your application’s user interface (UI) when it is running on a device. UI testing ensures that your application returns the correct UI output in response to a sequence of user actions on a device, such as entering keyboard input or pressing toolbars, menus, dialogs, images, and other UI controls.
Functional or black-box UI testing does not require testers to know the internal implementation details of the app, only its expected output when a user performs a specific action or enters a specific input. This approach allows for better separation of development and testing roles in your organization.
One common approach to UI testing is to run tests manually and verify that the app is behaving as expected. However, this approach can be time-consuming, tedious, and error-prone. A more efficient and reliable approach is to automate the UI testing with a software testing framework. Automated testing involves creating programs to perform testing tasks (test cases) to cover specific usage scenarios, and then using the testing framework to run the test cases automatically and in a repeatable manner.
Categories are one of the most useful features of Objective-C. Essentially, a category allows you to add methods to an existing class without subclassing it or needing to know any of the details of how it’s implemented. This is particularly useful because you can add methods to built-in objects. If you want to add a [...]
Categories are one of the most useful features of Objective-C. Essentially, a category allows you to add methods to an existing class without subclassing it or needing to know any of the details of how it’s implemented.
This is particularly useful because you can add methods to built-in objects. If you want to add a method to all instances of NSString in your application, you just add a category. There’s no need to get everything to use a custom subclass.
For example, if I wanted to add a method to NSString to determine if the contents is a URL, it would look like this:
#import <Cocoa/Cocoa.h> @interface NSString (Utilities) - (BOOL) isURL; @end |
This is very similar to a class declaration. The differences are that there is no super class listed, and there’s a name for the category in parenthesis. The name can be whatever you want, though it should communicate what the methods inside do.
Here’s the implementation. Keep in mind this is not a good implementation of URL detection. We’re just trying to get the concept of categories across:
#import "NSString-Utilities.h" @implementation NSString (Utilities) - (BOOL) isURL { if ( [self hasPrefix:@"http://"] ) return YES; else return NO; } @end |
Now you can use this method on any NSString. The following code will print “string1 is a URL” in the console:
NSString* string1 = @"http://www.jarchitects.be"; NSString* string2 = @"Jarchitects"; if ( [string1 isURL] ) NSLog (@"string1 is a URL"); if ( [string2 isURL] ) NSLog (@"string2 is a URL"); |
HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop. For more info Visit the AngularJS website Basic example <html ng-app="project"> <head> [...]
HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop.
For more info Visit the AngularJS website
Basic example
<html ng-app="project">
<head>
<script src="http://code.angularjs.org/angular-1.0.1.min.js"></script>
<script src="http://code.angularjs.org/angular-resource-1.0.1.min.js">
</script>
<script src="project.js"></script>
<script src="mongolab.js"></script>
</head>
<body>
<h2>JavaScript Projects</h2>
<div ng-view></div>
</body>
</html> |
Vandaag werd onze ‘VAA tax calculator’ gereleased in de apple APP-store. Met deze app krijgt u in een oogopslag zicht op de te betalen voordeel alle aard op uw bedrijfswagen. U krijgt ook dadelijk het verschil te zien met 2011 alsook de kost voor werkgever en werknemer worden duidelijk weergegeven. Deze app wordt u [...]
Vandaag werd onze ‘VAA tax calculator’ gereleased in de apple APP-store.
Met deze app krijgt u in een oogopslag zicht op de te betalen voordeel alle aard op uw bedrijfswagen. U krijgt ook dadelijk het verschil te zien met 2011 alsook de kost voor werkgever en werknemer worden duidelijk weergegeven.
Deze app wordt u gratis aangeboden door JArchitects en is nu beschikbaar voor iPhone en iPad
Nieuw in versie 1.1
Er wordt nu ook rekening gehouden met de leeftijd van de wagen voor de berekening van het voordeel alle aard. Volgens een recent wetsvoorstel zal de aankoopprijs met 6 procent per jaar dalen tot de bodemgrens van 70% bereikt is.
Tip #1 – Split Editor View Vertically If you like to have multiple code windows open at once, the Split Editor option is your friend (see the little square grid icon shown below). By default, the windows are split horizontally. If you prefer to view your code side-by-side (nice for comparing), here’s how to tell [...]
Tip #1 – Split Editor View Vertically
If you like to have multiple code windows open at once, the Split Editor option is your friend (see the little square grid icon shown below).
By default, the windows are split horizontally. If you prefer to view your code side-by-side (nice for comparing), here’s how to tell the split to be vertical

Hold down Option key when clicking the Split Window icon
Tip #2 – Comment Out a Block of Code
You can quickly comment out a block of code as follows:
- Select one or more lines of code to comment
- Command-/
To uncomment a block of code, repeat the steps above.
Tip #3 – Toggle Between .h and .m Files (aka Switch to Counterpart)
Within your current code window, you can swap between the .h and .m file as follows:
- Command-Option Up-Arrow
Tip #4 – Map Keys to Actions (Key Bindings)
The Switch to Counterpart tip above is a real time saver. However, I often find that if I map logical key-strokes to actions I’m much more likely to get into the habit of using them. For example, I mapped the Switch to Counterpart to Option-S, as in Swap or Switch.
Here’s how to set key bindings in Xcode
- From the Xcode menu choose Prefereces
- Select Key Bindings
- Click on one of the Actions in the list
- Tap on the Keys column on the right
- Enter the keystroke you want to map to the action
- Click Ok to save your change
Tip #5 – Jump to API Documentation
Showing relevant API documentation for anything within the SDK(s) is as simple as:
Option Double-Click on relevant code
Tip #6 – Traverse File History
As you open and edit various files, Xcode keeps a history list of your actions, not unlike when using a web-browser. You can move through the list using the directional arrows as shown below:
The keystoke equivalent for the above is:
- Option-Command Left-Arrow goto to previous file
- Option-Command Right-Arrow goto to next file
Tip #7 – Set a Bookmark
I can’t imagine coding without having the option to set a bookmark as a placeholder for what I’m working on. I do this regularly when I need to segue to another file to find a snippet or otherwise poke around outside the current file I’m working on.
Setting a bookmark is as simple as:
Control-D
Enter a name for the bookmark
Tip #8 – Jump to Bookmark
There are two options to jump to a bookmark. First, you can select the bookmark icon in the upper right corner of the Editor window.
You can bring up the same menu as shown in the above figure using this keystoke:
- Control-4
Tip #9 – Indent / Un-indent Code
You can indent a line of code or a selected block of code as follows:
Command-[ move code left
Command-] move code right
The above works regardless of where you are in a line of code, in other words, you don’t have to be at the beginning of the line.
Tip #10 – Zoom Editor
You can toggle between Detail view and Editor view by clicking the Editor button as shown here:
The keystroke equivalent of the above is:
- Shift-Command-E
As a developer, you probably already experienced the situation where database sessions are blocking each other. To give you an example: at my current client we are using Hudson for continuous integration. There are many (DbUnit) unit tests which are run during this build, and these are connecting against an Oracle XE machine. It happens [...]
As a developer, you probably already experienced the situation where database sessions are blocking each other.
To give you an example: at my current client we are using Hudson for continuous integration.
There are many (DbUnit) unit tests which are run during this build, and these are connecting against an Oracle XE machine.
It happens that developers are also running tests (e.g. for debugging purposes) against this database, sometimes causing a delay in the Hudson job because their session(s) is holding a lock on the database.
In these kind of situations, it can be extremely useful to quickly find out who is blocking who.
The Oracle v$lock table provides such information, but can be hard to read (you need to start comparing session id’s and so on…)
To make life easier, you can combine the results with the v$session table, and get user-friendly results:
SELECT s1.username || '@' || s1.machine || ' ( SID=' || s1.sid || ' ) is blocking ' || s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status FROM v$lock l1, v$session s1, v$lock l2, v$session s2 WHERE s1.sid=l1.sid AND s2.sid=l2.sid AND l1.BLOCK=1 AND l2.request > 0 AND l1.id1 = l2.id1 AND l2.id2 = l2.id2 ; |
This will give you something highly readable like this:
Developer1@machine1 (SID=143) is blocking oracleUser@hudson (SID=153)
Please note that for selecting data from the v$-tables in Oracle, you need to have DBA rights (e.g. connect as ‘SYS’ or ‘SYSTEM’ user).
In order to avoid writing the query every single time you need to find out who is blocking who, you can create a view based upon this.
You can also give developers select rights on this view, so anyone can access the valuable information.
This post was based on a post from Natalka Roshak’s blog, and has been very helpful to me.
Also this year our JArchitects team was present at the Devoxx conference in Antwerp. Some of my notes: New in Java 7 The diamond operator facilitates usage of generics (project coin) new try-with-resources syntax (project coin) Usage of String in switch statement (project coin) Simplified Varargs Method Invocation (project coin) Language support for Collections (project [...]
Also this year our JArchitects team was present at the Devoxx conference in Antwerp.
Some of my notes:
New in Java 7
- The diamond operator facilitates usage of generics (project coin)
- new try-with-resources syntax (project coin)
- Usage of String in switch statement (project coin)
- Simplified Varargs Method Invocation (project coin)
- Language support for Collections (project coin)
- underscores in numeric literals (project coin)
- Project Lambda
- Modularization (Project Jigsaw)
Language support for Collections
Listlist = ["item"]; String item = list[0]; Set set = {"item"}; Map map = {"key" : 1}; int value = map["key"];
Automatic resource management
Annoyed to have verbose code because of try / catch statement. i love this one.
try (BufferedReader br = new BufferedReader(new FileReader(path)) {
return br.readLine();
}
Underscores in numeric literals
int billion = 1_000_000_000;
String in switch
Nothing to explain about this:
String availability = "available";
switch(availability) {
case "available":
//code
break;
case "unavailable":
//code
break;
case "merged":
//code
default:
//code
break;
}
Project Lambda
aims to support programming in a multicore environment by adding closures and related features to the Java language. more info about closures can be found here http://blogs.oracle.com/mr/entry/closures
Project Jigsaw
The original goal of this Project was to design and implement a module system focused narrowly upon the goal of modularizing the JDK, and to apply that system to the JDK itself.
More info can be found here http://openjdk.java.net/projects/jigsaw/
Some impressions of devoxx:
A nice presentation was the performance comparison of most commonly used Java web frameworks.
They compared performance and memory usage of GWT, Spring MVC, JSF and Vaadin.
GWT was the big winner followed nearly by Spring MVC. JSF was the worst of all … Vaadin ended on the third position. Also in memory footprint GWT and Spring MVC were ahead of their pursuers Vaadin and JSF.
Here are some pictures showing the results
This will result in the following scaling (infrastructure) costs
Choosing the right technology for your project really can make the difference !
Today the KBC Banking Android and iOS apps are released successfully to the apple app store and the android market. Our company JArchitects was involved in the development process of those apps and we are really proud about the results. Supported devices -Apple Iphone 3G, 3GS, 4 -Apple iPad 1 & 2 -Android phones with [...]
Today the KBC Banking Android and iOS apps are released successfully to the apple app store and the android market.
Our company JArchitects was involved in the development process of those apps and we are really proud about the results.
Supported devices
-Apple Iphone 3G, 3GS, 4
-Apple iPad 1 & 2
-Android phones with android 1.6 or higher
More on http://www.kbc.be/mobile
Begin september we organized an android workshop in the center of Brussels. During this workshop we had an overview to the basic principles of android development and an exercise to build a simple birdspotter app. We covered the following topics: Overview of the android platform Activities and Intents GeoLocation to add a location of a [...]
Begin september we organized an android workshop in the center of Brussels. During this workshop we had an overview to the basic principles of android development and an exercise to build a simple birdspotter app. We covered the following topics:
- Overview of the android platform
- Activities and Intents
- GeoLocation to add a location of a spotted bird
- Camera, to add a picture of a spotted bird
- Form input widgets
- Layout managers
- …
Downloads:
slides: AndroidWorkshop_JArchitects
code: DemoWorkspace













