2014-05-25

The downvote squads

Governments today all realize the importance of web. Though the way they handle their citizens on the web ranges from neglect to complete isolation of the country's network, to aggressively collecting all private data, there are also come very crude and expensive methods that some governments choose as supposedly cheaper alternative to hiring professional PR and technical people.

I didn't make much of it when I first heard from a person I know that the Serbian government started employing students to downvote and report stuff on the web a few weeks ago. Today, though, I notice a rather strange downvote pattern on the comments on one of the popular Serbian portals. Namely, all anti-government comments, without exception, had a huge number of down-votes. It's very very rare that downvotes outweigh upvotes (not unheard of), but this kind of consistency is very rare unless it's an anti-gay topic (Serbia is not gay-friendly as the vast majority of its population is Orthodox Christian), so I decided to go through the archives and see if this is a new phenomenon.

2014-05-19

Parameters vs Arguments

It seems to come up from time to time, and I sometimes get confused myself. Mental note, once and for all: what are parameters and what are arguments, and what's the difference?

2014-05-15

IP Webcam, camera streamer for Android

I got my satellite equipment installed yesterday. The sat dish needs a clear view of the South sky, whereas something like that is poisonous to my overclocked CPU. Signal has to go from the dish to my PC. Solution: PC goes to North, dish goes to Sough side of the house. However, I'm a bit new to satellite equipment, and I was a bit concerned about correct operation of my DiSEqC motor, so I needed a way to monitor the dish as I issued commands to the motor from the terminal.

One ad-hoc solution was to have my wife stand by the window and tell me if the dish is moving. This didn't quite work the way I wanted because my wife loves crocheting, and crocheting isn't compatible with visually monitoring stuff.

Today I found IP Webcam. And I loved it.

UPDATE: As soon as I shared this on Twitter and elsewhere, I noticed that I made a mistake in the title itself. Originally, it said "remote camera viewer", but that's incorrect, since it's not used to view remote cameras, but stream video from the local camera.

2014-05-06

Ideal (first) mobile phone for kids

I can't remember the last time I purchased a mobile phone to be actually used as a phone. Maybe it was 5 or 8 years ago? 10 years ago? Anyway, it seems like a long time now. My first phone was definitely a device that could only be used as a phone. The Motrolla c520 couldn't really be used for anything else anyway. Today, I use the phone as anything but the phone. Very occasionally I would receive or make a phone call. But it's still an essential part of my life.

My daughter, 8-years-old now, needed a phone, so I decided to get her one. Essentially, it's back to square one: phone to serve as a phone. Other requirements include being cheap (so it doesn't get stolen) and being easy to handle.

2014-04-15

Framing the framers

In the chain between something being produced, and it being consumed somewhere else, we start with the people that make things, and people that buy the products. Making (or 'creating', if you prefer) obviously involves a different thought pattern than consumption, and there is a difference between the two roles that usually necessitates involvement of others to bridge the differences. Especially in art, and especially when money wasn't involved, this divide has always been quite pronounced, and perhaps because of this divide, to a small number of people it was attractive to buy art: sort of like buying a souvenir from another universe. The delicious foreign feel of true art, priceless experience that nobody can measure, was only appreciated by those who actively sought such experiences. In the recent years, this has radically changed with the huge explosion of stock art.

2014-04-09

Data migrations on Google AppEngine Datastore

If you have used SQL databases, you are probably familiar with schema migrations (a.k.a. database migrations). Those are meant to bring existing database tables in sync with your application's knowledge of them so that queries performed by the application return correct data. In contrast, schemaless databases such as the GAE's Datastore do not need schema migrations because... well, they have no schema to migrate. However, even though there are no schemas, you still have data with some structure, and if you change the structure in your application (e.g., by changing your soft schema represented by a model), you may still need to modify existing data to match the way your application works with it. This is known as 'data migration' to differentiate from 'schema migration'.

The GAE documentation provides an in-depth treatment of the two most common scenarios when it comes to data migrations, but those are not the only scenarios you may encounter, so we will cover one more here. Namely, we will cover the case where you have changed the type of one or more properties.

2014-03-02

Google AppEngine high replication datastore and eventual consistency

In a typical POST-redirect cycle, user submits a form, data gets saved to the database, and user is taken to a page that contains the HTML representation of the new record. This is how your GAE application might work (and usually does), but with a twist. Instead of the page, user sees a 404 error. Entity is not there. Confused by this, user hits refresh and behold: the page is now there. This is a typical outcome of eventual consistency of Google AppEngine's high replication datastore.

Starting with the high replication datastore, and particularly with its eventual consistency model, can be a bit hard to wrap your brain around until you've actually run into problems in real-life usage. I had read many tutorials and watched countless hours of talks trying to understand it before I modeled my first database schemas, and it still caught me off-guard. Therefore, I decided to document some of the issues I've encountered, and solutions to those issues.