Which one is more difficult?

There are 2 steps to doing something:

  1. Making up your mind
  2. Committing yourself to that

In my personal experience, commitment is an issue – especially when I have made up my mind to do something.

There are times (like today/nowadays) when I am unable to make up my mind towards exactly what I want to do.

And then there are times when I am pretty much clear of what exactly I want/need to do, but I am unable to follow it through – from a commitment point of view.

I lack commitment more (not always though) than making up my mind.

I am going to get over this (I am not going to “try” it, I “will” get over this).

I’ve got a few things going on – personally(pertaining to just me, not my wife/kids/parents/relatives – just me – “personal”), professionally, family wise, financially etc – and I believe I am going to be “making my mind” on some of these things in about a week (or a “focused all-night-er” – perhaps tomorrow, may be…) and then I would be committing myself to the actions required for those.

Both of these things are extremely difficult.

  1. Making up your mind to do something (planning)
  2. Committing yourself to do those things (executing the planning)

Execution has been a bigger issue for me, yet, and I am going to eliminate this issue – by executing my plans the way they should be.

What are the things that I believe are needed for:

  1. Planning : Clarity of thoughts, written-down thoughts (prefer hard-copy version, if soft-copy is your thing then go ahead with that), revisit the thoughts every few days/weeks, bridge the gap between your “family persona” and “official persona”, bring your love for family to your work(not company), and bring your love for your work(not company) to your family, think more, give yourself “phone-free” or “distraction-free” time – daily, read what you “think” you are going to “plan”, be more focused, give attention to detail, be competitive, be fast, be faster, be more efficient, talk more, share more, feed your mind more, do not “indulge” in entertainment, do not be addicted to anything, be flexible, be strong and not rigid, be courageous and not bounded, be free, think more(yes, this is repeated, because it is important – THINK MORE)
  2. Execution: Will!

I lack(ed) will, hence the lack in execution, and I am catching up to my will… I still fail and falter, and I shrug off the problems every now and then by doing merciless introspection – I don’t make myself a fool, and I expect very high level of “common-sense” from myself during those introspection sessions – which usually kick-off with “Yes, Mr. JD, what the f*ck is going on?” and the answers start like “Well, you know how *something* is happening/about-to-happen, and I think believe I must do this *something* with more focus, commitment and will”

Well – that’s a lot of stuff for a post that I thought would be 2 lines – I guess that’s what 3.30 AM does to you… removes the brakes of the thought-train, and it doesn’t stop… you have to jump out from the running train (missing on a lot of unexplored venues if you would have stayed on that train… but you are scared that you would never want to jump if you continue to ride…)

Funny thoughts!

Should I change?

So yesterday I had a chat with my CTO regarding my appraisal.

It went great – I am more than happy with the discussion (and the result of the discussion as well).

There are a few people who I genuinely enjoy having conversations with, and he is one of those fellas!

Anyway, I have been thinking about a couple of things that we discussed (there is new/unique way of taking feedback in ucreate – more on this some other time) – and that included sharing some notes (anonymously) from different people who have given feedback for me.

  1. I am awesome
  2. I need to change

While most of the people (including myself) consider me as pretty awesome (and no, I am not letting that go into my head… but it feels pretty awesome to write “pretty awesome” about myself… ūüėÄ ), there are suggestions for some changes as well (including from myself).

E.g. I talk a lot, and that (mostly/usually) causes the meetings to be stretched (I am trying to handle this in a much better way, but still needs to be manged better). Now that doesn’t mean I don’t make sense when I talk, but sometimes (well, most of the time) the core point is addressed either very early in the discussion (thus the person with whom I am talking feels that the call should have been over after first 5-10 mins) or the core points is addressed very late, and sometimes never(hovering over surrounding areas consumes all the time) – and when it is so, then the journey/path around other areas (the surrounding areas) is more important than the destination(which, philosophically speaking, is true most of the time).

In short – I talk a lot, that means I take a lot of time (of others), and that means that people feel that their time is being wasted, but there is a certain closure to the conversation as well.

So, should I “not talk a lot” and just “fix the issue/problem at hand”, thus avoid the “conversation” part for which I was (and still am) being considered a better “lead” (or the way I see it as – “a better human” or “a better conversationalist”), or should I “not change” and continue to do what I believe is better for me(and for those who I interact/converse with)?

If I change, then yes, I have considered other people’s opinions and suggestions and changed myself, but then it also makes me “not me” – and that’s something that will affect my conversations and I might stop getting “effective” in what I do.
On the other hand, if I do NOT change, then I will be discarding the feedback/suggestions that I have received and I will come out as “arrogant” or “rude” and then people might not want to give any suggestions in the future as well (knowing that I wouldn’t be changing anything and would ignore their inputs).

And this was ONE example, and may be for this particular case I could do some improvements that would allow me to function the way I do, and still be able to inculcate some of the inputs.
E.g.
– I would be sharing Agenda and some sub-points before a meeting so that people would know what to expect, and probably a rough time-estimate of each topic (so that I do not over-indulge in a particular point)
– If there is something that I am already aware of (and I just need to communicate it), then I would be sharing document/notes and would share my expectation from the receiver to go through the notes/document and come up with confirmation of understanding and/or any questions or follow-ups for a particular topic/scenario
– Rather than being the “speaker” and “driver” of the meeting, I would want to “speak-last” (like a good leader, knowing/considering other’s opinions before I share mine) and thus allowing others to share more and do not worry about the time considering they would have shared their feedback for the issue/point/scenario already

There is obviously a clear solution to ONE specific problem/change.

There are some other things that have started to bother me as well – and that are “changes” as well – the stuff that keeps me anxious is more technical in nature. E.g. Learning TDD and Laravel (and the ecosystem around Laravel).

I have been good with CakePHP and I am still continuing to work in CakePHP only, for my pet/personal projects.
On occasion I have used/tried SlimPHP framework as well (very light-weight, totally love it).
In ucreate we use “only” Laravel (for PHP) and I sometimes worry if my lack of knowledge(almost zero understanding of Laravel as a framework) of Laravel could be keeping the quality of an average PHP project from improving.

If I would know Laravel (like I know CakePHP, or I “think” I know CakePHP) then I would be jumping in code blocks of different projects, making changes (hopefully without introducing new bugs), doing much better code reviews, adding TDD, adding complex test cases, faster build times by utilising custom Docker images (private/public) that use PHP/Laravel’s optimised ways of doing things, static code analysis, less dependency on 3rd party extensions and what not…

What it also means is that I would start getting inputs/feedback like “Now you know that Laravel is having this issue, while CakePHP may not, so you will have to agree to the way things are done within Laravel eco-system”.

While I know Laravel is adding so much stuff so quickly, and is growing at an amazing speed, however I also happen to know how much more it could do, and I know this because of my experiments with CakePHP and SlimPHP, and seeing how amazing these frameworks are and how they handle the same use-case differently (across Laravel, CakePHP, SlimPHP).

If I would start learning/using Laravel then yes, my tech discussions with team would improve a lot, and that would also mean that my scope of knowledge would also be bounded(for the lack of a better word) and eventually I would know things just as they are in Laravel, and not as how could have been(for better or worse).

So, I am confused – should I change?

I will need to strike a balance for things like these, but then, these 2 things (time-management during discussions and learning Laravel) represent less than 2% of the other such imbalanced/unclear thoughts/decisions.

Democracy, to do what, and what are we doing?

We have not been educated about democratic character.

Democracy has to be revived. It has to be refined.

We believe that we have got independence/freedom (since 1947).

We believe that we are a democracy.

Before the elections, the delegates of the public offices tell the people that “We/you are going to make government, and make someone prime-minister / chief-minister” – and that’s where the process of falsification begins, because we do not decide who/what forms the government and who becomes the prime/chief-minister.

We vote for our local body members, and they are the ones that go to Lok Sabha and Vidhan Sabha – and based on multiple factors vote further for prime/chief-minister and president (representing us, the people of India, since we have elected those members of parliament that take the decision of picking the person representing the roles of prime-minister and president).

This process of voting for prime-minister(omitting the president, because as per India’s constitution, the president is not having any real power) begins days/weeks after the public elections, and there are multiple nominees (sometimes from a single party).

So the lie that we are fed through pre-election rallies and promotions, representing an individual or a group of individuals that would form the “government” is such an inappropriate way of feeding misinformation to the voters that it is mostly accepted as the truth by the vast majority of uneducated and uninformed population.

The MLAs that we choose are not attending many sittings in the parliament, neither the central government’s and nor state government’s.
They(MLAs) are not doing their job – and no-one is asking questions to the very people (the MLAs) that are selected based on votes of people of their region.

If the people of the region of the MLA are not asking questions, then there are no questions for the MLA to be asked further during the parliamentary sittings (and this is a Happy state for the MLAs, but probably not for the people around him).

We, as the citizens of India, have a certain responsibility that we are failing to ascertain if the democracy is being run like it should be.
We have the right to throw away the people who are not working for us.
Start with the MLAs,
Stop cribbing about “bad governance”, start realising about the “bad choices” that you took when you give power to the people responsible for today.

Yes, we cannot see into the future, we can not foresee what kind of government will be formed (single-party, collation) or who would become which minister, but we can surely re-visit the past and see the patterns and train our mind to look for signs of of false-promises, lies, manipulations that were conducted and try to map these to any further speeches/interviews.

An application perhaps to help us make these decisions would be awesome – and probably that’s a brilliant idea for an app.

Logging off, after realising that I went completely off-topic and did not expanded the “democratic character” – more on this some day, soon.

CakePHP 1 | Install, configure, DB migrations

We won’t be walking or jogging, let’s run. Let’s call this run pastry¬† ūüėČ

  1. Create a folder in your server’s web root (/var/www/html in Ubuntu/Apache)
    mkdir pastry and then go inside this folder cd pastry.
  2. Run composer create-project --prefer-dist cakephp/app ./
    This will download latest version of CakePHP from the template/skeleton repo app at github.com/cakephp/app in the current folder (the ./ part tells composer to install in this folder, rather than creating another folder inside this).
    Once cakephp/app package and all the dependent packages are installed, there will be a prompt to set folder permissions (for logs/cache etc). Press Enter on the prompt, or n if you want to set the permissions later or with a different access level.
    After the permissions are set, Security.Salt value will be updated in config/app.php automatically (this will be referred in the next step).
  3. Go to config folder : cd config
  4. Copy .env.default to .env : cp .env.default .env
    Note : Environment variables would be used rather than changing the code files, to keep code consistency across different deployment environments.
  5. Open bootstrap.php and un-comment following lines:
    if (!env('APP_NAME') && file_exists(CONFIG . '.env')) {

    $dotenv = new \josegonzalez\Dotenv\Loader([CONFIG .'.env']);
    $dotenv->parse()
    ->putenv()
    ->toEnv()
    ->toServer();
    }

    As of writing this post, the above code is near line number 55.
    Un-commenting the above lines enable loading environment variables from .env file

  6. Go back to the main folder : cd ..
  7. Run code . : This will open VS code with current folder opened by default.
    From this point onward folder/file path will be mentioned, but not exact commands. Either you know them already (and these commands seem very trivial and stupid to include in the first place) or you would use VS code (or whatever other editor/IDE you prefer) and there would be different commands/actions to perform those actions.
  8. Open config/app.php, copy (or cut) the long string against SECURITY_SALT key, and paste it in .env file against the variable SECURITY_SALT.
    What we are doing here is keeping the code clean from any variables and using .env file for any environment changes.
    I cut the string (not copy) so that it looks like this:
    config-app-php-security-salt
  9. Open .env file and update APP_NAME and set it to any relevant name. I have set it to pastry.
    Un-comment the line with variable DATABASE_URL  and update the value in following format:
    mysql://pastry:pastry@localhost/${APP_NAME}
    The first pastry¬†is DB username, and you might have something else (may be root, you shouldn’t use root¬†for all projects, but that’s a different concern).
    The second pastry is the password.
    I have also kept the database name as pastry, which is set as APP_NAME, but if you have set it up differently, then instead of the variable ${APP_NAME}, use the DB name that you have set.
  10. Open Apache URL in browser for this folder.
    I have URL like localhost/pastry and you should be able to see all checks marked as green, as per following screenshot:
    CakePHP default home page
  11. Go to terminal (in the pastry folder) and run following command:
    bin/cake bake migration CreateUsers first_name:string? last_name:string? email:string:unique:EMAIL_INDEX password:string created modified active:boolean email_verified:boolean email_verified_at remember_me_token:string?

    Break down of above command:
    bin/cake РCake shell (like artisan in Laravel)
    bake РParameter to create files based on other parameters
    migration РCreates DB migration
    CreateUsers РThe migration is set to Create table by name Users

    Rest of the part are columns with some specifications, in following format:
    fieldName:fieldType?[length]:indexType:indexName
    The question mark following the fieldType will make the column nullable.
    The command will create Migration file that will be used in the next step to create DB table with specifications mentioned in this file.
    While this command is used to create the migration file, the file can be created manually as well. Additionally, I recommend opening the file (located inside config/Migrations folder) and review it to get a better understanding of the migration file, and also to fine tune if needed.

  12. Execute migrations by running following command:
    bin/cake migrations migrate
    This will create the DB table as per the specifications in the migration file.
    If there are multiple migrations created in the above step, then all will be executed with this command.
    Running this command again will NOT run previously executed migrations again.
    The log of migrations are stored in phinxlog DB table (created when this command is executed first time).

 

Bake command will be used in next post(CakePHP 2) to auto generate Controller, Model and View files.