Recent twitter entries...

  •  

Apple or not – that is the question

Posted by Nitai | Posted in Apple, Internet Zeitgeist | Posted on 12-08-2009

0

The recent eMail von Jason Calacanis and his blog post entitled “The Case against Apple in five Parts” brought a little up stir in the Apple world. The recent reply came from Marco.  You can read their back and forth on Jason’s take on Apple and make up your own mind. I have read all the blog posts so far, but I have been missing one simple thing!

The one single thing that makes me use Apple products is that they simply work!

I have used Windows, Linux and MacOS X over the last couple of years. Hell, this blog post is even being typed on a Thinkpad with Windows XP, but nothing has ever been an hassle free experience then with using Apple products, be it hardware or software.

When has there ever been a more relaxed operating system update then with MacOS X? All you have to do is to pop in your DVD, run the update and know for sure that it will reboot safely with the new update. Moreover, with the applications itself you don’t need to run trough a “painful” installations with minimum five “OK” clicks (I know you Windows guys don’t see this as a problem because you are used to!), on MacOS X you simply drag and drop an application to the place you want. Nothing else!

iPhone is another topic that people like to argue about. Sure, the hardware is behind the current standard. Bluetooth does not work with cars and you might have to reboot your iPhone sometimes. But, have you ever used a Windows Mobile and did you every try to sync it with your Windows OS? I hate to repeat myself, but with the iPhone all I have to do is to hook it up to my Mac, sync it with iTunes (including Music, Photos, Videos, etc.) it even takes over my eMail settings and my eMail and Calendar just works. Symbian based phones and Windows Mobile ones require you to spend at least an hour fiddling with setting and try and error attempts. I don’t think I have to start arguing about the usability of the iPhone. Apple has done something, that for many years no one could. It brought a phone that simply works and is easy to use.

Remember the “plug und play” wording? Well, what is a “myth” in the Windows and Linux world is a fact with MacOS X. You got a new digital camera? All you do is connect it and the system recognizes it, iPhoto opens and there you got your photos. No hunting for a updated driver , no installation, no reboot needed, nothing else, just plug it in and start working. Isn’t that worth the little more money you got to pay?

Regarding the price, I do have to say that a Dell Lattitude E6500 with the same configuration as an Apple MacBook Pro 15″ will cost you about the same (at least in Switzerland). Price is not everything. And when it comes down to usability you save a lot more then with the initial cost when you use something that simply just works.

For me, and I’m sure for many other people, it is the Apple eco system that saves us money in the long run because it just works!

Automatic Memory Management in Oracle Database 11g

Posted by Nitai | Posted in Development, linux | Posted on 01-08-2009

0

Oracle Database 11g brings lot of new enhancements, especially in the Memory management. Oracle 11g allows you to allocate one chunk of memory, which Oracle uses to dynamically manage both the SGA and PGA.

Automatic memory management is configured using two new initialization parameters:

  • MEMORY_TARGET: The amount of shared memory available for Oracle to use when dynamically controlling the SGA and PGA. This parameter is dynamic, so the total amount of memory available to Oracle can be increased or decreased, provided it does not exceed the MEMORY_MAX_TARGET limit. The default value is “0″.
  • MEMORY_MAX_TARGET: This defines the maximum size the MEMORY_TARGET can be increased to without an instance restart. If the MEMORY_MAX_TARGET is not specified, it defaults to MEMORY_TARGET setting.

If you are using UNIX/Linux, before you consider using AMM you should check the current size of your shared memory file system. On Linux you do this by issuing the following command.

df -k /dev/shm
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                 3072000   1276532   1795468  42% /dev/shm

To adjust the shared memory file system size issue the following commands, specifying the required size of shared memory. First unmount the current mounted volume and set the new one (in this example we set it to 3GB).

umount tmpfs
mount -t tmpfs shmfs -o size=1200m /dev/shm

Now, the above commands will only last until the next reboot. If you want to make this permanent you need to add the adjustment to the fstab file. To do this just edit the file /etc/fstab and add the line:

none                    /dev/shm                tmpfs   size=3000m        0 0

This is by far the easiest way to manage memory in Oracle Database 11g.

Setting the correct Java version under MacOS X

Posted by Nitai | Posted in Apple, CFML, Development, open source | Posted on 01-08-2009

0

My favorite scripting language is CFML, or as some know it as ColdFusion. I like it because it is very very powerful, easy to use and can do just about everything your xyz language can do.

For many years, ColdFusion was a closed sourced system, where the former Macromedia and now Adobe got the copyright of the code. Luckily, this has changed when OpenBlueDragon (OpenBD) came to play with the first open source CFML application server. So, now the CFML world got a very nice open source CFML language and server. Our very own open source Digital Asset Management – Razuna – runs on OpenBD as well and comes bundled with it.

Anyhow, the reason of this blog post is not CFML, but how to set the correct Java JRE environment under MacOS X. Then why did I mention CFML and OpenBD in the first place, you might ask?

Well, today I downloaded the latest version of OpenBD which runs now on Java 1.6 and is 64 bit. But when I tried to start our server (Tomcat) with the new OpenBD jar I got the following error messages in the log.

at org.apache.catalina.startup.
Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class com.naryx.tagfusion.cfm.application.cfHttpSessionListener)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal (WebappClassLoader.java:1854)

As we can see from the “Bad version number…” in the above line there must be some misconfiguration of the Java runtime going on. But wait, does my execution of “java -version” not state that I’m running the latest Java version? Reading from those lines, you could think so.

java version “1.6.0_13″
Java(TM) SE Runtime Environment (build 1.6.0_13-b03-211)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02-83, mixed mode)

Apparently when one looks into the Java paths of MacOS X we see that the current “JDK” is set to 1.5 and not 1.6. Judging from this, I tend to think that Apple is not setting the JDK right for Java applications. You might say, well then just set it in the “Java Preferences”, right? Wrong, I already did that as the screen below shows).

Java Preferences

So, in order to solve this, I set the correct JRE_HOME variable in my .profile in order for all Java applications to pick up the current JRE. To do that, you simple edit your .profile (with vi ~/.profile) and add the following lines to it:

JRE_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
export JRE_HOME

Save it, open a new terminal window (or close and open one) and start Tomcat. Now Tomcat is picking up the new JRE path and Java application, in my case OpenBD, that depend on the Java 1.6 JRE version will run.

Updating subversion on 64-bit Linux (CentOS/RedHat)

Posted by Nitai | Posted in linux | Posted on 26-07-2009

0

I run into some issues trying to update subversion on our Linux 64-bit (CentOS) servers. In other words, RPM always complained on some missing dependencies from a old version and aborted the upgrade. The error lines were of the nature;

Transaction Check Error:
file /{filesuchandsuch} from install of subversion-1.5.6-0.1.el5.rf

I mean, I had the old subversion installed and wanted to update to the new one. Isn’t that what a update is all about?

After trying to remove, reinstall and reconfigure subversion I tried the update again, just to find out that it still did not work. So, i started to dig into CentOS and found that during the installation of subversion the RPM installed both the 64-bit and the 32-bit versions.

Since, I did not need the 32-bit version I removed it with;

rpm erase subversion.i386

Then tried updating subversion again with;

svn update subversion

BINGO! Apparently the 32-bit version interfered with the update. Removing it solved it.

Why the Wordpress Administration did not load anymore and a solution

Posted by Nitai | Posted in Development, open source | Posted on 26-07-2009

0

Like many people, I totally dig Wordpress as my preferred Blog software (despite it being written in PHP, but that is another story:-) ). The way I have Wordpress installed my Linux host is that I get the latest stable releases with subversion directly from wordpress.org. So far, I have had never problems with it. But…

Since 2 days I could not access the Wordpress Administration anymore. The page, after login, did load, but instead of the Dashboard I always saw a blank page with the browser still loading 11 of 12 elements. After some digging around and getting to know Firebug better each time, I saw that the “Thickbox.css” could not be loaded. Even calling it directly within the browser did not load the CSS. The same behavior was found on 3 other blogs I run.

After opening the thickbox.css file I saw that the writer had a couple of comment tags on top of some styles that looked like this:

/* —————————————————————————————————————-*/
/* ———->>> thickbox settings <<<—————————————————————————–*/
/* —————————————————————————————————————-*/

While nothing looked suspicious here, I nevertheless removed the comments (since I experienced some other weird stuff with comments in the past) and low and behold the Wordpress Administration did load again without problems.

I’m not sure, where to put this in now, with a configuration of Apache or some malfunction of PHP, but I got a running Wordpress again.

Hope this helps someone out there.

How to add a custom filter to a Spry text field validation

Posted by Nitai | Posted in Development | Posted on 24-07-2009

9

I have to say that I love the Adobe Spry Javascript framework. It is easy to use and simply just works. For most situations it comes with “widgets” for just about everything you need in your Ajax enabled web application.

One of my favorite widgets is the Text Validation one. With it you are able to validate just about everything the user enters and you will have full control of the input, even the pattern of the input.

But what about if you need a custom validation? According to the documentation you can use the “custom” parameter with a “pattern”. But if you use it, you actually apply a “pattern”, meaning applying a pattern of “pattern: “bbb” only allows the user to enter 3 alphabetical characters, but nothing more. Usually you want to have the user enter only alphabetical characters and not limiting the amount of chars.

In order to achieve this, you have the undocumented parameter called “characterMasking”! “characterMasking” combined with “usecharacterMasking: true” allows you to pass Regular Expressions to the text field you want to validate within the Spry syntax. Powerful stuff. It is beyond me, why Adobe has not updated their documentation on this. In any case, here is a example:

Say you want to allow only alphabetical character in lowercase and nothing else, you would use a syntax of;

var custom = new Spry.Widget.ValidationTextField(“myfield”,”custom”, {isRequired:true, hint:’some hint’, characterMasking: /[a-z]/, useCharacterMasking:true, validateOn:["blur", "change"]});

Would you like to only enable digits and spaces?

var sd = new Spry.Widget.ValidationTextField(“subdomain”,”custom”, {isRequired:true, hint:’Desired Subdomain’, characterMasking: /[\d\s]/, useCharacterMasking:true, validateOn:["blur", "change"]});

I guess you get the point. Combined with Regular Expression the Spry Text Validation Widget just entered into a new level of productivity.

Configure web server to handle .air files

Posted by Nitai | Posted in CFML, Development | Posted on 21-07-2009

0

Recently over at the website of our open source Digital Asset Management company Razuna Ltd., we published a desktop application that was build with Adobe AIR.

Now, while we could easily link to the AIR application, which all end with an extension of “.air”, within the web page it would prompt the user to install the application only under FireFox (both Windows and MacOS X), but users with Safari or Internet Explorer where prompted to download a “.zip” file.

In order to fix this, we had to change the mime type configuration of the web server itself. Now, we figured that there are different solution to this, depending on your web server;

For Apache

Adding the mime type for .air extensions with Apache requires you edit the file “/etc/mime.types” (on RedHat/CentOS) and adding the line:

application/vnd.adobe.air-application-installer-package+zip     .air

Make sure to reboot Apache to apply the changes.

For Tomcat

Adding mime types for your Tomcat installation requires you to edit the file “tomcat/conf/web.xml” and adding a new “mime-mapping” like;

<mime-mapping>
<extension>air</extension>
<mime-type>application/vnd.adobe.air-application-installer-package+zip</mime-type>
</mime-mapping>

Make sure to restart Tomcat to apply the change.

Using .htaccess

If you can’t access the server config files or you simply don’t want to, then the other option is to simply add the mime type to your .htaccess file.  Add the following line to it;

AddType application/vnd.adobe.air-application-installer-package+zip .air

Save it and you should be all set to make it possible to launch the Adobe AIR installer ones your .air file is downloaded.

Some people still don’t believe

Posted by Nitai | Posted in Personal | Posted on 02-06-2009

0

How many times have you watched a Asian movie were the actors fly around or do some crazy stunts and you were thinking that this can not be real? Personally, I know a couple of people that just don’t believe in the power of will and that the human body can be moved to extremes.

Here is a video from Damian Walters for all those “nai sayers”.

Have you lost your cron

Posted by Nitai | Posted in linux | Posted on 05-05-2009

0

A minimal installation of a new Linux box feel just about right. You can feel the power of Linux as it just sits there and waits for the tasks you can throw at it. This, or something alike it, I felt when I installed a minimal CentOS on my new server.

A couple of yum’s later I was quite happy with the new box and it was running along fine. There are always some scripts that you want to run daily and thus adding some script to crontab was a no brainer. Well, it was no brainer until I figured that my scripts did not run! What happened?

Crontab is installed. Running the scripts manually also works. Nothing obvious did go wrong.

As it turns out, I did not install the additional crontab tools. Those are, which I learned by now, not available with a simple “yum install crontabs”, but are in a different package all together. So, for the sake of the after world, ’cause Google yield almost no results to my searching, this is the additional install you have to do;

yum install vixie*

This will install the crond, crontab, etc. scripts for you. Now, all you need to do is to add the crond script to chkconfig and start the service.

Reading books on the iPhone

Posted by Nitai | Posted in Apple, Personal | Posted on 03-05-2009

0

I love to read. I like to get as much knowledge as possible into my system. So far, I have been an “old style” book reader, meaning I actually bought a book in paper form and read it. But in the light of a greener environment and saving trees I wanted to go more into the eReader craze.

stanzaThere has been a lot of buzz around the Kindle 2 in the last weeks, but I just did not want to carry around another device. Since I already have a iPhone I was looking for a solution for the iPhone itself. After some searching I found Stanza. Stanza is available as a Desktop application and as a iPhone application, also. Since, both applications are free of charge there was actually no need of holding back.

I have to say, that I was highly skeptical, but I have been reading 4 books in the last couple of weeks with the Stanza application on my iPhone and have to say, that i was pleasantly surprised how good the reading experience was.

The application itself is very well made and easily understood. With a tip on the left of the right side you flip pages, with a tip in the middle you get some information about the book. Reading the book in landscape mode is just a move away, and Stanza is enough intelligent to stay on the same page and even move a bit if the pages have more text landscape mode. You can set bookmarks, also.

Reading books was actually very easy on the eyes as you can adjust the size of the test sizes, the same way as you would within Safari. You can change the color, text font and much more. But I have to say, that the default settings were just about perfect for me.

I have to say, that one of the best features must be that you can transfer eBooks from the Desktop application the iPhone with a single click. All you do it enable “sharing” in the Desktop application and within the iPhone you can browse “remote books” and download them to the iPhone. Nothing easier then that. All in all, I have to say, that the Stanza iPhone application must be one of the best iPhone application ever made.

Actually, Stanza must have made a big impression out there, so much that Amazon bought the company behing Stanza the other day. In any way, I hope that Stanza will not get lost into the migration of Amazon, but in the long run, I wonder if Kindle for the iPhone and Stanza for the iPhone, both from the same company really makes sense.