Ubuntu Server distribution update via SSH over the internet

Standard

I have been using Ubuntu Server for development for over 10 years now. Although I am always using LTS distribution, which is supported for 5 years, there will be a time when the server needs an update only because server software needs some refresh (especially LAMP stack). Of course there is an another way – just compile new version, but in my experience this will screw up your installation (believe me – I tried).

Making distribution update on a desktop is relatively easy process – just use “Upgrade Manager” to start the upgrade procedure, sit down, relax and wait until upgrade is finished. Upgrade via SSH is much more complicated – there is no GUI to help you and SSH connection may drop any time leaving you with a server, which is half-working.

Continue reading

How to improve speed of your mobile web application?

Standard

Creating a mobile web application is fairly simple – just scale a website for a smaller screen and it works flawlessly. But there is a problem – a mobile web application still feels and acts like a website, it is just smaller version of a desktop website. It is slow when displaying some kind of simple animations – for example slide toggle.

Nowadays it is fairly easy for developers to create a responsive website (e.g website, which scales itself automatically according to the screen size). Some people just use media queries , another use ready-made boilerplates like Bootstrap, Skeleton or Bones (for creating responsive WordPress template).

To get best experience from your mobile web/html application, using CSS3 transitions is the key. When usual transitions are just changing DOM and usage of hardware acceleration is minimal, CSS3 transitions are always using hardware/GPU acceleration and this gives a very big performance improvement and your application becomes very responsive.

Continue reading

Reading binary data using jQuery Ajax

Standard

jQuery is an excellent tool to make web development easy and straightforward. It helps while doing DOM manipulation and makes Ajax requests painless across different browsers and platforms. But if you want make an Ajax request, which is giving binary data as a response, you will discover that it does not work for jQuery, at least for now. Changing “dataType” parameter to “text”, does not help, neither changing it to any other jQuery supported Ajax data type.

Problem here is that jQuery still does not support HTML5 XMLHttpRequest Level 2 binary data type requests – there is even a bug in jQuery bug tracker, which asks for this feature. Although there is a long discussion about this subject on the GitHub, it seems that this feature will not become part of jQuery soon.

Continue reading

Creating basic JavaScript encryption between Frontend and Backend.

Standard

One big problem with JavaScript is that it is very hard for a developer to hide JavaScript code and to create secure data transfer between browser and server. It is always possible for someone to check XHR transfers and this makes data transfer very unsecure.

I had to deal this problem, because I had to develop sweepstakes application , which gave prizes to the user live. To make this happen I had to make secure session exchange between browser and server to synchronize FrontEnd and BackEnd.

Continue reading

Writing modular and dependency based JavaScript

Standard

Usually most of the websites are always using some kind of JavaScript to make them more interesting and modern. Occasionally this means animations, carousels, parallax scrolling and so on.

To create this kind of functionality, some developers are loading tens of JavaScript files separately and no further code or dependency organizing is done. It will be hard for other developers who have to maintain the code –  it is unreadable and scripts may easily overlap when creating new features.

This is okay for simple websites, but what happens when we are dealing with a large scale website, which has huge amount of different JavaScript files in various sizes ? Code is not organized anymore and it is hard to maintain. How to solve this problem?

Continue reading

Watch out for hidden SPAM on your WordPress site!

Standard

Recently I had a case where my client reported me about suspicious links on his corporate website which was built using WordPress. Immediately I was thinking that site got hacked and I was preparing myself for gruesome backup tasks.

Luckily this attack was easy, although very clever. It just changed header file and included another file which was masqueraded as part of WordPress and it was placed into wp-includes directory. File name was class-ajax.php, which is very similar to another files in this directory.

Continue reading

Creating a social application from a developer’s perspective

Standard

When you start working on a social application for the first time, it is very easy to make very costly mistakes. This is not average website anymore – you are now in uncharted territories.

Social application is more related to advertising – most important is to get audience and user engagement. Bigger audience means better spread of client’s message, which also means happy client and better sales for the client.

If you are working with an advertising agency, they rarely have deep experience in social media. In advertising, most people think that the guy who has louder voice also has better spread of the message. Although this is very true for tv- advertising, magazines, outdoor and so on, this does not work well for social media. In social media louder voice = spamming. Don’t do it, even if your client really wants.

I will give you 10 practical guidelines from a developers perspective.

Continue reading

Who are “rock star” developers?

Standard

When I started my career, I saw people who were very smart, but they were tough to handle. Account and project managers often gave up and moved to another company just to discover that people like that were also working there.

But in the end of the month these people saved the company and managed to finish projects and tasks, that normal developers thought to be impossible. CEO often had trouble working with these guys, but they never got fired. If these people told that they want to move to another company, CEO offered almost incredible salary raise for stay.

Meet “rock star” developers – senior engineers who are incredibly talented, but their attitude is sometimes tough and they are hard to keep under control. These people are Mick Jaggers and Steven Tylers of the engineering world.

I will write how to communicate these guys and keep them under control and motivated.

Continue reading