Perl strict refs

Just a short note on Perl strict refs. I had to dynamically load a module and call a function in perl while using strict mode. Originally tried this way:

my $module_name = "Blah";
eval("require $module_name;");

if ($@) {
  die "Failed to load module: $@\n";
} else {
  my $func_name = $module_name . "::do_something";
  &$func_name("some args");
}

But got a warning that I am not allowed to do this while in strict refs. To fix this, had to change the last block to

  my $func_name = $module_name . "::do_something";
  my $func_ref = \&$func_name;
  &$func_ref("some args");

And all went fine. One other alternative was to use the next setup:

  my $func_name = $module_name . "::do_something";
  { no strict refs; &$func_name("some args"); }

Which would cancel strict refs in a short scope. But I didn’t like it :)

Changes

Too many upgrades and other changes happen recently. First of all – new WordPress with new look and all those nice things. I am completely happy about it. Being system administrator for a while, I bet wordpress is the easiest thing to upgrade, compared to all the rest.

Android 2.2… As I have purchased Samsung Galaxy 3 (i5800 or Apollo), I was checking around and found out that I can upgrade to newer version of android, which was supposed to be faster, better and so on. Fighting for a day or so I did managed to upgrade the phone. One thing that I got weird – I had to use Windows PC with Odin tool to do the upgrade of a Linux based phone. I am not sure if there is a way to do it somehow simplier and from Linux PC, but that was the only proper way I found out. On the other hard – it really was a nice thing. My phone became much faster (can see that with no bench-marking) as well as some apps got much better (especially contacts. No I can use native contact application and like it more that GO Contacts, that I used while running Android 2.1).

Google+, oh that’s a nice thingy… I like pretty much. Being a big fan of Google products at one hard and a user of all those social network sites, I find Google+ to be very fast, clear and handy. One thing that I regret yet is a limited amount of people there and invite-based friendships that have some limits, but I bet this is a matter of time and I do believe that Google+ will find it’s way out there.

There are few other changes here and there, but I won’t mention them due to many reasons for each of them. Generally I like what’s going on and while I believe things will shape around, I am really glad to see all those changes.

Samsung Galaxy 3 i5800 and Android

As I have mentioned before, I ordered an Android phone from Amazon, but unfortunately the order didn’t go through properly due to stock issues and I decided to go outside and just buy from the local shop. Ended up getting a Samsung Galaxy 3 for 180 euros and pretty happy with that. Using the phone for 3 days and here is a long post on the issue:

Initial Startup

First of all I was pretty surprised not to find something like “you need to charge your phone for 8 hours before using it” in the documentation which comes with the phone. Instead it was stating “you need to charge your phone before use” or something like that. Charging the phone took about 2 hours (until it notified me that a battery is fully charged).

When first booting the phone, all UI was in Greek (probably because I bought in a local shop of Greek-speaking country), but what pissed me off a quite a bit is that it didn’t give me any option to select language and I had to find the path through to settings using Greek, which I am not that good at :)

Problems

Since the phone and Android platform is pretty find, this section will be short and might have some solutions which I didn’t find yet, or is a limitation of my choice.

First of I really like sync with Google services, but somehow contacts (and especially groups) are not synced correctly in all cases. I don’t have all groups that I have on Google as well some userpics are missing and so on, but I am checking this out. Currently using GO Contacts to manage people in my phone :)

Second is a hardware QWERTY keyboard that I used to have on my Sony Ericsson P1i. I really miss it. I do have QWERTY onscreen keyboard here, but I just cant physically feel the buttons which is a bit not handy, since I m missing the keys by accident and it is very hard to type SMS while on the go/in the car. But this has more to do with a choice of the phone. I could go with one that have hardware keyboard. Currently using GO Keyboard by the way, looks much better than default one. Swype didn’t do a job for me. Completely different approach that I didn’t like.

Internet connectivity is another issue, since I am using pre-paid SIM card and connectivity is very expensive. Good thing is that there is a lot of places with free WiFi around, but proper internet on the go would be much better. Will think on changing the connection package for a phone.

Software

Here comes a whole list of software that I am currently using on the phone and which I like. Some items will have descriptions and comments, while some are too obvious to explain:

  • Android Assistant – like a task manager and optimizer for performance. Nothing much to say, just wanted to see what’s going on with my device
  • Angry Birds, Bubble Break, Jewels, Ace Solitaire – games
  • ClockQ – a nice clock widget for home view
  • JuiceDefender – a kind of a magic software, which optimizes battery performance. Advised by my brother and installed yesterday. Can’t judge it yet, but it claims to already improve battery performance by 1.15 times
  • Compass, Google Sky Map, Speed Test (speedtest.net client) – nice gadgets :)
  • ConnectBot – an SSH client with support for key auth. Very handy for sysadmin.
  • Contact Photo Finder – can’t say much about it. Name is self explaining, use is unknown yet.
  • Dropbox – amazing thing for dropbox users! Just love it!
  • Everdroid – a client to everdroid (former mobical) for contact sync. Needed to check old contacts, will uninstall it later on
  • Facebook, Foursquare (someone explain me why I need this),  Twitter, Vkontakte (russian facebook), LinkedIn
  • Fancy Widgets – weather forecast widgets
  • FBReader – ebook reader for .fb2 format. Amazing to use along with dropbox and FBReader for my laptop
  • GO Contacts, GO Keyboard, GO Launcher GO <all other products> – a very nice line of products to replace default components. Happy so far.
  • Google Reader
  • IM+, Skype – For all my IM needs
  • KeePassDroid – an android client of KeePassX software I use on my laptop as a password manager. Nice thing along with dropbox again
  • All default applications like Gmail, Gmaps and so on.

Pretty much that’s it. Don’t know if I will need anything else, but will be checking around for more. I also heard a lot about evernote, delicious and google docs clients, but I am not using these services even from my PC, since I stopped bookmarking things for few years now and either subscribe with RSS to what I need to read constantly or use Google or post here what is very important and can be lost. Meanwhile I don’t like notes and don’t use much documents. For those of you who does – checkout for the apps.

I have also checked Opera as a browser, but removed it. It is a nice app, but lacks a bit of integration with other apps and tasks. Builtin browser is ok, missing tabs, but supports multiple windows :)

Conclusion

Overall I am pretty happy with a new phone. First of all it changes a way of thinking about phone. It is not a phone, not a smartphone – it is a communication platform in the pocket. Still thinking over about what my Samsung Galaxy 3 is to me :)

The hardware is not the high end one, but it very nice for it’s price. Sometimes the phone lugs, especially while changing screen orientation or in games with lots of effects, but it is more than ok for normal use, not playing :)

Will be checking for more apps and way around to make my life even better, but compared to previous experience (talking P1i), it is a major step forward.

Waiting for Android

As my old Sony Ericsson P1i is almost dead and going that direction very fast, I had to do something about it. Since I am not in a position to buy an expensive smartphone now, but still wanted an Andoid phone, order myself a Samsung Galaxy 3 (i5800) for EURO 140 only – nice price for a phone that can serve me for a while until I get something better.

Going around the web and checking what’s there for Android, I found a huge amount of apps, and for sure, when I will have a phone with me (expected to ship within 10 days), I will be installing and checking a lot of stuff, but since a lot of you already have an Android phone, it would be nice to hear your recommendations on different applications. What do you run and like? Put it this way: which apps you will install immediately if you change your phone to another Android?

Actually, any recommendations would be better than nothing, so while I have few days before I have a phone, I can go and check, as well as safe some time on trying apps, since I know a lot of them duplicate each others functionality.

Comments from you are highly appreciated :-)

.NET VB Visual Studio and MonoDevelop

I saw a pretty interesting case today. My lovely girlfriend is studying for computer science and while doing VisualBasic class, she created a software in Vistual Studio for her father. Later on we put Fedora on her laptop and now she needed to do some improvements in the application. We got MonoDevelop with mono-basic compiler and opened the project of VisualStudio on MonoDevelop. All seemed fine, but the code would not compile.

Next to the line of code “Me.MainForm = Global.OurAppName.Form1” it was giving an error: “OurAppName.Form1′ is a type and cannot be used as an expression. (VBNC30691)“. Note that this line of code was produced by VisualStudio. The issue has to do with object creation. While normal syntax would be “objectVar = New ClassName“, the actual code was of “objectVar = ClassName” format and obviously was giving compile error. Converting a code to “Me.MainForm = New Global.OurAppName.Form1” solved the issue perfectly well, but a question is: how an IDE would do such a mistake and why it would compile under windows?