Business, life

What Are The Top 10 Interview Questions You Would Ask?

Question in the sky

I’ve thought about some ideas on how we can learn quickly who is sitting in front of us. Yes, I’ve being doing lots of interviews to candidates and it seems to me that the normal technical questions tell nothing. I’m more and more interesting in a try to understand the person and see if there is a real win-win situation.

Over the years, I’ve learn that these 4 questions will give you a good idea about the developer/product manager/designer you wish to hire:

1. What are you excel at?
A nice way to touch on the strengths. What you references will tell me about you?
Btw, ask for a few references and call them. You will be surprise how much you can learn from them.

2. What is your one weakness you wish to improve?
Well – everyone got something that they can improve. It’s interesting to hear the ‘music’ of the answer and less the content. If they say something positive in a custom of negative (e.g. “I’m stubborn and won’t let a problem break me”), you know you have a problem.

3. Where do you wish to see yourself in the next job?
This will help you understand what they wish to do later in life. I used to ask this question with a time aspect (e.g. in 3-4 years) but it’s better to keep it with out time limit as no one knows how long they will move on.

4. What is the one thing that you know to be true that many others think to be false?
I ‘borrowed’ this one. It’s really good.

As for more general questions that I find useful to ‘tell’ you more about the person:

  • What book is your favorite one?
  • What activity you like most?
  • Name you best: movie, song, band, vacation place.

Last but not least, there is the famous list of Bernard Pivot. It’s great not only on celebrities but on your friend at parties as well, specially, if they had few drinks before. Drinks are useful to help them drop the masks.

1. What is your favorite word?
2. What is your least favorite word?
3. What turns you on?
4. What turns you off?
5. What sound or noise do you love?
6. What sound or noise do you hate?
7. What is your favorite curse word?
8. What profession other than your own would you like to attempt?
9. What profession would you not like to do?
10. If Heaven exists, what would you like to hear God say when you arrive at the Pearly Gates?

Standard
Business, webdev

Mobile Is (going to be) The Biggest Platform

What can we learn from the creators of Angry Birds? Rovio (the company that created this game) reports an average of 65 million minutes of game-play per day.

It’s hard to believe. Few good points to take out form this 5min video:

  • Simplicity win (again). Easy to jump in and hard to jump out.
  • Keep thinking on users (retention). Offer, free upgrades and keep your users happy.
  • Build for all the platforms: iPhone, Andriod, WebOS etc’.
Standard
life, travel

Telluride, Colorado – It’s Winter Time

Snow Time in the mountains.
It’s all about being deep in nature and having a blast. When I’ll retire, this is where I’m going to spend my winters.

The White Power

The White Power

Standard
Business, life

Changing Education – From The Best Sir Ken Robinson

From his first talk (that I’ve watched) at TED, it was clear he is one of the great thinkers today that devote his mind to education and how we could/should fix it.

This video is another profe to his deep and strong ideas, plus you can enjoy the animation on the way.

 

Standard
Sport

What A (Redbull) Rider

This Red bull Rider is out of this world – don’t take my word, watch it:

The new riding clip from Danny MacAskill.

It follows him on a journey from Edinburgh back to his hometown Dunvegan, in the Isle of Skye.

Here it is in our world:Dunvegan, in the Isle of Skye

Standard
Business

Never feel sorry for yourself

Here are few notes I’ve wrote down after I saw this powerful talk of Charlie Munger.

  • Never feel sorry for yourself
  • Never feel envy.
  • Good waves and Bad waves – so what?

If you don’t know who is Charlie Munger – well, he is the CEO of Berkshire Hathaway AND the one person that Buffett suggest you save if both of them are on a sinking ship!

BTW, his full talk, is very interesting but I took one thing that was above the ‘ordinary’ – “…On philanthropy: Generally speaking, I believe Costco (Nasdaq: COST) does more for civilization than the Rockefeller Foundation. I think it’s a better place. You get a bunch of very intelligent people sitting around trying to do good, and I immediately get kind of suspicious and squirm in my seat. That may be a prejudice of mine which isn’t quite fair. But I’ve seen so much good in the world by people who really created better systems, and I’ve seen so much folly and stupidity on the part of our major philanthropic groups, including the World Bank, that I really have more confidence in building up the more capitalistic ventures like Costco.”

Standard
life

How To Harness The Good Bugs To Fight For You

I wish I saw part of this TEDx which took place last April in Tel Aviv. Shimon Steinberg looks at the difference between pests and bugs and makes the case for using good bugs to fight bad bugs, avoiding chemicals in our quest for perfect produce. It’s very cool, greener, organic way to approach our battles in the fields.


TEDxTelAviv – may be next year.

Standard
php, webdev

ZendCon 2010 – Caching on the Edge

PHP Caching on the Edge

The goal is to never generate the same response twice.
This is another ‘notes post’ – nothing too organize here (for now).

Changing the HTTP headers with php:
header(‘Content-Type: text/plain’);

Caching  spec – read it on the night you feel like you can’t sleep.

1. HTTP expiration

Is the data fresh? only when the version is stale we will go to the server to get a new data.
HTTP Headers for Expiration

2. HTTP validation

Last-Modified / If-Modified-Since
ETag / If-None-Match

(!) Http cache headers only work with ‘safe’ HTTP methods (GET/HEAD) – meaning, these method won’t change the application state.

Expires – give the date/time after which the response is considered stale.
$expires – gmdate(‘D, j M Y H:i:s T’, time()+5); // expire in 5sec
header(‘Expires: ‘ . $expires);

* With expiration of less then few days you might hit problems because the clock in the web server and the clock in the client is not showing the same time.
* HTTP/1.1 spec says that you are not allowed to send expire for more then 1 year in the future. WHY?

A better way:
* Use cache-control
header (‘Cache-Control: max-age=5’);

(!) So use expire only for things you want to cache for very long time (more then 48h).
On other cases, use cache-control.

Usage of ETag

You can compute the etag on your own or use a tool that do the work for you (some good framework).
ex: http://http.trainings.sensiolabs.com/etag.php

* Expiration wins over Validation – first we checking the expiration.
* Expiration allows you to scale as less requests hit your server.
Validation saves bandwidth.

PHP and cache

http://http.trainings.sensiolabs.com/cookie.php

session_start();
$_SESSION['foo'] = 'bla';

(!) By default – when you set a cookie… php set for YOU no-cache/no-store/must-revalidate
Because if you have a cookie, you don’t want to cache the page.
It’s more a ‘safe’ default. So no one else could take this information from you.

header(‘Cache-Control: private/public, max-age=5’);
private – will prevent any proxy from cache this page.

Types of Caches

1. Browser cache – for example it’s good for images.

2. Proxy cache – inside a company/organization. It still on the ‘client side’ and it will mask all the clients that site behind it.
We can find it in big companies and lots of ISPs. It’s public.

3. Gateway cache (=reverse proxy or Http Accelerator or Surrogate Cache) – This is just like a proxy BUT it is on the server side.
Shared cache on the server side. Make your site more scalable, reliable and improve performance.

Gateway cache

In practice, most caches avoid anything with: cache-control, cookie, www-authenticate, post/Put, 302/307 status codes.
Cache-Control in php save us with a safe default of ‘private’.

A gateway cache won’t cache anything ‘private’ or carrying a cookie – so how can we use Google Analytic and still have cache?
use varnish… or any other proxy that remove+add the cookies before the request hit the server.

In cases where you want your code to run with reverse proxy like Akamai/varnish (esi tag is supported) you should use:

Surrogate-Capability: abc=”Surrogate/1.0 ESI/1.0″
Surrogate-Control: content =”ESI/1.0″ <– this will let the reverse proxy to parse the tags.

(!) You need to set these features in Varnish (they are not there by default).

Symfony2 – got a reverse proxy that is written in PHP. You might want to use it if you can’t afford to use varnish (it’s free – but let say your hosting company won’t install it)

In the end of the day, you want to hit the application as less as possible.
You can do it with HTTP headers and ESI.

Last but not least, please remember that, the one who picks his targets carefully, acts quietly, and achieves his objectives — he wins wars.

Standard
JavaScript

ZendCon 2010 – JavaScript for (real) beginners

Warning: this is not a real post…
It is more ‘some notes’ I’ve took in one of the morning sessions in ZendCon 2010


* In php associative array are very powerful – in Java script the keys will be integer.
You can have the same ‘associative’ if you build your own object that contain the features.

var obj1 = new Object();
obj1['foo'] = 'momo';
obj1.foo2 = 'bobo';

var obj2 = {
‘foo’ : ‘bar’,
‘confObj’ : ‘bla-bla’
}
console.log(obj1);
console.log(obj2);

* Nice way to use array {key1: “value”};
* The ‘this‘ keyword – what it point to now? A good question with more then one answer.
* ‘new‘ – create a copy from the function/obj and assign it.
* instanceOf – are X is instance from Y? (return as string)
* typeOf – lots of return options.

*

functions

both as objects and as contractor or procedural

as Procedural


function ff(str) {
console.log('ff is:' + str);
}

as an Object


var foo2 = function(str){
this.str = str;
this.say = function(){
console.log('inside say let see what is str:'+str);
}
this.say();
}

prototype – a way to let you inheritance
* jQuery (Mr. Rasig) show a nice way to do a way of ‘class’ / obj and standard inheritance.
For example:

var Robot = function(name){
this.name = name;
this.say = function(){
console.log("bla bla my name " + this.name );
}
}
myRob = new Robot("momo");
// refine say
myRob.say = function() {
console.log("Yo - my name " + this.name );
}

// lets add to the ‘class’ definition a new function – it will be in all the obj. we created from it
Robot.prototype.showDown() = function(str) {
console.log (‘bye bye ‘ + str);
}

Useful sites/resource to keep learning the core of JS (and not just some ‘cool’ animation):
** eloquentjavascript.net
** mozilla – core and ref
* nczonline.net
* wtfjs.com

Books:
* JavaScript: The Definitive Guide – David Flanagan
* JavaScript: The Good parts – Doulas crockford
* JavaScript Patterns – Stoyan Steganov
* High-Performance JavaScript – Nicholas C. Zakas

On twitter you can find more #zc10 or #zendcon

Standard