terça-feira, 29 de setembro de 2015

A sua casa esta prestes a se tornar muito inteligente?

Source: bbcnews

Vocabulary:

  1. lighting scheme glows welcomingly
  2. no more fumbling for keys.
  3. presents for retailers
  4. selection of gadgets
  5. to propel the smart home
  6. because burglary is going up 


Text:

You're driving home from work. Your connected car pings your estimated time of arrival to your smart home, which springs into life.
The thermostatically controlled heating comes on; your chosen lighting scheme glows welcomingly; the oven begins warming up the casserole you cooked the night before.

When you arrive the garage door swings open automatically and your car self parks; your front door opens automatically, too - the facial recognition security system identifies you - no more fumbling (=desastrado) for keys.

As you enter your nicely warmed home - dust-free courtesy of robot vacuum cleaners - music wafts through each room to suit your mood.

This is one vision of the smart, or connected, home. But how realistic is it and how soon could it happen?

Mass market
All of the technologies making such a scenario possible are here already, says Holger Knoepke, vice president of connected home for German telecoms giant, Deutsche Telekom.
His company has just launched a report highlighting the huge business opportunity it believes the connected home presents for retailers (=varejistas), insurers, manufacturers, utilities and telecoms companies.
"We realised that the smart home will be a mass market - 50% to 80% of people say they're interested in smart home services," says Mr Knoepke.

"They could end up paying €5 to €10 a month, which equates to more than €15bn (£11bn; $17bn) a year in Western Europe by 2019."

His firm is developing an open platform, similar to Samsung's SmartThings, to act as a gateway for all these connected gadgets, from motion-detecting lighting systems to smart energy meters.
Nearly 40 partners, including big names such as Philips, Bosch, Sonos and Samsung, have signed up to the platform so far.

BMW is already testing car-to-home communications in its 7 Series luxury saloon.
Energy saving
But it seems we've been talking about the connected home for years. Why hasn't it taken off yet?
Well, we didn't have smartphones, fast home wi-fi or a wide-enough selection of gadgets (=aparelhos) equipped with networked computer chips, believes Mr Knoepke.

Now, the conditions are right, he says.
Smart meters and thermostats - given an added push by governments - will be able to regulate energy usage in the home, and it's this ability to save on heating and electricity bills which will be one of the key drivers of growth in connected home technology, he believes.

Michael Philpott, principal analyst at technology research firm, Ovum, agrees saying: "By 2020 the majority of us will have a smart energy meter and smart thermostats, and other devices will be connected to it, such as your fridge, so it becomes more efficient in its energy consumption.

"Once consumers start to use this technology they'll start to wonder what else can they do with it."

Smart everything
As more of us use smartphones and apps, retailers and manufacturers are gaining confidence that there is a market for connected products, argues Steve Macdonald, marketing director of Hoover's "white goods" division.

The kitchen appliance manufacturer recently launched Hoover Wizard, its family of wi-fi enabled machines that can all be controlled by an app.
"It's all about staying in touch with your home even when you're out," he says. "Say you get an alert telling you the washing programme has finished, you could press a button on the app to recycle the washing to keep it fresh."

In another example, he says you could set a lower fridge temperature when you're on your way back from doing a big supermarket shop. And the oven will alert you when it needs cleaning.

But isn't this sort of functionality "nice-to-have" rather than "must-have"?
"People have exceptionally busy lives so this kind of remote control gives you a little extra time," argues Mr Macdonald.
"We believe the market will move quite quickly - by 2017 all our white goods will be connected. The whole market will have gone that way by 2020."

Remote security
But the service most likely to propel (=impulsionar) the smart home into the mainstream is home security, some believe.
US telecoms giant AT&T is building its Digital Life smart home product around security, offering subscribers video cameras, window and door opening sensors, remote door locking, and motion detectors, all operable from a smartphone, tablet or PC.
"Many service providers are starting off with security, because there's an existing home security business model in place," says Mr Philpott.

"In the UK about 30% of homes have some kind of home alarm, and about 10% of those pay monthly for a professional home security service."
Security is also a big concern in Germany, says Mr Knoepke: "Our market research tells us people are very interested in home monitoring because burglary (=roubo) is going up ...people are afraid."
And it's not just security against burglars that matters - remote alerts from smoke, carbon monoxide, and water leak detectors could all help nip household disasters in the bud, reducing insurance pay-outs and potentially saving lives.

Talk to me
But lack of interoperability could be one reason why the smart home boom takes longer to happen than some analysts and tech companies are forecasting.
Deutsche Telekom says this is why it's gone for an open platform approach rather than a proprietary system that only works with gadgets made by one or two manufacturers.

Apple and Amazon, on the other hand, seem to want to create their own ecosystems.
Other tech companies have been banding together to agree common standards to allow all these gadgets to talk to each other in a language they can all understand.
The only problem is they've been banding together in separate groups.
In 2013, the Linux Foundation formed the AllSeen Alliance along with Qualcomm, LG Electronics, Panasonic, Sharp and others.

The following year, Google's Nest, Samsung and others formed Thread, while a group comprising Intel, Samsung, and Dell formed the Open Interconnect Consortium.
And the Home Gateway Initiative, set up by broadband service providers, has been going since 2004.
"Anything that confuses the consumer will be a barrier," says Mr Philpott. "Consumers are only going to buy into the smart home if it makes their life much better or much cheaper.
"We're not there yet."

sexta-feira, 25 de setembro de 2015

Amor livre no século 21

Source: news australia

Vocabulary:

  1. bruised bodies
  2. in a hungover drawl
  3. my queer identity
  4. flirtatious feelings
  5. minimal boundaries
  6. to partake
  7. Aside from that we’ll


Text:

Free love in the 21st century: Why polyamory is taking off

LAST weekend I was having pillow talk with Scarlett* (25). We had been on a date the night before. It was only our third or fourth. We had gone to the theatre, followed by a bar, then eventually back to my apartment for sex. We woke with hazy headaches, bruised (=machucados) bodies and whimsical conversation.

“What’s on for the rest of your weekend?” I quizzed in a hungover drawl (=sotaque de ressaca). “Oh, I’m just planning to spend some time with my boyfriend Chad* (29).”

While this dialogue may sound Ashley Madison-esque to those who hold more traditional values, that couldn’t be further from the truth. In the past decade society has seen a rise of couples (especially the more youthful) exploring polyamory and open relationships — the practice where a committed couple also separately and openly engage in dating and sexual relationships with others, sometimes casual and sometimes more serious.

“Poly to me is dating or otherwise being in a relationship (sexual or romantic or both) with more than one person, or being open to that,” notes Scarlett, who has dated Chad for three years. “I was still poly when I was only dating one person, the same as how dating a man doesn’t remove my queer (=homossexual) identity. When talking about my current relationship I usually say I’m in an open relationship, because I feel like poly sometimes implies that I’m only interested in multiple committed relationships (or at least that’s how I see it used) whereas right now I’m perfectly happy casually dating or sleeping with other people while having one live-in committed relationship with Chad.”

Contrary to popular belief, polyamory and open relationships aren’t primarily about allowing your partner a get-out-of-jail-free card to indulge in sexual exploits with other people (a concept much closer to swinging which is generally more associated with older married couples). To many the act of engaging in dating is about the fundamental experience that comes from the exploration of the human condition. Meeting new people, learning from their worldview and expanding your perspective on the world around you.

“I identify as a queer pansexual with an interest in various forms of fetish play,” says Chad. “Because of this I tend to think that in a lot of cases it is impossible for one partner in the traditional sense to fulfil all needs when it comes to the rather broad concept of intimacy. This is something I fell naturally into doing over time as I worked it out.”

It’s an unspoken truth that while in the formative stages of any relationship you will both be dating other people, and that once entering a monogamous bond you will still have flirtatious (=paquera) feelings for others time-to-time. It’s difficult not to see the appeal of being able to date multiple people at once without guilt.

“I think it’s always been something which has made sense,” details Scarlett. “But it’s only been the last four or five years when I’ve felt able to try and have poly relationships. I like that I can provide different kinds of support to different partners/lovers and similarly get different things from them.”

“I like to have minimal boundaries (=limites),” adds Chad. “I don’t see how holding someone back from something they feel the urge to partake (=participar) in as constructive behaviour (assuming they aren’t harming themselves or others).”

That’s not to say that you can simply jump into the open relationship ocean without any form of an emotional lifejacket.

“My first few attempts at open relationships didn’t go so well — the first was trying to open up a relationship which had previously been monogamous, where I was more interested in it than him,” says Scarlett.

“The others were when I started dating people already in long term relationships and issues arose with balancing the needs and interactions between everyone involved. I learned a lot about how to conduct myself in open relationships and relationships more generally from those experiences, even though they were quite painful at the time.”

Of course, as with any form of relationship, boundaries must be drawn and communication is imperative.

“When I’m interested in going on a date with a new person I make sure they know about Chad right from the start, because if someone isn’t comfortable with an open relationship then they’re not the person for me. Another important thing for me is that they respect my other relationships.”

“I like to think communication between all parties is key,” says Chad. “But I also think that is true with any kind of relationship. It shouldn’t be a challenge and if it is, perhaps it’s not for you.”

“Chad and I have one main rule which is to always use condoms if we’re with a partner where the sex we’re having calls for them. Aside from that we’ll usually mention if we went on a date (we don’t have a requirement for pre-approval or anything like that). We also both get STI tests reasonably often, but I think that’s just something which anyone who is sexually active with more than one partner should do, whether those partners are in series or parallel.”

Polyamory will never be for everyone, but the same can be said for monogamy. They both fall at the opposite ends of a very broad spectrum, one that many people occupy the middle-ground of for much of their lives.
The important thing for couples like Scarlett and Chad is being upfront and honest. And there’s definitely something to be said about that.


quinta-feira, 24 de setembro de 2015

Pelo menos 717 mortos na Arabia Saudita

Source: bbc news

Vocabulary:

  1. taking part in the Hajj pilgrimage
  2. major rite
  3. were marred when a crane collapsed
  4. when a crane collapsed
  5. among other nationals
  6. were chanting Allah's name
  7. children and infants
  8. in a crush at foot
  9. white garments worn


Text:

Hajj stampede: At least 717 killed in Saudi Arabia

At least 717 people taking part (=participando) in the Hajj pilgrimage (=peregrinação) have been killed in a stampede near the Islamic holy city of Mecca, officials in Saudi Arabia say.

Another 863 people were injured in the incident at Mina, which occurred as two million pilgrims were taking part in the Hajj's last major rite (=ritual).

They converge on Mina to throw stones at pillars representing the devil.
Preparations for the Hajj were marred (=marcadas) when a crane (=guindaste) collapsed at Mecca's Grand Mosque this month, killing 109 people.
It is the deadliest incident to occur during the Hajj in 25 years.

Pilgrims travel to Mina, a large valley about 5km (3 miles) from Mecca, during the Hajj to throw seven stones at pillars called Jamarat, which represent the devil.
The pillars stand at three spots where Satan is believed to have tempted the Prophet Abraham.

At the scene - Tchima Illa Issoufou, BBC Hausa
Saudi ambulances arrive with pilgrims who were injured in a stampede at an emergency hospital in Mina, near the holy city of Mecca, on the first day of Eid al-Adha on September 24, 2015.

People were going towards the direction of throwing the stones while others were coming from the opposite direction. Then it became chaotic and suddenly people started going down.

There were Nigerians, Nigeriens, Chadians and Senegalese among (=entre) other nationals. People were just climbing on top of others in order to move to a safer place and that's how some people died.
People were chanting (=cantando) Allah's name while others were crying, including children and infants (=bebês). People fell on the ground seeking help but there was no-one to give them a helping hand. Everybody seemed to be on their own.

It affected some members of our group. I lost my aunt as a result of the stampede and at the moment, two women from our entourage - a mother and her daughter - are still missing.

The Saudi civil defence directorate said in a statement that the stampede occurred at around 09:00 local time (06:00 GMT) at the junction of Street 204 and Street 223.
The pilgrims were walking towards the five-storey structure which surrounds the pillars, known as the Jamarat Bridge.
The incident happened when there was a "sudden increase" in the number of pilgrims heading towards the pillars, the statement said.
This "resulted in a stampede among the pilgrims and the collapse of a large number of them", it added.

Security personnel and the Saudi Red Crescent were "immediately" deployed to prevent more people heading towards the area, the directorate said.
The Saudi health minister, Khaled al-Falih, said the crush occurred because pilgrims failed to follow directions.
He said "many pilgrims move without respecting the timetables" established by authorities.

2006: 364 pilgrims die in a crush (=esmagar) at foot of Jamarat Bridge in Mina
1997: 340 pilgrims are killed when fire fuelled by high winds sweeps through Mina's tent city
1994: 270 pilgrims die in a stampede during the stoning ritual
1990: 1,426 pilgrims, mainly Asian, die in a stampede in an overcrowded tunnel leading to holy sites
1987: 402 people die when security forces break up an anti-US demonstration by Iranian pilgrims
Timeline: Deadliest stampedes

The hundreds of wounded have been taken to four hospitals in the area by the more than 220 rescue vehicles sent to the scene.
Amateur video and photographs posted on social media showed the bodies of dozens of pilgrims on the ground. They were all dressed in the simple white garments (=vestes) worn during the Hajj.
The civil defence directorate said the victims were of "different nationalities", without providing details.
Iran's state news agency, Irna, said at least 43 Iranians were among the dead.

The UK Foreign Office said it was in contact with the local authorities and was urgently seeking more information about whether British nationals were involved.
Saudi-owned al-Arabiya TV reported that the head of the central Hajj committee, Prince Khaled al-Faisal, had blamed the stampede on "some pilgrims with African nationalities".
But the head of Iran's Hajj organisation, Said Ohadi, told Irna that two paths close to the scene of the incident had been inexplicably closed off by the Saudi authorities, resulting in the build-up in pilgrims.

What rituals do pilgrims perform? The pilgrimage takes place in several stages over five days, including circling the Kaaba (a cube-like building in the centre of the mosque) en masse and throwing seven stones at pillars called Jamarat which represent the devil.
How many people go? Well over a million pilgrims from outside Saudi Arabia, and several hundred thousand from inside the kingdom, converge on the site each year.
How do the authorities cope? Authorities deployed 100,000 security personnel and 25,000 extra health workers this year, as well as 100,000 air-conditioned tents for temporary accommodation.
Why do millions gather in Mecca every year?

The Saudi authorities have spent billions of dollars on improving transport and other infrastructure in the area in an attempt to try to prevent such incidents.
The Hajj is the fifth and final pillar of Islam. It is the journey that every able-bodied adult Muslim must undertake at least once in their lives if they can afford it.
Grey line
Hajj visitors - in numbers

sexta-feira, 18 de setembro de 2015

Crise imigração Hungria fecha fronteira

Source: bbcnews

Vocabulary:

  1. razor-wire fence
  2. into effect overnight
  3. war has been raging since 2011
  4. loaves of bread into a pile
  5. minister in charge of the government's
  6. stepped off a Munich-Berlin train
  7. comply with international


Text:

Migrant crisis: Hungary's closed border leaves many stranded

Hundreds of migrants are stranded at the Serbia-Hungary border after the Hungarian government closed the frontier with a new razor-wire (=arame farpado) fence.

The move aims to stop migrants who are trying to enter the EU.

After new Hungarian laws came into effect overnight (=durante a noite), police sealed a railway crossing point that had been used by tens of thousands of migrants.

Some have been searching for a way through the fence, while others threw down food and water in protest.

Hungarian Foreign Minister Peter Szijjarto has suggested his country is planning to build a fence to keep migrants out along part of its border with Romania - a fellow EU member - to prevent the bypassing of the current frontier.

The EU is facing a huge influx of migrants, many fleeing conflict and poverty in countries including Syria, where a civil war has been raging (=travada) since 2011.

At the scene: James Reynolds, BBC News, on the Serbia-Hungary border

Right next to the border, refugees and migrants are searching in desperation for ways into Hungary. One group from Afghanistan crowded in front of a portable cabin built into the fence. A boy tried to open the door handle. The group hoped that this cabin might be a new front door into the European Union. But no-one answered them.

A few metres away, another group began a protest. They sat on the road and threw their bottles of water and loaves of bread (=pães) into a pile. "We don't want food or water until we cross the border," shouted one man.

An hour later, a crowd right next to the border fence started to move forward. The hunger strikers abandoned their protest to join the bigger crowd - in the hope of finding a way into Hungary. But I didn't see anyone being allowed to cross.

Grey line
The EU's border agency says more than 500,000 migrants have arrived at the EU's borders this year, compared with 280,000 in 2014. The vast majority have come by boat across the Mediterranean.
The Serbian minister in charge (=encarregado) of the government's working committee on migrants, Aleksandar Vulin, argued that the closure of the border by Hungary was unsustainable.

He told the BBC's Lyse Doucet that contact between Serbian and Hungarian officials had been minimal.
"We have some kind of negotiations, if you can say so, with Hungarian counterparts, with a police officer - someone who is in charge, through the fence. And we ask, can we talk somewhere... can we find some place to see each other? They said no. Through the fence."

In other developments on Tuesday:
Twenty-two people, including four children, drowned after a wooden boat following the most popular recent migrant route, between Turkey and Greece, sank; 249 of those on board were rescued
179 refugees stepped off (=desceram) a Munich-Berlin train in Saxony after the emergency brake cord was pulled, German media say
Extra powers
Hungary declared a state of emergency in two southern counties as the new laws came into force.

Anyone who crosses the border illegally will face charges, and 30 judges have been put on standby to try offenders.
The laws also make it a criminal offence - punishable by prison or deportation - to damage the newly built 4m (13ft) razor-wire fence along Hungary's 175km (110 mile) border with Serbia.

Police buses will now take asylum applicants to registration centres, but if their applications are refused they will now be returned to Serbia rather than being given passage through Hungary.
The state of emergency gives police extra powers and could allow the deployment of troops, if parliament approves.

Hungarian authorities said more than 9,000 people - a new record - crossed into the country on Monday before the border was closed. Some 20,000 crossed into Austria from Hungary.
Police said they had arrested 60 people accused of trying to breach the fence on the border with Serbia.

Hungarian government spokesman Zoltan Kovacs said: "The official and legal ways to come to Hungary and therefore to the European Union remain open. That's all we ask from all migrants - that they should comply (=cumprir) with international and European law".

The European Commission said it was seeking clarification of parts of the new Hungarian legislation, to check whether it was in line with EU asylum rules.

Starting on Tuesday, the EU has agreed to relocate 40,000 migrants from Greece and Italy to other EU states. But it has yet to agree on mandatory quotas for a further 120,000 asylum seekers.
At talks in Brussels on Monday, a majority of states had agreed in principle to the idea of relocating a further 120,000 through mandatory quotas, and there was hope the proposal could be finally approved at a meeting on 8 October.

Germany and Austria are calling for a special meeting of EU leaders next week to discuss the crisis.
German Chancellor Angela Merkel told a news conference that "this problem can only be solved together. It is a responsibility for the entire European Union".
However, the Czech Republic, Slovakia and Hungary have opposed the quotas.

German Interior Minister Thomas de Maiziere said on Tuesday there should be ways of "exerting pressure" on states that refused binding quotas, possibly by reducing the amount of EU funding they receive.
But the Czech state secretary for the EU, Toma Prouza, said such threats were "empty but very damaging to all"

A spokeswoman from the UN refugee agency, Melissa Fleming, said she expected migrant "chaos" to continue in the absence of more decisive action by the EU, with migrants seeking a new route.

Germany introduced temporary border controls on Monday. That slowed down the passage of migrants from Austria, where about 2,000 people slept in railway stations overnight.
Austria - one of several EU countries to say it would tighten border controls - is starting to deploy hundreds of troops to help the police deal with migrant arrivals ahead of the new measures coming in at midnight (22:00 GMT).
The moves are a challenge to the EU's Schengen agreement on free movement, although the rules do allow for temporary controls in emergencies.



quinta-feira, 17 de setembro de 2015

iOS - Swift vs Objective C

Source: switf inforworld

Vocabulary:

  1. that cling to fading paradigms
  2. all the warts you’d expect
  3. carries over to Objective-C.
  4. Swift again relieves you from
  5. Benchmarks for Swift code performance continue to
  6. Further improvements were observed
  7. The enhancements also enabled Swift
  8. to outperform C++ 
  9. One issue that has plagued Objective-C 
  10. potential pitfalls
  11. executable chunks
  12. app bundle downloaded
  13. ability to defer loading
  14. are a boon to experienced developers


Text:
Programming languages don’t die easily, but development shops that cling (=agarram) to fading paradigms do. If you're developing apps for mobile devices and you haven't investigated Swift, take note: Swift will not only supplant Objective-C when it comes to developing apps for the Mac, iPhone, iPad, Apple Watch, and devices to come, but it will also replace C for embedded programming on Apple platforms.

Thanks to several key features, Swift has the potential to become the de-facto programming language for creating immersive, responsive, consumer-facing applications for years to come.

Apple appears to have big goals for Swift. It has optimized the compiler for performance and the language for development, and it alludes to Swift being “designed to scale from ‘hello, world’ to an entire operating system” in Swift’s documentation. While Apple hasn’t stated all its goals for the language yet, the launches of Xcode 6, Playgrounds, and Swift together signal Apple’s intent to make app development easier and more approachable than with any other development tool chain.

Here are 10 reasons to get ahead of the game by starting to work with Swift now.

1. Swift is easier to read

Objective-C suffers all the warts (=verrugas) you’d expect from a language built on C. To differentiate keywords and types from C types, Objective-C introduced new keywords using the @ symbol. Because Swift isn’t built on C, it can unify all the keywords and remove the numerous @ symbols in front of every Objective-C type or object-related keyword.

Swift drops legacy conventions. Thus, you no longer need semicolons to end lines or parenthesis to surround conditional expressions inside if/else statements. Another large change is that method calls do not nest inside each other resulting in bracket hell -- bye-bye, [[[ ]]]. Method and function calls in Swift use the industry-standard comma-separated list of parameters within parentheses. The result is a cleaner, more expressive language with a simplified syntax and grammar.

Swift code more closely resembles natural English, in addition to other modern popular programming languages. This readability makes it easier for existing programmers from JavaScript, Java, Python, C#, and C++ to adopt Swift into their tool chain -- unlike the ugly duckling that was Objective-C.

2. Swift is easier to maintain

Legacy is what holds Objective-C back -- the language cannot evolve without C evolving. C requires programmers to maintain two code files in order to improve the build time and efficiency of the executable app creation, a requirement that carries over to Objective-C.

Swift drops the two-file requirement. Xcode and the LLVM compiler can figure out dependencies and perform incremental builds automatically in Swift 1.2. As a result, the repetitive task of separating the table of contents (header file) from the body (implementation file) is a thing of the past. Swift combines the Objective-C header (.h) and implementation files (.m) into a single code file (.swift).

Objective-C’s two-file system imposes additional work on programmers -- and it’s work that distracts programmers from the bigger picture. In Objective-C you have to manually synchronize method names and comments between files, hopefully using a standard convention, but this isn’t guaranteed unless the team has rules and code reviews in place.

Xcode and the LLVM compiler can do work behind the scenes to reduce the workload on the programmer. With Swift, programmers do less bookkeeping and can spend more time creating app logic. Swift cuts out boilerplate work and improves the quality of code, comments, and features that are supported.

3. Swift is safer

One interesting aspect of Objective-C is the way in which pointers -- particularly nil (null) pointers -- are handled. In Objective-C, nothing happens if you try to call a method with a pointer variable that is nil (uninitialized). The expression or line of code becomes a no-operation (no-op), and while it might seem beneficial that it doesn’t crash, it has been a huge source of bugs. A no-op leads to unpredictable behavior, which is the enemy of programmers trying to find and fix a random crash or stop erratic behavior.

Optional types make the possibility of a nil optional value very clear in Swift code, which means it can generate a compiler error as you write bad code. This creates a short feedback loop and allows programmers to code with intention. Problems can be fixed as code is written, which greatly reduces the amount of time and money that you will spend on fixing bugs related to pointer logic from Objective-C.

Traditionally, in Objective-C, if a value was returned from a method, it was the programmer’s responsibility to document the behavior of the pointer variable returned (using comments and method-naming conventions). In Swift, the optional types and value types make it explicitly clear in the method definition if the value exists or if it has the potential to be optional (that is, the value may exist or it may be nil).

To provide predictable behavior Swift triggers a runtime crash if a nil optional variable is used. This crash provides consistent behavior, which eases the bug-fixing process because it forces the programmer to fix the issue right away. The Swift runtime crash will stop on the line of code where a nil optional variable has been used. This means the bug will be fixed sooner or avoided entirely in Swift code.

4. Swift is unified with memory management

Swift unifies the language in a way that Objective-C never has. The support for Automatic Reference Counting (ARC) is complete across the procedural and object-oriented code paths. In Objective-C, ARC is supported within the Cocoa APIs and object-oriented code; it isn’t available, however, for procedural C code and APIs like Core Graphics. This means it becomes the programmer’s responsibility to handle memory management when working with the Core Graphics APIs and other low-level APIs available on iOS. The huge memory leaks that a programmer can have in Objective-C are impossible in Swift.

A programmer should not have to think about memory for every digital object he or she creates. Because ARC handles all memory management at compile time, the brainpower that would have gone toward memory management can instead be focused on core app logic and new features. Because ARC in Swift works across both procedural and object-oriented code, it requires no more mental context switches for programmers, even as they write code that touches lower-level APIs -- a problem with the current version of Objective-C.

Automatic and high-performance memory management is a problem that has been solved, and Apple has proven it can increase productivity. The other side effect is that both Objective-C and Swift do not suffer from a Garbage Collector running cleaning up for unused memory, like Java, Go, or C#. This is an important factor for any programming language that will be used for responsive graphics and user input, especially on a tactile device like the iPhone, Apple Watch, or iPad (where lag is frustrating and makes users perceive an app is broken).

5. Swift requires less code

Swift reduces the amount of code that is required for repetitive statements and string manipulation. In Objective-C, working with text strings is very verbose and requires many steps to combine two pieces of information. Swift adopts modern programming language features like adding two strings together with a “+” operator, which is missing in Objective-C. Support for combining characters and strings like this is fundamental for any programming language that displays text to a user on a screen.

The type system in Swift reduces the complexity of code statements -- as the compiler can figure out types. As an example, Objective-C requires programmers to memorize special string tokens (%s, %d, %@) and provide a comma-separated list of variables to replace each token. Swift supports string interpolation, which eliminates the need to memorize tokens and allows programmers to insert variables directly inline to a user-facing string, such as a label or button title. The type inferencing system and string interpolation mitigate a common source of crashes that are common in Objective-C.

With Objective-C, messing up the order or using the wrong string token causes the app to crash. Here, Swift again relieves (=ajuda) you from bookkeeping work, translating into less code to write (code that is now less error prone) because of its inline support for manipulating text strings and data.

6. Swift is faster

Dropping legacy C conventions has greatly improved Swift under the hood. Benchmarks (=referência) for Swift code performance continue to point to Apple’s dedication to improving the speed at which Swift can run app logic.

According to Primate Labs, makers of the popular GeekBench performance tool, Swift was approaching the performance characteristics of C++ for compute-bound tasks in December 2014 using the Mandelbrot algorithm.

In February 2015, Primate Labs discovered that the Xcode 6.3 Beta improved Swift’s performance of the GEMM algorithm -- a memory-bound algorithm with sequential access of large arrays -- by a factor of 1.4. The initial FFT implementation -- a memory-bound algorithm with random access of large arrays -- had a 2.6-fold performance improvement.

Further (=outras) improvements were observed in Swift by applying best practices, resulting in an 8.5-fold boost for FFT algorithm performance (leaving C++ with only a 1.1-time performance gain). The enhancements (=melhorias) also enabled Swift to outperform (=superar) C++ for the Mandelbrot algorithm by a factor of a mere 1.03.

Swift is nearly on par with C++ for both the FFT and Mandelbrot algorithms. According to Primate Labs, the GEMM algorithm performance suggests the Swift compiler cannot vectorize code the C++ compiler can -- an easy performance gain that could be achieved in the next version of Swift.

7. Fewer name collisions with open source projects

One issue that has plagued (=atormentado) Objective-C code is its lack of formal support for namespaces, which was C++’s solution to code filename collisions. When this name collision happens in Objective-C, it is a linker error, and the app can’t run. Workarounds exist, but they have potential pitfalls (=armadilhas). The common convention is to use a two- or three-letter prefixes to differentiate Objective-C code that is written, say, by Facebook versus your own code.

Swift provides implicit namespaces that allow the same code file to exist across multiple projects without causing a build failure and requiring names like NSString (Next Step -- Steve Jobs’ company after being fired from Apple) or CGPoint (Core Graphics). Ultimately, this feature in Swift keeps programmers more productive and means they don’t have to do the bookkeeping that exists in Objective-C. You can see Swift’s influence with simple names like Array, Dictionary, and String instead of NSArray, NSDictionary, and NSString, which were born out of the lack of namespaces in Objective-C.

With Swift, namespaces are based on the target that a code file belongs to. This means programmers can differentiate classes or values using the namespace identifier. This change in Swift is huge. It greatly facilitates incorporating open source projects, frameworks, and libraries into your code. The namespaces enable different software companies to create the same code filenames without worrying about collisions when integrating open source projects. Now both Facebook and Apple can use an object code file called FlyingCar.swift without any errors or build failures.

8. Swift supports dynamic libraries

The biggest change in Swift that hasn’t received enough attention is the switch from static libraries, which are updated at major point releases (iOS 8, iOS 7, and so on), to dynamic libraries. Dynamic libraries are executable chunks (=pedaços) of code that can be linked to an app. This feature allows current Swift apps to link against newer versions of the Swift language as it evolves over time.

The developer submits the app along with the libraries, both of which are digitally signed with the development certificate to ensure integrity (hello, NSA). This means Swift can evolve faster than iOS, which is a requirement for a modern programming language. Changes to the libraries can all be included with the latest update of an app on the App Store, and everything simply works.

Dynamic libraries have never been supported on iOS until the launch of Swift and iOS 8, even though dynamic libraries have been supported on Mac for a very long time. Dynamic libraries are external to the app executable, but are included within the app bundle (=pacote) downloaded from the App Store. It reduces the initial size of an app as it is loaded into memory, since the external code is linked only when used.

The ability to defer (=adiar) loading in a mobile app or an embedded app on Apple Watch will improve the perceived performance to the user. This is one of the distinctions that make the iOS ecosystem feel more responsive. Apple has been focused on loading only assets, resources, and now compiled and linked code on the fly. The on-the-fly loading reduces initial wait times until a resource is actually needed to display on the screen.

Dynamic libraries in Swift make it possible for programming language changes and improvements to propagate faster than ever before. Users no longer need to wait for iOS point releases to benefit from any performance or reliability improvements Apple introduces into Swift.

9. Swift Playgrounds encourages interactive coding

Swift’s newly introduced Playgrounds are a boon (=bênção) to experienced developers. The Playgrounds were partially inspired by the work of former Apple employee Brett Victor. Playgrounds enable programmers to test out a new algorithm or graphics routine, say 5 to 20 lines of code, without having to create an entire iPhone app.

Apple has added inline code execution to Playgrounds to help programmers create a chunk of code or write an algorithm while getting feedback along the way. This feedback loop can improve the speed at which code can be written because the mental model that a traditional programmer needs can be replaced with data visualizations in Playgrounds. Programming is an iterative process, and any strain that can be reduced or used to complement the creative process will make programmers more productive and free them to solve bigger problems, rather than focusing on boring details that traditional compilers have imposed on programmers.

Note: From my experience in teaching novice programmers, Playgrounds are not as powerful for beginners as they are for experienced programmers. Simply showing how a variable works in the Swift playground doesn’t help a beginner understand the need for a Floating point variable versus an Integer variable. The need becomes obvious when you show an app that can remember your last scroll position in the Facebook news feed. For beginners, the “why” question can only be answered with a working example: an iPhone app.

10. Swift is a future you can influence

Objective-C isn’t going anywhere, but it won't see as many major changes, thanks to the introduction of Swift. Some Swift features will likely migrate over to Objective-C, but Objective-C’s legacy in C means it can absorb only so much.

Swift provides the development community a direct way to influence a language that will be used to create apps, embedded systems (if Apple ever licenses an embedded framework and chip for third parties), and devices like the Apple Watch.

Apple is focused on providing the best consumer experience and is building only those features deemed worthy of attention. With the Swift 1.2 release in Xcode 6.3, Apple has already fixed thousands of bugs reported with the popular Apple Bug Reporter utility. The team supporting the development and evolution of Swift is very interested in how the language can be improved to better support the development community that builds apps and systems using Swift.

Swift: The more approachable, full-featured language

The bulk of changes that allow Swift to rise above Objective-C stem from dropping the legacy language that Objective-C was built upon. Apple isn’t moving away from Cocoa, which is their API and code library for creating the experiences that feel Apple-esque. Instead, they are providing full-featured parity and making it easier to interact with new APIs that support features like Force Touch or Taptic Feedback.

Many legacy decisions were designed to make compiler design easier. Swift is focusing on making the app developer’s job easier by jettisoning the mental strain of legacy coding practices. As modern compilers improve, more information can be inferred from less code.

With Swift, programmers have half as many code files to maintain, zero manual code synchronization, and far less punctuation to mistype -- leading to more time spent writing quality lines of code. Code is now self-documenting in Swift with the addition of optional types: a compile-time safety mechanism for returning a value or no value, which is a common issue with asynchronous operations, network failures, invalid user input, or data validation errors. ARC is unified in Swift between both procedural C-style code, as well as object-oriented code using Apple’s Cocoa framework.

Developers will find that they write less code in Swift, and modern language features support them in keeping lines of code more readable. Swift will keep the entire Apple ecosystem at the forefront of programming as it continues to evolve, thanks to dynamic library support in iOS and Swift. Open source projects, third-party SDKs, and frameworks that integrate with home automation, devices, and social services will be easier to integrate without increasing build times. Swift is almost as fast as C++ in some algorithms and the latest release of Xcode 6.3 and Swift 1.2 point to additional performance optimizations on the horizon.

Add to that the fact that Playgrounds and Swift enable a new way to program with visual feedback that assists the development of algorithms using inline data visualizations. A shorter feedback loop and graphical descriptions make the iterative coding process even easier to start.

Ultimately, Swift is a more approachable full-featured programming language that will allow developers to not only build apps but also target embedded systems like the new lower-power Apple Watch for many years to come

segunda-feira, 14 de setembro de 2015

Primeiro ministro da australia deposto

Source: bbcnews

Vocabulary:

  1. party leadership ballot
  2. who had been plagued
  3. to be sworn
  4. and resigns
  5. had dismissed rumours
  6. Ahead of the vote
  7. Labor Party in opinion polls
  8. he has coveted for at least

Text:

Australian PM Tony Abbott ousted by Malcolm Turnbull

Australia is to have a new prime minister after Tony Abbott was ousted as leader of the centre-right Liberal Party by Malcolm Turnbull.
In the dramatic late night party leadership ballot (=votação), Mr Abbott, who had been plagued (=atormentado) by poor opinion polls, received 44 votes to Mr Turnbull's 54.
Mr Turnbull said he assumed that parliament would serve its full term, implying no snap general election.
The new leader will be Australia's fourth prime minister since 2013

The prime minister-elect is expected to be sworn (=jurado) in after Mr Abbott writes to Australia's governor general and resigns (=renuncia).

Earlier on Monday Mr Abbott had dismissed (=desmintiu) rumours of a leadership challenge as "Canberra gossip" - only to be voted out by his fellow Liberal MPs.

They also voted for Foreign Minister Julie Bishop to remain deputy leader of the party.
Speaking after the result was announced, Mr Turnbull praised his predecessor for his "formidable achievements" as prime minister.

The new party leader said Australia needed to have "the economic vision, a leadership, that explains the great challenges and opportunities we face".
He said he would lead "a thoroughly Liberal government, committed to freedom, the individual and the market".
Who is Malcolm Turnbull?
Served as Minister for Communications under Mr Abbott, before resigning to launch a leadership challenge

Many in his party dislike his support for climate change action and gay marriage
Led the Liberal Party in opposition from 2008-2009 - but lost a leadership challenge to Mr Abbott by one vote
Previously worked as a successful lawyer and businessman - defending former British spy Peter Wright in the "Spycatcher" case in the 1980s
Profile: Malcolm Turnbull

Ahead (=Antes do) of the vote, Mr Turnbull had said if Mr Abbott remained as leader, the coalition government would lose the next election, which is likely to take place next year.
He said he had not taken the decision to launch a leadership challenge lightly, but that it was "clear enough that the government is not successful in providing the economic leadership that we need".
Ms Bishop had supported his bid to become party leader.

The last Australian prime minister to serve a full term was John Howard, who left power in 2007.
Labor Prime Minister Julia Gillard was ousted by rival Kevin Rudd in a leadership vote in June 2013 - months before a general election won by Tony Abbott's Liberal Party and its coalition partners the National Party.
Ms Gillard herself had ousted Mr Rudd as prime minister in 2010.
Mr Turnbull had previously been leader of the Liberals while in opposition, but was ousted by Mr Abbott in 2009.
Mr Abbott survived a leadership challenge in February, but his government has consistently been behind the opposition Labor Party in opinion polls (=pesquisas)

Under the Australian system, as in the UK, the prime minister is not directly elected by voters but is the leader of the party or coalition that can command a majority in parliament.
The outgoing prime minister has not spoken publicly since he was voted out by his parliamentary colleagues.
Current opposition leader Bill Shorten tweeted that "Australia does not need another arrogant, out of touch Liberal leader - Australia needs a change of government".
Analysis: Wendy Frew, Australia Editor, BBC News website
Malcolm Turnbull has always been close to the sources of power, whether it was giving legal advice to Australian media mogul Kerry Packer in the 1980s, or running his own investment bank and later as a partner of Goldman Sachs.
He has now risen to the highest job, a position he has coveted (=cobiçado) for at least as long as he has been in politics. But that doesn't mean it will be all plain sailing from here.
Mr Turnbull holds views that are at odds with his coalition colleagues, in particular, on climate change, gay marriage and making Australia a republic.
No doubt, deals have been done but it remains to be seen how many compromises the member for Wentworth may have made to win support in Monday's ballot.

sábado, 12 de setembro de 2015

Alemanha se prepara para a chegada de 40 mil imigrantes

Source: bbcnews

Vocabulary:

  1. it waived EU rules
  2. Germany has been overwhelmed


Text:
Some 40,000 migrants could arrive in Germany over the next two days, officials say - double the number who entered the country last weekend.
The southern city of Munich received another 3,600 on Saturday morning but there are concerns about how the region will cope with another large influx.

Around 4,000 troops are being deployed in Germany for logistical support.
Germany has become an attractive destination for Syrian refugees since it waived (=reununciou) EU rules.
The government announced in August that it would deal with Syrian asylum applications regardless of where the migrants first arrived in the EU. Up until then, people had to claim asylum with the first EU country they reached.

Tens of thousands of mainly Syrian migrants have been making their way from Turkey, through the Balkans and Hungary to reach Austria, Germany and Sweden.
Migrants have continued to arrive in Macedonia from Greece. More buses were reported to be making their way towards the Hungarian border this weekend.

On the scene: James Reynolds, BBC News, Roszke, southern Hungary
Next to a set of old railway tracks, a long line of migrants and refugees queues for buses to take them to nearby registration camps, which I have not been able to visit.
A police officer calls families forward one by one. "Syria? Afghanistan? Pakistan?" the officer asks in English.
He notes their reply on a piece of paper and lets them board.
A translator stands by to help. At one point, she picks up a rake and clears rubbish from the road in front of the bus.
By contrast to the chaos and panic I witnessed at the same place on Friday night, the atmosphere is calm. The police are courteous and organised.
Volunteers walk along the line handing out sandwiches and bottles of water. The refugee families wait patiently in the sun.

Munich Mayor Dieter Reiter appealed urgently for other German regions to do more to process and accommodate the new arrivals.
He described as "scandalous" the failure of other regions to provide more accommodation, according to state broadcaster ARD.
Reports suggest the government is considering new temporary powers to take control of unoccupied rental property to accommodate migrants.
A large processing hub is planned for northern Germany, on Lueneburg Heath. Trains would take migrants there directly from Austria.

Germany has been overwhelmed (=sobrecarregado), not by refugees, but by an impressive wave of goodwill towards people fleeing war. Donations have flooded in, large numbers of volunteers have come forward and some Germans have even opened up their homes for migrants.
After years of nasty Nazi comparisons over Greece's debt crisis, many Germans are rather enjoying the sudden image boost as a beacon of humanitarian generosity.

But the mood could be shifting. Right-wing allies of Chancellor Angela Merkel have attacked her open-door policy, calling it "irresponsible" and "a political error."
And on Saturday, some commentators in mainstream papers are questioning whether Mrs Merkel's promise that Germany is able to shelter an unlimited number of migrants is really true.
The mainstream feeling remains impressively generous. But the fear is that if things get difficult, will there be a backlash?

Elsewhere in Europe:
a demonstration by the far-right in Hamburg was banned earlier this week but the main railway station was closed on Saturday after left-wing demonstrators attacked a train believed to be carrying neo-Nazis
the city also saw a peaceful demonstration in the city centre in support of tolerance and diversity
thousands of people across the continent took part in a "day of action" to welcome refugees - read more here
a handful of rival anti-migrant protests also took place
the Swiss Football League is to donate 500 Swiss francs ($513, £334) for each goal scored this weekend towards refugee charities

The crisis has exposed deep divisions within the European Union. The European Commission announced plans for obligatory quotas to share out 120,000 additional asylum seekers among 25 member countries.
The Czech Republic, Hungary, Poland and Slovakia oppose being forced to take in new arrivals.
Hungary, which has struggled to cope with some 150,000 migrants who have crossed its borders so far this year, has been criticised over how it treats them.
Austrian Chancellor Werner Faymann, in an interview with Der Spiegel (in German), strongly condemned a decision to place migrants on a train after leading them to believe they were heading for the Austrian border when they were in fact destined for a processing camp in Hungary.

"Putting refugees on trains in the belief that they are going somewhere totally different awakens memories of our continent's darkest time,'' he was quoted as saying - comments seen as a reference to the Nazis' treatment of Jews.
Hungary has protested, summoning the Austrian ambassador to the foreign ministry. Hungary dismissed the Austrian chancellor's comments as "utterly unworthy of a 21st Century European leader".
Hungarian Prime Minister Viktor Orban has called on the European Union to give Syria's neighbours €3bn (£2.2bn; $3.4bn) in financial aid to help those displaced by the civil war.
Mr Orban said supporting Turkey, Lebanon and Jordan with such a package would end the mass migration to Europe.

A note on terminology: The BBC uses the term migrant to refer to all people on the move who have yet to complete the legal process of claiming asylum. This group includes people fleeing war-torn countries such as Syria, who are likely to be granted refugee status, as well as people who are seeking jobs and better lives, who governments are likely to rule are economic migrants.