Friday, July 22, 2011

Twitter - part 2. Android.

Twitter

So my Twitter 30 days challenge is about to be over, and I think I'm ready to summarize it and write some conclusions:
  • I'm following 17 people, and have 9 followers. Only recently I began to gain an audience. Just like with blogging, it takes patience and persistence.
  • So far I made 43 tweets. I'm pretty pleased with this number.
  • Except for once or twice, all of the replies to my tweets were done on Google Buzz, which is connected to my Twitter account. That's pretty lame, and makes me want to lock both services - more on that, later.
  • Tweeting is fun. I didn't think I'd say that.
  • The TwimGo client for N900 is great. The official Twitter client for Android is just perfect. Not having a Twitter mobile client renders is useless. This could be another reason for Google Buzz failure, as it doesn't have a decent mobile client.
  • 140 characters limit makes a lot of sense when posting from mobile. Longer than that is cumbersome. When posting from PC - it's too limiting.
So, am I going to keep using Twitter? For following people - yes. For replying to people - yes. For publishing stuff - probably no.
I guess most of the stuff I publish today on Twitter, will be published to "public" or "extended circles" in Google+ instead.
This means that my short "romance" with Twitter will probably end soon. While it's a lot of fun, it provides little gain compared to Google+. Perhaps had I joined 2 years ago, I'd stick to it until I know my followers would follow me to Google+.
It doesn't mean I'm going to generate too much noise in Google+ either, since I believe posts that complains about the Israeli heat will probably be published only to "Friends".

As a final note for this topic: I just removed the Google Buzz tab from my GMail and disconnected all of the accounts associated with it (Twitter, Google Reader, this blog). Since I never bother looking at the Buzz tab in Google+, this means I will ignore everything going on in there. I don't see the point of having a place where I need to follow people's comments on stuff published in other places. Comments for this blog should go here. Comments for Google+ should go there.


Android

This week was a happy and sad week in terms of mobile devices. Not sad as in tears, but somewhat sad. After 10 years of owning 5 different Nokia devices, I switched to a brand new SGS2 running Android Gingerbread. My last Nokia device was the N900, which is by far the geekiest toy I ever owned. No other smartphone can be tinkered by modifying things under /etc, and get updates using apt-get. A truly open-source device.

In the past few days I had very little time to dig into Android. They say it's Linux. IMHO, it's barely noticeable. No glibc, different filesystem structure, etc. I learned about odex, kernel versions and other fun stuff that will surely waste (in a fun way) many hours of my time in the near future. Can't wait.

P.S - if you want to follow me on Google+, you can use gplus.to/mosh. I don't know how long this link will last, though I hope forever.

Sunday, July 10, 2011

When the Safety Net Fails

It's been quite some time since my sysadmin/DBA skills were put to test. Usually, when they do, it means something bad has happened.

Recently, a server I'm responsible for, suffered some a catastrophe in the form of a power outage. Usually, when such things happen, and the UPS (if such exists) fails, one is still relatively safe, since corruptions to the data itself will be handled by the RAID. This means that if one HDD fails - you can pull it out and push in another - and everyone's happy.

Not my case. In the last power outage something far worse has happened - the RAID controller died. As you may know, with many RAID controllers this means long nights of data recovery, since rebuilding the RAID will cause initialization of the disks, which means total loss.

This is the kind of the events no one is planning for in terms of redundancy. The only redundancy possible is a second server in a cluster configuration, but it doesn't solve exactly this problem, and has its costs. Backup is another form of "redundancy".

So, the component that was supposed to save us in case of failures - failed us.
Luckily, with some witchcraft, we managed to reconstruct the RAID, losing only 1 of the logical drives. That drive had to be restored from backup. Yet, that was the easier thing to do, as another drive, containing the DB, appeared to be alright, while it actually hid a far worse problem - corruptions in the DB. Did I already mention it's good to have backups?

My conclusions were also applied on my home equipments - have a detached (as in "doesn't require power 24/7") backup, and get yourself a good UPS.

Sunday, July 3, 2011

Why I Love C# and Mono?

Let the comments in the code do the talking.
--------------------

using System;
using System.Collections.Generic;

public class Iter
{
    public class Book
    {
        //short way to declare a property:
        public string Title { get; set; }
        public string Author { get; set; }
    }

    public static void Main(string[] args)
    {
        // implicit type, yet still a strong type:
        var books = new List<Book>
        {
            // inline initialization:
            new Book { Title = "Book1", Author = "Moshe" },
            new Book { Title = "Book2", Author = "NotMoshe" }
        };
       
        // closure, lambda expression:
        books.ForEach(book => Console.WriteLine(book.Title));
    }
}

--------------------
Did you know C# has all of those cool features?
This is why I think that even if you're not going to write code in C#, you should get familiar with it.