Thoai Nguyen

Nice guy, Bookworm, Hacker, Bootstrapper

Page 2


The dark side of intelligence

The following article makes a very good point about how being intelligent, or rather being overconfident about it, is a certain path to self-destruction. The principle applies not only to startup and business but also to almost everything in life, including relationships.

  • Your high IQ will kill your startup (Jamie’s copy)
  • Backup link (PDF, from my dropbox)

Links are only visible in full post view.

@Max: I am keeping a copy for my personal use. However if you want this article off-the-grid, please let me know and I will gladly comply.

View →


Pre-filling a silex form

Let’s say you want to populate another form with some data (on a GET request). This is a single-page Silex app and not a full Symfony2 stack with object based forms. We are talking about a form that uses simple array as its data model here.

The form is generated with the following piece of code:

$app->register(new \Silex\Provider\FormServiceProvider());
$app->register(new Silex\Provider\ValidatorServiceProvider());
$app->register(new \Silex\Provider\SessionServiceProvider());
$app->register(
    new Silex\Provider\TranslationServiceProvider(),
    array(
        'translator.domains' => array(),
    )
);

$form = $app['form.factory']->createBuilder('form')
    ->add('name','text',['label'=>'Full name'])
    // Add other forms fields here.
    ->getForm();

Assuming the pre-fill data is stored in the key-value array $data. My first attempt to fill the form was:

$form->submit($data);

...

Continue reading →


Being Alone

It may not come very often, that you befriend with solitude. Whenever that happens, life could be intense. Without the distraction of the outer world and social relationships, without a single soul to be seen, you see yourself clearly.

Perhaps you are not completely alone in this moment. You are watching a trace of my thoughts, something that used to be the present at some point in time. Not anymore.

It is puzzling for many to observe an introvert, asking themselves what there really is in that moment, of silence. The explanation to that is rather simple, sometimes too simple for a learned mind to grasp. What if there is nothing to disturb you anymore? What if you are at the peak of your anger? What if you are just calm, without any thoughts, without thinking, just being?

The fact is simple: we can see ourselves with utmost clarity being alone. Life has a way to balance, or re-balance...

Continue reading →