• April 4, 2012

    Beware of max_input_vars php ini configuration option

    If you are updating PHP on your production server, beware of relatively new max_input_vars php.ini directive which is now 1000 by default. That means if you have 1001 form field - only 1000 form fields will be submitted. Use of this directive mitigates the possibility of denial of service attacks which use hash collisions in connection with CVE-2011-4885.

    From php changelog:

    2012-01-03 : security / trunk - Added php-5.2-max-input-vars patch max_input_vars directive to prevent attacks based on hash collisions - CVE-2011-4885

    Why we have so much form fields is a subject for different post. The main problem is that even php site says this update is available from PHP version 5.3.9. The fact is we have 5.3.2-1ubuntu4.14 and the update is there.

    So... you know... beware. :)

  • March 20, 2012

    Excel stopped calculating formulars – Earth coming to an end?

    From early 60s to modern times, spreadsheet processors play important role in every man's day life which basic functionality is taken for granted.

    In the accounting a "spread sheet" was and is a large sheet of paper with columns and rows that lays everything out about transactions for a business person to examine. An electronic spreadsheet organizes information into columns and rows. The data can then be "added up" by a formula to give a total or sum. The spreadsheet program summarizes information from many sources in one place and presents the information.
    If you are wondering who are those two cool spreadsheet hipsters, check out A Brief History of Spreadsheets (here and here). Now, let's go back to 2012. Erm 2007.

    Did your Excel (2007) stopped auto calculating your precious formulas out of the sudden and you are in a hurry to send cost estimates to your client? Just like mine did? Yes, that can be nasty. :)

    1. Click on the Formulas ribbon tab,
    2. then select Calculation Options,
    3. and then check if Automatic is on.

    Simple eh? How did this switch off in first place? No idea. This applies to Excel 2007, dunno about 2012:

  • March 13, 2012

    Alarm and Bluetooth icons in iOS

    I was looking at the iPhone (iOS) top system bar and one thing was bothering me in particular, but I could not place my finger on it. Yesterday I figured it out. Alarm icon, and rarely, Bluetooth icon.

    If we segment the top bar into three pieces (left, central, right) each of which has a particular info to convey, the structure is pretty clean. On the left there is info about connectivity, signal strength, wireless, 3G etc. Middle part is reserved for time, and on the right there is battery info.

    The problem starts when additional icons show up, in particular Alarm and Bluetooth. The Bluetooth icon is an obvious candidate to be moved on the left side since all the connectivity is there. There is no reason to dislocate Bluetooth to the right.

    Alarm icon has two problems.

    First, an icon itself. Clock. Clock is a wrong communication on many levels. I can clearly remember few years ago when I first got iPhone that this icon meant nothing to me. I set the Alarm and had no idea a Clock icon means that I have an alarm setup. Throughout user interfaces of the world alarm was mostly represented by a ringing bell. This not only is a better visual communication but also is a logical translation of the ancient real-life alarms (church bells) into digital era.

    Second problem is the position. When a clock icon appears next to battery icon, what does that mean? It means nothing, exactly. Alarm icon must be placed next to time, because they are both time related bits of information.

    Additional Hate
    While doing this I found out this little bit of not-so-perfect design. Three icons, each of them has different shade of grayish color. How did Steve miss that one out? Also, minute-hand is not centered. My OCD is kicking in now, I have to stop dissecting these icons.

  • January 19, 2012

    Non-breaking white space Internet Explorer 8 JavaScript regexp bug (and how to fix it)

    While developing jQuery plugin for upcoming bookmarking "Items in select boxes" plugin for our Vudu CMS

    I wrote a simple regexp to strip few characters (pipe, minus, apostrof and white-space) that are added before the actual item.

     function cleanOptionText(txt)
     {
     return txt.replace(/^[\s|'-]+/, '');
     };
    

    It worked just fine on FF9 and Chrome but in IE8 only the first pipe (|) was removed. After some debugging I discovered that I have both spaces and non-breaking spaces that should be removed and that in IE8 class shorthand \s (which should include all white space) doesn’t include non-breaking space.

    Code for non-breaking space is 0xa0 (dec 160) so regexp should be updated as follows:

    function cleanOptionText(txt)
    {
    return txt.replace(/^[\s\xA0|'-]+/, '');
    };
    

    read more

  • Ubuntu Cloud Live on OpenStack

    crm.com published selection of the 10 Best Open-Source Products Of 2011. On 8th place, you can find OpenStack (an open-source cloud platform) for whom our dear coleague Ante Karamatić is leading Ubuntu Cloud Live project. We are looking forward to new interesting grounds cloud support will bring us in 2012.

    Ante explained: "Ubuntu Cloud is a product. Ubuntu Live Cloud is a custom version of Ubuntu Cloud, customized to work without a disk. OpenStack is a major, if not essential, part of the Ubuntu Cloud."

  • January 16, 2012

    rim – PHP Remote Image Library

    Working on recent home project I found there is no library in PHP to get dimensions of remote images.
    So I made rim php library to get type and size of remote images in optimized way. read more

  • December 14, 2011

    Why I, designer, do not use Mac

    I have been getting a lot of questions lately why I do not use Mac as my primary work machine. I really love iPhone and iPad, and people get confused when they see all of my (primary) work is produced on Windows PC. The confusion gets bigger when people see that I even use Apple Keyboard (wired, full scale one), but it is attached to the Windows machine.

    So, in three (plus one) points, here it is: why I do not work on Mac.

    read more

  • December 9, 2011

    Twitter redesigns

    Yesterday Twitter got overhauled. I am not talking about some small, tiny redesign tweak; it got completely reworked from ground up. The overhaul also includes replacement terminology for old words. There are no more "mentions", they are now called "Connect". Hash tags are now called "Discover". Many new things are introduced, and I will not comment on validity of those ideas. It is Twitter's political decision to change terminology and how they present themselves to the world.

    What I will comment on is the new iOS App.

    read more

  • October 28, 2011

    Predictions for the future

    Here is my short list of technology predictions for the future regarding Apple.

    VOICE OVER IP
    iOS will have built in voice-over-IP as it has iMessages today. Today iPhone knows that it is talking to another iPhone on the other side of iMessage App. It is just a matter of small step to include this detection progress into your phone addressbook and whenever you call aonther iOS (and you have bandwidth to support it) you get a free call. Well, not free free, you still pay for data, but you get the idea. Some people argue that this would be too big kick-in-the-balls for the telecoms. However, this already happened with fixed line telecoms. We all had land line phones. Then we upgraded this to include fast internet connection, and today those fixed line telecoms serve the purpose of only ISP. Most people I know no longer use "ordinary" land lines. This will happen to mobile phone carriers as well. Their "land line" will diminish and only internet connection will remain.

    APPLE TV
    Apple will build a TV. In essence, it will be a large iPad. There will be App Store to hold apps for TV which can be used with remote as interface, access to iTunes and all the shows and movies there. In combination with iCloud this is ideal. You never store anything on your TV, there is no need to download, only stream. Of course, the TV needs to have all sorts of connectors on the back so you can watch ordinary stuff as well. Why TV? Simple, Apple needs to extend the reach into consumer market even further. Not everyone is OK with the way iPad works and feels. For some, it is too complicated. And TV - if well designed - means more market. It's a no brainer.

    SCREEN SIZE AND RESOLUTION
    iPad will get Retina class display. But the physical size of displays in both iPod/iPhone and iPad will stay the same. People all over the internet debated why should it stay the same, and all sorts of answers arise. Most common is that on iPhone now, while you hold it with one hand you can use just your thumb to cover entire screen, there is no need to fumble your phone in hand. However, there is one more and I would say bigger reason: if you enlarge the screen while keeping the pixel count the same, things start to look more pixelated (obviously) and a lot of design tricks would no longer work. Using one pixel line on Retina class display makes that line almost invisible, yet it serves a purpose. It would be impossible for the designers to design high quality Apps when one pixel has a different thickness depending on the device. This would bring Apple into Android fragmentation world where designers have no clue how exactly their App will look like. No go.

    SOFTWARE, NOT HARDWARE
    Future Apple devices, primarily iPhone and iPad will make progress more through software and less through hardware. Yes, each new divce will sport faster processor, more RAM and better camera, but these are obvious upgrades. iPhone 4S has shown the obviousness of this trend: the biggest upgrade is software based; Siri. iPhone 5 will, of course, have bigger CPU, but any major breakthrough it will have will come through software. Maybe iPhone 5 will have that voice-over-IP in it? The point here is that the software will become the distinguishing detail between new devices, not hardware.

    BUSINESS
    Apple will sooner or later start tapping into business sector. It will be through corporate level software integration. Business-grade iCloud accounts? Integration of SIRI into business through some means ("Siri, pay invoice number 3451 which ACME inc. sent"). I am not sure how, but it will happen, and it will happen soon.

    GOING BIG
    Apple will extend their core business into a field which can further support their devices. Apple could branch out to be a mobile network carrier. And they would only need to use data, not regular GSM voice transfer. Simply because at this moment, the only weak link in the entire ecosystem is the carrier. From lousy support carriers give to their subscribers, to bad coverage, to occasional blackout. Most of Apple devices today are basically useless if there is no data network available, preferably high speed one. They will need to sort that out, and the only way to sort it is to go independent.

  • October 27, 2011

    Interesting google.hr’s auto complete results

    Some time ago Google implemented auto complete feature inside search input field. But I just noticed, it works as well if you start typing full domain name with protocol. Results are, I suppose, most typed things in search field. No matter typing url into the Google always fascinated me, the sites that show up fascinate me even more.

    This is what shows up on google.com as first auto complete results if you start typing “http:”:

    and this if you start typing "https:":

    interesting.

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