Tuesday, August 17, 2010

Google contact image not synching in Picasa

I have been using google mail for a long time now and have always been impressed on how well it does what it needs to do. The recent update has also been a great improvement, especially the (new) functionality in the contacts (especially the merging of contact after importing from other sources). I have started to put my contacts in gmail and have been updating the images too.

Another google application I use often is Picasa. The people functionality in Picasa (with the face recognition) a great tool and is one of the reasons why I am so fond of Picasa.

After I had updated and reorganized my contacts (in gmail), I assumed that they will also available in Picasa. My assumption was correct, with one disappointment: the contact image did not show up. I also realized that I had now duplicate contacts: the ones in Picasa I created during face recognition and the contacts from gmail. Unluckily I could not find any way to merge them.

So my feature request for Picasa is right now: 

  1. Extend the “central” contact list (used by gmail) with all the properties (including contact image, etc), with the ability still to check whether a contact in Picasa should be synchronized, which also seems to be the second most requested feature in Picasa :)
  2. Ability to merge an existing Picasa portrait/contact with the “central” contact list, meaning that when the Picasa contact has an image and the “central” contact doesn’t, it would copy it and (also the nickname), without loosing all the photos where the contact has been spotted.

Hope this will get implemented soon.

Friday, August 13, 2010

Fireworks tips

There is denying it, Adobe Fireworks is my favorite Adobe App. I have been using it for ages it seems and am still satisfied with it. (I haven’t used CS5 version yet… but I am sure I will not be disappointed with it). For images and projects for the web, it is perfect. Photoshop is mostly overkill. What I especially like about Fireworks is that is a hybrid image program; you can work on pixel level and still use vector tools.

Here are some tricks and tips I use often in Fireworks.

Convert images to Grayscale

Converting images to grayscale can be done by using the Creative menu.

image

 

Pasting new image

One useful feature of Fireworks is that is monitors your clipboard. If you have copied and image to the clipboard, you can start editing it by pressing Control-N (New) which will open up the new image dialog with the size of the image in the clipboard. After just pressing OK, you can paste it directly.

Fading images

Fading images can be done by using the Commands – Creative – Fade Image menu

image
image

You can further customize the fade by clicking on the layer mask, which shows you the gradient controller.

image 

Setting layer preview size

I usually do not make any changes in the preview size, however there are some situation where you would to see smaller or bigger previews. This can be easily changed by clicking on the Layer option dropdown – Thumbnail Options item.

image

 

Useful keyboard shortcuts

Below is a list of keyboard shortcuts which I use most of the time

TAB Hide/Show panels
image
Control – Alt – D Duplicate current selection/layer
Control – Shift – D Clone selection/layer (similar to duplicate, however duplicate moves the copy)
Control – K Full display
image
Control – Numpad + Zoom in
Control – Numpad - Zoom out
Control – Mouse scroll Zoom in and out
Control – G Group selected
Control – Shift – G Ungroup (grouped) object
Control – Alt – V Paste as mask
Control – A Select All
Control – D Deselect
Control – Up Bring Forward
Control – Down Send Backward
Control – T Transform
Control – Shift – T Numeric transform
image

You can also customize your keyboard shortcuts via the Edit – Keyboard shortcuts menu item.

See also the CS3 manual.

Tuesday, August 3, 2010

Unnecessary short variable names irritation

There is always a discussion between programmers (and code reviewers, etc) on how variable names should be assigned. Except the formatting (camel case, etc), there is also the issue of the length of variable names. Some people really dislike and even get irritated in short, non-descriptive variable names. Today I have encountered a blog post even given 5 reason why not to use short variable names. I find this discussion very unnecessary and people are really missing the point here.

The most important best practice in (readable) programming should be consistency. Having long or short variable names does not achieve this. Long variable names can be as confusing as short variable names.

An example: Let’s take the variable called total_order. What does this say… probably the total order amount, but is this including VAT or is including discount or including discount and VAT. Is the amount in US dollars or euro’s? Maybe it is not even the amount but the total items in the amount. Coming back to consistency, if the variable total_order is used in function x() as the total amount in USD and in function y() it is used as total amount in euro’s including discount, it really gets confusing. Having it called tot would force you to think (and investigate) what it would contain, which in some case would catch some nasty bugs then relying on a name of a variable.

As you can find reasons why not to use short variable names, I can find good reasons on not using long variable names. For me in variable names the following is more important:

  1. Consistent use of variable names, e.g.. using single character (or 2 character) variable names for temporary/looping purposes (like i or ix). This also means that shortening variables in the same manner. For example a variable containing a total should be throughout the program shortened to total and not to sometime tot and another time to totals.
  2. Use of comments explaining what a variable is required for and what it stores (and purpose). This means instead of using

    total_amount_vat_incl_discount

    I would prefer to see something like

    // contains total amount including VAT (with discount applied to it)
    totamount


    This clears any misconceptions about what the variable is used for. In the case of total_amount_vat_incl_discount: is the total amount including VAT or is it the total amount of VAT? 
  3. Readability. When having long variable names, the lines become unnecessary long and formulas look more complex. You actually loose the overview what is happening. For example, have a look at the following formula:

    ((total_order_amount_ex_vat – total_discount_customer – total_discount_sales_month) * ((1+ (vat_percentage/100)))/total_share_percentage) + total_amount_zero_vat

    (In this case too much total_ in the formula and it’s just too long)
  4. Programming speed. When using long variable names, it also means that you will need to type more (over and over again), There is counter argument that you should you a good editor, which allows auto-completion. However from my experience auto-completion does not really help here. If you have variables like: total_amount_incl_vat, total_amount_incl_discount, total_amount_ex_vat, total_amount_usd, you will get all of them and you will still need to scroll and find the correct variable. Most of the time, I even don’t use this functionality and just type it, because I am quicker then the editor.
  5. Minimize copy-paste errors during programming. Copy-Paste is a very common situation during programming, you mostly use an existing piece of code for a new module/function. If you have very specific variable names, you also start renaming/re-edit these variable names. During this process you always make typing errors or forget to rename one item, resulting in strange program behavior.

    Let me give a very basic simple example: You have a piece of code which does something in US Dollars. You copy paste it to a new function which does similar calculations in euro’s and have variables like amount_usd, amount_incl_usd, amount_usd_discount, etc. You will need to change them to amount_eur, amount_incl_eur, etc. You will also during this process make errors like instead of using amount_incl_eur, you use amount_inc_eur (missing l). It is just statistics, the more characters you need to type, the bigger the chances of typing errors.

At the end, as mentioned earlier, the focus should be on consistency and readability then the actual naming variables and you will need the right balance between what is long and what is short.

Happy programming

Thursday, July 29, 2010

jQuery plugins July 2010

InputNotes


A jQuery plugin to add notes below textareas and input fields based on regex patterns. Great for validating forms and showing additional info.

Equal Column Heights


This jQuery plugin sets the height of selected elements equal to the height of the highest element with the ability to animate the change.

Full Calendar


FullCalendar is a jQuery plugin that provides a full-sized, drag & drop calendar like the one below. It uses AJAX to fetch events on-the-fly for each month and is easily configured to use your own feed format.

Button Tutorials


A nice compilation of some of the helpful tutorials that can teach you on how to use jQuery in improve and creating special effects for the buttons of your website.

Poshy Tip


A new promising tool tip with a lot of options for configuration and easy to use. It also works very well with forms.

Thumbnails Navigation Gallery


Extraordinary navigation using images, a great tutorial by codrops, definetely worth checking out.

jQuery.Spritely


A plugin for creating dynamic character and background animation in pure HTML and JavaScript. It's a simple, light-weight plugin with a few simple methods for creating animated sprites and dynamic scrolling backgrounds.

and for the iPhone and iPad experts: jQuery Swipe

Friday, June 25, 2010

Renaming Networking Printers in Windows

I had never realized that you are not able to rename network printers, but it is sad and true. There is however a work-around which allows to rename network printers indirectly.

Instead of adding your printer as a network printer, add it as a local printer with a new port. In the new port specify your network printer share, eg. \\printer-server\printer-share-name. After selecting the model/etc, you have a network printer which feels like a local printer, which you can rename.

Thanks cobolhacker for sharing this info.

Thursday, June 24, 2010

Firefox 3.6.4

Yesterday I have updated to the latest version of Firefox, version 3.6.4 and actually I am amazed. I have been using Chrome for a while because of it's speed compared to Firefox. I must say that the latest version of Firefox now starts up almost as quickly as Chrome and the respond time is also superb, especially if you compare how many add-ons I have installed.

I looked at the memory usage and this has also become better, actually even with the large amount of add-ons Firefox uses around the same amoung of memory (on a fresh start) as Chrome.


I did have a same issue with our network/proxy. I know our company proxy needs authentication and I have always been struggling to get non microsoft applications to work. It loaded some pages and some it just would not load... crazy... after investigation of http traffic I got denied errors. The fix was easy:

Navigate to
about:config ->
network.automatic-ntlm-auth.allow-proxies -> true
network.negotiate-auth.allow-proxies -> false


Details at mozillazine.org

Great job for the Mozilla team!

Friday, June 18, 2010

Getting rid of Content Preparation Progress dialog in Reader 9

Since I have installed the latest version of Reader (9), each time I open Adobe Reader, it start scanning the document with a message: Please wait while document is being prepared for ....

This is really annoying, Reader is not the fastest and things like this makes it even slower.

Fix: Goto to the c:\Program Files\Adobe\Reader 9.0\Reader\plug_ins\ folder (or the folder where you have installed Reader) and remove the Accessibility.api file.