MongoDB Atlanta

MongoDB conference is going to happen in Atlanta again this year. I’ve enjoyed MongoATL 2011 and already have made plans to attend this year too. Although the conference is still at “call for proposals” stage, I am sure there will be covered interesting topics since MongoDB popularity has grown significantly.

It is probably a good idea to follow event details on the MongoDB Atlanta 2012 official page. However location stays the same (GTRI Conference Center) and date is already known – April, 20th.

Internet Made in Atlanta

Update 08/17/13: Internet Made in Atlanta is now Tech in ATL.

Few days ago I started a new project of mine: Internet Made in Atlanta.

It is merely content driven web-site to list internet companies of Atlanta which are recognized and appreciated by thousands of users and\or visitors monthly.

The idea to create this project was hanging in the air for a while until I discovered a similar project by NY Tech meetup team. So Internet Made in NYC finally triggered the start of my own project.

As of November, 1 there are only ten companies listed. However I am looking forward to many more submissions!

Let’s proudly show what’s made in Atlanta!

The parable of the elephant

Few days ago I ran into another interesting parable:

I once went to a circus and saw a huge elephant tied to a small pole with a rope, just standing there. So I wondered why is the elephant so obedient and doesn’t break away from the stick with all of its enormous strength and mass. So they told me this story: once when the elephant was very young, it was tied to the pole the same way. Naturally, it didn’t like that and tried to escape, but try as it might, the rope and the pole were too strong for it. So the elephant eventually gave up.

Later on, when it was older, the elephant still believed it could not escape from the rope, and remained standing in the same place, despite the fact it could then easily escape.

Interesting, ha? It is said something like past performance does not guarantee future results. Which usually means being successful in the past does not imply success within another company or just in future. However this parable is a wonderful example of the opposite. So it is important to realize what one may now be capable of doing regardless past experience.

It’s almost like being Agile: fail early and then start a new sprint. 🙂

Mobile App Hackathon

Last month I attended AT&T Mobile App Hackathon. Although our team did not make it to present an app it was absolutely fun experience.

First of all it was interesting to learn what’s going on in the world of mobile development. For instance turns out not many prefer native development especially for Android. Also the choice for non-native app development is not just limited to PhoneGap or Titanium. There are many more less known (for now) tools and APIs like appMobi or apigee.

Second, I had a chance to work on text to speech and voice recognition features for Android which I may incorporate into next generation of SAT Vocabulary.

Third, there was no free Wi-Fi. However on the bright side everyone had a chance to try out AT&T 4G Mobile Hotspot device. And it was absolutely awesome and fast which makes you want one. Kudos to AT&T actually since T-Mobile devices were showing no signal at the ATDC location.

The top three apps were:

  • Four Corners – allows multiple players to scan a QR code to join a team in a game. Players tap on their own mobile device, which the impact is seen on the game board on a larger shared screen.
  • YouJuke – social music selection.
  • Food Porn – shows beautiful pictures of a food near you and gives you directions to it. It does nothing else and has absolutely no social networking whatsoever by design.

Looking forward to attending more events like that. Also AT&T is planning other hackathons in DC, SF, Boston and Orlando during October-December of 2011.

MySQL: How to add where clause to processlist

MySQL’s show full processlist is a great way to monitor and diagnose what is going on with the database server at certain moment.

However often it is needed to have an aggregated view or evaluate only specific type of users and\or queries.

The solution turned out to be pretty simple since show full processlist is just an alias for a regular query to processlist table within information_schema database.

So the following queries are equivalent:

SHOW FULL PROCESSLIST;
 
SELECT * FROM information_schema.processlist;

As result it is possible to present the data from process list any convenient way. There are some basic examples below.

-- display number of connections for each user
SELECT `USER`, COUNT(*) FROM information_schema.processlist
GROUP BY `USER`;
 
-- display number of connections for each host
SELECT `HOST`, COUNT(*) FROM information_schema.processlist
GROUP BY `HOST`;
 
-- display root user activity
SELECT * FROM information_schema.processlist
WHERE `USER` = 'root';
 
-- display processes associated with SELECT queries
SELECT * FROM information_schema.processlist
WHERE `INFO` LIKE 'SELECT %';
 
-- display average query time for each database
SELECT `DB`, AVG(`TIME`) FROM information_schema.processlist
GROUP BY `DB`;

Can you restore your backup?

In this short note I simply want to second Joel Spolsky’s post on backups: Let’s stop talking about “backups”.

For instance many IT related people are comfortable enough knowing that necessary backups are done. However not many are concerned about restoring from the backup or actually tried the whole backup restore process. Nonetheless there is always something unexpected happens during restore…

Thus the right question to ask is not “are you doing backups?” but “can you restore your backup?” or “are you doing restores?” is even better.

The minimum bar for a reliable service is not that you have done a backup, but that you have done a restore. If you’re running a web service, you need to be able to show me that you can build a reasonably recent copy of the entire site, in a reasonable amount of time, on a new server or servers without ever accessing anything that was in the original data center. The bar is that you’ve done a restore.

My Blackberry Is Not Working!

MySQL: Current timestamp for new or updated rows

Often it is quite reasonable to have the database to take care of some audit related columns like date added or updated.
Unfortunately MySQL does NOT allow functions within table definitions like let’s say MS SQL does, e.g.:

CREATE TABLE t (f datetime NOT NULL DEFAULT now());

The only work around is to use timestamp column instead of date or datetime ones. There can be only one auto set timestamp column though.
So I normally use it to store date updated and save the date created manually.

CREATE TABLE t
(
  name VARCHAR(20),
  date_updated TIMESTAMP NOT NULL
               DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)

Also there are two things to keep in mind:

  • date_updated will be set based on MySQL server time. This is especially important if other data is stored using GMT or non-server time zone.
  • date_updated must NOT be a part of update or insert query.
-- set date_updated to current time
INSERT INTO t (name) VALUES ('test');
UPDATE t SET name = 'test';
 
-- override date_updated to certain value
INSERT INTO t (name, date_updated)
       VALUES ('test', '2011-08-02 20:00:00');
UPDATE t SET name = 'test',
             date_updated = '2011-08-02 20:00:00';

Alternatively it is possible to use triggers to have as many auto updated datetime columns as needed. However personally I prefer to avoid triggers as much as possible. Mostly because often triggers are misused and as result application complexity is increased for no reason.

Paper airplanes

Occasionally I like making paper airplanes but I knew how to create only three or four models. The reference below which I’ve found recently shows how to make 12 (!) different types of paper airplanes. Should be fun to try other models and see which one flies faster. 🙂 And which one is your favorite?

Today’s quotes

‘Professors don’t read books, they write them!’

This was a favorite phrase of one of my university professors. It has its own deep meaning but also always made me want to write a book. 🙂

Recently I’ve run into another somewhat similar quote, ‘Harvard undergraduates believe that inventing a job is better than finding a job.’ This one actually came from the movie Social Network.

I think both phrases kind of hint that it is important to step out of the box and look at something from a different angle. Why does not one create something new instead of saying something is not good or suitable for him/her?

On a side note another saying I like to refer is ‘a rising tide lifts all boats’, actually to its implication. It’s easy to grow when everything else is growing but it is even more important to understand how to survive a low-tide.

« Previous PageNext Page »