Bug

The Most Copied StackOverflow Java Code Snippet Contains a Bug (zdnet.com) 71

The admission comes from the author of the snippet itself, Andreas Lundblad, a Java developer at Palantir, and one of the highest-ranked contributors to StackOverflow, a Q&A website for programming-related topics. From a report: An academic paper [PDF] published in 2018 identified a code snippet Lundblad posted on the site as the most copied Java code taken from StackOverflow and then re-used in open source projects. The code snippet was provided as an answer to a StackOverflow question posted in September 2010. The code snippet printed byte counts (123,456,789 bytes) in a human-readable format, like 123.5 MB. Academics found that this code had been copied and embedded in more than 6,000 GitHub Java projects, more than any other StackOverflow Java snippet. In a blog post published last week, Lundblad said that the code had a flaw as it incorrectly converted byte counts into human-readable formats. Lundblad said he revisited the code after learning of the academic paper and its results. He looked at the code again and published a corrected version on his blog.
Java

Ford Will Turn McDonald's Used Coffee Bean Husks Into Car Parts (engadget.com) 47

Ford will soon start using coffee chaff from McDonald's to manufacture auto parts like headlamp housings and other interior and exterior components. "In addition to making Ford vehicles a little bit 'greener,' the coffee chaff -- or the waste produced by coffee during the roasting process -- will apparently also help the company make parts that are 20 percent lighter," reports Engadget. From the report: Ford already uses various sustainable materials like soy and tree cellulose in an effort to only use recycled and renewable plastics in its vehicles. It has added coffee chaff to the list after its research team discovered that it can be turned into a durable product by heating it to high temperatures under low oxygen and mixing it with additives like plastic. The material will then be turned into pellets that can be formed into various shapes. During the team's tests, they found that the chaff-based material has "significantly better" heat properties than the current material Ford is using. They also discovered that it'll allow the company to enjoy 25 percent energy savings during the molding process. McDonald's is expected to earmark a significant portion of the coffee chaff its North American operations produce for this project. While it's not entirely clear how much chaff that is, McD's generates 62 million pounds of chaff a year in the continent alone, which is currently just used to make coal and garden mulch.
Python

Guido van Rossum Explains How Python Makes Thinking in Code Easier (dropbox.com) 297

Dropbox's Work in Progress blog shared a 2000-word "conversation with the creator of the world's most popular programming language," noting that many computer science schools are switching over from Java to Python, and arguing that "JavaScript still owns the web, and Java runs 2.5 billion Android phones, but for general purpose programming and education, Python has become the default standard."

They also write that the language's recently-retired creator Guido van Rossum "thinks Python may be closer to our visual understanding of the structures that we are representing in code than other languages." "While I was researching my book, CODERS," says author Clive Thompson, "I talked to a lot of developers who absolutely love Python. Nearly all said something like 'Python is beautiful.' They loved its readability -- they found that it was far easier to glance at Python code and see its intent. Shorn of curly brackets, indented in elegant visual shelves, anything written in Python really looks like modern poetry." They also find that Python is fun to write, which is more important than it may seem. As Thompson writes, "When you meet a coder, you're meeting someone whose core daily experience is of unending failure and grinding frustration."

Building the priority of the programmer's time into the language has had a curious effect on the community that's grown around it. There's a social philosophy that flows out of Python in terms of the programmer's responsibility to write programs for other people. There's an implicit suggestion, very much supported by Van Rossum in the ways he talks and writes about Python, to take a little more time in order to make your code more interpretable to someone else in the future. Expressing your respect for others and their time through the quality of your work is an ethos that Van Rossum has stealthily propagated in the world. "You primarily write your code to communicate with other coders, and, to a lesser extent, to impose your will on the computer," he says...

Part of the enduring appeal of Python is the optimism and humility of starting over. "If you've invested much more time into writing and debugging code, you're much less eager to throw it all away and start over." Co-founder and CEO, Drew Houston wrote the first prototype of Dropbox in Python on a five-hour bus ride from Boston to New York. "The early prototypes of Dropbox were thrown away, largely, many times," says Van Rossum....

What has he taken away from his thirty year journey with Python? "I have learned that you can't do it alone, which is not an easy lesson for me. I've learned that you don't always get the outcome that you went for, but maybe the outcome you get is just as good, or better."

Though two decades ago van Rossum had tried a short-lived project called Computer Programming 4 Everybody (or CP4E), he now says "I'm not so sure that it needs to happen anymore. I think computers have made it to that point, where they're just a useful thing that not everybody needs to know what goes on inside."

Long-time Slashdot reader theodp also flagged van Rossum's remarks that "there are certain introductions to programming that are fun for kids to do, but they're not fun for all kids, and I don't think I would want to make it a mandatory part of the curriculum."
Christmas Cheer

2019 Sees More Geeky Advent Calendars (blogg.bekk.no) 12

It's the first day of December, which means the return of an annual geek tradition: the computer programming advent calendars!

An anonymous reader delivers this update: It's the very first year for the Raku Advent Calendar (using the language formerly known as Perl 6).

Meanwhile, Perl 5 still has its own separate advent calendar. Amsterdam-based Perl programmer Andrew Shitov is also writing a special "Language a Day" advent calendar in which he'll cover the basics of an entirely different programming language each day. And the Go language site Gopher Academy has also launched their 7th annual advent calendar.

The 24 Ways site is also promising "an advent calendar for web geeks," offering "a daily dose of web design and development goodness to bring you all a little Christmas cheer."

And each day until Christmas the Advent of Code site will offer "small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other." (Their Day One puzzle explains this year's premise. "Santa has become stranded at the edge of the Solar System while delivering presents to other planets....!")

There's also one particularly ambitious advent calendar from closer to the north pole. The Norwegian design/technology/strategy consulting firm Bekk is attempting 12 different geeky Christmas calendars, each running for 24 days (for a total of 288 articles).

And each one is hosted at a .christmas top-level domain
Programming

What Tech Skills Do Employers Want? SQL, Java, Python, and AWS (ieee.org) 121

"What tech skills do U.S. employers want? Researchers at job search site Indeed took a deep dive into its database to answer that question," reports IEEE Spectrum: [A]t least for now, expertise in SQL came out on top of the list of most highly sought after skills, followed by Java. Python and Amazon Web Services (AWS) are coming on fast, and, should trends continue, may take over the lead in the next year or two...

Indeed's team considered U.S. English-language jobs posted on the site between September 2014 and September 2019; those postings encompassed 571 tech skills. Over that period, Docker, the enterprise container platform, sits at number 20 on the list today, but that is the result of a dramatic climb over that five-year period. Demand for proficiency in that platform-as-a-service grew more than 4000 percent, from a barely registering share of 0.1 percent of job post mentions in 2014 to 5.1 percent today. Azure jumped more than 1000 percent during that period, from 0.6 percent to 6.9 percent; and the general category of machine learning climbed 439 percent, closely followed by AWS at 418 percent.

Indeed's researchers note that the big jumps in demand for engineers skilled in Python stems from the boom in data scientist and engineer jobs, which disproportionately use Python.

"Python" has overtaken "Linux" in just the last two years, while in the same period "AWS" overtook C++, C, C# and .net.
Education

Ask Slashdot: How Do You Teach Inventing To Kids? 137

dryriver writes: Everybody seems to think these days that kids desperately need to learn how to code when they turn six years old. But this ignores a glaring fact -- the biggest shortage in the future labor market is not people who can code competently in Python, Java or C++, it is people who can actually discover or invent completely new and better ways of doing things, whether this is in CS, Physics, Chemistry, Biology or other fields. If you look at the history of great inventors, the last truly gifted, driven and prolific non-corporate inventor is widely regarded to be Nikola Tesla, who had around 700 patents to his name by the time he died. After Tesla, most new products, techniques and inventions have come out of corporate, government or similar structures, not from a good old-fashioned, dedicated, driven, independent-minded, one-person inventor who feverishly dreams up new things and new possibilities and works for the betterment of humanity.

How do you teach inventing to kids? By teaching them the methods of Genrikh Altshuller, for example. Seriously, does teaching five to seven year olds 50-year-old CS/coding concepts and techniques do more for society than teaching kids to rebel against convention, think outside the box, turn convention upside down and beat their own path towards solving a thorny problem? Why does society want to create an army of code monkeys versus an army of kids who learn how to invent new things from a young age? Or don't we want little Nikola Teslas in the 21st Century, because that creates "uncertainty" and "risk to established ways of doing things?"
Google

Supreme Court Will Hear Long-Running Google and Oracle Copyright Lawsuit (cnbc.com) 60

An anonymous reader quotes a report from CNBC: The Supreme Court said on Friday that it will hear a dispute between tech giants Oracle and Google in a blockbuster case that could lead to billions of dollars in fines and shape copyright law in the internet era. The case concerns 11,500 lines of code that Google was accused of copying from Oracle's Java programming language. Google deployed the code in Android, now the most popular mobile operating system in the world. Oracle sued Google in 2010 alleging that the use of its code in Android violated copyright law.

Google won two victories in the lower courts but ultimately lost on appeal before the U.S. Court of Appeals for the Federal Circuit, which ruled last year for Oracle. Oracle has previously said it is entitled to $9 billion in damages, though no official penalty has been set. Java was developed by Sun Microsystems, which Oracle purchased in a deal valued at $7.4 billion that was completed in 2010. Underlying the legal issues in the case is a technical dispute over the nature of the code that Google used. Google has said that the code was essentially functional -- akin to copying the placement of keys on a QWERTY keyboard. Oracle maintains that the code, part of Java's application programming interface, or API, is a creative product, "like the chapter headings and topic sentences of an elaborate literary work." A number of high-profile tech firms urged the top court to take the case in order to side with Google.

Programming

Python Finally Overtakes Java on GitHub (zdnet.com) 61

"The hit programming language Python has climbed over once-dominant Java to become the second most popular language on Microsoft-owned open-source code-sharing site GitHub," reports ZDNet: Python now outranks Java based on the number of repository contributors, and by that metric Python is now second only to JavaScript, which has been in top spot since 2014, according to GitHub's 'State of the Octoverse' report for 2019...

Another interesting aspect of GitHub's report is its ranking of fastest-growing languages. Google's Dart programming language and Flutter, for building UIs for iOS and Android apps, are getting major traction with developers on GitHub. Dart was the fastest-growing language between 2018 and 2019, with usage up a massive 532%. It was followed by the Mozilla-developed Rust, which grew a respectable 235%. Microsoft is experimenting with Rust in its Windows code base because it was designed to address memory-related security bugs -- the dominant flaw-type in Microsoft software over the past decade.

Last year Kotlin, the Google-endorsed programming language for Android app development, was the fastest-growing language on GitHub. It's not a top-10 language yet, but it still grew 182% over the year. Microsoft-backed TypeScript, its superset of JavaScript, is also growing fast, up 161% over the past year as more developers use it to grapple with large-scale JavaScript apps.

Other languages making up the top 10 fastest-growing category are HCL, PowerShell, Apex, Python, Assembly, and Go.

Bitcoin

Share of Cryptocurrency Jobs Grew 1,457% In 4 Years (venturebeat.com) 25

The share of cryptocurrency jobs per million has risen 1,457% over the past four years, according to a study by job site Indeed.com. VentureBeat reports: Indeed analyzed millions of job postings on Indeed.com to unpack how Bitcoin, cryptocurrency, and blockchain trends have affected the job market. Searches for Bitcoin, blockchain, and cryptocurrency roles are going down -- yet employer demand has skyrocketed. According to Indeed, in the four-year period between September 2015 and September 2019, the share of these jobs per million grew by 1,457%. In that same time period, the share of searches per million increased by 469%.

In the past year, the share of cryptocurrency job postings per million on Indeed.com has increased by 26%, while the share of searches per million for jobs has decreased by 53%. Bitcoin's volatility seems to correlate with job seeker interest, and the change in Bitcoin price this year might be why job searches have declined. Employers, however, are doubling down on the technology, which uses decentralized ledgers to produce secure and transparent transactions.
The report says that if you want a better chance at getting a job in this field you should be a programmer familiar with basic cryptography, P2P networks, and a language like C++, Java, Python, or JavaScript (along with certain soft crypto skills). To stand out, you should learn new blockchain development languages, like Hyperledger, Bitcoin Script, Ethereum's Solidity, the Ripple protocol, or even languages currently in development -- like Rholang.

The top hirers are as follows: Deloitte, IBM, Accenture, Cisco, Collins Aerospace, Ernst & Young, Coinbase, Overstock, Ripple, Verizon, Circle, Kraken, ConsenSys, JP Morgan Chase, and Signature Bank.
Chrome

Chrome Tries APIs That Allow Changing A User's Files, Receiving SMS Verification Texts (androidpolice.com) 68

"Web pages have never been able to directly access your computer's (or phone's) file system, unless there was a plugin like Java or ActiveX involved somewhere," reports Android Police.

The new Native File System API in Chrome 78 changes that... Here's how the API works: A web page can bring up a file picker dialog, just like you would see when clicking an Upload button on any web site. One file, a group of files, or an entire folder can be selected (it's up to the web page). The page can later save changes to those files, if it wants.

Before you start freaking out that web sites can now alter your files, there are a lot of security precautions built into this already, and the Chrome team will likely add more before the feature is ready for widespread use. Sites can only see the files you specifically select, they can only save changes back to those files if granted permission, an indicator is added to the address bar if a site has file permissions (on the desktop, anyway), and right now the permission only stays granted until the site is closed.

I can't wait to see what gets done with this functionality. We could get online code editors that can actually work with several local files at once, or maybe Google Docs could edit Word files directly on your PC without uploading/converting them first.

The article also describes one possible application from Chrome's SMS Receiver API (currently in "Origin Trial" status): Many apps and services ask you to verify your phone number by sending a code via SMS. In most cases, you have to leave the app, open the messaging app, copy the code, return to the original app, and paste the code. Google just added an API for Android apps that can automate this process, and now a similar feature is in the works for Chrome.
Microsoft

Microsoft Announces It's Ready to Contribute to OpenJDK (jaxenter.com) 62

"In a message to the OpenJDK community, Bruno Borges announced that Microsoft has now formally signed the Oracle Contributor Agreement and has been welcomed to the Java community," reports JAXenter: He went on to reaffirm Microsoft's commitment to Java and that the team is looking forward to giving something back to the Java community. However, the team will not just barge in with a heavy hand, but will start with smaller bug fixes and the like so they can learn how to be "good citizens within OpenJDK."

Borges, himself a former Oracle developer, is Principal Product Manager for Java at Microsoft. He presents Martijn Verburg as the Java engineering team lead who will be working together along with other partners in the Java ecosystem. Verburg is also CEO of jClarity, a leading AdoptOpenJDK contributor acquired by Microsoft in August this year, so presumably he will stay true to form and continue to contribute to the Java world, only now with Microsoft at his back...

Microsoft's acquisition of jClarity was just the latest in their efforts to gain a foothold in the Java community. There are many Java developers and Java champions who now practice their trade under Microsoft's banner... At JAX London a few weeks ago, Program Chair Sebastian Meyen opened the conference by giving a speech in which he said "Microsoft is now a Java shop". He sees this as a great development, as "it's always good when industry giants stand behind Java."

Businesses

Medium Investigates The Secret Supply Chain Behind AmazonBasics (medium.com) 100

"I heard the 'pop!' from my living room as a brand-new pack of Amazon batteries spontaneously exploded on the kitchen counter, oozing a gritty black substance in fits and spurts," reports the staff writer for Medium's new tech site, OneZero. But that was just the beginning of a larger mystery, according to their article (shared by Slashdot reader peterthegreat321): The small, unassuming item is one of Amazon's most popular "in-house" products sold under the AmazonBasics label. With nearly 20,000 customer reviews, its popularity dwarfs that of most other AmazonBasics items, which include electronics, homewares, and random odds and ends. The batteries are also highly rated -- had I received a defective set? I scoured the comments page for the alkaline battery for reviews containing the word "explode," revealing dozens of experiences like mine. One person said the batteries had burst in their wife's breast pump. Others had toys and appliances ruined by leaky fluid. Some customers blamed this on alleged Chinese manufacturing, but Amazon vaguely claims in the product's description that they are "made in Indonesia using Japanese technology."

Over the past month, I have tried to uncover the hidden life cycle of this simple AmazonBasics battery. Amazon is fiercely secretive about its corporate footprint and masks its operations through a discreet network of outsourcing, making its supply chain hard to unravel. Its AA battery is no different. The product is indeed made in Indonesia, but not by Amazon, I learned. The company buys the batteries from a supplier and reskins them as its own, much like Trader Joe's and its eponymous food brand. Amazon has never voluntarily divulged the sources of AmazonBasics items, but it confirmed OneZero's reporting on where its AA batteries come from.

Though I discovered where the batteries were made, I was unable to locate the source of their materials, for example. The difficulty in understanding the supply chain of even a simple component shows how Amazon's operations are deliberately designed to be a black box. This secrecy allows the commercial titan to be ruthlessly competitive, delivering cheaper items faster than rival stores. But it also makes it harder for consumers who wonder whether their purchases are ethically or sustainably sourced to even begin finding answers. Beyond obscuring why merchandise might be defective -- or explosive, in my case -- it hinders those of us who just want to know: Where does it all begin?

The article eventually determines that Tokyo-based Fujitsu is a "covert supplier" for AmazonBasics, operating out of "a plain white building in West Java, Indonesia." Medium's reporter also notes that Fujitsu's sustainability report "shows that its Indonesian operations are among the dirtiest, ranking the highest on waste production..."

But unfortunately, "I never discovered why my AmazonBasics batteries exploded."
Java

New in Java 13: Text Blocks (oracle.com) 57

The October issue of Oracle's Java magazine includes an article reminding us that Java 13 includes a long-awaited new features: text blocks. With text blocks, Java 13 is making it easier for you to work with multiline string literals. You no longer need to escape the special characters in string literals or use concatenation operators for values that span multiple lines. You can also control how to format your strings. Text blocks -- Java's term for multiline strings -- immensely improve the readability of your code...

A text block is defined using three double quotes (""") as the opening and closing delimiters. The opening delimiter can be followed by zero or more white spaces and a line terminator. A text block value begins after this line terminator.

Oracle

Should JavaScript Be Renamed? (kieranpotts.com) 170

Software engineer Kieran Potts asks: does JavaScript need to be renamed? There's no doubt there are problems with JavaScript's branding...

- Correctly, "JavaScript" refers to a subset of ECMAScript specified by Mozilla, but the word is used interchangeably to refer to multiple different ECMAScript supersets, depending on context.

- JavaScript is a trademark of Oracle Corporation, which doesn't fit comfortably with the language's position as a central component of the web platform, which is meant to be built entirely from open technologies and standards.

- There isn't even an official logo for JavaScript, let alone a cute mascot like Go's gopher or PHP's elephant.

- And famously, JavaScript is unrelated to Java. This has confused the hell out of non-technical managers and recruiters for decades.

The article also suggests "a standard convention" to identify the runtime's host system (for example, "WebJS" or "ServerJS").

But in response to the question of rebranding JavaScript, "the most common, knee jerk reaction was a quick guffaw and an exclaimed 'no!'" notes tech columnist Mike Melanson, "while others offered that the simple contraction to JS would suffice."
Programming

Study Identifies the 'Top 7 Programming Languages That Employers Really Want' (dice.com) 118

The senior editor of Dice Insights writes: Which programming languages are most in-demand by employers? That's an excellent (and vital) question for developers out there, especially those who want to leverage their skills to land a particularly high-paying job. Fortunately, a new list gives us a pretty accurate rundown, and it's filled with the usual suspects: SQL, Java, JavaScript, Python, and so on.

The data comes from Burning Glass, which compiles and analyzes millions of job postings, so we can treat it as pretty comprehensive (although, as with any massive dataset, there's always the potential for errors)... The top-ranked presence of SQL shouldn't come as a shocker to anyone: although the language is older than many of the technologists who utilize it (it was created in 1974), it's still very much a key standardized language for relational databases (it's ranked eighth on the TIOBE Index, a popular but controversial ranking of the world's most popular programming languages). Businesses always need databases; and they're clearly hungry for technologists who can set up and manage them.

A recent study by IEEE Spectrum also noted that employers want developers skilled in Python, Java, C, C++, and JavaScript, so these languages' presence on the Burning Glass list should come as no surprise, either. All of these programming languages enjoy massive install bases across a variety of platforms, including mobile and the web; they're also taught widely in schools and bootcamps, ensuring that there's a steady pipeline of newly minted technologists who know them. In addition to building new stuff, businesses need to maintain legacy code written in these languages.

Sun Microsystems

When Sun Microsystems' Founders and Former Employees Hold a Reunion (infoworld.com) 36

Last week Infoworld reported on a reunion of more than 1,000 former employees of Sun Microsystems including all four founders of the company -- Andreas Bechtolsheim, Vinod Khosla, Scott McNealy, and Bill Joy -- at just their second reunion since the 2010 Oracle acquisition. Prior to the formal festivities, the company founders met with a small group of press persons. Pondering recent developments in computing, Bill Joy, who is now concentrating on climate change solutions, recalled that Sun tried to do natural language processing, but the hardware was not fast enough. Regarding the emergence of the iPhone, Joy said the advent of mobility and data networks has been transformational for society. He noted that Sun had that kind of vision with Java ME, with Sun trying to do programmable smartphones. "But the hardware was just really nascent at the time," Joy said. Machine learning, though, will be as transformational as the smartphone, he added.

McNealy emphasized Sun's willingness to share technology, such as the Network File System (NFS), which helped to bring about the open source software movement now prevalent today. "We didn't invent open source but we [made it] happen. We were the leader of that parade." Asked if Sun should have moved from Sparc Risc processors and Solaris Unix to Intel processors and Linux, McNealy said he did not want to talk about mistakes he had made as Sun CEO but such a switch was not what Sun should have done....

Among those proudest of Sun's achievements was Sun founder and CEO Scott McNealy, who, taking the stage, had some sharp words for Facebook, which now occupies one of Sun's former Silicon Valley campuses, without mentioning Facebook by name. "I remember some company moved into one of our old headquarters buildings," McNealy said. "And the CEO said, we're going to leave the [Sun Microsystems] logos up because we want everybody in our company to remember what can happen to you if you don't pay attention. This company could do well to do one-one-hundredth of what we did."

Java

Java EE 'Goes All In' on Open Source with Jakarta EE 8 (zdnet.com) 54

An anonymous reader quotes ZDNet: While Sun open-sourced some of Java as long ago as November 2006, actually using Java in an open-source way was... troublesome. Just ask Google about Android and Java. But for Java in the enterprise things have changed. On September 10, The Eclipse Foundation announced the full open-source release of the Jakarta EE 8 Full Platform and Web Profile specifications and related Technology Compatibility Kits (TCKs).

This comes after Oracle let go of most of Java Enterprise Edition's (JEE) intellectual property. Oracle retains Java's trademarks though -- thus Java EE's naming convention has been changed to Jakarta EE. But for practical programming and production purposes Jakarta EE 8 is the next generation of enterprise Java.... Jakarta EE 8 also includes the same APIs and Javadoc using the same programming model Java developers have always used. The Jakarta EE 8 TCKs are based on and fully compatible with Java EE 8 TCKs. All of this means enterprise customers will be able to migrate to Jakarta EE 8 without any changes to Java EE 8 applications.

Eclipse hasn't been doing this in a vacuum. Fujitsu, IBM, Oracle, Payara, Red Hat, Tomitribe, and other members of what was once the Java community have been working on Jakarta EE... All of the Jakarta EE Working Group vendors intend to certify their Java EE 8 compatible implementations as Jakarta EE 8 compatible. In other words, Jakarta is the future for Java EE.

Oracle is now working on delivering a Java EE 8 and Jakarta EE 8 compatible implementation of their WebLogic Server.

The Eclipse Foundation says Jakarta EE 8's release "provides a new baseline for the evolution and innovation of enterprise Java technologies under an open, vendor-neutral, community-driven process."
AI

Stack Overflow Touts New Programming Solutions Tool That Mines Crowd Knowledge (stackoverflow.blog) 40

Stack Overflow shares a new tool from a team of researchers that "takes the description of a programming task as a query and then provides relevant, comprehensive programming solutions containing both code snippets and their succinct explanations" -- the Crowd Knowledge Answer Generator (or CROKAGE): In order to reduce the gap between the queries and solutions, the team trained a word-embedding model with FastText, using millions of Q&A threads from Stack Overflow as the training corpus. CROKAGE also expanded the natural language query (task description) to include unique open source software library and function terms, carefully mined from Stack Overflow.

The team of researchers combined four weighted factors to rank the candidate answers... In particular, they collected the programming functions that potentially implement the target programming task (the query), and then promoted the candidate answers containing such functions. They hypothesized that an answer containing a code snippet that uses the relevant functions and is complemented with a succinct explanation is a strong candidate for a solution. To ensure that the written explanation was succinct and valuable, the team made use of natural language processing on the answers, ranking them most relevant by the four weighted factors. They selected programming solutions containing both code snippets and code explanations, unlike earlier studies. The team also discarded trivial sentences from the explanations...

The team analyzed the results of 48 programming queries processed by CROKAGE. The results outperformed six baselines, including the state-of-art research tool, BIKER. Furthermore, the team surveyed 29 developers across 24 coding queries. Their responses confirm that CROKAGE produces better results than that of the state-of-art tool in terms of relevance of the suggested code examples, benefit of the code explanations, and the overall solution quality (code + explanation).

The tool is still being refined, but it's "experimentally available" -- although "It's limited to Java queries for now, but the creators hope to have an expanded version open to the public soon."

It will probably be more useful than Stack Roboflow, a site that uses a neural network to synthesize fake Stack Overflow questions.
Education

How Should Schools Grade Unexpected-But-Correct Answers On Coding Tests? 177

There can be more than one correct answer for academic tests of programming ability, writes long-time Slashdot reader theodp: Take the first of the Free-Response Questions in this year's AP CS A exam, which asked 70,000 college-bound students to "Write the static method numberOfLeapYears, which returns the number of leap years between year1 and year2." The correct answer, according to the CollegeBoard's 2019 Scoring Guidelines, entails iterating over the range of years and invoking a provided helper method called isLeapYear for each year.

Which does work, of course, but what if a student instead took an Excel-like approach to the same problem that consists of a (hopefully correct!) single formula with no iteration or isLeapYear helper function? Would that be a worse — or better -- example of computational thinking than the endorsed AP CS A Java-based solution? (Here's a 7-minute AP Conference discussion of how to correctly grade this problem)?

So, how have you seen schools and companies deal with unexpected-but-correct approaches to coding test questions?
Programming

Dropbox Engineer Explains Why the Company Stopped Sharing Code Between iOS and Android And Started Using Native Languages on Each Platform (dropbox.com) 63

Eyal Guthmann, a software engineer at cloud storage service Dropbox, writes: Until very recently, Dropbox had a technical strategy on mobile of sharing code between iOS and Android via C++. The idea behind this strategy was simple -- write the code once in C++ instead of twice in Java and Objective C. We adopted this C++ strategy back in 2013, when our mobile engineering team was relatively small and needed to support a fast growing mobile roadmap. We needed to find a way to leverage this small team to quickly ship lots of code on both Android and iOS. We have now completely backed off from this strategy in favor of using each platforms' native languages (primarily Swift and Kotlin, which didn't exist when we started out). This decision was due to the (not so) hidden cost associated with code sharing.

Here are some of the things we learned as a company on what it costs to effectively share code. And they all stem from the same basic issue: By writing code in a non-standard fashion, we took on overhead that we would have not had to worry about had we stayed with the widely used platform defaults. This overhead ended up being more expensive than just writing the code twice.

Slashdot Top Deals