Archive Page 2



New year, new life. Got my camera bag stolen with all the gears in my hometown Turin. Yesterday I was looking back to the old pictures, and I found some good ones made with a 10 year old super compact camera, Pentax Optio S. I found this one and I like it. Unfortunately I lost also this camera too, during the misadventure in Turin.

Another funny video I found around.


I/O Exception handling

I very much prefer this approach:

OutputStream out = new MyOutputStream(...); //may throw IOException
try {
    //use the stream
} finally {
    out.close();
}

than this:

OutputStream out = null;
try {
    out = new MyOutputStream(...); //may throw IOException
    //use the stream
} finally {
    if (out != null) {
        out.close();
    }
}

I just find the first example correct and the second incorrect. I see the second ‘pattern’ everywhere.

Opinions?

Sunset on Salzburg by Luigi R. Viggiano
Sunset on Salzburg, a photo by Luigi R. Viggiano on Flickr.

I got very positive comments about this picture I made yesterday evening in Salzburg. My only picture in flickr explore was another sunset I shot in Dusseldorf, and this one is getting good attention today, so I hope it will be my second flickr explore pic.
Some work colleagues suggested a bit of fill light at the base. I actually used some vignette effect to focus the viewer attention on the center; if the composition was a little bit better I could have cropped the base area a little bit more still keeping the sun and the mountains in the right position.
Still, it looks like everybody likes this shot. So here I share it also on my blog.

Venetian Mask

Venetian Mask by Luigi R. Viggiano
Venetian Mask, a photo by Luigi R. Viggiano on Flickr.

I made many pictures of those masks in Roman shops. In some shops I saw same sign saying "no picture please". Eventually the idea to shot those colorful masks is not too original, and the shop owners get tired of people coming in just for pictures. BTW those masks are for sure the most colorful subjects I found so far. And here’s another one.
The price for the most funny sign in a souvenir shop goes to the one with "for the sake of our health we don’t provide touristic informations!", wow :-)
In my ‘venetian masks’ set, this one above is definitely my favorite.

After installing OS X Lion I tried to burn a DVD in my macbook, and it turns out that this is what I get using Disk Utility:

I tried several DVDs (DVD+R, DVD-R, different brands, and tried to burn at different speed), with no luck. Also it refuses to read movie DVDs. But it can read the Snow Leopard DVD, so I hope that at least it can read common data DVDs.

I tried to reset the SMC and PRAM/NVRAM, no luck again.

Still remains to try some other burning software.

Reading support forums and searching on google has been a waste of time so far.
I don’t know if this is a side effect of Lion installation, or it is just a coincidence, but since now Apple didn’t ship any update. Only I find it quite suspicious that if you just search for “Lion superdrive” you find many people having problems with those two.

I used my DVD very few times, if it is an hardware problem it means that the claimed superior hardware quality of Apple is just another myth.

Big disappointment by Apple, either if it is a software or hardware problem. Super…drive.

Landscape Silhouette

This picture has been shot from the Rhein promenade in Düsseldorf. I remember I was having a bad day at home, so I went out for a photo walk, which extended to be till late evening. I come back with a lot of good shots. The sun was red and visible by bare eyes, and the buildings were completely black, projecting only their own shadow. At the time I didn’t know that this was a perfect subject for a ‘Silhouette‘ photography. I’m still a photo beginner.
This is my first picture on Flickr Explore. I increased the red a little bit, but this picture is almost a “straight out of the camera” one.


Looks like with the plugins I installed recently on my blog, the spam is completely gone away.

I didn’t want to install captcha, since they are quite annoying. But it looks like they are effective against spam. I found “Conditional CAPTCHA” which works in the correct way: the user insert the comment, if the bayesian filter identify the comment as spam, then a very simple captcha is displayed, so the user can prove that is a human being or a spam bot. If the captcha test fails, the comment is deleted definitively.
Additionally I am using “Bad Behavior” which checks the ip address against an online black list, and prevents suspicious ones to even connect to your site.

So, this is my list of WordPress plugins that have proven to be effective against spam:

  1. Akismet
  2. Bad Behavior
  3. Conditional Captcha

So far, so good.

I still moderate comments manually, approving/trashing them one by one, since I don’t receive many comments, it is feasible. But if this plugin team works so well, I might stop moderating the comments and let it run completely automatic.

OS X Lion

When I first had to use OS X I had hard time with some things that weren’t working as expected. I thought they were usability bugs, but of course don’t try to argue about that with a veteran Apple user, because “you’re ugly and stupid, and that’s the way it should be! And OSX has the best UI/UE evah!”. I used to hate those weird feature, and finally it’s a pleasure to see some of those things going away (so I was right!).

I list here what has been improved and what still sucks. Of course, by my point of view.

The enhancements that I (really) like

  • The full screen button on the top left, is a great thing. Also the fact that the apps get maximized in another screen, is a great idea. In fact, when one app is maximized, switching to other apps is a pain; having it maximized in another screen and the gesture to switch between screen is very practical. Apple guys, congrats for the innovative idea.
  • Also I like the dashboard on the left of the desktop.
  • Launchpad is nice. I like it. I don’t like that I cannot activate it with a shortcut, and I cannot use arrow keys to select which application to launch.

Finally also on OS X…

  • Windows resizing is decent: finally also OSX can resize windows not only from the bottom-right corner, but from all the frame around the window. So that grip only on that corner was lame, wasn’t it?!
  • The Terminal.app is improved, almost ok. I like the full screen mode, so I decided to give it a second chance, abandoning iTerm, at least for now. I had to create my own Settings, remapping some keys and colors, I attach it here: Luigi.terminal for myself as backup and for whoever would find it useful. The home/end key still don’t work in man pages and less, but I learned that pressing capital G and g, do the trick everywhere, included in vim. Still wondering what’s hard about making that work.
  • The selection in list (example: file selection in Finder) with shift-up and shift-down, finally works as it should.
  • The crazy click-and-reclick-to-focus model has been finally replaced a more natural one. OSX is the very last OS to realize how focus has to be implemented.
  • With the App Store, finally apple has a kind of ‘package management’ tool. Very nice looking, as well. I am wondering when they will realize that it should also provide the Uninstall feature. Since application installed from a .pkg file are impossible to uninstall.
  • In Finder.app to jump to a file from another, you just type the letter corresponding to the name of the files, like in Windows Explorer o Linux Thunar/Nautilus. But, when you switch to column view, this functionality was not working anymore… with Lion it finally works. Keys are still faster than any mouse/touchpad; teechies know it.
  • Cut and paste in Finder was not working with Leopard. I managed to fix it with some research on google. I didn’t do anything to fix it on Lion, maybe they fixed it (if the fix I made before is not responsible for it still now).
  • They removed Front Row application. Great! That stuff was garbage. And it was popping out unwanted all the time, activated by some key combination (cmd-esc I think).
  • I was shocked to see that on Leopard you could do a ‘touch /foobar’ without root privileges. What kind of Unix was that? They fixed this in latter version of Leopard and in Lion too.
  • I like the full screen in Safari. If I am not wrong, Safari was the only browser without a full screen before, now it has a nice one. Still Chrome does a better full screen, since it hides also the navigation bar and shows only the actual internet page, with no distractions.

I’m undecided on…

  • The scroll gesture has been inverted. I am getting used to it, but I still think that previous direction was more intuitive.
  • Font smoothing: I was strongly against it at beginning. Now I’m kind of neutral. I still hate it in the Terminal, btw, and I always disable that there.
  • All the animations. I like most of them, I don’t like the elastic bouncing that has been copied from the iPod/iPhones. Although they can be disabled, I can live with it, so I’ll try them for some more time and decide later to keep or remove them.

This still sucks!

  • Enter to rename, instead of activating/opening.
  • You installed Lion, but what if you wanted to burn the DVD? You can, but it’s not so easy. This is quite unfair from Apple. On the tips below for a short guide.
  • The maximize round button on the top left corner of the windows, doesn’t maximize. That’s just stupid. Hope one day they will give the possibility to configure that behavior.
  • I never liked the menu bar shared between application. There’s nobody that will ever convince me that is a good idea. I know Ubuntu is copying stupid things like this, still doesn’t mean that is a good thing.
  • The windows close/minimize/maximize round buttons on the top left, and having no possibility to change that. I liked them on the right, but that’s ok, I am getting used to it.
  • The Finder still hides most of the files. I still haven’t understood what’s the criteria of the file hidden, and if there is a way to show all the files.
  • Java has always been late on OSX, and trickier to install with the documentation and sources… Lion doesn’t come with JRE, but you have to install it later. It’s not difficult, so it’s ok. What I don’t like is the directory layout they made up. I have to verify if the documentation and the sources can be installed and accessed easily. It was tricky for Leopard, hope they improved it. (but I don’t think so)

New OS, new problems…

  • The gestures for showing the desktop was perfect before, now I get that wrong frequently, since it’s a gesture that the OS confuses with others. That’s a pity because I use the desktop a lot to store files I am working on, and having an easy way to access the desktop is quite important.
  • When you close an application with cmd-q, when you reopen it, it will show all the last opened documents. Even if you open a document on your desktop, it will also open it, plus the last opened documents… that’s not a good idea. Fortunately it can be disabled in the Preferences.
  • One friend of mine reported that the fullscreen doesn’t work great when you use multiple monitors. I didn’t tried it yet.
  • The scrollbars disappearing. That’s bad specially in the browser (iframes, and scrollable divs). In the applications it is sort of cool, btw.
  • Launchpad: you click on the icon and it will show the applications; you click again and you return to the desktop. Fine. Now try with Mission Control icon: click once and it shows active applications; click again and it makes a mess. Not so good. I removed Launchpad and Mission Control from the dock and learned to activate them with the gestures, so this doesn’t bother me anymore.
  • When my laptop goes out of battery, it shut down completely instead of freezing. Potentially corrupting data. I don’t know if this is a new “feature” of Lion. It really sucks, anyway.

Some handy tips

With time, I got accustomed to some craziness of OS X, and I found the way to live with them. Or work-around them.

Screen Lock shortcut

I was complaining of the missing key combination to lock the screen on a mac. Actually I think that there is no real ‘lock’ shortcut. But pressing ctrl+shift+eject send the screen to standby, and if your setting are appropriate when the screen is resumed the login screen can be displayed.

Shortcuts

OS X is full of mysteriously assigned shortcuts, like the lock screen above. And the boot ones…
I found this link which is good to keep handy: Mac OS X keyboard shortcuts.

How to redownload OSX Lion and Burn it on a DVD

Once you have installed Lion, the installer app deletes itself. Like in “Mission: Impossible” movies. And from the App Store you cannot download it again.
Here is how to do:

Launch the App Store
While holding down the OPTION key, click on the “Purchases” section
You should see “OS X Lion” and “Install” should now be gray and you can click that to re-download Lion (you may have to re-authenticate within the App Store with your Apple ID).

To burn Lion on a DVD, here is how to do it:

Getting Lion from the App Store is convenient, but if you want a physical copy of the installation, you can easily make your own Lion install DVD or USB drive with Disk Utility.
If you want to do a clean installation of Lion (or you want to install it on a Hackintosh), you’ll need to install it on some sort of physical media. Apple will be releasing a flash drive installer for a whopping $70 in August, but you don’t need to wait (or pay twice the OS’s price) to get it. It’s very easy to burn Apple’s installer to a single layer DVD or flash drive of 5GB or larger.

Important: Note that the Lion installer deletes itself if you upgrade, so if you want to do this, you have to do it before you update your computer to Lion. You can always re-download Lion after the fact, but geez, who wants to do that? Once you’ve got it on your system, here’s what you do:

  1. Download Lion from the Mac App Store. The installer should show up in your Applications folder.
  2. Right-click on the installer and hit “Show Package Contents”. Navigate to Contents > SharedSupport and look for a file called “InstallESD.dmg”.
  3. Open up Disk Utility and drag the DMG file into the left-hand sidebar. If you’re burning it to a DVD, insert your DVD, select the disk image in the sidebar, and hit the “Burn” button. Skip down to the last step to use it.
  4. If you want to burn Lion to a USB flash drive, plug it in and click on it in the left-hand sidebar in Disk Utility. Go to the Partition tab and select “1 Partition” from the dropdown menu. Choose “Mac OS Extended (Journaled) on the left.
  5. Hit the Options button under the partition table and choose “GUID Partition Table”. You’ll need this to make the drive bootable on a Mac. Hit the Apply button when you’re done to format your drive (note: it will erase everything on the drive).
  6. Click on the “Restore” tab, choose the InstallESD.dmg file as the source and your flash drive as the destination. Hit the Apply button and it will create your bootable USB drive.
  7. Reboot into OS X and hold the option key when you hear the startup chime. You can boot into your DVD or flash drive from there.

You’ll not only be able to install Lion from this drive, but you’ll also be able to use Disk Utiltiy, recover from a Time Machine backup, and do everything else you could do with the old installation DVDs. Note that when you install Lion, it’ll create a recovery partition with all these features anyway, so you don’t need the DVD unless you’re doing a clean install. Though it’s always nice to have around in case something happens, like you erase your entire drive. Not that that’s ever happened to me 3 times in one week or anything.

Conclusions

Overall, I like the changes introduced by Lion. Still many things can be improved.
That’s pretty much all I have to say about Lion.

If there is any new feature you don’t like and you would like to remove, have a look at this article How to De-iOs-ify Mac OS X Lion; you may be lucky and find the way to restore some Leopard behavior.

St. Paul's Cathedral, Liège

Last week I visited Liège. It was rainy, and we found refuge in the Saint Paul Cathedral. The picture above shows how beautiful this church is. And photographic friendly. I was in Aachen Cathedral the week before and it wasn’t half much as beautiful as the Liège Cathedral, use of tripod is forbidden and interesting area are accessible only for pay. Liège Cathedral was a wonderful surprise that day; protected us from the rain and offered very majestic and suggestive views.
I’d like to visit again Liège, hopefully with a better weather. The city is very beautiful.




About

You are currently browsing the NewInstance weblog archives.

Calendar

May 2013
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Follow me

twitter flickr LinkedIn feed

Subscribe by email

Enter your email address:

Archives


Categories

Tag Cloud