internet

Medium.com — Awesome Blogging Site

I’ve just discovered Medium.com, an awesome blogging site:

https://medium.com/@SaschaTayefeh

Of course, we have tons of these, most capable ones of course. But what struck me about Medium.com is it’s clean, lightweight, yet, full-featured user interface. It comes with some goodies I haven’t found anywhere else, yet.

For example, clicking somewhere on the text opens a little window in place allowing you to write notes! Embedding of media is also possible, just like anywhere else, however, the way everything is done is such a charm.

I am so keen to bury my wordpress.com site in exchange for medium.com. Still, I will hold on. Too often have I been an early adopter, which wasn’t always the best choice. But if within, let’s say, two months I am still thrilled, I’ll definitely switch.

Standard
internet

Some Pieces of Art

Lately, the internet is getting more and more of a place where public domain art is available. And I am writing about truly precious art, not rubbish somebody’s put online. For example, I’ve found tons of scans of old books, including such lovely illustrations like this one:

Public Domain Illustration

So many illustrations, so many of them a piece of art! Thanks to all those persons and institutes that took the effort scanning, cataloging and publishing then unter the public domain license. Truly enriching mankind and a slam into the faces of those who are trying to erase the history of mankind.

Standard
internet

Numerous App for iOs – Let the Cloud do the Counting

For a long time, I’ve been messing around with various tools that count things for me like the number of workouts I do or track my weight. Even more apps that display temperature, do countdowns etc. Finally, I’ve found a single app that accumulates all numbers I need and even displays them online. The app is called Numerous and available at the iTunes Store for iOs.

Numerous offers a dashboard on the iPhone and the iPad. A large number of interesting “receipts” are available for being displayed on that dashboard, e.g. current temperature, moon phase, countdown to the next solar and lunar eclipse etc. For me more interesting is the capability of creating custom numbers. For instance, I created a manually triggerable receipt counting the number of times I hit the gym in 2015 and another one for the number of times I did serious cardio in 2015. The count is being increased by another app, which actually is the Do Button by IFTTT. This is a very convenient way for me to increase the count every time I hit the gym by simply pressing that one button. Since it is available for iOs and Android respectively, I am not restricted to iOs to increase counts.

All right, folks, numerous offers a receipt that shows the current number of numerous users. I am thrilled by what that guys have created. I am very keen to support them. So take my advise and go and get yourself an account there.

Standard
internet

Google Books – Another Digital Revolution?

I am so thrilled by Google Books – they offer complete books with expired copyright. As far as I am concerned, these old books are more charming anyway. Even better: they offer the original scans of the books (i.e. including all paintings and the original fonts) for free and legal download as PDF and some even as ePub, the appropriate format for the eBook readers of Sony.

Again: They provide the full scans! You will experience the original charm, even though you will probably read them on some screen. I have already figured out some really beautiful ones I shall read in the near future:

  • Edgar Allan Poe: “The poetical works of Edgar Allen Poe” with so wonderful, really, wonderful drawings … enhancing Poe’s gloomy stories in a way that I have never experienced from any concurrent printing
  • Familiar Lecture on Botany”: Also of minor scientific interest (taxonomy has been completely shook up since genetic analysis took over), it is still of great aesthetic value to me. Another nice example: “British Zoology
  • An essay on archery”: I really don’t know where to find such a in-depth monograph on such a topic. If it wasn’t digitized, I wonder when this knowledge would have been lost
  • The Travels and Researches of Baron Humboldt”: Alexander von Humboldt was a great German explorer. He was the first to explore and describe South America (and Venezuela in particular) not from the master-and-slave, but from the human view. The people of Venezuela are still thankful for his work. Here, however, is some of his important work, again, with breathtaking drawings
  • etc.

Apart from the personal joy one might experience when being offered such a huge library, the sheer fact that this knowledge is now available for each and everybody is, to me, another real revolution.

Again: I am thrilled …

Standard
coding, howto, internet

Geocoding APIs for PHP, iPhone, and Android

There are several approaches to determine a location (in terms of longitude and latitude) from an address and vice versa (latter is referred to as “reverse geocoding”). A quick research with Google unveiled following interesting APIs and web-services (fully sufficient for my needs, yet, incomplete and far from exhausting). I will focus here on

  1. Google Maps-API (Recommended for PHP and JavaScript …)
  2. Geonames.org-API (Recommended for Java, C#/.NET, VB/.NET …)
  3. Android (Android only)
  4. iPhone (iPhone only)

Google Maps-API

Particularly useful if you need to carry out implementation in PHP or JavaScript. Google’s API provides a class which is solely dedicated to the task of geocoding: GClientGeocoder. You could make use of it embedding it within your application making it a client site geocoder. With this API, “Reverse Geocoding” is possible too.

They may be cases, where you do not want or just cannot make use of client site geocoding (e.g. absence of Javascript, performance, etc.). Here you may the HTML Geocoding web service of Google. You may choose between XML, KML, CSV, and JSON response – of which latter is particularly useful for the communication between Google and mobile devices. All you need to do is to create a string like

$Address = 'Germany, Frankfurt, Friedberger Landstrasse 20';
$myString = 'http://maps.google.com/maps/geo?q=' . $Address . '&output=xml&key=' . $GoogleApiKey;'

where $Address is, of course, the (relatively) free format address and $GoogleApiKey is a key you need to obtain from Google in order to get access to its services.

Here is a strategy for a PHP implementation. It is based on send the Client URL (cURL) Library shipped with PHP. In particular, you could implement the following sequence in order to send the request and retrieve the response:

  1. Initialize a cURL session with the curl_init() function: $csession = curl_init()
  2. $csession is a state machine. You need to set some of its parameters with the curl_setopt(…) command: Set CURLOPT_RETURNTRANSER to TRUE, CURLOPT_HEADER to 0, CURLOPT_FOLLOWLOCATION to 1 and CURLOPT_URL to the above mentioned $myString. Example: curl_setopt($csession, CURLOPT_RETURNTRANSFER, TRUE)
  3. Finally, use curl_exec() to carry out the request: $response = curl_exec($csession); curl_close($csession)

Now, what you get here is some data stored in $response. You may access them using PHP’s SimpleXMLElement class: $xml = new SimpleXMLElement($response) and then accessing the XML elements by e.g. $xml->Response->Status->code or explode(',',$xml->Response->Placemark->Point->coordinates).

A good implementation of this strategy in form of a PHP class can be found here.

Geonames.org

Geonames provides a web interface and an API in form of a standard web service interface to access its geocoding service. This very fact – the use of a web service interface – makes it particularly interesting for all languages. However, I would like to advise to make this the choice if using .NET languages and Java, since these languages have developed an excellent workflow of referring to web services by using IDEs like Visual Studio and Eclipse, respectively. BTW, JSON format is also provided 😉

And since web services are so common, I won’t give any details here dealing with the implementation. Just refer to the web service documentation of Geonames.org and the list of web services provided by Geonames.org.

Nevertheless, I simply must mention some very interesting thing about this provider: It does not only return simple (reverse) geocoding data, but it also offers web service methods like findNearbyWikipedia (which returns a list of wikipedia entries) and findNearByWeather (which returns a weather station with the most recent weather observation). This surplus is really worth considering this service for your implementation.

Android

Since Android is a project by Google, it is somehow related to the last section. However, the approach describes in the last section is a very general one while this one is recommended for Android mobile implementation.

The base class android.location is provided by the Android SDK. The specialized android.location.Geocoder is just what is needed for all sort of geocoding. It is possible to carry out both, geocoding and reverse geocoding. This is particularly powerful in combination with android.location.LocationManager, which can be used to determine the current location using the cell phones GPS device, and android.location.Location to store the time-dependent location.

Instead of going into the coding details here, I would like to give some good references you may find useful:

You should be able to create your own implementation from this input.

iPhone

Apple, too, has implemented a very good framework to cope with the GPS capabilities of its iPhone. It comes with its Core Services and is called “Core Location”. Apple’s developer pages are so exhausting that no further details are needed here. The above mentioned link to the “Core Location” framework leads to a page with many source examples, however, you need to be member of the apple developer community in order to access them.

There is a very good geocoding example @ cloudmade.com that shows how to make use of Apple’s API. You should take this as your starting point.

Standard
howto, internet

Synchronize Google Mail, Calendar and Address Book with Thunderbird

Prerequisite

This is a summary of the steps you need to take in order to make use of Google’s services from your local client. Here is a list of software you need to download and install:

  • Mozilla Thunderbird: This is a free e-mail client. Calendar and task functionality will be added by some add-ons (see next bullets)
  • Lightning: This is an add-on for Thunderbird. Download it, start Thunderbird and from the menu bar select “Extras” -> “Add-Ons” and press the “Install” button. Choose the download, wait until installation has finished and restart Thunderbird
  • Provider for Google Calendar: Another add-on for Thunderbird. This one enables bidirectional communication with Google calendar. Just install it
  • Google Contacts 0.5.51: Another add-on for Thunderbird. This one is used to synchronize the address books of Thunderbird and Google
  • Gmail IMAP Account Setup: A wizard for setting up a google IMAP in Thunderbird. Google’s IMAP account uses lables (tags) which is not so straight-foreward to cope with. This wizard not only sets up your account easily, but it also performs some optimizations. Use it rather than setting up your account manually

Set-up Google Mail

  • In Thunderbird, choose “Extras” -> “Accounts” from the menu bar and press “New Account”
  • Choose “Google Mail IMAP”
  • Just enter your login name. The wizard will do the rest for you.

Add a Google Calendar

First, you need to get the URL of your calendar

  • Go to the Google Calendar site using your internet browser
  • Choose “Preferences” (top right)
  • Choose “Calendar” from the tab that appears
  • Click on the calendar name
  • Scroll down
  • Click on the “XML” button, preferably the one of your private adress
  • Right click on the link and choose “Copy Link”

Now add the link within you clipboard to Thunderbird’s calendar:

  • In Thunderbird, choose “Calendar” from the tab at the left bottom
  • From the menu bar, choose “Calendar” -> “New Calendar”
  • Choose “From Network” and continue
  • Choose “Google Calendar” and paste the URL you just copied into the text field
  • Finally, choose a name, a colour and you’re done
  • Setup the “Contacts” add-on. It is pretty easy, you’ll find your way

Celebrate …

Standard
internet

Twitter Essentials

Here I go: I’ve found a new stunning tool on the internet: Twitter. Twitter is a micro-blogging tool optimized to record small messages rather than exhausting posts. In particular, it is capable of receiving messages and pictures from your mobile phone. However, there are some enhancements that should be considered when using twitter:

BTW, have a look to the top right of this blog to watch the latest entries of my own twitter 😉

Standard