The 2017 Top programming languages by IEEE Spectrum

Python jumps to number one and Swift burst in top ten
01 August 2017   826

Spectrum is a "flagship" of Institute of Electrical and Electronics Engineers - an international non-profit association of experts in the field of engineering, the world leader in the development of standards for radio electronics, electrical engineering and hardware for computing systems and networks. 

An IEEE Spectrum team researched 12 metrics from 10 carefully chosen online sources to rank 48 languages. The main feature of the Spectrum's ranking is that it is interactive, it contains 5 ranking for 4 platforms. 

Rankings:

  • IEEE Spectrum average
  • Trending - growing rapidly
  • Jobs - in demand by employers
  • Open - popular in open-source hubs
  • Custom  - here you can create your own ranking, based on date and 12 different criteria (number of indexed online resources on Google, GitHub repos, Reddit posts, etc.)

Platforms:

  • Web
  • Mobile
  • Enterprise 
  • Embedded

Python jumped two places to the No. 1 slot, though the top four—Python, C, Java, and C++—all remain very close in popularity.

C# has reentered the top five. Ruby has fallen all the way down to 12th position, but in doing so it has given Apple’s Swift the chance to join Google’s Go in the Top Ten. This is impressive, as Swift debuted on the rankings just two years ago. (Outside the Top Ten, Apple’s Objective-C mirrors the ascent of Swift, dropping down to 26th place.) 

IEEE Spectrum Top 30 Web programming languages
IEEE Spectrum Top 30 Web programming languages

You can view an interactive ranking at Spectrum.

What is YAPF?

A formatter for Python files, developed by Google team
30 October 2017   451

What is YAPF?

Most of the current formatters for Python --- e.g., autopep8, and pep8ify --- are made to remove lint errors from code. This has some obvious limitations. For instance, code that conforms to the PEP 8 guidelines may not be reformatted. But it doesn't mean that the code looks good.

YAPF takes a different approach. It's based off of 'clang-format', developed by Daniel Jasper. In essence, the algorithm takes the code and reformats it to the best formatting that conforms to the style guide, even if the original code didn't violate the style guide. The idea is also similar to the 'gofmt' tool for the Go programming language: end all holy wars about formatting - if the whole codebase of a project is simply piped through YAPF whenever modifications are made, the style remains consistent throughout the project and there's no point arguing about style in every code review.

The ultimate goal is that the code YAPF produces is as good as the code that a programmer would write if they were following the style guide. It takes away some of the drudgery of maintaining your code.

Code examples

YAPF takes this code:

x = {  'a':37,'b':42,

'c':927}

y = 'hello ''world'
z = 'hello '+'world'
a = 'hello {}'.format('world')
class foo  (     object  ):
  def f    (self   ):
    return       37*-+2
  def g(self, x,y=42):
      return y
def f  (   a ) :
  return      37+-+a[42-x :  y**3]

and reformat it into:

x = {'a': 37, 'b': 42, 'c': 927}

y = 'hello ' 'world'
z = 'hello ' + 'world'
a = 'hello {}'.format('world')


class foo(object):
    def f(self):
        return 37 * -+2

    def g(self, x, y=42):
        return y


def f(a):
    return 37 + -+a[42 - x:y**3]

See GitHub for more information.