8 months with Texture (a.k.a. AsyncDisplayKit)

I have to admit that I love React & React Native. I began using React in 2014, and React Native in 2016. I loved RN not because of its cross-platform mechanics, but for its pragmatic approach when designing user interfaces and its ability to componentize a screen. A component can have its own state, and if the state is mutated the user interface depending on this exact state will re-render to reflect the new values.

It speeds up development and also makes the developer to avoid bugs with states not reflecting the values. The majority of my time is spent developing native apps, for which I had been trying to find an equivalent to React Native in terms of practices, to no avail. Until I stumbled upon AsyncDisplayKit (now named “Texture”).

I though I should share my experience so far.

Continue reading

R.I.P. iGreekNews part 2

In an unexpected turn of events, I was forced to take down iGreekNews. In short, Apple didn’t like that iGreekNews consults RSS feeds from various sources. I find it strange, considering that the purpose of RSS is to be free, and it is a means of communicating with news sources.

In any case, I cannot continue supporting it or try to mess with lawyers in order to gather any evidence that Apple may require. My full day job doesn’t leave me enough time to do that.

Continue reading

Vuforia SDK + remote video streaming on iOS

I recently have undertaken a project on iOS that requires integration with the Vuforia SDK. It’s an augmented reality proprietary framework, built for iOS and Android and has been very popular due to its innovative recognition library. One of the coolest demos that are appealing to advertisers or people looking to incorporate commercial campaigns inside their applications concerns the ability to play a video on top of a target. Vuforia even provides a sample application for that. However,  remote video streaming on texture does not work on textures.

This is a long standing issue, with people on the forums asking for a solution, some providing either free solutions which are outdated and / or non-performant, or paid solutions that are very expensive.

Continue reading

A few thoughts on Parallelism

It’s been a while. I am very sure many people experienced connectivity issues to my server. I believe these issues have been resolved. While searching in my old archives, I stumbled across an essay that I had written as a small part of a bigger exam in the university in France, a while ago. It seemed like an interesting read. It concerns parallelism, how it affects development, and also includes a few thoughts about Automatic Parallelisation.

Continue reading

Country border highlighting with Leaflet.js

Not too long ago I finished a project on Big Data for the University. One part of this huge project was the implementation of a dynamics map that would be responsive to mouse hover and mouse click. When the mouse would hover over a country, the whole country borders would be highlighted in the map, and if the user clicked inside those borders, we would display tons of interesting data using D3.js.

For map displaying and operations on Google Style maps, look no further than Leaflet.js.

All examples I found on the Internet would either not provide proper callbacks, or would not provide these features for the entire world map. Providing callbacks for a world map is extremely difficult in terms of performance optimisation, for reasons that will be explained below. For now, let’s briefly explain how it works.

Continue reading

Working on Big Data…

Doing a project on Big Data. It’s the first time that I realise that data visualisation is not a gimmick but actually helps one to process data with naked eye just with a glimpse. This screenshot is taken using MATLAB. X axis shows the index of a venue that I have loaded into an array. The Y axis shows an index of a timestamp, also loaded in memory. The Z axis shows how many people have visited this place.

 

When something is ready, I will publish it here.

Code updates

I have taken some time to update my GitHub repository, who has been lonely as of date. While developing code for my projects at the university, I came to realise that much of this code could prove useful to others.

CSPopViewService

First thing I did was to update the pop service for iOS library. The library is constructed to work with Chris Miles’ excellent CMPopTipView library, and improve automatisation of the appearance and disappearance of the pop tip views. The need for this came from the time I needed to construct a live demo with functionality from the application, so we needed to present and dismiss pop tip views automatically and at arbitrary time intervals.

Consider this code, taken from CSPopViewService.h

And here is how it is actually used:

This will have the following effect:

  1. It will present the ‘pop’ object pointing at the first bar item 2 seconds after the command is given.
  2. It will present the ‘pop2’ object pointing at the second bar item 1 second after the ‘pop’ item will appear.
  3. It will present the ‘pop3’ object pointing at the second bar item 2 seconds after the ‘pop2’ item appears. The other 2 pop items will be dismissed when ‘pop3’ appears.

That way, you can make presentation or tutorials within your application. You will not need to worry about threading or timers, since all timers can be cleaned up using the -stopAllTimers function. The best place for this function is the -viewWillDisappear function inside your view controller.

Sequential Reader – seqreader

Sequential Reader is a (little for the time being) file reader that I made, aimed at facilitating parsing files. I wanted a system that is fast and memory efficient, and can parse a file line by line. I had some line-by-line parsing to do in a HUGE file, to complete a project for the university. Turns out that many people had the same request as me, as Apple did not provide an easy way to do that.

Anyway, CSFileReader was created for this purpose. Just instantiate the reader with the file path, its encoding, and then assign a delegate to it. While parsing, the file will send you callbacks through the delegate functions, with the line that was read in NSString format.

I will have to invest some more time to these libraries to make them more mature. I will also have to create a new repository for CSWatchDog, a nice simple wrapper around GCD timers, aimed at facilitating working with events about to be fired after a few seconds. More on this, and updated code, soon.

GCD, NSOperation and Core Data/ Files on disk

Core data is fast, even on iOS, where handheld devices lack in speed when compared to desktop computers. However, there will be times where you will be required to do some heavy reading, wether that will be plain files from disk or information stored in Core Data. In my case, I initially tried to load too much data from a Core Data database using GCD, resulting in deadlocks, and later, I tried that using NSOperation. To save many people from frustration, I thought I should post my experiences and some general guidelines here.

Continue reading

Hello World!

Welcome in the new blog component, which will reside in the main site from now on. Perhaps this will save time and confusion to users that were sometime lost when navigating through the site and its different sections.

Let me tell you about something I encountered when reading about my diplomatic essay. My diplomatic essay concerns Theo Jansen’s mechanism and leg systems, and the way Theo Jansen was able to make the things he did.

Continue reading

Thoughts on Singletons

There are sometimes where some things keep bugging me in terms of programming. I often keep asking myself and others about utilizing the best techniques to solve various programming problems and applying certain concepts in a program.

Most answers I keep reading/hearing tend towards the “wow” factor. Which is something like “I don’t know exactly why, but it would be cooler if you did it like this”. I don’t usually listen to any recommendation regarding programming practices if it isn’t backed up by strong arguments as to how it may affect me in the long or short term as far as my projects are concerned. As programming languages are evolving, so do practices utilizing those languages, and often, as good programmers as we may be, we may sometimes find ourselves lagging behind others who may be less experienced, but better listeners.

Let’s face it. Many of us have utilized a not-so-well-thought technique in favor of completing a task within a certain amount of time. In other words, we have all sacrificed the chance to use good programming practices in need of being “faster”. Usually, this results in usable code, that may be improved in later versions. Less often, this isn’t the case.

As far as programming practices go, there are few of them that have received as much love and hate as Singletons.

Continue reading

Installing Portable Dynamic (And Static) Libraries On OS X

Last Update: 07-02-2009

I recently decided to install portable Libraries on my Mac, a procedure that has never been proven easy for me for the past years. In order to port my programs from one platform to another, I must have downloaded portable libraries that exist in all platforms, such as PCRE (perl compatible regular expressions library for C and C++).

The problem is that when I try to install the libraries, I mostly encounter errors and problems during compilation while using the “make” tool of UNIX. This is due to the developers not being careful to handle all different system versions. Even when I did manage to install the necessary libraries, I couldn’t find a way to make them work with Xcode.

So what do you do when you need to install a portable Library and use it with Xcode?

Continue reading