• September 29, 2007

    How on Earth do you embed font in CS3 TextArea? Adobe documentation team WTF?

    While working on my last AS3 project, I wanted to cut my self some slack (spare some time), and instead of building TextField + scroller - use CS3 prebuilt TextArea component. Off course, not only that I didn't achieve what I intended, I also spent 3 hours trying to figure that shit out.

    I figured out that:

    • you STILL have to embed fonts if you masked TextArea (TextField too),
    • Online Flash CS3 Documentation is not what it should be.

    Just, please take a look at the following link (Flash CS3 Documentation > Programming ActionScript 3.0 > Working with text > Advanced text rendering). There is absurd line that says: "The exact method of embedding a font file into your application's SWF file varies according to your development environment.". Well, HELLO? What is that page I am looking at then? Adobe's help site is pretty awful (not as bad as ATI/AMD merged support sites - they are the worst), advanced searching is impossible and ordinary search gives you results that have no meaning. If you are looking for something on Adobe's site related to Flash9 - my bet is you won't find it.

  • September 26, 2007

    Satan’s little helpers

    That is what we are! Bill Hicks forever =)

  • September 23, 2007

    Wii is still cool (and I still don’t have it)

    Seriously cool thing - playing the Wii in a movie theater:

    Seriously uncool thing:

  • September 22, 2007

    First contact

    Much has been said about the notorious iPhone. Well, today it hit Balkan grounds and I must say; it’s damn fine. Clearly the first broad audience device that made me feel like the future is here… well if not the future, at least the Federation. Just holding the device made me feel like I can teleport from the crappy mall I was in, on to my superfly spaceship high in orbit. The build quality, the design and the overall futuristic feel of the device, make it a worthy acquisition. You may think it’s retarded, hell I might even agree, but it’s the mother of all hi-tech bling. And that’s a cold fact.

    iphone

  • September 21, 2007

    All the World does not like Photoshop Family logo

    So anyways, we have been reading a lot of blogs written by smart people, and discussed it internally, and here are the conclusions:

    New Photoshop Family logo is:

    • not telling us anything
    • unimaginative ("Enough with the friggin' bubbles")
    • has a hole in the bubble, meaning what exactly?
    • moving too far away from the Chemistry Symbols which were SUPER COOL and actually were setting new standards



    cool lame 01




    New Photoshop Family logo is:

    • silly, silly, silly, silly 2.0 looking
    • should SET the trend, instead of blindly following it
    • missing lens-flare for the ultimate look



    cool lame 02



  • September 19, 2007

    New Photoshop logo

    Photoshop family has logo.

    ps logo 228x52




    I have one comment only: speech bubble on image editing software. Why?

  • Fun with NDBCLUSTER

    MySQL 5.0 introduced NDB Cluster, a storage engine which enables running several MySQL servers in a cluster. It uses high-availability, high-redundancy version of MySQL adapted for the distributed computing environment. This all sounds really nice, and in theory, depending on your application and scalability planning, it could spare you MANY hours of developing (squeezing) database logic inside your application logic which then gets highly dependable on master/slave (active-pasive) configuration. And of course best reason of them all - instant failover. So I decided to give it a try. I used MySQL 5.0.45-0, because 5.1 sounded too much bleeding edge.

    MySQL Cluster is currently not supported on Microsoft Windows, you'll have to install it somewhere else. Once you have it running, it's time to import some data. Database schema of a my test dump mostly used MyIsam storage engine and few InnoDB tables. Before the import, change Engine=NDB in the dump and be aware, import takes ages even on a really fast servers (200 kb dump = cca 1 min ??).

    My best guess is, you will see a lot of HY00 errors when you start your import. Be patient, check one by one. Most of them are caused by non supported features of NDB but can be avoided.

    Here is a brief coverage of reasons for the problems which I encountered:

    • NDB does not support foreign keys or FULLTEXT indexes or indexes on text columns (indexes on char/varchar are ok).
    • Attribute names are automatically truncated to 31 characters. Database names and table names can total a maximum of 122 characters - the maximum length for an NDB table name is 122 characters, less the number of characters in the name of the database of which that table is a part.
    • The maximum number columns and indexes per table is limited to 128.
    • Temporary tables are not supported.
    • Every table using the NDBCluster storage engine requires a primary key; if no primary key is defined by the user, then a “hidden” primary key will be created by NDB. This hidden primary key consumes 31-35 bytes per table record.
    • The maximum permitted size of any one row is 8KB. Note that each BLOB or TEXT column adds 256 + 8 = 264 bytes towards this total.

    The last error is really nasty one and will cause you to rethink your database schema and make a lot of changes to your application):

    ERROR 1118 (42000) at line 794: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8052. You have to change some columns to TEXT or BLOBs

    Some help:

    • The lack of foreign keys, can be resolved by using triggers (Enforcing Foreign Keys Programmatically in MySQL).
    • You need a lot of RAM in your severs because all data is in the RAM, unless you are using the 'DATA ON DISK' feature of MySQL 5.1.x. In that case you can have the non-indexed data on disk.
    • When calculating Cluster memory requirements, very useful is ndb_size.pl utility. This Perl script connects to a current MySQL (non-Cluster) database and creates a report on how much space that database would require if it used the NDBCluster storage engine. When you run the script, compare the suggested parameter values reported for your database to the default values for each shown here. If the default is higher than the recommended value from ndb_size.pl do not adjust the value. If the recommended vales are lower than the defaults use slightly larger numbers.

    NDBCluster is something I'll definitively have my four eyes on and watch it grow. Bugtracker on mysql is crawling with bugs, but this is something to be expected. I've tested 5.0, and there is a lot of stuff allready fixed in 5.1. My biggest disappointment was the fact that new nodes can't be added to the cluster without shutting it down first. My conclusion is, that It is not yet ready for prime time. When it will be? when 5.1 is released into production I guess. Until then... We are on our own. :)

  • Go Moses, GO!

    Woot, Moses finally announced what he's been cooking - Go animation system aka Fuse3. It was a bloody time. :) Go won't be a kit solution like Fuse or Tweener, but a lightweight set of base classes highly extensible architecture for creating own AS3 animation tools. His primary goal is to to encourage developers to use tweening, physics and 3D together. Beta will be opening very soon so stay tuned for more details. In meantime check out what Moses is up to!

  • September 12, 2007

    Importance of Conistency

    So anyways, I am in Sweden for the past 2 weeks, and as such, I got to work on a few occasions on Microsoft Windows XP localized for Sweden. Basically I had to fix half dead Win XP by removing some crap software, installing some good software, and see how are the things under the hood. I do not speak a word of Swedish, so it was pretty hard doing that by using just:

    • intuition
    • memory
    • reflex clicking

    Now, what I came to realize after few sessions with Swedish Windows is that Consistency is mother of all complex design. I am not talking just about visual design, or just about graphics, I am talking about logical placement of objects in menu, placement of buttons on applications, order of menus, and things like that.

    Let's hit the examples.

    When you Right click an application on your task bar (hello Mac "my-mouse-has-1-button" users), or in your system tray, the first link from the bottom should close the application.

    01 killing messenger

    02 killing ps





    However, working with some crazy applications here localized for Sweden, I often got completely dazzled. Right click on it, click first link from below, and BOOM, something happens, and application is still running.

    Next thing is the location of buttons. The most common location for the most common buttons should be like it is in the Properties of your Desktop (right click desktop > Properties). So, it is [OK] [Cancel] [Apply]

    03 ok cancel apply



    Yet however, I was surprised how many times developers play with those buttons and reorder them. By clicking the further most right button I managed to, on few occasion, screw up my work, since it was not Apply button, it was Cancel button. Hooray!

    Same goes for the buttons during installation or removal of software. Most softwares have this layout for buttons:

    04 installation a



    On occasion, the [Help] button is not present. And again, it does not fail to amaze that some developers think this system is too old fashioned, and reorder buttons, remove little Arrow > marks on Next, and similar. I had trouble removing some of nVidia's software because I could not find the proper button on it's designated logical place.

    Also, one of the problems I encountered is finding "Accessories" in the Start menu. Since I use English version of Windows, that folder is always on top and I just never thought that it can be anywhere else. Until I found out that in Sweden "Accessories" are "Tillbehör" and are placed god-knows-where in the Start menu. System tools should be separated from other software, not blended in. Like this:

    05 accessories



    I know it is not often that you have to work blind, but trust me, once you have to, you learn to appreciate Consistency of design.

  • September 10, 2007

    mysql utf8 latin2 utf8 weirdness

    This one is a keeper, have to write it down somewhere in case I forget it by tomorrow morning. :) Today I was doing routine deploy of one of our new websites to production server. Everything went smoothly, except the fact I couldn't see any of Croatian letters on the site texts (which were stored in mysql)!! We did migration to UTF8 some time ago, and this was highly unexpected. So I started to dig into the dump. :)

    Looking at the mysqldump of a database I was a bit surprised to see Croatian letters screwed up beyond recognition. For example letter "š" was represented as "ÄąÄO„" (4 bytes), "č" was "čO" (two bytes)... etc. OMG! All our tables are "CHARSET=utf8", we force "AddDefaultCharset utf-8" in Apache and all of our markup uses "charset=utf-8" for content type encoding. BUT, we unintentionally left one very bad call in our config file which got triggered if site was running on development server - "SET NAMES 'latin2' COLLATE 'latin2_croatian_ci". The production config had SET NAMES utf8, but development didn't. Oh boy.

    Ok so now I had a real mess - utf8 tables with utf8 data in them stored as re-encoded latin2 but in utf8!? I tried converting the dump from ISO8859-2 to UTF8 but that just made things worse, some of characters now used 6 bytes which isn't good. The solution was pretty straight forward. I converted the dump from UTF8 to ISO-8859-2 and I got real UTF8 again. I imported the converted dump and changed for good config files to "SET NAMES 'utf8' COLLATE 'utf8_general_ci".
    iconv to the rescue:

    mysqldump -u root -p db > weirdo-dump.sql
    iconv -f UTF-8 -t ISO_8859-2//TRANSLIT weirdo-dump.sql > dump-latin2-aka-realUTF8.sql
    mysql -u root -p db < dump-latin2-aka-realUTF8.sql

Proudly running on Word Press, and above all, proudly using Comic Sans.

Nivas.hr © Copyright 2009    All right reserved    Made in Croatia Yeah, we made our own site!Nivas.hr