Lahaia noon at hawaii

When the sun is directly overhead in Hawaii, it looks like a bad video game render

The sun is exactly overhead twice a year in Lahaina, Hawaii, once in May and once in July. Poles don’t cast shadows, giving the urban landscape an eerie appearance. Hawaii is the only state in the US where the sun’s rays are perpendicular to the surface of Earth. It’s called a subsolar point.

Via Boingboing

Share Comments

The Borg design pattern

How to have shared state between different instance of a class without a singleton pattern.

The ‘Singleton’ DP is all about ensuring that just one instance of a certain class is ever created. It has a catchy name and is thus enormously popular, but it’s NOT a good idea – it displays different sorts of problems in different object-models. What we should really WANT, typically, is to let as many instances be created as necessary, BUT all with shared state. Who cares about identity – it’s state (and behavior) we care about!

By Alex Martelli at Singleton? We Don’t Need No Stinkin’ Singleton: The Borg Design Pattern.


Share Comments

Documenting both class and constructor in Sphinx

I lost an hour of my life today trying to figure out why Sphinx would not document a class inside a module specified by :automodule:. I learnt two things today. Firstly, Sphinx will not document a class automatically as part of :automodule: if the class itself doesn’t have a docstring. You can force the class to be displayed by having an additional :autoclass:directive though. If the class does have a doc string, it will be displayed including the documentation of its regular (ones without a leading _ in the name) methods.

Read more

Share Comments

Using Python to update a required field while performing a transition in Jira

This might be a very esoteric topic for most people, but since I could not find information about this anywhere, I decided to document this in a post. Here is the problem. I use Jira at work, and today, I needed to close a bunch of tickets based on a search result. Now, searching or doing batch operations is simple enough from the browser, but a small detail made the exercise impossible via the web UI.

Read more

Share Comments

German cycle superhighway opens its first stretch

The first 5km of a 100km cycle only superhighway has opened to public in Germany. When complete, the route will connect 10 western cities including Duisburg, Bochum, and Hamm, and four universities. Martin Toennes of regional development group RVR says almost two million people live within 1.2 miles of the bicycle highway and will be able to use sections of it for their daily commutes. With the rise in popularity of electric bicycles to help with undulating terrain, RVR says the bike way, which utilizes mostly abandoned railroad tracks in the Ruhr Valley, could replace up to 50,000 motor vehicles during daily commuting hours.

Read more

Share Comments

Using your gut microbes to find the perfect diet

Cave Man Paleo breakfast. Photo by Katherine Lim

It seems every generation has its own bouquet of diets that people swear by.

In the early 80s, diet guru Nathan Pritikin believed that we should shun all fats and food containing cholesterol. He died of leukemia in ’85, but apparently his autopsy revealed that he had “arteries like those of a child and a heart like that of a young man”.

His arch rival in the time, Robert Atkins, of the Atkin’s Diet fame, espoused just the opposite - low-carb, high fat diets. His controversial death threw up allegations of a life long history of cardiac issues and obesity. But still there are people around who swear about it.

Loads of new diets have sprung up in recent years, with a loud number of them blaming carbs, sugar, starches and other GI (glycaemic index) manipulating food groups to be the cause of diet issues in the population.

Now a new article goes a bit deeper. It follows the published “study from an Israeli team led by Eran Segal”, to suggest that looking at all carbs the same way and avoiding them is too simplistic an approach. Human body is too complex and different sources of carbs affect different people in different ways. One of the major reason that they pointed out was the difference in the profile of the microbes in our digestive system!

Read more

Share Comments

Software patents put on hold in India

In a welcome move, the Indian patent office has temporarily stopped issuing software patents. “In view of several representations received regarding interpretation and scope of section 3(k) of the Patents Act 1970 (as amended), the Guidelines for Examination of Computer Related Inventions… are kept in abeyance till discussions with stakeholders are completed and contentious issues are resolved,” the Controller General of Patents said in a notification issued last week. Again, this is a temporary measure and given the intensive lobbying that happens behind doors, it could still be revised.

Read more

Share Comments

New HTTP status code for legally unavailable resources

The Internet Engineering Task Force(IETF) has finally created a standard for when a page has been taken down due to legal reasons. The new status code, 451, indicates that a host has received a legal demand to deny access to a resource. Via TheNextWeb

Share Comments

Back to Wordpress

It seems every year I change my blog backend, hoping it will make a difference to the frequency in blogging. After 10+ years blogging, I am older and wiser enough to know that it doesn’t. It is a losing battle. Content I would like to share with my family goes to Facebook, random quips go to Twitter. Pretty much wherever there is a more suitable audience. In any case, writing or not, it is much better to move to a hosted solution, and I moved my domain and migrated my Jekyll website (painfully) to the wordpress.

Read more

Share Comments

Serializing structured data into Avro using Python

It is impossible to ignore avro at work - it is the data serialization format of choice at work (and rightly so), whether it is to store data into Kafka or into our document database Espresso. Recently, I had the need to read avro data serialized by a Java application, and I looked into how I might use Python to read such data.


Read more

Share Comments