Forming a Dirty-Work Group

Dirty-Work Group Organization Structure

A Step by Step Guide

1. Beating Down the Idea

Step 1: With utmost pessimism, identify the knowledge/experience you as an initiator lack that would doom the project into a failure. Divide them into two parts. Your Lack of Knowledge (K) about the field and your Lack of Confidence or Lack of Experience (CE) with that field.

Then take a second trip. Revise the list. This time with optimism, start beating at your project. Identify the parts of which with good smooth because of your competence and confidence. Break them into two parts. One would be what you feel you can cakewalk through and one you feel would be tough nuts to crack, but manageable.

 

With Pessimism With Optimism
Lack of Knowledge (K) Lack of Confidence/Experience (CE) Can Manage (M) Can Cake Walk (CW)
Spices Marinating Cutting Vegetables Buying Vegetables
Frying Boiling
Putting Salt in right measures Serving Food
Cooking

 

Step 2: Revisit the column CE. If you feel after the bout of optimism you can move an activity from this column to column M, go ahead and do it. Revisit column M. If you want to move the activity to another column, go ahead. Revisit column CW. Revisit column K. Revisit column CE and column M. By now you should have a fairly stable task breakdown and your capability to handle them.

Step 3: Draw a line at the bottom of column CE and column M

Step 4: Move the items you would hate if you had to do below the line.

 

With Pessimism With Optimism
Lack of Knowledge (K) Lack of Confidence/Experience (CE) Can Manage (M) Can Cake Walk (CW)
Spices Buying Vegetables
Frying Boiling
Serving Food
Cooking
 

Marinating Cutting Vegetables
Putting Salt in right measures

 

Step 5: Draw lines under Lack of Knowledge and Cakewalk too.  Move the items in Lack of knowledge you know you can not learn or do not want to learn about. Move items in Cake Walk below the line which you think are trivial for you or not worth you spending your time on or too unchallenging for you.

 

With Pessimism With Optimism
Lack of Knowledge (K) Lack of Confidence/Experience (CE) Can Manage (M) Can Cake Walk (CW)
Spices Buying Vegetables
Frying Boiling
Serving Food
Cooking




Marinating Cutting Vegetables
Putting Salt in right measures

 

Note: What you see on top of the dividing line is your Nice-Work zone and below it is the important Dirty-Work zone.

2. Gathering People

Step 1: In general there are two pools to pick people from. One from within and one from outside. At times, the same department may mean within and the other department may mean outside. Or a company may be within and from outside would mean recruiting. A circle of friends may mean within and not knowing a person would be considered outside. For various reasons, we recommend a team as DWG be formed from the within the pool. The biggest being that the initiator would have a fair idea about the people who could have complementing Nice-Work and Dirty-Work zones.

Note: Within is described as a circle where people can be moved to around rather casually. The formal work that is needs, succeeds or is simultaneous to the moving. On otherside, outside is where a formal procedure precedes a person’s moving in.

Step 2: Interview with people aware of the project could be in form of above exercise and then finding people such that whole tasks are covered. Interview of a person having no idea would involve moving the activities above and below the lines based on response with respect to previous projects/tasks.

3. Shaping the Team

Next step is to identify when the team has been “formed”. Apparently, each item must figure in someone’s column CW. At a minimum, each item should appear in either column M or column CWcolumn. In case of activities are not in column CW but in column M of more than one, they have to sort out who takes it into his column CW. If it appears in can manage only one person he has to take it into his column CW. A team can always go looking out for more people at any time either of the scenarios appears.

Note: During the process of induction of new members, more tasks can be added or tasks can be broken down. The matrix remains very dynamic. But each task should be classified in one of the four columns for each member.

4. Distributing Tasks

Let the below activity matrix belong to two members are to be part of DWG.

 

With Pessimism With Optimism
Lack of Knowledge (K) Lack of Confidence/Experience (CE) Can Manage (M) Can Cake Walk (CW)
Spices
Frying Boiling Marinating
Cooking




Putting Salt in right measures Cutting Vegetables Serving Food
Buying Vegetables

 

 

 

With Pessimism With Optimism
Lack of Knowledge (K) Lack of Confidence/Experience (CE) Can Manage (M) Can Cake Walk (CW)
Cutting Vegetables Putting Salt in right measures
Spices




 Buying Vegetables Boiling Marinating
Serving Food Frying
    Cooking

 

Step 1: Merge the activities column-wise

 

With Pessimism With Optimism
Lack of Knowledge (K) Lack of Confidence/Experience (CE) Can Manage (M) Can Cake Walk (CW)
 Spices Cutting Vegetables Putting Salt in right measures
 Spices  Frying Boiling Spices
 Cooking Boiling Marinating
 Frying Buying Vegetables
Cooking Serving Food




 Buying Vegetables Putting Salt in right measures Boiling Marinating
Putting Salt in right measures Serving Food Frying
Marinating   Cooking
Cutting Vegetables Serving Food
Buying Vegetables
Cutting Vegetables

 

Step 2: Validate the matrix.

Step 3: Make an activity allocation matrix. Allocate all column CW activities.

 

Nice-Work Dirty-Work Nice-Work Dirty-Work Nice-Work Dirty-Work
Marinating Serving Food Buying Vegetables Marinating Spices Frying
Frying Cutting Vegetables Serving Food Putting Salt in right measures Putting Salt in right measures Cooking
Cooking Buying Vegetables Boiling Spices Cutting Vegetables Boiling

More Reading

Dirty-Work Group Based Organizational Structure

Dirty-Work Group Organization Structure

Introduction

A team does not and can not exist as an island. In an organizational setup, it has to indulge in intra-organizational and external communications. How does the concept of Dirty-work group provide a solution to this and how would an organization based on this idea look like?

In this article, we introduce the concept of interfaces to a Dirty-Work Group and propose an organizational structure.

Interfaces

As a Dirty-Work group‘s organization is internal to a group, from the outside it would look like a black box. Proper interfaces should be defined for various kinds of interactions. The most apparent communications are of following types:

Internal - Dirty-Work Group  Internal:  This interface is one point contact for all intra-company communications. Any request for information from other teams, dissemination of information, etc to the Dirty-Work Group is through this interface. Any member can pick this activity as their Good-Work (Good Work Group) and if none exits then as a Dirty-Work (Dirty Work Group).

External - Dirty-Work Group  External:  This interface is one point contact for all external communications. Any request for information from the press, other companies, agencies, etc to the Dirty-Work Group is through this interface. Any member can pick this activity as their Good-Work and if none exits then as a Dirty-Work.

Hierarchical - Dirty-Work Group  Hierarchical:  This interface is one point contact for all reporting to the higher level of management and their communication to the group. Any member can pick this activity as their Good-Work and if none exits then as a Dirty-Work.

Dynamics

Consider an organization named Any Organization Ltd. Its top management can be a Dirty-Work Group of all or some of these people:

  • CFO: Chief Financial Officer
  • CIO: Chief Information Officer
  • CTO: Chief Technology Officer
  • CMSO: Chief Marketing and Sales Officer
  • CHRO: Chief Human Resources Officer
  • CLO: One who manages buildings, offices, infrastructure, canteen, transportation and all that none of the above have to worry about – the ‘Handy Man’ officer.

Let there be three Dirty-Work Group working on various projects. One of them is a high visibility project about which business community is also interested.

Dirty-Work Group Organization Structure

Each member of each group after picking the Good-Work and the Dirty-Work will also pick whether to be an interface. And if yes, then what kind of interface. Internal, External or Hierarchical. The teams which do not need to interact may not pick an External interface or pick one when needed.

More Reading

Dirty-Work Group

Dirty-Work Group

A Team Management, Dynamics and Structure Model

(Originally published in 1998)

1. Management – Sense in Multitude

1.1 In the beginning there was…

With the industrial revolution, came a problem, which was unfathomable for the people of the times. It was simply how to manage the enormous. A large number of workers, machines, raw materials that flowed in tones, production, the products and supplying it. And last, but not the least, the profits it generated and the money involved in the whole process.

1.2 Then came the manager…

This led to the development of some methods, functions and attitudes, which came to be collectively called as management. Management, like all abstract thought intensive activities, has no clear definition. Collections of sentences, which cover its various aspects, are taken as a framework in which it can be said to belong. Some of the accepted thoughts that broadly classify as definitions are:

1. Management is the integrating force in all organized activity.[1]

2. The process of designing and maintaining an environment in which individuals, working together in groups, efficiently accomplish selected aims.[2]

3. Utilization of technical, human, conceptual and design skill at various levels in an organization to achieve selected aims.

4. Planning, organizing, staffing, leading and controlling various inputs in an organization to achieve selected aims.

As step-by-step formalization of management techniques, it was possible to understand and chart the course of a revolution. And it led to another revolution. From production-oriented industrial revolution to a commerce-oriented economic revolution. Profit almost is now a dirty word. Modern paradigms of efficiency, growth and environment-of-work and customer-is-king were the driving force.

1.3 The honeymoon is over…

Soon, with the growth of this new attitude, something was found missing in the concept of an efficient manager. Some said it was that a manager adopted an impersonal (though not passive) attitude towards goal.[3] They tend to view work as an enabling process involving some combination of people and idea s interacting to establish strategies and make decisions. They preferred to work with people and avoided solitary paths. This was seen as a good managerial practice but thought of as a big hindrance in taking those small bold step, calculated risks that made all the difference. It was increasing felt that a manager went on with his job with total trust that the function he performed was sufficient for the goal. The whole system lacked something, which could break new ground. It was felt if a manager was more personal, far-sighted, pro-active, driving, motivating in his unique was, he would fill this gap. A void in concept was detected and here came the concept of leadership. A void rightly understood, but wrongly filled.

1.4 A leader is born…

Certain traits were identified, certain attitudes were formulated and this resulted in the birth of a leader. A leader was required to be personal and proactive towards organizational goal. Leaders always took calculated risks and were more concerned with ideas, relations with people and worked in an intuitive and empathic way. Leadership was called the art of directing sub-ordinates will, abilities and efforts towards organizational goal.[4] A leader was to comprehend that people are different in work style and motivation pattern; understand group dynamics; create a stimulating environment; inspire and gain respect; understand the big picture and boil it down for his employees. Something called the fundamental principle of leadership was developed.

“Since people tend to follow those who, in their view, offer them a means of satisfying their own personal goals, the more managers understand what motivates their subordinates and how these motivations operate, and the more they reflect this understanding in carrying out their managerial actions, the more effective they are likely to be as leaders.”[5]

It was believed that a manager could utilize only 60-65% of the capacity of his subordinates without the exercises of effective leadership.[6] Many approaches to leadership were defined. It was observed, “Research has produced such a variegated list of traits presumably to describe leadership that, for all practical purposes, it describes nothing. Fifty years of study have failed to produce one personality trait or set of qualities that can be used to discriminate between a leader and a non-leader.”[7]

1.5 Shayad leader – Shayad manager…

Amidst all this discussion on leadership and how a leader differs from a manager, one subtle but distinct trait does come forth. We feel that all the traits of a leader described in management book are in general traits of an efficient manager. Leadership, it seems is the next step of being an efficient manager. A good manager, given authority and held accountable, will certainly take risks as dictated by his vision. In order to achieve that vision, he will surely make it personal and filter down the motivation and urgency to achieve it to his subordinates. Empathy is a trait of any decent human being and if found in a manager, would certainly make him a better manager. But what is that make an efficient manager cross the line and be a leader? We feel it is his personality, charm, charisma or style. It is his personality. Traits in his personality that make him seem genuinely superior, pedagogical and serene in his vision. It is not what but how of thing he does that makes him a leader.

1.6 With every wish, there comes a curse…

It takes good followers to make a leader. What is it that the subordinate wants from his manager that he finds in a leader? What do these traits do to a manager to make a leader out of him? A leader tries to understand what is in the minds of his subordinates and then tries to provide that and boil down big aim to task level for each of his employees. It is, we feel, things that people a lower level don’t understand or want to understand that makes a leader a necessity. But a manager too could have done this. But a leader, with his persona, inspires respect and trust which manager could not. So he is listened to.

The concept of leadership was considered to be the panacea for organization that wanted to be in the market to stay. Good leaders in your organization and it will be a leader. But it came with a flip side story. The personality cult and leader with no lead.

“I can’t forgive or abandon violence. I am not as great as Mahatma Gandhi…”, said the man.

Leaders exist at two levels. At the higher level, say, as a senior executive or CEO. We will try to understand the personality cult factor for two great leaders, Mohandas Karamchand Gandhi and William H. Gates III.

When Einstein said of Gandhiji that generations to come would not believe that a person of his greatness ever walked on earth, he knowingly or unknowingly hinted at the problem of personality cults. Gandhiji learnt that truth set him free, work made him a better person and freedom of thought made him a human who could find space-time to understand God. While he was alive, he made sure his ideas, not his person was the leading light. But after his death, our society labelled as a Mahatma and revered him as Father of the Nation. Mahatma, the great man took precedence our Gandhi, the ordinary man who not talked but followed truth. Today a word that goes against the image of Mahatma is blasphemy as no one wants to accept him as a normal human. His ideas, however, are lost as practical deeds but are mere words. Had no cult been formed around the name but his ideas put forth, he would have been of better service in his death to the nation.

Today everyone knows the names Windows and Microsoft as the brainchild of Bill Gates, CEO Microsoft. A leader in life and market. Windows NT was always slotted to wipe off Unix. Today the battle is on. Here, we have a typical Personality v/s Idea battle. NT is running on its efficiency. But what happens when Gates is no more CEO. Will its subsequent versions have the same push of being a Gates led product? Today Microsoft is very Gates sensitive. Without Gates, will the market be as supportive? Unix has no such leader involved with it. It has survived on pure efficiency. Many products are making it big only because of Gates persona and surely have been a failure has some other company pushed it in the market.

1.7 Who’s Next…

This leads to another problem. More charismatic the leader more difficult is it to find a successor. After Bill Gates, who? The insecurity and speculation involved in such events could be felt when J. R. D. Tata passed away. When Ratan Tata was to join, there was a thought going around that decline of Tata group was near. The reason was simple. Such was the persona of J. R. D. Tata, that nobody could expect Ratan Tata to fill the void. Without the leader, a decline was expected. In Indian politics, a prime example of this is Sonia Gandhi as leader of the Congress party as she belongs to the Nehru-Gandhi family.Note

Big words are put up in offices, with the name of a bigger personality attached to it. The sole purpose of this is spreading the good word. And one does feel the depth of the words if the person saying it was some great man. God is one – Ram Kumar Sharma, won’t catch influence our thought as God is One – Mahatma Gandhi. The whole idea is to extrapolate the personality influence on the reader. The words may get lost if a reader may not agree with the person.

At the lower level, i.e. the managerial level, when all want to lead, who will follow? Often it is seen that the mark of success is climbing the ladder of hierarchy. Though it is not encountered in organization too often, it is there. Though this is a common phenomenon in the social environment.

1.8 United we stand…

At this moment we introduce a concept of dirty-work group. First, what is a dirty-work? A job, which a person can do, preferably efficiently, but would not do it because he does not like it. e.g., a programmer may enjoy coding, but documentation is a dirty job. He will be happy if someone else did it as nicely, else he would do it himself. A typical dirty-work group is essentially a small, heterogeneous group in which each does his nice job and finds another to do his dirty-job. This has to be cyclic.

Dirty-Work Group

Dirty-Work Group Legend

Blue Red Green
Dirty-Work Nice-Work Dirty-Work Nice-Work Dirty-Work Nice-Work

Action B

Action A

Action A

Action C

Action C

Action B

1.9 So, all this means that…

In a typical scenario, there will be at least one initiator. They/he is the one with the original idea and want to give it an organizational form. He chooses his nice-work and dirty-work and looks for another whose nice job will be his dirty-job and so and form a cyclic group. A team of heterogeneous members will be self-motivating.

Blue has initiated a project. Now he spreads his idea to other two. They all share the vision now. If red goes slow on his job, blue will pull him up, who in turn will be pulled up by red for completing his dirty-work in time or up to mark. Also, if a member, say, red leaves, other to will sustain the project. Until the time they find another dirty-worker to substitute red, green will do his dirty-job himself.

Let us see, how does a dirty-work group fill the void leadership was filling.

Shared Vision: Among a Dirty-Group, it is easy to share a vision, as it was the ability to grasp that vision that made them come together. Any clash of vision will be rare as it is a heterogeneous group, with people doing what they like and knowing another work, will understand all the restriction and difficulty of certain approaches. If they feel their idea can be implemented they can easily take it up as their dirty-work. As they all are of different but related to the field of next, it will make them less like a committee, which as people for representation sake, rather than work contribution sake.

Idea Cult: A mix of people working will ensure that a single personality fixation is avoided and thus we will have ideas as the guide rather than personalities.

Big Picture: Big picture is often very complex to gather and very easy once understood. A Dirty-Work Group will be easily able to absorb in the big picture due to varied expertise people and spread their understanding to all as one passes it another, who in turn has a lot in common with the first one.

2. How did the idea of a Dirty-Work Group developed

Do not tell lies about the past.

– Leonardo da Vinci

The concept of Dirty-Work Group was first presented as a paper in Indore Management Association’s Quest For Leadership held in 1998 in Indore, India.

2.1 The Birth

DWG started with Expressions, an annual advertising festival of International Institute of Professional Studies (IIPS), Indore, India where we were pursuing our MCAs. We, as a small group of friends, were attracted to it for various reasons. Some wanted to contribute to jingle because of their interest in music and some in posters because of their interest in graphics and some wanted to join in because of their interest in just having fun.

And as years went by, we all remained a group. The strand or glue that held us together was the diversity of interest. And, the understanding that to do something interesting, there are lots of overheads that need to be taken care of and which usually are not interesting. So when one of us wanted to design the college T-Shirt because of interest in designing, the overhead of dealing with manufacturers, printers at business level was a dampener. So stepped in another who loved to make deals. And the dirty-work group created the first IIPS T-Shirts.

Education is what remains after one has forgotten everything he learned in school. 

– Albert Einstein

IT industry has one peculiarity. Its dependency on people is huge and also on how they interact with each other. Project management is a heavy technical and managerial task. As all of us landed with jobs in this industry, our workplace experience increased and our college became a fond memory. One thought prevailed amongst us. We were a nice team! And if we had similar teamwork at work…

2.2 Who are We

[Three kinds of people] Those who see. Those who see when they are shown. Those who do not see.

– Leonardo da Vinci

Definitely, those who see.

In an earlier avatar, I had made an anonymous website for DWG. The idea was to test the concept of DWG on itself. Can it survive just as an idea or does it need a face or a name backing it? To keep anonymity, we used to refer to us as Original Idea Developers (OIDs). Unfortunately, I had to give up on the experiment due to web administration related reasons.

2.3 Acknowledgement

If we knew what it was we were doing, it would not be called research, would it?

– Albert Einstein

Praveen Rao – Student of Masters in the Management faculty at IIPS for all his encouragement to formalize the concept and present in Quest For Leadership.

Indore Management Association – For providing the platform for presenting this concept.

3. Dirty-Work Group Summary

3.1 Foreword …

Dirty-work group started as a convenient way to do things by a group of friends in college. Dirty-work group started as a convenient way to do things by a group of friends in college – a group that puts its hand into everything. And according to interests of each person, he or she may or may not involve.

IMA gave us a chance to formalize this and present it to everyone as a model that could be used at workplace and at play. The idea, though very simple was very difficult to put into words. So with help of the paper and a deck, we were able to express it. Now we do not know how many there thought of it as a really good idea and not just a cool presentation (we were runners-up), but we knew that the idea worked.

So when we left college and went to work, we realized how much effort is being put and work is being done to create a good teamwork environment. And we realized how unknowingly, people who were a dirty-work group were doing well. And so we thought of putting this idea up. To see if it makes sense to formalize this concept.

The whole of science is nothing more than a refinement of everyday thinking.

– Albert Einstein

If you think this idea is too simple and too trivial for all the effort, a few years ago we would have agreed to you. And it would also tell us that you have crossed the first mark. You have understood the concept. But seeing how difficult it is to word concepts, standardize it, put it in a way that everyone makes the same sense out of it, it is all worth the effort.

3.2 All Dirty-Work Group means is…

The part always has a tendency to reunite with its whole in order to escape from its imperfection.
The lover is drawn by the things loved, as the sense is by that which it perceives…

 – Leonardo da Vinci

Here we dare to sum it all in few words. Not a good thing. So let us put it up as an example.

Your wife does not enjoy driving. You do not sitting idle in the car. So, you drive and she watches. What a happy dirty-work group you are!

Your project team is trying to crack a new technology. Your secretary does you time-sheets, leave cards, and tax return for you. You hit the technical specifications and the student-trainee converts your notes into presentations so rest of the team learn the easy way so the rest of the team learns the easy way. They in the meantime have all basics done, so as soon as the team know what to do, they shoot at it. What an efficient dirty-work group you are!

3.3 With this you get a free…

The idea which we highlighted in presentation with help of the slides was, what we felt was how steady organizations would survive in future, was to have ideas rather than people as leaders. And how we thought that a dirty-work group implemented ideas as leaders rather than people as a leader.

3.4 Always, have a backup…

Among the biggest threat to a good team is the loss of a team member. If we look carefully at a dirty-work group, we see that in implementing it, a team also inadvertently, implements a method where we have a back-up for each member.

The key here is, we choose not to do our dirty-work. It is not that we do not know how to do our dirty-work. So if tomorrow, the worker who was doing my dirty-work leaves the group, I can still do that task. So while we look for a new member, we are not stood still or are lost.

3.5 To Po(i)ntificate the Concept…

  • Dirty-Work Group implements a team structure, work distribution and robustness of the team
  • The knowledge of purpose, direction and means are all shared among the team and decided upon further by the team
  • Each worker has interest in the work involved and would love to do it
  • Each worker also has skills to perform at least one other task involved but may or may not want to do it
  • Each worker compliments another worker by choosing a task as nice-work, which was declared as dirty-work by other
  • Each member thanks the group member who handles the dirty-work by keeping in touch with the progress, issues and general details of the Dirty-Work.

4. Reviews of Dirty-Work Group

4.1 Martin Ryder (University of Colorado at Denver, School of Education) 28 July ’01

… It offers an interesting angle to the idea of collective activity and potentially fits within the context of one or more subject indexes that I maintain: notably Activity Theory and possiblyOrganizational Learning and Knowledge Management.

My main concern is your anonymity. I assume that you are a human being, but the identity of your web page and of your email message is solely that of an impersonal organization. We both know that organizations and humans are codetermined: one cannot exist without the other in human society. …

Note: This comment was made around July ’01, when I had presented these views in anonymously as “OID”.

4.2 David West (Dean of managementlearning.com) 29 July ’01

We think your ideas make eminent sense. We would like to reference your material on managementlearning.com. The topics that we feel that it connects to are team building, leadership and organizational culture….

This concept was also published on their website in form of an essay/article. The Article in ManagementLearning.com

5. Reference

1. R D Agarwal: Organisation and Management (Tata McGraw-Hill) pg. 1
2. Harold Koontz, Heinz Weihrich: Essentials of Management (McGraw-Hill International Editions, Vth Ed.) pg. 4
3. A. Zaleznik : Excerpts from Managers and Leaders: Are they Different ? (Harvard Business Review, MayJune 90) pg. 54
4. R D Agarwal: Organisation and Management (Tata McGraw-Hill) pg. 224
5. Harold Koontz, Heinz Weihrich: Essentials of Management (McGraw-Hill International Editions, Vth Ed.) pg. 346
6. Harold Koontz, Cyril O’Donnel: Management: A system and Contigency Analysis of Managerial Functions ( McGraw-Hill) pg. 587
7. E E Jennings: The Anatomy of Leadership, Management of Personnel Quarterly (Vol.1, no. 2, 1961), pg. 2

Shayad (Language: Hindi) – Maybe

6. Note

JRD Tata was head of TATA group. He and his organization has richly contributed to not just the economy of India but also help in improving the social life. The contribution of JRD to India is fondly remembered. This paragraph is not a comment on his successor but heartfelt realization on our part that people like JRD Tata are irreplaceable.

7. More Reading

Current Weather at Your Location Using Wunderground and Google Static Map APIs

Current Weather Location using Wunderground Google Static Map APIs

I was more concerned with ‘Feel Like’ temperature and wind speeds for my neighborhood. Also, I live much close to neighboring town which is next to river, the weather app on iPhone always showed by hometown conditions in locked screen widget. All this lead me to build a custom page for my needs using wunderground APIs.

Current Weather Location using Wunderground Google Static Map APIs

Some key items before we move to the code:

  • Needs valid API key from wunderground (see http://api.wunderground.com/weather/api/d/docs)
  • Needs valid API key from Google Static Maps (see https://developers.google.com/maps/documentation/static-maps/)
  • It used meta viewport for proper viewing on desktop and iPhone
  • I have added an icon used by iOS when page is added to Home Screen, that makes it feel like a real app 🙂
  • It open your default (and hard coded location)
  • There is a ‘ReLocate’ button that will refresh for your current geo-location. This however, works only on https. So if you do not see the red ‘ReLocate’ button, you are not on https
  • The page shows the map of you location so you get an idea which direction wind is flowing in from to prepare accordingly.

On Github

To extract code from git:

$ git clone https://github.com/ddiinnxx/weather_php

The PHP Code

<?php

// git clone https://github.com/ddiinnxx/weather_php 
 // more at www.ddiinnxx.com

// various defualts. get the right keys
 // check https://developers.google.com/maps/documentation/static-maps/
 $googleapi_key = "GOOGLE_MAPS_KEY";
 // check http://api.wunderground.com/weather/api/d/docs
 $wunderground_key = "YOUR_KEY";
 
 // enter location for which you check weather most often. avoids frequent geo-lookup. 
 $def_location = "IA/Cedar_Rapids";
 $p_lat = "41.9650539";
 $p_long = "-91.802762";
 
 // if new latitude and longitude were sent in params, use them instead of the defaults. 
 // the re-locate button send lat long of your current location and call this php file again
 if (isset($_GET["lat"]) && isset($_GET["long"])) {
 $p_lat = $_GET["lat"];
 $p_long = $_GET["long"];
 
 $location_url = "http://api.wunderground.com/api/" . $wunderground_key . "/geolookup/q/" . $p_lat . "," . $p_long . ".json";
 // get location for the lat long sent via params
 $location_string = file_get_contents($location_url);

$parsed_loc_json = json_decode($location_string);
 
 // name of state. eg: NY, MA, etc
 $loc_state = $parsed_loc_json->{'location'}->{'state'};
 
 // name of city. eg: New York, Boston
 $loc_city_raw = $parsed_loc_json->{'location'}->{'city'}; 
 
 // replace blanks with _. This is how the wunderground API understand multiworded cities.
 $loc_city = str_replace(" ", "_", $loc_city_raw); 
 
 $condition_url = "http://api.wunderground.com/api/" . $wunderground_key . "/conditions/q/" . $loc_state . "/" . $loc_city . ".json";
 
 // get weather conditions from wunderground
 $json_string = file_get_contents($condition_url);
 }
 else
 {
 $condition_url = "http://api.wunderground.com/api/" . $wunderground_key . "/conditions/q/" . $def_location . ".json";
 
 // get weather conditions of default location from wunderground
 $json_string = file_get_contents($condition_url);
 
 }

$parsed_json = json_decode($json_string);

$co_location = $parsed_json->{'current_observation'}->{'display_location'}->{'full'};
 $co_city = $parsed_json->{'current_observation'}->{'display_location'}->{'city'};
 $co_temp_str = $parsed_json->{'current_observation'}->{'temperature_string'};
 $co_feels_like = $parsed_json->{'current_observation'}->{'feelslike_string'};
 $co_wind_str = $parsed_json->{'current_observation'}->{'wind_string'};
 $co_rel_humidity = $parsed_json->{'current_observation'}->{'relative_humidity'};
 $co_precip_str = $parsed_json->{'current_observation'}->{'precip_today_string'};

echo "<html>"; echo "n"; echo "n";
 echo "<head>n"; echo "n";
 // using a google font
 echo '<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">'; echo "n";
 // we have a css style sheet
 echo "<link rel='stylesheet' type='text/css' href='./weather.css'>"; echo "n";
 echo "<title>${co_feels_like}</title>"; echo "n";
 // using viewport ot make sure page is displayed fine in mobile too
 echo '<meta name="viewport" content="width=device-width, initial-scale=1.0">'; echo "n";
 // for iOS. icon to be used when someone adds the page to their home screen
 echo '<link href="apple-touch-icon.png" rel="apple-touch-icon" />'; echo "n";
 // get location script using getCurrentPosition function of browser. will pass the lat long as
 // param to this page via URL and reload it using new URL.
 // NOTE: Re-Locate will work only in HTTPS pages
 echo '<script>'; echo "n";
 echo 'function getLocation() {'; echo "n";
 echo ' if (navigator.geolocation) {'; echo "n";
 echo ' navigator.geolocation.getCurrentPosition(showPosition);'; echo "n";
 echo ' }'; echo "n";
 echo '}'; echo "n";
 echo 'function showPosition(position) {'; echo "n";
 echo ' window.location.href = "index.php?lat=" + position.coords.latitude + "&long=" + position.coords.longitude;'; echo "n";
 echo '}'; echo "n";
 echo '</script>'; echo "n";
 echo "</head>"; echo "n";
 echo "<body>"; echo "n";
 echo "<h1>${co_location}</h1>"; echo "n";
 // NOTE: Re-Locate will work only in HTTPS pages
 echo '<button id="relocate_btn" class="button" onclick="getLocation()">Re-Locate</button>'; echo "n";
 echo '<script>'; echo "n";
 // in case we are not on https, better hide the button as it will not work anyway
 echo " if (location.protocol != 'https:') {"; echo "n";
 echo ' document.getElementById("relocate_btn").style.display = "none";'; echo "n";
 echo '}'; echo "n";
 echo '</script>'; echo "n";
 echo "<p><b>Now: </b>${co_temp_str}</p>"; echo "n";
 echo "<p><b>Feels like: </b>${co_feels_like}</p>"; echo "n";
 // load a static map of the location to give a good idea of where the wind is coming in from
 echo '<img src="https://maps.googleapis.com/maps/api/staticmap?center=' . $p_lat . ',' . $p_long . '&zoom=15&size=300x300&maptype=roadmap&key=' . $googleapi_key . '" />'; echo "n";
 echo "<p><b>Winds: </b>${co_wind_str}</p>"; echo "n";
 echo "<p><b>Humidity: </b>${co_rel_humidity}</p>"; echo "n";
 echo "<p><b>Precipitation: </b>${co_precip_str}</p>"; echo "n";
 echo "<hr />"; echo "n";
 // thanking wunderground for their free and useful API
 echo "<p><img src='https://icons.wxug.com/logos/JPG/wundergroundLogo_4c.jpg' alt='Weather Underground' height='50'/></p>"; echo "n";
 echo "</body>"; echo "n";
 echo "</html>"; echo "n";
?>

 

Solving “Could not determine Java version from ‘9.0.1’” with Gradle and IntelliJ on MacOSX

Solving Not Determine Java Version 9-0-1 Gradle Intellij Macosx

Solution To Gradle Error

As I was importing Gradle project to try out Java Spring, I encountered this error:

Gradle complete project refresh failed 

Error:Could not determine java version from 9.0.1.

I found this blog by Johan Haleby on same subject useful. But the solution #1 didn’t work. While I was on Project Structure settings (File -> Project Structure -> Project), I noticed the Project SDK was 9.0. This seemed odd as mine was 9.0.1.

So, I clicked on Edit, which took me to SDKs settings and updated the name to 9.0.1.

Solving Not Determine Java Version 9-0-1 Gradle Intellij Macosx

It worked.

Hope this helps if you are in situation like mine.

Installing Gradle

Just some basic noted on installing Gradle on Mac OS X.

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew update && brew install gradle
$ which gradle
/usr/local/bin/gradle
$ ls /usr/local/Cellar/gradle/4.3.1/

Connecting Gradle & IntelliJ IDEA

While importing a Gradle project, I added following as Gradle path:

/usr/local/Cellar/gradle/4.3.1/libexec/

Then as suggested by various stackoverflow articles, I refreshed Gradle (View -> Tool Windows -> Gradle).


 

Setting Up Web Server in Mac OS X (macOS Sierra 10.12)

Setting Up Web Server in Mac OS X (macOS Sierra 10.12)

Was setting up a web server in my Mac OS X after a long time. Apple has removed ‘Web Server’ from Sharing in Settings. So, thought will share the steps to save you folks some time:

Step 1: Check if Web Server is up and running

$ sudo apachectl status

Password:

Go to http://localhost:80/server-status in the web browser of your choice.

Note that mod_status must be enabled for this to work.

Looks OK. But if you ever wanted to start / stop / restart, the ‘apachectl’ command works fine.

$ sudo apachectl stop

$ sudo apachectl start

Step 2: Your Web Directory

It is located at:

$  cd /Library/WebServer/Documents/

The default permissions are for user ‘root’ and group ‘wheel’. I changed them to my user logged user so as to make file editing easier (very useful during development).

$sudo chgrp -R staff Documents/

$  sudo chown -R dinker Documents/

Then I make a soft link to this fir from my home dir to make it easy to navigate to Documents/

$ cd

$ ln -s /Library/WebServer/Documents/ www

The default index file is index.html.en. You can edit it to test changes. To access the local webserver, you need to access http://localhost from your browser.

Step 3: Enabling PHP

If you rename index.html.en to index.php, you will get this error:

Mac OS X Forbidden You don't have permission to access / on this web server.

 

“Forbidden You don’t have permission to access / on this server.” This means web server is looking specifically for index.html.

Usually, when that happens, it will list the files in that directory. By default, apache setting do not allow listing. Hence this error.

You can see this in the error logs too:

$ cd /var/log/apache2/

$ tail error_log 

[Thu Nov 16 12:39:28.151000 2017] [autoindex:error] [pid 16262] [client ::1:62248] 
AH01276: Cannot serve directory /Library/WebServer/Documents/: No matching 
DirectoryIndex (index.html) found, and server-generated directory index forbidden by 
Options directive

To fix:

$ sudo vi /etc/apache2/httpd.conf

Search for php to find this line:

# LoadModule php5_module libexec/apache2/libphp5.so

and uncomment it by removing #. Then restart apache server.

$ sudo apachectl restart

Reload http://localhost and you should be good!


 

7 Reasons Why Your Product Will Fail

7 Reasons Why Your Product Will Fail

Seven things your users think that will cause your product to fail

  1. “I don’t like it”
  2. “I don’t even want it”
  3. “I don’t even know how to use it”
  4. “I am happy with what I have”
  5. “I don’t want to pay for it”
  6. “No one else is using it”
  7. “I don’t trust it”

And what things you can do to over come this

Follow the deck to see where you can use techniques like:

  1. Rapid Prototyping
  2. Wire-Frames
  3. Reference Products (X of Y for Z)
  4. Gap Analysis
  5. USP Identification
  6. Product Definition
  7. Experience Design
  8. User Interface
  9. Habit Building
  10. Empathy Maps
  11. Product Migration
  12. Product Marketing
  13. Product Pricing
  14. User Research
  15. Business Models
  16. Go To Market
  17. Product Marketing
  18. Product Branding
  19. Product Support
  20. Product Reviews
  21. User Psychology

Sharing

SlideShare: https://www.slideshare.net/ddiinnxx/7-reasons-why-your-software-will-fail

SpeakerDeck: https://speakerdeck.com/ddiinnxx/7-reasons-why-your-software-will-fail