In collaboration with creative agency Sagmeister & Walsh, Kurzgesagt explores what beauty is and how it makes people happier. This Atlantic piece is a good companion piece that summarizes some of the research done about beauty’s connection to happiness.
The usual markers of happiness are colloquially known as the “Big Seven”: wealth (especially compared to those around you), family relationships, career, friends, health, freedom, and personal values, as outlined by London School of Economics professor Richard Layard in Happiness: Lessons from a New Science. According to the Goldberg study, however, what makess people happiest isn’t even in the Big Seven. Instead, happiness is most easily attained by living in an aesthetically beautiful city. The things people were constantly surrounded by — lovely architecture, history, green spaces, cobblestone streets — had the greatest effect on their happiness. The cumulative positive effects of daily beauty worked subtly but strongly.
America’s response to mass shootings has long followed a predictable pattern. We mourn. Offer thoughts and prayers. Speculate about the motives. And then — even as no developed country endures a homicide rate like ours, a difference explained largely by pervasive accessibility to guns; even as the majority of gun owners support commonsense reforms — the political debate spirals into acrimony and paralysis.
This time, something different is happening. This time, our children are calling us to account.
The Parkland, Fla., students don’t have the kind of lobbyists or big budgets for attack ads that their opponents do. Most of them can’t even vote yet.
But they have the power so often inherent in youth: to see the world anew; to reject the old constraints, outdated conventions and cowardice too often dressed up as wisdom.
One important thing to note is, the long url should also be uniquely identifiable from short url. So we need a Bijective Function.
One Simple Solution could be Hashing. Use a hash function to convert long string to short string. In hashing, that may be collisions (2 long urls map to same short url) and we need a unique short url for every long url so that we can access long url back.
A Better Solution is to use the integer id stored in database and convert the integer to character string that is at most 6 characters long. This problem can basically seen as a base conversion problem where we have a 10 digit input number and we want to convert it into a 6 character long string.
Below is one important observation about possible characters in URL.
A URL character can be one of the following:
A lower case alphabet [‘a’ to ‘z’], total 26 characters
An upper case alphabet [‘A’ to ‘Z’], total 26 characters
A digit [‘0’ to ‘9’], total 10 characters
There are total 26 + 26 + 10 = 62 possible characters.
So the task is to convert a decimal number to base 62 number.
To get the original long url, we need to get url id in database. The id can be obtained using base 62 to decimal conversion.
Here is some code in ruby that implements a Base62 encoder and decoder:
Watch this video as John Oliver explains BitCoin - everything you don’t understand about money combined with everything you don’t understand about computers.
I think blockchain will be a winner in all of this. Blockchain is a distributed, secure record store. Bitcoin as a currency will bomb. But the world is going to need a better explanation than this:
The way I like to think of it is a blockchain is a highly processed thing. Sort of like a chicken McNugget. And if you wanted to hack it, it would be like turning a chicken McNugget into a chicken. Now someday someone will be able to do that, but for now its going to be tough.
On November 23, Michelle Obama will release ‘Becoming’, a memoir by our former First Lady of the United States. I am surprised that they didn’t pick Amy Sherald’sportrait as the image for the book cover.
From the Amazon product description:
In her memoir, a work of deep reflection and mesmerizing storytelling, Michelle Obama invites readers into her world, chronicling the experiences that have shaped her—from her childhood on the South Side of Chicago to her years as an executive balancing the demands of motherhood and work, to her time spent at the world’s most famous address. With unerring honesty and lively wit, she describes her triumphs and her disappointments, both public and private, telling her full story as she has lived it—in her own words and on her own terms. Warm, wise, and revelatory, Becoming is the deeply personal reckoning of a woman of soul and substance who has steadily defied expectations—and whose story inspires us to do the same.
Disney has promised a new Star Wars story every year for the next 9 years, and so far they have hit it out of the park. Over the Super Bowl weekend - they realeased the new trailer for ‘Solo, a Star Wars Story.’
My mind is still reeling from the SpaceX launch of Falcon Heavy yesterday. I can’t tell you why exactly, but when the two side boosters landed safely back on Earth at nearly the same instant, as in a beautifully choreographed ballet, I nearly lost it. Dawn of a new era indeed.
Of course, the boosters were supposed to land at the same time. They broke away from the main stage at the same time and were controlled by identical computer systems in their descent; it’s a simple matter of physics to solve for the time it takes two uniform objects to travel from point A to point B. But as Richard Feynman said about the beauty of a flower, knowing the science makes moments like this more wondrous.
I want any young men who by a gun to be treated like young women who seek an abortion. Think about it: a mandatory 48-hours waiting period, written permission from a parent or judge, a note from a doctor proving that he understands what he is about to do, time spent watching a video on individual and mass murders, traveling hundreds of miles at his own expense to the nearest gun shop, walking through protestors holding photo of loved ones killed by guns, and protestors who call him a murderer.
Arendt offers two points that are salient to our thinking about guns: for one, they insert a hierarchy of some kind, but fundamental nonetheless, and thereby undermine equality. But furthermore, guns pose a monumental challenge to freedom, and particular, the liberty that is the hallmark of any democracy worthy of the name — that is, freedom of speech. Guns do communicate, after all, but in a way that is contrary to free speech aspirations: for, guns chasten speech.
This becomes clear if only you pry a little more deeply into the N.R.A.’s logic behind an armed society. An armed society is polite, by their thinking, precisely because guns would compel everyone to tamp down eccentric behavior, and refrain from actions that might seem threatening. The suggestion is that guns liberally interspersed throughout society would cause us all to walk gingerly — not make any sudden, unexpected moves — and watch what we say, how we act, whom we might offend.
The regularity of mass killings breeds familiarity. The rhythms of grief and outrage that accompany them become — for those not directly affected by tragedy — ritualised and then blend into the background noise. That normalisation makes it ever less likely that America’s political system will groan into action to take steps to reduce their frequency or deadliness. Those who live in America, or visit it, might do best to regard them the way one regards air pollution in China: an endemic local health hazard which, for deep-rooted cultural, social, economic and political reasons, the country is incapable of addressing. This may, however, be a bit unfair. China seems to be making progress on pollution.
It is incredible that this was posted years ago and still nothing has changed. Not one damn thing.
The President of the United States is an angry, resentful white supremacist. That’s been a nagging suspician to me ever since he started campaigning. But this week he moved it from a feeling to a fact. Today I woke up in an America where the president of the United States would not denounce Nazism.
Fucking Nazism !
If any good comes of this terrible week, it’s that more and more people are now seeing it, and are outraged by it.
I recently had to calculate the distance between a large number of co-ordinates. I could have used one of the many Ruby Gems that are available but due to business limitations had to develop the code myself. After some research I came across the haversine formula.
The haversine formula is an equation important in navigation, giving great-circle distances between two points on a sphere from their longitudes and latitudes. It is a special case of a more general formula in spherical trigonometry, the law of haversines, relating the sides and angles of spherical triangles.
You can read the full details on the maths here. For those who just want the code here is the implemenation I came up with:
moduleGPSclassDistanceRAD_PER_DEG=Math::PI/180GREAT_CIRCLE_RADIUS_MILES=3956GREAT_CIRCLE_RADIUS_KILOMETERS=6371# some algorithms use 6367GREAT_CIRCLE_RADIUS_FEET=GREAT_CIRCLE_RADIUS_MILES*5280GREAT_CIRCLE_RADIUS_METERS=GREAT_CIRCLE_RADIUS_KILOMETERS*1000GREAT_CIRCLE_RADIUS_NAUTICAL_MILES=GREAT_CIRCLE_RADIUS_MILES/1.15078attr_accessor:great_circle_distanceattr_accessor:point1attr_accessor:point2definitialize(great_circle_distance=0)@great_circle_distance=great_circle_distance@point1=[0,0]@point2=[0,0]enddefto_milescalculate@great_circle_distance*GREAT_CIRCLE_RADIUS_MILESendalias_method:to_mi,:to_milesdefto_kilometerscalculate@great_circle_distance*GREAT_CIRCLE_RADIUS_KILOMETERSendalias_method:to_km,:to_kilometersdefto_meterscalculate@great_circle_distance*GREAT_CIRCLE_RADIUS_METERSendalias_method:to_m,:to_metersdefto_feetcalculate@great_circle_distance*GREAT_CIRCLE_RADIUS_FEETendalias_method:to_ft,:to_feetdefto_nautical_milescalculate@great_circle_distance*GREAT_CIRCLE_RADIUS_NAUTICAL_MILESendalias_method:to_nm,:to_nautical_milesprivate# Radians per degreedefrpd(num)num*RAD_PER_DEGenddefcalculate# Accept two arrays of points in addition to four coordinatesifpoint1.is_a?(Array)&&point2.is_a?(Array)lat2,lon2=point2lat1,lon1=point1elsifraiseArgumentErrorenddlon=lon2-lon1dlat=lat2-lat1a=(Math.sin(rpd(dlat)/2))**2+Math.cos(rpd(lat1))*Math.cos((rpd(lat2)))*(Math.sin(rpd(dlon)/2))**2@great_circle_distance=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))endendend
U.S. senators want people to hack the Department of Homeland Security. On Thursday, Senators Maggie Hassan, a Democrat and Republican Rob Portman introduced the Hack DHS Act to establish a federal bug bounty program in the DHS... It would be modeled off the Department of Defense efforts, including Hack the Pentagon, the first program of its kind in the federal government. Launched a year ago, Hack the Pentagon paved the way for more recent bug bounty events including Hack the Army and Hack the Air Force...
The Hack the DHS Act establishes a framework for bug bounties, including establishing "mission-critical" systems that aren't allowed to be hacked, and making sure researchers who find bugs in DHS don't get prosecuted under the Computer Fraud and Abuse Act. "It's better to find vulnerabilities through someone you have engaged with and vetted," said Jeff Greene, the director of government affairs and policy at security firm Symantec. "In an era of constrained budgets, it's a cost-effective way of identifying vulnerabilities"... If passed, it would be among the first non-military bug bounty programs in the public sector.
This is my last weekly column for The Verge and Recode — the last weekly column I plan to write anywhere. I’ve been doing these almost every week since 1991, starting at the Wall Street Journal, and during that time, I’ve been fortunate enough to get to know the makers of the tech revolution, and to ruminate — and sometimes to fulminate — about their creations.
Now, as I prepare to retire at the end of that very long and world-changing stretch, it seems appropriate to ponder the sweep of consumer technology in that period, and what we can expect next.
I have been reading the various columns and stories by Walter Mossberg since my college days. Was on of the first people to really report and make sense of the computing revolution to the average person. Will be missed by many.