» Go and Javascript.

I’m going to go out on a limb and predict that Python is being replaced by Go. I don’t have a lot of information to back up this prediction except that most of the positive articles I read about Go are written by Python developers, and a lot of them say that they are now actively migrating their code base from Python to Go. I don’t see as much enthusiasm for Go from developers using statically typed languages, probably because of Go’s antiquated type system (which is still a big step up from Python, obviously).

1 comments

»  A Colourable iOS 7 Map Pin (Photoshop)

For anyone developing iOS 7 maps-enabled apps, you probably know that the pin image has changed for this version of iOS. iOS has long limited the provided pin colours to Red, Green and Purple. Here is a layered Photoshop file that we used in the latest version of AthensBook and you can use to change the pin colour. Besides the base layer, there are two hue-saturation-brightness layers. You use the first layer titled ‘Brightness’ to change the brightness of the colour. Don’t touch the hue or saturation sliders on this layer. The second layer allows you to change the hue and saturation of the pin colour.

Using both layers allows you to set the pin colour to anything.

pin.lightbluepin.pinkpin.darkmarinebluepin.marineblue
pin.orangepin.brightredpin.wineredpin.lightgreen

Disclaimer: This is obviously based on a pin image that I extracted using UIImagePNGRepresentation and copied the resulting PNG after running the extracting code in the iOS Simulator. The original pin image is (almost certainly) copyrighted by Apple Inc. I am not affiliated with Apple Inc. in any way whatsoever and I am only providing this composite to assist developers in creating iOS 7 applications. I do not claim any copyright on Apple’s intellectual property. If you are an Apple employee or, dog forbid, lawyer, and object to the use of this bitmap, please let me know and I will remove the image. Hopefully you’re not that bothered/braindead and appreciate its value to the Apple Developer community.

comments


2012.10.22

Using OTE’s 11888 to provide fast CLID data for FreePBX/Asterisk

For those using FreePBX (a configuration/administrative interface that manages Asterisk) there is a CallerID Lookup module, published by the FreePBX team. The module allows you to interface with data sources using several methods, one of them being http.

Like many companies, we maintain several systems that can be easily integrated with our VoIP PBX system, but we also receive a number of calls from the public, viz. companies interested in advertising on GEO|ADS, adding their business to AthensBook or ThessBook, or asking for a quote for a project. OTE recently revamped its aging whitepages.gr site and incorporated its content into their ‘umbrella’ 11888 business directory operation. The new site is faster, more beautiful and written in a more professional manner, as far as the markup is concerned, which makes it a perfect source of caller id information for a large number of telephone subscribers in Greece. Around one hour of Ruby scripting using Mechanize, Sinatra and some custom transliteration tables to convert the scraped names to their latinised counterparts (Cisco phones don’t seem to like Greek characters all that much) resulted in the following script (github)

»

5 comments

2012.09.02

Visualising geospatial data using SVG, Python and Javascript/d3

Geography is an immensely important tool in the modern business environment. Doing business globally was the first wave of the globalised economy, and the widespread use of internet-based services and e-commerce only accelerated and solidified the notion. The next wave came with mobility in the form of location-based services. Today everyone can create location-based tools that span the globe, and many companies do, but in my view this is akin to a car manufacturer producing a single model for Chinese farmers and European urban commuters alike. Hyperlocality, the concept that each location is worthy of particular attention, that it has unique characteristics and inherent value impossible to tap by going ‘global’ is slowly becoming a major trend. In 2009, while bootstrapping AthensBook, ThessBook and GEO|ADS it was our only choice.

For us geography is everything. We didn’t start global or even regional. We started local, paying attention to the needs of the people in Athens and Thessaloniki and expanded our featureset accordingly; with limited resources and funding. The importance of understanding geography is amplified when your geographic realm is a city, as opposed to a country or region. When we launched GEO|ADS in early 2009, the business world didn’t really know what to do with it. Even today, mobile advertising is still in the process of coming up with standards, conceptual or technical, the world is trying to understand how to use it, how to extract value from it. With GEO|ADS we were the first platform to provide meaningful, consistent high-resolution spatial analytics to our customers in 2009 for Athens and Thessaloniki. We always thought this was a fundamental point where we could contribute valuable, differentiated feedback, compared to the Web or traditional media.

Our spatial analytics reports have long been generated largely automatically as kml files, a de facto XML-based standard that originated alongside Keyhole’s Earth Viewer. Keyhole was a company funded by In-Q-Tel, CIA’s venture capital appendage, and focused on a single (publicly offered) product, the Earth Viewer. The application was very much ahead of its time and it was only through the acquisition of the company by Google in 2004 that turned it into a product enjoyed by the masses: Google Earth. Choosing KML was an easy decision for us, as the format is open and the output usable by everyone — Google Earth is free and infinitely more accessible, usable and engaging than your average GIS application. It is also deeply interactive, as users can zoom, pan and rotate around regions of interest extremely quickly, allowing business development managers and marketers choose locations for campaigns, expansion, targeting more easily and quickly than it would have been possible otherwise. Being XML based meant that we could write a relatively short Python script and leverage all the amazing facilities KML and Google Earth provide.

In addition to customer reports, however, as part of our operations at Cosmical, we often employ spatial analytics for internal use, to understand how our users interact with our applications, identify potential improvements or interesting types of venues to be considered for future versions and, enhance our hyperlocal character by identifying local trends and featured venues. For this purpose we have been using web-based technologies and more specifically SVG in conjunction with CSS and Javascript to create interactive, scalable and æsthetically coherent reports.

»

comments


» TextMate 2 is now available under GPL3!

Who would’ve thought a few years ago that this day would come! Given the success of TextMate 1.x and the unprecedented delay in releasing TextMate 2, I guess open sourcing it makes sense. But GPL3? Really?

5 comments

» Codify for iPad

I’ve been a fan of Lua since the early 2000s when a friend introduced it to me, even though I never got around to finding the time to properly learn and use it in production stuff. We have discussed about using Lua as a scripting language to allow for downloadable bundles that would extend AthensBook/ThessBook functionality (or fix bugs, or provide dynamically determined personalised features etc., but that never happened until now, due to licensing restrictions by Apple) for ages. Codify is an unbelievably cool app that leverages lua to provide a simple programming environment for the iPad. Combined with the general appeal of the device, the lack of third party, scripting programming environments for it, the ease of programming and use of Codify and the excitement of using such great hardware, I feel that Codify might be the Logo/Basic equivalent for this generation of children between the ages of 5-10, a great introductory platform for programming and an amazing tool for everyone else. And at $7.99 I think it’s a steal. You might want to use a bluetooth keyboard for it though; typing code on the on-screen keyboard seems like a horrible horrible nuisance.

comments

» A PC Emulator in Javascript.

You read this right: this is a ‘full-fledged’ PC emulator written in pure Javascript. It can boot linux. Amazing stuff, let’s hope we get ‘readable’ source code sometime soon.

comments


2011.05.05

Some thoughts on Ubuntu Unity

A lot has been said and written about Ubuntu Unity, the new ‘shell’ that’s replaced the ‘classic’ default GNOME desktop in Ubuntu 11.04. Despised by many that interpreted Canonical’s break from the ‘open-source’ norm of restricting modifications to upstream platforms to a bare minimum, as a threat to the upstream projects’ existence (a valid point to an extent), that found it to be half-baked and offering little more (if anything) over the classic desktop and a couple of additional programs (e.g. a Dock, a launcher etc.) while much slower and kludgey (a totally valid point, but it’s a 1.0), Unity is here to stay.

It is true that, despite Shuttleworth’s ramblings on his blog, most of Unity is hardly innovative. Most useful things in there can already be found in most modern desktop environments (including some linux desktops) while Unity’s implementation of those very features is hardly the best. But there are also some unique offerings that are different, such as lenses and the proposed (but not yet included, thankfully) windicators. The question there is: are those features really useful? Are they well thought-out?

I think not. Take for example desktop search, a hot subject in mid 2000s desktops that’s been largely solved in an exemplary way in OS X by Apple’s Spotlight and a number of third party tools on that platform (LaunchBar and then Quicksilver are prime examples of early game changers), and even Windows 7 to some extent through the built-in search field in the start menu. Then, with five years of hindsight, Canonical decides to make things somewhat harder for users by exposing the search context to the user in the form of completely separate ‘lenses’ as opposed to keeping the distinction internal (in the same way OS X does) and presenting filtering options in an innovative way. Put it simply: I’d much rather have a single search field, ala Mac OS X’s Spotlight that searches for my input text across ‘data domains’ and contexts and returns useful, filterable lists of data, than the frustratingly badly designed ‘lens’ concept that forces a clear separation of searches while taking up screen real estate and wasting the users’ time with additional clicks and keystrokes.

Which begs the question: why on earth did the fine people at Canonical make such a bad design decision, when the stated mission of Unity was to streamline the desktop while taking less space etc. and at the same time there are numerous implementations of search/launch applications (even in linux) that work significantly better than Unity? Were they afraid of being labelled copycats? Is that worse than been called bad designers?

The same can be said about the new ‘global menu’ and AppIndicators that replace Gnome panel in Unity. Having few replacements for the staple Gnome Panel widgets of yesteryear is fine, given it’s a 1.0. Having botched the whole concept of a global menu through inconsistencies when windows are maximised and in multi-display scenarios betrays a badly designed (viz. not just incompletely implemented) system that shouldn’t have been out in the first place.

Unity has divided the GNOME community by introducing a new shell on the world’s most popular linux distribution. While it’s true that the state of linux desktop has been moving frustratingly slow for a number of years and that a quasi-open project, funded by a commercial entity with a focus on usabilty and æsthetics — exactly like Unity is on paper — could help accelerate its development and help reach parity with the two main desktops in some of the more difficult areas where linux has been falling back over the years. Still, Unity is largely incomplete, it’s missing many of the configuration options and functionality that linux users are used to — nay, demand — and, sadly, what’s there betrays a rushed, badly designed feature set that should never have gone past alpha inside Canonical, let alone be part of the world’s most popular distribution.

3 comments

Linode. Affordable, Fast, SSD VPS