Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Submission + - New Estimate: Billions of Milky Way Planets are in the Habitable Zone (sciencedaily.com)

Press2ToContinue writes: Astronomers have discovered thousands of exoplanets using the Kepler satellite. By analyzing these planetary systems, researchers have calculated the probability for the number of stars that might have planets in the habitable zone. The calculations show that billions of stars in the Milky Way will have one to three planets in the habitable zone, where there is the potential for liquid water and where life could exist.

Submission + - Gaming On Linux With Newest AMD Catalyst Driver Remains Slow (phoronix.com)

An anonymous reader writes: The AMD Catalyst binary graphics driver has made a lot of improvements over the years, but it seems that NVIDIA is still leading in the Linux game with their shared cross-platform driver. Tests done by Phoronix of the Catalyst 15.3 Linux Beta found on Ubuntu 15.04 shows that NVIDIA continues leading over AMD Catalyst with several different GPUs on BioShock Infinite, a game finally released for Linux last week. With BioShock Infinite on Linux, years old mid-range GeForce GPUs were clobbering the high-end Radeon R9 290 and other recent AMD GPUs tested. The poor showing wasn't limited to BS:I though as the Metro Redux games were re-tested too on the new drivers and found the NVIDIA graphics still ran significantly faster and certainly a different story than under Windows.

Submission + - Modern PHP: New Features and Good Practices

Michael Ross writes: Robert, here is the book review meta-data: author: Josh Lockhart pages: 268 publisher: O'Reilly Media rating: 8/10 reviewer: Michael Ross ISBN: 978-1491905012 summary: Solid advice on some state-of-the-art PHP tools and techniques.

In recent years, JavaScript has enjoyed a dramatic renaissance as it has been transformed from a browser scripting tool primarily used for special effects and form validation on web pages, to a substantial client-side programming language. Similarly, on the server side, after years as the target of criticism, the PHP computer programming language is seeing a revival, partly due to the addition of new capabilities, such as namespaces, traits, generators, closures, and components, among other improvements. PHP enthusiasts and detractors alike can learn more about these changes from the book Modern PHP: New Features and Good Practices, authored by Josh Lockhart.

Programmers familiar with the language and its community may recognize the author's name, because he is the creator of PHP The Right Way, a website which he describes as "an easy-to-read, quick reference for PHP popular coding standards, links to authoritative tutorials around the Web and what the contributors consider to be best practices at the present time," in 21 different languages.

Yet rest assured that the book under review is not merely a dead-tree version of the website. Instead, the book covers the more recent advancements within the language, while the website covers best practices and standards. This should be borne in mind, otherwise the reader may be baffled by the absence from the book of certain topics on the website essential to the language, such as SPL, PEAR, and PHPDoc. Moreover, of the topics shared between the book and the website, the information is generally organized quite differently, with more example code in the book.

This title was published on 1 March 2015, under the ISBN 978-1491905012, by O'Reilly Media, who kindly provided me with a review copy. Its material is presented in 268 pages, organized into 13 chapters (The New PHP; Features; Standards; Components; Good Practices; Posting; Provisioning; Tuning; Deployment; Testing; Profiling; HHVM and Hack; Community), which are grouped into three parts (Language Features; Good Practices; Deployment, Testing, and Tuning) — as well as two appendices (Installing PHP; Local Development Environments) and an index. The publisher's page does not offer much of interest. However, all of the example code is available from the book's GitHub repository. There are differences between the GitHub code and what is printed in the book, e.g., a baffling require 'vendor/autoload.php'; in the first example code file. The author claims that the reader does not need to know PHP, but at least "a basic understanding of [] fundamental programming concepts" (page xiv). However, anyone without at least intermediate skills and experience with PHP could conceivably struggle with these more advanced subjects.

The first chapter is only a brief overview of the history of PHP, its current state, and some possible future changes to the language's engine. The real content starts in the second chapter, in which the author gives the reader a fast-paced introduction to his seven favorite major new features in PHP: namespaces, class interfaces, traits, generators, closures, Zend OPcache, and the built-in HTTP server. In some regards, the coverage is a bit too fast-paced, as some topics and questions likely in the reader's mind are not addressed — for instance, namespace case-sensitivity and techniques for ensuring that a chosen namespace is globally unique (page 9). For each topic, its purpose and advantages are explained, and sometimes illustrated with code examples, although none are extensive.

The second part of the book opens with a chapter on some of the new standards in the PHP ecosystem that are intended to move the common development process from a reliance upon one isolated framework, with an idiosyncratic coding style, to distributed components that can interoperate through the use of interfaces, industry-wide coding standards, and the use of autoloaders for finding and loading classes, interfaces, and traits at runtime. Components are covered in more detail in the subsequent chapter, as is Composer, for installing components and managing dependencies. The fifth chapter is a lengthy but information-packed exposition of numerous best practices regarding input data sanitization, password handling, dates and times, and safe database queries, among other topics. Some of the advice can be found in other PHP books and online, but all of this is neatly explained, updated with the newer PHP versions, and worthwhile as a refresher.

Deployment, testing, and tuning are the broad subject areas of the third and final part of the book. The author discusses the options for hosting your PHP applications, as well as provisioning any self-managed web server and tuning a server for optimal performance. All of the instructions assume you are using Linux and nginx, and thus would be of less value to those using Windows or Apache, for instance. The material on application deployment is relatively brief, and focuses on use of the Capistrano tool. Testing is often neglected in real-world projects, but certainly not in this book, as the author explains unit and functional testing, illustrated through the use of PHPUnit. This is followed by information on how to use a development or production profiler to analyze the performance of your application, with detailed coverage of Xdebug and XHProf, among other tools. The next two chapters dive into topics related to the (possible) future of PHP — specifically, Facebook's HHVM PHP interpreter and their Hack derivative language. The final chapter briefly discusses the PHP community. The two appendices explain how to install PHP on Linux or OS X for commandline use, and how to set up a local development environment. The author mentions a free edition of Zend Server, but the vendor page mentions no such pricing.

Despite its technical subject matter, this book is not a difficult read. The author's writing style is usually light and friendly, especially in the preface. In a few places, the phrasing is a bit too terse, which might prove momentarily confusing to some readers, e.g., "Function and constant aliases work the same as [those of] classes" (page 11). The text has some errata (aside from the two, as of this writing, already reported): "curl" (pages 15, 220, and 222; should read "cURL"), "a an argument" (page 33), "Prepared statement [to] fetch" (pages 99 and 100), "with [the] php://filter strategy" (page 110), "2 Gb" (page 129; should read "2 GB"), "the the" (page 154), "path to a the code" (page 176), and "Wordpress" (page 190; should read "WordPress").

One weakness with the book is that for several of the topics — including some critical ones — there is not enough detailed information provided that would allow one to begin immediately applying that technique or resource to one's own coding, but instead just enough information to whet one's appetite to learn more (presumably from another book or a website). Secondly, some of the narrative — particularly near the end of the book, when discussing various tools — would be of less value to anyone not developing analytics environment. Beware that some of the tools require numerous dependencies. For instance, do you have Composer, Git, MongoDB, and its PHP extension installed? If not, then you won't be using XHGUI. Also, some of the installation and configuration steps are quite lengthy, with no details provided for troubleshooting issues that might arise. Lastly, despite the promise that any reader with only basic programming knowledge will be able to fully understand the book, such a reader would likely find much of its contents mystifying without further preparation from other sources.

Nonetheless, the book has much to offer, despite its slender size. Numerous resources are recommended — most if not all apparently vetted by the author, who clearly has considerable experience in this arena. Some valuable techniques are presented, such as those instances in the text where the author shows how to use iteration on large data sets to minimize memory usage. In addition, the example code demonstrates that the author has made the effort to produce quality code that can serve as a model to others. Modern PHP does a fine job overall of explaining and advocating the newer capabilities of PHP that would attract developers to choose the language for building state-of-the-art websites and web applications.

Michael Ross is a freelance web developer and writer.

Comment Proper usage (Score 1) 86

If private data is defined as what you don't want others to see and public data is defined as what you want others to see, which is appropriate for the cloud? Seems easy to me: if you need to keep secrets, keep it off the internet. And you might think about how easy security is if you only use your powers for good not evil.

Submission + - Report: NASA May Miss SLS Launch Deadline (planetary.org)

An anonymous reader writes: A post at the Planetary Society's blog summarizes a report from NASA's Office of Inspector General which says the agency will struggle to get launch facilities up and running in time for the Space Launch System's November 2018 launch deadline. "Ground systems are a critical piece of the SLS-Orion infrastructure. All three elements are tightly integrated, with ground systems requiring significant input from the rocket and capsule designs." To be more specific, NASA has found 462 separate inter-dependencies, less than two-thirds of which have been resolved so far. "The Mobile Launcher must be moved into the Vehicle Assembly Building for testing prior to the delivery of SLS and Orion. When it comes time to stack the rocket and capsule for the first flight, there may be a 'learning curve,' said the OIG, where engineers work through unforeseen glitches." They're also worried about having to develop all the software to run these systems before the hardware is in place to test.

Comment Re:Oh oh Ted Cruz is going to be upset. (Score 1) 21

See the code words here... "weather" and "earth" in the same paragraph. This is going to tick off Ted Cruz and the extreme conservative republican base.

>

Send him into orbit. It wouldn't be the first time a politician grandstanded from space. Preferable as close as possible to one of these magnetic reconnections. "Don't worry Senator, your faith in god will protect you from the energy of a measly 10^16 pounds of TNT."

Submission + - GCHQ Builds Raspberry Pi Cluster: The Bramble (i-programmer.info)

WGFCrafty writes: The GCHQ (United Kingdom's security agency) has developed a 66 Pi cluster The Bramble. Each part of the bramble contains 8 Pis which are referred to as an OctaPi.

"The Pis are driven by power over ethernet (PoE) to reduce the wiring and each one has an LED display.

Each OctaPi can be used standalone or hooked up to make a bigger cluster. In the case of the Bramble a total of eight OctaPis makes the cluster 64 processors strong. In addition there are two head control nodes, which couple the cluster to the outside world. Each head node has one Pi, a wired and WiFi connection, realtime clock, a touch screen and a camera. ".

Submission + - New film changes colors when you stretch it (sciencemag.org)

sciencehabit writes: Materials scientists often look to the natural world for inspiration, but usually it takes their inventions a while to catch up with biological discoveries. Not this time. Earlier this week, scientists in Switzerland revealed that chameleons change colors by expanding a lattice of tiny crystals just under their skin. Now, researchers in California are reporting that they’ve made a thin film that changes colors when they tug on it. Such films could produce color-changing sensors that give engineers a way to monitor potentially dangerous structural changes to everything from bridges to airplane wings.

Submission + - Google is closing Google Code (blogspot.com)

Kohenkatz writes: Citing increasing spam and abuse, as well as the rise of Github and Bitbucket, Google has announced the closure of Google Code. Effective today, Google Code is no longer accepting new projects, and it will become read-only in August. After that, tarballs of all project data will be available until June 2016. To help project owners migrate, Google has added an "Export to Github" button to every project.

Submission + - Why Israel Could Be The Next Cybersecurity World Power (itworld.com)

jfruh writes: Beersheba is a small town in southern Israel, more than an hour's drive away from Tel Aviv and the bulk of the country's population. But the city is a hotbed of cybersecurity startups driven in part by a graduate program at the local university and the country's military and intelligence apparatus's keen interest in the subject.

Comment Why I learned to code? (Score 1) 144

I guess kids today will never get to experience what I felt when I learned to code BASIC on that TRS-80. It made me feel powerful like never before. No one I knew could do what I was doing. I figured out how to use that mysterious booklet containing the instruction set for the Z-80 and lightning shot from my fingers. I was a pioneer boldly sallying forth into unexplored worlds. Wielding my keyboard like a sword, I slashed my way, unbloodied, like The Count of Monte Cristo, through Pascal, PL1, 360/370 and C till finally I was slain by microcode. What an adventure it was. Have fun with that spreadsheet for your pointed headed boss.

Slashdot Top Deals

Our OS who art in CPU, UNIX be thy name. Thy programs run, thy syscalls done, In kernel as it is in user!

Working...