Guido Kollerie

Blog moved

leave a comment »

This blog has been moved. The posts that I considered worth saving have been converted.

New URL: http://blog.kollerie.com/

Written by gkoller

Monday, September 26, 2011 at 10:52

Posted in Uncategorized

Samsung Galaxy S peculiarities #04 – Unlock Pattern

leave a comment »

I have got my phone protected with a unlock pattern. Before I can use my phone I have to unlock it by ‘drawing’ a pattern on the screen. This setting is easily enabled on your Samsung Galaxy S’ in settings under ‘Location and Security’:

Require unlock pattern

As I do not want people looking over my shoulder to see the pattern I am drawing I have switched off the ‘Use visible pattern’ option. The weird thing here is that this option only works if you are drawing the pattern correctly. If you draw the pattern incorrectly it will still display the pattern you drew:

Display of incorrect pattern

Although this does not reveal the correct pattern to anyone looking over my shoulder. It does display to them what the correct pattern approximately looks like! Making it easier to them to guess the correct one. If I switch off ‘Use visible pattern’ it should apply to both correctly and incorrectly drawn patterns.

Written by gkoller

Tuesday, August 3, 2010 at 12:07

Samsung Galaxy S peculiarities #03 – DatePicker widget

leave a comment »

Coming from a Palm background I am used to selecting dates using a datepicker widget that displays complete months at a time. It was somewhat similar to Google Calendar’s datepicker widget:

Google Calendar datepicker widget

The benefit of such a datepicker widget is that easily allows you to select a date in the future, say Thursday two weeks from now. You don’t have to do any calculations. Instead you can visually determine that that date is August 19th. Now compare this to Android’s datepicker widget:

Android datapicker widget

How am I going to determine what date Thursday in two weeks time is? You cannot do that easily. You either have to do the calculation or use the calendar monthly view to determine the date prior to creating an event. Very inconvenient.

If eons ago Palm was able to provide a proper datepicker widget on screens much smaller in size than your average Android phone’s screen, Google should have no difficulty in providing a proper datepicker widget in Android.

Written by gkoller

Tuesday, August 3, 2010 at 11:52

Posted in android, pda

Tagged with , , , ,

Samsung Galaxy S peculiarities #02 – Lags

leave a comment »

When reading up on reviews of the Samsung Galaxy S I often came across a side note or a Pros and Cons section that the phone would experience the occasional lag when switching between applications. During my first week of usage I did not experience this at all. However starting yesterday I’m experiencing serious lags.

For instance when I am in the dialer/Phone application and the Keypad is selected, switching to the Contacts tab can now take up more than 5 seconds! That really is an impediment to using your phone comfortably. And this is not the only spot where it happens. Switching between any application can take up many seconds.

Switching between tabs in the dialer/Phone app

The Culprit

Some people think they have found the cause for this issue. They claim the internal SD card of the Samsung Galaxy S is kind of slow. Supposedly it is this SD card that is used for caching application data. Solutions suggest using the internal memory or faster external SD card for this purpose. Both solutions however require rooting your phone.

Having said that Samsung is the one that should provide a solution. For a phone they tout as harboring the fastest mobile processor (the 1Ghz Snapdragon) application switching performs horribly on this phone.

Update

It seems that a couple of utilities I had installed had at least something to do with it. Following popular advise I installed both JuiceDefender and SystemPanelLite. Those tools each serve a purpose and might be exactly what you were looking for, but for me they were a solution looking for a problem I did not have.

Once both tools were uninstalled my phone felt somewhat faster. There still is an occasional lag and it still feels slower then what I would have expected from a phone with a 1Ghz processor. As such Samsung still has an issue with lags to solve and they better use the Froyo update to deliver it.

See also:

Written by gkoller

Tuesday, August 3, 2010 at 07:29

Posted in android

Tagged with , , , , ,

Samsung Galaxy S peculiarities¬†#01 – Calendar

with 3 comments

A week ago I bought my first smart phone. Although I am an avid Apple laptop/desktop user, I’ve grown unhappy with Apple’s attitude to iPhone/iOS developers and its condescending attitude to users in general (we know what’s good for you). As a developer I can see myself developing mobile apps some time in the future and do not want to be subjected to Apple’s whims. Hence a choice for the Android mobile platform was the only logical one.

The phone I chose is one of the more popular Android based phones these days: a Samsung Galaxy S. It has gotten rave reviews online and I have to agree with them; it simply is a great phone! I can definitely recommend it.

However people tend to point out that Android is not as polished as iOS. Supposedly it suffers from little inconsistencies that impact the usability of the platform to a certain extend. When I was researching the Android platform and phones I found it difficult to find detailed information about these little things. It seemed only fair to highlight these issues to allow others to make a well informed decision.

Another reason for putting these Android/Samsung peculiarities on my blog is that I could not find an easy way to report these issues to Samsung. Hopefully these peculiarities do find their way to Samsung so that they can address them in future updates.

One other note before I address the first peculiarity. Most mobile phone makers extend the Android platform with their own applications, widgets and UI tweaks. I have not used the Android platform long enough to be able to determine what is stock Android functionality and what is Samsung’s. As such what I will describe might not be applicable to all Android based phones. It might not even be applicable to other Samsung Android models.

Calendar

For my calendaring needs I am using Google Calendar. Android based phones allow for easy syncing with Google Services and the phone’s Calendar application is no exception. Newly created events in Google Calendar automatically end up on my phone and vice versa. However for events created on the Samsung Galaxy S you do have to be careful to select the appropriate calendar to create them in.

The Samsung Galaxy S has a calendar, called “My calendar” that is local to the phone. It will not be synced with Google Calendar and as such its best not used if keeping all your events in sync between your phone and Google Calendar is what you are after. Fortunately that seems easy; the Calendar Settings have an option to turn it off:

Samsung Galaxy S - Calendar Settings

“My Calendar” is the local calendar, the others, with letter ‘g’ in a square box, are my Google Calendar ones. Please note that “My calendar” is turned off.

Creating a new event

When creating a new event I would have expected that one of the enabled calendars would be picked as the default one. Logically that would have been the first one in the list: “Personal”. This is what happened instead:

Samsung Galaxy S - Create Event

It used the calendar that I turned off in my Calendar Settings! How weird is that?

Tapping on the right arrow shows that turned off calendar is still listed as the default calendar for new events:

Samsung Galaxy S - Create Event - Select calendar

This is not only a peculiarity, it is clearly a bug and an annoying one at that.

Written by gkoller

Sunday, August 1, 2010 at 10:28

Posted in android

Tagged with , ,

Logitech Squeezebox: on-the-fly transcoding Apple Lossless to MP3

leave a comment »

My Logitech Squeezebox Duet has been given me problems for as long as I have had it. Internet radio plays just fine. However my own music collection only plays with intermittent interruptions. As my music collection is all in Apple Lossless format and the Logitech Player only supports the audio formats PCM (raw), MP3 and Flac I figured my music was converted to PCM by the server on my Mac before being streamed to the player. PCM is as big as audio files can get, hence I was likely looking at a bandwidth issue.

Initially I looked at the following things to remedy the problem:

  • buffer settings on the player
  • different wireless channels to minimize interference
  • converting my library to MP3 or Flac

Buffer settings on the player were non-existent. Changing wireless channels would have been futile as the channel I was using, was only used by me and the only one that wasn’t next to another used channel. I was hesitant to convert my library to a lossy format. Flac was out of the question as I needed to be able to play my music on my iPod as well. So in the end I just left things as they were.

However lately things had been getting worse so I started looking for another option. I was then that I found out that the Squeezebox server is able to transcode music on-the-fly to pretty much any format with the proper software installed. To have my music transcoded to MP3 all I needed to do was install Lame (an excellent MP3 encoder).

Installing Lame

On OS X the best way to install Unix tools/programs is MacPorts. With MacPorts installed, installing Lame is a simple matter of running:

$ sudo port install lame

Letting the Squeezebox server find Lame

Unfortunately the Squeezebox server could not find the Lame executable installed by MacPorts. The Windows and Linux instructions for transcoding instruct the user to install the Lame executable in the Squeezebox’ bin directory. We can achieve the same effect by creating a symbolic link to the Lame executable from the Squeezebox bin directory.

As it turns out the Squeezebox’ bin directory is:

/Library/PreferencePanes/Squeezebox.prefPane/Contents/server/Bin/darwin

The following command creates the symbolic link in the above directory:

$ cd /Library/PreferencePanes/Squeezebox.prefPane/Contents/server/Bin/darwin
$ ln -s `which lame` .

The directory listening (ls -la) should now display:

rwxr-xr-x 15 Guest _guest 510 Feb 25 13:33 .
drwxr-xr-x 4 Guest _guest 136 Feb 22 21:40 ..
-rwxr-xr-x 1 Guest _guest 71584 Feb 22 21:39 alac
-rwxr-xr-x 1 Guest _guest 911664 Feb 22 21:39 faad
-rwxr-xr-x 1 Guest _guest 1087116 Feb 22 21:39 flac
-rwxr-xr-x 1 Guest _guest 8422 Feb 22 21:39 itartwork.scpt
lrwxr-xr-x 1 root _guest 19 Feb 25 13:33 lame -> /opt/local/bin/lame
-rwxr-xr-x 1 Guest _guest 306080 Feb 22 21:39 mac
-rwxr-xr-x 1 Guest _guest 63936 Feb 22 21:39 mov123
-rwxr-xr-x 1 Guest _guest 10243572 Feb 22 21:39 mysqld
-rwxr-xr-x 1 Guest _guest 118 Feb 22 21:39 openprefs.scpt
-rwxr-xr-x 1 Guest _guest 418 Feb 22 21:39 restart-server.sh
-rwxr-xr-x 1 Guest _guest 930 Feb 22 21:39 signalupdate.scpt
-rwxr-xr-x 1 Guest _guest 8163888 Feb 22 21:39 sox
-rwxr-xr-x 1 Guest _guest 539300 Feb 22 21:39 wvunpack

Note the entry with lame -> /opt/local/bin/lame.

Stopping and starting the Squeezebox server from the Preference Pane is all that’s left for the Squeezebox to find the Lame executable.

Enable transcoding

The last thing to do is letting the Squeezebox server know we want to transcode our music on-the-fly.

Do the following:

  • http://localhost:9000
  • Click on “Settings” (lower right corner)
  • Select the “Player” tab
  • Select “Squeezebox” from the drop down menu
  • Select “Audio from the second drop down menu
  • Set bitrame limiting to a value other than “No Limit”, e.g. “160 kbps”
  • Set the Lame quality level, e.g. “4″
  • Click Apply (lower right corner)

Voila on-the-fly transcoding your Apple Lossless music to MP3 is in place. If you still have interruptions, lower the bitrate. If your server is strained for CPU you can lower the Lame quality level (== higher number).

Written by gkoller

Thursday, February 25, 2010 at 14:43

Setting up PostgreSQL on OS X for development

with 2 comments

Currently I’m working on my third web based project that uses PostgreSQL as its backend. Two of these projects were/are being developed under OS X. Installing PostgreSQL under OS X is a breeze when one uses MacPorts. However I have seen more than one developer being confused about the steps that should follow the installation and the post installation instructions as printed out by the PostgreSQL port.

The installation instructions can be compressed into three steps:

  1. Install/update MacPorts
  2. Execute: sudo port install postgresql83 postgresql83-server
  3. Follow post-install instructions as printed out by above command

Trying to connect to PostgreSQL

Now that the PostgreSQL is installed you might be tempted to connect to it by starting the PostgreSQL interactive terminal. This is what will happen (gkoller is the user I’m currently logged in as under OS X):

gkoller@Kinchenna $ psql
psql: FATAL: database "gkoller" does not exist

So by default it looks for a database named identically to the currently logged in user. Should we want to connect to a different database we should specify the database’s name after the ‘psql’ command.
E.g.:

psql hgh

I have chosen the name ‘hgh’ as it is the (abbreviated) name of my latest project. The above command will fail with a similar message as the first command. So let’s create the ‘hgh’ database:

gkoller@Kinchenna $ createdb hgh
createdb: database creation failed: ERROR: role "gkoller" does not exist

Again the error message is clear. The currently logged in user does not have access to (does not have a role with the same name defined in) PostgreSQL. Simply executing a ‘createuser gkoller’ will not help as we don’t have enough privileges to do that. More importantly nor does root. So a ‘sudo createuser gkoller’ does not work either. And this is what stumps most developers that try to get PostgreSQL up and running for web development on OS X

Granting privileges to the currently logged in user

When PostgreSQL was installed it was configured with one superuser, namely ‘postgres’. Hence adding new users with superuser privileges should be done as user ‘postgres’.

sudo su postgres -c 'createuser -P --superuser gkoller'

Now the currently logged in user has PostgreSQL superuser privileges. This means we don’t have to use ‘sudo’ and ‘su’ to executed PostgreSQL commands to create databases, roles, and other users.

Creating a database and user for project HGH

Now that I am a super user it is easy to create additional users and databases. For my HGH project I want a separate database and user. I’ll name them both ‘hgh’.

This is how:

gkoller@Kinchenna $ createuser hgh -P
Enter password for new role: <password>
Enter it again: <password>
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n

gkoller@Kinchenna $ createdb -E utf8 -O hgh -W -U hgh hgh
Password: <password>

Conclusion

After PostgreSQL installation and post-installation you should create a new superuser named after your OS X login account. This allows for access to PostgreSQL commands without the need to use ‘sudo’ and ‘su’.

This is achieved by executing the following command:

sudo su postgres -c 'createuser -P --superuser <your_username>'

Where <your_username> should be replaced with the username of your
OS X account (short) name.

Written by gkoller

Saturday, January 2, 2010 at 11:12

Posted in os x, postgresql, web2py

Tagged with ,

Follow

Get every new post delivered to your Inbox.