Archive for January, 2010

CodeIgniter advanced search implemented

 

I had to implement advanced search algorithm which supports pagination and multiple open sessions at one browser. My main issues were the following:

  • how am I able to support the pagination?
  • where am I going to save the search parameters?
  • what happens when I open 3 tabs and search simultaneously?
  • when am I going to flush the recorded results?

It was clear that I had to persist the data to each page. My first idea was saving the params into flashdata() (the temporary 1-time session or rather request forwarding). It was good solution if you restrict yourself to one tab only and navigation only page-to-page. The problem was my 'details' page where parameters got lost. As well as the 'back' button, too.

CodeIgniter itself doesn't allow GET queries in the URL. Actually it does, but not by default and it's bad practise to do it.

Therefore I decided to resend the flashdata on all required pages. But what happens if you open few tabs at the same time? All search results get mixed up and all tabs get the data from the last query called.

Another popular trick is persisting into multidimensional $_SESSION array - the name (unique) of the session and all the params. I actually can't think of a reasonable way to flush the sessions regularly and manage big sessions (cookie limit is 4K after all).

So we decided to create a new DB table for sessions. There we save all the params as serialized array. We use both the session unique ID and the page number when navigating.

Code snippet and explaining in the CI forums - How to implement complex search

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

How come that I don’t do Skype for business?

 

The Skype revolution few years ago was one of the Internet innovations I was rather unhappy to happen than cool with it.

First of all, my Internet experience was based on technology that didn't allow VoIP communication at all. Hardware was weak, there were no integrated sound devices on motherboards, and the Internet connection usually was slow enough even to load pages properly. That's way my first years were related with IRC and ICQ - more chit-chatting protocols.

The other issue is the closed protocol that Skype provides. Compared to IRC that is open (free-for-all) or ICQ that is at least unlocked at some point, Skype provides no support for 3rd party clients, scripts etc. You have no idea what happens behind the scene. So in fact the only think you have is the facade, the UI that developers have meant for you to use. How does it actually work is an open question for all.

VoIP and video conf calls are great feature to talk to relatives around the world. It's free and it's good to communicate with people abroad and do more 'live' connection with voice and look. But when it comes to business, I would prefer using mails and messaging. First you have enough time to form correctly your thoughts and define it the right way for the other side. Second, you have logging which makes it suitable to keep in touch with what you have to do in a tasklist-like form. The ink is on paper, that's all.

Email/Gtalk is what I would use as an alternative.

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

Project-base, Support and Salary

 

During my couple years of work as a PC techy support guy, administrator, company hired developer and freelancer, I've finally separated three different types of work: project-base, support and salary.

Project-base

This is a popular way of working in USA and Europe. The client has a task to be performed by an expert. Therefore the employer seeks for an appropriate guru to fulfil the one's requirement. Simple as that.

What are the major characteristics of project-base work?

  • fixed requirements
  • usually short-term or medium-term
  • fixed price for the whole project or different phases

Focusing on the broader perspective, a freelancer could be hired for a small website or script, but there are big corporate systems developed for tens of manmonths, too. So borders may vary. But requirements are fixed at the beginning, as for the money, too. No surprises during the development process.

Support

Support staff is hired for a preliminary defined schedule. Let's say every second Monday of the month or for 10 hours for the whole month. This is a capacity being paid at the beginning for doing simple (or important, but not that time wasting) tasks. The client doesn't need a full time expert, but wants a regular technical guy to be available for consultations or small fixes.

Usually, typical support marks:

  • fixed work-time or hours
  • fixed month/hour price

Support work could be tricky if you maintain couple of different support projects. But if business case is clear and hours can be easily predicted, than it is a sweet and not that engaging perspective.

Salary

That's probably the most popular working type in the world. Rules are simple: you have a week amount to fill and... you just have to fill it. Let's say 40h a week, 9am to 6pm working  at the office and that's all. Irregular overtime, constant availability. Tasks may vary - the employee is available at the work time he is contracted for and can be 'squeezed' for different tasks/services.

What's cool with salary work?

  • regular and usually good payment
  • some benefits as transportation taxes covered or cell phone bills
  • work ands at 18 o'clock and then you're all free

And what kind of work do you do?

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

Collabtive – cannot login after installation

 

I had a research on project management systems. My top 2 choices were .project and Collabtive. Unfortunately I was unable to properly install the .project and logically rejected using it as a personal PM solution.

What I find charming in Collabtive is the concept of usability - most important sections are in the horizontal menu on the top. The system is AJAX-oriented which makes passing through different modules almost transparent. There are few important mods:

  • Projects
  • Tasklists/Tasks
  • Users
  • Messages
  • Tracking

So, what can you do with Collabtive? Add users with privillegies, write description for your clients and projects, then divide them by phases and add tasklists with tasks. You could set start/end hour for working projects and receive an invoice-like print preview of all projects and how long did you work on them. Fair enough. The only missing feature is automatic tracking and start/stop button for tasks - when you don't have to take care of start and end hour of each task.

Hope this one would be implemented, too. Otherwise you could use Toggl - either the whole PM system, or the timer only. Or use a custom tracking script.

I was surprised that I was unable to login for second time after logout. There was a technical problem with the system. I tried a couple of things to fix the issue, but no success. Some of the known issues include incorrect session.save_path in the PHP settings which can be redefined to a path with writing permissions. The other was the magic quotes option that could misunderstand your user input and therefore change the password itself.

My server had writing permissions and session.save_path changed via php.ini file so problem was hiding somewhere else. The hardcore fix was changing the password from the database:

 

 
UPDATE user SET pass = SHA1('your password') WHERE ID = 1;

 

The Collabtive system uses SHA1 hashing for passes, so I just hashed the pass by myself. So it's working the correct way now.

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

BubbleTip – jQuery bubble tooltip

 

I had to implement a bubble tooltip helper for a client. After a short research I tried the Coda Popup Bubbles.  Useful plugins that worked great for a couple of days, when I set it for a single text field and 2 browsers only. When I decided to integrate it as a platform independent snippet and add it to 10 more textfields, I hit a rock - indents from bubble to the textfield were not consistent, bubble was popping over the textfield etc. Some images were also missing - left and right borders in Firefox and the bottom arrow in Internet Explorer.

I used to hack the Javascript and CSS for 3 days and finally got stuck. I found a workaround working since then - the BubbleTip plugin, which is a modification of the upper one, but acting better in different browsers. Also, it's using an automatic offset which makes it far more useful when you have different text in bubbles.

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

Mini SEO book

 

Yesterday I found a useful guide in Russian that covers most of the useful tips and tricks in SEO optimisation.

The short book could be find here. It's in Russian, but it could be translated via Google Translate with a similar meaning. It covers the important practises as defining title/keywords etc fields, setting alternative texts to links and images, adding images and videos to pages and posts, be careful about density of keywords etc.

Enjoy the resource. :)

 

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

Optika Zornica – google ranking improvement

оптика Зорница

2 months ago I deployed a client project online - Оптика Зорница, for optic services, sunglasses, health consultations etc. It started with no budget for advertisements and I had to do at least basic ranking. What I did was the standard procedure:

  • Chose an appropriate domain name
  • Define title/keywords/descriptions
  • Write valid XHTML/CSS
  • Link it from my personal projects
  • Submit the URL in public search engines and social networks
  • Create a blog and publish information about new products, health advices and other useful data
  • Simulate dynamic activity via rss feeds in the basic site
  • Create Facebook fanpage of the website

I have a couple of other things to do, but I prefer doing them step by step - in order to keep regular activity and watch the continuous improvement. Currently I keep the first 2 places for the Optics name (it already existed in many ranked catalogs) and present on second page on "Оптика" search in Google. Google page rank - 2. Target is first page and blog popularity.

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com