Android: Google contacts and thunderbird

I have recently, maybe a bit delayed, got my hands on an android smartphone. My old regular mobile phone stopped working so I decided to take the step and embrace the new big thing so I got myself a Sony Ericsson Xperia Mini Pro. However things were not as smooth as expected.

The ugly:

The first impression was that the phone asked me for a google account. I inserted mine without a second thought although later that second thought came to me and I started thinking scenarios of what would happen if I had no google account. That was an ugly introduction google thank you very much. Before even getting to use it as a phone I started connecting to many social service like facebook, linkedin and skype. It took no time to clutter my contacts with a mess with people from all these services and also see that people that I had only contacted via email were there to give them a call as the google account had already synced my contacts.

The things went out of control when I wanted to use the PC companion to get contacts from an old phone. Unfortunately for me my old phone would not operate at all so I had to use an even older Nokia phone that did not support en mass dispatch of all my contacts to the new phone via bluetooth. In order to get the contacts from it (and thus the valuable phone numbers to make the phone usable – it had only profiles and emails to contact so far…) I had to install the OVI suite as well. So I started cluttering my computer as well. Finally PC companion decided to recognize the Nokia phone as connected and copy all the contacts from it. Then I was shocked. There was no option of sending these contacts directly to the phone and make it as easy and clear as possible. Instead it asked me whether to add these contacts to the google contacts OR replace the google contacts with the current ones. Of course I chose add because losing all my google contacts over the phone contacts seemed to be a ridiculous idea.

So the phone was inoperable. That is because although Android tried so hard to merge the same people into a single account and make the contacts look really nice it miserably failed. And this is because I am Greek and we Greek people use multiple ways to have our names written in latin characters.This resulted in some contacts to have even four different instances! And this is where I realized that this was ugly and I had to do something about it.

The bad:

My solution was simple. Remove all the useless accounts from the contact sync (use only google) and now that all my contacts were there I could easily spent a few hours merging them (and deleting obsolete ones) and consede that I would have all my contacts in google. I spent an afternoon doing that but then I did something foolish, and that was because till this day when I thought of phone contacts I thought of something local, only in the phone. So wrong, this is not the phone anymore it is my google account. So as I wanted a fresh start I deleted all contacts on the phone to copy the new ones. MAJOR MISTAKE.. When the sync took place everything on google contacts was deleted except for a couple of contacts that I had altered before erasing everything on the phone. The sync worked fine but I got a lot frustrated as I had to do this all over again.

U mad?

The good:

So here we come to the final sollution. Soon enough I realised that if everything was to be used with the google contacts it meant that my new mail comrades should be updated there too, so that I would be fully functional on the phone as well. But I use thunderbird for my mail thus the sync is not automated at all. There was a rant at that point of the profanity of the lack of a global standard of the contact format but I settled my self with using a thunderbird plug in and stop sulking about the situation. Introducing Google Contacts! It is a simple add-on that creates an address book for each one of the gmail accounts that you have imported on thunderbird and syncs there all the contacts. This is unifying enough for me. There is a minor issue though because the contacts that did not have mail at all (only phone number) did not appear on the lists but only on the general list of all contacts, not a big issue though as I don;t plan to use thunderbirds to make calls anytime soon. Thus I was able to backup all contacts on the hard drive in a .ldif file using thunderbird and now all this will be synced thourgh the net and that I won’t have to worry again.

Verdict:

Apart from forcing me to unify everything under it, google achieved to make me have a single place to keep my contacts. This is something that I did not feel the need to have so far but now that I see it happen I realise its potential. However the ranting will continue!

Symbolic calculation using Matlab

The thing is that some times running a simulation over and over again makes no sense. One have to see the mathematical formula that is being computed to make some safe assumptions and change his approach on a subject. Without getting in detail on where someone could use something like this, Matlab gives the possibility of symbolic calculation. That is, if I want to see how the output of function call_func affects the inputs A and B (for a really long list of reasons) I can use syms.

Thus the code:

 
syms A B
result = call_func(A,B);

The above code stores in result what would be the result but with A and B kept as symbols. So if function call_func computes the A^2 + 2*A*B + B^2 (that seems familiar…) we get:

result =
A^2 + 2*A*B + B^2

Which is pretty straightforward but I could not come up with something more practical. I use the syms command lately to observe the impact of each coefficient in an FFT. Also I used in before to get the result of the multiplication between two large matrices so that I could use it as a formula instead.

Sony VAIO bloatware list

After having to remove manually all the useless software preinstalled to my computer I decided that a list to remind what is useful and what’s not would be nice.

  • Vaio Care – Recomended , maintenance tool
  • Vaio Content Metadata Intelligent Analyzing Manager – Used for media library
  • Vaio Content Metadata Intelligent Intelligent Network Service Manager – Used for media library
  • Vaio Content Metadata Manager Settings – Used for media library
  • Vaio Content Metadata XML Interface Settings – Used for media library
  • Vaio Content Monitoring Settings – Used for media library
  • Vaio Control Centre – Recommended, control panel for many useful things on the laptop
  • Vaio CW screensaver – Media content
  • Vaio Data Restore Tool – Software used to restore erased data
  • Vaio DVD Menu Data – Software used to create DVD menus
  • Vaio Entertainment Platform – Media
  • Vaio Event Service – Recommended , makes all he extra buttons and the fn functions work
  • Vaio Gate – The floating menu on top of screen
  • Vaio Gate Default – Settings for Vaio gate
  • Vaio Marketing Tools – Seems useless, I uninstalled
  • Vaio Media Plus – Media
  • Vaio Media Plus Opening Movie – Media
  • Vaio Movie Story Template Data – Media
  • Vaio Original Function Settings – Media
  • Vaio Personalization Manager – Media
  • Vaio Power Management – Recommended
  • Vaio Premium Partners – SONY partners, uninstall
  • Vaio Smart Network – Update: Recommended, Wireless devices manager
  • Vaio Transfer Support – To transfer media among devices
  • Vaio Update 5 – To update SONY software
  • Vaio Wallpaper Contents – The wallpapers in the device

Personally I prefer to Unistall everything but:

  • Vaio Care (useful)
  • Vaio Power Management (useful)
  • Vaio Control Center (useful)
  • Vaio Event Service (essential)
  • Vaio Wallpapers (because I like them)

I believe that the only thing essential is the Vaio event service. I used to keep vaio update but at some point it was installing some drivers for Playstation 3 controllers to the laptop and I find it really stupid to keep now. Also I remove McAfee, Norton, Arcsoft and any other software that may be there that I don’t use.

The above list is from a CW series VAIO. It is not complete as there are a couple more programs that I don’t mention (such us the media gallery, I think) because I don’t remember them and I don’t plan to recover the laptop to factory settings anytime soon, I just got it working! Hope that this is going to be helpful for many other trying to make their VAIO working machinery and not a digital playground of SONY crapware.

LaTeX issues and portability

My laptop needed repair lately so I sent it to SONY. Thus I will be without it for a couple of weeks. I had to back up everything before doing so, which was easy due to good file organization.

I used a flash drive to install portableapps.com to enhance the portable experience. However if you plan to work in solely one computer using the flash drive is of no use. It is really slow and has limited capabilities on the programs you can install and use. So I could not have LaTeX or Matlab. I know it is a long-shot to want to run these from a flash drive.

Fortunately I had a computer available, I created a new account, made anything else installed on that computer transparent to me and everything I installed transparent to everyone else. The only problem was when I was about to use LaTeX. Nothing worked and no packages were installed due to the transition from LaTeX 2e to LaTeX 3. I realized that I had to update MiKTeX as some packages, in particular expl3.sty, had become obsolete. So running the MiKTeX updater twice in admin mode is sufficient to solve the problem. you can find more detailed instructions on that in Greek though, here.
Afterwards I got another error while compiling the code:

'xdvipdfmx' is not recognized as an internal or external command, operable program or batch file.

I read that when such an error occurs it has to do with the OS. In windows all you have to do is add the path containing the xdvipdfmx to your PATH environmental variable. However this requires restart to work and until I realized that I got a bit frustrated. But now everything is fine and I can still work without the laptop for some time. The only thing missing is a microphone for Skype usage and a more effective back up strategy. When you use your personal PC, backup can be easily automated. However when you use a temporary one, the back up is between mobile devices all the time and it becomes a tricky business. But more on file organization on another post.

Matlab Start Up

It is often frustrating, distracting and demotivating when I start Matlab and I have to start a series of commands, most frustrating of all the current directory. In order to automate things a bit the use of startup.m as well as the finish.m comes in handy.

To use this (in Windows there are also similar ways to use in other OS but I haven’t one available right now) one should create a shortcut (e.g. the on in start menu which I prefer as the only thing to start matlab is pressing the windows button and type “mat”) and edit the start in, in the properties menu. The target should be the directory with the startup.m file. In the file one can find:

 
cd c:\...<desired start up path >
...<any other matlab operation>

Any other matlab operation can be another script or matlab code. Typically initialization of parameters that have to do with the workspace mostly, like the plot styles and font sizes. However if you use a script you can run immediately the desired code, although I don’t find any particular reason for someone to be so hasty…

Finish.m works the same way and can be used to store data after finishing a simulation. As far as this is concerned I find it useful sometimes to export data to excel (like mentioned in a previous post) for further manipulation as in the following code example.

save results/testTIMES testTIMES
save results/testSNR testSNR
save results/testBITS testBITS

xlswrite('results',testBITS,1,'B1')
xlswrite('results',testSNR,1,'C1')
xlswrite('results',testTIMES,1,'D1')

From Opera mail to Thunderbird

It has been more almost a year that I have been using Opera mail for my email needs. I must say that it is one of the best desktop mail implementations that I have used. However I wanted to have calendar and to do lists as well and Opera is not providing that in a convenient way.

Thus I was thinking of using Thunderbird (which I used before). I was thinking about the migration for weeks. There were features in Opera that I did not like to sacrifice. One of them is Opera Contacts. The way Opera lets you organize your contacts and view your mails by contact is something that I found very useful from time to time. Also using these little faces for each contact allowed me to identify the significance and the origin of a mail in a glimpse and that is something that I am going to miss. Plus it made my mail way more pleasant.

Till now I used calendar and to do lists using Rainlendar. Rainlendar is a really subtle program that used to decorate my empty desktop but I must admit it is not a good one to keep track of a to do list and calendar inputs. I never felt I was in control with it although using it is really straight forward. Thus I migrated my calendar and to do lists to Thunderbird. There the calendar is a bliss. Maybe it is not as good as Microsoft’s Outlook solution which might be the best in the domain but still really good. A note should be done here, I don’t want to use Outlook, I don’t feel confortable with it.

My first obstacle during the tranfer were the contacts. The Opera exports the contacts in .adr format which is an Opera specific format. It cannot be imported to Thunderbird directly (which is a same) and I had to use a converter found on here. The converter gets .adr files and exports .tab or .cvs (tab separated or comma separated contacts). Although the converter seems to be old (it mentions Opera 7) it worked just fine with my Opera 11.50 contacts. The problem with that is that any data I had on the contacts were lost apart from the name and the address. As Thunderbird contacts have many more fields available it did not bother me much. After a couple of hours most of my contacts were in good shape.

In an attempt to get those small faces that Opera uses I installed the Display Contact Photo Thunderbird add-on. However this only got me to have some more images to use that will be displayed only when I was to write a new mail. Not as helpful as I wanted it to be but I kept it.

In a second attempt to get the contacts on the side and trying to get access to the mails of single contact easily I tried to install Contacts Sidebar Thunderbird add-on only to find out that it is not compatible with Thunderbird 6… To cheer me up a bit I got a wood looking theme for the Thunderbird which I really liked.

However, there are still a couple of issues that I am going to try to resolve. These are the text wrapping of my mails that will render them more readable. This is a features that I have seen in mails that I receive. I suspect that it has something to do with Microsoft’s Outlook but I believe that there should be something that can be done about it in Thunderbird.

That is the good part of using Thunderbird. There is almost an add-on for anything that you can think off. However this may lead to a really slow experience using the application. so one must be careful.

Finally, Opera seems a bit barren now that I removed the mail from it. However it still has the feeds that I get there. I really like this browser and I plan to continue using it as it completely serves my needs.

Matlab profiler

A really useful tool for code optimization in Matlab is the profiler. Using the profiler we can find the really computational intensive parts of our model and by trying to optimize them we can reduce heavily the computation time of the simulation. We can find the profiler on the desktop –> profiler (as seen below):

matlab_profiler01

Once opened we can run any code we want through the profiler from the “Run this code:’” bar as seen below. I run a script of my own called prediction_script.

matlab_profiler02

Once the code is ran we get a detailed report of how much time each function we use is called and how many times it is called throughout the simulation.

matlab_profiler03

In the above picture we can see that the total time of the predictor script is 52.865 seconds. However only 0.031 seconds are used to run the code in the predictor script (this is the self time). so in my case the prediction script calls the predictor twice. and the predictor calls any other function.

The most computational intensive function in my case is the get_value which is called 739180 times and lasts for 18.697 seconds. It does not call any other function (both the total and the self time are the same).

By clicking on the get_value we get the detailed information on where the most computations are done. By using the profiler often we get to know which operations are time consuming in Matlab and end up writing better code.

matlab_profiler04

As we can get information on which functions call the selected function the profiler can also be used for reverse engineering in case of unknown code.

So if I get to make the get_value function faster or I manage to call it less times then the simulation will end up faster overall. Easy as pie. A really useful tool!

Mind map Example–Real Time Systems

After a brief experimentation on the mind mapping software in the previous post, I got to choose which program suits me best and check what I can do with them. As I got my hands in remembering some thing about real time systems I made a graph about them using both of the programs.

The Xmind was really a pleasure to see all graphics and such but it was a bit sluggish on my laptop. Moreover most of its functionality was locked and they wanted me to upgrade to pro to use it so no real interest there. Finally they wanted me to make an account and log in each time I use the program. I am not really fond of such an idea thus I really don’t think that I’ll be using the software in the future…

On the other hand Freemind was really simple and after a while I got the grip on how to design my map pretty easily. I don’t know the programs full potentials as there seem to be many options which I did not know how to use yet but the program seem to have many capabilities. I created a simple map which is shown in the picture below:

Real_Time_Systems

I used really basic operations of the program to end up with the above results. However there seem to be capabilities such us exporting to java applet, HTML and other formats, as well as program integration with a browser. Finally I suspect that there is a way to link multiple maps together resulting in an awesome way to browse a data base.

I wish I new about this data representation earlier. A simple map depicting the most critical concept behind an idea makes it easy to refresh your memory an invaluable property! Have fun with your mind maps!