# Smoky Cogs

Thoughts on programming, life and anything else that floats through my brain

### Archive

May 29

Google+ has been around for nearly a year now, and there have many conflicting news reports, some saying Google+ is a ghost town, while others saying that Google+ is growing at a phenomenal rate.

Well, having been an active user of Google+ since almost the beginning, I can personally say that Google+ is anything but dead. It is alive and well, with a very active community.

Each of the major social media tools has their own niche that they fill rather nicely, and are very successful in. Facebook is the way to keep up to date with your friends, Twitter works well for up-to-the-minute news and quick messages, LinkedIn is wonderful as a networking tool, while Google+’s niche is the trading of information.

It can be easy to think that Google+ is dead if you don’t see it for what it is – Google+ is NOT Facebook. People on Google+ are just not using it to find out their friends latest statuses, but rather to find out interesting information from the community they are involved in.

Personally, I follow a lot of people in the science, astronomy and tech communities on Google+ and my stream is always filled with interesting things to read. If I had only added my friends my circles, then I would have a rather boring time checking out Google+.

So, as a message to all you Google+ doubters out there: use it the way it is intended to be used, and you will find Google+ full of life. Use it like Facebook, and you will be disappointed.

Dec 7

Google has come out with the Google Font API, which enables you to use interesting fonts on a web page, without worrying whether or not the font is available on the user’s browser.

All you need to do is add a link to the Google Font API in your page, passing the name of the font you want to use, and then you can use that font in the CSS styling for an element on the page.

The best part, is that it does not require any browser plugins, as Google downloads the font to the browser cache for use within the page, and the supported browsers are also very broad. The code runs on IE6+, Firefox 3.5+, chrome 4.249.4+, Safari 3.1+ and Opera 10.5+.

So, as an example, the code to produce the following text:

Some fancy text

is

<link href='http://fonts.googleapis.com/css?family=IM+Fell+English+SC&subset=latin' rel='stylesheet' type='text/css'>
<div style="font-family: 'IM Fell English SC', arial, serif; font-size:48px;">Some fancy text</div>


Google Font Directory contains a gallery of available fonts for use with the Google Font API

## Google rewards exposing their weaknesses

Nov 5

Hackers (of the cracker kind – not the geeky kind) usually get a lot of bad press. Noone likes to have their computer systems broken into, and with the proliferation of the internet and cloud computing, data security has become an even bigger issue.

Google has taken a positive approach though. On their site, they published an article detailing how Google is offering a reward for anyone who finds a vulnerability in their applications.

This is good for everybody. The hackers get paid to do what would normally get them into serious trouble, and Google ends up with some remarkably safe applications.

Everybody wins.

Nov 1

Google Translate is a wonderful too, and living in a foreign country myself, I have mae use of it on many occasions to help me translate difficult Dutch phrases to English. The resulting translations, while on the whole are good, are not always 100% accurate.

Taking advantage of this, Translation Party takes a phrase in English and then translates it into Japanese. It then alternates the translation between Japanese and English until the phrase stops changing, and equilibrium is reached.

Nothing says this better than using an exmaple, so here is Translation Party running on a rather famous line.

To be or not to be

Dec 8

This week’s new thing to come out of Google in their never-ending supply of endeavours is the Google Code University.

This site is aimed at Computer Science students and educators and discusses important material usually covered in computer courses. So things like programming algorithms, AJAX, Web security and that sort of thing are covered.

The amount of content is still a little light though, but I am sure that this will change, since it is easy for anybody to contribute to the site, and certainly looks like a good site to watch for trying to find resources on those sometimes used, but easily forgotten, topics that academics love so much, but only interest programmers in the real world when they are needed. It is perfect for a bit of a refresher for those of us out in the field.

## A possible replacement for HTTP in the works

Nov 13

If the good old rumour mill of the internet is being accurate, then it might appear that the days of using HTTP as the main internet protocol may be numbered.

Google has apparently been researching a new protocol to replace it, which is called SPDY – short for SPeeDY, and claim to have attained page loading speeds of up to 55% faster than HTTP, using a web server and Chrome browser built with SPDY support.

The documentation for the protocol is available from here, so the protocol certainly does exists, but is it ready to challenge the old paradigm?

## Google Charts API and scientific equations

Nov 12

Trying to properly show an equation on a webpage is not exactly the easiest thing to do, since it often relies on arcane symbols and odd formatting. Never fear, Google is to the rescue.

Google Charts allows you to embed many types of graphs and charts in a webpage using a simple call to the chart api.

That may be wonderful in itself, but there is an even better use for this API, and that is to render equations. All you need to know for that is a little Latex.

This is an undocumented feature so the documentation from Google on this is rather scarce, although it is rather easy to use.

As an example, here is a formula for combinations

and the code required to create it is

<img src="http://chart.apis.google.com/chart?cht=tx&&chf=bg,s,FFFFFF00&chco=000000&chl=$\left(\!\!\!\begin{array}{c}n \\r\end{array}\!\!\!\right) = {n}C_r = \frac{n!}{r!(n-r)!}$"/>


The chf parameter sets the background colour of the resulting image, and chco controls the foreground colour. The actual latex code is specified in the chl parameter, which can be any valid latex code.

The possibilities for this are endless.

Thanks to Ryan Moulton who put up a blog post on this same topic where I first saw this feature mentioned.