How it’s like to Travel New Orleans?


I am jazzed!

May

2016

Nola (birds eye view)

La Nouvelle-Orleans or The Big Easy or Most Unique is not only famous for it’s annual festival which is most notably “Mardi gras”. But the city also famous for it’s music, cuisine, French Architecture and Birth place of jazz Music. Nola do have lot of places which one should experience if you ever travel to this city.

The interesting thing I understood from my traveling experience is “You really can’t understand the city if you just visit the tourist places. In order to really really enjoy any place one should definitely understand the culture, history, live in local houses, streets, talk to local people and have local food.”

In this blog,  I would like to share my experience of travel  to Big Easy. I am gonna divide my experience in below paramount points which I think cover most of the part of city.

History of Geography (2 cents) : 

Nola is located in southeastern Louisiana, side to Mississippi River. The city is named after the Duke of Orleans, as it was established by French colonists and influenced by their European culture.

  1. How to reach?

Well, I am sure you can check the google map for same. I was traveling form India(Goa). My flight route was from Goa to Delhi , Delhi to Newark and Newark to Nola Airport. You can also get the flight from Mumbai to Newark.

I would suggest book a window sit because you surly don’t want to miss a beautiful view of few miles long bridge connecting to city, followed by stunning view of row  house societies from your flight Newark to Nola Airport.

IMG_20160508_121522_1

Places to experience

  • Morning Mississippi River side walk  

    This place is silent and not much crowed because of which the beauty lies in it. You can spend ample amount of time with yourself by walking or sitting on bank of Mississippi river. It is also good a cycling. The Fresh air, sound of river, calmness and cargos/ferry  in river will set the mood for entire day.

29

Mississippi River

27

 

 

  • Aquarium  (cost: around $15)

Though the aquarium is not that fascinating. But it’s worth while to visit to give a close look to aqua life.

34

Aquarium/IMAX theater

  • Short movie in IMAX 3D (cost: around $10)

I would highly suggest to watch this movie. After watching I realized there is huge difference in 3D in India and Nola. 🙂 If you are with family and kids. I am sure they gonna love it.

  • Banana ice-cream outside Aquarium (cost : $5)

I really like the idea because it’s healthy and not actual ice cream. Specially for Ice cream freaks (kids even adults too). It’s basically a thin layer of chocolate on banana with some sprinkles on it.

  • Bourbon street

This street is crazy, fun and sexy at same time. In Nola, this is the only street where you can grab a beer and walk on street with it. The actual crowd begins around 6 PM and stops in early morning. You will find lot’s of good restaurants with live jazz music, People dancing in balcony and street. Strip clubs, beautiful ladies and cheerful crowd, street robot dancing. I would say Nola live it’s life on this street and in morning you will say “Life is good!”

It doesn’t matter if you are with family, kids or with your gags. This street have something for all.

Best strip clubs: I would say in my experience go for hustler. Because you will enjoy the good poll dance and your money is safe here.

1613

  • French Quarter 

It’s the oldest neighbor hood in the town. This place is side to Catholic cathedral. I would recommend do visit this place because of it’s nightlife and restaurants.

1

  • World war II museum

Oh my guns! Have you ever seen any World war II documentary or movie?

If yes, then It’s super awesome place for you to get a feel of Weapons used in World war II. I am a “Army brat”. so, these stuff super excites me.

12WW2-jumbo

source : NYtimes.com, God, I lost my pic 😦

  • St. catholic cathedral

You can go for a ghost tour here where you will not see actual ghost. Not worth spending money. But the architecture of cathedral is pretty awesome it’s kind or  Mahal of Aladdin. There is a small park in front of it and you will find lot’s a taro card reader surrounded to park. You can even try the tonga ride here which shows you Nola streets in night.

 

3821

 

  • View of tankers / ferries in Mississippi river 

Oh, it’s really beautiful feeling. Sitting on river side and big tankers /ferries going in front of you in beautiful river. 

2335

  • Live Jazz music in restaurants

47

 

  • Evening/ Night walk in streets

22

  • Weed tradition

62

 

  • Bubba gump shrimpIt’s a great restaurant. Started after the Forest Gump movie. It have a tradition kind of BBQ. They say Forest RUN to start a service and FOREST STOP. Over all good service, good food and Good surrounding.

    Incidents:

  • Place : Bourbon street.
  • Incident: There was this black guy beating a girl and crowd protected her and make the guy run away. I think it was heroic reaction of crowd and we all should protect each other in all part of world. It really doesn’t matter which part of world you are in.

Some Popular words and expressions in town:

  • Brah – A shortened form of “brother”.
  • Cold drink – Soda or fizzy drink
  • Hey, baby – Endearing greeting.
  • Po-boy/Poor Boy – A French bread sandwich of New Orleans.
  • Where y’at? – How are you?
  • Yeah you right! – Expression of agreement or happiness.

Food

  • Hurricane alcoholic drink made with rum, fruit juice, and syrup or grenadine.
  • Lobster
  • Amber beer
  • Chicken

Open Question and problem:

  1. I personally felt the town has differences between local black and white people living and working standards. Just for e.g I haven’t seeing any white man/women doing laundry job or cleaning job anywhere.
  2. Homeless : lot’s of homeless people in town.

Note: Please feel free to ask me any question you have about this city? I will try my best to address. Also, be open to share your experience and talk about Open questions and perception of mine in comments.

Keep Traveling!

How to make custom behavior in Openlayers module with Drupal 7


Drupal with Openlayers

Couple of days back I was working with Openlayers in one of my project in D7. I got stuck with some functionality which forced me to make custom behavior which should work with Openlayer module in Drupal 7. I found Openlayers has very less documentation so I thought to write this blog. I will make some introduction about how to start with creating custom behavior which work with Openlayers. I am not focusing on some particular functionality but on giving base to your functionality.

I am assuming you know how to configure Openlayers and display map in Drupal 7.  So , here’s the situation you faced that you need to achieve some functionality which Openlayers don’t provide and then you have to create some module which should work with Openlayers.

Next step is to make a custom module . Go to sites/all/modules/ and create your module directory containing files

  • module_name.info
  • module_name.module

Also create some more directory in your module directory like

  • include — [It will contain all .inc files]
  • js — [javascript files ]
  • css — [css files ]

Now we will write some things in your modules .info file.

name = Module name
description = Allow you to draw polygon on map and it will search locations on map based on polygon draw.
core = 7.x
package = “Openlayers”
dependencies[] = openlayers

files[] = module_name.module
files[] = include/openlayers_behavior.inc

Step 2: We will add some code in modulename.module file.

<?php

// implementing hook_init()

function modulename_init(){
        

// here we are adding our css and javascript file
         drupal_add_js(drupal_get_path(‘module’, ‘open_draw’) .
      ‘/js/openlayers_behavior_drawfeatures.js’);
    drupal_add_css(drupal_get_path(‘module’, ‘open_draw’)  .
      ‘/css/openlayers_behavior_drawfeatures.css’);
 }
        

// implementing hook_openlayers_behaviors()
function modulename_openlayers_behaviors() {
  return array(
         ‘openlayers_behavior_region_click’ => array(   
    ‘title’ => t(‘Polygon search’),
    ‘description’ => t(‘It will allow search on maps when user will draw polygon on map’),
    ‘type’ => ‘layer’,
    ‘path’ => drupal_get_path(‘module’, ‘open_draw’) . ‘/include’,
    ‘behavior’ => array(
        ‘file’ => ‘openlayers_behavior.inc’,
      ‘class’ => ‘openlayers_behavior_drawfeatures’,
      ‘parent’ => ‘openlayers_behavior’,
    ),
   ),
  );
}

Step 3: We will make openlayers_behavior.inc in our include directory and add some behavior in it.

<?php

/**
 * behavior
 */
class openlayers_behavior extends openlayers_behavior {
  /**
   * Provide initial values for options.
   */
  function options_init() {
    return array(
      ‘element_id’ => ”,
      ‘feature_types’ => array(),
      ‘feature_limit’ => 0,
    );
  }

  function options_form($defaults = array()) {
    $features = array(
      ‘polygon’ => t(‘Polygon’),
    );

    return array(
      ‘feature_types’ => array(
        ‘#title’ => t(‘Available Features’),
        ‘#type’ => ‘checkboxes’,
        ‘#options’ => $features,
        ‘#description’ => t(‘Select what features are available to draw.’),
        ‘#default_value’ => isset($defaults[‘feature_types’]) ? $defaults[‘feature_types’] : array(),
      ),
    );
     }
}

That’s it now just enable your module and you can see your behavior in behavior section of Openlayers map settings.

Of course now our behavior are not doing anything we just able to see our behavior’s settings in Openlayers map settings. In order to make behavior functional now you have to just add javascript or Jquery in you /js directory and css in /css directory.

Converting 7.x Drupal module to 8.x


drupal8_release_date_confusion

This is PART – I of creating module in Drupal8.

As we all know Drupal community are working very hard in development of Drupal8. So, I thought of writing about converting Drupal 7.x module to Drupal 8.x. Obviously porting to D7 module to D8 module will start when D8 core will get stable. But I was just curious to understand the changes made by community in D8 so I thought to take a dive in developing modules in D8 and along with that learn the changes with some coding , which probably will help at the time of module contribution for D8.

If you are not familiar with setting up D8 instance in your local machine then probably you should go through my earlier blog on Drupal8.

here’s the link :- https://beautiful7mind.wordpress.com/2013/02/11/whats-new-in-drupal-8-and-how-you-can-contribute

So, we will create one custom module in D8. Our module name is “alien”.

Steps to follow:-

  1. Create directory in modules . Note that now the directory structure of D8 core is changed . So , we will create all custom module in “drupal/modules/custom/”. Under custom directory create new directory that is your module directory name it “alien”. It will look like “drupal/modules/custom/alien”.
  2. Create some files in your alien directory  :-
  • alien.info.yml – [earlier .info file extention is change to .info.yml. If you give .info extension to your file your module will not be understood by Drupal8 core.]
  • alien.module – [contain code for doing some thing in site]
  • alien.install – [contain code for doing some thing in database of site ]

Now we will open file “alien.info.yml” in some editor and add below details into it.

name : alien
description : This module is to understand module development for D8.
package : core
version : VERSION
core : 8.x

That’s it. Save your alien.info.yml file. Now go to your site and Go to > Menu > Extend  here you are able to see your module “alien” in module list.

Hooorraaah it worked 🙂

Building maps using Openlayers in Drupal 7


Implementing maps in Drupal7 is not easy as it was in Drupal6 using Gmap but Gmap module is not developed for Drupal7. I was working with maps in Drupal7 and personally I felt that there are less documentation on maps in Drupal7. So, I thought to write this blog which can probably help my readers in implementation of maps. Related to implementation luckily we have Openlayers module in Drupal7.

Openlayers with maps, what sounds like the small task of showing some nodes on a map with the following collection of modules and dependencies:

  • Geofield : which hold the geo coordinates in our content
  • Address field: to hold postal address in our content
  • Geocoder: to convert address data into geographical data
  • geoPHP: Geocoder dependency
  • Openlayers

With some additional dependencies

  • Ctools
  • Views 3

Step 1: First you have to install above module and enable them included with Openlayers and its sub modules

  • openlayers_ui
  • openlayers_views

Step 2: Create content and add following fields

  • Addressfield : Postal address , zipcode , city
  • Location : field_type – Geofield , Widget – Geocode from another field

Selection_012

Address field will store your postal address of your business and geofield will take those address in location field and fetch geo coordinates of all businesses.

Selection_013

Step 3: Creating a Map

Openlayers come with many configurable option. I will describe basic options which you need for creating map. We need a base layer which is our map with some additional behaviors and styles on it. Secondly, Openlayer overlay which we will setup using views later.

Getting started with creating map

Go to structures > Openlayers > maps. Click add map and fill all details. Your map details should look like below.

Selection_014

Configure layer & style for your map.

Selection_015

Configure some behavior for map.

Selection_017

Selection_019

Now we are done with creating map which we will use for displaying data on it later.

Step 4: Creating Openlayer Overlay or you can say map view.

We need two things

  • Openlayer overlay to display data on map
  • Page or block to display map

Go to structures > Views > add new view .

Values for view

  • Show : Content
  • of type : Business information
  • create a page : Checked

Click on continue & edit. Here we will change some things in our view.

Add these values to your view

  • Format : Map > business map > Apply(all display)

Selection_020

  • Add Fields : 1) Title 2) Location . You should also set path of you page.

Now we will change some settings of our Openlayers overlay. Click on settings side by Format Openlayers Data Overlay | Settings.

  • Map data sources > WKT
  • WKT field > content : Location
  • Title Field > content : Title

Selection_021

What just we did ?

We created our map and added overlay for our data to display on map using views.

Last Step

We will add this Overlay to our map which we created earlier . Go to Structures > Openlayers > Maps > business map > layers & style . You probably see your view their in list . Just enable them so this map will use overlay for displaying content.

Selection_023

That’s it at this point we had a page available containing map with overlays displaying data when you hover them.

Selection_024

Thanks to Sonali , Anirudha , Chetan for reading draft of this.

Step by Step : How to implement Facet Search on data in Drupal 7


In this blog I will help you in setting up Facet search functionality on your  data in Drupal 7. However , If you are thinking about creating website where you can show your Big Data and with the help of facet search your website user can actually find specific data related to them. This blog will probably help you.

The Faceted Search module provides a search API and a search interface for allowing users to browse content in such a way that they can rapidly get acquainted with the scope and nature of the content, and never feel lost in the data. More than a search interface, this is an information navigation and discovery tool.

In order to make such functionality you need to install couple of modules in your site. We will first make a Indexing engine which will index all your data and then we make blocks of specific data which will allow you to filter  all related data to itself.

Modules to install for implementing Facet Search:

  1. Facet API
  2. Search API
  3. Database search
  4. Search Facets
  5. Search Views
  6. Entity API

We are done with installing and enabling above modules.

Steps to follow:

  1. Create content type and add fields in respective content type.
  2. Configure the search server
  3. configure the search index
  4. Add fields on in Facet API
  5. Create a complete view  of your data

Step 1. Create content type and add fields in that:

Let’s take an example we created content type

  • Title : Company
  • Fields : Address
  • Fields : County

Now just create content of above content type and add data into it.

Right now we have content with data into it and we have modules. Now we need to configure above modules as per our functionality on data.

Step 2. Configure the Search server:-

Go to configuration admin page (configuration/admin) in your Drupal 7 site and click on search API in Search and metadata section . you should be now on Search configuration setting. We will create a search engine for our data. You should see page like below :

Search configuration

Now click on Add server link .Give name to your server I gave (MYSQL) , Choose database service for your service class and click create server. Your server should be  like below.

Selection_002

Step 3. Configure the search Index:

Now we will make our search index which will index all data from using search server and database server. It will do indexing as user search for data on site and give fast result. Go back to search API settings and click on Add Index link. You should be on below page now.

Selection_004

Values for above form:

  • Index name : Business Information
  • Item type: Node
  • Server: MYSQL which you create earlier
  • Index items immediately : Checked

Click on create Index. Now we will select which field to be indexed from our data so we will select fields we want . In our case we will select

  • content type
  • Address
  • Title
  • County

and click save configuration .

What just happened ?

we created our database server , Index server and added fields which need to be index. As you added fields for indexing Facet API actually make Facet blocks of those fields . don’t focus on them right now we will enable them later.

Now run Cron in your site which populate the Index.

Step 4. Create a view of your data which need to be Indexed and Displayed to your site user :

Install Views and enable it . Go to Structure > Views. click add new view. Select below values for each field:

  • Show content : Business Information “This will be name of your Search server”
  • Create a page: checked
  • Path: node
  • Display format: Table

Your view information look like below:

Selection_005

Click on continue  & edit button . Now in the Fields section click on add fields and Filter Index node . Add Index fields you want to show to your user. Your selection will looks like below.

Selection_007

Complete all configuration of specific field and click Apply Display . You are done with creating view . You are now able to see this view on your front page(/node).

Next step is to enabling all blocks of your facet search . Earlier we added fields which need to be Indexed . Actually when you add fields for indexing Facet API it create Blocks of those fields respectively. You have to just enable them from Search settings.

Step 5. Enable Facet block from Search settings :

Go to configuration and click on Search API from search and metadata . Now just click on edit in Index . You are able to see various configuration options like below.

Selection_008

Click on Facets and enable facets you want . When you enable and save configuration. It will create Blocks of respective fields .

Step 6. Enable your Facet block from Blocks:

Now go to structures and blocks . Here you are able to see your facet block in Disable section just enable them in any regions of your theme.

congratulation your site is ready. Visit your home page and it should  look like below . As you select options from blocks your main view show you data as per your selection .

Note:-

Facet API have many configuration options . You should take a look to them like showing selection in Blocks in Checkbox etc. However , facet API not able to give you Multiple Facet search functionality . So , I am now working on developing custom module of widget and behavior which will give functionality of Multiple facet selection search . Facet API have OR and AND but only AND works not OR among fields.

Please free feel to ask your queries related to Facet search and If you need some more blog’s on Facet search for specific functionality or configuration or custom modification in Facet API then do comment probably I will help you by writing blog on respective.

Thanks to Chetan , Anirudha , Sonali for reading Draft of this .

Internet / Blogging VS You


This blog is describe some of my thoughts which I got from my working experience with different people . You can say its about the bad habits of people in their professional life which leads to their degradation . My focus here is that  you should think about these aspects and try to follow them. I will stress on certain topics like Social media post languages , why people fear from writing .

Your post shows your attitude on social networking sites

Many times I see people are posting or writing really bad way . I am not talking about fancy words or words by which they really didn’t mean anything. People really fail to structure their questions and answers in a way to easily understand by others .

And then they say “come on don’t take it seriously , It’s just internet. “

But actually their post making Internet worst place to store their data which is not understandable. What they fail in this is that they never reach to the highs which their masters achieved who follow some standards in their thoughts.

I feel Post or anything you share on social networking sites actually shows your thoughts , attitude towards your work you do and effort you put in your work. It’s basically a untold responsibility which everyone should understand that every character you write on Internet use some memory of database , It use hardware’s to keep your data store. It means you are misusing the technology with your bad data. I am not talking here about quality of data. I am talking here about not give correct shape to your data. Which you can give easily.

When you are asking any question you are not only asking question but you are expressing your self in front of other person . The way you ask question shows how deeply you understand that particular problem. So always before posting anything please keep your facts correct.

Think about it!

How do I get my fellow programmers to blog without blogging, to write without writing?

I understand saying some one that “You should write blog!” is really easy but it never works.  I know the pain behind writing  first blog is really tough. Blogging isn’t for every one. I am not sure what experience you have but Facebook, stack overflow  taught me how to write things effectively. You learn from good and bad’s of people. I always test my writing skills on Stackoverflow , Facebook because these are the place where I get quick reply on my questions. I understood how to write quality of questions , quality of answer , well structured , it also helped me in changing attitude when you ask question or answering to other person .

I learned writing from submitting proposal in conferences , making notes while working , writing comments in my programs . I understand many programmer have habit of making grammar mistake while writing. It’s not because you can’t write but it’s because you evolve a lot in programming syntax’s that you forgot English grammar .

In order to give push to yourself towards blogging I suggest you to checkout this site writers.stackexchange.com . Becoming expert writer is long way you can not become expert in one day.Process of writing is a journey of discovery which never ends .

Mostly you should write a lot.  I thought Jon Skeet well summed up here :-

Everyone should write a lot – whether it’s a blog, a book, Stack Overflow answers, emails or whatever. Write, and take some care over it. Clarifying your communication helps you to clarify your own internal thought processes, in my experience. It’s amazing how much you find you don’t know when you try to explain something in detail to someone else. It can start a whole new process of discovery.

I am not a good writer . Give me a push towards blogging!

Below I am including some thought’s of people and sources they use for improving their writing skills.

  1. Writing skills improve you memory check out  http://en.wikipedia.org/wiki/Working_memory  .
  2. Article on working memory http://cogprints.org/3246/1/Olive_Euro_Psy.pdf . Must read.
  3. Better communication http://apprenticecoder.wordpress.com
  4. Gerald Weinberg observed in his 1971 classic, The Psychology of Computer Programming, that the most important language for a programmer to know isn’t a programming language at all, but English, as programming is primarily a social activity

Thoughts:-

http://www.codinghorror.com/blog/2011/02/how-to-write-without-writing.html

http://firesofmay.blogspot.in/2012/09/question-and-answer.html

What’s new in Drupal 8 and how you can contribute


Hey all now days Drupal community are very hard at work in developing Drupal 8 . If you are passionate about Drupal and want to contribute to Drupal 8 and not finding any source to start then this is blog can help you.

What we will cover in this blog :-

  1. How to take Drupal 8 stable core to your local machine and start developing with it .
  2. What’s new in Drupal 8 ?
  3. Some explanation of changes with code.

Below are the steps to setup Drupal 8 stable core to local machine . I am hoping you have GIT installed in your machine .

  1. git clone --branch 7.x http://git.drupal.org/project/drupal.git
  2. cd drupal
  3. git checkout 8.x

If you want to go back to your D7 version just do ” git checkout 7.x ” . For updating your Drupal 8 core do “git pull ” . It will update your Drupal 8 code instance .

You can also do if you just want D8 code base . idea for above things are just to understand the code architecture of D7 and D8 . Below you will only get D8 code base instance .

1. git clone –recursive –branch 8.x
http://git.drupal.org/project/drupal.git
2. cd drupal

A useful link is also http://drupal.org/node/3060/git-instructions/8.x

Now you can start building your custom modules , Themes for Drupal 8 .

In Drupal 8 till now what community has updated has many changes in core . Below is link of list of changes in Drupal 8 .

http://drupal.org/list-changes/drupal

You can check out each changes and start writing your code with Drupal 8 .

Below are some other links which give you information about Drupal 8 development , roadmap , Documentation , code , contributors , IRC channels , meeting times etc.
This is link to video which drive you through some custom code development in Drupal 8 .
Some other links for understanding architecture and developing in Drupal 8 :-

Menu change example :- In D8 menu links are converted into entities . So in order to create new menu in Drupal 8 you can do like this .

<?php
$menu_link = entity_create('menu_link', array(
'link_title' => t('Home'),
'link_path' => '<front>',
'menu_name' => 'main',
));
$menu_link->save();
?>
Saving menu links with Drupal 8 :-
<?php
$menu_links = entity_load_multiple_by_properties('menu_link', array('link_path' => $link_path));
foreach ($menu_links as $menu_link) {
$menu_link->link_title = t('New link title');
$menu_link->save();
}
?>
Some changes are also happens with hooks like :-
hook_menu_link_alter() has been replaced by hook_menu_link_presave()
hook_translated_menu_link_alter() has been replaced by hook_menu_link_load().
I hope this blog is helpful for you . Please feel free to comment and send your queries to me .