Tuesday, February 09, 2010

Handling multiple tasks and projects

During the years, I have been faced to a lot of pressure from different sides. The most difficult task I ever had was to stay calm ,solve all the issues with projects, organize with coworkers and be available all the time to the client. Just few years ago,  I was falling apart because I was not able to handle it all. I looked myself where I am standing now and I can say I was pretty satisfied what I saw. This entry I simple that: advice.

  1. The client is always right. And I mean always. You wont get absolutely anything if you start complaining .  This is the most expensive mistake you can make. If you are facing with the client that has no technical knowledge and asks for impossible, you must use your verbal skills to explain it in a nice way. If you are dealing with a person with technical knowledge ( your boss for example) and has different opinion from you considering some task, he is right. And he is always right. Have no doubt about that.
  2.   Your thoughts must be positive. Even impossible tasks can be achieved with this attitude.
  3. Always be online with the client. Do not disappear even if you have delay and even if you crossed really serious deadline. Trust me! Everything can be managed and fixed but if you disappear, you are one step away to loose your job
  4. Have a defined time when you work. If you loose your social life because of experimenting with technology or work at night, you will be less productive. I usually start at 09:00 A.M. with a warm coffee and i promise you it is much better when you have a chance to end you working day watching a movie with your wife or drinking a glass of beer in local bar with your friends. 
  5. If you are responsible for other developers and milestones you have depends on them, make a short conference once per day to check the status. Ask for timelogs of the tasks at the end of the day. You will be pain in the ass but the work will be done.
  6. Use Subversion Control to manage your code. I can not imagine to work without it. If you are Flex developer or you use Eclipse, you can easily install plugin so you can commit or update your code directly in it. Also, great news for Flash developers is that from CS5, you will be able to save the project in XML format, so changes can be logged better.
  7. Define a tasks you want to manage that day. It is great thing to have some kind of Project management system. I used a lot of it : jira, basecamp, activeCollab, etc . If you can not afford it, I suggest to open account on http://unfuddle.com . It is free and you can manage one project per time but you will get a place for your repository too.

I believe that list can be much much longer but those things above are most important i believe. Hope you found some of it useful...

Friday, January 22, 2010

Text Layout Framework BreakOpportunity error

 Recently i was developing application that uses Text Layout Framework and runs in the browser using Flash Player 10. When trying to use the same piece of the code in new created AIR application, the following error shows up: "ReferenceError: Error #1065: Variable flash.text.engine::BreakOpportunity is not defined.".

The solution is to edit .actionScriptProperties file inside the root of your project. Find htmlPlayerVersion tag and change it to something like this: htmlPlayerVersion="10.0.0". This will do a trick. It should save about 2 hours of your life :)

Friday, November 07, 2008

Flipping the paper - Flex 3D effect


Here is something i did while i was testing TweenMax's bezier tweening with DistortImage class. Check the demo here and download swc file with documentation here. Pretty cool effect, huh?
(yeah, just wanted to let you know i am still alive!)

Friday, June 27, 2008

Exporting PDF from Flex

You know you can generate PDF documents from AS3 by using Life Cycle ES but what happens when the project you are working on requires another server technology? In my case - PHP. Well, you can just tell your client that PDF is not good option at all! Hey, that could solve the problem! OK. Since i am working on the project that requires pdf generation, i made simple class to achiefe that. You can download APDF class from Google code:

http://code.google.com/p/apdf/ .

In the package, you will find php code too (it requires PHP 5).
There are two versions of APDF you can download. The only diference is that one of them use as3corelib for image encoding - see my previous post (please be aveare that as3corelib is NOT included in the download) and the other one not. If you are on Flex 3, choose the one with out as3corelib.
The APDF class enables to create and export PDF documents from Flex. It uses open source PHP library FPDF to generate the pdf document. You can add the images or text by calling APDF methods. This is still in beta but i would really appreciate you let me know if you find any errors.
I was thinking about to make a demo application that enables you to dynamicly create pages, add images, text, links and so on but it is sooo predictible... So i made application that enables you to capture the video, add coments to captions and then finally to export all the captions to PDF. Think it's pretty cool but i will leave it to you. Check it out
HERE.

Thursday, June 19, 2008

Image Editor in Flex

I had a fun last night building the application which allows user to edit images directly on the server. There are couple of options like color, hue, saturation... Why? Because the current project i am working on is Flex CMS with integrated web analytics and image editor - all in one. Man, it turns me on! Anyway...

If you wonder how to export valid jpg or png files form Flex, this is how you do that. First, you need to download as3corelib form Google Code........ And that's about it! :) Really, it's easy as that! In the as3corelib package, there are two classes used for image encoding: JPGEncoder and PNGEncoder.
If you are using Flex 3, you have built in classes mx.graphics.codec.JPEGEncoder and mx.graphics.codec.PNGEncoder. What these classes do is to convert BitmapData object to valid JPG or PNG as a ByteArray. Since i am using PHP all the time, i will explain how this works with PHP (the PHP is used only for decoding and for displaying the image).

I made a simple class to achieve that - you can download it from here and check the methods here(as3corelib is not included in the download).
What happens when you convert BitmapData to JPG? Well, you can't do anything with it if you do not know how to actually display ByteArray.
First, you will need to encode ByteArray with mx.utils.Base64Encoder and to decode that data on the server. This is where PHP comes with base64_decode function. And that's it. :) When you check the class i provided, you won't have to think about it and PHP code is included in the class too - just call tracePHP function.

Make shore you check the application i made for testing. There are a couple of images of my naked wife you can edit and save to your computer.

Yeah... dream on!