CSV to DataTables, WordPress plugin


Update! The plugin has been approved by WordPress and it is currently available to download within the extensions directory – https://wordpress.org/plugins/aj-csv-to-datatable

Hi tech heads,

Today, I got the opportunity to create my first ever WordPress plugin. Well, this wasn’t quite planned like this but somehow I ended up creating my own WordPress plugin. Since few days, I badly wanted to show CSV data in a DataTable (yes, in Allan’s DataTables) within WordPress. So, I browsed the WordPress extensions page and found an interesting, easily configurable plugin “csv-to-sortable” which uses the JS sortable library. That is a decent plugin and does the job very well, but I wanted use DataTable instead. (Maybe I am in deep love with DataTables). I got extremely inspired by this plugin and then I decided to create a similar looking WordPress plugin so it can use DataTables to present data. I have submitted this plugin to WordPress plugins and it is currently being reviewed. However, if you want to get your hands dirty with this, before WordPress finish reviewing, then here it is.

Link to download the plugin – http://e-innoving.com/samples/wp-plugins/AJ-CSV-to-DataTable.zip

I have created a new repository in GitHub for this plugin so anyone can see what’s happening inside. Click on the link below to view the repository. Installation and usage details are also mentioned inside the GitHub page.

AJ-CSV-to-DataTable in GitHub

Continue reading


Chiswick House and Gardens

Last Saturday I managed to take some time off from my work and spend some ‘me’ time after a long time. Usually, I easily get occupied with various of programming work even in weekends apart from my regular weekday work. But last Saturday, I decided not to stare at the Laptop screen and enjoy the beautifulness of the gorgeous Mother Nature instead. To be honest I did not had a single clue about where I should go to breathe some fresh air and spend some quality time with nature. Once again, thankful to Mr. Google, I searched for some scenic parks around Hounslow area and got to know about this beautiful Chiswick House and Gardens.

Chiswick House and Gardens is located in about 10 minutes of walking distance from Chiswick Train station. When you walk out from the Chiswick Train station you will immediately see a sign board saying the direction you should walk.

Arguebly Chiswick House is the finest remaining example of Neo-Palladian architecture in London. The House was designed by Lord Burlington and completed in 1979. – Wickipedia

Continue reading


WordPress 4.3 new formatting shortcuts

Hi guys,

I am pretty excited to see WordPress 4.3’s new formatting shortcuts. It makes blogging life lot easier with newly added formatting shortcuts. Here I am going to list those shortcuts for you.

  • Use ## to make a text h2, ### to make a text h3 and all the way to h6.  (By the way no h1 is available, so you can’t just use one #, perhaps another approach ?)
  • Use * (asterisk) or – (dash) to create an unordered list. Make sure you give a space after the asterisk / dash. However I found it little bit difficult to create an unordered list with dash, so I always use asterisk.
  • Use 1. or 1) to make an ordered list. Make sure there’s no space between the 1 and dot but a space after the dot. However I found it little bit difficult to create an ordered list with 1) over 1(dot). So I always use 1(dot).
  • Use > to make a quoted text. Once again make sure you give a space after the greater than sign.

These are the shortcuts what I have found so far, but there will be more in future. Text formatting shortcuts is not the only new feature in WordPress 4.3. Watch this video below to see new features in WordPress 4.3. Continue reading


Symfony 2, five quick tips

Hi all, today I am going to share with you five quick, but important tips in Symfony 2 programming.

  1. Use bundles where appropriate, such as to wrap set of reusable functionalities (business logic), reusable services and reusable views. But, don’t over use bundles as this will include unnecessary headache on performance and maintenance in long run.
  2. If you use a functionality in more than five different places, make it as a services function (Service container) . Also you might need to inject varies different services to the services class (Injecting services). In that case make sure you inject starting from the most specific to most generic service. If possible try not to inject big entities such as Container, unless you left out with no other option.
  3. Make the view less brainy. What I mean by that is, let the view (such as twig) to do less work than the Controller. In some rare cases this can be hardly achievable but in most cases you could easily make the view less brainy by doing most of the logical operations inside the Controller, Repository, Services etc. Let the view to render without it doing complex logical operations.
  4. Use Doctrine Queries Language (DQL) to query data instead of Repository class (such as $em->getRepository()) to get the maximum efficiency of your project. If you are querying from one table, using either option won’t make a big difference. But if you are querying varies tables through joins, definitely use DQL.
  5. In terms of security, try not to send parameters in the URL as it is, if possible (including non sensitive parameters). What I mean by that is, if you use URL patterns like this ‘route_to_page/{id1}/{id2}’, encrypt those ‘id1’ and ‘id2’ through a custom encrypt function created by you. Then decrypt (using a custom decrypt function created by you) those ‘id1’ and ‘id2’ in the Controller to continue with your logic.
    (Ideally through an injected services class which contains your security functionalities – How to create and inject services ? )
    See below,

Continue reading


Ten key qualities to master in your life


Find below, 10 key qualities to master in your life no matter who you are and what you do.

  1. Whatever you do, always begin with the end in mind.
  2. If you have multiple tasks to do, always start with the most important task (highest priority), irrespective of the size of the task.
  3. Attach to goals rather than people. People will eventually follow when they find out you are goal oriented.
  4. Treat your parents, family, friends & colleagues with great respect and love. In return, do not expect anything.
  5. Do not be a typical go getter, instead, be a go giver.
  6. Be responsible for whatever you do. Do not try to give excuses at any cost. If you did a mistake, accept it, apology and move on.
  7. Do not dwell in history. Take lessons from your history and plan your future accordingly with great confidence.
  8. Do not do the same mistake more than once. Otherwise it will become a routine or a habit. (Look at 6 above)
  9. Be kind to each and every living being you meet no matter who they are or what they do, but be careful.
  10. Never go against your gut feeling. Because your mind knows what is good and what is bad.

Origin :- Lord Buddha’s teachings, Brian Tracy, personal experience & here and there 🙂

Hope you enjoyed this post. Feel free have your feedback in the comments section below 🙂