6. May 2015

OpenRefine date conversions

One of common tasks for OpenRefine is conversion of dates from String.
Conversion could be performed by toDate function.

Source data:

11-04-15 9:28
12-04-15 8:56

Open Edit cell – Transform for the column and type following GREL:

value.toDate("dd-MM-yy h:mm")

Result (in Date format):

2015-04-11T09:28:00Z
2015-04-12T08:56:00Z

Another example. Source data

11/04/2015 09:28:25
13/04/2015 08:56:57

GREL:

toDate(value, "dd/MM/yyyy hh:mm:ss")

6. March 2011

Just another language

There are miriads of computer languages. It seems to me that developers are trying to find better and better way how to communicate with computer.

Today you have to know many languages to get any reasonable job done. Web is based on many components and services that have to talk together. Those services also must understand each other.

Situation is even more complicated when you start to building UI over these services. Different language = different UI components = different UI paradign = different errors.

Ok, let’s start. Build app that works with few backends and systems.

Let’s be cool and put app on App Engine. We need Python.

We need some UI interface. We need HTML.

We need some templating language. We need Django.

We need some fancy features in UI. We need jQuery and JavaScript.

We need some crossbrowser feature for handling files. We need MXML and ActionScript.

We need communication with some REST services. We need JSON.

We need to implement some enterprise communication connector with enterprise system. We need Java and Bash.

We need to launch some internal processing with some CGI portals. We need Perl.

We need to grab some data from database. We need SQL.

We need some high performance backend for processing images. We need C/C++.

We need to provide integration for some web portals. We need PHP.

We need human readable structured data. We need XML.

We need to talk with some enterprise backends. We need SOAP.

We need to provide component form MS platform. We need C# and F#.

We need to have fancy frontend for Mac world. We need Objective-C.

We need to have some continuous integration. We need Maven.

We need to implement domain specific things. We need domain specific language.

And so on…

I don’t know, but it seems to me little bit insane. This is just small list of mainstream languages for relatively small app.

I’m not talking about different APIs, different frameworks. IT world is getting more and more complex.

Solution? Is there way out of this maze?

It reminds me of few sentences from Zen of Python:

  • Simple is better than complex.
  • Complex is better than complicated.