PHP

Ask Slashdot: Should I Ditch PHP? 341

Long-time Slashdot reader Qbertino does PHP for a living, but says he's growing "increasingly frustrated with the ignorant and clueless in the vincinity of PHP." Crappy code and baaaaad application setups is one thing, but people refusing to fix them or simply not even understanding the broader implications of bad applications or attempting SEO with gadgets while refusing to fix 3.5 MB-per-pagecall are just minor tidbits in a history of increasingly unnerving run-ins with knuckledragers in the "web agency" camp...

Will I leave the larger part of this backwards stuff behind if I move to another server-side programming language such as Java or Kotlin for professional work in the broader web area? Do I have a chance to do quality work on quality projects using PHP, or are those slim compare to other programming languages? In short, should I ditch PHP?

"I think .NET is a much cleaner language to work in with Microsoft's excellent Visual Studio IDE and debugger," argues Slashdot reader Agret , adding "there are many large projects in my city hiring .NET developers and being a strongly typed language the code quality is generally better than PHP."

But what's been your experience? And would a frustrated developer find more quality projects by ditching PHP?
Microsoft

Bing Now Provides Exact Snippets of Code for Developers' Queries (searchenginejournal.com) 84

"Bing has launched a new intelligent search feature which provides the exact piece of code a developer is looking for," writes Search Engine Journal. An anonymous reader quotes their report: The code snippet will appear right on the search results page itself, which means users will not have to skim through long threads and articles to find the one thing they're looking for. Bing calls this new feature a "Code Sample Answer" and says it's designed to help save developers' time. "Many of us are developers too, and we thought: what if Bing were intelligent enough to do this for us? What if it could save users' time by automatically finding the exact piece of code containing the answer to the question? That is how Code Sample Answer was born..."

A Code Sample Answer will trigger only when Bing intelligently detects the coding intent with high confidence. "To achieve this level of precision for query intent detection, Bing's natural language processing pipelines for developers leverages patterns found in training data from developer queries collected over the years containing commonly used terms and text structure typical for coding queries. The system also leverages a multitude of click signals to improve the precision even further"... [I]t also covers other tools used by developers. For example, a Code Sample Answer can be triggered when searching for git commands and their syntax.

Bing extracts "the best matched code samples from popular, authoritative and well moderated sites like Stackoverflow, Github, W3Schools, MSDN, Tutorialpoints, etc. taking into account such aspects as fidelity of API and programming language match, counts of up/down-votes, completeness of the solution and more."

JAXenter.com notes they obtained similar results using the privacy-friendly search engine DuckDuckGo, and ultimately asks whether this functionality could affect the search habits of developers. "Is this new feature enough to make Bing a viable search engine tool for programmers or will Google be the go-to for hunting down source code?"
Python

Is Python the Future of Programming? (economist.com) 300

The Economist argues that Guido Van Rossum resembled the reluctant Messiah in Monty Python's Life of Brian. An anonymous reader quotes their report: "I certainly didn't set out to create a language that was intended for mass consumption," he explains. But in the past 12 months Google users in America have searched for Python more often than for Kim Kardashian, a reality-TV star. The rate of queries has trebled since 2010, while inquiries after other programming languages have been flat or declining. The language's popularity has grown not merely among professional developers -- nearly 40% of whom use it, with a further 25% wishing to do so, according to Stack Overflow, a programming forum -- but also with ordinary folk. Codecademy, a website that has taught 45 million novices how to use various languages, says that by far the biggest increase in demand is from those wishing to learn Python. It is thus bringing coding to the fingertips of those once baffled by the subject. Pythonistas, as aficionados are known, have helped by adding more than 145,000 packages to the Cheese Shop, covering everything from astronomy to game development....

Python was already the most popular introductory language at American universities in 2014, but the teaching of it is generally limited to those studying science, technology, engineering and mathematics. A more radical proposal is to catch 'em young by offering computer science to all, and in primary schools. Hadi Partovi, the boss of Code.org, a charity, notes that 40% of American schools now offer such lessons, up from 10% in 2013. Around two-thirds of 10- to 12-year-olds have an account on Code.org's website. Perhaps unnerved by a future filled with automated jobs, 90% of American parents want their children to study computer science.

"The CIA has employed Python for hacking, Pixar for producing films, Google for crawling web pages and Spotify for recommending songs," notes the Economist.

Though Van Rossum was Python's Benevolent Dictator For Life, "I'm uncomfortable with that fame," he tells the magazine. "Sometimes I feel like everything I say or do is seen as a very powerful force."
Power

D-Wave's Quantum Computer Successfully Models a Quantum System (arstechnica.com) 60

An anonymous reader shares an excerpt from Ars Technica: D-Wave's hardware has always occupied a unique space on the computing landscape. It's a general-purpose computer that relies on quantum mechanical effects to perform calculations. And, while other quantum-computer makers have struggled to put more than a few dozen qubits together, D-Wave's systems have already scaled to more than 2,000 addressable bits. But the D-Wave systems don't perform calculations in the same way and, despite all those bits, haven't clearly demonstrated performance that can outpace even traditional computing hardware. But D-Wave has come out with a research paper in Science that suggests that the system can do interesting things even in its current state. The company's researchers have set it loose modeling a quantum system that closely resembles the bits used in the hardware itself, allowing them to examine quantum phase transitions. While this still isn't cutting-edge performance, it does allow researchers full control over the physical parameters of a relevant quantum system as it undergoes phase changes.
Google

Google Maps API Becomes 'More Difficult and Expensive' (govtech.com) 121

Government Technology reports: On July 16, Google Maps is going to make it more difficult and expensive to use its API, which could make custom maps that rely on the service less sustainable or even unfeasible for the people who made them... First, Google Maps is requiring all projects to have an official API key in order to work. If a user doesn't have a key, the quality of the map will likely be reduced, or it could simply stop working. Second, API keys will only work if they are attached to somebody's credit card. Google will charge that card if users exceed a certain number of API requests, which is different for different services. Google will provide users a free $200 credit toward those costs each month...

There are a couple places where the changes might have more of an impact. One is in the civic hacking space, where people often work with government data to create niche projects that aim for low costs, or are free so that as many people as possible can use them... "I think that's what scares people a little bit, it certainly scares me, this thought of having this API out there and not knowing how many people are going to use it," said Derek Eder, founder of the civic tech company DataMade. "I don't want to suddenly get a bill for $1,000."

There's at least three Open Source alternatives, and Geoawesomeness.com lists nine more.

Slashdot reader Jiri_Komarek also points out that Google's move was good news for its competitor, MapTiler. "Since Google announced the pricing change the number of our users increased by 200%," said Petr Pridal, head of the MapTiler team. "We expect more people to come as they get their first bill from Google."
Medicine

HHS Plans To Delete 20 Years of Critical Medical Guidelines Next Week (thedailybeast.com) 414

An anonymous reader quotes a report from The Daily Beast: The Trump Administration is planning to eliminate a vast trove of medical guidelines that for nearly 20 years has been a critical resource for doctors, researchers and others in the medical community. Maintained by the Agency for Healthcare Research and Quality [AHRQ], part of the Department of Health and Human Services, the database is known as the National Guideline Clearinghouse [NGC], and it's scheduled to "go dark," in the words of an official there, on July 16. "Guideline.gov was our go-to source, and there is nothing else like it in the world," King said, referring to the URL at which the database is hosted, which the agency says receives about 200,000 visitors per month. "It is a singular resource," Valerie King, a professor in the Department of Family Medicine and Director of Research at the Center for Evidence-based Policy at Oregon Health & Science University, added. [She] said the NGC is perhaps the most important repository of evidence-based research available.

Medical guidelines are best thought of as cheatsheets for the medical field, compiling the latest research in an easy-to use format. When doctors want to know when they should start insulin treatments, or how best to manage an HIV patient in unstable housing -- even something as mundane as when to start an older patient on a vitamin D supplement -- they look for the relevant guidelines. The documents are published by a myriad of professional and other organizations, and NGC has long been considered among the most comprehensive and reliable repositories in the world. AHRQ said it's looking for a partner that can carry on the work of NGC, but that effort hasn't panned out yet. Not even an archived version of the site will remain, according to an official at AHRQ.

Programming

Compromised JavaScript Package Caught Stealing npm Credentials (bleepingcomputer.com) 44

An anonymous reader shares a report: A hacker gained access to a developer's npm account earlier this week and injected malicious code into a popular JavaScript library, code that was designed to steal the npm credentials of users who utilize the poisoned package inside their projects. The JavaScript (npm) package that got compromised is called eslint-scope, a sub-module of the more famous ESLint, a JavaScript code analysis toolkit. The hack took place on the night between July 11 and 12, according to the results of a preliminary investigation posted on GitHub a few hours ago. "One of our maintainers did observe that a new npm token was generated overnight (said maintainer was asleep)," said Kevin Partington, ESLint project member. Partington believes the hacker used the newly-generated npm token to authenticate and push a new version of the eslint-scope library on the npm repository of JavaScript packages.
Programming

Python Language Founder Steps Down (zdnet.com) 241

After almost 30 years of overseeing the development of the world's most popular language, Python, its founder and "Benevolent Dictator For Life" (BDFL), Guido van Rossum, has decided to remove himself entirely from the decision process. From a report: Van Rossum isn't leaving Python entirely. He said, "I'll still be there for a while as an ordinary core dev, and I'll still be available to mentor people -- possibly more available." It's clear from van Rossum's note he's sick and tired of running the organization. He wrote, "I don't ever want to have to fight so hard for a PEP (Python Enhancement Proposals) [PEP 572 Assignment Expressions] and find that so many people despise my decisions." In addition, van Rossum hints he's not been well. "I'm not getting younger... (I'll spare you the list of medical issues.)" So, "I'm basically giving myself a permanent vacation from being BDFL, and you all will be on your own." From the email: I am not going to appoint a successor. So what are you all going to do? Create a democracy? Anarchy? A dictatorship? A federation? I'm not worried about the day to day decisions in the issue tracker or on GitHub. Very rarely I get asked for an opinion, and usually it's not actually important. So this can just be dealt with as it has always been. At Slashdot, we had the privilege of interviewing Guido van Rossum, a Computer History Museum honoree, in 2013.
Programming

Is C++ a 'Really Terrible Language'? (gamesindustry.biz) 603

Long-time Slashdot reader slack_justyb writes, "Jonathan Blow, an independent video game developer, indicated to gamesindustry.biz that while working on a recent project he stopped and considered how miserable programming can be. After some reflection Blow came to the realization as to why. [C++ is a] 'really terrible, terrible language.'"

The main flaw with C++, in Blow's opinion, is that it's a fiendishly complex and layered ecosystem that has becoming increasingly convoluted in its effort to solve different problems; the more layers, the higher the stack, the more wobbly it becomes, and the harder it is to understand.
"Blow is the developer of two games so far -- Braid and The Witness -- and developed a new programming language known as Jai in hopes to help C++ game developers become more productive."

With Jai, Blow hopes to achieve three things: improve the quality of life for the programmer because "we shouldn't be miserable like many of us are"; simplify the systems; and increase expressive power by allowing programmers to build a large amount of functionality with a small amount of code.

Long-time Slashdot reader xx_chris calls C++ "the triumph of syntax over clarity," while in the interview Blow calls C++ 'a weird mess.' But the original submission ends with these questions. "Is Blow correct? Has C++ become a horrific mess that we should ultimately relegate to the bins of COBOL and Pascal? Are there redeeming qualities of C++ that justify the tangle it has become?

"And is Jai a solution or just yet another programming language?"
Cloud

Ask Slashdot: Why Do Popular Websites Add New Features So Sparingly? 190

dryriver writes: If you are a user of a popular professional desktop software program, it is not uncommon for that program to get anywhere from 5 to 20 major or minor new features and functions about once a year to stay desirable and competitive. But it seems that hugely popular internet-based sites and services like Instagram, Facebook, YouTube, Google Search, Gmail, Outlook, WhatsApp, Telegram and others get major new features/changes much, much slower than desktop software. Quite often you'll come across a barrage of breathless news articles that say "Popular Internet Service X will add Y feature starting from April 1st." It is often one single and very obvious feature or functionality being added that people have wanted for years, not a cluster of 5 or 10 funky new functions at the same time.

Why is this the case? How is it that desktop software with just a few hundred thousand users and no more than a few dozen coders working can add 5 to 20 major new functions in just one year, and do this year after year, but a major internet-based service with tens or hundreds of millions of users and presumably hundreds or thousands of techies working behind the curtain keeps everyone waiting three years or longer to build a much requested feature into the system, and then only rolls out that one desired feature to great fanfare as if it is a huge achievement? Is it really that much harder to code major new features into an internet/cloud service, versus coding major new features into desktop software; or is this a deliberate business model that has become popular?
Iphone

Apple's App Store Celebrates 10th Anniversary (betanews.com) 74

BrianFagioli writes: People sometimes forget that when the first-ever iPhone launched in 2007, there was no App Store. Believe it or not, Apple's smartphone was limited to the apps with which it came. In fact, Steve Jobs famously didn't want third-party apps on the iPhone at all. Ultimately, the App Store was added in 2008 despite Jobs' initial push against it. This move changed the computer industry forever.

This month, the Apple App Store reaches an impressive milestone -- its 10th Birthday. This day is important for three groups -- Apple (of course), but more importantly, consumers and developers. Apple has made billions of dollars from the App Store, but third party developers have as well -- the company has literally transformed some devs into millionaires. Consumers have benefited from high-quality applications too.

Regardless of your feelings about Apple, the world owes it a collective thank you for its App Store. It inspired other companies, such as Google with Android and Microsoft with Windows 8/10, to adopt the same app concepts. It really did change everything.

Databases

UK Launches National Dashcam Database For Snitching On Bad Drivers (cnet.com) 235

An anonymous reader quotes a report from CNET: Drivers in England and Wales now have a direct line to police for ratting on their fellow motorists, thanks to a new national dash cam database. The National Dash Cam Safety Portal, run by UK dashcam manufacturer Nextbase, lets drivers upload footage from their dashcam to a single database and send it directly to police, the BBC reports. Drivers can choose their region of England or Wales and send footage of accidents or illegal behavior on the road directly to local police, as well as sending a witness statement that can then be used in court.
Privacy

Google Allows Outside App Developers To Read People's Gmails, Says Report (thisisinsider.com) 96

According to The Wall Street Journal, hundreds of app developers have access to millions of inboxes belonging to Gmail users (Warning: source paywalled; alternative source). The developers reportedly receive access to messages from Gmail users who signed up for things like price-comparison services or automated travel-itinerary planners. Some of these companies train software to scan the email, while others enable their workers to pore over private messages. INSIDER reports: It's not news that Google and many top email providers enable outside developers to access users' inboxes. In most cases, the people who signed up for the price-comparison deals or other programs agreed to provide access to their inboxes as part of the opt-in process. In Google's case, outside developers must pass a vetting process, and as part of that, Google ensures they have an acceptable privacy agreement, The Journal reported, citing a Google representative.

What is unclear is how closely these outside developers adhere to their agreements and whether Google does anything to ensure they do, as well as whether Gmail users are fully aware that individual employees may be reading their emails, as opposed to an automated system, the report says. It's interesting to note that, judging from The Journal's story, very little indicates that Google is doing anything different from Microsoft or other top email providers. According to the newspaper, nothing in Microsoft or Yahoo's policy agreements explicitly allows people to read others' emails.

Java

Scientists Use Caffeine To Control Genes (arstechnica.com) 38

An anonymous reader quotes a report from Ars Technica: A team led by Martin Fussenegger of ETH Zurich in Basel has shown that caffeine can be used as a trigger for synthetic genetic circuitry, which can then in turn do useful things for us -- even correct or treat medical conditions. For a buzz-worthy proof of concept, the team engineered a system to treat type 2 diabetes in mice with sips of coffee, specifically Nespresso Volluto coffee. Essentially, when the animals drink the coffee (or any other caffeinated beverage), a synthetic genetic system in cells implanted in their abdomens switches on. This leads to the production of a hormone that increases insulin production and lowers blood sugar levels -- thus successfully treating their diabetes after a simple morning brew.

The system, published Tuesday in Nature Communications, is just the start, Fussenegger and his colleagues suggest enthusiastically. "We think caffeine is a promising candidate in the quest for the most suitable inducer of gene expression," they write. They note that synthetic biologists like themselves have long been in pursuit of such inducers that can jolt artificial genetics. But earlier options had problems. These included antibiotics that can spur drug-resistance in bacteria and food additives that can have side effects. Caffeine, on the other hand, is non-toxic, cheap to produce, and only present in specific beverages, such as coffee and tea, they write. It's also wildly popular, with more than two billion cups of coffee poured each day worldwide.

Security

One Misplaced Line of JavaScript Caused the Ticketmaster Breach (itwire.com) 44

An anonymous reader quotes ITWire: Well-known British security researcher Kevin Beaumont says the breach of the British operations of American multinational ticket sales and distribution company Ticketmaster, that has led to the possible leak of tens of thousands of credit card details, was caused by the incorrect placement of a single line of code... Beaumont said Inbenta was providing a chat bot for website developers "by providing a single line of HTML which calls a JavaScript from Inbenta's Web server...."

He pointed out that while Inbenta had provided Ticketmaster a customised JavaScript one-liner, the ticketing company had placed this chatbot code on its payment processing website without informing Inbenta it had done so. "This means that Inbenta's webserver was placed in the middle of all Ticketmaster credit card transactions, with the ability to execute JavaScript code in customer browsers," Beaumont said. This code had been altered by some malicious person back in February and the problems began at that point, he said.

Beaumont warns businesses to be cautious with third-party JavaScript code in sensitive processes. "Check your supply chain. Because attackers are."

And he also highlights how anti-virus tools started flagging the the script months before Ticketmaster announced the breach. "I can see the Javascript file being uploaded to a variety of threat intelligence tools from April through just before the breach announcement, so clearly somebody was looking into it."
Firefox

'Have I Been Pwned' Is Being Integrated Into Firefox, 1Password (troyhunt.com) 111

Troy Hunt, web security expert and creator of the website Have I Been Pwned (HIBP), wrote a blog post announcing his partnerships with Firefox and 1Password. For those unfamiliar with the site, Have I Been Pwned allows you to search across multiple data breaches to see if your email address has been compromised. The service is especially handy now that data breaches are becoming a daily occurrence. Hunt writes: Last November, there was much press about Mozilla integrating HIBP into Firefox. I was a bit surprised at the time as it was nothing more than their Breach Alerts feature which simply highlighted if the site being visited had previously been in a data breach (it draws this from the freely accessible breach API on HIBP). But the press picked up on some signals which indicated that in the long term, we had bigger plans than that and the whole thing got a heap of very positive attention. I ended up fielding a heap of media calls just on that one little feature - people loved the idea of HIBP in Firefox, even in a very simple form. As it turns out, we had much bigger plans and that's what I'm sharing here today. Over the coming weeks, Mozilla will begin trialling integration between HIBP and Firefox to make breach data searchable via a new tool called "Firefox Monitor." Here's what Hunt has to say about 1Password: As of now, you can search HIBP from directly within 1Password via the Watchtower feature in the web version of the product. This helps Watchtower become "mission control" for accounts and introduces the "Breach Report" feature. If you're a 1Password user you can use this feature right now, just head on over to the 1Password login page.
Java

Oracle Plans To Switch Businesses to Subscriptions for Java SE (infoworld.com) 217

A reminder for commenters: non-commercial use of Java remains free. An anonymous reader quotes InfoWorld: Oracle has revamped its commercial support program for Java SE (Standard Edition), opting for a subscription model instead of one that has had businesses paying for a one-time perpetual license plus an annual support fee... It is required for Java SE 8, and includes support for Java SE 7. (As of January 2019, Oracle will require a subscription for businesses to continue getting updates to Java SE 8.)

The price is $25 per month per processor for servers and cloud instances, with volume discounts available. For PCs, the price starts at $2.50 per month per user, again with volume discounts. One-, two-, and three-year subscriptions are available... The previous pricing for the Java SE Advanced program cost $5,000 for a license for each server processor plus a $1,100 annual support fee per server processor, as well as $110 one-time license fee per named user and a $22 annual support fee per named user (each processor has a ten-user minimum)...

If users do not renew a subscription, they lose rights to any commercial software downloaded during the subscription. Access to Oracle Premier Support also ends. Oracle recommends that those choosing not to renew transition to OpenJDK binaries from the company, offered under the GPL, before their subscription ends. Doing so will let users keep running applications uninterrupted.

Oracle's senior director of product management stresses that the company is "working to make the Oracle JDK and OpenJDK builds from Oracle interchangeable -- targeting developers and organisations that do not want commercial support or enterprise management tools."
Software

Valve's Knuckles EV2 Controller Will Let You Squeeze Things In VR (engadget.com) 33

Valve's "Knuckles" controllers for VR, first introduced in 2016, are getting upgraded. According to Engadget, Valve is "sending game makers another version, the EV2, that has revamped buttons, straps and a slew of sensors that essentially translate finger motion and pressure to let you touch, grab and squeeze objects inside games." From the report: Some of the EV2's changes are evident: The old Steam Controller-style touchpad that dominated the controller's top has been shrunken to an oval 'track button' that measures touch and force. That's flanked by traditional inputs: A joystick (by developer demand, Valve noted in a blog post) and standard circular buttons. The strap is adjustable for different hand sizes and pulls tight to let players let go of the controller completely without dropping it -- which could be key for the pressure inputs.

While last year's model had touch inputs tracking each finger in the 'grip' area, the EV2 introduces pressure sensors that measure how much force the wielder is using. Obviously, this has implications for VR developers who want players to grip or squeeze objects in the world, but as Valve's blog post points out, combining those with the touch sensors tells games when players let go of the grips -- like, say, when they're throwing things in-game. Lastly, the battery life has been extended to last six hours.

Databases

GitHub, Medium Remove Public ICE Employee Data Repository (obsceneworks.com) 707

owenferguson shares a report from Obscene Works: Medium.com and GitHub have today quashed the release of a set of data comprising of all the ICE employees who openly list themselves on LinkedIn.com. All the data released was gathered from publicly listed LinkedIn profiles. The data was assembled by Sam Lavigne of http://lav.io/ and was published as a repository on GitHub, and announced via an article on Medium.com.
Operating Systems

Linux 4.18 Preparing Many New Features While Dropping 100k+ Lines of Code (phoronix.com) 105

An anonymous reader writes: Linux 4.18 development is going strong with recent 4.18-rc1 release. This kernel cycle has dropped 107,210 lines of code so far but Linux 4.18 is adding many new features. The kernel is coming in lighter as a result of the LustreFS code being removed and other code cleanups. On the feature front, Phoronix reports, "ew AMDGPU support improvements, mainlining of the V3D DRM driver, initial open-source work on NVIDIA Volta GV100 hardware, merging of the Valve Steam Controller kernel driver, merging of the BPFILTER framework, ARM Spectre mitigation work, Speck file-system encryption support, removal of the Lustre file-system, the exciting restartable sequences system call was merged, the new DM writecache target, and much more."

Slashdot Top Deals