Trip to Udupi, Kundapura, Murudeswara, Yana, Mirjana Fort-Karnataka

This was my first unplanned trip with my colleagues that was a sudden decision after the initial plan for a planned trip was cancelled. Here is how it went.

Day-1(Friday)-17/02/2017:

We are in the office. I was sad for the cancellation of the planned trip due to the only few people joining the trip and cost per head being high. The guy who cancelled at the last moment, Mr. Kevin was sitting in front of me. It was supposed to cover Yana, Gokarna, Karwar, Murudeswara. Then my colleague, Manjunatha S asked me if I wanted to go to some other places instead. I agreed at a moment without thinking of the place we were going to visit. Finally with input from my manager, Mr. Ali Sadhik Sheikh we planned to go to Udupi, a small town near to coastal Karnataka, famous for the Krishna temple.

Image result for udupi krishna temple

There was one more colleague of mine who came packed just like me to the office, Mr. Jogendra Majhi who also joined us. Finally we booked the bus to Udupi from Majestic Bus Station. Me and Jogendra boarded the bus from Majestic at 10:30 PM and Manju boarded the bus at Yeshwantpur bus depot and finally felt like we are on trip….

Had late night talks on random topics, not at all work related, mostly on travelling and relationships.

Day-2:

We reached Udupi at around 7 in the morning. The weather was cold and foggy. Felt so good. Had morning tea/coffee. And we moved towards the famous Krishna Temple. Freshened up and went to visit the temple. It was covering a large area with so many sections inside the temple. Manju started telling the history of the temple. Bought prasadam and we came out of the temple.

We were hungry, it felt sweet though; That’s the hunger out of travelling.

Went to a vegeterian hotel inside the temple premises. Had Dosa, Idli, Vada, Puri etc. We had so much. Divine food…

From Udupi we went to a nearby beach called Malpe, known for 2 things:

  1. The smell of dried fish(which I like by the way being a Bengali)
  2. St. Mary’s Island(which is a boat trip from the beach Rs. 300 /- per head)

Being at a beach always refreshes the mind. Few water sport were there

Image result for malpe beach water sportsImage result for malpe beach water sports

 

Next we took the boat ride to St. Mary’s Island. Took around half an hour. Here are some pics.

We stayed there for around 2 hours. Returned to Malpe beach and came back to Udupi. It was 5 o’clock. We took a room and stayed for the night. Planned to go to Agumbe the next day early morning.

Day-3:

We woke up late. It was already 11 and late for going to Agumbe. We got ready and rushed to the bus depot. Nothing planned. Thought to go to Gokarna which would take 4-5 hours from Udupi and we would reach in the evening by the next bus, hence not a good option. Then we looked for other options and it was Kundapura. We took the bus and in 1 and a half hour we reached there. From there we had options for 2 beaches: Kodi Beach and Maravanthe Beach. Took bus and went to Maravanthe Beach. Some snaps below.

Next destination Murudeswara, famous for the majestic Shiva temple. Took bus from Maravanthe. Reached Murudeswara at 8 PM. Took a room, had dinner, went for a walk. Met 2 guys who suggested to visit a fort called Mirjana Fort on the way to Gokarna.

Day-4:

Woke up, freshened up and went to visit the temple. Few snaps below.

Next destination Gokarna. So we reached to Kumta. From there we had options to go to Yana. As we had ample time, thought to cover Yana and Mirjana fort was on the way to Gokarna. So took the bus to Yana. Reached in 1.5 hour. The road was through the hill. Loved it.

The bus reached Yana. From there it was a 1 KM trek to visit the grand Asteroid rock formation and the Parvathi temple. Few snaps from there:

Time to leave from Yana. Talked to a local guy to leave us to Mirjana Fort in his Maruti Omni. Some snaps of car wash 🙂 and the departure.

We reached Mirjana Fort. Few snaps from there.

Next destination Gokarna. Took bus from Mirjana Fort. Took 1 hour to reach Gokarna. Visited the shiva temple, took blessings and went to the beach.

Took bus to Bangalore at 8 and reached at 6:30 in the morning.

Now when I look back to all the memories I feel like unplanned trips are better because u dont know where you are heading next and you may come across the unexpected.

Time to get back to work…

Image result for work

 

Regex useful tricks with Lookahead and Lookbehind

Lookahead and Lookbehind in regex : Lookahead and lookbehind, collectively called “lookaround” is a very useful concept at times which would be otherwise next to impossible to solve by any other means. Found a great article explaining the cases where we can use this: Regex – Lookahead and Lookbehind Zero-Length Assertions

Few useful bits to understand the concept :

Related image

Image result for lookahead and lookbehind in regex

Image result for lookahead and lookbehind in regex

%Q, %q, %W, %w, %x, %r, %s

You can find some useful shortcuts in this article for rails.

Simple Ruby on Rails

%Q | %q | %W | %w | %x | %r | %s


%Q
This is an alternative for double-quoted strings, when you have more quote characters in a string.Instead of putting backslashes in front of them, you can easily write:

>> %Q(Joe said: "Frank said: "#{what_frank_said}"")
=> "Joe said: "Frank said: "Hello!"""

The parenthesis “()” can be replaced with any other non-alphanumeric characters and non-printing characters (pairs), so the following commands are equivalent:

>> %Q!Joe said: "Frank said: "#{what_frank_said}""!
>> %Q[Joe said: "Frank said: "#{what_frank_said}""]
>> %Q+Joe said: "Frank said: "#{what_frank_said}""+

You can use also:

>> %/Joe said: "Frank said: "#{what_frank_said}""/
=> "Joe said: "Frank said: "Hello!"""


%q
Used for single-quoted strings.The syntax is similar to %Q, but single-quoted strings are not subject to expression substitution or escape sequences.

>> %q(Joe said: 'Frank said: '#{what_frank_said} ' ') => "Joe said: 'Frank said: '#{what_frank_said} '…

View original post 131 more words

Google Recaptcha With Ruby On Rails Integration.

Web Technology Guide By Gurudath BN

Google Recaptcha With Ruby On Rails Integration.

Google Recaptcha protects the websites you love from spam and abuse.


Below the steps to be followed to develop a sample ROR application with Google Recaptcha:-


Step 1. Create a Ruby on Rails application:-

a)Open a terminal, navigate to a directory where you have rights to create application and type:
rails new recap

b)After you create the application, switch to its folder:
cd recap

c)Type and run bundle install:
bundle install


Step 2. Create models, views, and controllers:-

a)For this application we will generate a scaffold, which is a starter template provided by Rails that bundles a model, a controller, and the relevant views for our application:
rails generate scaffold User name:string

b)After generating the scaffold we need to create the actual User table in our development database so we need to run migration:
rake db:migrate

c)To start the application run below command…

View original post 321 more words

A Bluetooth beacon in your fridge could help you eat less

Gigaom

Most applications for beacon technology so far have been targeted towards retailers and marketers — for instance, beacons have been used to push coupons for McNuggets when you walk by a McDonalds. Taking a different approach to the Bluetooth Low Energy protocol, a new free app from developer Brian Mueller employs beacons to help you eat less.carrot-hunger-screneshotCarrot Hunger, which launched for iOS on Thursday, has a nifty feature that requires a beacon in your fridge. Like a digital version of a “nothing feels as good as skinny feels” magnet on your fridge, the Carrot Hunger app can push a notification when you’re nearby a iBeacon reminding you to log the food you’re about to eat — effectively, a reminder not to stuff your face. Carrot Hunger recommends sticking the beacon in a fridge, but you can also stick a iBeacon in, say, your office’s kitchen.

carrot screenshot ibeacon

Unfortunately, Carrot won’t provide an iBeacon. You’ll have to bring your own beacon hardware — some iBeacon-capable beacons cost as little…

View original post 206 more words

My Experience with AngularJS: A Sound Framework of JavaScript

AngularJS is a sound JavaScript framework, and it makes the job of the programmer really easy and helps the programmer deliver a good UI(User Interface) with a great UX(User Experience) in a short span of time. Some of the great features of angularJS are as follows-

1. It’s an MVC framework of JavaScript:

It separates the developments in 3 sections: Model, View and Controller.

Model: The collection of data. AngularJS provides a special variable called $scope which is used to make the data available to the view.

View: This is the html template. In view we use a concept called “data binding” which facilitates use of the the data(in the model, i.e. $scope).

Controller: This is where the business logic is kept that explains how the data needs to be handled

2. Data Binding:

This is the most frequently used feature of angularJS that reduces the programmers job of handling the the reflection of change of data in the view. Consider the following code snippet

HTML:

No of employees: <div>{{employees.length}}</div>

In this code we want to reflect in view as and when the count of employees change in the model. In case you had used JQuery to achieve the same you might have to do the DOM manipulation in your javascript code like as follows:

HTML:

<div id="emp_count"></div>

JavaScript:

$("#emp_count").html(employees.length);

and run this JS code as and when the employees count changes. So you need to keep track when this variable is changing which is a huge overhead. AngularJS even gives us a method called $watch which helps to keep track any change in the variable or object and handle the change in the $watch function block block

This examples shows you how simple it is with angularJS.

3. Directives:

You can define behaviour of a DOM element using directive. With its help you can define custom DOM elements, attributes for your project and define their behaviour in your angularJS code.

HTML:

<div>
     <ang-alert alert-text="clicked 1">click me</ang-alert>
     <ang-alert alert-text="clicked 2">click me</ang-alert>
</div>

JavaScript(AngularJS):

angular.module("myApp", []).
directive("angAlert", function () {
    return {
        restrict: 'E',
        link: function (scope, element, attributes) {
            //setting style
            $(element).css("display", "block");
            
            //defining event handler
            $(element).on("click", function () {
                alert(attributes.alertText);
            });
        }
    };
});

See demo here: http://jsfiddle.net/9tbeo0qt/

In this code ang-alert is a directive whose behaviour is defined completely in the javascript code. so HTML is kept clean of any event handler. and the html code itself is self-explanatory. This way the programmer can cocentrate on the module he is developing i.e. either the UI or the javascript and the final product is a clean code. Which is the best thing about angularJS.

Here comes the benefits of using AngularJS in you code:

  • Code becomes cleaner and maintainable: Its sound MVC framework governs you a good coding standard to follow throughout your code, which was not given by some other framework like Backbone.js.
  • Code becomes self-explanatory: Even a non-technical person can understand the high level logic by going through the code if written properly.
  • Increased Reusability of components: The directives provide you a  way to make reusable components without any alteration most of the time.
  • Unit testing becomes easy: If you use a Directives, many times in you application, a bug found in one section for the directive code, needs to be fixed only once, and the bug will be fixed in all the places wherever the directive is used
  • It provides the control for animation: Setting css animation rules on the classes that get applied on the DOM elements while transition happens for the rule set by the directives, you can achieve animation easily. For more check AngularJS animation documentation.

If this made you like angularJS, please read more on https://docs.angularjs.org/api. There are lot more in this magical framework.

Related:

Using jsFiddle with AngularJS

pkozlowski.opensource

AngularJS is an awesome framework and its google group is very active. AngularJS community figured out quite early that it is so much easier to collaborate having a live code snippet.

There are many code snippet sharing tools out there but the jsfiddle is great and is used very often by the AngularJS community.

This post tries to dive into several usage scenarios of jsfiddle with AngularJS framework. The aim here is to make sure that people can quickly and easily prepare their jsfiddle which is crucial for getting help from  the AngularJS community.

Start safe

The easiest way to have a working jsfiddle with AngularJS is to start from a template prepared by the AngularJS team: http://jsfiddle.net/IgorMinar/ADukg/. The jsfiddle under this URL is updated with each release so you can just bookmark it and use it a starting point for your fiddles.

One remark: when using http://jsfiddle.net/IgorMinar/ADukg/as a stating point make sure to fork it instead of editing the original one.

View original post 797 more words

When is AngularJS Superior to jQuery?

angular-over-jqueryOne of the most common questions asked by neophyte web developers is “Which framework should I use?” While there is no one ‘right’ answer to this question, a common subject of discussion is the differences between AngularJS and jQuery. While in some respects comparing the two is akin to comparing apples and oranges, there are undoubtedly reasons to choose one web framework over the other as the primary implementation target for a web application’s front-end. Below we will look at a few scenarios where AngularJS is a superior choice to jQuery.

When DOM Manipulation Isn’t a Priority

jQuery is highly focused on DOM scanning and manipulation for achieving its goals. A common practice is adding and modifying DOM elements based upon user interactions, such as presenting the results of a query retrieved over AJAX by simply placing pre-rendered HTML into an existing DIV. With AngularJS, the focus of development is on the data presentation itself. Through use of two-way data binding, these kinds of updates can be achieved automatically without destroying and rebuilding the DOM. It may not be entirely possible to avoid DOM manipulation, but on average you will be doing less of it with AngularJS than you would with a pure jQuery implementation.

When Focused on Productivity

AngularJS, despite having a steep learning curve, has a high focus on the productivity of its developers. Many of the features of AngularJS are focused on increasing developer throughput. One example is extensive support for unit testing built-in to the framework. This focus on testing allows developers to focus on processes that produce more robust and dependable code by easing the development of unit tests. Additionally, by decoupling the DOM manipulation from the logic of the application, developers can focus on the “why” rather than the “how”. On average, this results in a smaller code base with improved stability and easier debugging.

When Taking Advantage of a Declarative Interface

One of the common issues with jQuery is that it takes an imperative approach to programming. In essence, it is telling the computer how to achieve a certain goal, and what you want is the result of that process. Declarative programming, on the other hand, switches the focus – it tells the machine what you want, and lets it figure out how to make that happen. JavaScript in general is designed with an imperative approach in mind, while HTML – and the directives that AngularJS add to it – is designed to be declarative. By working in AngularJS, you end up using a declarative approach that more closely matches the original intention of HTML – telling the computer what you want the presentation to look like, and then letting the computer handle the details. With this approach, the lines of code required to accomplish a specific task are often greatly reduced, resulting in more readable and maintainable code.

Conclusion

As mentioned above, comparing AngularJS and jQuery is in many ways comparing apples and oranges. The two frameworks were created with different goals in mind, and solve separate problems. That being said, there are many gains to be made in terms of programmer throughput for a certain subset of applications that focus on data presentation and manipulation as opposed to data analysis, and in that realm AngularJS has a large advantage over jQuery. Ultimately choosing a framework comes down to a number of factors related to your organizational strengths and the core competencies of the tool itself, but in many ways AngularJS is an excellent choice for enhancing developer throughput and reducing maintenance costs for your web application.

From: http://blog.backand.com/

10 Bad Habits That Are Killing Your Productivity

Being productive isn’t easy, regardless of how badly you’d like to be and how hard you think you’re willing to work. But increasing your output at work and in life is a much more attainable goal if you’re not sabotaging yourself with bad habits.
Here are 10 things you should stop doing right now:
1. Impulsive web browsing: Since most of us work with access to the internet, it’s easy to get side-tracked looking up the answer to a random question that just popped into your head.
That’s why Quora user Suresh Rathinam recommends writing down these thoughts or questions on a notepad. This way, you can look up the information you want later, when you’re not trying to get work done.
 
2. Moral licensing: Whether it’s a new diet, workout routine, or work schedule, one of the most difficult things about forming a new habit is the urge to cheat as a reward for sticking to a routine for a while. This idea that we “deserve” to splurge on fancy meal after being thrifty for a week is called “moral licensing,” and it undermines a lot of people’s plans for self-improvement
Instead, try making your goal part of your identity, such that you think of yourself as the kind of person who saves money or works out regularly, rather than as someone who is working against their own will to do something new.
3. Putting off your most important work until later in the day:People often start off their day by completing easy tasks to get themselves rolling and leave their more difficult work for later. This is a bad idea, and one that frequently leads to the important work not getting done at all.
As researchers have found, people have a limited amount of willpowerthat decreases throughout the day. That being the case, it’s best to get your hardest, most important tasks done at the beginning of the day.
4. Taking many meetings: Nothing disrupts the flow of productivity like an unnecessary meeting. And with tools like email, instant messenger, and video chat at your fingertips, it’s best to only use meetings for introductions and serious discussions that can only be held in person.
BlueGrace Logistics founder Bobby Harris recommends that people don’t accept a meeting unless the person who requested it has put forth a clear agenda and stated exactly how much time they will need. And even then, Harris recommends giving the person half of the time they initially requested.
5. Multi-tasking: While many people believe they are great at doing two things at once, scientific research has found that just 2% of the populationis capable of effectively multi-tasking.
For the rest of us, multi-tasking is a bad habit that decreases our attention spans and makes us less productive in the long run.
6. Hitting the snooze button: It might feel like pressing the snooze button in the morning gives you a little bit of extra rest to start your day, but the truth is that it does more harm than good.
That’s because when you first wake up, your endocrine system begins to release alertness hormones to get you ready for the day. By going back to sleep, you’re slowing down this process. Plus, nine minutes doesn’t give your body time to get the restorative, deep sleep it needs.
7. Failing to prioritize: It’s only natural for people to hedge against failure by keeping their options open and trying to pursue a bunch of different goals simultaneously. Take, for instance, the person who is five years into a career in marketing, but preparing themself for law school just in case. Unfortunately, this sort of wavering can be extremely unproductive.
Warren Buffett has the perfect antidote. Seeing that his personal pilot was not accomplishing his life goals, Buffett asked him to make a list of 25 things he wanted to get done before he died. But rather than taking little steps toward completing every one of them, Buffett advised the pilot to pick five things he thought were most important and ignore the rest.
8. Over-planning: Many ambitious and organized people try to maximize their productivity by meticulously planning out every hour of their day. Unfortunately, things don’t always go as planned, and a sick child or unexpected assignment can throw a wrench into their entire day.
Instead, you might want to try planning just four or five hours of real work each day, that way you’re able to be flexible later on.
9. Under-planning: With that being said, you should take time to strategize before attempting to achieve any long-term goal. Trying to come up with the endgame of a project you’re doing midway through the process can be extremely frustrating and waste a huge amount of time.
Harvard lecturer Dr. Robert Pozen recommends that you first determine what you want your final outcome to be, then lay out a series of steps for yourself. Once you’re halfway through, you can review your work to make sure you’re on track and adjust accordingly.
10. Keeping your phone next to your bed: The LED screens of our smartphones, tablets, and laptops give off what is called blue light, which studies have shown can damage vision and suppress production of melatonin, a hormone that helps regulate the sleep cycle.

TCS Firing Big Time. Upto 30,000 Employees May Face Axe

Evidence acquired by Trak.in indicates that India’s largest IT services company: TCS is firing employees en-masseUpto 25,000 to 30,000 employees can be fired in the next few months.

Here is a letter as received by a TCS employee, who was fired this month:

TCS employee Termination

Source: Reddit India

Information coming in from TCS (and this letter) indicates that mid-level managers and consultants are being targeted for mass layoffs, which was never seen in TCS in recent history. AST or Assistant Consultants with Band D, who have shown little or no improvement in the last 2 years, along with ASOC (Project Managers) who are band C and above, and other middle to higher level managers are those which are in the firing line.

A,B,C,D and E are internal rating system used by TCS, with A being the best and E worst.

Employees and tech observers are actually surprised with such mass layoffs, considering that TCS is known for ‘job security’. The case become more curious considering that TCS has plans of hiring 35,000+ freshers for 2014-15 session.

A TCS spokesperson recently said: “We continue to be leading recruiters of IT talent across the world, not only in India. In this fiscal year, we have a total hiring target of 55,000 professionals and we are on track to meet it.”

Some employees, on condition of anonymity, revealed that TCS plans to fire mid-level managers who are drawing fat packages and underperforming, and replace them with low-cost freshers and train them. Although this is a common practice in more of the IT services companies, firing 25,000-30,000 employees is certainly not normal.

Infact working conditions at TCS are so good that it experiences lowest attrition rates compared to other IT companies, and maybe this can be the reason that ‘old horses’ are being removed in order to shuffle the talent cards.

Another source informed us that broadly speaking, all those employees with more than 8 years of experience (with $70-100 / hour billing rates) and with no assigned projects are immediately fired. Infact, if we believe this source, then there is no issue of projects with TCS; but with costs-cutting as they have decided to get away with ‘excess fat’ and hire freshers on a mass scale to ‘keep the balance’.

Scary situation indeed.

Why TCS Firing Is Bad Compared to Yahoo Layoff

In the month of October, Yahoo India fired around 500 employees from their Software Development Center (SDC) in Bangalore. Startups, which are in dire need of talented engineers quickly absorbed this shock, as most of the engineers were hired by them.

However, the case with TCS layoffs is different. Most of those who have been given pink slips are highly paid consultants and managers who have quit programming and chosen managerial positions. Yahoo engineers were programmers and developers, and even with a slight compromise on their annual take-home, they can be hired by start-ups.

But managers and consultants are specialties of MNCs, and a start-ups generally don’t require them.

Employees With Pink Slips Have Tough Road ahead

Most of the TCS employees who are in the line of fire are drawing packages upwards 20 Lakh per annum. They are the ones with 8-12 years experience and have got into a comfort zone.

These professionals are married, with kids – They have a family and mortgages to take care of. With so many people getting fired, the supply for such people is going to far outstrip (if there is) the demand.

They will now have to probably take up jobs with half their salary packages or even worst not get a job at all!

Is IT Landscape in India Changing?

Globally, TCS is one of the top 10 IT Services companies, which has crossed Rs 5 lakh crore market capital this June. It is already India’s most valued private company andworld’s second most valued IT services company after IBM with 3 lakh+ employees under their payroll (3,13,757 as of September 30, 2014)

Earlier this year, IBM had unceremoniously fired several of their employees, which had been termed as a bloodbath and cruel.

When world’s biggest IT companies are not shying away from firing employees as per their convenience, this throws a very vital question to the whole industry: How much dynamic and flexible this industry is, and how much ‘job security’ can it provide? Why doesn’t training and motivation assist their under-performing employees, and why can’t these companies provide a cushion for their employees against fluctuations in business and profits?

From: http://trak.in/