Get HideMyAss! VPN, PC Mag's Top 10 VPNs of 2016 for 55% off for a Limited Time ×
Programming

Ask Slashdot: When Do You Include 'Unnecessary' Code? (sas.com) 79

"For more than 20 years I've been putting semicolons at the end of programming statements in SAS, C/C++, and Java/Javascript," writes Rick Wicklin, a researcher in computational statistics at SAS. "But lately I've been working in a computer language that does not require semicolons. Nevertheless... I catch myself typing unnecessary semicolons out of habit," he writes, while at other times "I include optional statements in my programs for clarity, readability, or to practice defensive programming." While Wicklin's post is geared towards SAS programming, Slashdot reader theodp writes that the question is a language-agnostic one: ...when to include technically-unnecessary code -- e.g., variable declarations, superfluous punctuation, block constructs for single statements, values for optional parameters that are the defaults, debugging/validation statements, non-critical error handling, explicitly destroying objects that would otherwise be deleted on exit, labeled NEXT statements, full qualification of objects/methods, unneeded code from templates...
He's wondering if other Slashdot readers have trouble tolerating their co-workers' unnecessary codes choices (which he demonstrates with a video clip from Silicon Valley). So leave your answers in the comments. When do you do include 'unnecessary' code in your programs -- and why?
Classic Games (Games)

Sega Announces Two New Sonic Games That Seek To Recapture The Glory Days (gamespot.com) 26

An anonymous reader writes: In celebration of Sonic the Hedgehog's 25th anniversary, Sega has announced two new Sonic games at Comic-Con in San Diego. The first game is called Sonic Mania and it's a 2D platformer that features visuals and gameplay reminiscent of the classic Genesis games. "It revamps zones and acts from Sonic the Hedgehog, Sonic the Hedgehog 2, Sonic CD, Sonic the Hedgehog 3, and Sonic and Knuckles, in addition to introducing new ones into the fold," writes Mat Paget from GameSpot. The second game has no title [besides "Project Sonic 2017"], but it does have a holiday 2017 release date for PS4, Xbox One, and Nintendo NX consoles. It reportedly features both classic and modern versions of Sonic, similar to 2011's Sonic Generations. Sega made two additional announcements. "Mobile game Sonic Dash has passed 200 million downloads and will receive a special in-game event that adds the Green Hill Zone and Classic Sonic as a playable character," reports GameSpot. "The event only lasts a week, but players can unlock both the classic level and character for use after the event." The second additional announcement is that the animated Sonic Boom series will be renewed for a second season. "Sonic Mania was born out of our fans' love of the classic Sonic 2D platform games,â said Sonic Team head Takashi Iizuka. "This type of collaboration is a first for Sega and we hope everyone will be both surprised and delighted by this title. Sonic Mania has been a passion project for the entire team and we look forward to sharing more details about it later this year. Having the game actually playable at the event itself tonight was testament to the dedication of the team behind it.â
Movies

Man Builds $1.5 Million Star Trek-Themed Home Theater (cepro.com) 158

CIStud writes: This $1.5 million "Star Trek" home theater is the envy of every geek on the planet. The theater is a reconstruction of the bridge of the Starship Enterprise from "Star Trek: Next Generation" and also includes $1 million worth of memorabilia from the classic sci-fi TV show. The home theater was created by financier Marc Bell with the help from Jay Miller of Boca Raton-based Acoustic Innovations. The two started working on the home cinema in 2002 -- before construction of Bell's house even began -- and it took them four years to complete. CEPro reports: "A D-Box controller manipulates hydraulics installed beneath the floorboards, meaning the entire room shakes when anything loud happens on screen. The room also includes a JBL Synthesis sound system, which at the time of installation was only used in commercial theaters. The audio system is currently being upgraded to Dolby Atmos specifications and Bell plans to install a 4K projector. A big movie fan, Bell has had over 3,500 films digitized, which are stored and streamed through a Kaleidescape server. He also spent approximately $35,000 on a Prima Cinema system, allowing him and his family to watch films at home the day they are released in commercial cinemas. A wraparound control center surrounds the 11 custom leather chairs in the theater, eight of which recline into beds, while the doors that open into the theater are exact replicas of the Turbolift doors as seen on the TV show. When someone steps on the circular "transporter," the doors open with that familiar "whoosh" sound." Bell apparently likes to spend his money on others too. He has rented a local movie theater for every Star Trek film released in the past 25 years and has taken all of his employees, friends and their children along on opening night. The Wall Street Journal posted a video on YouTube of the home theater.
Chrome

Safari Browser May Soon Be Just As Fast As Chrome With WebP Integration (thenextweb.com) 105

An anonymous reader writes from a report via The Next Web: The Safari browser included in Apple's iOS 10 and macOS Sierra software is testing WebP, technology from Google that allows developers to create smaller, richer images that make the web faster. Basically, it's a way for webpages to load more quickly. The Next Web reports: "WebP was built into Chrome back at build 32 (2013!), so it's not unproven. It's also used by Facebook due to its image compression underpinnings, and is in use across many Google properties, including YouTube." Microsoft is one of the only major players to not use WebP, according to CNET. It's not included in Internet Explorer and the company has "no plans" to integrate it into Edge. Even though iOS 10 and macOS Sierra are in beta, it's promising that we will see WebP make its debut in Safari latest this year. "It's hard to imagine Apple turning away tried and true technology that's found in a more popular browser -- one that's favored by many over Safari due to its speed, where WebP plays a huge part," reports The Next Web. "Safari is currently the second most popular browser to Chrome." What's also interesting is how WebP isn't mentioned at all in the logs for Apple's Safari Technology Preview.
Google

Google Is Spending Half a Billion Dollars To Curry Europe's Favor (cnet.com) 72

An anonymous reader writes: Google has ratchet up its investment in European goodwill, aiming to spend about $450 million from 2015 to 2017 as EU regulators narrow their gaze on the search giant, according to a report by the New York Times. The company is pouring money into wide-ranging sponsorships, like an exhibition at a Belgian museum incorporating virtual reality, a fund to help European news publishers amp up their web savvy, a digital training course for Irish teachers, and YouTube-backed concerts, according to the report.
Android

Facebook's Android App Can Now Save Offline Videos (ndtv.com) 30

An anonymous reader quotes a report from NDTV: The latest versions of Facebook's Android app now allow users to save videos for offline viewing. The video is saved inside the app in the 'Saved' section, and is not accessible independently to users. Facebook for Android is showing a 'Save video' option in the dropdown menu of a Facebook video post. The videos can be saved and viewed offline for as many times as the user desires and can also be deleted as per his/her wish. The company might not be willing to provide the video file independently to its users in order to encourage sharing over its own social media networking site, however, it is anybody's guess what the actual reason behind this decision is. It seems in line with what companies like Google have been doing with YouTube in developing nations like India, where a save for offline viewing option is present to combat mobile data woes. As per an Android Police report, the option to save videos is currently showing up in versions 85 and 86 (beta) of the Facebook for Android app.
Moon

Taiwan Building Lunar Lander For NASA Moon-Mining Mission (blastingnews.com) 84

MarkWhittington quotes a report from Blasting News: According to AFP, the Chung-shan Institute of Science and Technology in Taiwan is building a $47 million, 3.7 metric ton lunar lander on behalf of NASA. The vehicle is designed to carry a rover called Resource Prospector, which would roll about the lunar surface searching out deposits of oxygen, hydrogen, and water. The Resource Prospector mission is still being formulated but is envisioned to be a joint project with several national space agencies and commercial companies. The lunar lander is the first vehicle of its type to be built in Taiwan. "The Resource Prospector would take samples from about a meter beneath the lunar surface and then heat them in an oven to ascertain what the materials are that comprise it," reports Blasting News. The mission is part of the second stage to NASA's Journey to Mars program called "Proving Ground." "Should the Resource Prospector prove to be successful, the moon could be used as a base for space journeys into Mars," says Han Kuo-change, the head of CSIST's international cooperation program.
Microsoft

Microsoft Stream Is a New Video Service For Businesses (techcrunch.com) 34

An anonymous reader shares a TechCrunch report: Microsoft today launched Stream, a new business video service that aims to give businesses that want to share video internally the same kind of tools and flexibility that YouTube offers to consumers -- but with the added benefits of the security tools enterprises expect from their document management services. The service is now available as a free preview. As James Phillips, Microsoft's corporate VP of its Business Intelligence Products Group, told me, all it takes to get started with Stream is an email address. The user experience in Stream does take its cues from consumer services like Vimeo and YouTube, and includes a number of social features, including likes and comments, as well as recommendations. "We've all been trained as consumers to understand what beautiful and fully featured software looks like," Phillips told me. "And we are now delivering on those experiences in business software." Some of the basic use cases for using video in a company include training and employee communications.
Facebook

Did Armenia Censor Facebook? (mashable.com) 25

An anonymous Slashdot reader writes: "Only one day after Twitter was throttled in Turkey during an ill-fated coup attempt, social media again seemed to become a target during unrest in Armenia's capital, Yerevan," reports Mashable. A day after Turkey's president declared that Friday's coup has failed, armed men had taken hostages in nearby Armenia, and "The National Security Service accused the hostage takers' supporters of spreading false rumors on the internet about an uprising and the seizure of other buildings," according to Reuters. "Early Sunday, journalists and others in Armenia used Twitter to suggest Facebook had been blocked for a period as the incident unfolded," Mashable reports, noting that later Facebook access appeared to be restored. Facebook was unavailable for comment.
Crime

Newt Gingrich Says Visiting An ISIS Or Al Qaeda Website Should Be A Felony (techdirt.com) 406

flopsquad writes: Following the July 14th terror attack in Nice, France, former House Speaker Newt Gingrich has called for U.S. Muslims to be tested for their belief in Sharia law, and if so, deported: "Western civilization is in a war. We should frankly test every person here who is of a Muslim background and if they believe in Sharia they should be deported," Gingrich said in an interview with Fox News' Sean Hannity. While the cleverest few might try to defeat such a test by answering "No," Mr. Gingrich laid out additional steps to shore up the plan: "The first step is you have to ask them the questions. The second step is you have to monitor what they're doing on the internet. The third step is, let me be very clear, you have to monitor the mosques. I mean, if you're not prepared to monitor the mosques, this whole thing is a joke." Gingrich also opined that "Anybody who goes on a website favoring ISIS, or Al-Qaeda, or other terrorist groups, that should be a felony, and they should go to jail. No word on the First and Fourth Amendment implications of his proposals, nor on where Gingrich plans to deport U.S. citizens who fail his Sharia test. Gingrich went on to say: "Any organization which hosts such a website should be engaged in a felon. It should be closed down immediately. Our forces should be used to systematically destroy every internet based source..." Mike Masnick from Techdirt writes: "Merely visiting a website should put you in jail? What if you're a journalist? Or a politician? Or a researcher trying to understand ISIS? That should be a felony? That's not how it works. This also assumes, idiotically, that merely reading a website about ISIS will make people side with ISIS. It's also not, at all, how the law works. Same with the second part about it being a felony to host such content."
Censorship

Facebook, Twitter, and YouTube Blocked In Turkey During Reported Coup Attempt (techcrunch.com) 153

An anonymous reader writes: In response to an attempted military coup, the Turkish government has reportedly blocked social media sites including Facebook, Twitter and YouTube. TechCrunch reports: "Turkey Blocks, a Twitter account that regularly checks if sites are being blocked in the country, reported at 1:04 PM Pacific (11:04 PM Istanbul time) that Facebook, Twitter, and YouTube were all unresponsive, though Instagram and Vimeo remained available." Some Turkish users were able to update their social media accounts likely through a VPN or other anonymizing service. One user posted a video on Twitter that shows what appears to be a fighter jet flying very low over the Turkish capital of Ankara; another user has tweeted a video of a helicopter opening fire in Turkey. The Associated Press reports that Turkish prime minister, Binali Yildirim, has confirmed the coup by a group within Turkey's military. The following statement from the group was reportedly read on local television: "Turkish Armed Forces have completely taken over the administration of the country to reinstate constitutional order, human rights and freedoms, the rule of law and the general security that was damaged. All international agreements are still valid. We hope that all of our good relationships with all countries will continue."

UPDATE 7/15/16: Turkish president Recep Tayyip Erdogan has issued a statement in a FaceTime call to CNN Turk urging Turkish citizens to take to the streets to defend "Turkish democracy." He urges the Turkish people to convene at public squares and airports, saying there is no power higher than the power of the people.
Earth

Null Island: The Land of Lousy Directional Data (vice.com) 91

An anonymous reader writes: Null Island is one of the world's most visited places for directional data that doesn't exist in real life. The Wall Street Journal reports (Warning: source may be paywalled): "In the world of geographic information systems, the island is an apparition that serves a practical purpose. It lies at 'zero-zero,' a mapper's shorthand for zero degrees latitude and zero degrees longitude. By a programming quirk introduced by developers, those are the default coordinates where Google maps and other digital Global Positioning System applications are directed to send the millions of users who make mistakes in their searches. [About seven years ago, Mr. Kelso, who had heard the phrase used by other cartographers, encoded Null Island as the default destination for mistakes into a widely used public-domain digital-mapping data set called Natural Earth, which has been downloaded several million times. On a whim, he made the location at zero-zero appear as a tiny outcrop one-meter square. In no time at all, other mappers gave the 'island' its own natural geography, created a website, and designed T-shirts and a national flag.]" If you're feeling cognitively lazy, you can watch the short animated YouTube video explaining Null Island.
Power

CleanSpace CO Sensor Runs On Freevolt RF Harvesting 109

mspohr writes: A few years ago, a Kickstarter was set up to develop a locator tag powered by free radio frequency (RF) energy harvested from the environment. This was called a scam here on Slashdot and was shut down before it was funded on Kickstarter. However, it now appears that the concept is not as far-fetched as some predicted. A UK company CleanSpace has developed a carbon monoxide (CO) sensor which is powered by free RF. A review of the product has been posted on YouTube. It uses Freevolt technology to keep a battery charged and the CO sensor running. Since they have several thousand of these devices collecting data, they do appear to work and it seems to be in the 'not a scam' department.
The Courts

Valve Denounces Third-Party Gambling Sites, But Won't Block Them (arstechnica.com) 32

Valve is finally addressing the last week's Counter-Strike gambling scandal. The game maker and Steam operator says that it does not directly profit from these gambling sites' actions. In a statement, Valve's Erik Johnson said the following: We have no business relationships with any of these sites. We have never received any revenue from them. And Steam does not have a system for turning in-game items into real world currency. Johnson added that gambling sites work by creating and maintaining their own Steam accounts, which are used to conduct virtual item trading. He adds:Using the OpenID API and making the same web calls as Steam users to run a gambling business is not allowed by our API nor our user agreements.Steam's user agreement includes a passage that forbids "exploiting the Content and Services or any of its parts for any commercial purpose, except as expressly permitted elsewhere in this Agreement." The company won't block these websites, but says it will begin cracking down on them -- by sending them cease and desist notices.
Music

YouTube Says Content Owners Made $1B Last Year -- So Music Labels Should Stop Complaining (recode.net) 153

Peter Kafka, reporting for Recode: Here's the latest salvo in the back and forth between YouTube and the music industry: A report from Google that says its video site's copyright software has allowed content owners to generate $1 billion in the last year or so. Or, in other words: Hey, music guys! Stop moaning about money -- we're making plenty of it for you. Google's formal message comes via "How Google Fights Piracy," a 62-page mega-pamphlet it is releasing today. Google adds that its Content ID tool, which lets copyright owners "claim" their videos that users upload to YouTube so that ad money can be made off it, has garnered $2 billion since 2007. This is Google's response to a growing concern from the music industry that YouTube doesn't pay well, its Content ID isn't a solution, and that the video platform is built on stolen material.
DRM

Sega Saturn's DRM Cracked Almost 23 Years After Launch (gamasutra.com) 96

An anonymous reader writes from a report via Gamasutra: The Sega Saturn's DRM has finally been cracked after it hit store shelves nearly 23 years ago in November 1994. Engineer James Laird-Wah first set forth to break through the console's copy protection in an attempt to harness its chiptune capabilities. Laird-Wah has, however, developed a way to run games and other software from a USB stick in the process. Since disc drive failure is a common fault with the game console, his method circumvents the disc drive altogether, instead reworking the Video CD Slot so it can take games stored on a USB stick and run them directly through the Saturn's CD Block. "This is now at the point where, not only can it boot and run games, I've finished just recently putting in audio support, so it can play audio tracks," explained Laird-Wah, speaking to YouTuber debuglive. "For the time being, I possess the only Saturn in the world that's capable of writing files to a USB stick. There's actually, for developers of home-brew, the ability to read and write files on the USB stick that's attached to the device.
Government

Warner Bros. Settles FTC Charge For Not Disclosing Payments To YouTubers For Positive Reviews (theverge.com) 81

An anonymous reader quotes a report from The Verge: The Federal Trade Commission has reached a settlement with Warner Bros. over claims that the publisher failed to disclose that it had paid prominent YouTubers for positive coverage of one of its video games. The FTC charge stated that Warner Bros. deceived customers by paying thousands of dollars to social media "influencers," including YouTube megastar PewDiePie, to cover Middle Earth: Shadow of Mordor without announcing that money had changed hands. Under the terms of the agreement, Warner Bros. is banned from failing to disclose similar deals in the future, and cannot pretend that sponsored videos and articles are actually the work of independent producers. Warner Bros.' deal with the influencers involved stated that they had to make at least one tweet or Facebook post about the game, as well as produce videos with a string of caveats to avoid showing it in a negative light. Those videos could not express negative opinions about the game or Warner Bros. itself, could not show any glitches or bugs, and must include "a strong verbal call-to-action to click the link in the description box for the viewer to go to the [game's] website to learn more about the [game], to learn how they can register, and to learn how to play the game," according to Ars Technica. Influencers were advised to disclose the video's sponsored status under YouTube's "Show More" section, but some did not, and the FTC says this would not have been enough to skirt the rules anyway, as the disclaimer would not have been visible on videos watched through Twitter, Facebook, or other social media sources.
Technology

Hamilton Producer Jeffrey Seller: Live Theater Is the Antidote To Digital Overload (recode.net) 100

As more people come online and get hold of smartphones, we are witnessing a generation that is reliant on their phones to get news, entertainment, and educational resources among other things. They watch movies and TV shows on Netflix and other services, and they listen to music on Spotify, Apple Music and YouTube. Naturally, you would think that people in the Broadway theater business must be threatened that nobody will physically attend their show anymore, but that's not necessarily the case, at least not with everyone. Take Jeffrey Seller, for example, the producer of Broadway megahit Hamilton refuses to fold to the virtual reality laden world, and he has numbers on his side. From a Recode article (you can also found an hour-long podcast on this there): The success of "Hamilton," which is sold out in New York through May 2017 and will soon spread to Chicago, San Francisco and London, has convinced Seller that demand for a real, non-digital experience is stronger than ever. He said 13 million people went to see Broadway shows in the past season, and only 500,000 of those were "Hamilton" attendees. By contrast, when Seller first made a splash as the co-producer of "Rent" in 1996, he estimated total Broadway attendance was around eight million to nine million people. "Experiencing art live with friends, with family, with people we love, is so rewarding that people are searching it out amidst the digital age, in which our faces are in our phones seemingly every other hour of the day," he said.Explaining why he thinks that virtual reality cannot completely take over, in a rather crass example, Seller adds, "Do you want to have sex or do you want to have a virtual reality experience of sex?"
Encryption

Researchers Develop A Way To Stop Ransomware By Watching The Filesystem (phys.org) 102

An anonymous reader quotes a report from Phys.Org: Ransomware -- what hackers use to encrypt your computer files and demand money in exchange for freeing those contents -- is an exploding global problem with few solutions, but a team of University of Florida researchers says it has developed a way to stop it dead in its tracks. The answer, they say, lies not in keeping it out of a computer but rather in confronting it once it's there and, counterintuitively, actually letting it lock up a few files before clamping down on it. "Our system is more of an early-warning system. It doesn't prevent the ransomware from starting [...] it prevents the ransomware from completing its task [...] so you lose only a couple of pictures or a couple of documents rather than everything that's on your hard drive, and it relieves you of the burden of having to pay the ransom," said Nolen Scaife, a UF doctoral student and founding member of UF's Florida Institute for Cybersecurity Research. Scaife is part of the team that has come up with the ransomware solution, which it calls CryptoDrop. "Antivirus software is successful at stopping them when it recognizes ransomware malware, but therein lies the problem," reports Phys.Org. "'These attacks are tailored and unique every time they get installed on someone's system,' Scaife said. 'Antivirus is really good at stopping things it's seen before [...] That's where our solution is better than traditional anti-viruses. If something that's benign starts to behave maliciously, then what we can do is take action against that based on what we see is happening to your data. So we can stop, for example, all of your pictures from being encrypted.' The results, they said, were impressive. 'We ran our detector against several hundred ransomware samples that were live,' Scaife said, 'and in those case it detected 100 percent of those malware samples and it did so after only a median of 10 files were encrypted.'" The University of Florida uploaded a video briefly explaining its software.
Television

YouTube Looking To Launch Online TV Service Next Year With ESPN, ABC, and CBS (theverge.com) 24

An anonymous reader writes: Bloomberg reported in May that YouTube is working on a paid subscription service called Unplugged that would offer customers a selection of TV channels streamed via the internet. Now, The Information (Warning: source may be paywalled) is reporting that deals are starting to come together, and ESPN, ABC, and CBS are "firmly expected" to be available through the service. Other major broadcasters are expected to try and get involved with the service, but the report notes that YouTube may purposely choose to pass on smaller networks, like HGTV, to try and market YouTube videos instead. The question remains to be answered as to how YouTube plans to make anyone interested in its service. ESPN, ABC, and CBS are already offered through other online TV services, like Sling TV. CBS has its own standalone subscription service, and ESPN will soon have its own as well. Also, The Information notes that YouTube Red -- YouTube's existing subscription service -- isn't doing so well. Although, it's worth noting that service is completely different than what Unplugged is rumored to feature.

Slashdot Top Deals