Friday, May 17, 2019

What is REST

source

What is REST

REST is acronym for REpresentational State Transfer. It is architectural style for distributed hypermedia systems and was first presented by Roy Fielding in 2000 in his famous dissertation.
Like any other architectural style, REST also does have it’s own 6 guiding constraints which must be satisfied if an interface needs to be referred as RESTful. These principles are listed below.

Guiding Principles of REST

  1. Client–server – By separating the user interface concerns from the data storage concerns, we improve the portability of the user interface across multiple platforms and improve scalability by simplifying the server components.
  2. Stateless – Each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is therefore kept entirely on the client.
  3. Cacheable – Cache constraints require that the data within a response to a request be implicitly or explicitly labeled as cacheable or non-cacheable. If a response is cacheable, then a client cache is given the right to reuse that response data for later, equivalent requests.
  4. Uniform interface – By applying the software engineering principle of generality to the component interface, the overall system architecture is simplified and the visibility of interactions is improved. In order to obtain a uniform interface, multiple architectural constraints are needed to guide the behavior of components. REST is defined by four interface constraints: identification of resources; manipulation of resources through representations; self-descriptive messages; and, hypermedia as the engine of application state.
  5. Layered system – The layered system style allows an architecture to be composed of hierarchical layers by constraining component behavior such that each component cannot “see” beyond the immediate layer with which they are interacting.
  6. Code on demand (optional) – REST allows client functionality to be extended by downloading and executing code in the form of applets or scripts. This simplifies clients by reducing the number of features required to be pre-implemented.

lego sorter project

https://spectrum.ieee.org/geek-life/hands-on/how-i-built-an-ai-to-sort-2-tons-of-lego-pieces

Friday, April 26, 2019

ESRGAN

source

https://kingdomakrillic.tumblr.com/post/178254875891/i-figured-out-how-to-get-esrgan-and-sftgan

Inclusive Leaders

source

Companies increasingly rely on diverse, multidisciplinary teams that combine the collective capabilities of women and men, people of different cultural heritage, and younger and older workers. But simply throwing a mix of people together doesn’t guarantee high performance; it requires inclusive leadership — leadership that assures that all team members feel they are treated respectfully and fairly, are valued and sense that they belong, and are confident and inspired.
Inclusiveness isn’t just nice to have on teams. Our research shows that it directly enhances performance. Teams with inclusive leaders are 17% more likely to report that they are high performing, 20% more likely to say they make high-quality decisions, and 29% more likely to report behaving collaboratively. What’s more, we found that a 10% improvement in perceptions of inclusion increases work attendance by almost 1 day a year per employee, reducing the cost of absenteeism.
What specific actions can leaders take to be more inclusive? To answer this question, we surveyed more than 4,100 employees about inclusion, interviewed those identified by followers as highly inclusive, and reviewed the academic literature on leadership. From this research, we identified 17 discrete sets of behaviors, which we grouped into six categories (or “traits”), all of which are equally important and mutually reinforcing. We then built a 360-degree assessment tool for use by followers to rate the presence of these traits among leaders. The tool has now been used by over 3,500 raters to evaluate over 450 leaders. The results are illuminating.

These are the six traits or behaviors that we found distinguish inclusive leaders from others:
Visible commitment: They articulate authentic commitment to diversity, challenge the status quo, hold others accountable and make diversity and inclusion a personal priority.
Humility: They are modest about capabilities, admit mistakes, and create the space for others to contribute.
Awareness of bias: They show awareness of personal blind spots as well as flaws in the system and work hard to ensure meritocracy.
Curiosity about others: They demonstrate an open mindset and deep curiosity about others, listen without judgment, and seek with empathy to understand those around them.
Cultural intelligence: They are attentive to others’ cultures and adapt as required.
Effective collaboration: They empower others, pay attention to diversity of thinking and psychological safety, and focus on team cohesion.

These traits may seem like the obvious ones, similar to those that are broadly important for good leadership. But the difference between assessing and developing good leadership generally versus inclusive leadership in particular lies in three specific insights.
First, most leaders in the study were unsure about whether others experienced them as inclusive or not. More particularly, only a third (36%) saw their inclusive leadership capabilities as others did, another third (32%) overrated their capabilities and the final third (33%) underrated their capabilities. Even more importantly, rarely were leaders certain about the specific behaviors that actually have an impact on being rated as more or less inclusive.
Second, being rated as an inclusive leader is not determined by averaging all members’ scores but rather by the distribution of raters’ scores. For example, it’s not enough that, on average, raters agree that a leader “approaches diversity and inclusiveness wholeheartedly.” Using a five-point scale (ranging from “strongly agree” to “strongly disagree”), an average rating could mean that some team members disagree while others agree. To be an inclusive leader, one must ensure that everyone agrees or strongly agrees that they are being treated fairly and respectfully, are valued, and have a sense of belonging and are psychologically safe.
Third, inclusive leadership is not about occasional grand gestures, but regular, smaller-scale comments and actions. By comparing the qualitative feedback regarding the most inclusive (top 25%) and the least inclusive (bottom 25%) of leaders in our sample, we discovered that inclusive leadership is tangible and practiced every day.
These verbatim responses from our assessments illustrate some of the tangible behaviors of the most inclusive leaders in the study.
  • Shares personal weaknesses: “[This leader] will openly ask about information that she is not aware of. She demonstrates a humble unpretentious work manner. This puts others at ease, enabling them to speak out and voice their opinions, which she values.”
  • Learns about cultural differences: “[This leader] has taken the time to learn the ropes (common words, idioms, customs, likes/dislikes) and the cultural pillars.”
  • Acknowledges team members as individuals: “[This leader] leads a team of over 100 people and yet addresses every team member by name, knows the work stream that they support and the work that they do.”
The following verbatims illustrate some of the behaviors of the least inclusive leaders:
  • Overpowers others: “He can be very direct and overpowering which limits the ability of those around him to contribute to meetings or participate in conversations.”
  • Displays favoritism: “Work is assigned to the same top performers, creating unsustainable workloads. [There is a] need to give newer team members opportunities to prove themselves.”
  • Discounts alternative views: “[This leader] can have very set ideas on specific topics. Sometimes it is difficult to get an alternative view across. There is a risk that his team may hold back from bringing forward challenging and alternative points of view.”
What leaders say and do has an outsized impact on others, but our research indicates that this effect is even more pronounced when they are leading diverse teams. Subtle words and acts of exclusion by leaders, or overlooking the exclusive behaviors of others, easily reinforces the status quo. It takes energy and deliberate effort to create an inclusive culture, and that starts with leaders paying much more attention to what they say and do on a daily basis and making adjustments as necessary. Here are four ways for leaders to get started:
Know your inclusive-leadership shadow: Seek feedback on whether you are perceived as inclusive, especially from people who are different from you. This will help you to see your blind spots, strengths, and development areas. It will also signal that diversity and inclusion are important to you. Scheduling regular check-ins with members of your team to ask how you can make them feel more included also sends the message.
Be visible and vocal: Tell a compelling and explicit narrative about why being inclusive is important to you personally and the business more broadly. For example, share your personal stories at public forums and conferences.
Deliberately seek out difference: Give people on the periphery of your network the chance to speak up, invite different people to the table, and catch up with a broader network. For example, seek out opportunities to work with cross-functional or multi-disciplinary teams to leverage diverse strengths.
Check your impact: Look for signals that you are having a positive impact. Are people copying your role modeling? Is a more diverse group of people sharing ideas with you? Are people working together more collaboratively? Ask a trusted advisor to give you candid feedback on the areas you have been working on.

There’s more to be learned about how to become an inclusive leader and harness the power of diverse teams, but one thing is clear: leaders who consciously practice inclusive leadership and actively develop their capability will see the results in the superior performance of their diverse teams.

Friday, April 19, 2019

Stress + Rest = Growth

source

As an athlete, if you want to improve something—your 100-meter time, say, or your deadlift PR—you’ve got to apply a challenge, some sort of “stressor,” and then follow it with a period of rest and recovery. Too much stress without enough rest and you get injury, illness, and burnout. Not enough stress plus too much rest and you get complacency, boredom, and stagnation.
Stress + Rest = Growth. It’s as simple and as hard as that.
Since Peak Performance was published a little over a year ago, no theme from the book has garnered as much attention as that equation. And for good reason. The American College of Sports Medicine, the country’s premier body on the application of fitness science, has officially endorsed training in this manner to increase size and strength. Meanwhile, a 2015 study published in the journal Frontiers in Physiology found that best endurance athletes in the world all have one thing in common: they oscillate between periods of stress and rest.
And yet the more feedback I get from readers, the more I see how that equation can be beneficially applied not just to fitness but to all areas of life. Below are a few of the most common examples, along with some practical advice on how to make what I’ve come to call the “Growth Equation” work for you.

Grow Your Career

When I’m coaching non-athlete clients who are striving to excel professionally, I start by asking them where they want to be in their careers and what they are doing to get there. In my experience, people in the workplace—myself included—tend to fall into one of two traps: either getting stuck in a rut where they are just going through the motions or taking on so much hard work at once that they become completely overwhelmed. Neither is conducive to long-term progression.
I encourage my clients to systematically challenge—to stress—themselves in the direction they want to grow. And then I ask them to follow those challenges with rest and reflection. What went well? What didn’t go well? What could I do differently next time?
Career progression is generally more complex than going from a 6-minute mile to a 5:45 mile; or from squatting 200 pounds to 210 pounds. It’s harder to dial in the right amount of “stress.” On a scale of one to ten—with one being "I could do this in my sleep" and ten being "this is giving me panic attacks"—I ask my clients to take on projects that they’d rate a seven; assignments that they think they’d get right seven or eight out of 10 times, but not every time. These are just-manageable challenges.
Another way to think about stress in the context of career growth is something I got from my co-author on Peak Performance, Steve Magness. He says: “Ask yourself, ‘What’s the next logical step?’ And then do that.” For example, if you’re used to presenting to middle managers, try to create a situation where you’re in front of a vice-president. If you manage a team of five, talk with your boss about trying to expand that to seven or eight.
Just make sure you don’t go from challenge to challenge without giving yourself some time to catch your breath. Much like a muscle grows in between challenging workouts, career growth is more sustainable if you respect the need to rest, recover, and reflect in between challenging projects.

Grow Your Team and Organization

What do Kodak, Blockbuster Video, Borders Books, and the Cleveland Browns have in common? They were all busy doing things the same old way over and over again when the world around them was changing; they neglected to “stress” themselves in the direction of growth. The first three are out of business and the Browns are perennially at the bottom of the NFL.
What do Google and the San Antonio Spurs have in common? They all continue to evolve their strategies to stay ahead of the competition. Google does this by extending into new markets—think: from an internet search-engine to self-driving cars. The Spurs do it by constantly evaluating and adjusting their style of play, including overseas recruiting of little-known players who become hard-to-guard stars. An area of business research called Organizational Ecology says that organizations that are forward-looking, reflective, and challenge themselves to grow tend to survive and sustain their performance over time.

Grow Your Relationships

I am by no means an expert on relationships, but something that comes up repeatedly in the Q and A part of my workshops is how the growth equation tends to apply here, too. Be it friendships or romantic relationships, people in audiences always call this out. Bonds strengthen after two people experience a challenge together and then openly reflect on it. A handful of experts think the same. But just like in the other contexts, too much “stress” without enough rest and the relationship can flame out.

Make the Growth Equation Work for You


  • Pick an area of your life.
  • Reflect on where you currently are and where you want to be.
  • Think about whether you ought to be in a state of stress—taking on just-manageable challenges—or in a state of rest, recovery, and reflection.
  • Align your behavior accordingly.
  • Check in every few weeks, just like you would for any other training program, and evaluate your progress.

Tuesday, March 12, 2019

Reps not goals

This article is an excerpt from Atomic Habits.

We all have goals that are important to us. But is it our drive to achieve a certain outcome that makes us better? Or something else entirely?
In the book Art & Fear (audiobook), authors David Bayles and Ted Orland share a surprising story about a ceramics teacher. This story just might reframe the way you think about setting goals, making progress, and becoming better at the things that are important to you.

The Danger of Aiming for Perfection

On the first day of class, Jerry Uelsmann, a professor at the University of Florida, divided his film photography students into two groups.
Everyone on the left side of the classroom, he explained, would be in the “quantity” group. They would be graded solely on the amount of work they produced. On the final day of class, he would tally the number of photos submitted by each student. One hundred photos would rate an A, ninety photos a B, eighty photos a C, and so on.
Meanwhile, everyone on the right side of the room would be in the “quality” group. They would be graded only on the excellence of their work. They would only need to produce one photo during the semester, but to get an A, it had to be a nearly perfect image.
At the end of the term, he was surprised to find that all the best photos were produced by the quantity group. During the semester, these students were busy taking photos, experimenting with composition and lighting, testing out various methods in the darkroom, and learning from their mistakes. In the process of creating hundreds of photos, they honed their skills. Meanwhile, the quality group sat around speculating about perfection. In the end, they had little to show for their efforts other than unverified theories and one mediocre photo. 1
It is easy to get bogged down trying to find the optimal plan for change: the fastest way to lose weight, the best program to build muscle, the perfect idea for a side hustle. We are so focused on figuring out the best approach that we never get around to taking action. As Voltaire once wrote, “The best is the enemy of the good.”2

Start With Repetitions, Not Goals

It’s not just art studios where repetitions matter. Whenever you put in consistent work and learn from your mistakes, incredible progress is the result.
This is why I force myself to write a new article every Monday and Thursday. I can't predict which articles will be useful, but I know that if I write two per week, then sometimes I'll hit the bullseye.
And it works the same way with almost any goal you could have…
Art. If you want to be a great photographer, you could go on a quest to take one perfect photo each day. Or you could take 100 photos per day, learn from your mistakes, and hone your craft.
Strength. If you want to be stronger, you could analyze every movement and phase of your technique until you're blue in the face. Or, you could get under the bar, learn from your mistakes, and focus on doing more reps.
Writing. If you want to write a best-selling book, then you could spend 10 years trying to write one perfect book. Or, you could write one book each year, learn from your mistakes, and trust that your books will get better each time.
Business. If you want to be a successful entrepreneur, you could scheme and think and try to plan out the perfect business idea. Or, you could try to get one customer, learn from your mistakes, and experiment with new ideas until something comes easily.
It's not the quest to achieve one perfect goal that makes you better, it's the skills you develop from doing a volume of work.
In other words, when you think about your goals, don't just consider the outcome you want. Focus on the repetitions that lead to that place. Focus on the piles of work that come before the success. Focus on the hundreds of ceramic pots that come before the masterpiece.

Put in Your Reps

When you look at goals this way, you start to realize that setting up a system for putting your reps in is more important than choosing a goal.
Everyone wants to make progress. And there is only one way to do it: put in your reps.
The goal is just an event — something that you can't totally control or predict. But the reps are what can make the event happen. If you ignore the outcomes and focus only on the repetitions, you'll still get results. If you ignore the goals and build habits instead, the outcomes will be there anyway.
Forget about the goals this year. What is your plan for getting in the reps you need? What is your schedule for putting in a volume of work on the things that are important to you?3