Showing posts with label productivity. Show all posts
Showing posts with label productivity. Show all posts

Monday, February 26, 2007

Tips for software development /theoretical/

Well we all know how vast this topic is so I am going to be simple on this ;)

I will take two of my favorite sayings!



"Things should be made as simple as possible,
but not simpler." — Albert Einstein

Let us dig deeper on this thought! All people seem to have heard such sayings and react as "Well it is obvious you fool it is like you found a gold mine... fool!" when someone told them this wisdom. But why are they reacting so and why are they producing these enormous amount of software that is so over complexed?

Simple! They know it but never use it!
There is an other situation where dead lines play role and developers are forced to continue coding without re-thinking what they did wrong and fix, rewrite, rethink ... it and so on.

So what is my tip for such people!
Do not agree to short dead lines! Know what you need ... time money... and so on for the software you do. Don't calc it to the shortest possible way!
Calc it to best one available. By best I really mean doing something like this:

1. "Time for the project" /time you think is enough for the project to be build/
2. "Time for the project"x2 /double the time needed/
3. +50% /for the unexpected/

So now calc the time!
If the time for the project was 3months .... add x2 and then 50%... it basically happens to be x3
so it comes to 9 months for the project to be ready... but you see it will really be ready and will satisfy most of the needs of the purchaser.

This scheme will prove the most effective if you are serious about software and do build software the way it should be build ... SIMPLE AND ELEGANT!


I will not give more information on the topic as it is well written and much more explained in hundreds of pages all over the net and the globe ;)

I will just give you an example of why simple software wins!
Here is another wise thought!


"All things being equal, the simplest solution tends to be
the best one." — William of Ockham


All sounds very logical right :)
William and Albert told it!

If you found this refreshing of thoughts interesting then I really entered your mind and found a sweet spot... but the most important thing is! YOU REALIZE THE IMPORTANCE OF ALL THIS!

I recommend you read the book of 37singnals - Getting Real
It will reveal most of the things I didn't mentioned here but you already are thinking for. You can buy their book or just read it online at their site http://www.37signals.com/
Yes those are the RUBY people ;) they are the founders of Ruby On Rails.
So they know what they are talking about after being quite successful over time.



I would like to finish with this wise words again ;) so think over them whenever you build software... and in general something that people would use.

"Things should be made as simple as possible,
but not simpler." — Albert Einstein


Прочети цялата статия...

Sunday, February 04, 2007

Google Desktop to kick Yahoo! Widgets


According to recent researches Google Desktop is getting far more acceptable by the users than the Yahoo! Widgets. Why so?

This article is intended to give a clue on why people are using Google Desktop or having a sweet spot for it.

Google Desktop is a simple!





The widgets you use with Google Desktop are simple and elegant. They give you just enough swing to do the job you want to do. You have your calender, your gmail and so on... what so ever you say! Yahoo! has integrated their services with their widgets long ago too. Yes! In fact Yahoo! widgets are currently more powerful than the Google one but their approach is far too different from the Google one.
Yahoo uses a widget engine which operates and loads every widget like another process unlike Google widget engine which loads the widgets "within it's own process".
But really is this good ?
Yes! It is!

Google Desktop is by far faster than Yahoo! Widgets ... Yahoo! Widgets get the upper hand if running one widget but putting like 10 widgets running on both engines Google Desktop is by far the WINNER!

Beside benchmarking and a bit of technological difference Google is much more different and powerful than Yahoo in the sense of SEARCH.
Well as we know the giant ;) in that view GOOGLE of course is always oriented towards information and finding it... weather, news, shopping, mapping ... Google finds it ;) Yahoo long ago saw this and is by far the best concurrent of Google but when speaking for the Desktop Widgets Yahoo! really didn't throw much search capability in it.
Google have!

Here is a short list of comparison between the two products
Google | Yahoo!
G simplicity and usability
Y more complexity

G search oriented
Y design oriented

G being fast when dealing with more than 5 widgets
Y getting slower with more than 5 widgets

G integrated company services
Y integrated company sercices

G developers ease and support is good
Y developers support and ease is good because of being on the market longer than the opponent

G simple design and functionality ... having simple, elegant widgets for the everyday tasks
Y complex and good design but user experience isn't good with some of the widgets
for the everyday work




After giving a short summarization of all that is on the internet and my own research I like to put a few words about the services and the products both Companies offer and why I personally have switched to Google Desktop.


1. Having the Yahoo! Widget engine working with more than 5 widgets rendered my NOTEBOOK (which is not the cutting edge stuff) useless sometimes when developing software

2. Most of the widgets couldn't be resized and so on fitting more comfortably on my desktop unlike Google Desktop which can resize every single widget so you can make it fit better

3. This one is because I personally like GMail instead of Yahoo! Mail which is more colorful and so on... :) so using a Google account is more integrated with every single service of Google unlike Yahoo! (which isn't far behind)

4. TODO lists, Scratch Pads and so on statistics and note takers the everyday task widgets on Google Desktop far more suits me than what Yahoo! had offered.




And the conclusion is!
My research shows that people seeking information and IT people (programmers/developers,administrators,webmasters) are more comfortable with and prefer Google Desktop while most of the so called normal average desktop users and designers and people that are always creative(sometimes meaning over creative) and so on likes the beauty of Yahoo! Widgets.

I personally find Google Desktop more robust and "TO DO THE WORK" software but this is my experience!

So what do you say ?

Comments on the topic are highly appreciated...

Прочети цялата статия...

Saturday, January 06, 2007

Use of Model View Controller

Model View Controller also known as MVC is a great way to do development. But what actually is MVC? It is not a tool or software that you can actually buy... well yes you can buy it and you can name it a tool but I will not speak of those made by others but for those hand made by you. OK so what was MVC? MVC is a self made FRAMEWORK. It's idea is to have TREE TIER SOFTWARE DEVELOPMENT.
Those tree layers are Model, View and Controller. In this article I will write mostly about the CONTROLLER and leave you space to think about the other elements while I will try to give you some basic idea about them too.


step 0. We start building some project and we don't know where to start from. Obviously we should start with some configuration file right? That is good... but don't forget the initial planning it is way more important but we skip this now :) After building some config file we need an index.php file which we will enchant with the power of MVC methodology.

So a basic step 0 is to make a config file and index.php with some basic design and idea.

step 1. The next thing we will do is to build our CONTROLLER. It is responsible for controlling the overall process of our application. So it needs to comply with the following things:
- handle URL requests
- process requested information to and from the layers
- handle loading of classes

This is our very basic form.
/we skip some other code that should be there keep that in mind/


Here it is in PHP code:




##### ..:CONFIG FILE:.. #####
require_once("../config.php");
##### ***CONFIG FILE*** #####

##### ..:AUTOLOAD:.. #####
function __autoload($class_name) {
$dirs = array('/experts/','/experts/db/','/experts/user/', '/experts/question/');
array_push($dirs,'/experts/exceptions/');

foreach ($dirs as $dir) {
$classfile = CLASSES . $dir . $class_name . '.php';
if ( file_exists($classfile ) ) {
require_once ($classfile);
}
}
}
##### ***AUTOLOAD*** #####

##### ..:CONTROLLER:.. #####
if (isset ($_REQUEST['module'])) {
require_once(MODULES . basename($_REQUEST['module']) . ".php");
} else {
require_once(MODULES . 'default.php');
}
##### ***CONTROLLER*** #####




So what you see in this code is that we include in the first place the CONFIG file and this shall be clear why. The second thing is making use of AUTOLOAD function in PHP5 which finds for us the needed class and we don't care about including classes we made into the files (modules) we write.

And then the actual CONTROLLER which just looks a GET parameter and sees if its name build with .php exists in the MODULES folder and if yes it loads it... if not it loads a default one.

This is the INDEX.PHP file code... it needs to have some design or some VIEW implementation which you can see how to achive in the bottom (well actually you will have to read a bit more off this site but don't bother I might write about this another time)

step 2. Is the Model... we will call these MODELS - MODULES.
These MODULES work in the following way:

They are loaded by the CONTROLLER and they serve a specific functionality like login/logout. In this Module we work with the functionality (the classes) we wrote. And this is it.
We might do this to work directly with the VIEW as the following code:




// Proccess with user input if given
if (isset($_GET['action'])) {
switch ($_GET['action']) {
case 'login':
require_once(STATIC_MODULES."login/handle_login.php");
break;
case 'logout':
require_once(STATIC_MODULES."login/handle_logout.php");
break;
}
}

// Display the needed Smarty tpl
if (isset($_SESSION['auth'])) {
$user = unserialize($_SESSION['user']);
$user->loadStats();

$smarty->assign("button" , '<a href="index.php?action=logout">
<img src="button logout.png" style="border: 0px;" />
');
$smarty->assign("username" , $user->getUsername());
$smarty->assign("title" , $user->getStats()->getTitle());
$smarty->assign("points" , $user->getStats()->getCredits());
$smarty->display("STATIC/login/login.tpl");
} else {
$smarty->display("STATIC/login/login_form.tpl");
}




The Module just looks after a PARAM to be sure if it is set then process to other modules if necessary ... then it unserializes an OBJECT of the user from the SESSION loads the user info and process the needed info for the VIEW (which is SMARTY template engine).

step 3. The VIEW is already mentioned it is just a TPL file of SMARTY ... for more info about this Templating Engine look at smarty.php.net or just google it for more information. In few words the VIEW is a TPL file which has in it those {$variableName} tags which by parsing this file they are replaced with values that we assign through the MODULES (MODEL).



So for all of you PHP geeks which were not known to MVC I think this is enough to see the power you get from this framework... if you don't see it I will mention some things:

- You get a FRAMEWORK for every project you build to use
- It is easily to upgrade and use
- You don't need to touch the files of your framework most of the times only the CONFIG file and then just start building the MODULES
- You easily will redesign the site because of the templates you use
- You write without caring about includes paths or other stuff
- and if you write this good (not that this isn't good but this piece of code is not what it is now at the project we have used it... yes this was working code :) now it is more advanced with more lines of code and complexity but this is its main idea) you will develop you projects twice as fast as you usually do and believe me when I say YOU GOT THE POWER OF Objects AND Templates AND Re-Usability OF CODE and this is what most programmers have difficulties to achieve.

But YES this isn't a topic that I can cover in a hour or too just like this and yes I am not good at large scale Articles which cover future and history and so on so just look at what wikipedia has to offer about this topic... I'll ease you with this direct link to MVC at wikipedia.

I hope I have given you the first steps and thoughts about building your own MVC whether in PHP or some other programming language.
Have fun!
And remember not to hate your code but to have fun with it ;)

Прочети цялата статия...

Wednesday, January 03, 2007

The productivity coefficient

The productivity coefficient formula is one tricky thing that not many people know and practice. This post is intended to bring some light over this topic so feel free to be angry when you learn how wrong you were about this.


So what is this coefficient formula for productivity?

This is it:
P = W / T

P = productivity coefficient
W = Work done
T = Time spend on work


What this simple formula tells us is that the longer you spent time at job the less the coefficient will be.
You will say yes but also the WORK DONE will increase... YES but lets be for real will the WORK DONE be
more that the time when you spent 11 hours at work than 4 ?
I don't think so and I proven it.
Actually statistics say that the average people going to job like 10:00 starts working at 14:00 and they work till 18:00 then again till the end they don't do much. Why ? It is simple! They have time! So why the haste?
We have time, we have work ... so if they really don't work for themselves it isn't likely to be productive.

Let's see the big picture in this.
I go to work usually at 10:00 and work till 19:00 I am so productive at the first two days then I need more sleep and more I get de-motivated and so on.
Now I work from 10:00 till 16:00 and I don't actually do muck off topic at work. I am motivated and I do the things more easily and it is all fun... and the big + in this is that I have time for myself :-)


This is real example guys ... I do this for real and it works for me and other people around me too.

But lets face it! If you have to do a project in 48 hours you shouldn't bother to NOT follow this :-)
This was a bit jokingly but if you don't believe me just try this for a week if you can and see the effect.
I recommend doing a graph of all the process so you can really see the difference.

Well this is it ;-)
Have fun and don't forget:

The world is full of fascinating problems waiting to be solved...

Прочети цялата статия...

Manage your consciousness

I will start this with a question. How many of you have ever started something or planned to do something but actually never did it because you were scared to do it 'cause it is so hard or time consuming ?

Well I will answer for some of you and tell: "Well my friends and I are very familiar to this problem and it happened a lot of times especially for me."

OK so what can we do about it?
Actually the answer to this and it's resolution are very easy.
You asked yourself what could that be right ?
Well I will tell you now ;-) the answer is a TODO list.

TODO lists are a very helpful thing.
They will present you with short term targets that you can manage easily and give you a time management scheme.

Look at this example:

1. Create a simple database
2. Make user login
3. Make user register
4. Make user status panel
5. ...

OK this simple sample ;-) tells you the steps to actually start the thing. When you think about the project you tell what the **** this thing is huge it needs this and that and that... and so on and you actually de-motivate yourself by doing this... and what about the time?

By thinking small you are really realistic about giving the time for building something. So you can start putting small time lines on every task like this:

6. Statistics about user registration - 3 days
7. Statistics about user interests - 1 day

You see the time of 7 has been 1 day instead of 3 days 'cause it may reuse the whole code from 6 but you really can't tell this until you see it. You can even drop a few words about problems or just a simple description after each it may speed up the idea you had in the initial planning (the building of the todo list).

So at last I will give you a formula to sum up the time of the project. It is simple sum the whole todo list and add 25% for unexpected things if you want to be honest to your clients and your time :) if not giving this 25% you may consider it very likely to drop of the plan for some day or two... which might not be critical but it is not a good thing for a client to see you behind schedule. If you want to do this the right way the formula is ("todo list time" + 100%) + 25% but many consider this not a good practice because they loose clients.... but this is most seen in small companies where every page they create is valuable and they actually make pages instead of projects if you know what I mean ;-)

OK that's it folks!
I hope this one article was helpful for you.
In the next article I will write again about managing and disciplining your self topics.

Cheers!

Прочети цялата статия...