Blogs

iOS WebDAV Library - Research

| 0 Comments| 0 TrackBacks

Since ObjectiveC was not (still isn't) my strong point, it is obvious the choice would be to use some pre-done framework/library to deal with WebDAV communication. After some searching, I landed on ConnectionKit, which is a framework used to handle multiple data exchange protocols. Settling on this, I tried to implement it only to find it doesn't want to compile for iOS, because it is using <Cocoa/Cocoa.h> instead of <UIKit/UIKit.h> header. I figured if I make the change over, it will work, it didn't; I figured if I hacked the code enough, it will work, it didn't; and I finally succumbed into joining the developer's mailing list, only to find in the second thread a conversation that kind of went like this:
User: Does this work for iOS?
Developer: No.
User: Are you going to make it work for iOS?
Developer: It is in plans for 2.0, but that's months away.

I don't have months to wait. FML.

I searched around some more and found WTClient library, which claims to work for iOS, so I downloaded that and tried that. Initially, it doesn't want to work, as it is tied to iOS 2.0, which is quite old. I changed it to build for iOS 4.0, updated framework pointers, and it compiles. I tried to download files, it complained about access denied, and I found out that it is looking for "HTTP/1.1 200 OK" instead of what the server was responding: "HTTP/1.1 200 Ok". So I made the change, and it still refused to download -- it says download complete, 0 of 0 bytes downloaded. At this point I decided maybe the library developer can fix this later, and moved on to try uploading, and it works. So I'm happy. Now I can just move on with uploading and take care of this a bit later.

TRON: What happened to Lora's "life's work"? - Life

| 0 Comments| 0 TrackBacks

In the origina TRON (1982) movie, minutes before Kevin Flynn entered the digital world for the first time, Lora mentioned something about her work:
Lora: "Remember, this laser is my life's work, so don't spill anything."
Tron-Old-Laser.png
Lora's Laser in 1982

Fast forward a little, towards the end of the original movie, as well as at the beginning of TRON Legacy (2010), Kevin Flynn is portrayed as the owner of Encom. Over these last few years, Lora is most probably still working on the same technology. We are also able to catch a glimpse of the laser in a newer state in the new movie.
Tron-New-Laser.png
Lora's Laser in 2010

Since Flynn was in control of the company, and he is good friends with her, there is no reason she would have stopped working on her laser. It is also a very useful piece of technology -- imagine in directions of teleportation (scan in at one location, scan out at the destination location) or infinite storage (scan in large objects into disk storage to save physical space). So why haven't anything come from this technology? Additionally, Lora was also not mentioned or shown in the new movie. What exactly happened to her, and her work? I hope this will be answered in the bonus features section of DVD!

dina vs Evernote - Research

| 0 Comments| 0 TrackBacks

Today, when I was reading Google Reader, Evernote appeared on my radar again... Some how, I've forgotten the cross-platform note taking software that I've used before. It appears that they've taken a step up on sharing and made things a little bit easier on the beta Mac client. I checked their iOS client out, and it offered a shockingly similar interface as what I have envisioned for dina.
IMG_0021.PNG

After much consideration and discussion with Rob, it was decided that although similar, the projects are still different enough to pursue. Few things to note are:

  • While Evernote is file centric, dina is group and task centric. We present information based on task, milestone, and groups, where as Evernote presents in a pseudo time line
  • Evernote provides "notebook" sharing, which in comparable terms, would be sharing entire project in dina. This is not always a good idea as professionals does not always share everything
  • Furthermore, full sharing (read and write access) is only available to paid accounts on Evernote
  • Professionals require version tracking; a feature Evernote does not offer such
  • Project files are stored in Evernote's proprietary repository, where as dina makes use of open standard, and dina users can setup their own dina repositories
  • Evernote does have the simplicity of note capturing down, we should learn from their UI and observe for things we can implement
  • Evernote does not have a persistent UI for computer; we will ultimately wish to implement some sort of UI built into applications (IE: a sidebar on MS Word, or a dashboard widget).

iOS Development - Research

| 0 Comments| 0 TrackBacks

Seems like development for dina mobile is underway at a decent rate. This is progress from yesterday:

iPhone_Interface.png

There are 3 more main screens (a bit more work) and 2 basic screens (should be fairly straight forward) to go. I expect to have at least the basic work flow identified by end of next week.

dinaDAV - Research

| 0 Comments| 0 TrackBacks

It occurred to me... If I want to target this at enterprise level, it should NOT require a full installation. That is, if people do not wish to use the full dina server, there shouldn't be a requirement for them to get the full installation. Many enterprises and institutions uses WebDAV (RFC 4918), an authoring and versioning protocol that is well established and popularly adopted. Mobile version of dina systems should take advantage of this. As such, I'm glad to introduce dinaDAV.

dinaDAV is the gateway in how dina will exchange files between clients (mobile and desktop; WebApp excluded) and server. All files communicated between dina server and dina client will go through dinaDAV protocol, an implementation of WebDAV. Instead of standard authentication or WebDAV exchange requests, dina clients will HTTP POST request with DINA parameter, with value of "DINA-PROBE". dina Server will respond with "WELCOME TO DINA SERVER" in the respond body on HTTP 200 code. If the dina client does not receive this response, client will proceed with normal WebDAV protocol, providing just files to the repository. If the dina client receives this response, client will proceed with dinaDAV protocol. dinaDAV protocol is standard WebDAV protocol, with one exception: ALL files exchanged are gzipped files with 2 components: the file itself, and ".metadata". ".metadata" is an XML document with dina specific properties, and provides information for dina server to collect additional meta data for files tracked within a dina project. Module developers wish to create module support for additional file types will be able to define their own meta data collection by creating their own .metadata schema, and parse them on dina server as desired.

Through this setup, we are able to integrate our system directly into pre-existing infrastructures, as well as offer a flexible, and extensible system for full installation and WebDAV installation users.

Rediscovering Appcelerator Titanium Developer - Research

| 0 Comments| 0 TrackBacks
I was chatting with a few undergrad friends of my, and they reminded me that there's this great SDK from Appcelerator called Titanium Developer. The idea is simple, you code your interface and behaviours in JavaScript, it translates the script to multiple platforms such as iPhone, Android, and iPad for you. I have since setup the software on my laptop, and am trying to get some simple applications going... after all, simple is what we need.

Smartpen on Transparency, IT WORKS! - Research

| 1 Comment| 0 TrackBacks
It prints (although it took forever, and gave me a panic attack thinking it may have melted in the printer)!
It writes (although it takes a bit of fancy tape work to make sure the underlying document stays in place)!
It traces!
But it does not wash off.

Now it'd be really cool to take the specs of the ink stick, make a replica of it which houses overhead transparency ink, and try that out.

This should lead to some fun implementations down the road...

Referring as a collaborative process - Research

| 0 Comments| 0 TrackBacks

Principal of Least Collaboration Effort; people will collaborate and work together if and only if the immediate perceived benefits out-weights the perceived effort required to achieve the said task. Further quotation and analysis are required.

@article{Clark19861,
title = "Referring as a collaborative process",
journal = "Cognition",
volume = "22",
number = "1",
pages = "1 - 39",
year = "1986",
note = "",
issn = "0010-0277",
doi = "DOI: 10.1016/0010-0277(86)90010-7",
url = "http://www.sciencedirect.com/science/article/B6T24-49SGXJP-7/2/abd7a47290dde2c2f5eb680babd9f2ba",
author = "Herbert H. Clark and Deanna Wilkes-Gibbs",
abstract = "
In conversation, speakers and addressees work together in the making of a definite reference. In the model we propose, the speaker initiates the process by presenting or inviting a noun phrase. Before going on to the next contribution, the participants, if necessary, repair, expand on, or replace the noun phrase in an iterative process until they reach a version they mutually accept. In doing so they try to minimize their joint effort. The preferred procedure is for the speaker to present a simple noun phrase and for the addressee to accept it by allowing the next contribution to begin. We describe a communication task in which pairs of people conversed about arranging complex figures and show how the proposed model accounts for many features of the references they produced. The model follows, we suggest, from the mutual responsibility that participants in conversation bear toward the understanding of each utterance."
}

Cognition in the Wild - Research

| 0 Comments| 0 TrackBacks
Hutchins suggests that we extend cognition to tools that we use. Quotation needed.
@book{citeulike:6870938,
 abstract = {Edwin Hutchins combines his background as an anthropologist and an open-ocean racing sailor and navigator in this account of how anthropological methods can be combined with cognitive theory to produce a new reading of cognitive science. His theoretical insights are grounded in an extended analysis of ship navigation - its computational basis, its historical roots, its social organization, and the details of its implementation in actual practice aboard large ships. The result is an unusual interdisciplinary approach to cognition in culturally constituted activities outside the laboratory - "in the wild.". Hutchins examines a set of phenomena that have fallen between the established disciplines of psychology and anthropology, bringing to light a new set of relationships between culture and cognition. The standard view is that culture affects the cognition of individuals. Hutchins argues instead that cultural activity systems have cognitive properties of their own that differ from the cognitive properties of the individuals who participate in them. Each action for bringing a large naval vessel into port, for example, is informed by culture; thus the navigation team can be seen as a cognitive and computational system. Introducing life in the Navy and work on the bridge, Hutchins makes a clear distinction between the cognitive properties of an individual and the cognitive properties of a system. In striking contrast to the usual laboratory tasks of research in cognitive science, he adopts David Marr's paradigm and applies the principal metaphor of cognitive science - cognition as computation - to the navigation task. After comparing modern Western navigation with the method practiced in Micronesia, Hutchins explores the computational and cognitive properties of systems that involve multiple individuals. He then turns to an analysis of learning or change in the organization of cognitive systems at several scales. Hutchins's conclusion illustrates the costs of ignoring the cultural nature of cognition and points to ways in which contemporary cognitive science can be transformed by new meanings and interpretations.},
 author = {Hutchins, Edwin},
 citeulike-article-id = {6870938},
 citeulike-linkout-0 = {http://www.worldcat.org/isbn/9780262082310},
 citeulike-linkout-1 = {http://books.google.com/books?vid=ISBN9780262082310},
 citeulike-linkout-2 = {http://www.amazon.com/gp/search?keywords=9780262082310\&index=books\&linkCode=qs},
 citeulike-linkout-3 = {http://www.librarything.com/isbn/9780262082310},
 citeulike-linkout-4 = {http://www.worldcat.org/oclc/30623468},
 isbn = {9780262082310},
 keywords = {distributed\_cognition, oi\_coursework},
 posted-at = {2010-05-16 18:34:56},
 priority = {0},
 publisher = {MIT Press},
 title = {Cognition in the wild},
 url = {http://www.worldcat.org/isbn/9780262082310},
 year = {1995}
}

Optimizing SmartOptimizer - Life

| 0 Comments| 0 TrackBacks

Sorry, couldn't wait until 1 year anniversary of last post...

I've been poking around with optimizing my sites' performance over the last few days, and found a real nice tool called SmartOptimizer. SmartOptimizer is acts as a middle-ware between your data and your webserver. When a request is made, .htaccess will pick up, and forward specific file(s) to the optimizer, particularly, images, css, and static HTMLs. This is useful because the optimizer can then compress them using gzip, cache the compressed file, add some http header information to help caching, and serve the compressed optimized file. However, using GTmetrix, I found out that some things are missing, so I decided to add some fixes.

GTmetrix suggested static content should send "Vary: Accept-Encoding" http header, because some public proxies will not cache things properly. And I've found the most effective way to add this is to add the said header in index.php like so:

Find in index.php:

PHP Code
header("Last-Modified: " . $mtimestr);
header("Cache-Control: must-revalidate");

And replace with:

PHP Code
header("Last-Modified: " . $mtimestr);
header("Vary: Accept-Encoding");
header("Cache-Control: must-revalidate");

Another recommendation made was that some files did not had a far enough future expire date. As such, I've modified my index.php to output a further expiry date for most documents. This is not required, and may cause funny caching if your static HTMLs are updated frequently. But, if you want to change it, you may do so like this:

Find in index.php:

PHP Code
if (!$settings['clientCache'] || !$settings['clientCacheCheck'] || !isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) || $_SERVER['HTTP_IF_MODIFIED_SINCE'] != $mtimestr) {

Add before it:

PHP Code
// 1 year far future expire time:
$now = time();
$mtexpirestr = gmstrftime("%a, %d %b %Y %H:%M:%S GMT", $now + 31550600);

Then, find:

PHP Code
header("Last-Modified: " . $mtimestr);
header("Cache-Control: must-revalidate");

*may be different if you did the previous modification.

Replace with:

PHP Code
header("Last-Modified: " . $mtimestr);
header("Expires: " . $mtexpirestr);
header("Cache-Control: must-revalidate");

And that should be it... You get a little bit more caching done on client's end, which hopefully in turn will save you some bandwidth, as well as offer your visitors a snappier browsing experience. Hope this helped!