Development

This Week in Programming: Better Code Through Automation

28 Apr 2018 6:00am, by

One of my first programming jobs started as an internship that had nothing to do with programming. Instead, it had to do with porting documents over from a Mac environment to a PC. Or vice versa. For years, they had used a document showing which mistranslated character was what. A quotation mark on PC, for example, was mistranslated to a tilde on a Mac. My task, were I to accept it, was to sit there and to manually translate by finding and replacing the various characters when bringing the doc from one to the other.

The look on my face was something along the lines of confused, flabbergasted, or some mixture of the two. The person previously in my position had actually sat there and taken up hours every day performing this task? I sat down, wrote a quick macro in VBScript and by the end of that first morning showed them how I had reduced my “job” to a button press that anyone in the place could do. So what else did they have in mind?

As a student of computer automation, as any developer is, you’ve likely had a similar moment — one where someone wanted you to do something manually and your response was to show them that it was a silly request indeed. And it seems only likely that these moments extend inward, as they might have for the creators of a startup called DeepCode that was featured this week in Techcrunch. Why are we working so hard to improve our source code when we can just automate that process, too?

DeepCode, as Techcrunch adeptly summarizes it, “is like Grammarly for programmers.” It “autonomously” goes out and ingests “millions” of code repositories, studies the code itself and the changes developers make, to create rules and best practices. It then takes this information to analyze your own code and make suggestions and corrections. Currently, the startup claims to have more than 250,000 of these rules, which it uses to not only find simple errors like missing semicolons, but also to suggest better quality code. Currently, DeepCode works with Java, JavaScript, and Python, and is free for open source projects, with minimal pricing for individual projects.

This is certainly eons beyond my basic efforts 20-something years ago to make simple a job that was unnecessarily complicated and manual, but it seems born of the same instinct. And while tales of the death of programming, as a task performed by humans and not computers, are grossly exaggerated, strides are certainly being made to make the task that much easier. I, for one, welcome our new computer-assisted overlords with open arms. It seems only natural.

This Week in Programming

  • Microsoft Offers Free AI Training: It seems that Microsoft has several announcements this week in the realm of programming. First up, AI training. In a move that some skeptics on the internet see as merely an effort to outsource training they might have to otherwise pay for, Microsoft says that it is aiming to fill skill gaps in AI by making its training courses openly available to the public. Earlier this week, the company announced the Microsoft Professional Program in AI, which “provides job-ready skills and real-world experience to engineers and others who are looking to improve their skills in AI and data science through a series of online courses that feature hands-on labs and expert instructors” and is part of its AI School. Also noted by some of these selfsame internet skeptics is the potential lock-in, as an Azure account is required, though this is not unique. Other self-taught services require similar accounts.
  • Bringing Bing to VS Code: This one falls into the category of simple but useful — a Bing-powered settings search in VS Code. That is, if you’re trying to figure out where a certain setting is in VS Code, well, you can just search for it now. According to Microsoft, there are “more than 400 settings out of the box”, and that number can grow larger with extensions, so they now offer the ability to easily search for settings with Bing.
  • A Cross-Platform C++ Library Manager: First launched in 2016, Microsoft’s C and C++ package manager, vcpkg, is now available for Linux and macOS in addition to Windows. According to Microsoft, the tool has grown quickly, with just 20 libraries at launch to more than 900 libraries and features now. For full installation instructions for each OS, check the post.
  • A Visual Studio 2017 Roadmap: Finally, Microsoft has offered up some transparency with a full Visual Studio 2017 roadmap. According to the announcement, the roadmap serves to highlight some of the more notable features and improvements, but isn’t complete. Ass-covering aside, “it captures some of the significant features we are currently committed to, and a rough time frame for when you can expect to see them.” And if you’re impatient, you can install the latest Preview from the Preview downloads page.
  • First, There’s Node.js 10.x: Two announcements also arrived hand in hand this week, the first of which being the latest release line: Node.js 10.x, which will become the new active Long Term Support release line in October 2018. This basically means that Node.js 10.x will be the version to rely on, as it will “focus on stability, extended support and provide a reliable platform for applications of any scale.” Improvements with Node.js 10.x will include an upgrade to OpenSSL version 1.1.0, the Google V8 v6.6 JavaScript engine, and the move of the Node.js API (N-API) out of experimental mode.
  • And Second, npm@6: Released in coordination with Node.js 10.x, npm@6 also arrived this week with a “major update” that “includes powerful new security features for every developer who works with open source code.” According to the announcement, the basic issue at hand is that we’re all (okay, just 97 percent “of worldwide JavaScript developers”) using a lot of open source code and we need to be able to trust that code. With the idea in mind that “if a security process requires pausing development for manual reviews, paying for an external audit, or introducing a third-party tool into your workflow, you’re less likely to follow it.” npm@6 bakes security into the process. This is more of that “better code through automation” thing that we started with, it seems. As the announcement describes, “Soon, every user of the npm Registry will begin receiving automatic warnings if you try to use code with a known security issue. npm will automatically review install requests against the NSP database and return a warning if the code contains a vulnerability.” And similarly, an audit feature will help identify insecure dependencies.
  • Where in the World? Leaving behind announcements, a blog post from developer Ben Frederickson again caught my eye, this time answering the question “Where Do The World’s Software Developers Live?” Frederickson dug into GitHub data to serve up some interesting insights and visual delights in the form of interactive maps showing developer hotspots across the globe. According to the post, “while top developers live all over the world, an extraordinary amount of them seem to live in the San Francisco Bay area.” No surprise there. However, “while the Bay Area is obviously the biggest location for software development in the world, most of the world’s software developers live elsewhere. Even inside the US, only about 11 percent of all GitHub accounts are from the Bay Area — and worldwide less than 3 percent of software developers live there.”
  • Learning Like a Developer: Meanwhile, a post on FreeCodeCamp offers an interesting perspective on a picture we’ve shared here before that shows the complicated ecosystem of languages and frameworks that comprise the whole of back-end and front-end Web development. Grabbing readers with the idea that “this picture will change the way you learn to code,” the author offers that “rather than spending your time trying to learn every programming language and technology, you should instead learn how to learn like a developer,” which he then goes on to define from there. Suffice it to say, this involves quickly gleaning the necessary nuggets to make things work from documentation and other code snippets and then figuring out how to fix what goes wrong when the debugger inevitably spits out errors.

Finally, to end this week, a couple of my favorite responses to a Twitter thread you should likely comb through yourself, which asked “What five words best describe programming?”

Microsoft is a sponsor of The New Stack.

Feature image via New Old Stack.

A newsletter digest of the week’s most important stories & analyses.

View / Add Comments

Please stay on topic and be respectful of others. Review our Terms of Use.